Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Core/Pets: Fixed crashes introduced in 1496e4d

  • Loading branch information...
commit cf1c1cf99222c8e1e260f14977c207306faff273 1 parent 4429830
@Shauren Shauren authored
View
3  src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -279,8 +279,7 @@ void TempSummon::RemoveFromWorld()
Creature::RemoveFromWorld();
}
-Minion::Minion(SummonPropertiesEntry const* properties, Unit* owner,
- bool isWorldObject)
+Minion::Minion(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject)
: TempSummon(properties, owner, isWorldObject), m_owner(owner)
{
ASSERT(m_owner);
View
8 src/server/game/Entities/Pet/Pet.cpp
@@ -694,7 +694,7 @@ HappinessState Pet::GetHappinessState()
void Pet::Remove(PetSaveMode mode, bool returnreagent)
{
- m_owner->RemovePet(this, mode, returnreagent);
+ GetOwner()->RemovePet(this, mode, returnreagent);
}
void Pet::GivePetXP(uint32 xp)
@@ -1510,8 +1510,8 @@ bool Pet::learnSpell(uint32 spell_id)
{
WorldPacket data(SMSG_PET_LEARNED_SPELL, 4);
data << uint32(spell_id);
- m_owner->GetSession()->SendPacket(&data);
- m_owner->PetSpellInitialize();
+ GetOwner()->GetSession()->SendPacket(&data);
+ GetOwner()->PetSpellInitialize();
}
return true;
}
@@ -1563,7 +1563,7 @@ bool Pet::unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
{
WorldPacket data(SMSG_PET_REMOVED_SPELL, 4);
data << uint32(spell_id);
- m_owner->GetSession()->SendPacket(&data);
+ GetOwner()->GetSession()->SendPacket(&data);
}
return true;
}
View
1  src/server/game/Entities/Pet/Pet.h
@@ -147,7 +147,6 @@ class Pet : public Guardian
Player* GetOwner() const;
protected:
- Player* m_owner;
uint32 m_happinessTimer;
PetType m_petType;
int32 m_duration; // time until unsummon (used mostly for summoned guardians and not used for controlled pets)
Please sign in to comment.
Something went wrong with that request. Please try again.