Another two memory leaks.
--HG-- branch : trunk
This commit is contained in:
@@ -39,6 +39,10 @@ EndScriptData */
|
|||||||
#define SPELL_TRUE_FULFILLMENT4 26526
|
#define SPELL_TRUE_FULFILLMENT4 26526
|
||||||
#define SPELL_BLINK 28391
|
#define SPELL_BLINK 28391
|
||||||
|
|
||||||
|
#define PLACES_CLEANUP delete place1; \
|
||||||
|
delete place2; \
|
||||||
|
delete place3; \
|
||||||
|
|
||||||
class ov_mycoordinates
|
class ov_mycoordinates
|
||||||
{
|
{
|
||||||
public:
|
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);
|
Image1 = m_creature->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
|
||||||
if(!Image1)
|
if(!Image1)
|
||||||
|
{
|
||||||
|
PLACES_CLEANUP
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5);
|
Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5);
|
||||||
Image1->SetHealth(m_creature->GetHealth() / 5);
|
Image1->SetHealth(m_creature->GetHealth() / 5);
|
||||||
if (target)
|
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);
|
Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);
|
||||||
if(!Image2)
|
if(!Image2)
|
||||||
|
{
|
||||||
|
PLACES_CLEANUP
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5);
|
Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5);
|
||||||
Image2->SetHealth(m_creature->GetHealth() / 5);
|
Image2->SetHealth(m_creature->GetHealth() / 5);
|
||||||
if (target)
|
if (target)
|
||||||
@@ -293,7 +303,9 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
|||||||
((boss_skeramAI*)Image2->AI())->IsImage = true;
|
((boss_skeramAI*)Image2->AI())->IsImage = true;
|
||||||
|
|
||||||
Invisible = true;
|
Invisible = true;
|
||||||
|
PLACES_CLEANUP
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_skeram(Creature *_Creature)
|
CreatureAI* GetAI_boss_skeram(Creature *_Creature)
|
||||||
|
|||||||
@@ -232,7 +232,10 @@ bool OutdoorPvPSI::HandleDropFlag(Player *plr, uint32 spellId)
|
|||||||
GameObject * go = new GameObject;
|
GameObject * go = new GameObject;
|
||||||
Map * map = MapManager::Instance().GetMap(plr->GetMapId(), plr);
|
Map * map = MapManager::Instance().GetMap(plr->GetMapId(), plr);
|
||||||
if(!map)
|
if(!map)
|
||||||
|
{
|
||||||
|
delete go;
|
||||||
return true;
|
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))
|
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;
|
delete go;
|
||||||
|
|||||||
Reference in New Issue
Block a user