From 7dff45e2af5980912683adfa4b8ea3da9bd64851 Mon Sep 17 00:00:00 2001 From: SnapperRy Date: Sat, 24 Sep 2016 04:06:07 +0200 Subject: [PATCH] Core/Gossip: improve gossips related to Dual Talent Specialization --- src/server/game/Entities/Creature/GossipDef.h | 1 + src/server/game/Entities/Player/Player.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index de3ff3cd4d..1df2a0955a 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 42e29f1a2d..b43406a77d 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -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: