aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaanuel <none@none>2009-12-09 20:08:44 -0300
committermaanuel <none@none>2009-12-09 20:08:44 -0300
commitd076f517030ae7bb69c7d13d23fa984057c9e36e (patch)
tree347d0412f8d748e465a28f41f30fb91c19d711a6 /src
parentf1abbdbecc28c594d7f2a9a7df81c3068397a55c (diff)
Violet Hold: If the boss is not attackable, he can't attack.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp36
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_ichoron.cpp14
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_lavanthor.cpp14
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp14
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_xevozz.cpp14
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp14
6 files changed, 102 insertions, 4 deletions
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 37747d7531b..659c400c13f 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
@@ -74,6 +74,20 @@ struct TRINITY_DLL_DECL boss_erekemAI : public ScriptedAI
}
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
@@ -213,27 +227,41 @@ struct TRINITY_DLL_DECL mob_erekem_guardAI : public ScriptedAI
uiGushingWoundTimer = urand(1000,3000);
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
-
+
DoMeleeAttackIfReady();
-
+
if (uiStrikeTimer <= diff)
{
DoCast(m_creature->getVictim(), SPELL_STRIKE);
uiStrikeTimer = urand(4000,8000);
} else uiStrikeTimer -= diff;
-
+
if (uiHowlingScreechTimer <= diff)
{
DoCast(m_creature->getVictim(), SPELL_HOWLING_SCREECH);
uiHowlingScreechTimer = urand(8000,13000);
} else uiHowlingScreechTimer -= diff;
-
+
if (uiGushingWoundTimer <= diff)
{
DoCast(m_creature->getVictim(), SPELL_GUSHING_WOUND);
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_ichoron.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_ichoron.cpp
index 2c15a2dd501..0e885e6c145 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_ichoron.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_ichoron.cpp
@@ -128,6 +128,20 @@ struct TRINITY_DLL_DECL boss_ichoronAI : public ScriptedAI
}
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void WaterElementHit()
{
m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01);
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_lavanthor.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_lavanthor.cpp
index 1b308835271..3b4661d6b74 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_lavanthor.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_lavanthor.cpp
@@ -63,6 +63,20 @@ struct TRINITY_DLL_DECL boss_lavanthorAI : public ScriptedAI
}
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
index 459c4a3e3de..4917763a637 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
@@ -56,6 +56,20 @@ struct TRINITY_DLL_DECL boss_moraggAI : public ScriptedAI
}
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void MoveInLineOfSight(Unit* who) {}
void UpdateAI(const uint32 diff)
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_xevozz.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_xevozz.cpp
index e1a1a34bfc7..10298c039bd 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_xevozz.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_xevozz.cpp
@@ -121,6 +121,20 @@ struct TRINITY_DLL_DECL boss_xevozzAI : public ScriptedAI
}
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_AGGRO, m_creature);
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
index ce089b3b481..b65b81a2d59 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
@@ -66,6 +66,20 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
SpellSummonVoidTimer = 12000;
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ return;
+
+ if (m_creature->Attack(pWho, true))
+ {
+ m_creature->AddThreat(pWho, 0.0f);
+ m_creature->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(m_creature);
+ DoStartMovement(pWho);
+ }
+ }
+
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);