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_PtcG2C_LevelChangeNtf.cs | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs new file mode 100644 index 00000000..5b1325a8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs @@ -0,0 +1,38 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_PtcG2C_LevelChangeNtf + { + public static void Process(PtcG2C_LevelChangeNtf roPtc) + { + XRole player = XSingleton.singleton.Player; + bool flag = player == null; + if (!flag) + { + uint level = player.Attributes.Level; + XLevelUpStatusDocument specificDocument = XDocuments.GetSpecificDocument(XLevelUpStatusDocument.uuID); + specificDocument.CurLevel = roPtc.Data.level; + specificDocument.PreLevel = level; + specificDocument.Exp = roPtc.Data.exp; + specificDocument.MaxExp = roPtc.Data.maxexp; + bool flag2 = specificDocument.CurLevel > level; + if (flag2) + { + specificDocument.AttrID.Clear(); + specificDocument.AttrNewValue.Clear(); + specificDocument.AttrOldValue.Clear(); + for (int i = 0; i < roPtc.Data.attrid.Count; i++) + { + specificDocument.AttrID.Add(roPtc.Data.attrid[i]); + specificDocument.AttrOldValue.Add(roPtc.Data.attroldvalue[i]); + specificDocument.AttrNewValue.Add(roPtc.Data.attrnewvalue[i]); + } + } + XSingleton.singleton.AddLog("player levelup to ", roPtc.Data.level.ToString(), null, null, null, null, XDebugColor.XDebug_None); + specificDocument.CheckLevelUp(); + } + } + } +} -- cgit v1.1-26-g67d0