What does this patch fix: GameObjects summoned by spell 25648 (Sand Trap) should be summoned at target-location, not at location of caster
For Rev: r6324
link in Bug-Section: no
written by: Darwolia
Probably there could be a better solution - but some gameobjects summoned by SPELL_EFFECT_SUMMON_OBJECT_WILD should be summoned at location of target and not at location of caster. Example: sand trap (25648)
Code is tested and works:
Index: SpellEffects.cpp
===================================================================
--- SpellEffects.cpp (revision 6324)
+++ SpellEffects.cpp (working copy)
@@ -4320,6 +4320,16 @@
else
m_caster->GetClosePoint(x,y,z,DEFAULT_WORLD_OBJECT_SIZE);
+ // Sand Trap should be summoned at target, not at caster
+ if (m_spellInfo->Id == 25648)
+ {
+ if(!unitTarget)
+ return;
+ if(!unitTarget->isAlive())
+ return;
+ unitTarget->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
+ }
+
Map *map = target->GetMap();
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map,