少年修仙传客户端代码仓库
client_Hale
2019-04-11 9f89e3be35da42eb9ccb44e6589d62f320aa444c
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
public class PlayerBaseData
{
    public ushort mainServerMapIdRecord = 0;
 
    public string AccID;    //_KEY_i_帐号名, 该角色所在的帐号的用户名
    public uint PlayerID;    //_IDT_
    public string PlayerName;    //size = 14
    public byte GMLevel;    //GM等级, 0:不是GM  >=1 : GM的等级
    public byte Job;    //职业, 
    public ushort LV;    //等级
    public uint ExpPoint;    //扩充经验点数
    public uint TotalExp;    //总经验
    public uint FamilyId;    //家族
    public string FamilyName;    //家族名称
    public uint diamond;    //仙玉
    public uint copper;    //铜钱
    public ulong allCopper { get { return (ulong)copper + (ulong)copperExtend * 100000000; } }
    public uint FightPoint;    //战斗值
    public ushort MapID;    //角色所在地图
    public ushort PosX;    //角色坐标
    public ushort PosY;
    public uint HP;    //当前HP
    public uint FreePoint;    //未分配点数
    public uint FreeSkillPoint;    //未分配的技能点
    public int STR;    //力量
    public int PNE;    //真元
    public int PHY;    //筋骨
    public int CON;    //体魄
    public string Setting;    //设定
    public byte AttackMode;    //攻击模式
    public byte FBID;    //fb id
    public byte realmLevel;    //旧服务端官阶,现项目用于境界
    public byte VIPLv;    //VIP等级
    public uint teamAutoOperateFlag;    //扩展属性2,各项目专用
    public int dungeonLineId;    // 副本线路id
    public uint shield;    //护盾值
    public uint CrossServerFlag;    //跨服标识,大于2标识在跨服状态,值是跨服地图的datamapid
    public uint copperExtend;    //扩展属性6,各项目专用
    public uint sp;    //扩展属性7,各项目专用
    public uint spExtend;    //扩展属性8,各项目专用
    public uint bubbleId;    //扩展属性10,各项目专用
    public uint ExAttr11;    //预留的扩展属性字段,用来存放项目特定的属性
    public uint ServerGroupId;    //服务器组ID
    public uint hangTime;//现为脱机挂剩余时间 23
    public uint faction; //阵营 107
    public uint coinPointTotal;//已充值金额,单位分 112
 
    public int BasicsMinimum;//基础最小攻击
    public int BasicsMaxAttack;//基础最大攻击
    public int BasicsLife;//基础生命
    public int BasicsDefense;//基础防御
    public int BasicsScoreAHit;//基础命中
    public int BasicsDodge;//基础闪避
    public uint equipShowSwitch;//装备显隐开关
    public int mater;//灵根属性——金
    public int wood;//灵根属性——木
    public int water;//灵根属性——水
    public int fire;//灵根属性——火
    public int earth;//灵根属性——土
    public long treasurePotentialSp
    {
        get
        {
            return spExtend * (long)100000000 + sp;
        }
    }
    public int godWeaponLV_1;
    public int godWeaponLV_2;
    public int godWeaponLV_3;
    public int godWeaponLV_4;
 
