From 9b141207d170e4b2b4e6d9290d5f921f76cbcea0 Mon Sep 17 00:00:00 2001 From: Treeston Date: Sat, 30 Dec 2017 20:28:41 +0100 Subject: [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 d507a7e3388382960108b24143da48e5f912b4a7) --- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index ae30dcca730..965fd290a1d 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -176,7 +176,7 @@ void ScriptedAI::DoCastSpell(Unit* target, SpellInfo const* spellInfo, bool trig return; me->StopMoving(); - me->CastSpell(target, spellInfo, triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE); + me->CastSpell(target, spellInfo->Id, triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE); } void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId) -- cgit v1.2.3