muffin v7.5.13
This commit is contained in:
parent
911ed68baa
commit
acf3e3cb18
69 changed files with 2731 additions and 1425 deletions
|
|
@ -261,6 +261,10 @@ internal sealed class CombatController : IDisposable
|
|||
SetTarget(gameObject3);
|
||||
}
|
||||
}
|
||||
if (_currentFight.Module is ItemUseModule { IsItemUseInProgress: not false })
|
||||
{
|
||||
return EStatus.InCombat;
|
||||
}
|
||||
if (_condition[ConditionFlag.InCombat])
|
||||
{
|
||||
_wasInCombat = true;
|
||||
|
|
@ -362,43 +366,39 @@ internal sealed class CombatController : IDisposable
|
|||
int num = 0;
|
||||
float num2 = float.MaxValue;
|
||||
bool flag5 = _logger.IsEnabled(LogLevel.Debug);
|
||||
foreach (IGameObject item in _objectTable)
|
||||
foreach (IGameObject item2 in _objectTable)
|
||||
{
|
||||
var (num3, text) = GetKillPriority(item, localPlayer);
|
||||
if (num3 <= 0)
|
||||
int item = GetKillPriority(item2, localPlayer).Priority;
|
||||
if (item <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (_losIgnoreList.TryGetValue(item.GameObjectId, out var value2))
|
||||
if (_losIgnoreList.TryGetValue(item2.GameObjectId, out var value2))
|
||||
{
|
||||
if (Environment.TickCount64 < value2)
|
||||
{
|
||||
if (flag5)
|
||||
{
|
||||
_logger.LogDebug("Target {Name} ({Id:X8}) skipped - LoS ignore list ({Remaining}ms left)", item.Name, item.GameObjectId, value2 - Environment.TickCount64);
|
||||
_logger.LogDebug("Target {Name} ({Id:X8}) skipped - LoS ignore list ({Remaining}ms left)", item2.Name, item2.GameObjectId, value2 - Environment.TickCount64);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
_losIgnoreList.Remove(item.GameObjectId);
|
||||
_losIgnoreList.Remove(item2.GameObjectId);
|
||||
if (flag5)
|
||||
{
|
||||
_logger.LogDebug("Target {Name} ({Id:X8}) - LoS ignore expired", item.Name, item.GameObjectId);
|
||||
_logger.LogDebug("Target {Name} ({Id:X8}) - LoS ignore expired", item2.Name, item2.GameObjectId);
|
||||
}
|
||||
}
|
||||
float num4 = Vector3.Distance(item.Position, value);
|
||||
if (flag5)
|
||||
float num3 = Vector3.Distance(item2.Position, value);
|
||||
if (item > num || (item == num && num3 < num2))
|
||||
{
|
||||
_logger.LogDebug("Target candidate: {Name} ({Id:X8}) BaseId={BaseId} Priority={Priority} ({Reason}) Distance={Distance:N1}", item.Name, item.GameObjectId, item.BaseId, num3, text, num4);
|
||||
}
|
||||
if (num3 > num || (num3 == num && num4 < num2))
|
||||
{
|
||||
gameObject = item;
|
||||
num = num3;
|
||||
num2 = num4;
|
||||
gameObject = item2;
|
||||
num = item;
|
||||
num2 = num3;
|
||||
}
|
||||
}
|
||||
ulong? num5 = gameObject?.GameObjectId;
|
||||
if (num5 != _lastTargetId)
|
||||
ulong? num4 = gameObject?.GameObjectId;
|
||||
if (num4 != _lastTargetId)
|
||||
{
|
||||
if (gameObject != null)
|
||||
{
|
||||
|
|
@ -408,7 +408,7 @@ internal sealed class CombatController : IDisposable
|
|||
{
|
||||
_logger.LogDebug("No valid target found");
|
||||
}
|
||||
_lastTargetId = num5;
|
||||
_lastTargetId = num4;
|
||||
}
|
||||
if (gameObject != null && num <= 15 && !_condition[ConditionFlag.InCombat])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ internal sealed class MovementController : IDisposable
|
|||
}
|
||||
else if ((vector4 - Destination.Position).Length() < Destination.StopDistance)
|
||||
{
|
||||
if (vector4.Y - Destination.Position.Y <= Destination.VerticalStopDistance)
|
||||
if (Math.Abs(vector4.Y - Destination.Position.Y) <= Destination.VerticalStopDistance)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1538,6 +1538,10 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
{
|
||||
return false;
|
||||
}
|
||||
if (_startedQuest != null && QuestFunctions.IsStartingCityOpeningQuest(_startedQuest.Quest.Id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ElementId elementId = (from x in _questFunctions.GetNextPriorityQuestsThatCanBeAccepted()
|
||||
where x.IsAvailable
|
||||
select x.QuestId).FirstOrDefault();
|
||||
|
|
|
|||
|
|
@ -103,15 +103,10 @@ internal sealed class QuestPriorityResolver
|
|||
QuestResolution valueOrDefault2 = questResolution.GetValueOrDefault();
|
||||
return ApplyQuestRedirects(valueOrDefault2);
|
||||
}
|
||||
uint territoryType = _clientState.TerritoryType;
|
||||
bool flag2 = territoryType - 181 <= 2;
|
||||
if (flag2 && flag && _configuration.General.MsqPriority != Configuration.EMsqPriorityMode.Manual)
|
||||
QuestId activeStartingCityOpeningQuest = _questFunctions.GetActiveStartingCityOpeningQuest();
|
||||
if ((object)activeStartingCityOpeningQuest != null && (_questFunctions.IsQuestAccepted(activeStartingCityOpeningQuest) || (flag && _configuration.General.MsqPriority != Configuration.EMsqPriorityMode.Manual)))
|
||||
{
|
||||
ElementId currentQuest = resolvedMsqQuest.CurrentQuest;
|
||||
if ((object)currentQuest != null && currentQuest.Value > 0 && !_questFunctions.IsQuestAccepted(currentQuest))
|
||||
{
|
||||
return QuestResolution.ForQuest(EQuestResolutionType.MsqImmediate, currentQuest, resolvedMsqQuest.Sequence, resolvedMsqQuest.State, $"Starting city opening MSQ {currentQuest}");
|
||||
}
|
||||
return QuestResolution.ForQuest(EQuestResolutionType.MsqImmediate, activeStartingCityOpeningQuest, _questFunctions.GetStartingCityOpeningSequence(activeStartingCityOpeningQuest), resolvedMsqQuest.State, $"Starting city opening MSQ {activeStartingCityOpeningQuest}");
|
||||
}
|
||||
questResolution = TryResolveInProgressClassQuest(valueOrDefault, resolvedMsqQuest.State);
|
||||
if (questResolution.HasValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue