Skip to content

Commit

Permalink
[fix] support to knockbuck burn strike
Browse files Browse the repository at this point in the history
  • Loading branch information
Garume committed Nov 27, 2024
1 parent ecac34f commit 8862955
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Dalamud.Game.ClientState.Objects.Types;
using ECommons;
using ECommons.Configuration;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
Expand All @@ -25,8 +24,8 @@ public class P1_Burn_Strike_Tower : SplatoonScript
private readonly Dictionary<int, List<uint>> TowerCastIds = new()
{
{ 1, [0x9CC7, 0x9CC3] },
{ 2, [0x9CBD] },
{ 3, [0x9CBE] },
{ 2, [0x9CBD, 0x9CBA] },
{ 3, [0x9CBE, 0x9CBB] },
{ 4, [0x9CBF, 0x9CBC] }
};

Expand Down Expand Up @@ -87,6 +86,11 @@ private unsafe bool DrawPriorityList()
ImGuiEx.Tooltip(
"If enabled, the priority will be fixed based on the order of the fixed priority list.\n1st -> North, 2nd -> Center, 3rd -> South");

if (C.FixEnabled && C.FixedPriority.Count(x => x) !=3)
{
ImGuiEx.Text(EColor.RedBright,"Please select 3 fixed.");
}

ImGui.PushID("prio");
for (var i = 0; i < C.Priority.Length; i++)
{
Expand Down Expand Up @@ -197,6 +201,7 @@ public override void OnActionEffectEvent(ActionEffectSet set)

public override void OnStartingCast(uint source, uint castId)
{
if (_state == State.Split) return;
if (castId is 40135 or 40129) _state = State.Start;

if (TowerCastIds.Values.Any(x => x.Contains(castId)))
Expand Down Expand Up @@ -255,7 +260,7 @@ public override void OnStartingCast(uint source, uint castId)
var index = 0;
foreach (var tower in _currentTowers)
{
var towerCount = TowerCastIds.First(x => x.Value.Contains(tower.CastActionId)).Key;
var towerCount = TowerCastIds.First(x => x.Value.Contains(tower.CastActionId)).Key;
var lastIndex = index;
index += towerCount;

Expand All @@ -282,7 +287,7 @@ private enum State
End
}

public class Config : IEzConfig
private class Config : IEzConfig
{
public readonly Vector4 BaitColor1 = 0xFFFF00FF.ToVector4();
public readonly Vector4 BaitColor2 = 0xFFFFFF00.ToVector4();
Expand Down

0 comments on commit 8862955

Please sign in to comment.