Skip to content

Commit d14c65b

Browse files
hoshieNoFantasy
authored andcommitted
[1369] Add teleporter from dalaran to CoT. Patch by hoshie
Add teleporter from dalaran to CoT. Patch by hoshie git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1369 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent 5e6832a commit d14c65b

8 files changed

Lines changed: 87 additions & 2 deletions

File tree

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp \
289289
scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp \
290290
scripts/kalimdor/zulfarrak/zulfarrak.cpp \
291291
scripts/northrend/borean_tundra.cpp \
292+
scripts/northrend/dalaran.cpp \
292293
scripts/northrend/dragonblight.cpp \
293294
scripts/northrend/grizzly_hills.cpp \
294295
scripts/northrend/icecrown.cpp \

VC80/80ScriptDev2.vcproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,10 @@
15201520
RelativePath="..\scripts\northrend\borean_tundra.cpp"
15211521
>
15221522
</File>
1523+
<File
1524+
RelativePath="..\scripts\northrend\dalaran.cpp"
1525+
>
1526+
</File>
15231527
<File
15241528
RelativePath="..\scripts\northrend\dragonblight.cpp"
15251529
>

VC90/90ScriptDev2.vcproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,10 @@
15191519
RelativePath="..\scripts\northrend\borean_tundra.cpp"
15201520
>
15211521
</File>
1522+
<File
1523+
RelativePath="..\scripts\northrend\dalaran.cpp"
1524+
>
1525+
</File>
15221526
<File
15231527
RelativePath="..\scripts\northrend\dragonblight.cpp"
15241528
>

scripts/northrend/dalaran.cpp

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
}

sql/Updates/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,5 @@ pkgdata_DATA = \
243243
r1359_mangos.sql \
244244
r1359_scriptdev2.sql \
245245
r1367_mangos.sql \
246-
r1368_mangos.sql
246+
r1368_mangos.sql \
247+
r1369_mangos.sql

sql/Updates/r1369_mangos.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UPDATE creature_template SET ScriptName='npc_zidormi' WHERE entry=31848;

sql/mangos_scriptname_full.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ UPDATE creature_template SET ScriptName='mob_shield_generator_channel' WHERE ent
372372

373373

374374
/* DALARAN */
375-
375+
UPDATE creature_template SET ScriptName='npc_zidormi' WHERE entry=31848;
376376

377377
/* DARKSHORE */
378378
UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218;

system/ScriptLoader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ extern void AddSC_instance_utgarde_keep();
272272
extern void AddSC_utgarde_keep();
273273

274274
extern void AddSC_borean_tundra();
275+
extern void AddSC_dalaran();
275276
extern void AddSC_dragonblight();
276277
extern void AddSC_grizzly_hills();
277278
extern void AddSC_icecrown();
@@ -626,6 +627,7 @@ void AddScripts()
626627
AddSC_utgarde_keep();
627628

628629
AddSC_borean_tundra();
630+
AddSC_dalaran();
629631
AddSC_dragonblight();
630632
AddSC_grizzly_hills();
631633
AddSC_icecrown();

0 commit comments

Comments
 (0)