Skip to content

Commit

Permalink
ToString -> ExtractText
Browse files Browse the repository at this point in the history
someone help the germans
  • Loading branch information
Jaksuhn committed Nov 29, 2024
1 parent 59a1f6c commit 486c669
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion YesAlready/Features/RetainerItemTransferProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private static unsafe void AddonUpdate(AddonEvent eventType, AddonArgs addonInfo
if (!P.Active || !P.Config.RetainerTransferProgressConfirm) return;
if (!GenericHelpers.TryGetAddonMaster<AddonMaster.RetainerItemTransferProgress>(out var am)) return;

if (MemoryHelper.ReadSeStringNullTerminated(new nint(am.Base->AtkValues[0].String)).ToString() == Svc.Data.GetExcelSheet<Addon>().First(x => x.RowId == 13528).Text)
if (MemoryHelper.ReadSeStringNullTerminated(new nint(am.Base->AtkValues[0].String)).ExtractText() == Svc.Data.GetExcelSheet<Addon>().First(x => x.RowId == 13528).Text)
{
PluginLog.Debug("Closing Entrust Duplicates menu");
am.Close();
Expand Down
2 changes: 1 addition & 1 deletion YesAlready/Features/RetainerTaskResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected unsafe void AddonSetup(AddonEvent eventType, AddonArgs addonInfo)

if (GenericHelpers.TryGetAddonMaster<AddonMaster.RetainerTaskResult>(out var am))
{
var buttonText = am.ReassignButton->ButtonTextNode->NodeText.ToString();
var buttonText = am.ReassignButton->ButtonTextNode->NodeText.ExtractText();
if (buttonText == Svc.Data.GetExcelSheet<Addon>(Svc.ClientState.ClientLanguage).GetRow(2365).Text) // Recall
return;

Expand Down
2 changes: 1 addition & 1 deletion YesAlready/Features/SelectYesNo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected unsafe void AddonSetup(AddonEvent eventType, AddonArgs addonInfo)
if (P.Config.AutoCollectable && collectablePatterns.Any(text.Contains))
{
PluginLog.Debug($"AddonSelectYesNo: Entry is collectable");
var fish = GenericHelpers.FindRow<Item>(x => !x.Singular.IsEmpty && MemoryHelper.ReadSeStringNullTerminated(new nint(addon.Addon->AtkValues[15].String)).ExtractText().Contains(x.Singular.ToString(), StringComparison.InvariantCultureIgnoreCase));
var fish = GenericHelpers.FindRow<Item>(x => !x.Singular.IsEmpty && MemoryHelper.ReadSeStringNullTerminated(new nint(addon.Addon->AtkValues[15].String)).ExtractText().Contains(x.Singular.ExtractText(), StringComparison.InvariantCultureIgnoreCase));
if (fish != null)
{
PluginLog.Debug($"Detected fish [{fish}] {fish.Value.Name}");
Expand Down

0 comments on commit 486c669

Please sign in to comment.