updated to api 6
This commit is contained in:
parent
91b788d5df
commit
9e2989ba4f
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>0.3.1.0</Version>
|
||||
<Version>0.3.2.0</Version>
|
||||
<Description>Currency Alert</Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Lharz/xiv-currency-alert</PackageProjectUrl>
|
||||
@ -27,7 +27,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.5" />
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.6" />
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
|
@ -32,7 +32,7 @@ namespace CurrencyAlert.Enum
|
||||
[Name("Sack of Nuts"), ItemID(26533), DefaultThreshold(3500), Category("Battle")]
|
||||
SackOfNut,
|
||||
|
||||
[Name("Bicolor Gemstone"), ItemID(26807), DefaultThreshold(1000), Category("Battle")]
|
||||
[Name("Bicolor Gemstone"), ItemID(26807), DefaultThreshold(800), Category("Battle")]
|
||||
BicolorGemstone,
|
||||
|
||||
[Name("White Crafters' Scrip"), ItemID(25199), DefaultThreshold(1500), Category("Other")]
|
||||
|
@ -19,12 +19,6 @@ namespace CurrencyAlert
|
||||
get { return settingsVisible; }
|
||||
set { settingsVisible = value; }
|
||||
}
|
||||
private bool debugVisible = false;
|
||||
public bool DebugVisible
|
||||
{
|
||||
get { return debugVisible; }
|
||||
set { debugVisible = value; }
|
||||
}
|
||||
public Dictionary<Currency, bool> AlertVisible { get; set; } = new Dictionary<Currency, bool>();
|
||||
|
||||
public PluginUI(Configuration configuration)
|
||||
@ -45,9 +39,6 @@ namespace CurrencyAlert
|
||||
|
||||
if (this.SettingsVisible)
|
||||
DrawSettingsWindow();
|
||||
|
||||
if (this.DebugVisible)
|
||||
DrawDebugWindow();
|
||||
}
|
||||
|
||||
public void DrawMainWindow()
|
||||
@ -114,53 +105,6 @@ namespace CurrencyAlert
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if (ImGui.Button("Open Debug"))
|
||||
this.DebugVisible = true;
|
||||
#endif
|
||||
|
||||
ImGui.End();
|
||||
}
|
||||
|
||||
public void DrawDebugWindow()
|
||||
{
|
||||
ImGui.SetNextWindowSize(new Vector2(375, 330), ImGuiCond.FirstUseEver);
|
||||
ImGui.SetNextWindowSizeConstraints(new Vector2(375, 330), new Vector2(float.MaxValue, float.MaxValue));
|
||||
|
||||
if (ImGui.Begin("Currency Alert Debug", ref this.debugVisible))
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
InventoryManager* inventoryManager = InventoryManager.Instance();
|
||||
|
||||
ImGui.Text($"ItemID: 42 Value: {inventoryManager->GetInventoryItemCount(42)}");
|
||||
|
||||
EnumHelper.Each<InventoryType>(type =>
|
||||
{
|
||||
if (type != InventoryType.Currency)
|
||||
return;
|
||||
|
||||
InventoryContainer* currencyContainer = inventoryManager->GetInventoryContainer(type);
|
||||
|
||||
if (currencyContainer == null)
|
||||
{
|
||||
return; // TODO: log something
|
||||
}
|
||||
|
||||
ImGui.Text($"----- {type.ToString()} -----");
|
||||
for (var i = 0; i < int.MaxValue; ++i)
|
||||
{
|
||||
var item = currencyContainer->GetInventorySlot(i);
|
||||
|
||||
if (item == null)
|
||||
break;
|
||||
|
||||
ImGui.Text($"Index: {i} Value: {item->Quantity}");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.End();
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,20 @@
|
||||
{
|
||||
"Author": "Lharz",
|
||||
"Name": "Currency Alert",
|
||||
"Punchline": "Lets you setup alerts upon reaching certain currencies amount (such as Poetics or PVP marks).",
|
||||
"Description": "/currencyalert: show the configuration panel.",
|
||||
"InternalName": "currencyAlert",
|
||||
"ApplicableVersion": "any",
|
||||
"Punchline": "Display alerts upon reaching configurable currencies thresholds (such as Poetics or PVP marks).",
|
||||
"Description": "/currencyalert: shows the configuration panel.",
|
||||
"Changelog": null,
|
||||
"Tags": [
|
||||
"plugin",
|
||||
"currency",
|
||||
"tomestones",
|
||||
"utility",
|
||||
"other"
|
||||
]
|
||||
],
|
||||
"CategoryTags": null,
|
||||
"AssemblyVersion": "0.3.2.0",
|
||||
"RepoUrl": "https://github.com/Lharz/xiv-currency-alert",
|
||||
"DalamudApiLevel": 6,
|
||||
"ImageUrls": null,
|
||||
"IconUrl": null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user