From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Process/Process_PtcG2C_ClientOnlyBuffNotify.cs | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ClientOnlyBuffNotify.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ClientOnlyBuffNotify.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ClientOnlyBuffNotify.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ClientOnlyBuffNotify.cs new file mode 100644 index 00000000..7204ce9f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ClientOnlyBuffNotify.cs @@ -0,0 +1,38 @@ +using System; +using KKSG; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_PtcG2C_ClientOnlyBuffNotify + { + public static void Process(PtcG2C_ClientOnlyBuffNotify roPtc) + { + XRole xrole = XSingleton.singleton.GetEntity(roPtc.Data.roleid) as XRole; + bool flag = !XEntity.ValideEntity(xrole); + if (!flag) + { + for (int i = 0; i < roPtc.Data.buffs.Count; i++) + { + XBuffAddEventArgs @event = XEventPool.GetEvent(); + Buff buff = roPtc.Data.buffs[i]; + @event.xBuffDesc.BuffID = buff.buffID; + @event.xBuffDesc.BuffLevel = buff.buffLevel; + @event.Firer = xrole; + @event.xBuffDesc.CasterID = roPtc.Data.casterid; + bool skillIDSpecified = buff.skillIDSpecified; + if (skillIDSpecified) + { + @event.xBuffDesc.SkillID = buff.skillID; + } + bool effecttimeSpecified = buff.effecttimeSpecified; + if (effecttimeSpecified) + { + @event.xBuffDesc.EffectTime = buff.effecttime; + } + XSingleton.singleton.FireEvent(@event); + } + } + } + } +} -- cgit v1.1-26-g67d0