Check wether NPC is friendly to player before interacting, to prevent
exploiting with cheating tool. --HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user