fix(Scripts/HyjalSummit): Rage Winterchill Spells (#19335)
Update boss_rage_winterchill.cpp
This commit is contained in:
+23
-17
@@ -39,6 +39,7 @@ enum Texts
|
|||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
{
|
{
|
||||||
|
GROUP_FROST = 1,
|
||||||
PATH_RAGE_WINTERCHILL = 177670,
|
PATH_RAGE_WINTERCHILL = 177670,
|
||||||
POINT_COMBAT_START = 7
|
POINT_COMBAT_START = 7
|
||||||
};
|
};
|
||||||
@@ -50,9 +51,9 @@ public:
|
|||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
_recentlySpoken = false;
|
||||||
scheduler.SetValidator([this]
|
scheduler.SetValidator([this]
|
||||||
{
|
{
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* who) override
|
void JustEngagedWith(Unit* who) override
|
||||||
@@ -61,26 +62,31 @@ public:
|
|||||||
|
|
||||||
scheduler.Schedule(18s, 24s, [this](TaskContext context)
|
scheduler.Schedule(18s, 24s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
|
context.SetGroup(GROUP_FROST);
|
||||||
|
|
||||||
DoCastSelf(SPELL_FROST_ARMOR);
|
DoCastSelf(SPELL_FROST_ARMOR);
|
||||||
context.Repeat(30s, 45s);
|
context.Repeat(30s, 45s);
|
||||||
}).Schedule(5s, 9s, [this](TaskContext context)
|
}).Schedule(5s, 9s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
|
context.SetGroup(GROUP_FROST);
|
||||||
|
|
||||||
DoCastRandomTarget(SPELL_ICEBOLT);
|
DoCastRandomTarget(SPELL_ICEBOLT);
|
||||||
context.Repeat(9s, 15s);
|
context.Repeat(9s, 15s);
|
||||||
}).Schedule(12s, 17s, [this](TaskContext context)
|
}).Schedule(12s, 17s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
if (SelectTarget(SelectTargetMethod::Random, 0, 20.f))
|
context.SetGroup(GROUP_FROST);
|
||||||
{
|
|
||||||
DoCastAOE(SPELL_FROST_NOVA);
|
if (DoCastRandomTarget(SPELL_FROST_NOVA, 0, 45.f) == SPELL_CAST_OK)
|
||||||
Talk(SAY_NOVA);
|
Talk(SAY_NOVA);
|
||||||
context.Repeat(25s, 30s);
|
|
||||||
}
|
context.Repeat(25s, 30s);
|
||||||
else
|
|
||||||
context.Repeat(1200ms);
|
|
||||||
}).Schedule(21s, 28s, [this](TaskContext context)
|
}).Schedule(21s, 28s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
if (DoCastRandomTarget(SPELL_DEATH_AND_DECAY, 0, 40.f))
|
if (DoCastRandomTarget(SPELL_DEATH_AND_DECAY, 0, 40.f) == SPELL_CAST_OK)
|
||||||
|
{
|
||||||
Talk(SAY_DECAY);
|
Talk(SAY_DECAY);
|
||||||
|
context.DelayGroup(GROUP_FROST, 15s);
|
||||||
|
}
|
||||||
|
|
||||||
context.Repeat(45s);
|
context.Repeat(45s);
|
||||||
}).Schedule(10min, [this](TaskContext context)
|
}).Schedule(10min, [this](TaskContext context)
|
||||||
@@ -106,9 +112,9 @@ public:
|
|||||||
case ALLIANCE_BASE_CHARGE_2:
|
case ALLIANCE_BASE_CHARGE_2:
|
||||||
case ALLIANCE_BASE_CHARGE_3:
|
case ALLIANCE_BASE_CHARGE_3:
|
||||||
me->m_Events.AddEventAtOffset([this]()
|
me->m_Events.AddEventAtOffset([this]()
|
||||||
{
|
{
|
||||||
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true);
|
||||||
}, 1s);
|
}, 1s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,9 +127,9 @@ public:
|
|||||||
_recentlySpoken = true;
|
_recentlySpoken = true;
|
||||||
|
|
||||||
scheduler.Schedule(6s, [this](TaskContext)
|
scheduler.Schedule(6s, [this](TaskContext)
|
||||||
{
|
{
|
||||||
_recentlySpoken = false;
|
_recentlySpoken = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user