Skip to content

Instantly share code, notes, and snippets.

@Scrxtchy
Created September 20, 2025 14:36
Show Gist options
  • Select an option

  • Save Scrxtchy/c1ca788be2e9da80869eb76db0a85b34 to your computer and use it in GitHub Desktop.

Select an option

Save Scrxtchy/c1ca788be2e9da80869eb76db0a85b34 to your computer and use it in GitHub Desktop.
if (nullableItem is { LevelItem.RowId: > 0 })
{
var item = nullableItem.Value;
var se = GetTooltipString(stringArrayData, TooltipTweaks.ItemTooltipField.ItemLevel); // 27
//item.EquipSlotCategory;
var inv = InventoryManager.Instance()->GetInventoryContainer(InventoryType.EquippedItems);
if (Service.Data.Excel.GetSheet<Item>()!.TryGetRow(inv->GetInventorySlot((int)item.EquipSlotCategory.Value.RowId)->ItemId, out var eq))
{
//SimpleLog.Debug(se.TextValue +"/"+ eq.LevelItem.RowId);
var IL = Int32.Parse(string.Concat(se.TextValue.Where(Char.IsDigit).ToArray()));
if (IL == eq.LevelItem.RowId) return;
else
{
{
se.Payloads.Add(IL > eq.LevelItem.RowId ? new UIForegroundPayload(Green) : new UIForegroundPayload(Red));
se.Payloads.Add(new TextPayload($" {(IL > eq.LevelItem.RowId ? "+":"")}{ (IL - eq.LevelItem.RowId).ToString()}"));
se.Payloads.Add(new UIForegroundPayload(0));
SetTooltipString(stringArrayData, TooltipTweaks.ItemTooltipField.ItemLevel, se);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment