mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Scripts: Fixed Baltharus the Warborn clones
*Clones not working after wipe *Changed Clone Action for a event (to check casting)
This commit is contained in:
@@ -49,7 +49,8 @@ enum Events
|
||||
EVENT_CLEAVE,
|
||||
EVENT_ENERVATING_BRAND,
|
||||
EVENT_INTRO_TALK,
|
||||
EVENT_SUMMONS_ATTACK
|
||||
EVENT_SUMMONS_ATTACK,
|
||||
EVENT_CLONE
|
||||
};
|
||||
|
||||
enum Actions
|
||||
@@ -71,10 +72,8 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
|
||||
struct boss_baltharus_the_warbornAI : public BossAI
|
||||
{
|
||||
boss_baltharus_the_warbornAI(Creature* creature) : BossAI(creature, DATA_BALTHARUS_THE_WARBORN), _introDone(false)
|
||||
{
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 2);
|
||||
}
|
||||
boss_baltharus_the_warbornAI(Creature* creature) : BossAI(creature, DATA_BALTHARUS_THE_WARBORN),
|
||||
_introDone(false), _cloneCount(RAID_MODE<uint8>(1, 2, 2, 2)) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -83,6 +82,7 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
instance->SetData(DATA_BALTHARUS_SHARED_HEALTH, me->GetMaxHealth());
|
||||
if (Creature* channelTarget = instance->GetCreature(DATA_CRYSTAL_CHANNEL_TARGET))
|
||||
DoCast(channelTarget, SPELL_BARRIER_CHANNEL);
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 2);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -98,8 +98,8 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
break;
|
||||
case ACTION_CLONE:
|
||||
{
|
||||
DoCastSelf(SPELL_CLEAR_DEBUFFS);
|
||||
DoCastSelf(SPELL_CLONE);
|
||||
DoCastSelf(SPELL_CLEAR_DEBUFFS, true);
|
||||
DoCastSelf(SPELL_CLONE, true);
|
||||
DoCastSelf(SPELL_REPELLING_WAVE);
|
||||
Talk(SAY_CLONE);
|
||||
--_cloneCount;
|
||||
@@ -148,14 +148,14 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
if (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 1)
|
||||
DoAction(ACTION_CLONE);
|
||||
events.ScheduleEvent(EVENT_CLONE, Milliseconds(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(66, damage) && _cloneCount == 2)
|
||||
DoAction(ACTION_CLONE);
|
||||
events.ScheduleEvent(EVENT_CLONE, Milliseconds(1));
|
||||
else if (me->HealthBelowPctDamaged(33, damage) && _cloneCount == 1)
|
||||
DoAction(ACTION_CLONE);
|
||||
events.ScheduleEvent(EVENT_CLONE, Milliseconds(1));
|
||||
}
|
||||
|
||||
if (me->GetHealth() > damage)
|
||||
@@ -171,19 +171,18 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
bool introPhase = events.IsInPhase(PHASE_INTRO);
|
||||
|
||||
if (!introPhase && !UpdateVictim())
|
||||
if (!events.IsInPhase(PHASE_INTRO) && !UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!introPhase)
|
||||
if (!events.IsInPhase(PHASE_INTRO))
|
||||
me->SetHealth(instance->GetData(DATA_BALTHARUS_SHARED_HEALTH));
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (!introPhase && me->HasUnitState(UNIT_STATE_CASTING))
|
||||
if (!events.IsInPhase(PHASE_INTRO) && me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
@@ -208,6 +207,9 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
case EVENT_SUMMONS_ATTACK:
|
||||
summons.DoZoneInCombat(NPC_BALTHARUS_THE_WARBORN_CLONE);
|
||||
break;
|
||||
case EVENT_CLONE:
|
||||
DoAction(ACTION_CLONE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user