mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
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;
|
||||
_dying = 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->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
@@ -513,7 +513,7 @@ struct boss_illidan_stormrage : public BossAI
|
||||
scheduler.CancelAll();
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
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);
|
||||
}, 20s, GROUP_PHASE_FLYING);
|
||||
});
|
||||
@@ -685,6 +685,15 @@ private:
|
||||
bool _dying;
|
||||
bool _inCutscene;
|
||||
uint8 beamPosId;
|
||||
|
||||
void CycleBeamPos(uint8 &beamPosId)
|
||||
{
|
||||
uint8 _incumbentBeamPos = urand(0, MAX_EYE_BEAM_POS);
|
||||
if (_incumbentBeamPos == beamPosId)
|
||||
CycleBeamPos(beamPosId);
|
||||
else
|
||||
beamPosId = _incumbentBeamPos;
|
||||
}
|
||||
};
|
||||
|
||||
enum Akama
|
||||
|
||||
Reference in New Issue
Block a user