aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/BattleGround.cpp1
-rw-r--r--src/game/Debugcmds.cpp1
-rw-r--r--src/game/GameEventMgr.cpp3
-rw-r--r--src/game/Level2.cpp5
-rw-r--r--src/game/NPCHandler.cpp2
-rw-r--r--src/game/Object.cpp4
-rw-r--r--src/game/ObjectMgr.cpp2
-rw-r--r--src/game/Player.cpp6
-rw-r--r--src/game/PoolHandler.cpp1
-rw-r--r--src/game/SpellEffects.cpp3
-rw-r--r--src/game/Unit.cpp1
11 files changed, 0 insertions, 29 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 426f5de6655..aebe9bd28b1 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -1590,7 +1590,6 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
Creature* pCreature = new Creature;
if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
{
- pCreature->CleanupsBeforeDelete();
sLog.outError("Can't create creature entry: %u",entry);
delete pCreature;
return NULL;
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp
index 372afa95d62..ff720872f6b 100644
--- a/src/game/Debugcmds.cpp
+++ b/src/game/Debugcmds.cpp
@@ -794,7 +794,6 @@ bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
if(!v->Create(objmgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, m_session->GetPlayer()->GetPhaseMask(), entry, id, m_session->GetPlayer()->GetTeam(), x, y, z, o))
{
- v->CleanupsBeforeDelete();
delete v;
return false;
}
diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp
index ed742c9368b..a884db5dc0f 100644
--- a/src/game/GameEventMgr.cpp
+++ b/src/game/GameEventMgr.cpp
@@ -1283,10 +1283,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
Creature* pCreature = new Creature;
//sLog.outDebug("Spawning creature %u",*itr);
if (!pCreature->LoadFromDB(*itr, map))
- {
- pCreature->CleanupsBeforeDelete();
delete pCreature;
- }
else
map->Add(pCreature);
}
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index b15497e3d3b..401d1a75c39 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -1014,7 +1014,6 @@ 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;
}
@@ -2831,7 +2830,6 @@ 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;
@@ -3041,7 +3039,6 @@ 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;
@@ -3097,7 +3094,6 @@ 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;
@@ -3153,7 +3149,6 @@ 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;
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index 31b539abd05..a412f91b30c 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -678,7 +678,6 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
Pet *newpet = new Pet(_player, HUNTER_PET);
if(!newpet->LoadPetFromDB(_player,creature_id,petnumber))
{
- newpet->CleanupsBeforeDelete();
delete newpet;
newpet = NULL;
WorldPacket data(SMSG_STABLE_RESULT, 1);
@@ -797,7 +796,6 @@ void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
Pet *newpet = new Pet(_player);
if(!newpet->LoadPetFromDB(_player,creature_id,pet_number))
{
- newpet->CleanupsBeforeDelete();
delete newpet;
data << uint8(0x06);
}
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 104fb26e99f..eeb96db5798 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1759,7 +1759,6 @@ TempSummon *Map::SummonCreature(uint32 entry, const Position &pos, SummonPropert
if(!summon->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
{
- summon->CleanupsBeforeDelete();
delete summon;
return NULL;
}
@@ -1828,7 +1827,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
// petentry==0 for hunter "call pet" (current pet summoned if any)
if(!entry)
{
- pet->CleanupsBeforeDelete();
delete pet;
return NULL;
}
@@ -1837,7 +1835,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
if(!pet->IsPositionValid())
{
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pet->GetGUIDLow(),pet->GetEntry(),pet->GetPositionX(),pet->GetPositionY());
- pet->CleanupsBeforeDelete();
delete pet;
return NULL;
}
@@ -1847,7 +1844,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
if(!pet->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
{
sLog.outError("no such creature entry %u", entry);
- pet->CleanupsBeforeDelete();
delete pet;
return NULL;
}
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index b1da7a6ae94..7c2c2e6a658 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -1470,7 +1470,6 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
Creature *creature = new Creature;
if(!creature->LoadFromDB(guid, map))
{
- creature->CleanupsBeforeDelete();
sLog.outError("AddCreature: cannot add creature entry %u to map", guid);
delete creature;
return false;
@@ -1522,7 +1521,6 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 team, uint32 mapId, float x, f
Creature* creature = new Creature;
if(!creature->LoadFromDB(guid, map))
{
- creature->CleanupsBeforeDelete();
sLog.outError("AddCreature: cannot add creature entry %u to map", entry);
delete creature;
return 0;
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 48e4901a9e0..b1db9d75107 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -16462,10 +16462,7 @@ void Player::LoadPet()
{
Pet *pet = new Pet(this);
if (!pet->LoadPetFromDB(this,0,0,true))
- {
- pet->CleanupsBeforeDelete();
delete pet;
- }
}
}
@@ -22458,10 +22455,7 @@ void Player::ResummonPetTemporaryUnSummonedIfAny()
Pet* NewPet = new Pet(this);
if(!NewPet->LoadPetFromDB(this, 0, m_temporaryUnsummonedPetNumber, true))
- {
- NewPet->CleanupsBeforeDelete();
delete NewPet;
- }
m_temporaryUnsummonedPetNumber = 0;
}
diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp
index 1774907bcd0..c2cb8045b81 100644
--- a/src/game/PoolHandler.cpp
+++ b/src/game/PoolHandler.cpp
@@ -255,7 +255,6 @@ bool PoolGroup<Creature>::Spawn1Object(uint32 guid)
//sLog.outDebug("Spawning creature %u",guid);
if (!pCreature->LoadFromDB(guid, map))
{
- pCreature->CleanupsBeforeDelete();
delete pCreature;
return false;
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index bf48dfaddc9..76f2af18c50 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4855,10 +4855,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
}
else
- {
- NewPet->CleanupsBeforeDelete();
delete NewPet;
- }
}
}
return;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2d2db26ef89..e8955a18124 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -207,7 +207,6 @@ Unit::~Unit()
if (m_vehicleKit)
delete m_vehicleKit;
- assert(m_cleanupDone);
assert(!m_attacking);
assert(m_attackers.empty());
assert(m_sharedVision.empty());