From 8c056f4cb9bb0e7eab7d3331c142bff1fbe3e44c Mon Sep 17 00:00:00 2001 From: SnapperRy Date: Sat, 24 Sep 2016 04:06:07 +0200 Subject: Core/Gossip: improve gossips related to Dual Talent Specialization: (#17921) - Correctly hide and show info gossip based on dual spec requirements. - Show correct gossip after learning dual spec. --- src/server/game/Entities/Creature/GossipDef.h | 1 + src/server/game/Entities/Player/Player.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index 01b27032286..623b3de00a1 100644 --- a/src/server/game/Entities/Creature/GossipDef.h +++ b/src/server/game/Entities/Creature/GossipDef.h @@ -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 }; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7a07b9d980c..dd500de5ace 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14014,6 +14014,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; @@ -14195,6 +14196,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); @@ -14236,8 +14238,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: -- cgit v1.2.3