Remove old code

This commit is contained in:
Liza 2024-06-14 01:27:40 +02:00
parent b9887c07af
commit 55d8daef93
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -159,7 +159,6 @@ internal sealed class GameUiController : IDisposable
int questSelection = answers.FindIndex(x => GameStringEquals(questName, x)); int questSelection = answers.FindIndex(x => GameStringEquals(questName, x));
if (questSelection >= 0) if (questSelection >= 0)
addonSelectIconString->AtkUnitBase.FireCallbackInt(questSelection); addonSelectIconString->AtkUnitBase.FireCallbackInt(questSelection);
return;
} }
} }
@ -267,14 +266,13 @@ internal sealed class GameUiController : IDisposable
{ {
var sequence = quest.FindSequence(currentQuest.Sequence); var sequence = quest.FindSequence(currentQuest.Sequence);
if (sequence != null && HandleDefaultYesNo(addonSelectYesno, quest, if (sequence != null && HandleDefaultYesNo(addonSelectYesno, quest,
sequence.Steps.SelectMany(x => x.DialogueChoices).ToList(), actualPrompt, checkAllSteps)) sequence.Steps.SelectMany(x => x.DialogueChoices).ToList(), actualPrompt))
return; return;
} }
else else
{ {
var step = quest.FindSequence(currentQuest.Sequence)?.FindStep(currentQuest.Step); var step = quest.FindSequence(currentQuest.Sequence)?.FindStep(currentQuest.Step);
if (step != null && HandleDefaultYesNo(addonSelectYesno, quest, step.DialogueChoices, actualPrompt, if (step != null && HandleDefaultYesNo(addonSelectYesno, quest, step.DialogueChoices, actualPrompt))
checkAllSteps))
return; return;
} }
@ -282,7 +280,7 @@ internal sealed class GameUiController : IDisposable
} }
private unsafe bool HandleDefaultYesNo(AddonSelectYesno* addonSelectYesno, Quest quest, private unsafe bool HandleDefaultYesNo(AddonSelectYesno* addonSelectYesno, Quest quest,
IList<DialogueChoice> dialogueChoices, string actualPrompt, bool checkAllSteps) IList<DialogueChoice> dialogueChoices, string actualPrompt)
{ {
_logger.LogTrace("DefaultYesNo: Choice count: {Count}", dialogueChoices.Count); _logger.LogTrace("DefaultYesNo: Choice count: {Count}", dialogueChoices.Count);
foreach (var dialogueChoice in dialogueChoices) foreach (var dialogueChoice in dialogueChoices)
@ -329,7 +327,6 @@ internal sealed class GameUiController : IDisposable
if (sequence == null) if (sequence == null)
return; return;
bool increaseStepCount = true;
QuestStep? step = sequence.FindStep(currentQuest.Step); QuestStep? step = sequence.FindStep(currentQuest.Step);
if (step != null) if (step != null)
_logger.LogTrace("Current step: {CurrentTerritory}, {TargetTerritory}", step.TerritoryId, _logger.LogTrace("Current step: {CurrentTerritory}, {TargetTerritory}", step.TerritoryId,
@ -339,7 +336,6 @@ internal sealed class GameUiController : IDisposable
{ {
_logger.LogTrace("TravelYesNo: Checking previous step..."); _logger.LogTrace("TravelYesNo: Checking previous step...");
step = sequence.FindStep(currentQuest.Step == 255 ? (sequence.Steps.Count - 1) : (currentQuest.Step - 1)); step = sequence.FindStep(currentQuest.Step == 255 ? (sequence.Steps.Count - 1) : (currentQuest.Step - 1));
increaseStepCount = false;
if (step != null) if (step != null)
_logger.LogTrace("Previous step: {CurrentTerritory}, {TargetTerritory}", step.TerritoryId, _logger.LogTrace("Previous step: {CurrentTerritory}, {TargetTerritory}", step.TerritoryId,
@ -365,8 +361,6 @@ internal sealed class GameUiController : IDisposable
_logger.LogInformation("Using warp {Id}, {Prompt}", entry.RowId, excelPrompt); _logger.LogInformation("Using warp {Id}, {Prompt}", entry.RowId, excelPrompt);
addonSelectYesno->AtkUnitBase.FireCallbackInt(0); addonSelectYesno->AtkUnitBase.FireCallbackInt(0);
//if (increaseStepCount)
//_questController.IncreaseStepCount();
return; return;
} }
} }