using System;
|
|
public class PlayerBaseData
|
{
|
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 int TitleID;
|
public uint ExpPoint; //扩充经验点数(亿)
|
public uint TotalExp; //总经验(小于亿部分)
|
public ulong curExp { get { return ExpPoint + TotalExp * Constants.ExpPointValue; } }
|
public uint FamilyId; //家族
|
public string FamilyName; //家族名称
|
public uint diamond; //仙玉
|
public uint bindDiamond; //灵石
|
public uint copper; //铜钱
|
public ulong allCopper { get { return (ulong)copper + (ulong)copperExtend * Constants.ExpPointValue; } }
|
public ulong FightPoint; //战斗值
|
public ushort MapID; //角色所在地图 地图规则:C/S一一对应的常规地图,C假地图(ExAttr14),多C一个S地图(ExAttr3)
|
public ushort PosX; //角色坐标
|
public ushort PosY;
|
public ulong 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 ExAttr1; // 协助目标玩家ID,非0变0退出协助
|
public uint teamAutoOperateFlag; //扩展属性2,各项目专用
|
public int dungeonLineId; // 副本线路id
|
public int dungeonMapId; // 副本用作 DataMapId,单人副本存在1.假副本 2.服务端1对客户端多地图同分线 3.服务端1对客户端多地图不同分线
|
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; //预留的扩展属性字段,用来存放项目特定的属性121 现金代币(代金券)
|
public uint ExAttr16; //预留的扩展属性字段,用来存放项目特定的属性 全身特效
|
public uint ServerGroupId; //服务器组ID
|
public uint hangTime;//现为脱机挂剩余时间 23
|
public uint faction; //阵营 107
|
uint m_coinPointTotal;
|
public int face;//头像
|
public int facePic;//头像外框
|
|
public uint coinPointTotal {
|
private get { return m_coinPointTotal; }
|
set {
|
CoinChangeEvent?.Invoke((int)m_coinPointTotal, (int)value);
|
m_coinPointTotal = value;
|
}
|
}//已充值金额,单位分 112 越南盾真实充值金额
|
|
public event Action<int, int> CoinChangeEvent;
|
public float coinTotal
|
{
|
get
|
{
|
return UIHelper.GetRealCoin((int)coinPointTotal);
|
}
|
}
|
|
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 int NormalHurt;
|
public int NormalHurtPer;
|
public int FabaoHurt;
|
public int FabaoHurtPer;
|
public int reduceCrit;//暴击抗性
|
public int reduceHeartHurt;//会心一击伤害固定值减免
|
public int reduceFinalHurt;//最终伤害百分比减免
|
|
public int yinjiCount;//当前印记数量
|
public int yinjiTime;//印记转圈时间
|
|
public int skillAddPerA;//定海神针技能伤害百分比
|
public int skillAddPerB; //皓月枪技能伤害百分比
|
public int skillAddPerC; //鬼牙刃技能伤害百分比
|
public int skillAddPerD; //磐龙印技能伤害百分比
|
public int skillAddPerE; //杏黄旗技能伤害百分比
|
public int skillAddPerF;//嗜天斧技能伤害百分比
|
public int skillAddPerG; //射日神弓技能伤害百分比
|
public int skillReducePerA; //定海神针技能减伤百分比
|
public int skillReducePerB; //皓月枪技能减伤百分比
|
public int skillReducePerC; //鬼牙刃技能减伤百分比
|
public int skillReducePerD; //磐龙印技能减伤百分比
|
public int skillReducePerE; //杏黄旗技能减伤百分比
|
public int skillReducePerF; //嗜天斧技能减伤百分比
|
public int skillReducePerG; //射日神弓技能减伤百分比
|
|
public int mapRealmSelect; //地图境界难度
|
public int leaveFamilyTime; //离开家族时间
|
|
public bool IsActive90Off = true; //代表默认激活0.1折
|
public long treasurePotentialSp
|
{
|
get
|
{
|
return spExtend * (long)Constants.ExpPointValue + sp;
|
}
|
}
|
|
public int reikiRootEffectId
|
{
|
get
|
{
|
return (int)equipShowSwitch / 1000 % 1000;
|
}
|
}
|
|
public int suitLevel
|
{
|
//当前穿的第几套装备,命名和套装无关
|
get
|
{
|
return (int)equipShowSwitch / 10 % 100;
|
}
|
}
|
|
public void UpdateData(H0102_tagCDBPlayer _serverInfo)
|
{
|
|
AccID = _serverInfo.AccID.Trim().Replace("\0", "");
|
PlayerID = _serverInfo.PlayerID;
|
PlayerName = _serverInfo.PlayerName.Trim().Replace("\0", "");
|
GMLevel = _serverInfo.GMLevel;
|
Job = _serverInfo.Job;
|
LV = _serverInfo.LV;
|
ExpPoint = _serverInfo.ExpPoint;
|
TotalExp = _serverInfo.TotalExp;
|
FamilyId = _serverInfo.Family;
|
FamilyName = _serverInfo.FamilyName.Trim().Replace("\0", "");
|
diamond = _serverInfo.Gold;
|
bindDiamond = _serverInfo.GoldPaper;
|
copper = _serverInfo.Silver;
|
MapID = _serverInfo.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;
|
ExAttr1 = _serverInfo.ExAttr1;
|
teamAutoOperateFlag = _serverInfo.ExAttr2;
|
dungeonLineId = (int)_serverInfo.ExAttr3 % 1000;
|
dungeonMapId = (int)_serverInfo.ExAttr3 / 1000;
|
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;
|
ExAttr16 = _serverInfo.ExAttr16;
|
ServerGroupId = _serverInfo.ExAttr13;
|
faction = _serverInfo.Faction;
|
coinPointTotal = _serverInfo.ChangeCoinPointTotal;
|
equipShowSwitch = _serverInfo.EquipShowSwitch;
|
mapRealmSelect = (int)_serverInfo.ExAttr18;
|
leaveFamilyTime = (int)_serverInfo.ExAttr19;
|
face = (int)_serverInfo.Face;
|
facePic = (int)_serverInfo.FacePic;
|
|
HP = _serverInfo.HP + _serverInfo.HPEx * Constants.ExpPointValue;
|
AttackMode = _serverInfo.AttackMode;
|
|
}
|
|
// 部分情况需要服务端非重登情况下同步所有数据
|
public void UpdateData(/*HA112_tagMCDBPlayer serverInfo*/)
|
{
|
// AccID = serverInfo.AccID;
|
// PlayerID = serverInfo.PlayerID;
|
// PlayerName = serverInfo.PlayerName.Trim().Replace("\0", "");
|
// GMLevel = serverInfo.GMLevel;
|
// Job = serverInfo.Job;
|
// LV = serverInfo.LV;
|
// ExpPoint = serverInfo.ExpPoint;
|
// TotalExp = serverInfo.TotalExp;
|
// FamilyId = serverInfo.Family;
|
// FamilyName = serverInfo.FamilyName.Trim().Replace("\0", "");
|
// diamond = serverInfo.Gold;
|
// bindDiamond = serverInfo.GoldPaper;
|
// copper = serverInfo.Silver;
|
// MapID = serverInfo.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;
|
// ExAttr1 = serverInfo.ExAttr1;
|
// teamAutoOperateFlag = serverInfo.ExAttr2;
|
// dungeonLineId = (int)serverInfo.ExAttr3%1000;
|
// dungeonMapId = (int)serverInfo.ExAttr3 / 1000;
|
// 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;
|
// ExAttr16 = serverInfo.ExAttr16;
|
// ServerGroupId = serverInfo.ExAttr13;
|
// faction = serverInfo.Faction;
|
// coinPointTotal = serverInfo.ChangeCoinPointTotal;
|
// HP = serverInfo.HP + serverInfo.HPEx * Constants.ExpPointValue;
|
// if (PlayerDatas.Instance.hero != null)
|
// {
|
// PlayerDatas.Instance.hero.ActorInfo.ResetHp((long)HP);
|
// }
|
// equipShowSwitch = serverInfo.EquipShowSwitch;
|
// mapRealmSelect = (int)serverInfo.ExAttr18;
|
// leaveFamilyTime = (int)serverInfo.ExAttr19;
|
// face = (int)serverInfo.Face;
|
// facePic = (int)serverInfo.FacePic;
|
}
|
|
|
}
|