Decompiled source of BuddySpawner v1.0.1
BuddySpawner.dll
Decompiled a month agousing System; using System.Collections; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; 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("BuddySpawner")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("BuddySpawner")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c783a5e5-0539-416a-be29-1774b98aacb0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace BuddySpawner; [BepInPlugin("com.buddy.spawner", "Buddy Spawner", "1.0.0")] public class BuddySpawnerMod : BaseUnityPlugin { private void Update() { if (Input.GetKeyDown((KeyCode)107)) { Debug.Log((object)"[BuddySpawner] ★★★ НАЖАТА K! ★★★"); ForceBuddySpawn(); } } private void ForceBuddySpawn() { GameObject obj = GameObject.Find("EventManager"); Component val = ((obj != null) ? obj.GetComponent("CL_EventManager") : null); if ((Object)(object)val != (Object)null) { Type type = ((object)val).GetType(); MethodInfo method = type.GetMethod("StartEventCommand", BindingFlags.Instance | BindingFlags.Public); if (method != null) { string[] array = new string[4] { "buddy", "DEN_Buddy", "BuddyEvent", "rare_buddy" }; string[] array2 = array; foreach (string text in array2) { Debug.Log((object)("[BuddySpawner] Пробуем запустить событие: " + text)); try { method.Invoke(val, new object[1] { new string[1] { text } }); Debug.Log((object)("[BuddySpawner] Вызван StartEventCommand с '" + text + "'")); } catch (Exception ex) { Debug.Log((object)("[BuddySpawner] Ошибка: " + ex.Message)); } } } object obj2 = Type.GetType("CL_AssetManager, Assembly-CSharp")?.GetMethod("GetFullCombinedAssetDatabase")?.Invoke(null, null); if (obj2 == null) { return; } FieldInfo field = obj2.GetType().GetField("sessionEvents"); if (!(field != null) || !(field.GetValue(obj2) is IEnumerable enumerable)) { return; } { foreach (object item in enumerable) { if (!(item.GetType().GetMethod("get_name")?.Invoke(item, null) is string text2) || !text2.ToLower().Contains("buddy")) { continue; } Debug.Log((object)("[BuddySpawner] Найдено событие: " + text2)); FieldInfo field2 = item.GetType().GetField("spawnSettings"); if (!(field2 != null)) { continue; } object value = field2.GetValue(item); if (value == null) { continue; } FieldInfo field3 = value.GetType().GetField("chance", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field3 != null && field3.FieldType == typeof(float)) { float num = (float)field3.GetValue(value); Debug.Log((object)$"[BuddySpawner] Текущий шанс: {num * 100f}%"); field3.SetValue(value, 1f); Debug.Log((object)"[BuddySpawner] Шанс изменён на 100%!"); MethodInfo method2 = type.GetMethod("StartEvent", BindingFlags.Static | BindingFlags.Public); if (method2 != null) { method2.Invoke(null, new object[1] { item }); Debug.Log((object)("[BuddySpawner] Событие " + text2 + " запущено!")); } } } return; } } Debug.Log((object)"[BuddySpawner] EventManager не найден!"); } }
plugins/BuddySpawner.dll
Decompiled a month agousing System; using System.Collections; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; 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("BuddySpawner")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("BuddySpawner")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c783a5e5-0539-416a-be29-1774b98aacb0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace BuddySpawner; [BepInPlugin("com.buddy.spawner", "Buddy Spawner", "1.0.0")] public class BuddySpawnerMod : BaseUnityPlugin { private void Update() { if (Input.GetKeyDown((KeyCode)107)) { Debug.Log((object)"[BuddySpawner] ★★★ НАЖАТА K! ★★★"); ForceBuddySpawn(); } } private void ForceBuddySpawn() { GameObject obj = GameObject.Find("EventManager"); Component val = ((obj != null) ? obj.GetComponent("CL_EventManager") : null); if ((Object)(object)val != (Object)null) { Type type = ((object)val).GetType(); MethodInfo method = type.GetMethod("StartEventCommand", BindingFlags.Instance | BindingFlags.Public); if (method != null) { string[] array = new string[4] { "buddy", "DEN_Buddy", "BuddyEvent", "rare_buddy" }; string[] array2 = array; foreach (string text in array2) { Debug.Log((object)("[BuddySpawner] Пробуем запустить событие: " + text)); try { method.Invoke(val, new object[1] { new string[1] { text } }); Debug.Log((object)("[BuddySpawner] Вызван StartEventCommand с '" + text + "'")); } catch (Exception ex) { Debug.Log((object)("[BuddySpawner] Ошибка: " + ex.Message)); } } } object obj2 = Type.GetType("CL_AssetManager, Assembly-CSharp")?.GetMethod("GetFullCombinedAssetDatabase")?.Invoke(null, null); if (obj2 == null) { return; } FieldInfo field = obj2.GetType().GetField("sessionEvents"); if (!(field != null) || !(field.GetValue(obj2) is IEnumerable enumerable)) { return; } { foreach (object item in enumerable) { if (!(item.GetType().GetMethod("get_name")?.Invoke(item, null) is string text2) || !text2.ToLower().Contains("buddy")) { continue; } Debug.Log((object)("[BuddySpawner] Найдено событие: " + text2)); FieldInfo field2 = item.GetType().GetField("spawnSettings"); if (!(field2 != null)) { continue; } object value = field2.GetValue(item); if (value == null) { continue; } FieldInfo field3 = value.GetType().GetField("chance", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field3 != null && field3.FieldType == typeof(float)) { float num = (float)field3.GetValue(value); Debug.Log((object)$"[BuddySpawner] Текущий шанс: {num * 100f}%"); field3.SetValue(value, 1f); Debug.Log((object)"[BuddySpawner] Шанс изменён на 100%!"); MethodInfo method2 = type.GetMethod("StartEvent", BindingFlags.Static | BindingFlags.Public); if (method2 != null) { method2.Invoke(null, new object[1] { item }); Debug.Log((object)("[BuddySpawner] Событие " + text2 + " запущено!")); } } } return; } } Debug.Log((object)"[BuddySpawner] EventManager не найден!"); } }