[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

@ -667,6 +667,12 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
if (!((Creature*)this)->isCanTrainingOf(target, false))
appendValue &= ~(UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_TRAINER_CLASS | UNIT_NPC_FLAG_TRAINER_PROFESSION);
}
if (appendValue & UNIT_NPC_FLAG_STABLEMASTER)
{
if (target->getClass() != CLASS_HUNTER)
appendValue &= ~UNIT_NPC_FLAG_STABLEMASTER;
}
}
*data << uint32(appendValue);