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_SkillLevelup.cs | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_SkillLevelup.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_SkillLevelup.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_SkillLevelup.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_SkillLevelup.cs new file mode 100644 index 00000000..888ad3d7 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_SkillLevelup.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_RpcC2G_SkillLevelup + { + public static void OnReply(SkillLevelupArg oArg, SkillLevelupRes oRes) + { + bool flag = oRes.errorcode == 257u; + if (flag) + { + string fullName = MethodBase.GetCurrentMethod().ReflectedType.FullName; + XSingleton.singleton.OnGetInvalidRequest(fullName); + } + else + { + bool flag2 = (ulong)oRes.errorcode == (ulong)((long)XFastEnumIntEqualityComparer.ToInt(ErrorCode.ERR_SUCCESS)); + if (flag2) + { + XSkillTreeDocument specificDocument = XDocuments.GetSpecificDocument(XSkillTreeDocument.uuID); + specificDocument.OnSkillLevelUp(oArg.skillHash); + uint skillLevel = XSingleton.singleton.XPlayerData.SkillLevelInfo.GetSkillLevel(oArg.skillHash); + bool flag3 = skillLevel == 1u; + if (flag3) + { + bool flag4 = specificDocument.IsPassiveSkill(oArg.skillHash); + bool flag5 = flag4; + if (flag5) + { + List skillRow = new List(); + XEmblemDocument specificDocument2 = XDocuments.GetSpecificDocument(XEmblemDocument.uuID); + bool flag6 = specificDocument2.IsEquipThisSkillEmblem(oArg.skillHash, ref skillRow); + bool flag7 = flag6; + if (flag7) + { + specificDocument.ShowTips(skillRow, true); + } + } + } + } + else + { + SkillList.RowData skillConfig = XSingleton.singleton.GetSkillConfig(oArg.skillHash, 0u); + bool flag8 = (ulong)oRes.errorcode == (ulong)((long)XFastEnumIntEqualityComparer.ToInt(ErrorCode.ERR_SKILL_POINT)) && skillConfig != null && skillConfig.IsAwake; + if (flag8) + { + XSingleton.singleton.ShowItemAccess(XFastEnumIntEqualityComparer.ToInt(ItemEnum.AWAKE_SKILL_POINT), null); + } + else + { + XSingleton.singleton.ShowSystemTip((ErrorCode)oRes.errorcode, "fece00"); + } + } + } + } + + public static void OnTimeout(SkillLevelupArg oArg) + { + } + } +} -- cgit v1.1-26-g67d0