feat(Core/Grids): Remove WorldObject separation in grid containers (#22595)

This commit is contained in:
Takenbacon
2025-08-08 21:36:24 -07:00
committed by GitHub
parent c97cee1e4f
commit 73317b2706
63 changed files with 160 additions and 313 deletions

View File

@@ -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());
}
}