Core: Fix some warnings

This commit is contained in:
Spp
2011-10-18 12:39:01 +02:00
parent 805e14a463
commit bc023c6dfb
6 changed files with 28 additions and 26 deletions
@@ -137,14 +137,13 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
return true;
}
Creature::Creature(): Unit(),
Creature::Creature(): Unit(), MapCreature(),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0),
m_PlayerDamageReq(0), m_lootMoney(0), m_lootRecipient(0), m_lootRecipientGroup(0), m_corpseRemoveTime(0), m_respawnTime(0),
m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE),
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false),
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
m_creatureInfo(NULL), m_creatureData(NULL), m_formation(NULL),
MapCreature()
m_creatureInfo(NULL), m_creatureData(NULL), m_formation(NULL)
{
m_regenTimer = CREATURE_REGEN_INTERVAL;
m_valuesCount = UNIT_END;
@@ -602,10 +602,12 @@ void GameObject::Delete()
{
SetLootState(GO_NOT_READY);
if (GetOwnerGUID())
{
if (Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
else //! Owner not in world anymore
SetOwnerGUID(0);
}
ASSERT (!GetOwnerGUID());
SendObjectDeSpawnAnim(GetGUID());