少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
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
48
49
50
51
52
53
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Friday, December 28, 2018
//--------------------------------------------------------
using System;
using System.Collections.Generic;
 
using vnxbqy.UI;
 
namespace vnxbqy.UI
{
    
 
    //对手信息
    public class OpponentInformation : Singleton<OpponentInformation>
    {
        public int PlayerID { get; private set; }     // 玩家ID
        public int ExAttr4 { get; private set; }    // 当前护盾值
 
        public event Action<int, int> ShieldUpdate;//玩家ID和护盾刷新
 
        public void GetOpponentInformation0418(H0418_tagObjInfoRefresh info)
        {
 
            switch ((PlayerDataType)info.RefreshType)
            {
                case PlayerDataType.ExAttr4:
                    this.PlayerID = (int)info.ObjID;
                    this.ExAttr4 = (int)info.Value;
                    if (ShieldUpdate != null)
                    {
                        ShieldUpdate((int)info.ObjID, (int)info.Value);
                    }
                    break;
                default:
                    break;
            }
        }
        public void GetOpponentInformation0434(H0434_tagAreaPlayerAppearEx info)
        {
            this.PlayerID = (int)info.PlayerID;
            this.ExAttr4 = (int)info.ExAttr4;
            if (ShieldUpdate != null)
            {
                ShieldUpdate((int)info.PlayerID, (int)info.ExAttr4);
            }
        }
    }
 
}