mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-12 20:50:44 -05:00
Added assaultGroup check to isBoss code inside CustomAiPatch
This commit is contained in:
parent
a5f8ee494e
commit
da0da8b0ab
@ -63,7 +63,8 @@ namespace SPT.Custom.Patches
|
||||
}
|
||||
|
||||
// Is a boss bot and not already handled above
|
||||
if (___botOwner_0.Profile.Info.Settings.IsBoss()
|
||||
if (___botOwner_0.Profile.Info.Settings.IsBoss()
|
||||
&& !BotHasAssaultGroupRole(___botOwner_0)
|
||||
&& !isPlayerScav
|
||||
&& !isNormalAssaultScav
|
||||
&& !isSptPmc)
|
||||
@ -91,8 +92,8 @@ namespace SPT.Custom.Patches
|
||||
/// <returns>WildSpawnType</returns>
|
||||
private static WildSpawnType FixAssaultGroupPmcsRole(BotOwner botOwner)
|
||||
{
|
||||
// Is PMC
|
||||
if (botOwner.Profile.Info.IsStreamerModeAvailable && botOwner.Profile.Info.Settings.Role == WildSpawnType.assaultGroup)
|
||||
// Is PMC + set to assaultGroup
|
||||
if (botOwner.Profile.Info.IsStreamerModeAvailable && BotHasAssaultGroupRole(botOwner))
|
||||
{
|
||||
Logger.LogError($"Broken PMC found: {botOwner.Profile.Nickname}, was {botOwner.Profile.Info.Settings.Role}");
|
||||
|
||||
@ -106,6 +107,11 @@ namespace SPT.Custom.Patches
|
||||
return botOwner.Profile.Info.Settings.Role;
|
||||
}
|
||||
|
||||
private static bool BotHasAssaultGroupRole(BotOwner botOwner)
|
||||
{
|
||||
return botOwner.Profile.Info.Settings.Role == WildSpawnType.assaultGroup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Revert prefix change, get bots type back to what it was before changes
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user