Core/Creatures: added helper to check if a class trainer can train a player and use it in various places to get rid of multiple checks
This commit is contained in:
1 parent
de371675e6
commit
108316ba28
4 files changed
+9
-5
No files matched your search
@@ -14504,7 +14504,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
|
||||
if (!target->CanSeeSpellClickOn(creature))
|
||||
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
|
||||
|
||||
if (target->IsPlayer() && !creature->isCanTrainingAndResetTalentsOf(target->ToPlayer()))
|
||||
if (target->IsPlayer() && !creature->IsClassTrainerOf(target->ToPlayer()))
|
||||
appendValue &= ~UNIT_NPC_FLAG_TRAINER_CLASS;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user