mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-13 21:49:49 +01:00
Core/Spells: Refactor Player::ApplySpellMod to take SpellInfo argument instead of just spell id
This commit is contained in:
@@ -373,7 +373,7 @@ class spell_warl_health_funnel : public SpellScriptLoader
|
||||
uint32 damage = caster->CountPctFromMaxHealth(aurEff->GetBaseAmount());
|
||||
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_COST, damage);
|
||||
modOwner->ApplySpellMod(GetSpellInfo(), SPELLMOD_COST, damage);
|
||||
|
||||
SpellNonMeleeDamage damageInfo(caster, caster, GetSpellInfo(), GetAura()->GetSpellVisual(), GetSpellInfo()->SchoolMask, GetAura()->GetCastGUID());
|
||||
damageInfo.periodicLog = true;
|
||||
|
||||
@@ -98,13 +98,13 @@ class DuelResetScript : public PlayerScript
|
||||
int32 totalCooldown = spellInfo->RecoveryTime;
|
||||
int32 categoryCooldown = spellInfo->CategoryRecoveryTime;
|
||||
|
||||
player->ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, totalCooldown, nullptr);
|
||||
player->ApplySpellMod(spellInfo, SPELLMOD_COOLDOWN, totalCooldown, nullptr);
|
||||
|
||||
if (int32 cooldownMod = player->GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN))
|
||||
totalCooldown += cooldownMod * IN_MILLISECONDS;
|
||||
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS))
|
||||
player->ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, categoryCooldown, nullptr);
|
||||
player->ApplySpellMod(spellInfo, SPELLMOD_COOLDOWN, categoryCooldown, nullptr);
|
||||
|
||||
return remainingCooldown > 0
|
||||
&& !itr->second.OnHold
|
||||
|
||||
Reference in New Issue
Block a user