| | |
| | | /** 玩家仙盟相关信息缓存数据 */
|
| | | public class PlayerFairyData
|
| | | {
|
| | | private bool hasFairy = false;
|
| | |
|
| | | public bool HasFairy
|
| | | {
|
| | | get { return hasFairy; }
|
| | | get
|
| | | {
|
| | | if (fairy == null) return false;
|
| | | if (fairy.FamilyID == 0) return false;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | public FairyData fairy = null; //自己的公会数据
|
| | | public FairyMember mine = null;
|
| | | public event Action OnRefreshFairyInfo;
|
| | | public event Action OnRefreshFairyMine;
|
| | | public event Action OnRefreshFairyMine; //玩家在公会里的数据
|
| | | private Dictionary<int, FairyMember> memberDic = new Dictionary<int, FairyMember>();
|
| | |
|
| | | // 0-成员,1-精英,2-副盟主,3-盟主
|
| | |
| | | {
|
| | | fairy = new FairyData();
|
| | | }
|
| | | fairy.FamilyID = vNetData.FamilyID;
|
| | | if (fairy.FamilyID != 0) hasFairy = true;
|
| | | fairy.FamilyID = (int)vNetData.FamilyID;
|
| | | fairy.FamilyName = UIHelper.ServerStringTrim(vNetData.FamilyName);
|
| | | fairy.FamilyLV = vNetData.FamilyLV;
|
| | | fairy.FamilyLVExp = vNetData.FamilyLVExp;
|
| | | fairy.FamilyLVExp = (int)vNetData.FamilyLVExp;
|
| | | fairy.JoinReview = vNetData.JoinReview;
|
| | | fairy.JoinLVMin = vNetData.JoinLVMin;
|
| | | fairy.ServerID = vNetData.ServerID;
|
| | | fairy.EmblemID = vNetData.EmblemID;
|
| | | fairy.ServerID = (int)vNetData.ServerID;
|
| | | fairy.EmblemID = (int)vNetData.EmblemID;
|
| | | fairy.EmblemWord = vNetData.EmblemWord;
|
| | | fairy.totalFightPower = vNetData.FightPowerEx * Constants.ExpPointValue + vNetData.FightPower;
|
| | | fairy.Broadcast = vNetData.Broadcast;
|
| | | fairy.LeaderID = vNetData.LeaderID;
|
| | | fairy.LeaderID = (int)vNetData.LeaderID;
|
| | | fairy.MemberCount = vNetData.MemberCount;
|
| | |
|
| | | mine = null;
|
| | |
| | | FairyMember member = new FairyMember();
|
| | | memberDic[(int)vNetData.MemberList[i].PlayerID] = member;
|
| | |
|
| | | member.PlayerID = vNetData.MemberList[i].PlayerID;
|
| | | member.PlayerID = (int)vNetData.MemberList[i].PlayerID;
|
| | | member.Name = vNetData.MemberList[i].Name;
|
| | | member.JoinTime = vNetData.MemberList[i].JoinTime;
|
| | | member.JoinTime = (int)vNetData.MemberList[i].JoinTime;
|
| | | member.FmLV = vNetData.MemberList[i].FmLV;
|
| | | member.LV = vNetData.MemberList[i].LV;
|
| | | member.Job = vNetData.MemberList[i].Job;
|
| | | member.RealmLV = vNetData.MemberList[i].RealmLV;
|
| | | member.Face = vNetData.MemberList[i].Face;
|
| | | member.FacePic = vNetData.MemberList[i].FacePic;
|
| | | member.TitleID = vNetData.MemberList[i].TitleID;
|
| | | member.Face = (int)vNetData.MemberList[i].Face;
|
| | | member.FacePic = (int)vNetData.MemberList[i].FacePic;
|
| | | member.TitleID = (int)vNetData.MemberList[i].TitleID;
|
| | | member.FightPower = vNetData.MemberList[i].FightPower + vNetData.MemberList[i].FightPowerEx * Constants.ExpPointValue;
|
| | | member.ServerID = vNetData.MemberList[i].ServerID;
|
| | | member.ContribTotal = vNetData.MemberList[i].ContribTotal;
|
| | | member.ContribDay = vNetData.MemberList[i].ContribDay;
|
| | | member.DonateCntTotal = vNetData.MemberList[i].DonateCntTotal;
|
| | | member.ServerID = (int)vNetData.MemberList[i].ServerID;
|
| | | member.ContribTotal = (int)vNetData.MemberList[i].ContribTotal;
|
| | | member.ContribDay = (int)vNetData.MemberList[i].ContribDay;
|
| | | member.DonateCntTotal = (int)vNetData.MemberList[i].DonateCntTotal;
|
| | | member.DonateCntDay = vNetData.MemberList[i].DonateCntDay;
|
| | | member.OffTime = vNetData.MemberList[i].OffTime;
|
| | | member.OffTime = (int)vNetData.MemberList[i].OffTime;
|
| | |
|
| | | if (member.PlayerID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | //自己
|
| | | mine = member;
|
| | | OnRefreshFairyMine?.Invoke();
|
| | | }
|
| | |
|
| | | // 0-成员,1-精英,2-副盟主,3-盟主
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public void ClearData()
|
| | | {
|
| | | fairy = null;
|
| | | mine = null;
|
| | | memberDic.Clear();
|
| | | leaderID = 0;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | //公会数据
|
| | | public class FairyData
|
| | | {
|
| | | public ushort Rank; //名次,从1开始
|
| | | public uint FamilyID;
|
| | | public int Rank; //名次,从1开始
|
| | | public int FamilyID;
|
| | | public string FamilyName; //家族名称
|
| | | public byte FamilyLV; //家族等级
|
| | | public uint FamilyLVExp; //家族等级经验
|
| | | public byte JoinReview; //成员加入是否需要审核,默认0自动加入
|
| | | public ushort JoinLVMin; //限制最低可加入的玩家等级
|
| | | public uint ServerID; //区服ID,创建时以族长的区服ID赋值
|
| | | public uint EmblemID; //徽章ID
|
| | | public int FamilyLV; //家族等级
|
| | | public int FamilyLVExp; //家族等级经验
|
| | | public int JoinReview; //成员加入是否需要审核,默认0自动加入
|
| | | public int JoinLVMin; //限制最低可加入的玩家等级
|
| | | public int ServerID; //区服ID,创建时以族长的区服ID赋值
|
| | | public int EmblemID; //徽章ID
|
| | | public string EmblemWord; //徽章文字
|
| | | public long totalFightPower;
|
| | | public string Broadcast;
|
| | | public uint LeaderID; //族长玩家ID
|
| | | public int LeaderID; //族长玩家ID
|
| | | public int MemberCount;
|
| | |
|
| | | //查找增加的字段
|
| | |
| | |
|
| | | public class FairyMember
|
| | | {
|
| | | public uint PlayerID;
|
| | | public int PlayerID;
|
| | | public string Name; //size = NameLen
|
| | | public uint JoinTime; //加入家族时时间戳
|
| | | public byte FmLV; //家族职位: 0-成员;1-精英;2-副族长;3-族长
|
| | | public ushort LV; //等级
|
| | | public byte Job; //职业
|
| | | public byte RealmLV; //境界
|
| | | public uint Face; //基本脸型
|
| | | public uint FacePic; //头像框
|
| | | public uint TitleID; //称号
|
| | | public int JoinTime; //加入家族时时间戳
|
| | | public int FmLV; //家族职位: 0-成员;1-精英;2-副族长;3-族长
|
| | | public int LV; //等级
|
| | | public int Job; //职业
|
| | | public int RealmLV; //境界
|
| | | public int Face; //基本脸型
|
| | | public int FacePic; //头像框
|
| | | public int TitleID; //称号
|
| | | public long FightPower; //战力,求余亿部分
|
| | | public uint ServerID; //所属区服ID
|
| | | public uint ContribTotal; //总贡献度
|
| | | public uint ContribDay; //日贡献度
|
| | | public uint DonateCntTotal; //总捐献次数
|
| | | public byte DonateCntDay; //日捐献次数
|
| | | public uint OffTime; // 0-在线; >0-/离线时间戳
|
| | | public int ServerID; //所属区服ID
|
| | | public int ContribTotal; //总贡献度
|
| | | public int ContribDay; //日贡献度
|
| | | public int DonateCntTotal; //总捐献次数
|
| | | public int DonateCntDay; //日捐献次数
|
| | | public int OffTime; // 0-在线; >0-/离线时间戳
|
| | | }
|
| | |
|
| | | public class FairyApply
|
| | | {
|
| | | public uint PlayerID;
|
| | | public int PlayerID;
|
| | | public string Name;
|
| | | public uint ReqTime; //申请时间戳
|
| | | public ushort LV; //等级
|
| | | public byte Job; //职业
|
| | | public byte RealmLV; //境界
|
| | | public uint Face; //基本脸型
|
| | | public uint FacePic; //头像框
|
| | | public uint TitleID; //称号
|
| | | public int ReqTime; //申请时间戳
|
| | | public int LV; //等级
|
| | | public int Job; //职业
|
| | | public int RealmLV; //境界
|
| | | public int Face; //基本脸型
|
| | | public int FacePic; //头像框
|
| | | public int TitleID; //称号
|
| | | public long FightPower;
|
| | | public uint ServerID; //所属区服ID
|
| | | public byte IsOnLine; //是否在线
|
| | | public int ServerID; //所属区服ID
|
| | | public int IsOnLine; //是否在线
|
| | | }
|
| | |
|
| | | //权限ID: 1-收人,2-变更职位,3-发布公告,4-踢人
|