|
| 1 | +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> |
| 2 | + * This program is free software; you can redistribute it and/or modify |
| 3 | + * it under the terms of the GNU General Public License as published by |
| 4 | + * the Free Software Foundation; either version 2 of the License, or |
| 5 | + * (at your option) any later version. |
| 6 | + * |
| 7 | + * This program is distributed in the hope that it will be useful, |
| 8 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | + * GNU General Public License for more details. |
| 11 | + * |
| 12 | + * You should have received a copy of the GNU General Public License |
| 13 | + * along with this program; if not, write to the Free Software |
| 14 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 15 | + */ |
| 16 | + |
| 17 | +/* ScriptData |
| 18 | +SDName: Dalaran |
| 19 | +SD%Complete: 100 |
| 20 | +SDComment: |
| 21 | +SDCategory: Dalaran |
| 22 | +EndScriptData */ |
| 23 | + |
| 24 | +/* ContentData |
| 25 | +npc_zirdomi |
| 26 | +EndContentData */ |
| 27 | + |
| 28 | +#include "precompiled.h" |
| 29 | + |
| 30 | +/*###### |
| 31 | +## npc_zidormi |
| 32 | +######*/ |
| 33 | + |
| 34 | +#define GOSSIP_ITEM_ZIDORMI1 "Take me to the Caverns of Time." |
| 35 | + |
| 36 | +enum |
| 37 | +{ |
| 38 | + SPELL_TELEPORT_COT = 46343, |
| 39 | + GOSSIP_TEXTID_ZIDORMI1 = 14066 |
| 40 | +}; |
| 41 | + |
| 42 | +bool GossipHello_npc_zidormi(Player* pPlayer, Creature* pCreature) |
| 43 | +{ |
| 44 | + if (pPlayer->getLevel() >= 65) |
| 45 | + { |
| 46 | + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ZIDORMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); |
| 47 | + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); |
| 48 | + } |
| 49 | + else |
| 50 | + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetGUID()); |
| 51 | + |
| 52 | + return true; |
| 53 | +} |
| 54 | + |
| 55 | +bool GossipSelect_npc_zidormi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) |
| 56 | +{ |
| 57 | + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) |
| 58 | + pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_COT,false); |
| 59 | + |
| 60 | + return true; |
| 61 | +} |
| 62 | + |
| 63 | +void AddSC_dalaran() |
| 64 | +{ |
| 65 | + Script *newscript; |
| 66 | + |
| 67 | + newscript = new Script; |
| 68 | + newscript->Name = "npc_zidormi"; |
| 69 | + newscript->pGossipHello = &GossipHello_npc_zidormi; |
| 70 | + newscript->pGossipSelect = &GossipSelect_npc_zidormi; |
| 71 | + newscript->RegisterSelf(); |
| 72 | +} |
0 commit comments