Skip to content

Commit

Permalink
Add PCT sunderings and remove useless ones
Browse files Browse the repository at this point in the history
Fix #137 and add #130
  • Loading branch information
UnknownX7 committed Nov 23, 2024
1 parent 578cb18 commit c81d811
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 63 deletions.
8 changes: 4 additions & 4 deletions Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public override void BindToName(Type serializedType, out string assemblyName, ou
public uint AutoFocusTargetID = 0;
public bool EnableAutoFocusTargetOutOfCombat = false;

public bool EnableDecomboMeditation = false;
public bool EnableDecomboBunshin = false;
public bool EnableDecomboWanderersMinuet = false;
public bool EnableDecomboLiturgy = false;
public bool EnableDecomboEarthlyStar = false;
public bool EnableDecomboMinorArcana = false;
public bool EnableDecomboGeirskogul = false;
public bool EnableDecomboFireInRed = false;
public bool EnableDecomboFire2InRed = false;
public bool EnableDecomboBlizzardInCyan = false;
public bool EnableDecomboBlizzard2InCyan = false;

public override void Initialize() { }

Expand Down
58 changes: 16 additions & 42 deletions Modules/Decombos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,49 @@ public unsafe class Decombos : PluginModule
{
private enum ActionID : uint
{
Meditation = 3546,
The_Forbidden_Chakra = 3547,
Steel_Peak = 25761,

Bunshin = 16493,
Phantom_Kamaitachi = 25774,

The_Wanderers_Minuet = 3559,

Liturgy_of_the_Bell = 25862,

Earthly_Star = 7439,

Minor_Arcana = 7443,
Lord_of_Crowns = 7444,
Lady_of_Crowns = 7445,

Geirskogul = 3555
Fire_in_Red = 34650,
Blizzard_in_Cyan = 34653,
Fire_II_in_Red = 34656,
Blizzard_II_in_Cyan = 34659
}

/*public override bool ShouldEnable => ReAction.Config.EnableDecomboMeditation
|| ReAction.Config.EnableDecomboBunshin
|| ReAction.Config.EnableDecomboWanderersMinuet
|| ReAction.Config.EnableDecomboLiturgy
public override bool ShouldEnable => ReAction.Config.EnableDecomboLiturgy
|| ReAction.Config.EnableDecomboEarthlyStar
|| ReAction.Config.EnableDecomboMinorArcana
|| ReAction.Config.EnableDecomboGeirskogul;*/

public override bool ShouldEnable => false;
|| ReAction.Config.EnableDecomboFireInRed
|| ReAction.Config.EnableDecomboFire2InRed
|| ReAction.Config.EnableDecomboBlizzardInCyan
|| ReAction.Config.EnableDecomboBlizzard2InCyan;

protected override void Enable() => GetAdjustedActionIdHook.Enable();
protected override void Disable() => GetAdjustedActionIdHook.Disable();

private delegate ActionID GetAdjustedActionIdDelegate(ActionManager* actionManager, ActionID actionID);
[HypostasisClientStructsInjection(typeof(ActionManager.MemberFunctionPointers), Required = true)]
[HypostasisClientStructsInjection(typeof(ActionManager.MemberFunctionPointers), Required = true, EnableHook = false)]
private static Hook<GetAdjustedActionIdDelegate> GetAdjustedActionIdHook;
private static ActionID GetAdjustedActionIdDetour(ActionManager* actionManager, ActionID actionID)
{
var ret = GetAdjustedActionIdHook.Original(actionManager, actionID);

switch (actionID)
{
case ActionID.Meditation when ReAction.Config.EnableDecomboMeditation:
return actionID;
case ActionID.The_Forbidden_Chakra when ReAction.Config.EnableDecomboMeditation:
case ActionID.Steel_Peak when ReAction.Config.EnableDecomboMeditation:
return ret != ActionID.Meditation ? ret : actionID;

case ActionID.Bunshin when ReAction.Config.EnableDecomboBunshin:
case ActionID.Phantom_Kamaitachi when ReAction.Config.EnableDecomboBunshin:
return actionID;

case ActionID.The_Wanderers_Minuet when ReAction.Config.EnableDecomboWanderersMinuet:
return actionID;

case ActionID.Liturgy_of_the_Bell when ReAction.Config.EnableDecomboLiturgy:
return actionID;

case ActionID.Earthly_Star when ReAction.Config.EnableDecomboEarthlyStar:
return actionID;

case ActionID.Minor_Arcana when ReAction.Config.EnableDecomboMinorArcana:
case ActionID.Fire_in_Red when ReAction.Config.EnableDecomboFireInRed:
return actionID;
case ActionID.Lord_of_Crowns when ReAction.Config.EnableDecomboMinorArcana:
case ActionID.Lady_of_Crowns when ReAction.Config.EnableDecomboMinorArcana:
var minorArcanaAdjustment = GetAdjustedActionIdHook.Original(actionManager, ActionID.Minor_Arcana);
return minorArcanaAdjustment != ActionID.Minor_Arcana ? minorArcanaAdjustment : actionID;

case ActionID.Geirskogul when ReAction.Config.EnableDecomboGeirskogul:
case ActionID.Fire_II_in_Red when ReAction.Config.EnableDecomboFire2InRed:
return actionID;
case ActionID.Blizzard_in_Cyan when ReAction.Config.EnableDecomboBlizzardInCyan:
return actionID;
case ActionID.Blizzard_II_in_Cyan when ReAction.Config.EnableDecomboBlizzard2InCyan:
return actionID;

default:
Expand Down
27 changes: 12 additions & 15 deletions PluginUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,31 +544,28 @@ private static void DrawOtherSettings()

ImGui.SameLine();

/*if (ImGuiEx.BeginGroupBox("Sunderings", 0.5f))
if (ImGuiEx.BeginGroupBox("Sunderings", 0.5f))
{
save |= ImGui.Checkbox("Sunder Meditation", ref ReAction.Config.EnableDecomboMeditation);
ImGuiEx.SetItemTooltip("Removes the Meditation <-> Steel Peak / Forbidden Chakra combo. You will need to use\nthe hotbar feature below to place one of them on your hotbar in order to use them again.\nSteel Peak ID: 25761\nForbidden Chakra ID: 3547");
save |= ImGui.Checkbox("Sunder Fire in Red", ref ReAction.Config.EnableDecomboFireInRed);
ImGuiEx.SetItemTooltip("Removes the Fire in Red combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nAero in Green ID: 34651\nWater in Blue ID: 34652");

save |= ImGui.Checkbox("Sunder Bunshin", ref ReAction.Config.EnableDecomboBunshin);
ImGuiEx.SetItemTooltip("Removes the Bunshin <-> Phantom Kamaitachi combo. You will need to use\nthe hotbar feature below to place it on your hotbar in order to use it again.\nPhantom Kamaitachi ID: 25774");
save |= ImGui.Checkbox("Sunder Fire II in Red", ref ReAction.Config.EnableDecomboFire2InRed);
ImGuiEx.SetItemTooltip("Removes the Fire II in Red combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nAero II in Green ID: 34657\nWater II in Blue ID: 34658");

save |= ImGui.Checkbox("Sunder Wanderer's Minuet", ref ReAction.Config.EnableDecomboWanderersMinuet);
ImGuiEx.SetItemTooltip("Removes the Wanderer's Minuet -> Pitch Perfect combo. You will need to use\nthe hotbar feature below to place it on your hotbar in order to use it again.\nPitch Perfect ID: 7404");
save |= ImGui.Checkbox("Sunder Blizzard in Cyan", ref ReAction.Config.EnableDecomboBlizzardInCyan);
ImGuiEx.SetItemTooltip("Removes the Blizzard in Cyan combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nStone in Yellow ID: 34654\nThunder in Magenta ID: 34655");

save |= ImGui.Checkbox("Sunder Blizzard II in Cyan", ref ReAction.Config.EnableDecomboBlizzard2InCyan);
ImGuiEx.SetItemTooltip("Removes the Blizzard II in Cyan combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nStone II in Yellow ID: 34660\nThunder II in Magenta ID: 34661");

save |= ImGui.Checkbox("Sunder Liturgy of the Bell", ref ReAction.Config.EnableDecomboLiturgy);
ImGuiEx.SetItemTooltip("Removes the Liturgy of the Bell combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nLiturgy of the Bell (Detonate) ID: 28509");

save |= ImGui.Checkbox("Sunder Earthly Star", ref ReAction.Config.EnableDecomboEarthlyStar);
ImGuiEx.SetItemTooltip("Removes the Earthly Star combo. You will need to use the hotbar\nfeature below to place it on your hotbar in order to use it again.\nStellar Detonation ID: 8324");

save |= ImGui.Checkbox("Sunder Minor Arcana", ref ReAction.Config.EnableDecomboMinorArcana);
ImGuiEx.SetItemTooltip("Removes the Minor Arcana -> Lord / Lady of Crowns combo. You will need to use the\nhotbar feature below to place one of them on your hotbar in order to use them again.\nLord of Crowns ID: 7444\nLady of Crowns ID: 7445");
save |= ImGui.Checkbox("Sunder Geirskogul", ref ReAction.Config.EnableDecomboGeirskogul);
ImGuiEx.SetItemTooltip("Removes the Geirskogul -> Nastrond combo. You will need to use the\nhotbar feature below to place it on your hotbar in order to use it again.\nNastrond ID: 7400");
ImGuiEx.EndGroupBox();
}*/
}

if (ImGuiEx.BeginGroupBox("Misc", 0.5f))
{
Expand Down Expand Up @@ -596,7 +593,7 @@ private static void DrawOtherSettings()
ImGuiEx.EndGroupBox();
}

//ImGui.SameLine();
ImGui.SameLine();

if (ImGuiEx.BeginGroupBox("Place on Hotbar (HOVER ME FOR INFORMATION)", 0.5f, new ImGuiEx.GroupBoxOptions
{
Expand Down
2 changes: 1 addition & 1 deletion ReAction.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.3.3.12</Version>
<Version>1.3.4.0</Version>
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<Platforms>x64;AnyCPU</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion ReAction.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
],
"InternalName": "ReAction",
"AssemblyVersion": "9.9.9.9",
"Changelog": ""
"Changelog": "Added Pictomancer sunderings and removed useless ones"
}

0 comments on commit c81d811

Please sign in to comment.