aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortartalo <none@none>2009-10-18 01:29:11 +0200
committertartalo <none@none>2009-10-18 01:29:11 +0200
commit45152bd3081d02b03b52eb076a24f6cfa0e6442a (patch)
treee5c6ea701972577d879423d3bd9bbe7a0c769ffb
parent0e322e79ac897353aaf491372a0bd98a93a7d3dd (diff)
Violet Hold: Cleansing, fix & completion of boss Erekem's script
--HG-- branch : trunk
-rw-r--r--sql/FULL/world_scripts_full.sql2
-rw-r--r--sql/updates/5960_world_scripts.sql1
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp65
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp7
4 files changed, 39 insertions, 36 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index aecde61b73d..a861fd0ffa5 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -1205,7 +1205,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_lavanthor' WHERE `entry`=29312
UPDATE `creature_template` SET `ScriptName`='boss_ichoron' WHERE `entry`=29313;
UPDATE `creature_template` SET `ScriptName`='boss_zuramat' WHERE `entry`=29314;
UPDATE `creature_template` SET `ScriptName`='boss_erekem' WHERE `entry`=29315;
-UPDATE `creature_template` SET `ScriptName`='mob_erekem_guard' WHERE `entry`=32226;
+UPDATE `creature_template` SET `ScriptName`='mob_erekem_guard' WHERE `entry`=29395;
UPDATE `creature_template` SET `ScriptName`='boss_moragg' WHERE `entry`=29316;
UPDATE `creature_template` SET `ScriptName`='boss_xevozz' WHERE `entry`=29266;
UPDATE `creature_template` SET `ScriptName`='boss_cyanigosa' WHERE `entry`=31134;
diff --git a/sql/updates/5960_world_scripts.sql b/sql/updates/5960_world_scripts.sql
new file mode 100644
index 00000000000..c52d7091bff
--- /dev/null
+++ b/sql/updates/5960_world_scripts.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='mob_erekem_guard' WHERE `entry`=29395;
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
index cf6a9c63ce8..d5cce50d3d1 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
@@ -63,6 +63,8 @@ struct TRINITY_DLL_DECL boss_erekemAI : public ScriptedAI
uiEarthShockTimer = urand(2000,8000);
uiLightningBoltTimer = urand(5000,10000);
uiEarthShieldTimer = 20000;
+ pGuard1 = NULL;
+ pGuard2 = NULL;
if (pInstance)
{
if (pInstance->GetData(DATA_WAVE_COUNT) == 6)
@@ -133,10 +135,7 @@ struct TRINITY_DLL_DECL boss_erekemAI : public ScriptedAI
if (uiLightningBoltTimer < diff)
{
- Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
- while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER)
- SelectUnit(SELECT_TARGET_RANDOM,0);
- if (pTarget)
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,100,true))
DoCast(pTarget, SPELL_LIGHTNING_BOLT);
uiLightningBoltTimer = urand(18000,24000);
} else uiLightningBoltTimer -= diff;
@@ -182,6 +181,13 @@ CreatureAI* GetAI_boss_erekem(Creature* pCreature)
return new boss_erekemAI (pCreature);
}
+enum GuardSpells
+{
+ SPELL_GUSHING_WOUND = 39215,
+ SPELL_HOWLING_SCREECH = 54462,
+ SPELL_STRIKE = 14516
+};
+
struct TRINITY_DLL_DECL mob_erekem_guardAI : public ScriptedAI
{
mob_erekem_guardAI(Creature *c) : ScriptedAI(c)
@@ -189,46 +195,45 @@ struct TRINITY_DLL_DECL mob_erekem_guardAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
- uint32 uiEarthShieldTimer;
- uint32 uiLightningBoltTimer;
- uint32 uiBloodlustTimer;
+ uint32 uiGushingWoundTimer;
+ uint32 uiHowlingScreechTimer;
+ uint32 uiStrikeTimer;
ScriptedInstance* pInstance;
void Reset()
{
- uiEarthShieldTimer = 20000;
- uiLightningBoltTimer = urand(0,5000);
- uiBloodlustTimer = urand(8000,18000);
- }
-
- void EnterCombat(Unit* who)
- {
- DoCast(m_creature, H_SPELL_EARTH_SHIELD);
+ uiStrikeTimer = urand(4000,8000);
+ uiHowlingScreechTimer = urand(8000,13000);
+ uiGushingWoundTimer = urand(1000,3000);
}
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
{
- if (uiEarthShieldTimer < diff)
+ if (!UpdateVictim())
+ return;
+
+ DoMeleeAttackIfReady();
+
+ if (uiStrikeTimer < diff)
{
- DoCast(m_creature, H_SPELL_EARTH_SHIELD);
- uiEarthShieldTimer = 20000;
- } else uiEarthShieldTimer -= diff;
-
- if (uiLightningBoltTimer < diff)
+ DoCast(m_creature->getVictim(), SPELL_STRIKE);
+ uiStrikeTimer = urand(4000,8000);
+ } else uiStrikeTimer -= diff;
+
+ if (uiHowlingScreechTimer < diff)
{
- if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
- DoCast(pTarget, SPELL_LIGHTNING_BOLT);
- uiLightningBoltTimer = urand(18000,24000);
- } else uiLightningBoltTimer -= diff;
-
- if (uiBloodlustTimer < diff)
+ DoCast(m_creature->getVictim(), SPELL_HOWLING_SCREECH);
+ uiHowlingScreechTimer = urand(8000,13000);
+ } else uiHowlingScreechTimer -= diff;
+
+ if (uiGushingWoundTimer < diff)
{
- DoCast(m_creature,SPELL_BLOODLUST);
- uiBloodlustTimer = urand(35000,45000);
- } else uiBloodlustTimer -= diff;
+ DoCast(m_creature->getVictim(), SPELL_GUSHING_WOUND);
+ uiGushingWoundTimer = urand(7000,12000);
+ } else uiGushingWoundTimer -= diff;
}
};
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
index 771b8e187da..7734571ce70 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
@@ -277,13 +277,10 @@ struct TRINITY_DLL_DECL instance_violet_hold : public ScriptedInstance
break;
case 1: //Erekem
HandleGameObject(uiErekemCell,true);
+ HandleGameObject(uiErekemRightGuardCell,true);
+ HandleGameObject(uiErekemLeftGuardCell,true);
if (pBoss = instance->GetCreature(uiErekem))
{
- if (HeroicMode)
- {
- HandleGameObject(uiErekemRightGuardCell,true);
- HandleGameObject(uiErekemLeftGuardCell,true);
- }
pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}