Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Commit

Permalink
Update for Patch 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBlade committed Aug 25, 2022
1 parent ea96d0f commit bd2429a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
5 changes: 5 additions & 0 deletions HeelsPlugin/ConfigModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ public class ConfigModel
public bool Enabled;
public Sexes SexFilter = (Sexes)255;
public Races RaceFilter = (Races)255;

public ConfigModel()
{
Name = "";
}
}
}
4 changes: 2 additions & 2 deletions HeelsPlugin/Gui/ConfigItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ConfigItem
private readonly int key = 0;
private readonly ComboWithFilter<Item> combo;
private readonly ConfigModel config;
private string ItemName
private string? ItemName
{
get
{
Expand All @@ -31,7 +31,7 @@ private string ItemName
(short)item.ModelMain == config.Model;
});
if (foundItem != null)
return foundItem?.Name;
return foundItem.Name ?? "";
return "(Invalid item found)";
}
}
Expand Down
6 changes: 3 additions & 3 deletions HeelsPlugin/HeelsPlugin.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.1.8</Version>
<TargetFramework>net5.0-windows</TargetFramework>
<Version>1.1.9</Version>
<TargetFramework>net6.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
Expand All @@ -12,7 +12,7 @@
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<PreserveCompilationContext>false</PreserveCompilationContext>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(AppData)\XIVLauncher\devPlugins\BDTHPlugin</OutputPath>
<OutputPath>$(AppData)\XIVLauncher\devPlugins\HeelsPlugin</OutputPath>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions HeelsPlugin/HeelsPlugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"Name": "Heels Plugin",
"Description": "Offsets your character off the ground for when wearing heels.",
"InternalName": "HeelsPlugin",
"AssemblyVersion": "1.1.8",
"AssemblyVersion": "1.1.9",
"RepoUrl": "https://github.com/LeonBlade/HeelsPlugin",
"ApplicableVersion": "any",
"Tags": ["heels", "high heels", "height", "offset", "leonblade"],
"DalamudApiLevel": 6,
"DalamudApiLevel": 7,
"IconUrl": "https://github.com/LeonBlade/HeelsPlugin/raw/main/icon.png"
}
11 changes: 3 additions & 8 deletions HeelsPlugin/PluginMemory.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.SubKinds;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Hooking;
using Dalamud.Logging;
using System;
Expand All @@ -19,10 +17,7 @@ public class PluginMemory
public PluginMemory()
{
playerMovementFunc = Plugin.SigScanner.ScanText("E8 ?? ?? ?? ?? 48 8B CB E8 ?? ?? ?? ?? 48 8B CB E8 ?? ?? ?? ?? 48 8B 03 48 8B CB FF 50 ?? 83 F8 ?? 75 ??");
playerMovementHook = new Hook<PlayerMovementDelegate>(
playerMovementFunc,
new PlayerMovementDelegate(PlayerMovementHook)
);
playerMovementHook = Hook<PlayerMovementDelegate>.FromAddress(playerMovementFunc, new PlayerMovementDelegate(PlayerMovementHook));

playerMovementHook.Enable();
}
Expand All @@ -43,7 +38,7 @@ public void Dispose()
}
}

private ConfigModel GetConfigForModelId(EquipItem inModel)
private ConfigModel? GetConfigForModelId(EquipItem inModel)
{
var foundConfig = Plugin.Configuration.Configs.Where(config =>
{
Expand Down Expand Up @@ -80,7 +75,7 @@ public EquipItem GetPlayerFeet()

public EquipItem GetPlayerFeet(IntPtr player)
{
var feet = (uint)Marshal.ReadInt32(player + 0x808 + 0x10);
var feet = (uint)Marshal.ReadInt32(player + 0x818 + 0x10);
return new EquipItem(feet);
}

Expand Down
2 changes: 1 addition & 1 deletion HeelsPlugin/PluginUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private ComboWithFilter<Item> CreateCombo(int id)
var model = new EquipItem((uint)item.ModelMain);
var ids = $"{model.Main}, {model.Variant}";
var size = ImGui.CalcTextSize(ids).X;
ImGui.SameLine(ImGui.GetWindowContentRegionWidth() - size - ImGui.GetStyle().ItemInnerSpacing.X);
ImGui.SameLine(ImGui.GetWindowContentRegionMax().X - size - ImGui.GetStyle().ItemInnerSpacing.X);
ImGui.TextColored(GreyVector, ids);
return ret;
}
Expand Down

0 comments on commit bd2429a

Please sign in to comment.