mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
[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
(cherry picked from commit d507a7e338)
This commit is contained in:
@@ -387,7 +387,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
}
|
||||
}
|
||||
|
||||
spell->prepare(&(spell->m_targets));
|
||||
spell->prepare(spell->m_targets);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -713,7 +713,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell&
|
||||
spellPrepare.ServerCastID = spell->m_castId;
|
||||
SendPacket(spellPrepare.Write());
|
||||
|
||||
spell->prepare(&targets);
|
||||
spell->prepare(targets);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user