public byte[] SerializeArms() { RPC.DataWriter dw = new RPC.DataWriter(); dw.Write((byte)HoldPoints.Count); foreach (var i in HoldPoints) { dw.Write(i.ArmsCount); dw.Write((byte)i.Camp); } dw.Write((byte)Defender.Length); foreach (var i in Defender) { dw.Write(i); } dw.Write((byte)AdvanceArms.Length); foreach (var i in AdvanceArms) { dw.Write(i); } if (dw.Length >= 255) { Log.Log.Common.Error("City 序列化数据最大不能超过255!"); } return(dw.Trim()); }
public byte[] AchieveSerialize() { RPC.DataWriter dw = new RPC.DataWriter(); int count = 0; foreach (var i in AchieveDict.Values) { foreach (var ave in i) { if (ave.data.targetNum > 0) { count++; } } } dw.Write(count); foreach (var i in AchieveDict.Values) { foreach (var ave in i) { dw.Write(ave.data.id); dw.Write(ave.data.targetNum); dw.Write(ave.data.getReward); } } return(dw.Trim()); }
public byte[] Serialize() { RPC.DataWriter dw = new RPC.DataWriter(); value.Serialize(dw); dw.Write(WeapFacdeid); RPC.IAutoSaveAndLoad.DaraWriteList <CSCommon.Data.SkillData>(skills, dw, false); return(dw.Trim()); }
public byte[] CopySerialize() { RPC.DataWriter dw = new RPC.DataWriter(); dw.Write(CopyList.Count); foreach (var i in CopyList) { dw.Write(i); } return(dw.Trim()); }
//保存数据库调用 public void VisitDataSerialize() { RPC.DataWriter dw = new RPC.DataWriter(); byte count = (byte)VisitTopList.Count; dw.Write(count); foreach (var i in VisitTopList) { dw.Write(i); } count = (byte)VisitFriendList.Count; dw.Write(count); foreach (var i in VisitFriendList) { dw.Write(i); } RoleData.VisitPlayers = dw.Trim(); }
//保存数据库调用 public void MartialSerialize() { ClearTimeHandlers(); RPC.DataWriter dw = new RPC.DataWriter(); byte itemCount = (byte)mOutDict.Count; dw.Write(itemCount); foreach (var i in mOutDict.Values) { dw.Write(i.mType); dw.Write(i.mStartTime); dw.Write(i.mOutCount); dw.Write(i.mUpOutIndex); dw.Write(i.mUpStartTime); dw.Write(i.mOutPutTotalNum); } mRole.PlayerData.MartialData.OutPutInfo = dw.Trim(); }