diff options
| author | SnapperRy <snapperryen@gmail.com> | 2016-09-24 04:06:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-24 04:06:07 +0200 |
| commit | 8c056f4cb9bb0e7eab7d3331c142bff1fbe3e44c (patch) | |
| tree | 050614cf28c65f46a6b48f6c3921b017bae62f2e | |
| parent | 7a1f41077ff0d28dd5d4968a39496c5067e5cee7 (diff) | |
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.
| -rw-r--r-- | sql/updates/world/3.3.5/9999_99_99_99_world.sql | 3 | ||||
| -rw-r--r-- | src/server/game/Entities/Creature/GossipDef.h | 1 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/sql/updates/world/3.3.5/9999_99_99_99_world.sql b/sql/updates/world/3.3.5/9999_99_99_99_world.sql new file mode 100644 index 00000000000..efa839ce580 --- /dev/null +++ b/sql/updates/world/3.3.5/9999_99_99_99_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `gossip_menu_option` SET `option_id`=20 WHERE `OptionBroadcastTextID`=33762; +UPDATE `gossip_menu_option` SET `action_menu_id`=10373 WHERE `option_id`=18; 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: |
