Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class go_ahune_ice_stone : public GameObjectScript
- {
- public:
- go_ahune_ice_stone() : GameObjectScript("go_ahune_ice_stone") { }
- bool OnGossipHello(Player* player, GameObject* go)
- {
- if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
- {
- player->PrepareQuestMenu(go->GetGUID());
- player->SendPreparedQuest(go->GetGUID());
- }
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_STONE_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(go), go->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF)
- {
- if (Creature* ahune = go->FindNearestCreature(25740, 100.0f, true))
- {
- ahune->AI()->DoAction(ACTION_START_EVENT);
- go->Delete();
- }
- }
- return true;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement