diff --git a/project/Aki.Custom/Patches/CheckAndAddEnemyPatch.cs b/project/Aki.Custom/Patches/CheckAndAddEnemyPatch.cs
index ffe4fea..1dee66c 100644
--- a/project/Aki.Custom/Patches/CheckAndAddEnemyPatch.cs
+++ b/project/Aki.Custom/Patches/CheckAndAddEnemyPatch.cs
@@ -17,6 +17,9 @@ namespace Aki.Custom.Patches
private static MethodInfo _addEnemy;
private readonly string _targetMethodName = "CheckAndAddEnemy";
+ ///
+ /// BotGroupClass.CheckAndAddEnemy()
+ ///
public CheckAndAddEnemyPatch()
{
_targetType = PatchConstants.EftTypes.Single(IsTargetType);
@@ -47,7 +50,7 @@ namespace Aki.Custom.Patches
/// removes the !player.AIData.IsAI check
///
[PatchPrefix]
- private static bool PatchPrefix(object __instance, ref IAIDetails player, ref bool ignoreAI)
+ private static bool PatchPrefix(BotGroupClass __instance, IAIDetails player, ref bool ignoreAI, Dictionary ___Enemies)
{
//var side = (EPlayerSide)_sideField.GetValue(__instance);
//var botType = (WildSpawnType)_spawnTypeField.GetValue(__instance);
@@ -57,15 +60,15 @@ namespace Aki.Custom.Patches
return false; // do nothing and skip
}
- var enemies = (Dictionary)_enemiesField.GetValue(__instance);
- if (enemies.ContainsKey(player))
+ if (!___Enemies.ContainsKey(player))
{
- return false;// do nothing and skip
+ __instance.AddEnemy(player);
}
// Add enemy to list
//if (!enemies.ContainsKey(player) && (!playerIsAi || ignoreAI))
- _addEnemy.Invoke(__instance, new IAIDetails[] { player });
+ //_addEnemy.Invoke(__instance, new IAIDetails[] { player });
+
return false;
}
diff --git a/project/Aki.SinglePlayer/Models/Progression/LighthouseProgressionClass.cs b/project/Aki.SinglePlayer/Models/Progression/LighthouseProgressionClass.cs
index 3be5a38..094fefc 100644
--- a/project/Aki.SinglePlayer/Models/Progression/LighthouseProgressionClass.cs
+++ b/project/Aki.SinglePlayer/Models/Progression/LighthouseProgressionClass.cs
@@ -15,7 +15,7 @@ namespace Aki.SinglePlayer.Models.Progression
private bool _playerFlaggedAsEnemyToBosses;
private List _bridgeMines;
private RecodableItemClass _transmitter;
- private List _zryachiyAndFollowers = new List();
+ private readonly List _zryachiyAndFollowers = new List();
private bool _aggressor;
private bool _isDoorDisabled;
private readonly string _transmitterId = "62e910aaf957f2915e0a5e36";
@@ -158,7 +158,7 @@ namespace Aki.SinglePlayer.Models.Progression
if (player1?.KillerId == _player?.ProfileId)
{
_aggressor = true;
- _player?.Profile.TradersInfo[_lightKeeperTid].SetStanding(-0.01f);
+ _player?.Profile.TradersInfo[_lightKeeperTid].SetStanding(-0.01);
}
};