aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp16
-rw-r--r--src/game/OutdoorPvPSI.cpp5
2 files changed, 18 insertions, 3 deletions
diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
index bbf7df27f78..471eb391b39 100644
--- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
+++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
@@ -39,6 +39,10 @@ EndScriptData */
#define SPELL_TRUE_FULFILLMENT4 26526
#define SPELL_BLINK 28391
+#define PLACES_CLEANUP delete place1; \
+ delete place2; \
+ delete place3; \
+
class ov_mycoordinates
{
public:
@@ -275,7 +279,10 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
Image1 = m_creature->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
if(!Image1)
- return;
+ {
+ PLACES_CLEANUP
+ return;
+ }
Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5);
Image1->SetHealth(m_creature->GetHealth() / 5);
if (target)
@@ -283,7 +290,10 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
if(!Image2)
- return;
+ {
+ PLACES_CLEANUP
+ return;
+ }
Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5);
Image2->SetHealth(m_creature->GetHealth() / 5);
if (target)
@@ -293,7 +303,9 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
((boss_skeramAI*)Image2->AI())->IsImage = true;
Invisible = true;
+ PLACES_CLEANUP
}
+
};
CreatureAI* GetAI_boss_skeram(Creature *_Creature)
diff --git a/src/game/OutdoorPvPSI.cpp b/src/game/OutdoorPvPSI.cpp
index e4686573a67..b2e2c192c5d 100644
--- a/src/game/OutdoorPvPSI.cpp
+++ b/src/game/OutdoorPvPSI.cpp
@@ -232,7 +232,10 @@ bool OutdoorPvPSI::HandleDropFlag(Player *plr, uint32 spellId)
GameObject * go = new GameObject;
Map * map = MapManager::Instance().GetMap(plr->GetMapId(), plr);
if(!map)
- return true;
+ {
+ delete go;
+ return true;
+ }
if(!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),SI_SILITHYST_MOUND, map ,plr->GetPositionX(),plr->GetPositionY(),plr->GetPositionZ(),plr->GetOrientation(),0,0,0,0,100,1))
{
delete go;