fix(Scripts/BlackTemple): Properly randomize Illidan initial Eye Beam and order. (#20264)
Init.
This commit is contained in:
@@ -207,7 +207,7 @@ struct boss_illidan_stormrage : public BossAI
|
|||||||
_canTalk = true;
|
_canTalk = true;
|
||||||
_dying = false;
|
_dying = false;
|
||||||
_inCutscene = false;
|
_inCutscene = false;
|
||||||
beamPosId = RAND(0, int(MAX_EYE_BEAM_POS));
|
beamPosId = urand(0, MAX_EYE_BEAM_POS);
|
||||||
me->ReplaceAllUnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
me->ReplaceAllUnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
me->SetHover(false);
|
me->SetHover(false);
|
||||||
@@ -513,7 +513,7 @@ struct boss_illidan_stormrage : public BossAI
|
|||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
me->InterruptNonMeleeSpells(false);
|
me->InterruptNonMeleeSpells(false);
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
beamPosId = (beamPosId + 1) % MAX_EYE_BEAM_POS;
|
CycleBeamPos(beamPosId);
|
||||||
me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_HOVER, airHoverPos[beamPosId], false, true);
|
me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_HOVER, airHoverPos[beamPosId], false, true);
|
||||||
}, 20s, GROUP_PHASE_FLYING);
|
}, 20s, GROUP_PHASE_FLYING);
|
||||||
});
|
});
|
||||||
@@ -685,6 +685,15 @@ private:
|
|||||||
bool _dying;
|
bool _dying;
|
||||||
bool _inCutscene;
|
bool _inCutscene;
|
||||||
uint8 beamPosId;
|
uint8 beamPosId;
|
||||||
|
|
||||||
|
void CycleBeamPos(uint8 &beamPosId)
|
||||||
|
{
|
||||||
|
uint8 _incumbentBeamPos = urand(0, MAX_EYE_BEAM_POS);
|
||||||
|
if (_incumbentBeamPos == beamPosId)
|
||||||
|
CycleBeamPos(beamPosId);
|
||||||
|
else
|
||||||
|
beamPosId = _incumbentBeamPos;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Akama
|
enum Akama
|
||||||
|
|||||||
Reference in New Issue
Block a user