mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-12 22:30:44 -05:00
Further chagnes for lighthouse bosses
This commit is contained in:
parent
3b1e7cf509
commit
e6eeedf007
@ -17,6 +17,9 @@ namespace Aki.Custom.Patches
|
||||
private static MethodInfo _addEnemy;
|
||||
private readonly string _targetMethodName = "CheckAndAddEnemy";
|
||||
|
||||
/// <summary>
|
||||
/// BotGroupClass.CheckAndAddEnemy()
|
||||
/// </summary>
|
||||
public CheckAndAddEnemyPatch()
|
||||
{
|
||||
_targetType = PatchConstants.EftTypes.Single(IsTargetType);
|
||||
@ -47,7 +50,7 @@ namespace Aki.Custom.Patches
|
||||
/// removes the !player.AIData.IsAI check
|
||||
/// </summary>
|
||||
[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<IAIDetails, BotSettingsClass> ___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<IAIDetails, BotSettingsClass>)_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;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ namespace Aki.SinglePlayer.Models.Progression
|
||||
private bool _playerFlaggedAsEnemyToBosses;
|
||||
private List<MineDirectionalColliders> _bridgeMines;
|
||||
private RecodableItemClass _transmitter;
|
||||
private List<IAIDetails> _zryachiyAndFollowers = new List<IAIDetails>();
|
||||
private readonly List<IAIDetails> _zryachiyAndFollowers = new List<IAIDetails>();
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user