[8710] Make vehicle guid counter per-map local.

Also update/drop/move to Map some dependent functions.
This commit is contained in:
VladimirMangos 2009-10-22 17:23:13 +04:00
parent 53b6d28a24
commit b942616ded
15 changed files with 46 additions and 69 deletions

View file

@ -79,7 +79,7 @@ void GameObject::RemoveFromWorld()
// Remove GO from owner
if(uint64 owner_guid = GetOwnerGUID())
{
if (Unit* owner = IS_PLAYER_GUID(owner_guid) ? ObjectAccessor::FindPlayer(owner_guid) : GetMap()->GetCreatureOrPet(owner_guid))
if (Unit* owner = ObjectAccessor::GetUnit(*this,owner_guid))
owner->RemoveGameObject(this,false);
else
{