public static Shop_BuyProductProto GetProto(byte[] buffer) { Shop_BuyProductProto proto = new Shop_BuyProductProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.ProductId = ms.ReadInt(); } return(proto); }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { NPCEntity entity = new NPCEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.PrefabName = ms.ReadUTF8String(); entity.HeadPic = ms.ReadUTF8String(); entity.HalfBodyPic = ms.ReadUTF8String(); entity.Talk = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { LanguageEntity entity = new LanguageEntity(); entity.Id = ms.ReadInt(); entity.Module = ms.ReadUTF8String(); entity.Key = ms.ReadUTF8String(); entity.Desc = ms.ReadUTF8String(); entity.CN = ms.ReadUTF8String(); entity.EN = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
public static WorldMap_RoleEnterProto GetProto(byte[] buffer) { WorldMap_RoleEnterProto proto = new WorldMap_RoleEnterProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.WorldMapSceneId = ms.ReadInt(); } return(proto); }
public static RoleOperation_SelectRoleInfoProto GetProto(byte[] buffer) { RoleOperation_SelectRoleInfoProto proto = new RoleOperation_SelectRoleInfoProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.RoldId = ms.ReadInt(); } return(proto); }
public static GameLevel_FailProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { GameLevel_FailProto proto = new GameLevel_FailProto(); proto.GameLevelId = ms.ReadInt(); proto.Grade = (byte)ms.ReadByte(); return(proto); } }
public static GameServerOnePageRequestProto GetProto(byte[] buffer) { GameServerOnePageRequestProto proto = new GameServerOnePageRequestProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.PageIndex = ms.ReadInt(); } return(proto); }
public static Goods_SearchEquipDetailProto GetProto(byte[] buffer) { Goods_SearchEquipDetailProto proto = new Goods_SearchEquipDetailProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.GoodsServerId = ms.ReadInt(); } return(proto); }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { ChapterEntity entity = new ChapterEntity(); entity.Id = ms.ReadInt(); entity.ChapterName = ms.ReadUTF8String(); entity.GameLevelCount = ms.ReadInt(); entity.BG_Pic = ms.ReadUTF8String(); entity.Uvx = ms.ReadFloat(); entity.Uvy = ms.ReadFloat(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
public static RoleData_SkillReturnProto GetProto(byte[] buffer) { RoleData_SkillReturnProto proto = new RoleData_SkillReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.SkillCount = (byte)ms.ReadByte(); proto.CurrSkillDataList = new List <SkillData>(); for (int i = 0; i < proto.SkillCount; i++) { SkillData _CurrSkillData = new SkillData(); _CurrSkillData.SkillId = ms.ReadInt(); _CurrSkillData.SkillLevel = ms.ReadInt(); _CurrSkillData.SlotsNo = (byte)ms.ReadByte(); proto.CurrSkillDataList.Add(_CurrSkillData); } } return(proto); }
public static RoleOperation_LogOnGameServerReturnProto GetProto(byte[] buffer) { RoleOperation_LogOnGameServerReturnProto proto = new RoleOperation_LogOnGameServerReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.RoleCount = ms.ReadInt(); proto.RoleList = new List <RoleItem>(); for (int i = 0; i < proto.RoleCount; i++) { RoleItem _Role = new RoleItem(); _Role.RoleId = ms.ReadInt(); _Role.RoleNickName = ms.ReadUTF8String(); _Role.RoleJob = (byte)ms.ReadByte(); _Role.RoleLevel = ms.ReadInt(); proto.RoleList.Add(_Role); } } return(proto); }
public static Backpack_GoodsAddProto GetProto(byte[] buffer) { Backpack_GoodsAddProto proto = new Backpack_GoodsAddProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.GoodsInType = (byte)ms.ReadByte(); proto.GoodsKindCount = ms.ReadInt(); proto.ItemList = new List <GoodsKindItem>(); for (int i = 0; i < proto.GoodsKindCount; i++) { GoodsKindItem _Item = new GoodsKindItem(); _Item.GoodsType = (byte)ms.ReadByte(); _Item.GoodsId = ms.ReadInt(); _Item.GoodsCount = ms.ReadInt(); proto.ItemList.Add(_Item); } } return(proto); }
public static Goods_UseItemReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer) { Goods_UseItemReturnProto proto = new Goods_UseItemReturnProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.GoodsId = ms.ReadInt(); } else { proto.MsgCode = ms.ReadInt(); } return(proto); }
public static Task_SearchTaskReturnProto GetProto(byte[] buffer) { Task_SearchTaskReturnProto proto = new Task_SearchTaskReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.TaskCount = ms.ReadInt(); proto.CurrTaskItemList = new List <TaskItem>(); for (int i = 0; i < proto.TaskCount; i++) { TaskItem _CurrTaskItem = new TaskItem(); _CurrTaskItem.Id = ms.ReadInt(); _CurrTaskItem.Name = ms.ReadUTF8String(); _CurrTaskItem.Status = ms.ReadInt(); _CurrTaskItem.Content = ms.ReadUTF8String(); proto.CurrTaskItemList.Add(_CurrTaskItem); } } return(proto); }
public static TestProto GetProto(byte[] buffer) { TestProto proto = new TestProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.Id = ms.ReadInt(); proto.Name = ms.ReadUTF8String(); } return(proto); }
public static GameLevel_EnterProto GetProto(byte[] buffer) { GameLevel_EnterProto proto = new GameLevel_EnterProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.GameLevelId = ms.ReadInt(); proto.Grade = (byte)ms.ReadByte(); } return(proto); }
public static WorldMap_OtherRoleUpdateInfoProto GetProto(byte[] buffer) { WorldMap_OtherRoleUpdateInfoProto proto = new WorldMap_OtherRoleUpdateInfoProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.RoldId = ms.ReadInt(); proto.RoleNickName = ms.ReadUTF8String(); } return(proto); }
public static Goods_EquipPutReturnProto GetProto(byte[] buffer) { Goods_EquipPutReturnProto proto = new Goods_EquipPutReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.Type = (byte)ms.ReadByte(); proto.GoodsId = ms.ReadInt(); proto.GoodsServerId = ms.ReadInt(); } else { } proto.MsgCode = ms.ReadInt(); } return(proto); }
public static Goods_SearchEquipDetailProto GetProto(MMO_MemoryStream ms, byte[] buffer) { Goods_SearchEquipDetailProto proto = new Goods_SearchEquipDetailProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.GoodsServerId = ms.ReadInt(); return(proto); }
public static RoleData_RechargeReturnProto GetProto(byte[] buffer) { RoleData_RechargeReturnProto proto = new RoleData_RechargeReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.RechargeProductId = ms.ReadInt(); proto.RechargeProductType = (byte)ms.ReadByte(); proto.Money = ms.ReadInt(); proto.RemainDay = ms.ReadInt(); } else { proto.ErrorCode = ms.ReadInt(); } } return(proto); }
public static WorldMap_CurrRoleResurgenceProto GetProto(MMO_MemoryStream ms, byte[] buffer) { WorldMap_CurrRoleResurgenceProto proto = new WorldMap_CurrRoleResurgenceProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.Type = ms.ReadInt(); return(proto); }
public static WorldMap_RoleEnterProto GetProto(MMO_MemoryStream ms, byte[] buffer) { WorldMap_RoleEnterProto proto = new WorldMap_RoleEnterProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.WorldMapSceneId = ms.ReadInt(); return(proto); }
public static RoleData_SkillReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer) { RoleData_SkillReturnProto proto = new RoleData_SkillReturnProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.SkillCount = (byte)ms.ReadByte(); proto.CurrSkillDataList = new List <SkillData>(); for (int i = 0; i < proto.SkillCount; i++) { SkillData _CurrSkillData = new SkillData(); _CurrSkillData.SkillId = ms.ReadInt(); _CurrSkillData.SkillLevel = ms.ReadInt(); _CurrSkillData.SlotsNo = (byte)ms.ReadByte(); proto.CurrSkillDataList.Add(_CurrSkillData); } return(proto); }
public static RoleOperation_SelectRoleInfoProto GetProto(MMO_MemoryStream ms, byte[] buffer) { RoleOperation_SelectRoleInfoProto proto = new RoleOperation_SelectRoleInfoProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.RoldId = ms.ReadInt(); return(proto); }
public static RoleData_RechargeProductReturnProto GetProto(byte[] buffer) { RoleData_RechargeProductReturnProto proto = new RoleData_RechargeProductReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.RechargeProductCount = ms.ReadInt(); proto.CurrItemList = new List <RechargeProductItem>(); for (int i = 0; i < proto.RechargeProductCount; i++) { RechargeProductItem _CurrItem = new RechargeProductItem(); _CurrItem.RechargeProductId = ms.ReadInt(); _CurrItem.ProductDesc = ms.ReadUTF8String(); _CurrItem.CanBuy = (byte)ms.ReadByte(); _CurrItem.RemainDay = ms.ReadInt(); _CurrItem.DoubleFlag = (byte)ms.ReadByte(); proto.CurrItemList.Add(_CurrItem); } } return(proto); }
public static Backpack_SearchReturnProto GetProto(byte[] buffer) { Backpack_SearchReturnProto proto = new Backpack_SearchReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.BackpackItemCount = ms.ReadInt(); proto.ItemList = new List <BackpackItem>(); for (int i = 0; i < proto.BackpackItemCount; i++) { BackpackItem _Item = new BackpackItem(); _Item.BackpackItemId = ms.ReadInt(); _Item.GoodsType = (byte)ms.ReadByte(); _Item.GoodsId = ms.ReadInt(); _Item.GoodsServerId = ms.ReadInt(); _Item.GoodsOverlayCount = ms.ReadInt(); proto.ItemList.Add(_Item); } } return(proto); }
public static Shop_BuyProductProto GetProto(MMO_MemoryStream ms, byte[] buffer) { Shop_BuyProductProto proto = new Shop_BuyProductProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.ProductId = ms.ReadInt(); return(proto); }
/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { Sys_UIFormEntity entity = new Sys_UIFormEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.Name = ms.ReadUTF8String(); entity.UIGroupId = (byte)ms.ReadByte(); entity.DisableUILayer = ms.ReadInt(); entity.IsLock = ms.ReadInt(); entity.AssetPath_Chinese = ms.ReadUTF8String(); entity.AssetPath_English = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
public static RoleOperation_LogOnGameServerProto GetProto(MMO_MemoryStream ms, byte[] buffer) { RoleOperation_LogOnGameServerProto proto = new RoleOperation_LogOnGameServerProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.AccountId = ms.ReadInt(); return(proto); }
public static WorldMap_OtherRoleUseSkillProto GetProto(byte[] buffer) { WorldMap_OtherRoleUseSkillProto proto = new WorldMap_OtherRoleUseSkillProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.AttackRoleId = ms.ReadInt(); proto.SkillId = ms.ReadInt(); proto.SkillLevel = ms.ReadInt(); proto.RolePosX = ms.ReadFloat(); proto.RolePosY = ms.ReadFloat(); proto.RolePosZ = ms.ReadFloat(); proto.RoleYAngle = ms.ReadFloat(); proto.BeAttackCount = ms.ReadInt(); proto.ItemList = new List <BeAttackItem>(); for (int i = 0; i < proto.BeAttackCount; i++) { BeAttackItem _Item = new BeAttackItem(); _Item.BeAttackRoleId = ms.ReadInt(); _Item.ReduceHp = ms.ReadInt(); _Item.IsCri = (byte)ms.ReadByte(); proto.ItemList.Add(_Item); } } return(proto); }