初级玩家
![Rank: 2](static/image/common/star_level2.gif)
- 贡献度
- 0
- 金元
- 710
- 积分
- 71
- 精华
- 0
- 注册时间
- 2015-11-30
|
修改器在/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;
}
==============================================================
修改为:
![](https://att.3dmgame.com/outimg.jpg)
==============================================================
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;
} |
|