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
@@ -38,6 +38,7 @@ enum Gossip_Option
GOSSIP_OPTION_UNLEARNPETTALENTS = 17, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) GOSSIP_OPTION_UNLEARNPETTALENTS = 17, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
GOSSIP_OPTION_LEARNDUALSPEC = 18, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER) GOSSIP_OPTION_LEARNDUALSPEC = 18, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
GOSSIP_OPTION_OUTDOORPVP = 19, //added by code (option for outdoor pvp creatures) GOSSIP_OPTION_OUTDOORPVP = 19, //added by code (option for outdoor pvp creatures)
GOSSIP_OPTION_DUALSPEC_INFO = 20, //UNIT_NPC_FLAG_TRAINER (16) (bonus option for GOSSIP_OPTION_TRAINER)
GOSSIP_OPTION_MAX GOSSIP_OPTION_MAX
}; };
+4 -2
View File
@@ -14841,6 +14841,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
break; break;
} }
case GOSSIP_OPTION_LEARNDUALSPEC: case GOSSIP_OPTION_LEARNDUALSPEC:
case GOSSIP_OPTION_DUALSPEC_INFO:
if (!(GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))) if (!(GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
canTalk = false; canTalk = false;
break; break;
@@ -15014,6 +15015,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
switch (gossipOptionId) switch (gossipOptionId)
{ {
case GOSSIP_OPTION_GOSSIP: case GOSSIP_OPTION_GOSSIP:
case GOSSIP_OPTION_DUALSPEC_INFO:
{ {
if (menuItemData->GossipActionPoi) if (menuItemData->GossipActionPoi)
PlayerTalkClass->SendPointOfInterest(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, 63680, true, NULL, NULL, GetGUID());
CastSpell(this, 63624, true, NULL, NULL, GetGUID()); CastSpell(this, 63624, true, NULL, NULL, GetGUID());
// Should show another Gossip text with "Congratulations..." PrepareGossipMenu(source, menuItemData->GossipActionMenuId);
PlayerTalkClass->SendCloseGossip(); SendPreparedGossip(source);
} }
break; break;
case GOSSIP_OPTION_UNLEARNTALENTS: case GOSSIP_OPTION_UNLEARNTALENTS: