Skip to content

Commit

Permalink
Fix getting into raid
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Nov 1, 2024
1 parent 6639232 commit 45746dd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 27 deletions.
13 changes: 12 additions & 1 deletion Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using EFT.Counters;
using EFT.EnvironmentEffect;
using EFT.Game.Spawning;
using EFT.GameTriggers;
using EFT.HealthSystem;
using EFT.Interactive;
using EFT.InventoryLogic;
Expand Down Expand Up @@ -1494,7 +1495,13 @@ public override async Task vmethod_1(BotControllerSettings controllerSettings, I
{
BotsPresets botsPresets = new(iSession, wavesSpawnScenario_0.SpawnWaves,
bossSpawnScenario.BossSpawnWaves, nonWavesSpawnScenario_0.GClass1622_0, false);
await botsPresets.TryLoadBotsProfilesOnStart();
List<WaveInfo> waveInfos = [];
LocationSettingsClass.Location.GClass1336 halloween = Location_0.Events.Halloween2024;
if (halloween != null && halloween.InfectionPercentage > 0)
{
waveInfos.AddRange(BotHalloweenWithZombies.GetProfilesOnStart());
}
await botsPresets.TryLoadBotsProfilesOnStart(waveInfos);
GClass888 botCreator = new(this, botsPresets, CreateBot);
BotZone[] botZones = LocationScene.GetAllObjects<BotZone>(false).ToArray();

Expand Down Expand Up @@ -1636,6 +1643,9 @@ public override async Task vmethod_1(BotControllerSettings controllerSettings, I
Logger.LogError("WeatherController was null!");
}

gameWorld.TriggersModule = gameObject.AddComponent<LocalClientTriggersModule>();
gameWorld.FillLampControllers();

WeatherReady = true;
OfflineRaidSettingsMenuPatch_Override.UseCustomWeather = false;

Expand Down Expand Up @@ -1675,6 +1685,7 @@ public override async Task vmethod_1(BotControllerSettings controllerSettings, I
}

bossSpawnScenario.Run(EBotsSpawnMode.Anyway);
botsController_0.EventsController.SpawnAction();

FikaPlugin.DynamicAI.SettingChanged += DynamicAI_SettingChanged;
FikaPlugin.DynamicAIRate.SettingChanged += DynamicAIRate_SettingChanged;
Expand Down
20 changes: 0 additions & 20 deletions Fika.Core/Coop/Patches/GClass3224_IsValid_Patch.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Fika.Core/Coop/Patches/GameWorld/GameWorld_Create_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override MethodBase GetTargetMethod()
}

[PatchPrefix]
public static bool Prefix(ref GameWorld __result, GameObject gameObject, PoolManager objectsFactory, EUpdateQueue updateQueue, string currentProfileId)
public static bool Prefix(ref GameWorld __result, GameObject gameObject, PoolManager objectsFactory, EUpdateQueue updateQueue, MongoID? currentProfileId)
{

if (!FikaBackendUtils.RequestFikaWorld)
Expand All @@ -37,7 +37,7 @@ public static bool Prefix(ref GameWorld __result, GameObject gameObject, PoolMan
return false;
}

private static GameWorld CreateHideoutWorld(GameObject gameObject, PoolManager objectsFactory, EUpdateQueue updateQueue, string currentProfileId)
private static GameWorld CreateHideoutWorld(GameObject gameObject, PoolManager objectsFactory, EUpdateQueue updateQueue, MongoID? currentProfileId)
{
HideoutGameWorld gameWorld = gameObject.AddComponent<HideoutGameWorld>();
Traverse gameWorldTraverse = Traverse.Create(gameWorld);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override MethodBase GetTargetMethod()
}

[PatchPrefix]
public static bool Prefix(ref Task __result, TarkovApplication __instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.TimeHasComeScreenClass timeHasComeScreenController,
public static bool Prefix(ref Task __result, TarkovApplication __instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.GClass3563 timeHasComeScreenController,
RaidSettings ____raidSettings, InputTree ____inputTree, GameDateTime ____localGameDateTime, float ____fixedDeltaTime, string ____backendUrl, MetricsEventsClass metricsEvents,
MetricsConfigClass metricsConfig, GameWorld gameWorld)
{
Expand All @@ -44,7 +44,7 @@ public static bool Prefix(ref Task __result, TarkovApplication __instance, TimeA
return false;
}

public static async Task CreateFikaGame(TarkovApplication instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.TimeHasComeScreenClass timeHasComeScreenController,
public static async Task CreateFikaGame(TarkovApplication instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.GClass3563 timeHasComeScreenController,
RaidSettings raidSettings, InputTree inputTree, GameDateTime localGameDateTime, float fixedDeltaTime, string backendUrl, MetricsEventsClass metricsEvents, MetricsConfigClass metricsConfig,
GameWorld gameWorld)
{
Expand Down
1 change: 0 additions & 1 deletion Fika.Core/FikaPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ private static void EnableFikaPatches()
new GClass1350_Constructor_Patch().Enable();
new AchievementsScreen_Show_Patch().Enable();
new AchievementView_Show_Patch().Enable();
new GClass3224_IsValid_Patch().Enable();
new GClass3299_ExceptAI_Patch().Enable();
new GClass1641_method_8_Patch().Enable();
new GrenadeClass_Init_Patch().Enable();
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/UI/Patches/AchievementView_Show_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AchievementView_Show_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(AchievementView).GetMethod("GInterface450.Show");
return typeof(AchievementView).GetMethod("GInterface466.Show");
}

[PatchPostfix]
Expand Down

0 comments on commit 45746dd

Please sign in to comment.