mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Update for 28375 + fixes (!47)
- Update GClass references - Fix incorrect method in InsuranceScreenPatch (Makes insurance screen actually show) - Fix incorrect method in Scav offline raid screen patch (Makes "Ready" from the practice screen start the raid) - Update hollowed.dll with one provided by Chomp Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: SPT-AKI/Modules#47 Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com> Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
89f3842ae9
commit
e3bdf9c1fd
@ -33,7 +33,7 @@ namespace Aki.Custom.Patches
|
||||
var player = Singleton<GameWorld>.Instance.MainPlayer;
|
||||
if (profileId == player?.Profile.Id)
|
||||
{
|
||||
GClass3104.Instance.CloseAllScreensForced();
|
||||
GClass3105.Instance.CloseAllScreensForced();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -17,8 +17,8 @@ namespace Aki.Custom.Patches
|
||||
public RagfairFeePatch()
|
||||
{
|
||||
// Remember to update prefix parameter if below lines are broken
|
||||
_ = nameof(GClass3066.IsAllSelectedItemSame);
|
||||
_ = nameof(GClass3066.AutoSelectSimilar);
|
||||
_ = nameof(GClass3067.IsAllSelectedItemSame);
|
||||
_ = nameof(GClass3067.AutoSelectSimilar);
|
||||
}
|
||||
|
||||
protected override MethodBase GetTargetMethod()
|
||||
@ -30,18 +30,18 @@ namespace Aki.Custom.Patches
|
||||
/// Calculate tax to charge player and send to server before the offer is sent
|
||||
/// </summary>
|
||||
/// <param name="___item_0">Item sold</param>
|
||||
/// <param name="___gclass3066_0">OfferItemCount</param>
|
||||
/// <param name="___gclass3067_0">OfferItemCount</param>
|
||||
/// <param name="___double_0">RequirementsPrice</param>
|
||||
/// <param name="___bool_0">SellInOnePiece</param>
|
||||
[PatchPrefix]
|
||||
private static void PatchPrefix(ref Item ___item_0, ref GClass3066 ___gclass3066_0, ref double ___double_0, ref bool ___bool_0)
|
||||
private static void PatchPrefix(ref Item ___item_0, ref GClass3067 ___gclass3067_0, ref double ___double_0, ref bool ___bool_0)
|
||||
{
|
||||
RequestHandler.PutJson("/client/ragfair/offerfees", new
|
||||
{
|
||||
id = ___item_0.Id,
|
||||
tpl = ___item_0.TemplateId,
|
||||
count = ___gclass3066_0.OfferItemCount,
|
||||
fee = Mathf.CeilToInt((float)GClass2083.CalculateTaxPrice(___item_0, ___gclass3066_0.OfferItemCount, ___double_0, ___bool_0))
|
||||
count = ___gclass3067_0.OfferItemCount,
|
||||
fee = Mathf.CeilToInt((float)GClass2084.CalculateTaxPrice(___item_0, ___gclass3067_0.OfferItemCount, ___double_0, ___bool_0))
|
||||
}
|
||||
.ToJson());
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace Aki.SinglePlayer.Patches.MainMenu
|
||||
//}
|
||||
|
||||
var desiredType = typeof(MainMenuController);
|
||||
var desiredMethod = desiredType.GetMethod("method_69", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
var desiredMethod = desiredType.GetMethod("method_71", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
Logger.LogDebug($"{this.GetType().Name} Type: {desiredType?.Name}");
|
||||
Logger.LogDebug($"{this.GetType().Name} Method: {desiredMethod?.Name}");
|
||||
|
@ -26,7 +26,7 @@ namespace Aki.SinglePlayer.Patches.Progression
|
||||
{
|
||||
var player = gameWorld.MainPlayer;
|
||||
|
||||
var questController = Traverse.Create(player).Field<GClass3200>("_questController").Value;
|
||||
var questController = Traverse.Create(player).Field<GClass3201>("_questController").Value;
|
||||
if (questController != null)
|
||||
{
|
||||
foreach (var quest in questController.Quests.ToList())
|
||||
|
@ -43,7 +43,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
||||
}
|
||||
|
||||
var inventoryController = Traverse.Create(player).Field<InventoryControllerClass>("_inventoryController").Value;
|
||||
GClass2767.Remove(accessCardItem, inventoryController, false, true);
|
||||
GClass2768.Remove(accessCardItem, inventoryController, false, true);
|
||||
}
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
||||
_ = nameof(TimeAndWeatherSettings.IsRandomWeather);
|
||||
_ = nameof(BotControllerSettings.IsScavWars);
|
||||
_ = nameof(WavesSettings.IsBosses);
|
||||
_ = GClass3163.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
||||
_ = GClass3164.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
||||
|
||||
var menuControllerType = typeof(MainMenuController);
|
||||
|
||||
@ -118,14 +118,14 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
||||
|
||||
// Get fields from MainMenuController.cs
|
||||
var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue<RaidSettings>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(GClass3163).ToLowerInvariant()}_0").GetValue<GClass3163>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(GClass3164).ToLowerInvariant()}_0").GetValue<GClass3164>();
|
||||
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3152(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3153(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
|
||||
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
|
||||
|
||||
// `MatchmakerOfflineRaidScreen` OnShowReadyScreen
|
||||
gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, "method_70");
|
||||
gclass.OnShowReadyScreen += (OfflineRaidAction)Delegate.CreateDelegate(typeof(OfflineRaidAction), menuController, "method_72");
|
||||
gclass.ShowScreen(EScreenState.Queued);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user