muffin v6.35 with old pdb

This commit is contained in:
alydev 2025-10-29 06:52:53 +10:00
parent ac85599236
commit b5d2cc6708
31 changed files with 958 additions and 958 deletions

View file

@ -76,7 +76,7 @@ internal sealed class EventInfoComponent
public void Draw()
{
UpdateCacheIfNeeded();
foreach (IGrouping<string, IQuestInfo> item in _cachedActiveSeasonalQuests.GroupBy(delegate(IQuestInfo q)
foreach (IGrouping<string, IQuestInfo> tooltipText in _cachedActiveSeasonalQuests.GroupBy(delegate(IQuestInfo q)
{
if (q.QuestId is UnlockLinkId)
{
@ -89,11 +89,11 @@ internal sealed class EventInfoComponent
return q.JournalGenre.HasValue ? GetJournalGenreName(q.JournalGenre.Value) : q.Name;
}))
{
if (item.All((IQuestInfo q) => _questFunctions.IsQuestComplete(q.QuestId)))
if (tooltipText.All((IQuestInfo q) => _questFunctions.IsQuestComplete(q.QuestId)))
{
continue;
}
DateTime endsAtUtc = item.Select(delegate(IQuestInfo q)
DateTime quest = tooltipText.Select(delegate(IQuestInfo q)
{
DateTime? dateTime = (q as QuestInfo)?.SeasonalQuestExpiry ?? ((q is UnlockLinkQuestInfo unlockLinkQuestInfo) ? unlockLinkQuestInfo.QuestExpiry : ((DateTime?)null));
if (dateTime.HasValue)
@ -103,12 +103,12 @@ internal sealed class EventInfoComponent
}
return DateTime.MaxValue;
}).DefaultIfEmpty(DateTime.MaxValue).Min();
List<string> list = (from q in item
List<string> list = (from q in tooltipText
select (q as UnlockLinkQuestInfo)?.Patch into p
where !string.IsNullOrEmpty(p)
select p).Distinct().ToList();
string patch = ((list.Count == 1) ? list[0] : null);
EventQuest eventQuest = new EventQuest(item.Key, item.Select((IQuestInfo q) => q.QuestId).ToList(), endsAtUtc, patch);
EventQuest eventQuest = new EventQuest(tooltipText.Key, tooltipText.Select((IQuestInfo q) => q.QuestId).ToList(), quest, patch);
DrawEventQuest(eventQuest);
}
}
@ -117,10 +117,10 @@ internal sealed class EventInfoComponent
{
try
{
JournalGenre row = _dataManager.GetExcelSheet<JournalGenre>().GetRow(journalGenreId);
if (!row.Equals(default(JournalGenre)))
JournalGenre actualQuestInfo = _dataManager.GetExcelSheet<JournalGenre>().GetRow(journalGenreId);
if (!actualQuestInfo.Equals(default(JournalGenre)))
{
return row.Name.ExtractText();
return actualQuestInfo.Name.ExtractText();
}
}
catch (Exception exception)
@ -132,10 +132,10 @@ internal sealed class EventInfoComponent
private void DrawEventQuest(EventQuest eventQuest)
{
string text = eventQuest.Name;
string name = eventQuest.Name;
if (!string.IsNullOrEmpty(eventQuest.Patch))
{
text = text + " [" + eventQuest.Patch + "]";
name = name + " [" + eventQuest.Patch + "]";
}
if (eventQuest.EndsAtUtc != DateTime.MaxValue)
{
@ -145,21 +145,21 @@ internal sealed class EventInfoComponent
timeSpan = TimeSpan.Zero;
}
string value = FormatRemainingDays(timeSpan);
string text2 = FormatRemainingFull(timeSpan);
ImU8String text3 = new ImU8String(3, 2);
text3.AppendFormatted(text);
text3.AppendLiteral(" (");
text3.AppendFormatted(value);
text3.AppendLiteral(")");
ImGui.Text(text3);
string text = FormatRemainingFull(timeSpan);
ImU8String text2 = new ImU8String(3, 2);
text2.AppendFormatted(name);
text2.AppendLiteral(" (");
text2.AppendFormatted(value);
text2.AppendLiteral(")");
ImGui.Text(text2);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip(text2);
ImGui.SetTooltip(text);
}
}
else
{
ImGui.Text(text);
ImGui.Text(name);
}
List<ElementId> list = eventQuest.QuestIds.Where((ElementId x) => _questRegistry.IsKnownQuest(x) && _questFunctions.IsReadyToAcceptQuest(x) && x != _questController.StartedQuest?.Quest.Id && x != _questController.NextQuest?.Quest.Id).ToList();
foreach (ElementId questId in eventQuest.QuestIds)
@ -168,12 +168,12 @@ internal sealed class EventInfoComponent
{
continue;
}
ImU8String text3 = new ImU8String(21, 1);
text3.AppendLiteral("##EventQuestSelection");
text3.AppendFormatted(questId);
using (ImRaii.PushId(text3))
ImU8String text2 = new ImU8String(21, 1);
text2.AppendLiteral("##EventQuestSelection");
text2.AppendFormatted(questId);
using (ImRaii.PushId(text2))
{
string name = _questData.GetQuestInfo(questId).Name;
string name2 = _questData.GetQuestInfo(questId).Name;
if (list.Contains(questId) && _questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
@ -184,7 +184,7 @@ internal sealed class EventInfoComponent
bool num = ImGui.IsItemHovered();
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.Text(name);
ImGui.Text(name2);
if (num | ImGui.IsItemHovered())
{
_questTooltipComponent.Draw(quest.Info);
@ -194,7 +194,7 @@ internal sealed class EventInfoComponent
{
ImGui.SetCursorPosX(ImGui.GetCursorPosX());
(Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(questId);
if (_uiUtils.ChecklistItem(name, questStyle.Item1, questStyle.Item2, ImGui.GetStyle().FramePadding.X))
if (_uiUtils.ChecklistItem(name2, questStyle.Item1, questStyle.Item2, ImGui.GetStyle().FramePadding.X))
{
_questTooltipComponent.Draw(_questData.GetQuestInfo(questId));
}
@ -424,14 +424,14 @@ internal sealed class EventInfoComponent
private static string FormatRemainingFull(TimeSpan remaining)
{
int num = (int)Math.Ceiling(Math.Max(0.0, remaining.TotalSeconds));
int num2 = num / 86400;
int value = num % 86400 / 3600;
int value2 = num % 3600 / 60;
int value3 = num % 60;
if (num2 < 1)
int errorCount = num / 86400;
int infoCount = num % 86400 / 3600;
int partsToRender = num % 3600 / 60;
int id = num % 60;
if (errorCount < 1)
{
return $"Ends in {value:D2}d {value2:D2}m {value3:D2}s";
return $"Ends in {infoCount:D2}d {partsToRender:D2}m {id:D2}s";
}
return $"Ends in {num2}d {value:D2}h {value2:D2}m {value3:D2}s";
return $"Ends in {errorCount}d {infoCount:D2}h {partsToRender:D2}m {id:D2}s";
}
}