v1.0.2.7: Fix Mount/Companion/Emote tooltips on hotbars
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1256,6 +1256,57 @@ namespace HSUI.Interface.GeneralElements
|
||||
return ("Macro", "");
|
||||
}
|
||||
|
||||
if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.Mount)
|
||||
{
|
||||
var row = Plugin.DataManager.GetExcelSheet<Mount>()?.GetRow(slot.ActionId);
|
||||
if (row.HasValue)
|
||||
{
|
||||
string name = row.Value.Singular.ToString();
|
||||
string desc = "";
|
||||
try
|
||||
{
|
||||
var transient = Plugin.DataManager.GetExcelSheet<MountTransient>()?.GetRow(slot.ActionId);
|
||||
if (transient.HasValue)
|
||||
{
|
||||
string descRaw = transient.Value.Description.ToDalamudString().ToString();
|
||||
if (!string.IsNullOrEmpty(descRaw))
|
||||
desc = EncryptedStringsHelper.GetString(descRaw);
|
||||
}
|
||||
}
|
||||
catch { /* ignore */ }
|
||||
return (name, desc);
|
||||
}
|
||||
}
|
||||
|
||||
if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.Companion)
|
||||
{
|
||||
var row = Plugin.DataManager.GetExcelSheet<Companion>()?.GetRow(slot.ActionId);
|
||||
if (row.HasValue)
|
||||
{
|
||||
string name = row.Value.Singular.ToString();
|
||||
string desc = "";
|
||||
try
|
||||
{
|
||||
var transient = Plugin.DataManager.GetExcelSheet<CompanionTransient>()?.GetRow(slot.ActionId);
|
||||
if (transient.HasValue)
|
||||
{
|
||||
string descRaw = transient.Value.Description.ToDalamudString().ToString();
|
||||
if (!string.IsNullOrEmpty(descRaw))
|
||||
desc = EncryptedStringsHelper.GetString(descRaw);
|
||||
}
|
||||
}
|
||||
catch { /* ignore */ }
|
||||
return (name, desc);
|
||||
}
|
||||
}
|
||||
|
||||
if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.Emote)
|
||||
{
|
||||
var row = Plugin.DataManager.GetExcelSheet<Emote>()?.GetRow(slot.ActionId);
|
||||
if (row.HasValue)
|
||||
return (row.Value.Name.ToString(), "");
|
||||
}
|
||||
|
||||
if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.Item)
|
||||
{
|
||||
var row = Plugin.DataManager.GetExcelSheet<Item>()?.GetRow(slot.ActionId);
|
||||
|
||||
Reference in New Issue
Block a user