Pelf

Pelf dual spec 1

Apr 29th, 2012
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.50 KB | None | 0 0
  1. diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
  2. index 1b148e4..26d5f41 100644
  3. --- a/src/server/game/Entities/Player/Player.cpp
  4. +++ b/src/server/game/Entities/Player/Player.cpp
  5. @@ -14188,6 +14188,12 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
  6.              pMenu->GetGossipMenu().AddGossipMenuItemData(itr->second.action_menu_id, itr->second.action_poi_id, itr->second.action_script_id);
  7.          }
  8.      }
  9. +  
  10. +   // Added option for reset a dual specialization
  11. +   if (GetSpecsCount() > 1 && pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER) && pCreature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
  12. +   {
  13. +       pMenu->GetGossipMenu().AddMenuItem(GOSSIP_ICON_TRAINER, "I want to cancel a Dual Talent Specialization", 1, 1000 + 1, "Are you sure?", NULL); // (..., ..., GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO_DEF + 1, ...)
  14. +   }
  15.  }
  16.  
  17.  void Player::SendPreparedGossip(WorldObject *pSource)
  18. @@ -14360,6 +14366,13 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
  19.              GetSession()->SendBattlegGroundList(guid);
  20.              break;
  21.          }
  22. +       case 1001: //GOSSIP_INFO_DEF + 1, option for unlearning a dual specialization
  23. +       {
  24. +           if (GetSpecsCount() > 1 && getLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))
  25. +               CastSpell(this, 63651, true);
  26. +           PlayerTalkClass->CloseGossip();
  27. +           break;
  28. +       }
  29.      }
  30.  }
Advertisement
Add Comment
Please, Sign In to add comment