mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
feat(Core/Grids): Remove WorldObject separation in grid containers (#22595)
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
Pet::Pet(Player* owner, PetType type) : Guardian(nullptr, owner ? owner->GetGUID() : ObjectGuid::Empty, true),
|
||||
Pet::Pet(Player* owner, PetType type) : Guardian(nullptr, owner ? owner->GetGUID() : ObjectGuid::Empty),
|
||||
m_usedTalentCount(0),
|
||||
m_removed(false),
|
||||
m_owner(owner),
|
||||
@@ -75,7 +75,7 @@ void Pet::AddToWorld()
|
||||
if (!IsInWorld())
|
||||
{
|
||||
///- Register the pet for guid lookup
|
||||
GetMap()->GetObjectsStore().Insert<Pet>(GetGUID(), this);
|
||||
GetMap()->GetObjectsStore().Insert<Creature>(GetGUID(), this);
|
||||
Unit::AddToWorld();
|
||||
Motion_Initialize();
|
||||
AIM_Initialize();
|
||||
@@ -126,7 +126,7 @@ void Pet::RemoveFromWorld()
|
||||
{
|
||||
///- Don't call the function for Creature, normal mobs + totems go in a different storage
|
||||
Unit::RemoveFromWorld();
|
||||
GetMap()->GetObjectsStore().Remove<Pet>(GetGUID());
|
||||
GetMap()->GetObjectsStore().Remove<Creature>(GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user