aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2020-03-29 17:46:08 +0100
committerShauren <shauren.trinity@gmail.com>2021-12-31 00:54:06 +0100
commit5e1f46f3c0eda08fe91ec4e3b54ddca1f3610db8 (patch)
treec212f36dcb3469718376623616b2686cb4cc587a /src
parent572e89d218e39a5e20b36189260b044aa01d49fc (diff)
Boss/Script: Mr Smith will use the proc aura for Nimble Reflexes instead a script
(cherry picked from commit 5b2b2211771618420a555f6e7e2c68722202df36)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp107
1 files changed, 71 insertions, 36 deletions
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
index 0507c594dfc..f94f71c1a11 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
@@ -29,17 +29,24 @@ EndScriptData */
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"
-enum Spels
+enum Spells
{
SPELL_TRASH = 3391,
SPELL_SMITE_STOMP = 6432,
- SPELL_SMITE_SLAM = 6435,
- SPELL_NIMBLE_REFLEXES = 6264,
+ SPELL_SMITE_SLAM = 6435
+};
+enum Equips
+{
EQUIP_SWORD = 5191,
- EQUIP_MACE = 7230,
+ EQUIP_AXE = 5196,
+ EQUIP_MACE = 7230
+};
- SAY_AGGRO = 0,
+enum Texts
+{
+ SAY_PHASE_1 = 2,
+ SAY_PHASE_2 = 3
};
class boss_mr_smite : public CreatureScript
@@ -64,35 +71,38 @@ public:
{
uiTrashTimer = urand(5000, 9000);
uiSlamTimer = 9000;
- uiNimbleReflexesTimer = urand(15500, 31600);
uiHealth = 0;
uiPhase = 0;
uiTimer = 0;
+
+ uiIsMoving = false;
}
InstanceScript* instance;
uint32 uiTrashTimer;
uint32 uiSlamTimer;
- uint32 uiNimbleReflexesTimer;
uint8 uiHealth;
uint32 uiPhase;
uint32 uiTimer;
+ bool uiIsMoving;
+
void Reset() override
{
Initialize();
SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ me->SetReactState(REACT_AGGRESSIVE);
}
void JustEngagedWith(Unit* /*who*/) override
{
- Talk(SAY_AGGRO);
}
bool bCheckChances()
@@ -109,38 +119,45 @@ public:
if (!UpdateVictim())
return;
- /*START ACID-AI*/
- if (uiTrashTimer <= uiDiff)
+ if (!uiIsMoving) // halt abilities in between phases
{
- if (bCheckChances())
- DoCast(me, SPELL_TRASH);
- uiTrashTimer = urand(6000, 15500);
- } else uiTrashTimer -= uiDiff;
+ if (uiTrashTimer <= uiDiff)
+ {
+ if (bCheckChances())
+ DoCast(me, SPELL_TRASH);
+ uiTrashTimer = urand(6000, 15500);
+ }
+ else uiTrashTimer -= uiDiff;
- if (uiSlamTimer <= uiDiff)
- {
- if (bCheckChances())
- DoCastVictim(SPELL_SMITE_SLAM);
- uiSlamTimer = 11000;
- } else uiSlamTimer -= uiDiff;
+ if (uiSlamTimer <= uiDiff)
+ {
+ if (bCheckChances())
+ DoCastVictim(SPELL_SMITE_SLAM);
+ uiSlamTimer = 11000;
+ }
+ else uiSlamTimer -= uiDiff;
- if (uiNimbleReflexesTimer <= uiDiff)
- {
- if (bCheckChances())
- DoCast(me, SPELL_NIMBLE_REFLEXES);
- uiNimbleReflexesTimer = urand(27300, 60100);
- } else uiNimbleReflexesTimer -= uiDiff;
- /*END ACID-AI*/
+ }
if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33)))
{
++uiHealth;
DoCastAOE(SPELL_SMITE_STOMP, false);
SetCombatMovement(false);
- if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SMITE_CHEST)))
+ me->AttackStop();
+ me->InterruptNonMeleeSpells(false);
+ me->SetReactState(REACT_PASSIVE);
+ uiTimer = 2500;
+ uiPhase = 1;
+
+ switch (uiHealth)
{
- me->GetMotionMaster()->Clear();
- me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ());
+ case 1:
+ Talk(SAY_PHASE_1);
+ break;
+ case 2:
+ Talk(SAY_PHASE_2);
+ break;
}
}
@@ -151,21 +168,36 @@ public:
switch (uiPhase)
{
case 1:
- me->HandleEmoteCommand(EMOTE_STATE_KNEEL); //dosen't work?
- uiTimer = 1000;
- uiPhase = 2;
+ {
+ if (uiIsMoving)
+ break;
+
+ if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SMITE_CHEST)))
+ {
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 1.5f, go->GetPositionY() + 1.4f, go->GetPositionZ());
+ uiIsMoving = true;
+ }
break;
+ }
case 2:
if (uiHealth == 1)
- SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SWORD, EQUIP_NO_CHANGE);
+ SetEquipmentSlots(false, EQUIP_AXE, EQUIP_AXE, EQUIP_NO_CHANGE);
else
SetEquipmentSlots(false, EQUIP_MACE, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
uiTimer = 500;
uiPhase = 3;
break;
case 3:
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ uiTimer = 750;
+ uiPhase = 4;
+ break;
+ case 4:
+ me->SetReactState(REACT_AGGRESSIVE);
SetCombatMovement(true);
me->GetMotionMaster()->MoveChase(me->GetVictim(), me->m_CombatDistance);
+ uiIsMoving = false;
uiPhase = 0;
break;
}
@@ -180,8 +212,11 @@ public:
if (uiType != POINT_MOTION_TYPE)
return;
- uiTimer = 1500;
- uiPhase = 1;
+ me->SetFacingTo(5.47f);
+ me->SetStandState(UNIT_STAND_STATE_KNEEL);
+
+ uiTimer = 2000;
+ uiPhase = 2;
}
};
};