private static void RequestLimit(WildSpawnType role) { string json = new Request(Session, BackendUrl).GetJson("/singleplayer/settings/bot/limit/" + role.ToString()); if (string.IsNullOrEmpty(json)) { Debug.LogError("SPTarkov.SinglePlayer: Received bot " + role.ToString() + " limit data is NULL, using fallback"); return; } Debug.LogError("SPTarkov.SinglePlayer: Successfully received bot " + role.ToString() + " limit data"); Limits[role] = Convert.ToInt32(json); }
private static void RequestDifficulty(WildSpawnType role, BotDifficulty botDifficulty, Difficulty difficulty) { string json = new Request(Session, BackendUrl).GetJson("/client/game/bot/difficulty/" + role.ToString() + "/" + botDifficulty.ToString()); if (string.IsNullOrEmpty(json)) { Debug.LogError("EmuTarkov.SinglePlayer: Received bot " + role.ToString() + " " + botDifficulty.ToString() + " difficulty data is NULL, using fallback"); return; } Debug.LogError("EmuTarkov.SinglePlayer: Sucessfully received bot " + role.ToString() + " " + botDifficulty.ToString() + " difficulty data"); difficulty.Json = json; }
public static bool Prefix(ref string __result, BotDifficulty botDifficulty, WildSpawnType role) { foreach (Difficulty difficulty in BotSettings.Difficulties) { if (difficulty.Role == role && difficulty.BotDifficulty == botDifficulty) { __result = difficulty.Json; } } if (string.IsNullOrEmpty(__result)) { return(true); } return(false); }
public Difficulty(WildSpawnType role, BotDifficulty botDifficulty, string json) { Role = role; BotDifficulty = botDifficulty; Json = json; }
public static void CalculateBotsCount(WildSpawnType type) { switch (type) { #region Switch cases WildSpawnType case WildSpawnType.assault: PlayerCounters.Table.assault++; break; case WildSpawnType.bossBully: PlayerCounters.Table.bossBully++; break; case WildSpawnType.bossGluhar: PlayerCounters.Table.bossGluhar++; break; case WildSpawnType.bossKilla: PlayerCounters.Table.bossKilla++; break; case WildSpawnType.bossKojaniy: PlayerCounters.Table.bossKojaniy++; break; case WildSpawnType.bossStormtrooper: PlayerCounters.Table.bossStormtrooper++; break; case WildSpawnType.bossTest: PlayerCounters.Table.bossTest++; break; case WildSpawnType.cursedAssault: PlayerCounters.Table.cursedAssault++; break; case WildSpawnType.followerBully: PlayerCounters.Table.followerBully++; break; case WildSpawnType.followerGluharAssault: PlayerCounters.Table.followerGluharAssault++; break; case WildSpawnType.followerGluharScout: PlayerCounters.Table.followerGluharScout++; break; case WildSpawnType.followerGluharSecurity: PlayerCounters.Table.followerGluharSecurity++; break; case WildSpawnType.followerGluharSnipe: PlayerCounters.Table.followerGluharSnipe++; break; case WildSpawnType.followerKojaniy: PlayerCounters.Table.followerKojaniy++; break; case WildSpawnType.followerStormtrooper: PlayerCounters.Table.followerStormtrooper++; break; case WildSpawnType.followerTest: PlayerCounters.Table.followerTest++; break; case WildSpawnType.marksman: PlayerCounters.Table.marksman++; break; case WildSpawnType.pmcBot: PlayerCounters.Table.pmcBot++; break; case WildSpawnType.test: PlayerCounters.Table.test++; break; default: break; #endregion } }