Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptMgr.h"
- #include "World.h"
- #include "Player.h"
- #include "Item.h"
- #include "ScriptedGossip.h"
- #include "WorldSession.h"
- #include "GossipDef.h"
- class GossipItem : public ItemScript
- {
- public:
- GossipItem() : ItemScript("GossipItem") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
- {
- player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/Ability_Marksmanship:25:25:-20|t Reset My Talents", GOSSIP_SENDER_MAIN, 1);
- player->PlayerTalkClass->SendGossipMenu(907, item->GetGUID());
- return true;
- }
- void OnGossipSelect(Player* player, Item* item, uint32 /*sender*/, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- case 1:
- {
- player->ResetTalents();
- player->CastSpell(player, 15341);
- player->GetSession()->SendAreaTriggerMessage("Your Talents Reseted");
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- }
- };
- void AddSC_GossipItem()
- {
- new GossipItem();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement