[8977] Not send npcflag stablemaster to non-hunter player

Also check for player class vs stablemaster flag in GetNPCIfCanInteractWith()

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2009-12-12 18:37:39 +01:00
parent 4f5ed57fc2
commit f47492ad24
3 changed files with 13 additions and 1 deletions

View file

@ -2088,6 +2088,12 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
if (npcflagmask && !unit->HasFlag( UNIT_NPC_FLAGS, npcflagmask ))
return NULL;
if (npcflagmask == UNIT_NPC_FLAG_STABLEMASTER)
{
if (getClass() != CLASS_HUNTER)
return NULL;
}
// if a dead unit should be able to talk - the creature must be alive and have special flags
if (!unit->isAlive())
return NULL;