using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ChangeEmotePage")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ChangeEmotePage")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c1d7618b-c7f7-4184-ac93-006b038e99d8")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.saphir.changeemotepage", "ChangeEmotePage", "1.0.0")]
[HarmonyPatch(typeof(EmoteWheel), "InitWheel")]
public class ChangeEmotePage : BaseUnityPlugin
{
private const string PluginGuid = "com.saphir.changeemotepage";
private static readonly HashSet<int> swappedWheels = new HashSet<int>();
private Harmony harmony;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
harmony = new Harmony("com.saphir.changeemotepage");
harmony.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"ChangeEmotePage loaded.");
}
private void OnDestroy()
{
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
[HarmonyPrefix]
private static void ChangePageOrder(EmoteWheel __instance)
{
if ((Object)(object)__instance == (Object)null || __instance.data == null || __instance.data.Length < 16)
{
return;
}
int instanceID = ((Object)__instance).GetInstanceID();
if (!swappedWheels.Contains(instanceID))
{
swappedWheels.Add(instanceID);
for (int i = 0; i < 8; i++)
{
EmoteWheelData val = __instance.data[i];
__instance.data[i] = __instance.data[i + 8];
__instance.data[i + 8] = val;
}
}
}
}