[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

@ -458,7 +458,7 @@ void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
return;
}
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
Creature* pet = GetPlayer()->GetMap()->GetCreatureOrPetOrVehicle(guid);
if(!pet)
{
@ -550,7 +550,7 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
if (_player->isInCombat()) // client prevent click and set different icon at combat state
return;
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
Creature *unit = _player->GetMap()->GetCreatureOrPetOrVehicle(guid);
if (!unit || unit->isInCombat()) // client prevent click and set different icon at combat state
return;