本帖最后由 erchioce 于 2019-1-25 18:07 编辑
不发工具,仅思路
以 波西亚时光 为例
修改器在/My Time At Portia/Portia_Data/Managed/Assembly-CSharp.dll 中注入ToGameModManagerNet 类来初始化修改器
类中方法private IEnumerator ToLogin() 中为登录方法
原方法
private IEnumerator ToLogin()
{
this.Button_注册.interactable = false;
this.Button_登录.interactable = false;
this.InputField_用户名.interactable = false;
this.InputField_密码.interactable = false;
System.Random random = new System.Random();
int validationCode = this.GetValidationCode(random.Next(10, 10000));
Debug.Log(validationCode);
string str = "http://www.togamemod.cn/config/default.php";
WWW www = new WWW(string.Format(str + "?username={0}&paswd={1}&chaozhuo=denglu&shuiji={2}", WWW.EscapeURL(this.InputField_用户名.text), WWW.EscapeURL(this.InputField_密码.text), validationCode));
yield return www;
if (www != null && string.IsNullOrEmpty(www.error))
{
string text = new Regex("[a-z0-9].*").Match(www.text).Value;
byte[] bytes = this.strToToHexByte(text);
text = Encoding.UTF8.GetString(bytes);
string[] array = text.Split(new char[]
{
'|'
});
if (array[0] == "err#01")
{
this.Text_登录提示.text = "用户不存在,请检查输入!";
}
if (array[0] == "err#02")
{
this.Text_登录提示.text = "密码错误,请检查输入!";
}
if (array[0] == "ok")
{
Debug.Log(array[1]);
base.StartCoroutine(this.SetUserAvatar(array[1]));
this.Text_用户名.text = this.InputField_用户名.text;
this.Text_用户组.text = this.GetGroupName(array[2]);
this.Text_爱心.text = "爱心:" + array[8];
this.Text_金币.text = "金币:" + array[6];
this.Text_贡献.text = "贡献:" + array[7];
this.Text_声望.text = "声望:" + array[5];
this.Panel_登录窗口.SetActive(false);
PlayerPrefs.SetString("ToUserName", this.InputField_用户名.text);
PlayerPrefs.SetString("ToPassWord", this.InputField_密码.text);
if (int.Parse(array[8]) >= 10)
{
this.Button_强行送礼一般.interactable = true;
this.Button_强行送礼不喜欢.interactable = true;
this.Button_强行送礼喜欢.interactable = true;
}
Debug.Log(this.Text_用户名.text + " | " + this.Text_用户组.text);
}
Debug.Log(text);
}
else
{
this.Text_登录提示.text = www.error;
Debug.Log(www.error);
}
this.Button_注册.interactable = true;
this.Button_登录.interactable = true;
this.InputField_用户名.interactable = true;
this.InputField_密码.interactable = true;
yield break;
}
修改为
private IEnumerator ToLogin()
{
this.Button_注册.interactable = false;
this.Button_登录.interactable = false;
this.InputField_用户名.interactable = false;
this.InputField_密码.interactable = false;
this.Text_用户名.text = "ercjul";
this.Text_用户组.text = "Cracked by ercjul from 52pojie.cn";
this.Text_爱心.text = "爱心:999";
this.Text_金币.text = "金币:999";
this.Text_贡献.text = "贡献:999";
this.Text_声望.text = "声望:999";
this.Panel_登录窗口.SetActive(false);
this.Button_强行送礼一般.interactable = true;
this.Button_强行送礼不喜欢.interactable = true;
this.Button_强行送礼喜欢.interactable = true;
yield break;
}
补图
未修改
修改后
补充
下dnspy改改就好了,都不用1分钟,这就没必要发工具了
这发了工具,淘宝转手5块6块我也看不爽
有人要写工具的话可以直接改番茄的安装工具 |