Core/Gossip: improve gossips related to Dual Talent Specialization

This commit is contained in:
SnapperRy authored and Aokromes committed 2016-09-24 07:01:49 +02:00
1 parent fc00c66433
commit 7dff45e2af
2 files changed
+5 -2

No files matched your search

@@ -51,6 +51,7 @@ enum Gossip_Option
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_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
};
+4 -2
View File
@@ -14098,6 +14098,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;
@@ -14279,6 +14280,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);
@@ -14320,8 +14322,8 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
CastSpell(this, 63680, true, nullptr, nullptr, GetGUID());
CastSpell(this, 63624, true, nullptr, nullptr, GetGUID());
// Should show another Gossip text with "Congratulations..."
PlayerTalkClass->SendCloseGossip();
PrepareGossipMenu(source, menuItemData->GossipActionMenuId);
SendPreparedGossip(source);
}
break;
case GOSSIP_OPTION_UNLEARNTALENTS: