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])
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue