Core/Scripting: More updates for BRS instance. Added missing scripts for urok and gizrul.

This commit is contained in:
Malcrom
2013-07-01 10:19:18 -02:30
parent a93007e93c
commit 722f7068f2
10 changed files with 314 additions and 91 deletions

View File

@@ -24,13 +24,13 @@ uint32 const EncounterCount = 22;
enum DataTypes
{
DATA_OMOKK = 0,
DATA_HIGHLORD_OMOKK = 0,
DATA_SHADOW_HUNTER_VOSHGAJIN = 1,
DATA_WARMASTER_VOONE = 2,
DATA_MOTHER_SMOLDERWEB = 3,
DATA_UROK_DOOMHOWL = 4, // not scripted
DATA_UROK_DOOMHOWL = 4,
DATA_QUARTERMASTER_ZIGRIS = 5,
DATA_GIZRUL_THE_SLAVENER = 6, // not scripted
DATA_GIZRUL_THE_SLAVENER = 6,
DATA_HALYCON = 7,
DATA_OVERLORD_WYRMTHALAK = 8,
DATA_PYROGAURD_EMBERSEER = 9,
@@ -51,7 +51,7 @@ enum DataTypes
enum CreaturesIds
{
NPC_OMOKK = 9196,
NPC_HIGHLORD_OMOKK = 9196,
NPC_SHADOW_HUNTER_VOSHGAJIN = 9236,
NPC_WARMASTER_VOONE = 9237,
NPC_MOTHER_SMOLDERWEB = 10596,

View File

@@ -0,0 +1,112 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackrock_spire.h"
#include "TemporarySummon.h"
enum Spells
{
SPELL_FATAL_BITE = 16495,
SPELL_INFECTED_BITE = 16128,
SPELL_FRENZY = 8269
};
enum Paths
{
GIZRUL_PATH = 402450
};
enum Events
{
EVENT_FATAL_BITE = 1,
EVENT_INFECTED_BITE = 2,
EVENT_FRENZY = 3
};
class boss_gizrul_the_slavener : public CreatureScript
{
public:
boss_gizrul_the_slavener() : CreatureScript("boss_gizrul_the_slavener") { }
struct boss_gizrul_the_slavenerAI : public BossAI
{
boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {}
void Reset()
{
_Reset();
}
void IsSummonedBy(Unit* /*summoner*/)
{
me->GetMotionMaster()->MovePath(GIZRUL_PATH, false);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000,20000));
events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000,12000));
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_FATAL_BITE:
DoCastVictim(SPELL_FATAL_BITE);
events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000));
break;
case EVENT_INFECTED_BITE:
DoCast(me, SPELL_INFECTED_BITE);
events.ScheduleEvent(EVENT_FATAL_BITE, urand(8000,10000));
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_gizrul_the_slavenerAI(creature);
}
};
void AddSC_boss_gizrul_the_slavener()
{
new boss_gizrul_the_slavener();
}

View File

@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -22,34 +21,32 @@
enum Spells
{
SPELL_CROWDPUMMEL = 10887,
SPELL_MIGHTYBLOW = 14099,
SPELL_REND = 13738,
SPELL_THRASH = 3391,
};
enum Says
{
EMOTE_DEATH = 0
};
enum Events
{
EVENT_CROWD_PUMMEL = 1,
EVENT_MIGHTY_BLOW = 2,
EVENT_REND = 1,
EVENT_THRASH = 2,
};
const Position SummonLocation = { -169.839f, -324.961f, 64.401f, 3.124f };
const Position SummonLocation = { -167.9561f, -411.7844f, 76.23057f, 1.53589f };
class boss_halycon : public CreatureScript
{
public:
boss_halycon() : CreatureScript("boss_halycon") { }
CreatureAI* GetAI(Creature* creature) const
{
return new boss_halyconAI(creature);
}
struct boss_halyconAI : public BossAI
{
boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {}
bool Summoned;
void Reset()
{
_Reset();
@@ -59,13 +56,16 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(EVENT_CROWD_PUMMEL, 8 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_MIGHTY_BLOW, 14 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_REND, urand(17000,20000));
events.ScheduleEvent(EVENT_THRASH, urand(10000,12000));
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000);
Talk(EMOTE_DEATH);
Summoned = true;
}
void UpdateAI(uint32 diff)
@@ -73,13 +73,6 @@ public:
if (!UpdateVictim())
return;
//Summon Gizrul
if (!Summoned && HealthBelowPct(25))
{
me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS);
Summoned = true;
}
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
@@ -89,20 +82,27 @@ public:
{
switch (eventId)
{
case EVENT_CROWD_PUMMEL:
DoCastVictim(SPELL_CROWDPUMMEL);
events.ScheduleEvent(EVENT_CROWD_PUMMEL, 14 * IN_MILLISECONDS);
case EVENT_REND:
DoCastVictim(SPELL_REND);
events.ScheduleEvent(EVENT_REND, urand(8000,10000));
break;
case EVENT_MIGHTY_BLOW:
DoCastVictim(SPELL_MIGHTYBLOW);
events.ScheduleEvent(EVENT_MIGHTY_BLOW, 10 * IN_MILLISECONDS);
case EVENT_THRASH:
DoCast(me, SPELL_THRASH);
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
private:
bool Summoned;
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_halyconAI(creature);
}
};
void AddSC_boss_halycon()

View File

@@ -22,24 +22,14 @@
enum Spells
{
SPELL_WARSTOMP = 24375,
SPELL_CLEAVE = 15579,
SPELL_STRIKE = 18368,
SPELL_REND = 18106,
SPELL_SUNDERARMOR = 24317,
SPELL_KNOCKAWAY = 20686,
SPELL_SLOW = 22356,
SPELL_FRENZY = 8269,
SPELL_KNOCK_AWAY = 10101
};
enum Events
{
EVENT_WARSTOMP = 1,
EVENT_CLEAVE = 2,
EVENT_STRIKE = 3,
EVENT_REND = 4,
EVENT_SUNDER_ARMOR = 5,
EVENT_KNOCK_AWAY = 6,
EVENT_SLOW = 7,
EVENT_FRENZY = 1,
EVENT_KNOCK_AWAY = 2
};
class boss_highlord_omokk : public CreatureScript
@@ -54,7 +44,7 @@ public:
struct boss_highlordomokkAI : public BossAI
{
boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_OMOKK) {}
boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {}
void Reset()
{
@@ -64,13 +54,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(EVENT_WARSTOMP, 15 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_CLEAVE, 6 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_STRIKE, 10 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_REND, 14 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_SUNDER_ARMOR, 2 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 18 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_SLOW, 24 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_FRENZY, 20000);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 18000);
}
void JustDied(Unit* /*killer*/)
@@ -92,33 +77,15 @@ public:
{
switch (eventId)
{
case EVENT_WARSTOMP:
DoCastVictim(SPELL_WARSTOMP);
events.ScheduleEvent(EVENT_WARSTOMP, 14 * IN_MILLISECONDS);
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS);
break;
case EVENT_STRIKE:
DoCastVictim(SPELL_STRIKE);
events.ScheduleEvent(EVENT_STRIKE, 10 * IN_MILLISECONDS);
break;
case EVENT_REND:
DoCastVictim(SPELL_REND);
events.ScheduleEvent(EVENT_REND, 18 * IN_MILLISECONDS);
break;
case EVENT_SUNDER_ARMOR:
DoCastVictim(SPELL_SUNDERARMOR);
events.ScheduleEvent(EVENT_SUNDER_ARMOR, 25 * IN_MILLISECONDS);
case EVENT_FRENZY:
DoCastVictim(SPELL_FRENZY);
events.ScheduleEvent(EVENT_FRENZY, 60000);
break;
case EVENT_KNOCK_AWAY:
DoCastVictim(SPELL_KNOCKAWAY);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS);
DoCastVictim(SPELL_KNOCK_AWAY);
events.ScheduleEvent(EVENT_KNOCK_AWAY, 12000);
break;
case EVENT_SLOW:
DoCastVictim(SPELL_SLOW);
events.ScheduleEvent(EVENT_SLOW, 18 * IN_MILLISECONDS);
default:
break;
}
}

