mirror of https://github.com/hykilpikonna/AquaDX
[+] Log user ID on login
parent
39dc6c576a
commit
b7c5d18df1
|
@ -302,6 +302,7 @@
|
|||
<Compile Include="Performance\ImproveLoadSpeed.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Utils\LogUserId.cs" />
|
||||
<Compile Include="UX\CustomPlaceName.cs" />
|
||||
<Compile Include="UX\CustomVersionString.cs" />
|
||||
<Compile Include="UX\DemoMaster.cs" />
|
||||
|
|
|
@ -69,3 +69,7 @@ SkipVersionCheck=true
|
|||
RemoveEncryption=true
|
||||
ForceAsServer=true
|
||||
ForceFreePlay=true
|
||||
|
||||
[Utils]
|
||||
# Log user ID on login
|
||||
LogUserId=false
|
||||
|
|
|
@ -85,3 +85,7 @@ RemoveEncryption=true
|
|||
# 如果要配置店内招募的话,应该要把这个关闭
|
||||
ForceAsServer=true
|
||||
ForceFreePlay=true
|
||||
|
||||
[Utils]
|
||||
# 登录时将 UserID 输出到日志
|
||||
LogUserId=false
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace AquaMai
|
|||
public CheatConfig Cheat { get; set; }
|
||||
public PerformanceConfig Performance { get; set; }
|
||||
public FixConfig Fix { get; set; }
|
||||
public UtilsConfig Utils { get; set; }
|
||||
|
||||
public class CheatConfig
|
||||
{
|
||||
|
@ -55,5 +56,10 @@ namespace AquaMai
|
|||
public bool ForceAsServer { get; set; } = true;
|
||||
public bool ForceFreePlay { get; set; } = true;
|
||||
}
|
||||
|
||||
public class UtilsConfig
|
||||
{
|
||||
public bool LogUserId { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using HarmonyLib;
|
||||
using MelonLoader;
|
||||
using Net.Packet;
|
||||
using Net.Packet.Mai2;
|
||||
using Net.VO.Mai2;
|
||||
|
||||
namespace AquaMai.Utils;
|
||||
|
||||
public class LogUserId
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PacketGetUserPreview), MethodType.Constructor, typeof(ulong), typeof(string), typeof(Action<ulong, UserPreviewResponseVO>), typeof(Action<PacketStatus>))]
|
||||
public static void Postfix(ulong userId)
|
||||
{
|
||||
MelonLogger.Msg($"UserLogin: {userId}");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue