[8718] Remove most GetObjectInWorld functions and move some map local to Map

Also mape pet guid counter per-map (in different expecte to be global pet number)
This commit is contained in:
VladimirMangos 2009-10-23 03:56:46 +04:00
parent 40b0a2cd92
commit d7ae5e3af0
20 changed files with 135 additions and 132 deletions

View file

@ -7488,7 +7488,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
}
else if (IS_CORPSE_GUID(guid)) // remove insignia
{
Corpse *bones = ObjectAccessor::GetCorpse(*this, guid);
Corpse *bones = GetMap()->GetCorpse(guid);
if (!bones || !((loot_type == LOOT_CORPSE) || (loot_type == LOOT_INSIGNIA)) || (bones->GetType() != CORPSE_BONES) )
{
@ -16504,7 +16504,7 @@ Pet* Player::GetMiniPet()
{
if(!m_miniPet)
return NULL;
return ObjectAccessor::GetPet(m_miniPet);
return GetMap()->GetPet(m_miniPet);
}
void Player::Uncharm()
@ -18053,7 +18053,7 @@ WorldObject const* Player::GetViewPoint() const
{
if(uint64 far_sight = GetFarSight())
{
WorldObject const* viewPoint = ObjectAccessor::GetWorldObject(*this,far_sight);
WorldObject const* viewPoint = GetMap()->GetWorldObject(far_sight);
return viewPoint ? viewPoint : this; // always expected not NULL
}
else