using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
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: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("CustomGenerationMenKe")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CustomGenerationMenKe")]
[assembly: AssemblyTitle("CustomGenerationMenKe")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace MenKeConverter;
[BepInPlugin("cs.HoLMod.CustomGenerationMenKe.AnZhi20", "HoLMod.CustomGenerationMenKe", "1.2.0")]
public class CustomGenerationMenKe : BaseUnityPlugin
{
private ConfigEntry<float> menuWidth;
private ConfigEntry<float> menuHeight;
private ConfigEntry<string> menKeSalary;
private ConfigEntry<string> MenKeMaxSkillPoints;
private static Rect windowRect;
private static bool showMenu = false;
private static bool blockGameInput = false;
private static Vector2 scrollPosition;
private const string A1 = ",";
private const string A2 = "|";
private const string A3 = "null";
private const string A4 = "M13";
private const string A5 = "0";
private const string A6 = "-1";
private const string Assignment = "100";
private string Talent_Points = "0";
private string Skill_Points = "0";
private string Alentin = "空";
private string Skillsin = "空";
private int generateCount = 1;
private string statusMessage = "准备就绪";
private int customAge = 18;
private static readonly List<string> After = (from i in Enumerable.Range(1, 19)
select i.ToString()).ToList();
private static readonly List<string> Body = (from i in Enumerable.Range(1, 29)
select i.ToString()).ToList();
private static readonly List<string> Face = (from i in Enumerable.Range(1, 2)
select i.ToString()).ToList();
private static readonly List<string> Before = (from i in Enumerable.Range(1, 19)
select i.ToString()).ToList();
private static readonly List<string> BeforeRandom = (from i in Enumerable.Range(1, 9)
select i.ToString()).ToList();
private static readonly List<string> Lifespan = new List<string>
{
"57", "58", "60", "62", "63", "64", "67", "68", "72", "73",
"74", "75", "79", "80", "82"
};
private static readonly List<string> Personality = (from i in Enumerable.Range(1, 6)
select i.ToString()).ToList();
private static readonly List<string> Remuneration = new List<string>
{
"200", "320", "460", "560", "680", "720", "760", "800", "920", "940",
"1000", "1080", "1100", "1120", "1160", "1500", "1640", "2160", "2500"
};
private static readonly List<string> Surname = new List<string>
{
"谭", "钱", "文", "金", "顾", "姜", "张", "宋", "王", "郭",
"谢", "赵", "邓", "苏", "范", "魏", "余", "白", "贾", "郝",
"崔", "钟", "方", "于", "丁", "康", "冯", "李", "许", "孙",
"邵", "田", "陆", "孔", "汤", "黎", "林", "孟", "杨", "马",
"梁", "高", "朱", "常", "卢", "徐", "段", "武", "戴", "尹",
"薛", "郑", "廖", "任", "邱", "龚", "刘", "万", "贺", "秦",
"吕", "黄", "沈", "罗", "毛", "蔡", "吴", "易", "萧", "汪",
"姚", "潘", "雷", "江", "傅", "胡", "乔", "侯", "曹", "叶",
"彭", "蒋", "程", "董", "何", "袁", "周", "熊", "陈", "唐",
"杜", "夏"
};
private static readonly List<string> Namenan = new List<string>
{
"德", "浩", "乐", "华", "和", "锦", "博", "天", "弘", "飞",
"阳", "文", "景", "振", "高", "宜", "运", "俊", "学", "宏",
"意", "彭", "锐", "力", "欣", "志", "耘", "安", "光", "向",
"涵", "雅", "鸿", "昊", "恺", "令", "星", "正", "项", "敏",
"海", "睿", "咏", "骞", "泰", "修", "鹏", "永", "丰", "烨",
"黎", "英", "兴", "蕴", "成", "玉", "昆", "长", "展", "元",
"新", "智", "康", "骏", "伟", "雨", "建", "澎", "勇", "宾",
"承", "宇", "瀚", "昌", "哲", "震", "波", "嘉", "佑", "毅",
"自", "翰", "良", "同", "远", "茂", "致", "经", "温", "维",
"思", "泽", "濮", "明", "苑", "昂", "坚", "凯", "绍", "允",
"庆", "信", "职", "奇", "彦", "祺", "作", "君", "刚", "晨",
"曦", "彬", "寅", "卓", "峻", "立", "斌", "辰", "国", "斯",
"心", "曜", "驰", "巍", "雪", "季", "胤", "朋", "旭", "冠",
"浦", "炫", "皓", "翔", "溥", "风", "稷", "琪", "开", "晟",
"书", "颜", "理", "晗", "池", "昶", "程", "延", "禄", "逸",
"中", "煦", "荣", "寒", "然", "诚", "义", "容", "爽", "辉",
"专", "涛", "澜", "灿", "亮", "盛", "健", "苍", "生", "歌",
"锋", "汉", "魄", "赋", "阵", "青", "禹", "怿", "民", "叡",
"贤", "福", "翱", "羽", "磊", "昕", "澄", "业", "山", "琦",
"平", "武", "觉", "量", "魁", "超", "雄", "沉", "飒", "楚",
"淼", "湃", "基", "采", "白", "宁", "硕", "壮", "恩", "化",
"朗", "宕", "荫", "畅", "旻", "用", "慨", "玥", "熙", "圣",
"琛", "厚", "轩", "懿", "拔", "珍", "畴", "渊", "言", "达",
"甲", "春", "通", "洲", "木", "焱", "邈", "筠", "濯", "旷",
"衍", "深", "利", "冰", "举", "存", "晖", "燎", "祯", "真",
"钧", "图", "发", "枫", "鸥", "耀", "勤", "美", "载", "云",
"纬", "豪", "鑫", "祥", "彩", "舒", "济", "甫", "莱", "章",
"翼", "广", "石", "之", "郁", "腾", "名", "瑜", "墨", "弼",
"蔚", "纶", "北", "实", "格", "钊", "仁", "映", "年", "秋",
"卿", "勋", "望", "杰", "禧", "栋", "庸", "典", "烁", "宝",
"迈", "聪", "朝", "峰", "洁", "赡", "清", "寰", "航", "谊",
"语", "宣", "嗣", "茗", "羲", "邦", "尧", "为", "颂", "霖",
"峯", "初", "赐", "骥", "赫", "穹", "捷", "舟", "锟", "龙",
"煊", "津", "知", "河", "薄", "怀", "空", "忍", "裕", "林",
"行", "晋", "彰", "材", "楠", "路", "益", "鹍", "懋", "惬",
"誉", "旺", "卉", "树", "亘", "东", "精", "藏", "邃", "钰",
"阔", "易", "璧", "润", "艺", "伯", "湛", "胜", "铄", "群",
"日", "穰", "源", "策", "梓", "寿", "默", "尘", "慈"
};
private static readonly List<string> Namenv = new List<string>
{
"清", "嘉", "逸", "平", "雪", "安", "琛", "思", "初", "静",
"慧", "淑", "晨", "岚", "涵", "秀", "翠", "琳", "绮", "代",
"欢", "夜", "以", "悦", "心", "书", "半", "和", "妙", "梓",
"天", "飞", "山", "丹", "萍", "昕", "绿", "芫", "雅", "冰",
"灵", "玲", "尔", "念", "婉", "蔓", "欣", "雯", "娅", "轩",
"千", "新", "寄", "吉", "笑", "芷", "芝", "晴", "醉", "谷",
"智", "觅", "湛", "绣", "芳", "幼", "惜", "米", "凝", "鸣",
"紫", "雨", "合", "莹", "丝", "含", "凡", "今", "珍", "舒",
"听", "兰", "语", "格", "梦", "怡", "丽", "易", "忆", "艳",
"雁", "晓", "香", "宛", "古", "润", "如", "碧", "媛", "水",
"望", "霞", "子", "秋", "巧", "从", "驰", "玛", "沛", "寒",
"友", "诗", "迎", "瑾", "慕", "春", "畅", "依", "明", "任",
"琬", "采", "白", "菱", "亦", "素", "冷", "盼", "云", "献",
"家", "幻", "星", "柔", "忻", "宜", "可", "冬", "芃", "向",
"美", "北", "问", "娟", "长", "言", "红", "寻", "运", "元",
"孤", "瑜", "惠", "英", "斐", "隽", "洛", "蕴", "奕", "典",
"妞", "夏", "琼", "南", "晶", "梅", "月", "杰", "浩", "熙",
"弘", "朵", "河", "密", "若", "梧", "燕", "君", "暄", "修",
"玉", "恬", "好", "芮", "洁", "玮", "菁", "施", "松", "芸",
"彦", "哲", "映", "情", "湘", "彤", "彩", "品", "轶", "菀",
"布", "华", "茉", "偲", "琲", "琴", "湉", "佳", "青", "音",
"歌", "喜", "贝", "晗", "怿", "方", "怀", "乐", "杏", "浓",
"楚", "悠", "流", "皓", "苇", "馨", "洮", "仪", "端", "韵",
"之", "倩", "沙", "淳", "朝", "沈", "令", "蓓", "贞", "蓉",
"骏", "芬", "琇", "娴", "齐", "彗", "金", "雍", "蝶", "笛",
"真", "心", "淑", "美", "晓", "荷", "云", "蓝", "雅", "丽",
"贤", "风", "岚", "绿", "阳", "溪", "南", "天", "悦", "霁",
"卉", "冬", "怡", "宜", "雁", "雪", "静", "梦", "蓓", "媛",
"兰", "英", "琴", "韵", "丹", "月", "竹", "华", "春", "妍",
"柏", "珊", "双", "秋", "然", "槐", "蕾", "枫", "凡", "清",
"菁", "笑", "玟", "慧", "秀", "素", "梅", "灵", "桃", "寒",
"蝶", "波", "惠", "玉", "宸", "晴", "娟", "蓉", "菱", "远",
"帆", "莉", "彤", "乐", "馨", "意", "容", "琇", "卓", "翠",
"琪", "爱", "巧", "雨", "莲", "豫", "芹", "泽", "涵", "蕊",
"格", "易", "洁", "语", "珠", "逸", "芳", "露", "凝", "和",
"瑶", "曦", "辞", "微", "菡", "文", "丝", "欣", "白", "青",
"莹", "暖", "霜", "薇", "芬", "荣", "煦", "恩", "星", "真",
"山", "飞", "若", "婕", "歌", "妙", "慕", "松", "旋", "楠",
"愉", "燕", "芃", "安", "怀", "蕙", "辰", "娥", "绮", "宁",
"萱", "夏", "柔", "俊", "宇", "旭", "苗", "君", "敏", "义",
"娴", "畅", "骄", "妞", "之", "烟", "辉", "茵", "香", "朗",
"芙", "颖", "思", "臻", "桐", "冰", "婷", "舞", "珏", "艺",
"亦", "璟", "琲", "欢", "奇", "霏", "晨", "照", "红", "艳",
"仪", "艾", "嘉", "霞", "珺", "恺", "芝", "菀", "采", "偲",
"湉", "佳", "筠", "融", "蔓", "农", "虹", "诗", "可", "念",
"彩", "音", "丰", "明", "如", "画", "洮", "瑜", "婉", "珑",
"暎", "优", "昕", "阑", "婧", "枝", "花"
};
private static readonly List<string> Alent = new List<string> { "空", "文", "武", "商", "艺" };
private static readonly List<string> Skills = new List<string> { "空", "巫", "医", "相", "卜", "魅", "工" };
private int selectedSex = 0;
private int selectedAlent = 0;
private int selectedSkill = 0;
private void Awake()
{
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Expected O, but got Unknown
menuWidth = ((BaseUnityPlugin)this).Config.Bind<float>("窗口设置(Window Settings)", "窗口宽度(Menu Width)", 400f, "修改器主菜单宽度");
menuHeight = ((BaseUnityPlugin)this).Config.Bind<float>("窗口设置(Window Settings)", "窗口高度(Menu Height)", 700f, "修改器主菜单高度");
menKeSalary = ((BaseUnityPlugin)this).Config.Bind<string>("门客设置(MenKe Settings)", "门客月薪(MenKe Salary)", "50000", "门客的属性都这样了,月薪50k不过分吧?当然你也可以修改一下让门客当黑奴!(注意:门客的月薪不能超过100w,因为它不值这个价)");
MenKeMaxSkillPoints = ((BaseUnityPlugin)this).Config.Bind<string>("门客设置(MenKe Settings)", "门客超模技能点(MenKe Max Skill Points)", "10", "门客属性点,默认值为10");
windowRect = new Rect(20f, 20f, menuWidth.Value, menuHeight.Value);
Harmony val = new Harmony("CustomGenerationMenKe");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"门客自定义生成器已加载!");
}
private void Update()
{
if (Input.GetKeyDown((KeyCode)282))
{
ToggleMenu();
}
if (Input.GetKeyDown((KeyCode)27) && showMenu)
{
CloseMenu();
}
if (blockGameInput)
{
Input.ResetInputAxes();
}
}
private void ToggleMenu()
{
showMenu = !showMenu;
blockGameInput = showMenu;
}
private void CloseMenu()
{
showMenu = false;
blockGameInput = false;
}
private void OnGUI()
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Expected O, but got Unknown
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
if (showMenu)
{
windowRect = GUI.Window(0, windowRect, new WindowFunction(DrawWindow), "门客自定义生成器", GUI.skin.window);
}
}
private void DrawWindow(int windowID)
{
//IL_036d: Unknown result type (might be due to invalid IL or missing references)
//IL_0385: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
GUILayout.Space(10f);
GUILayout.Label("状态: " + statusMessage, GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(50f) });
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("门客性别:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) });
selectedSex = GUILayout.Toolbar(selectedSex, new string[2] { "女", "男" }, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("门客天赋:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) });
selectedAlent = GUILayout.SelectionGrid(selectedAlent, Alent.ToArray(), 3, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("门客技能:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) });
selectedSkill = GUILayout.SelectionGrid(selectedSkill, Skills.ToArray(), 3, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("门客年龄:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) });
customAge = (int)GUILayout.HorizontalSlider((float)customAge, 18f, 60f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) });
GUILayout.Label(customAge.ToString(), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) });
GUILayout.EndHorizontal();
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.Label("生成数量:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) });
string s = GUILayout.TextField(generateCount.ToString(), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) });
if (int.TryParse(s, out var result))
{
generateCount = Mathf.Clamp(result, 1, 1000);
}
GUILayout.EndHorizontal();
GUILayout.Space(20f);
if (GUILayout.Button("实时添加到游戏", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) }))
{
if (generateCount < 1 || generateCount > 1000)
{
statusMessage = "错误: 生成数量必须在1到1000之间!";
((BaseUnityPlugin)this).Logger.LogWarning((object)("生成数量超出范围: " + generateCount));
}
else if (customAge < 18 || customAge > 60)
{
statusMessage = "错误: 门客年龄必须在18到60之间!";
((BaseUnityPlugin)this).Logger.LogWarning((object)("门客年龄超出范围: " + customAge));
}
else
{
RealTimeAddMenKeData();
}
}
GUILayout.Space(20f);
GUILayout.Label("使用说明:", GUI.skin.box, Array.Empty<GUILayoutOption>());
scrollPosition = GUILayout.BeginScrollView(scrollPosition, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(210f) });
GUILayout.Label("1. 请在点击添加前先保存游戏,以便回档", Array.Empty<GUILayoutOption>());
GUILayout.Label("2. 按F1键显示 / 隐藏菜单", Array.Empty<GUILayoutOption>());
GUILayout.Label("3. 选择门客性别、天赋和技能", Array.Empty<GUILayoutOption>());
GUILayout.Label("4. 选择门客年龄", Array.Empty<GUILayoutOption>());
GUILayout.Label("5. 输入要生成的门客数量", Array.Empty<GUILayoutOption>());
GUILayout.Label("6. 点击'实时添加到游戏'按钮直接添加到当前游戏中", Array.Empty<GUILayoutOption>());
GUILayout.Label("7. 本mod作者:AnZhi20", Array.Empty<GUILayoutOption>());
GUILayout.Label("8. 本mod版本:1.2.0", Array.Empty<GUILayoutOption>());
GUILayout.EndScrollView();
GUILayout.EndVertical();
GUI.DragWindow();
}
private void RealTimeAddMenKeData()
{
try
{
statusMessage = "正在生成门客数据...";
((BaseUnityPlugin)this).Logger.LogInfo((object)"开始实时添加门客数据");
List<string> list = new List<string>();
for (int i = 0; i < generateCount; i++)
{
string text = (Random.Range(1000000, 9999999) + DateTime.Now.Ticks).ToString();
((BaseUnityPlugin)this).Logger.LogInfo((object)$"生成门客 {i + 1}/{generateCount},随机ID: {text}");
string text2 = Surname[Random.Range(0, Surname.Count)];
string text3 = Before[Random.Range(0, Before.Count)];
string text4 = After[Random.Range(0, After.Count)];
string text5 = Body[Random.Range(0, Body.Count)];
string text6 = Face[Random.Range(0, Face.Count)];
string text7 = BeforeRandom[Random.Range(0, BeforeRandom.Count)];
string text8 = Random.Range(16, 50).ToString();
string text9 = Personality[Random.Range(0, Personality.Count)];
string text10 = Lifespan[Random.Range(0, Lifespan.Count)];
string item = "50000";
if (int.TryParse(menKeSalary.Value, out var result) && result >= 0 && result <= 1000000)
{
item = result.ToString();
}
if (int.TryParse(menKeSalary.Value, out var result2))
{
item = ((result2 < 0) ? "50000" : ((result2 <= 1000000) ? result2.ToString() : "50000"));
}
string text11;
string text12;
if (selectedSex == 1)
{
text11 = Namenan[Random.Range(0, Namenan.Count)];
text12 = Namenan[Random.Range(0, Namenan.Count)];
}
else
{
text11 = Namenv[Random.Range(0, Namenv.Count)];
text12 = Namenv[Random.Range(0, Namenv.Count)];
}
switch (Alent[selectedAlent])
{
case "空":
Alentin = "0";
Talent_Points = "0";
break;
case "文":
Alentin = "1";
Talent_Points = "100";
break;
case "武":
Alentin = "2";
Talent_Points = "100";
break;
case "商":
Alentin = "3";
Talent_Points = "100";
break;
case "艺":
Alentin = "4";
Talent_Points = "100";
break;
default:
Alentin = "0";
Talent_Points = "0";
break;
}
switch (Skills[selectedSkill])
{
case "空":
Skillsin = "0";
Skill_Points = "0";
break;
case "巫":
Skillsin = "1";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
case "医":
Skillsin = "2";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
case "相":
Skillsin = "3";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
case "卜":
Skillsin = "4";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
case "魅":
Skillsin = "5";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
case "工":
Skillsin = "6";
Skill_Points = MenKeMaxSkillPoints.Value;
break;
default:
Skillsin = "0";
Skill_Points = "0";
break;
}
string item2 = "M13" + text;
string text13 = text4 + "|" + text5 + "|" + text6 + "|" + text3;
string item3 = string.Format("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}{17}{18}{19}{20}", text2, text11, text12, "|", text7, "|", Alentin, "|", Talent_Points, "|", selectedSex, "|", text10, "|", Skillsin, "|", "100", "|", text9, "|", "null");
string item4 = customAge.ToString();
string item5 = "100";
string text14 = "0|null|null";
string text15 = "0";
((BaseUnityPlugin)this).Logger.LogInfo((object)("检查Mainload.MenKe_Now是否为空: " + ((Mainload.MenKe_Now == null) ? "是" : "否")));
if (Mainload.MenKe_Now == null)
{
continue;
}
((BaseUnityPlugin)this).Logger.LogInfo((object)("检查Mainload.HanMenMemberData_Click是否为空: " + ((Mainload.HanMenMemberData_Click == null) ? "是" : "否")));
string text16 = "0";
if (Mainload.HanMenMemberData_Click != null)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Mainload.HanMenMemberData_Click.Count = {Mainload.HanMenMemberData_Click.Count}");
if (Mainload.HanMenMemberData_Click.Count > 18)
{
text16 = Mainload.HanMenMemberData_Click[18];
((BaseUnityPlugin)this).Logger.LogInfo((object)("获取HanMenMemberData_Click[18] = " + text16));
}
}
Mainload.MenKe_Now.Add(new List<string>
{
item2, text13, item3, item4, item5, item5, item5, item5, item5, "0|null|null",
"0", item5, text16, item5, item5, item5, Skill_Points, "-1", item, item5,
"0", "null"
});
((BaseUnityPlugin)this).Logger.LogInfo((object)("成功添加门客到游戏中:" + text13));
}
statusMessage = "正在添加到游戏中...";
if (Mainload.MenKe_Now != null)
{
statusMessage = $"成功添加 {generateCount} 条门客数据到游戏中";
return;
}
statusMessage = "游戏数据未加载,无法实时添加门客";
((BaseUnityPlugin)this).Logger.LogWarning((object)"Mainload.MenKe_Now 为空,无法实时添加门客");
}
catch (Exception ex)
{
statusMessage = "添加失败: " + ex.Message;
((BaseUnityPlugin)this).Logger.LogError((object)("实时添加门客失败: " + ex.Message));
((BaseUnityPlugin)this).Logger.LogError((object)("异常堆栈: " + ex.StackTrace));
}
}
}