diff options
-rw-r--r-- | sql/updates/world/3.3.5/2040_18_51_00_world.sql | 2 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 19 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2040_18_51_00_world.sql b/sql/updates/world/3.3.5/2040_18_51_00_world.sql new file mode 100644 index 00000000000..5698b288056 --- /dev/null +++ b/sql/updates/world/3.3.5/2040_18_51_00_world.sql @@ -0,0 +1,2 @@ +-- Backdraft +UPDATE `spell_proc` SET `SpellFamilyMask1`=131264 WHERE `SpellId` IN(54274,54276,54277); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 75a671feff6..8f40f044fcc 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -21121,6 +21121,17 @@ void Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* s // special case (skip > 10sec spell casts for instant cast setting) if (op == SPELLMOD_CASTING_TIME && mod->value <= -100 && basevalue >= T(10000)) return; + else if (!Player::HasSpellModApplied(mod, spell)) + { + // Special case for Surge of Light, do not apply critical chance reduction if others mods was not applied (i.e. procs while casting another spell) + // (Surge of Light is the only PCT_MOD on critical chance) + if (op == SPELLMOD_CRITICAL_CHANCE) + return; + // Special case for Backdraft: do not apply GCD reduction if cast time reduction was not applied (i.e. when Backlash is consumed first). + // (Backdraft is the only PCT_MOD on global cooldown) + else if (op == SPELLMOD_GLOBAL_COOLDOWN) + return; + } totalmul += CalculatePct(1.0f, mod->value); break; @@ -21209,6 +21220,14 @@ void Player::ApplyModToSpell(SpellModifier* mod, Spell* spell) spell->m_appliedMods.insert(mod->ownerAura); } +bool Player::HasSpellModApplied(SpellModifier* mod, Spell* spell) +{ + if (!spell) + return false; + + return spell->m_appliedMods.count(mod->ownerAura) != 0; +} + void Player::SetSpellModTakingSpell(Spell* spell, bool apply) { if (apply && m_spellModTakingSpell != nullptr) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index a802f6ca271..27299679346 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1478,6 +1478,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> template <class T> void ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell = nullptr) const; static void ApplyModToSpell(SpellModifier* mod, Spell* spell); + static bool HasSpellModApplied(SpellModifier* mod, Spell* spell); void SetSpellModTakingSpell(Spell* spell, bool apply); void RemoveArenaSpellCooldowns(bool removeActivePetCooldowns = false); |