--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-26 16:47:04 +01:00
2 changed files with 4 additions and 2 deletions

View File

@@ -56,8 +56,8 @@ Pet::~Pet()
{
if(m_uint32Values) // only for fully created Object
{
if(Unit* owner = GetOwner())
owner->SetPet(this, false);
if(GetOwnerGUID())
sLog.outCrash("Pet %u is deconstructed but it still has owner guid", GetEntry());
for (PetSpellMap::iterator i = m_spells.begin(); i != m_spells.end(); ++i)
delete i->second;

View File

@@ -55,6 +55,8 @@ class Guardian : public TempSummon
int32 GetBonusDamage() { return m_bonusdamage; }
void SetBonusDamage(int32 damage) { m_bonusdamage = damage; }
Unit *GetOwner() { return m_owner; }
protected:
Unit *m_owner;
int32 m_bonusdamage;