mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -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 static MethodInfo _addEnemy;
|
||||||
private readonly string _targetMethodName = "CheckAndAddEnemy";
|
private readonly string _targetMethodName = "CheckAndAddEnemy";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// BotGroupClass.CheckAndAddEnemy()
|
||||||
|
/// </summary>
|
||||||
public CheckAndAddEnemyPatch()
|
public CheckAndAddEnemyPatch()
|
||||||
{
|
{
|
||||||
_targetType = PatchConstants.EftTypes.Single(IsTargetType);
|
_targetType = PatchConstants.EftTypes.Single(IsTargetType);
|
||||||
@ -47,7 +50,7 @@ namespace Aki.Custom.Patches
|
|||||||
/// removes the !player.AIData.IsAI check
|
/// removes the !player.AIData.IsAI check
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PatchPrefix]
|
[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 side = (EPlayerSide)_sideField.GetValue(__instance);
|
||||||
//var botType = (WildSpawnType)_spawnTypeField.GetValue(__instance);
|
//var botType = (WildSpawnType)_spawnTypeField.GetValue(__instance);
|
||||||
@ -57,15 +60,15 @@ namespace Aki.Custom.Patches
|
|||||||
return false; // do nothing and skip
|
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
|
// Add enemy to list
|
||||||
//if (!enemies.ContainsKey(player) && (!playerIsAi || ignoreAI))
|
//if (!enemies.ContainsKey(player) && (!playerIsAi || ignoreAI))
|
||||||
_addEnemy.Invoke(__instance, new IAIDetails[] { player });
|
//_addEnemy.Invoke(__instance, new IAIDetails[] { player });
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace Aki.SinglePlayer.Models.Progression
|
|||||||
private bool _playerFlaggedAsEnemyToBosses;
|
private bool _playerFlaggedAsEnemyToBosses;
|
||||||
private List<MineDirectionalColliders> _bridgeMines;
|
private List<MineDirectionalColliders> _bridgeMines;
|
||||||
private RecodableItemClass _transmitter;
|
private RecodableItemClass _transmitter;
|
||||||
private List<IAIDetails> _zryachiyAndFollowers = new List<IAIDetails>();
|
private readonly List<IAIDetails> _zryachiyAndFollowers = new List<IAIDetails>();
|
||||||
private bool _aggressor;
|
private bool _aggressor;
|
||||||
private bool _isDoorDisabled;
|
private bool _isDoorDisabled;
|
||||||
private readonly string _transmitterId = "62e910aaf957f2915e0a5e36";
|
private readonly string _transmitterId = "62e910aaf957f2915e0a5e36";
|
||||||
@ -158,7 +158,7 @@ namespace Aki.SinglePlayer.Models.Progression
|
|||||||
if (player1?.KillerId == _player?.ProfileId)
|
if (player1?.KillerId == _player?.ProfileId)
|
||||||
{
|
{
|
||||||
_aggressor = true;
|
_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