diff options
author | megamage <none@none> | 2009-05-06 00:06:38 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-06 00:06:38 -0500 |
commit | 3f6f15e34b11586d4b819cd89261fb03f690bb9f (patch) | |
tree | d058b290537c5cea2e3300c5af71d5449227c341 /src/game/GameObject.cpp | |
parent | f4e86543377c9e4e3746b579106cb4d72d099fa1 (diff) |
*Update instance script functions.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r-- | src/game/GameObject.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 54760a99b78..2f1014eb769 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -95,7 +95,7 @@ void GameObject::RemoveFromWorld() { if(Map *map = FindMap()) if(map->IsDungeon() && ((InstanceMap*)map)->GetInstanceData()) - ((InstanceMap*)map)->GetInstanceData()->OnObjectRemove(this); + ((InstanceMap*)map)->GetInstanceData()->OnObjectCreate(this, false); // Possible crash at access to deleted GO in Unit::m_gameobj if(uint64 owner_guid = GetOwnerGUID()) { @@ -1362,7 +1362,8 @@ void GameObject::CastSpell(Unit* target, uint32 spellId) if(self) { - target->CastSpell(target, spellInfo, true); + if(target) + target->CastSpell(target, spellInfo, true); return; } @@ -1379,7 +1380,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId) else { trigger->setFaction(14); - trigger->CastSpell(target, spellInfo, true, 0, 0, target->GetGUID()); + trigger->CastSpell(target, spellInfo, true); } //trigger->setDeathState(JUST_DIED); //trigger->RemoveCorpse(); |