mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-12 00:27:26 +08:00
[F] SelectionDetail Font size
[RF] Move SelectionDetail to Utils [RF] Remove UrGui [RF] Refactor SelectionDetail
This commit is contained in:
47
AquaMai/Utils/LogNetworkErrors.cs
Normal file
47
AquaMai/Utils/LogNetworkErrors.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Diagnostics;
|
||||
using HarmonyLib;
|
||||
using Manager;
|
||||
using Manager.Operation;
|
||||
using MelonLoader;
|
||||
using Net.Packet;
|
||||
|
||||
namespace AquaMai.Utils;
|
||||
|
||||
public class LogNetworkErrors
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(Packet), "ProcImpl")]
|
||||
public static void Postfix(PacketState __result, Packet __instance)
|
||||
{
|
||||
if (__result == PacketState.Error)
|
||||
{
|
||||
MelonLogger.Msg($"[LogNetworkErrors] {__instance.Query.Api}: {__instance.Status}");
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(DataDownloader), "NotifyOffline")]
|
||||
public static void DataDownloader()
|
||||
{
|
||||
MelonLogger.Msg("[LogNetworkErrors] DataDownloader NotifyOffline");
|
||||
var stackTrace = new StackTrace();
|
||||
MelonLogger.Msg(stackTrace.ToString());
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(OnlineCheckInterval), "NotifyOffline")]
|
||||
public static void OnlineCheckInterval()
|
||||
{
|
||||
MelonLogger.Msg("[LogNetworkErrors] OnlineCheckInterval NotifyOffline");
|
||||
var stackTrace = new StackTrace();
|
||||
MelonLogger.Msg(stackTrace.ToString());
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(OperationManager), "IsAliveAimeServer", MethodType.Getter)]
|
||||
public static void IsAliveAimeServer(bool __result)
|
||||
{
|
||||
if (__result == false)
|
||||
MelonLogger.Msg($"[LogNetworkErrors] IsAliveAimeServer Is {__result}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user