Core/Units: trainer classes that cannot train the player will no longer show their icon on the mini map

This commit is contained in:
Ovahlord committed 2019-12-12 21:09:17 +01:00
1 parent 06acf137a0
commit f3b7b536f4
1 file changed
+5
+5
View File
@@ -14500,9 +14500,14 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
uint32 appendValue = m_uint32Values[UNIT_NPC_FLAGS];
if (creature)
{
if (!target->CanSeeSpellClickOn(creature))
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
if (target->IsPlayer() && !creature->isCanTrainingAndResetTalentsOf(target->ToPlayer()))
appendValue &= ~UNIT_NPC_FLAG_TRAINER_CLASS;
}
fieldBuffer << uint32(appendValue);
}
else if (index == UNIT_FIELD_AURASTATE)