Core/Spells: Refactor Spell::finish to accept SpellCastResult argument instead of just a bool indicating success

This commit is contained in:
Shauren
2023-02-28 00:19:31 +01:00
parent 982b60f39c
commit a8bb1739e9
8 changed files with 34 additions and 34 deletions

View File

@@ -389,7 +389,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
if (!pet->GetSpellHistory()->HasCooldown(spellid))
pet->GetSpellHistory()->ResetCooldown(spellid, true);
spell->finish(false);
spell->finish(result);
delete spell;
// reset specific flags in case of spell fail. AI will reset other flags
@@ -748,7 +748,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell&
if (!caster->GetSpellHistory()->HasCooldown(spellInfo))
caster->GetSpellHistory()->ResetCooldown(spellInfo->Id, true);
spell->finish(false);
spell->finish(result);
delete spell;
}
}