From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../PTC/Process/Process_RpcC2G_ResetSkill.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ResetSkill.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ResetSkill.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ResetSkill.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ResetSkill.cs new file mode 100644 index 00000000..1244bb7e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ResetSkill.cs @@ -0,0 +1,59 @@ +using System; +using System.Reflection; +using KKSG; +using XMainClient.UI; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_RpcC2G_ResetSkill + { + public static void OnReply(ResetSkillArg oArg, ResetSkillRes oRes) + { + bool flag = oRes.errorcode == ErrorCode.ERR_INVALID_REQUEST; + if (flag) + { + string fullName = MethodBase.GetCurrentMethod().ReflectedType.FullName; + XSingleton.singleton.OnGetInvalidRequest(fullName); + } + else + { + bool flag2 = oRes.errorcode == ErrorCode.ERR_SUCCESS; + if (flag2) + { + bool flag3 = oArg.resetType == ResetType.RESET_PROFESSION; + if (flag3) + { + XSingleton.singleton.XPlayerData.Profession = oRes.prof; + XEntity entity = XSingleton.singleton.GetEntity(XSingleton.singleton.XPlayerData.RoleID); + bool flag4 = entity != null && entity.Attributes != null; + if (flag4) + { + entity.Attributes.Outlook.SetProfType(XSingleton.singleton.XPlayerData.TypeID); + entity.Attributes.Outlook.CalculateOutLookFashion(); + XEquipChangeEventArgs @event = XEventPool.GetEvent(); + @event.Firer = XSingleton.singleton.Player; + XSingleton.singleton.FireEvent(@event); + } + } + bool flag5 = DlgBase.singleton.LastSelectPromote > 1; + if (flag5) + { + DlgBase.singleton.LastSelectPromote = 1; + } + XSkillTreeDocument specificDocument = XDocuments.GetSpecificDocument(XSkillTreeDocument.uuID); + specificDocument.SkillRefresh(true, true); + } + else + { + XSingleton.singleton.ShowSystemTip(oRes.errorcode, "fece00"); + } + } + } + + public static void OnTimeout(ResetSkillArg oArg) + { + } + } +} -- cgit v1.1-26-g67d0