diff options
author | malcromdev@gmail.com> <none@none> | 2010-04-01 20:08:22 -0230 |
---|---|---|
committer | malcromdev@gmail.com> <none@none> | 2010-04-01 20:08:22 -0230 |
commit | 7c4f2f520f4047b10d94e44f6af1c910ff4bdbcf (patch) | |
tree | e2a9e3d750a61f79a601217b2eedadff4864cf58 /src | |
parent | 3b389b8aa2a4dcf916b1151acde4721f429d6199 (diff) |
Fix Go type 10 spell handling by QAston
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/GameObject.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index aa8e6ca9cec..01831f81d50 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -1173,6 +1173,7 @@ void GameObject::Use(Unit* user) // cast this spell later if provided spellId = info->goober.spellId; + spellCaster = NULL; break; } @@ -1482,14 +1483,10 @@ void GameObject::Use(Unit* user) return; } - Spell *spell = new Spell(spellCaster, spellInfo, triggered); - //Spell *spell = new Spell(spellCaster, spellInfo, triggered,GetGUID()); - - // spell target is user of GO - SpellCastTargets targets; - targets.setUnitTarget(user); - - spell->prepare(&targets); + if (spellCaster) + spellCaster->CastSpell(user, spellInfo, triggered); + else + CastSpell(user, spellId); } void GameObject::CastSpell(Unit* target, uint32 spellId) |