Skip to content

Commit fb74332

Browse files
author
NoFantasy
committed
[1540] Add dummyEffect for spell related to quest 12092 and 12096
Add dummyEffect for spell related to quest 12092 and 12096 git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1540 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent 8f5a1f1 commit fb74332

6 files changed

Lines changed: 58 additions & 2 deletions

File tree

scripts/northrend/dragonblight.cpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,46 @@ bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 u
232232
return true;
233233
}
234234

235+
/*######
236+
## npc_woodlands_walker
237+
######*/
238+
239+
enum
240+
{
241+
SPELL_STRENGTH_ANCIENTS = 47575,
242+
SPELL_CREATE_BARK_WALKERS = 47550,
243+
FACTION_HOSTILE = 16,
244+
245+
EMOTE_AGGRO = -1000551,
246+
EMOTE_CREATE = -1000552
247+
};
248+
249+
bool EffectDummyCreature_npc_woodlands_walker(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget)
250+
{
251+
//always check spellid and effectindex
252+
if (uiSpellId == SPELL_STRENGTH_ANCIENTS && uiEffIndex == 0)
253+
{
254+
if (pCaster->GetTypeId() == TYPEID_PLAYER)
255+
{
256+
if (urand(0, 1))
257+
{
258+
DoScriptText(EMOTE_AGGRO, pCreatureTarget);
259+
pCreatureTarget->setFaction(FACTION_HOSTILE);
260+
pCreatureTarget->AI()->AttackStart(pCaster);
261+
}
262+
else
263+
{
264+
DoScriptText(EMOTE_CREATE, pCreatureTarget);
265+
pCaster->CastSpell(pCaster, SPELL_CREATE_BARK_WALKERS, true);
266+
pCreatureTarget->ForcedDespawn();
267+
}
268+
}
269+
270+
//always return true when we are handling this spell and effect
271+
return true;
272+
}
273+
return false;
274+
}
235275
void AddSC_dragonblight()
236276
{
237277
Script *newscript;
@@ -264,4 +304,9 @@ void AddSC_dragonblight()
264304
newscript->pGossipHello = &GossipHello_npc_torastrasza;
265305
newscript->pGossipSelect = &GossipSelect_npc_torastrasza;
266306
newscript->RegisterSelf();
307+
308+
newscript = new Script;
309+
newscript->Name = "npc_woodlands_walker";
310+
newscript->pEffectDummyCreature = &EffectDummyCreature_npc_woodlands_walker;
311+
newscript->RegisterSelf();
267312
}

sql/Updates/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ pkgdata_DATA = \
6363
r1525_scriptdev2.sql \
6464
r1531_mangos.sql \
6565
r1536_mangos.sql \
66-
r1538_mangos.sql
66+
r1538_mangos.sql \
67+
r1540_mangos.sql \
68+
r1540_scriptdev2.sql

sql/Updates/r1540_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_woodlands_walker' WHERE entry=26421;

sql/Updates/r1540_scriptdev2.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DELETE FROM script_texts WHERE entry IN (-1000551,-1000552);
2+
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
3+
(-1000551,'The %s is angered by your request and attacks!',0,2,0,0,'woodlands EMOTE_AGGRO'),
4+
(-1000552,'Breaking off a piece of its bark, the %s hands it to you before departing.',0,2,0,0,'woodlands EMOTE_CREATE');

sql/mangos_scriptname_full.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31
429429
UPDATE creature_template SET ScriptName='npc_liquid_fire_of_elune' WHERE entry IN (26616,26643);
430430
UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443;
431431
UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949;
432+
UPDATE creature_template SET ScriptName='npc_woodlands_walker' WHERE entry=26421;
432433

433434
/* DRAK'THARON KEEP */
434435
UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631;

sql/scriptdev2_script_full.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
568568
(-1000547,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',0,0,0,25,'restless app SAY_RAND_5'),
569569
(-1000548,'It is too late for Jarl... its hold is too strong...',0,0,0,25,'restless app SAY_RAND_6'),
570570
(-1000549,'Go away, whoever you are! Witch Hill is mine... mine!',0,0,0,25,'restless app SAY_RAND_7'),
571-
(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8');
571+
(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8'),
572+
573+
(-1000551,'The %s is angered by your request and attacks!',0,2,0,0,'woodlands EMOTE_AGGRO'),
574+
(-1000552,'Breaking off a piece of its bark, the %s hands it to you before departing.',0,2,0,0,'woodlands EMOTE_CREATE');
572575

573576
-- -1 033 000 SHADOWFANG KEEP
574577
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES

0 commit comments

Comments
 (0)