Skip to content

Commit

Permalink
[fix] way to identify the first icicle impact
Browse files Browse the repository at this point in the history
  • Loading branch information
Garume committed Nov 28, 2024
1 parent f25e648 commit 293f941
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,20 @@ public override void OnStartingCast(uint source, uint castId)
var isEast = icicleObject?.Position.X > 105;
var isWest = icicleObject?.Position.X < 95;
var isNorth = icicleObject?.Position.Z < 95;
var isSouth = icicleObject?.Position.Z > 105;

if (isNorth && isEast)
_firstIcicleImpactDirection = IcicleImpactDirection.NorthEast;
else if (isNorth && isWest)
_firstIcicleImpactDirection = IcicleImpactDirection.SouthEast;
else if (isEast)
_firstIcicleImpactDirection = IcicleImpactDirection.East;
else if (isNorth) _firstIcicleImpactDirection = IcicleImpactDirection.North;
_firstIcicleImpactDirection = (isNorth, isEast, isWest, isSouth) switch
{
(true, false, false, false) => IcicleImpactDirection.North,
(true, true, false, false) => IcicleImpactDirection.NorthEast,
(false, true, false, false) => IcicleImpactDirection.East,
(false, true, true, false) => IcicleImpactDirection.SouthEast,
(false, false, false, true) => IcicleImpactDirection.North,
(false, false, true, true) => IcicleImpactDirection.NorthEast,
(false, false, true, false) => IcicleImpactDirection.East,
(true, false, true, false) => IcicleImpactDirection.SouthEast,
_ => _firstIcicleImpactDirection
};
}

_aoeType = castId switch
Expand Down

0 comments on commit 293f941

Please sign in to comment.