mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +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
|
|
@ -611,7 +611,7 @@ void WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(WorldPacket& /*recv
|
|||
|
||||
if(IS_CREATURE_GUID(*itr))
|
||||
{
|
||||
Creature *questgiver = ObjectAccessor::GetCreature(*_player, *itr);
|
||||
Creature *questgiver = GetPlayer()->GetMap()->GetCreature(*itr);
|
||||
if(!questgiver || questgiver->IsHostileTo(_player))
|
||||
continue;
|
||||
if(!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
||||
|
|
@ -626,7 +626,7 @@ void WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(WorldPacket& /*recv
|
|||
}
|
||||
else if(IS_GAMEOBJECT_GUID(*itr))
|
||||
{
|
||||
GameObject *questgiver = ObjectAccessor::GetGameObject(*_player, *itr);
|
||||
GameObject *questgiver = GetPlayer()->GetMap()->GetGameObject(*itr);
|
||||
if(!questgiver)
|
||||
continue;
|
||||
if(questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue