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_ChooseProfession.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ChooseProfession.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ChooseProfession.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ChooseProfession.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ChooseProfession.cs new file mode 100644 index 00000000..0a463332 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_RpcC2G_ChooseProfession.cs @@ -0,0 +1,54 @@ +using System; +using System.Reflection; +using KKSG; +using XMainClient.UI; +using XMainClient.UI.UICommon; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_RpcC2G_ChooseProfession + { + public static void OnReply(ChooseProfArg oArg, ChooseProfRes 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) + { + XSingleton.singleton.XPlayerData.Profession = oArg.prof; + int num = XFastEnumIntEqualityComparer.ToInt(XSingleton.singleton.XPlayerData.Profession); + XEntity entity = XSingleton.singleton.GetEntity(XSingleton.singleton.XPlayerData.RoleID); + bool flag3 = entity != null && entity.Attributes != null; + if (flag3) + { + entity.Attributes.Outlook.SetProfType((uint)num); + entity.Attributes.Outlook.CalculateOutLookFashion(); + XEquipChangeEventArgs @event = XEventPool.GetEvent(); + @event.Firer = XSingleton.singleton.Player; + XSingleton.singleton.FireEvent(@event); + } + bool flag4 = DlgBase.singleton.IsVisible(); + if (flag4) + { + DlgBase.singleton.SetAvatar(XSingleton.singleton.GetProfHeadIcon(num)); + } + XSkillTreeDocument specificDocument = XDocuments.GetSpecificDocument(XSkillTreeDocument.uuID); + specificDocument.CreateAndPlayFxFxFirework(); + specificDocument.SkillRefresh(true, true); + XSingleton.singleton.SwitchProf = true; + } + } + } + + public static void OnTimeout(ChooseProfArg oArg) + { + } + } +} -- cgit v1.1-26-g67d0