Core/Gossip: improve gossips related to Dual Talent Specialization (#1218)

This commit is contained in:
Kargatum
2019-01-13 21:16:09 +07:00
committed by Viste(Кирилл)
parent 4983cc1cbc
commit 93bccb9b85
2 changed files with 5 additions and 2 deletions

View File

@@ -14841,6 +14841,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
break;
}
case GOSSIP_OPTION_LEARNDUALSPEC:
case GOSSIP_OPTION_DUALSPEC_INFO:
if (!(GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
canTalk = false;
break;
@@ -15014,6 +15015,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
switch (gossipOptionId)
{
case GOSSIP_OPTION_GOSSIP:
case GOSSIP_OPTION_DUALSPEC_INFO:
{
if (menuItemData->GossipActionPoi)
PlayerTalkClass->SendPointOfInterest(menuItemData->GossipActionPoi);
@@ -15055,8 +15057,8 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
CastSpell(this, 63680, true, NULL, NULL, GetGUID());
CastSpell(this, 63624, true, NULL, NULL, GetGUID());
// Should show another Gossip text with "Congratulations..."
PlayerTalkClass->SendCloseGossip();
PrepareGossipMenu(source, menuItemData->GossipActionMenuId);
SendPreparedGossip(source);
}
break;
case GOSSIP_OPTION_UNLEARNTALENTS: