aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/undercity.cpp
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-04-07 21:09:31 +0100
committerNay <dnpd.dd@gmail.com>2012-04-07 21:09:57 +0100
commit5fb2ffa6252b7551bc114ffd72f6cc40b13ca930 (patch)
tree0389a8daab35472aefba35040ad71bb34982293b /src/server/scripts/EasternKingdoms/undercity.cpp
parentcb30a067569053cff9b7b665629a487333f0be44 (diff)
Script/UC: Add some combat spells to Lady Sylvannas
Original patch by pxlcreations (11/04/2010)
Diffstat (limited to 'src/server/scripts/EasternKingdoms/undercity.cpp')
-rw-r--r--src/server/scripts/EasternKingdoms/undercity.cpp95
1 files changed, 81 insertions, 14 deletions
diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp
index 0522e214012..d5896812007 100644
--- a/src/server/scripts/EasternKingdoms/undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/undercity.cpp
@@ -47,7 +47,15 @@ enum Sylvanas
SPELL_HIGHBORNE_AURA = 37090,
SPELL_SYLVANAS_CAST = 36568,
- SPELL_RIBBON_OF_SOULS = 34432, //the real one to use might be 37099
+ SPELL_RIBBON_OF_SOULS = 34432, // the real one to use might be 37099
+
+ // Combat spells
+ SPELL_BLACK_ARROW = 59712,
+ SPELL_FADE = 20672,
+ SPELL_FADE_BLINK = 29211,
+ SPELL_MULTI_SHOT = 59713,
+ SPELL_SHOT = 59710,
+ SPELL_SUMMON_SKELETON = 59711
};
float HighborneLoc[4][3]=
@@ -90,15 +98,27 @@ public:
{
npc_lady_sylvanas_windrunnerAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 LamentEvent_Timer;
+ uint32 LamentEventTimer;
bool LamentEvent;
uint64 targetGUID;
+ uint32 FadeTimer;
+ uint32 SummonSkeletonTimer;
+ uint32 BlackArrowTimer;
+ uint32 ShotTimer;
+ uint32 MultiShotTimer;
+
void Reset()
{
- LamentEvent_Timer = 5000;
+ LamentEventTimer = 5000;
LamentEvent = false;
targetGUID = 0;
+
+ FadeTimer = 30000;
+ SummonSkeletonTimer = 20000;
+ BlackArrowTimer = 15000;
+ ShotTimer = 8000;
+ MultiShotTimer = 10000;
}
void EnterCombat(Unit* /*who*/) {}
@@ -123,23 +143,70 @@ public:
{
if (LamentEvent)
{
- if (LamentEvent_Timer <= diff)
+ if (LamentEventTimer <= diff)
{
DoSummon(ENTRY_HIGHBORNE_BUNNY, me, 10.0f, 3000, TEMPSUMMON_TIMED_DESPAWN);
- LamentEvent_Timer = 2000;
+ LamentEventTimer = 2000;
if (!me->HasAura(SPELL_SYLVANAS_CAST))
{
DoScriptText(SAY_LAMENT_END, me);
DoScriptText(EMOTE_LAMENT_END, me);
LamentEvent = false;
}
- } else LamentEvent_Timer -= diff;
+ } else LamentEventTimer -= diff;
}
if (!UpdateVictim())
return;
+ // Combat spells
+
+ if (FadeTimer <= diff)
+ {
+ DoCast(me, SPELL_FADE);
+ // add a blink to simulate a stealthed movement and reappearing elsewhere
+ DoCast(me, SPELL_FADE_BLINK);
+ FadeTimer = 30000 + rand()%5000;
+ // if the victim is out of melee range she cast multi shot
+ if (Unit* victim = me->getVictim())
+ if (me->GetDistance(victim) > 10.0f)
+ DoCast(victim, SPELL_MULTI_SHOT);
+ } else FadeTimer -= diff;
+
+ if (SummonSkeletonTimer <= diff)
+ {
+ DoCast(me, SPELL_SUMMON_SKELETON);
+ SummonSkeletonTimer = 20000 + rand()%10000;
+ } else SummonSkeletonTimer -= diff;
+
+ if (BlackArrowTimer <= diff)
+ {
+ if (Unit* victim = me->getVictim())
+ {
+ DoCast(me->getVictim(), SPELL_BLACK_ARROW);
+ BlackArrowTimer = 15000 + rand()%5000;
+ }
+ } else BlackArrowTimer -= diff;
+
+ if (ShotTimer <= diff)
+ {
+ if (Unit* victim = me->getVictim())
+ {
+ DoCast(me->getVictim(), SPELL_SHOT);
+ ShotTimer = 8000 + rand()%2000;
+ }
+ } else ShotTimer -= diff;
+
+ if (MultiShotTimer <= diff)
+ {
+ if (Unit* victim = me->getVictim())
+ {
+ DoCast(me->getVictim(), SPELL_MULTI_SHOT);
+ MultiShotTimer = 10000 + rand()%3000;
+ }
+ } else MultiShotTimer -= diff;
+
DoMeleeAttackIfReady();
}
};
@@ -163,15 +230,15 @@ public:
{
npc_highborne_lamenterAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 EventMove_Timer;
- uint32 EventCast_Timer;
+ uint32 EventMoveTimer;
+ uint32 EventCastTimer;
bool EventMove;
bool EventCast;
void Reset()
{
- EventMove_Timer = 10000;
- EventCast_Timer = 17500;
+ EventMoveTimer = 10000;
+ EventCastTimer = 17500;
EventMove = true;
EventCast = true;
}
@@ -182,21 +249,21 @@ public:
{
if (EventMove)
{
- if (EventMove_Timer <= diff)
+ if (EventMoveTimer <= diff)
{
me->SetDisableGravity(true);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetDistance(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW) / (5000 * 0.001f));
me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
EventMove = false;
- } else EventMove_Timer -= diff;
+ } else EventMoveTimer -= diff;
}
if (EventCast)
{
- if (EventCast_Timer <= diff)
+ if (EventCastTimer <= diff)
{
DoCast(me, SPELL_HIGHBORNE_AURA);
EventCast = false;
- } else EventCast_Timer -= diff;
+ } else EventCastTimer -= diff;
}
}
};