diff options
author | Trazom62 <none@none> | 2010-01-18 18:55:40 +0100 |
---|---|---|
committer | Trazom62 <none@none> | 2010-01-18 18:55:40 +0100 |
commit | 17d407f347ff67736a79612c81fced98cb4fc114 (patch) | |
tree | 5ad72dd95c49e246b998ab6eb507db7ca58fe167 /src/game/Level2.cpp | |
parent | faf845b6f2234690d5b20f54443f1a47c31cf503 (diff) | |
parent | 9a7746c9fcfe97edb044bde559b14d09d12f8e13 (diff) |
merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r-- | src/game/Level2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 401d1a75c39..b15497e3d3b 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -1014,6 +1014,7 @@ bool ChatHandler::HandleNpcAddCommand(const char* args) Creature* pCreature = new Creature; if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o)) { + pCreature->CleanupsBeforeDelete(); delete pCreature; return false; } @@ -2830,6 +2831,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args) Creature* wpCreature2 = new Creature; if (!wpCreature2->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, 0, 0, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation())) { + wpCreature2->CleanupsBeforeDelete(); PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, VISUAL_WAYPOINT); delete wpCreature2; return false; @@ -3039,6 +3041,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) Creature* wpCreature = new Creature; if (!wpCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o)) { + wpCreature->CleanupsBeforeDelete(); PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id); delete wpCreature; delete result; @@ -3094,6 +3097,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) Creature* pCreature = new Creature; if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT),map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o)) { + pCreature->CleanupsBeforeDelete(); PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id); delete pCreature; delete result; @@ -3149,6 +3153,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) Creature* pCreature = new Creature; if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o)) { + pCreature->CleanupsBeforeDelete(); PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id); delete pCreature; delete result; |