[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

@ -67,7 +67,7 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
}
else if (IS_CORPSE_GUID(lguid))
{
Corpse *bones = ObjectAccessor::GetCorpse(*player, lguid);
Corpse *bones = player->GetMap()->GetCorpse(lguid);
if (!bones)
{
player->SendLootRelease(lguid);
@ -180,7 +180,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
}
case HIGHGUID_CORPSE: // remove insignia ONLY in BG
{
Corpse *bones = ObjectAccessor::GetCorpse(*GetPlayer(), guid);
Corpse *bones = _player->GetMap()->GetCorpse(guid);
if (bones && bones->IsWithinDistInMap(_player,INTERACTION_DISTANCE) )
pLoot = &bones->loot;
@ -367,7 +367,7 @@ void WorldSession::DoLootRelease( uint64 lguid )
}
else if (IS_CORPSE_GUID(lguid)) // ONLY remove insignia at BG
{
Corpse *corpse = ObjectAccessor::GetCorpse(*player, lguid);
Corpse *corpse = _player->GetMap()->GetCorpse(lguid);
if (!corpse || !corpse->IsWithinDistInMap(_player,INTERACTION_DISTANCE) )
return;