[7690] Move GetCreature/GetGameobject to class Map. Author: VladimirMangos
* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
--HG--
branch : trunk
This commit is contained in:
1 parent
b4046ddf88
commit
fc7e1db9fb
28 files changed
+140
-163
No files matched your search
@@ -621,7 +621,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))
|
||||
@@ -636,7 +636,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)
|
||||
|
||||
Reference in new issue
Block a user