View File

@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -39,11 +38,6 @@ class quartermaster_zigris : public CreatureScript
public:
quartermaster_zigris() : CreatureScript("quartermaster_zigris") { }
CreatureAI* GetAI(Creature* creature) const
{
return new boss_quatermasterzigrisAI(creature);
}
struct boss_quatermasterzigrisAI : public BossAI
{
boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {}
@@ -56,8 +50,8 @@ public:
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(EVENT_SHOOT, 1 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_STUN_BOMB, 16 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_SHOOT, 1000);
events.ScheduleEvent(EVENT_STUN_BOMB, 16000);
}
void JustDied(Unit* /*killer*/)
@@ -85,13 +79,18 @@ public:
break;
case EVENT_STUN_BOMB:
DoCastVictim(SPELL_STUNBOMB);
events.ScheduleEvent(EVENT_STUN_BOMB, 14 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_STUN_BOMB, 14000);
break;
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_quatermasterzigrisAI(creature);
}
};
void AddSC_boss_quatermasterzigris()

View File

@@ -0,0 +1,108 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackrock_spire.h"
enum Spells
{
SPELL_REND = 16509,
SPELL_STRIKE = 15580,
SPELL_INTIMIDATING_ROAR = 16508
};
enum Says
{
SAY_SUMMON = 0,
SAY_AGGRO = 1,
};
enum Events
{
EVENT_REND = 1,
EVENT_STRIKE = 2,
EVENT_INTIMIDATING_ROAR = 3
};
class boss_urok_doomhowl : public CreatureScript
{
public:
boss_urok_doomhowl() : CreatureScript("boss_urok_doomhowl") { }
struct boss_urok_doomhowlAI : public BossAI
{
boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {}
void Reset()
{
_Reset();
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
events.ScheduleEvent(SPELL_REND, urand(17000,20000));
events.ScheduleEvent(SPELL_STRIKE, urand(10000,12000));
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/)
{
_JustDied();
}
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case SPELL_REND:
DoCastVictim(SPELL_REND);
events.ScheduleEvent(SPELL_REND, urand(8000,10000));
break;
case SPELL_STRIKE:
DoCastVictim(SPELL_STRIKE);
events.ScheduleEvent(SPELL_STRIKE, urand(8000,10000));
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_urok_doomhowlAI(creature);
}
};
void AddSC_boss_urok_doomhowl()
{
new boss_urok_doomhowl();
}

View File

@@ -73,7 +73,7 @@ public:
{
switch (creature->GetEntry())
{
case NPC_OMOKK:
case NPC_HIGHLORD_OMOKK:
HighlordOmokk = creature->GetGUID();
break;
case NPC_SHADOW_HUNTER_VOSHGAJIN:
@@ -241,7 +241,7 @@ public:
switch (type)
{
case DATA_OMOKK:
case DATA_HIGHLORD_OMOKK:
case DATA_SHADOW_HUNTER_VOSHGAJIN:
case DATA_WARMASTER_VOONE:
case DATA_MOTHER_SMOLDERWEB:
@@ -299,7 +299,7 @@ public:
{
switch (type)
{
case DATA_OMOKK:
case DATA_HIGHLORD_OMOKK:
return HighlordOmokk;
break;
case DATA_SHADOW_HUNTER_VOSHGAJIN:

View File

@@ -129,6 +129,8 @@ set(scripts_STAT_SRCS
EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp
EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp
EasternKingdoms/BlackrockSpire/blackrock_spire.h
EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp