mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Only add Z and follower to list if they dont exist already
Call `CheckAndAddEnemy` instead of `AddEnemy` - use additional checks
This commit is contained in:
parent
584215e2b4
commit
37e356c430
@ -7,6 +7,9 @@ namespace Aki.Custom.Patches
|
|||||||
{
|
{
|
||||||
public class OfflineRaidSettingsMenuPatch : ModulePatch
|
public class OfflineRaidSettingsMenuPatch : ModulePatch
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// RaidSettingsWindow.Show()
|
||||||
|
/// </summary>
|
||||||
protected override MethodBase GetTargetMethod()
|
protected override MethodBase GetTargetMethod()
|
||||||
{
|
{
|
||||||
var desiredType = typeof(RaidSettingsWindow);
|
var desiredType = typeof(RaidSettingsWindow);
|
||||||
|
@ -163,10 +163,13 @@ namespace Aki.SinglePlayer.Models.Progression
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Save bot to list for later access
|
// Save bot to list for later access
|
||||||
|
if (!_zryachiyAndFollowers.Contains(aiBot))
|
||||||
|
{
|
||||||
_zryachiyAndFollowers.Add(aiBot);
|
_zryachiyAndFollowers.Add(aiBot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Iterate over bots gathered from SetupZryachiyHostility()
|
/// Iterate over bots gathered from SetupZryachiyHostility()
|
||||||
@ -176,7 +179,7 @@ namespace Aki.SinglePlayer.Models.Progression
|
|||||||
// If player is a scav, they must be added to the bosses enemy list otherwise they wont kill them
|
// If player is a scav, they must be added to the bosses enemy list otherwise they wont kill them
|
||||||
foreach (var bot in _zryachiyAndFollowers)
|
foreach (var bot in _zryachiyAndFollowers)
|
||||||
{
|
{
|
||||||
bot.AIData.BotOwner.BotsGroup.AddEnemy(_player);
|
bot.AIData.BotOwner.BotsGroup.CheckAndAddEnemy(_player);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flag player was added to enemy list
|
// Flag player was added to enemy list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user