mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Boss/Script: Mr Smith will use the proc aura for Nimble Reflexes instead a script
(cherry picked from commit 5b2b221177)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `creature_template_addon` SET `auras`="6433" WHERE `entry`=646;
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user