Check wether NPC is friendly to player before interacting, to prevent

exploiting with cheating tool.

--HG--
branch : trunk
This commit is contained in:
raczman
2009-05-17 21:10:51 +02:00
parent cc85d9e1c4
commit b0c727abf7
+3
View File
@@ -97,6 +97,9 @@ ObjectAccessor::GetNPCIfCanInteractWith(Player const &player, uint64 guid, uint3
if(!player.CanInteractWithNPCs(!unit->isSpiritService()))
return NULL;
if(!player.IsFriendlyTo(unit))
return NULL;
// appropriate npc type
if(npcflagmask && !unit->HasFlag( UNIT_NPC_FLAGS, npcflagmask ))
return NULL;