Commit Graph

1348 Commits

Author SHA1 Message Date
ariel- 8e0af1b93b Core/Player: only call _ApplyWeaponDamage for actual weapons
Closes #21308
2018-01-24 00:05:25 -03:00
ariel- b8c281f497 Core/Auras: Don't remove shield only dependant auras on disarm
Closes #19782
2018-01-18 16:29:21 -03:00
sirikfoll ed9e220991 Core/Player: Pass correct Zone ID to HandlePlayerLeaveZone
This will fix some issues with Wintergrasp, like phasing auras getting stuck and missing group invites for the battle, among others
2018-01-17 18:59:20 -02:00
ariel- f1986c6aaf Core/Entities: implement secondary damage for some weapons and removal of old voodoo
- Fixed correct Retaliation damage spell according to sniffs is 20240
- CalcArmorReducedDamage insisted on dealing a minimum of 1 damage even if damage was 0
- CalculateDamage was zero-phobic too: it defaulted to arbitrary max 5 damage

Closes #19081
2018-01-14 09:23:34 -03:00
ariel- 3b01cccd7e Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct
2018-01-13 20:49:43 -03:00
ariel- cb9e72e521 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876
2018-01-13 06:45:21 -03:00
ariel- f50a333418 Core/Misc: kill whitespace 2018-01-12 00:07:29 -03:00
xinef1 23823f5147 Core/Spells: Defined and implemented some new spell attributes (#18950) 2018-01-08 20:31:21 +01:00
Treeston 532ab1c7f8 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2018-01-03 20:04:19 +01:00
ariel- a0dcd9c798 Core/Player: fix issue with SendLoot when using Disarm Trap at maximum range 2018-01-02 01:19:23 -03:00
ariel- 95df8d5028 Core/Player: removed redundant check 2018-01-02 00:29:31 -03:00
ariel- 5b663f1162 Core/Player: implemented facial hair validation 2018-01-01 23:33:04 -03:00
Treeston eacfa9d89a Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.
Also change a very ugly hack in GetDialogStatus. Ew.
2018-01-01 17:07:58 +01:00
tkrokli f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Treeston d507a7e338 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has
2017-12-30 20:28:41 +01:00
jackpoz ad56299846 Core/Misc: Fix static analysis issues 2017-12-25 16:34:36 +01:00
jackpoz 12701cb0c6 Core/Misc: Replace time(NULL) with GameTime::GetGameTime() 2017-12-24 22:50:59 +01:00
Golrag 95456ab5d8 Core/Entities: Some changes to LoS z checking & MotionMaster::MoveJumpTo (PR #20970)
- Use Midsection height for LoS checking.
- Changed MotionMaster::MoveJumpTo to use correct z. This change also makes sure the _owner will jump towards the given angle. Instead of jumping to a unintended angle if the first one is not in LoS.
2017-12-14 16:56:30 +01:00
jackpoz 24e82fe83d Core/Misc: Fix static analysis issues
Fix static analysis issues reported by 3rd party tools
2017-12-08 23:27:30 +01:00
jackpoz 925557d1c0 Core/Misc: Fix static analysis issues
Fix various coverity reported issues
2017-12-08 15:14:51 +01:00
jackpoz a80c95a1c7 Core/Misc: Fix static analysis issues 2017-11-12 14:55:11 +01:00
Nathan Handley 6612ec47f4 Core/Misc: Add functionality to allow low level quests/kills/discoveries to grant experience 2017-11-04 01:25:14 +01:00
Shauren e947fcedee Core/Taxi: Apply reputation discount to all points in multi-segment paths
(cherry picked from commit 99f5d06149)
2017-10-29 19:13:32 +01:00
Treeston bf81a7b207 Core/Map: Fix a crash bug when teleporting out of map before being fully added to that map. Closes #20289. 2017-10-26 11:35:21 +02:00
Shauren b763242665 Core/Taxi: Fixed applying reputation discount to first taxi segment
Closes #20713

(cherry picked from commit d7e463dd9f)
2017-10-25 18:37:45 +02:00
Keader 9f943e284f Core/Player: Fixed Battleground double kill exploit (#20618)
Fixed by: Sirikfoll
Close: #20616
2017-10-20 09:36:22 -02:00
Wyreth ca024f104c Core/Quests: don't send "Received item" chat message for quest rewards. (#20465) 2017-10-09 21:14:09 +02:00
Treeston 47af704f63 Core/Player: More cleanups to Player::UpdateZone, including correcting an oversight that was causing the last known zone id to not update when leaving map. Closes #20289 for real this time. 2017-09-10 01:10:40 +02:00
Treeston 0f7015012b Core/Player: Resequence Player::UpdateZone some more to hopefully prevent future edge cases like #20289 from occurring. 2017-09-09 21:36:57 +02:00
Treeston dbabcfbe24 Core/Player: Update map zone stats BEFORE invoking scripts. Fixes a crash with zone change scripts that invoke another zone change. Closes #20289. 2017-09-09 21:32:34 +02:00
Treeston a1a12ec755 Core/Player: Prevent changing equipment while charmed. Closes #20209. 2017-09-05 15:33:44 +02:00
Aokromes fe2db07313 Core/Conditions: Rename CONDITION_SOURCE_TYPE_QUEST_ACCEPT to CONDITION_SOURCE_TYPE_QUEST_AVAILABLE
By Malcrom
2017-08-20 12:59:02 +02:00
sirikfoll e2565c2597 Core/Misc: Remove Whitespaces 2017-08-11 23:06:37 -03:00
r00ty-tc 59db2eeea0 Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object
 - Toggleable spawn groups (with C++/SAI/command options to use them)
 - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
 - Backward compatibility mode (set via group and for summons)
   to support creatures/gos that currently don't work well with this
   (this should be removed once the exceptions are fixed)

Fixes and closes #2858
Tags #8661 as fixable.
Fixes and closes #13787
Fixes #15222.
2017-07-31 21:21:04 +02:00
Treeston 98aa7806c4 Core/Player: Always set flight state change packets for players, even if their latest MovementInfo doesn't indicate it's needed (the MI might be outdated). Fixes a player flight exploit and closes #20079. 2017-07-25 20:00:13 +02:00
Treeston 28b3469e89 Core/WorldObject: Properly initialize position data for all types when initially creating them. Fixes some issues with PvP objectives not having the correct area ID set on initialization. Closes #20028. 2017-07-23 00:01:11 +02:00
treeston 24ec3ad340 Core/Taxi: Properly send taxi node status on login, as well as if the taxi master is out of range. Closes #20035. 2017-07-18 15:55:31 +02:00
jackpoz 832a114196 Core/Misc: Fix static analysis issues 2017-07-17 18:48:07 +02:00
Treeston f44956b051 Core/Quest: Prevent an issue causing quests to become invisible upon relog. (#20030)
Closes #20012
2017-07-16 14:36:42 +02:00
Weyrath 8b2bd9a5f2 Core/Quests: Fixed order of RewardChoiceItems and reputation reward. (#19904) 2017-07-13 17:52:26 +02:00
Treeston e2a1ccd118 [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2017-07-01 20:18:02 +02:00
Treeston 489478b74d Core/Entities: Extend combo point system to all Units and fix numerous quirks with rogue CP and vehicles (Malygos P3) (#19914)
- Implement Wolverine Bite (fixes #752)
- General combo point system cleanup
2017-06-24 22:41:16 -03:00
ariel- 85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren d6201e5dbb Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50
(cherry picked from commit 9299e9bde0)
2017-06-19 13:16:13 -03:00
joschiwald 46cb32c99f Core/Misc: Added Creature::CanGiveExperience helper function
(cherry picked from commit c1cc0e9949)
2017-06-19 02:35:22 -03:00
treeston 4b9b1d485d Revert "Cross-check client-submitted fall time with server-measured time. When excessive difference is detected, punish player. (#19895)" due to really random edge case client behavior causing false positives.
Going to need to find a different approach for dealing with the underlying issue.

This reverts commit 27cbfc3a93.
2017-06-18 01:25:36 +02:00
Treeston 27cbfc3a93 Cross-check client-submitted fall time with server-measured time. When excessive difference is detected, punish player. (#19895)
Fixes an exploit that could trivialize the Lich King encounter.
2017-06-17 03:31:53 +02:00
treeston 250e8d998b Group creation again (follow-up to 132538d). Groups now only disband if all members reject the invitation (as opposed to if any member rejects the invitation). 2017-06-15 13:08:26 +02:00
treeston 4b6351e6a5 Fixes to all-reputation and all-skill custom option handling:
- Move on-create customs (all explored, all reputations) to CharacterHandler::HandlePlayerLogin for first login. Fixes #19839.
- Add Wrath factions to all reputations custom (it only had BC factions).
- Remove unused ReputationMgr::SendStates. Add ReputationMgr::SendState handling for sending all updated states in arbitrary order if nullptr is passed (used in point #1).
- Fix all weapon skills max custom to properly apply on learning new weapon skills.
2017-06-15 04:19:28 +02:00
Cannix c14b448d63 Core/Player: Keep shared quests through map changes instead of getting stuck in busy state (#19821) 2017-06-15 01:27:37 +02:00