fix(Core/Creatures): Fixed displaying trainer npcflags that are not valid to player. (#4848)

This commit is contained in:
UltraNix
2021-03-21 15:18:41 +01:00
committed by GitHub
parent 485f7e7639
commit 6c7cc1690f
4 changed files with 52 additions and 0 deletions

View File

@@ -15074,6 +15074,11 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
canTalk = false;
break;
case GOSSIP_OPTION_TRAINER:
if (!creature->IsValidTrainerForPlayer(this))
{
canTalk = false;
}
break;
case GOSSIP_OPTION_GOSSIP:
case GOSSIP_OPTION_SPIRITGUIDE:
case GOSSIP_OPTION_INNKEEPER: