aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authorraczman <none@none>2009-05-15 21:06:23 +0200
committerraczman <none@none>2009-05-15 21:06:23 +0200
commitad552d272dc79413a428c766b9e6ce0c6e38163e (patch)
treef5e01950992eaadb25c0f5042d77346b8bf480c6 /src/bindings/scripts
parent419c448bc94c8bddf8347f558115fa7c18c72c9f (diff)
Another two memory leaks.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp16
1 files changed, 14 insertions, 2 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)