muffin v6.15
This commit is contained in:
parent
84717c5024
commit
521c02e8b8
15 changed files with 71 additions and 65 deletions
|
@ -342,13 +342,13 @@ internal sealed class CombatController : IDisposable
|
|||
{
|
||||
for (int i = 0; i < complexCombatDatas.Count; i++)
|
||||
{
|
||||
if (!_currentFight.Data.CompletedComplexDatas.Contains(i) && (!flag || complexCombatDatas[i].IgnoreQuestMarker || address->NamePlateIconId != 0) && complexCombatDatas[i].DataId == battleNpc.DataId && (!complexCombatDatas[i].NameId.HasValue || complexCombatDatas[i].NameId == battleNpc.NameId))
|
||||
if (!_currentFight.Data.CompletedComplexDatas.Contains(i) && (!flag || complexCombatDatas[i].IgnoreQuestMarker || address->NamePlateIconId != 0) && complexCombatDatas[i].DataId == battleNpc.BaseId && (!complexCombatDatas[i].NameId.HasValue || complexCombatDatas[i].NameId == battleNpc.NameId))
|
||||
{
|
||||
return (Priority: 100, Reason: "CCD");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((!flag || address->NamePlateIconId != 0) && _currentFight.Data.KillEnemyDataIds.Contains(battleNpc.DataId))
|
||||
else if ((!flag || address->NamePlateIconId != 0) && _currentFight.Data.KillEnemyDataIds.Contains(battleNpc.BaseId))
|
||||
{
|
||||
return (Priority: 90, Reason: "KED");
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ internal sealed class CombatController : IDisposable
|
|||
}
|
||||
if (!flag4)
|
||||
{
|
||||
_logger.LogInformation("Moving to {TargetName} ({DataId}) to attack", gameObject.Name, gameObject.DataId);
|
||||
_logger.LogInformation("Moving to {TargetName} ({BaseId}) to attack", gameObject.Name, gameObject.BaseId);
|
||||
MovementController movementController = _movementController;
|
||||
int num4 = 1;
|
||||
List<Vector3> list = new List<Vector3>(num4);
|
||||
|
@ -453,7 +453,7 @@ internal sealed class CombatController : IDisposable
|
|||
}
|
||||
else
|
||||
{
|
||||
_logger.LogInformation("Moving to {TargetName} ({DataId}) to attack (with navmesh)", gameObject.Name, gameObject.DataId);
|
||||
_logger.LogInformation("Moving to {TargetName} ({BaseId}) to attack (with navmesh)", gameObject.Name, gameObject.BaseId);
|
||||
_movementController.NavigateTo(EMovementType.Combat, null, gameObject.Position, fly: false, sprint: false, num3 + num - 0.25f, float.MaxValue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ internal sealed class CommandHandler : IDisposable
|
|||
List<string> list3 = new List<string>();
|
||||
ExcelSheet<ChocoboTaxiStand> excelSheet = _dataManager.GetExcelSheet<ChocoboTaxiStand>();
|
||||
UIState* ptr = UIState.Instance();
|
||||
for (byte b2 = 0; b2 < ptr->ChocoboTaxiStandsBitmask.Length * 8; b2++)
|
||||
for (byte b2 = 0; b2 < ptr->UnlockedChocoboTaxiStandsBitmask.Length * 8; b2++)
|
||||
{
|
||||
if (ptr->IsChocoboTaxiStandUnlocked(b2))
|
||||
{
|
||||
|
|
|
@ -207,7 +207,7 @@ internal sealed class GatheringController : MiniTaskController<GatheringControll
|
|||
|
||||
public bool HasNodeDisappeared(GatheringNode node)
|
||||
{
|
||||
return !_objectTable.Any((IGameObject x) => x.ObjectKind == ObjectKind.GatheringPoint && x.IsTargetable && x.DataId == node.DataId);
|
||||
return !_objectTable.Any((IGameObject x) => x.ObjectKind == ObjectKind.GatheringPoint && x.IsTargetable && x.BaseId == node.DataId);
|
||||
}
|
||||
|
||||
private GatheringNode? FindNextTargetableNodeAndUpdateIndex(CurrentRequest currentRequest)
|
||||
|
@ -216,7 +216,7 @@ internal sealed class GatheringController : MiniTaskController<GatheringControll
|
|||
{
|
||||
int num = (currentRequest.CurrentIndex + i) % currentRequest.Nodes.Count;
|
||||
GatheringNode currentNode = currentRequest.Nodes[num];
|
||||
List<IGameObject> source = currentNode.Locations.Select((GatheringLocation x) => _objectTable.FirstOrDefault((IGameObject y) => currentNode.DataId == y.DataId && Vector3.Distance(x.Position, y.Position) < 0.1f)).ToList();
|
||||
List<IGameObject> source = currentNode.Locations.Select((GatheringLocation x) => _objectTable.FirstOrDefault((IGameObject y) => currentNode.DataId == y.BaseId && Vector3.Distance(x.Position, y.Position) < 0.1f)).ToList();
|
||||
if (source.Any((IGameObject x) => x == null))
|
||||
{
|
||||
currentRequest.CurrentIndex = (num + 1) % currentRequest.Nodes.Count;
|
||||
|
|
|
@ -513,37 +513,35 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
if (_startedQuest != null && !_questFunctions.IsQuestAccepted(_startedQuest.Quest.Id))
|
||||
{
|
||||
if (!_startedQuest.Quest.Info.IsRepeatable && !_questFunctions.IsQuestComplete(_startedQuest.Quest.Id) && _questFunctions.IsReadyToAcceptQuest(_startedQuest.Quest.Id))
|
||||
if (_questFunctions.IsQuestComplete(_startedQuest.Quest.Id))
|
||||
{
|
||||
_logger.LogInformation("Quest {QuestId} is ready to accept but not yet accepted, moving to next quest", _startedQuest.Quest.Id);
|
||||
SetNextQuest(_startedQuest.Quest);
|
||||
_logger.LogDebug("Quest {QuestId} is complete, clearing started quest", _startedQuest.Quest.Id);
|
||||
_startedQuest = null;
|
||||
return;
|
||||
}
|
||||
if (_startedQuest.Quest.Info.IsRepeatable)
|
||||
else
|
||||
{
|
||||
if (!_startedQuest.Quest.Info.IsRepeatable)
|
||||
{
|
||||
_logger.LogInformation("Quest {QuestId} was abandoned, clearing started quest", _startedQuest.Quest.Id);
|
||||
(ElementId, byte)? tuple = (from x in ManualPriorityQuests
|
||||
where _questFunctions.IsReadyToAcceptQuest(x.Id)
|
||||
select ((ElementId Id, byte))(Id: x.Id, 0)).FirstOrDefault();
|
||||
if (tuple.HasValue)
|
||||
{
|
||||
(ElementId, byte) valueOrDefault = tuple.GetValueOrDefault();
|
||||
if ((object)valueOrDefault.Item1 != null && _questRegistry.TryGetQuest(valueOrDefault.Item1, out Quest quest))
|
||||
{
|
||||
_logger.LogInformation("Setting priority quest {QuestId} as next quest", valueOrDefault.Item1);
|
||||
SetNextQuest(quest);
|
||||
}
|
||||
}
|
||||
_startedQuest = null;
|
||||
Stop("Quest abandoned");
|
||||
return;
|
||||
}
|
||||
_logger.LogInformation("Repeatable quest {QuestId} is no longer accepted, clearing started quest", _startedQuest.Quest.Id);
|
||||
_startedQuest = null;
|
||||
}
|
||||
else if (!_questFunctions.IsQuestComplete(_startedQuest.Quest.Id))
|
||||
{
|
||||
_logger.LogInformation("Quest {QuestId} was abandoned, clearing started quest", _startedQuest.Quest.Id);
|
||||
(ElementId, byte)? tuple = (from x in ManualPriorityQuests
|
||||
where _questFunctions.IsReadyToAcceptQuest(x.Id)
|
||||
select ((ElementId Id, byte))(Id: x.Id, 0)).FirstOrDefault();
|
||||
if (tuple.HasValue)
|
||||
{
|
||||
(ElementId, byte) valueOrDefault = tuple.GetValueOrDefault();
|
||||
if ((object)valueOrDefault.Item1 != null && _questRegistry.TryGetQuest(valueOrDefault.Item1, out Quest quest))
|
||||
{
|
||||
_logger.LogInformation("Setting priority quest {QuestId} as next quest", valueOrDefault.Item1);
|
||||
SetNextQuest(quest);
|
||||
}
|
||||
}
|
||||
_startedQuest = null;
|
||||
Stop("Quest abandoned");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_simulatedQuest == null && _nextQuest != null && !((!_nextQuest.Quest.Info.IsRepeatable) ? (!_questFunctions.IsQuestAcceptedOrComplete(_nextQuest.Quest.Id)) : (!_questFunctions.IsQuestAccepted(_nextQuest.Quest.Id))))
|
||||
{
|
||||
|
@ -616,7 +614,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
if ((object)valueOrDefault2.Item1 != null)
|
||||
{
|
||||
(elementId, b) = valueOrDefault2;
|
||||
goto IL_08b5;
|
||||
goto IL_084c;
|
||||
}
|
||||
}
|
||||
Quest quest2 = ManualPriorityQuests.FirstOrDefault((Quest x) => _questFunctions.IsReadyToAcceptQuest(x.Id));
|
||||
|
@ -626,7 +624,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
SetNextQuest(quest2);
|
||||
return;
|
||||
}
|
||||
goto IL_08b5;
|
||||
goto IL_084c;
|
||||
}
|
||||
questProgress = _startedQuest;
|
||||
b = _startedQuest.Sequence;
|
||||
|
@ -673,8 +671,8 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
}
|
||||
}
|
||||
goto IL_0be5;
|
||||
IL_0be5:
|
||||
goto IL_0b7c;
|
||||
IL_0b7c:
|
||||
if (questProgress == null)
|
||||
{
|
||||
DebugState = "No quest active";
|
||||
|
@ -733,7 +731,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
DebugState = null;
|
||||
}
|
||||
return;
|
||||
IL_08b5:
|
||||
IL_084c:
|
||||
if (elementId == null || elementId.Value == 0)
|
||||
{
|
||||
if (_startedQuest != null)
|
||||
|
@ -793,7 +791,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
}
|
||||
questProgress = _startedQuest;
|
||||
}
|
||||
goto IL_0be5;
|
||||
goto IL_0b7c;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue