summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_LevelChangeNtf.cs38
1 files changed, 38 insertions, 0 deletions
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<XEntityMgr>.singleton.Player;
+ bool flag = player == null;
+ if (!flag)
+ {
+ uint level = player.Attributes.Level;
+ XLevelUpStatusDocument specificDocument = XDocuments.GetSpecificDocument<XLevelUpStatusDocument>(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<XDebug>.singleton.AddLog("player levelup to ", roPtc.Data.level.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ specificDocument.CheckLevelUp();
+ }
+ }
+ }
+}