From f3b7b536f4e34b23164f36ed9eceac0563947a05 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Thu, 12 Dec 2019 21:09:17 +0100 Subject: [PATCH] Core/Units: trainer classes that cannot train the player will no longer show their icon on the mini map --- src/server/game/Entities/Unit/Unit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 55b43c7a59..3967470d6d 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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)