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_ReviveNotify.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ReviveNotify.cs (limited to 'Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ReviveNotify.cs') diff --git a/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ReviveNotify.cs b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ReviveNotify.cs new file mode 100644 index 00000000..7e823d07 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/PTC/Process/Process_PtcG2C_ReviveNotify.cs @@ -0,0 +1,47 @@ +using System; +using KKSG; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class Process_PtcG2C_ReviveNotify + { + public static void Process(PtcG2C_ReviveNotify roPtc) + { + XEntity entityConsiderDeath = XSingleton.singleton.GetEntityConsiderDeath(roPtc.Data.roleID); + bool flag = entityConsiderDeath == null; + if (!flag) + { + bool isPlayer = entityConsiderDeath.IsPlayer; + if (isPlayer) + { + XPlayer xplayer = entityConsiderDeath as XPlayer; + xplayer.Revive(); + } + else + { + XRole xrole = entityConsiderDeath as XRole; + xrole.Revive(); + } + XSingleton.singleton.AddGreenLog(string.Format("Revive type: {0}", roPtc.Data.type.ToString()), null, null, null, null, null); + bool flag2 = roPtc.Data.type == ReviveType.ReviveSprite; + if (flag2) + { + XAffiliate xaffiliate = null; + bool flag3 = entityConsiderDeath.Equipment != null; + if (flag3) + { + xaffiliate = entityConsiderDeath.Equipment.Sprite; + } + bool flag4 = xaffiliate != null; + if (flag4) + { + string value = XSingleton.singleton.GetValue("SpriteReviveFx"); + XSingleton.singleton.CreateAndPlay(value, xaffiliate.EngineObject, Vector3.zero, Vector3.one, 1f, true, 5f, true); + } + } + } + } + } +} -- cgit v1.1-26-g67d0