    public void UpdateData(H0102_tagCDBPlayer _serverInfo)
    {
        if (_serverInfo.socketType == ServerType.Main)
        {
            AccID = _serverInfo.AccID;
            PlayerID = _serverInfo.PlayerID;
            PlayerName = _serverInfo.PlayerName.Trim().Replace(" ", "");
            GMLevel = _serverInfo.GMLevel;
            Job = _serverInfo.Job;
            LV = _serverInfo.LV;
            ExpPoint = _serverInfo.ExpPoint;
            TotalExp = _serverInfo.TotalExp;
            FamilyId = _serverInfo.Family;
            FamilyName = _serverInfo.FamilyName.Trim().Replace(" ", "");
            diamond = _serverInfo.Gold;
            copper = _serverInfo.Silver;
            MapID = _serverInfo.MapID;
            mainServerMapIdRecord = MapID;
            PosX = _serverInfo.PosX;
            PosY = _serverInfo.PosY;
            FreePoint = _serverInfo.FreePoint;
            FreeSkillPoint = _serverInfo.FreeSkillPoint;
            STR = _serverInfo.STR;
            PNE = _serverInfo.PNE;
            PHY = _serverInfo.PHY;
            CON = _serverInfo.CON;
            Setting = _serverInfo.Setting;
            FBID = _serverInfo.FBID;
            teamAutoOperateFlag = _serverInfo.ExAttr2;
            dungeonLineId = (int)_serverInfo.ExAttr3;
            shield = _serverInfo.ExAttr4;
            CrossServerFlag = _serverInfo.ExAttr5;
            realmLevel = _serverInfo.OfficialRank;
            VIPLv = _serverInfo.VIPLv;
            copperExtend = _serverInfo.ExAttr6;
            sp = _serverInfo.ExAttr7;
            spExtend = _serverInfo.ExAttr8;
            bubbleId = _serverInfo.ExAttr10;
            ExAttr11 = _serverInfo.ExAttr11;
            ServerGroupId = _serverInfo.ExAttr13;
            hangTime = _serverInfo.HappyPoint;
            faction = _serverInfo.Faction;
            coinPointTotal = _serverInfo.ChangeCoinPointTotal;
            equipShowSwitch = _serverInfo.EquipShowSwitch;
            godWeaponLV_1 = (int)_serverInfo.ExAttr15;
            godWeaponLV_2 = (int)_serverInfo.ExAttr16;
            godWeaponLV_3 = (int)_serverInfo.ExAttr17;
            godWeaponLV_4 = (int)_serverInfo.ExAttr18;
        }
        else
        {
            PlayerName = _serverInfo.PlayerName.Trim().Replace(" ", "");
            MapID = _serverInfo.MapID;
            dungeonLineId = (int)_serverInfo.ExAttr3;
            FBID = _serverInfo.FBID;
            PosX = _serverInfo.PosX;
            PosY = _serverInfo.PosY;
        }
 
        if (CrossServerUtility.IsCrossServer())
        {
            if (_serverInfo.socketType == ServerType.CrossSever)
            {
                HP = _serverInfo.HP;
                AttackMode = _serverInfo.AttackMode;
            }
        }
        else
        {
            HP = _serverInfo.HP;
            AttackMode = _serverInfo.AttackMode;
        }
 
        if (PlayerDatas.Instance.hero != null)
        {
            PlayerDatas.Instance.hero.ActorInfo.familyID = FamilyId;
            if (CrossServerUtility.IsCrossServer())
            {
                if (_serverInfo.socketType == ServerType.CrossSever)
                {
                    PlayerDatas.Instance.hero.ActorInfo.ResetHp((int)_serverInfo.HP);
                }
            }
            else
            {
                PlayerDatas.Instance.hero.ActorInfo.ResetHp((int)_serverInfo.HP);
            }
        }
 
    }
 
    public void UpdateData(HA112_tagMCDBPlayer serverInfo)
    {
        AccID = serverInfo.AccID;
        PlayerID = serverInfo.PlayerID;
        PlayerName = serverInfo.PlayerName.Trim().Replace(" ", "");
        GMLevel = serverInfo.GMLevel;
        Job = serverInfo.Job;
        LV = serverInfo.LV;
        ExpPoint = serverInfo.ExpPoint;
        TotalExp = serverInfo.TotalExp;
        FamilyId = serverInfo.Family;
        FamilyName = serverInfo.FamilyName.Trim().Replace(" ", "");
        diamond = serverInfo.Gold;
        copper = serverInfo.Silver;
        MapID = serverInfo.MapID;
        if (serverInfo.socketType == ServerType.Main)
        {
            mainServerMapIdRecord = MapID;
        }
        PosX = serverInfo.PosX;
        PosY = serverInfo.PosY;
        FreePoint = serverInfo.FreePoint;
        FreeSkillPoint = serverInfo.FreeSkillPoint;
        STR = serverInfo.STR;
        PNE = serverInfo.PNE;
        PHY = serverInfo.PHY;
        CON = serverInfo.CON;
        AttackMode = serverInfo.AttackMode;
        FBID = serverInfo.FBID;
        teamAutoOperateFlag = serverInfo.ExAttr2;
        dungeonLineId = (int)serverInfo.ExAttr3;
        shield = serverInfo.ExAttr4;
        CrossServerFlag = serverInfo.ExAttr5;
        realmLevel = serverInfo.OfficialRank;
        VIPLv = serverInfo.VIPLv;
        copperExtend = serverInfo.ExAttr6;
        sp = serverInfo.ExAttr7;
        spExtend = serverInfo.ExAttr8;
        bubbleId = serverInfo.ExAttr10;
        ExAttr11 = serverInfo.ExAttr11;
        ServerGroupId = serverInfo.ExAttr13;
        hangTime = serverInfo.HappyPoint;
        faction = serverInfo.Faction;
        coinPointTotal = serverInfo.ChangeCoinPointTotal;
        godWeaponLV_1 = (int)serverInfo.ExAttr15;
        godWeaponLV_2 = (int)serverInfo.ExAttr16;
        godWeaponLV_3 = (int)serverInfo.ExAttr17;
        godWeaponLV_4 = (int)serverInfo.ExAttr18;
        HP = serverInfo.HP;
        if (PlayerDatas.Instance.hero != null)
        {
            PlayerDatas.Instance.hero.ActorInfo.ResetHp((int)serverInfo.HP);
        }
    }
 
 
}