aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2009-03-26 16:47:04 +0100
committerXTZGZoReX <none@none>2009-03-26 16:47:04 +0100
commit2dc02698190febaa81cef357dde6e2c290e1fbb0 (patch)
treee83b669e0eb26283d3d20b4a68e9875d4d500ff8 /src
parent0952469d69536b00cb58167970d6cff646e7ccaf (diff)
parenta6193d4893a277cb05d6ba59cb83c77e57fc93ef (diff)
* Merge.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Pet.cpp4
-rw-r--r--src/game/TemporarySummon.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index faf12118a10..71f45507d45 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -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;
diff --git a/src/game/TemporarySummon.h b/src/game/TemporarySummon.h
index c5f9fe906cd..cb5651d3194 100644
--- a/src/game/TemporarySummon.h
+++ b/src/game/TemporarySummon.h
@@ -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;