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