blob: 7e823d078a2e9e6492e1308e7bbfb8f19c8e7a56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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<XEntityMgr>.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<XDebug>.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<XGlobalConfig>.singleton.GetValue("SpriteReviveFx");
XSingleton<XFxMgr>.singleton.CreateAndPlay(value, xaffiliate.EngineObject, Vector3.zero, Vector3.one, 1f, true, 5f, true);
}
}
}
}
}
}
|