Fixes the following issues:
- Player pets would aggro neutral mobs as soon as they start autocasting (Imp's Firebolt) if they're in react range (due to victim != null, autocast counts as autoattack and sets victim)
- Neutral mobs would randomly evade when aggro switched between targets.
Closes#19768, #19485 and #10921.
(from PR #19814)
(cherry picked from commit 69fd6245dc41dca658cadb4e99c1ee6593fe000b)
- Creatures should no longer get stuck in evade mode following a target if a spell hits the creature just as it's entering evade mode.
- Fixes and closes#4943. Finally.
(cherry picked from commit 1945874f965a2aef951bc3dfae1144bd42365dcb)
- Update clients whenever target has more than one application of an aura that applies such aurastate
- Update again when one application gets removed
- Fixed Fire and Brimstone computing damage if any warlock applied the Immolate (should only count for own)
Closes#19790
(cherry picked from commit e27c385b48fce359a168d602dabae8c55fa85563)
- Confirmed with sniffs, healthless states aren't cleared
- Prevents some procs from happening
Closes#19754
(cherry picked from commit 05b42eef7efbd545ca33e478eb1cc2c807ebe71e)
After discussion we realized, ariel and me, that Creature and Unit IsMovementPreventedByCasting() have not the same checks (order matters)
(cherry picked from commit 5a2f0ce29e29d934c200f617fec6dad619fab9a5)
- IsFocusing is made virtual again, so there's no need to keep a duplicated function
This reverts commit 5043639c563514c079ba6eb959dd4c1c555fa494.
(cherry picked from commit 3ea46e57afe26778704647084cc6fa55a798e510)
Set in front modifies only the serverside orientation, use with care.
Also check for current focus to prevent things like incorrect damage on casting creatures (ie dragon breath direction change in your face because of some taunt missclick)
(cherry picked from commit 229444b74a7e2176db142e0446d4268995c5aad6)
- This commit enables stack rule 3 to be properly used to fix auras that should be active but only one providing effects, even if the spell has multiple auras
Closes#19454
(cherry picked from commit 9900899dd9d7f685a1c862bc75e7614e3f0a3ce6)
- Fixes applying DR to positive effects, and changing duration of whole aura
Closes#19447
(cherry picked from commit 232e631390a504b51d82a7b678b7cf26d49d182a)
- Rather update normal instance reset time to 2 hours after last creature kill
- This fixes yet another integer overflow due to the possibility of having time_t max showing up
- Also change respawntime and resettime fields to bigint on respawn/instance related tables
- Start using prepared statements on the InstanceSaveMgr
(cherry picked from commit 4c593f12caa162c1bfb831bdbed934bb39155ddb)
- Removed Unit::GetUnitMeleeSkill as it was basically a copy of GetMaxSkillValueForLevel
- Removed static from GetEffectiveResistChance, as this was passed anyways, changed name to CalculateAverageResistReduction, which better reflects what it does
- Fix melee miss chances calculated from attacker maxskill instead of victim maxskill
- Do actual checks if spell can be resisted/missed in MagicSpellHitResult (ie chances > 0)
- Fixed SPELLMOD_RESIST_MISS_CHANCE calculation in MeleeSpellMissChance
- Minor codestyle and cleanup of diminishing returns calcs
(cherry picked from commit e565b34f6d24411e210151d0d03e524f94cdff85)
- The whole MotionMaster will be destroyed along with the unit, freeing the allocated memory.
Closes#19324
(cherry picked from commit b53d0530cd9be97d549993a6b6c46e2cb7a4e779)
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling
- Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter
- Fixes many cases of rounding error due to applying/unapplying of small factors
- Allows amounts to be zeroed (ie with an AuraEffect of amount -100)
- Do a partial revert of 6dc37a9add631888fe5fbcd43d19c2b07bed8a57, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd)
- SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs)
Closes#18687
(cherry picked from commit c69a7d1223b2ce108a221e5cc70f76cd80ae6675)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world
(cherrypicked from 7567cafec84080d26ea513242a1f540a823b8f9d)
- Renamed IsProcTriggeredOnEvent to GetProcEffectMask, since long ago this function returned bool, new name should better reflect its use
(cherrypicked from e7ccd8ea3fccad92af3553f544aad49be5d1a9ed)