Another two memory leaks.

--HG--
branch : trunk
This commit is contained in:
raczman
2009-05-15 21:06:23 +02:00
parent 419c448bc9
commit ad552d272d
2 changed files with 18 additions and 3 deletions
@@ -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)
{
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)
{
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)
+3
View File
@@ -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)
{
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;