Core/Players: fixed players not being able to open profession trainer gossips

This commit is contained in:
Ovahlord committed 2019-12-22 21:34:31 +01:00
1 parent 7505d90e36
commit 852f52ed37
1 file changed
+1 -1
+1 -1
View File
@@ -14381,7 +14381,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
canTalk = false;
break;
case GOSSIP_OPTION_TRAINER:
if (!creature->IsClassTrainerOf(this))
if (creature->GetCreatureTemplate()->trainer_type != TRAINER_TYPE_TRADESKILLS && !creature->IsClassTrainerOf(this))
{
TC_LOG_ERROR("sql.sql", "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) requested wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)",
GetName().c_str(), GetGUID().GetCounter(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class);