mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7690] Move GetCreature/GetGameobject to class Map.
* This let get objects at map without reference to player or another object. * Simplify future implementation for per-map storage for like objects
This commit is contained in:
parent
ee9ea143d1
commit
fc0e1ecdf1
20 changed files with 118 additions and 127 deletions
|
|
@ -40,7 +40,7 @@ void WorldSession::HandleBattleGroundHelloOpcode( WorldPacket & recv_data )
|
|||
recv_data >> guid;
|
||||
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from: " I64FMT, guid);
|
||||
|
||||
Creature *unit = ObjectAccessor::GetCreature(*_player, guid);
|
||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data )
|
|||
if (_player->InBattleGround())
|
||||
return;
|
||||
|
||||
Creature *unit = ObjectAccessor::GetCreature(*_player, guid);
|
||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
|
|||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
Creature *unit = ObjectAccessor::GetCreature(*_player, guid);
|
||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
@ -618,7 +618,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
|
|||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
Creature *unit = ObjectAccessor::GetCreature(*_player, guid);
|
||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
@ -647,7 +647,7 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
|||
|
||||
recv_data >> guid >> arenaslot >> asGroup >> isRated;
|
||||
|
||||
Creature *unit = ObjectAccessor::GetCreature(*_player, guid);
|
||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue