fix(Core/Creatures): Fixed displaying trainer npcflags that are not valid to player. (#4848)
This commit is contained in:
parent
485f7e7639
commit
6c7cc1690f
4 changed files with 52 additions and 0 deletions
|
|
@ -19844,6 +19844,11 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
|||
|
||||
if (!target->CanSeeSpellClickOn(creature))
|
||||
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
|
||||
|
||||
if (!creature->IsValidTrainerForPlayer(target, &appendValue))
|
||||
{
|
||||
appendValue &= ~UNIT_NPC_FLAG_TRAINER;
|
||||
}
|
||||
}
|
||||
|
||||
fieldBuffer << uint32(appendValue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue