/// <summary> /// 加载列表 /// </summary> protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { JobEntity entity = new JobEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.Desc = ms.ReadUTF8String(); entity.JobPrefab = ms.ReadUTF8String(); entity.HP = ms.ReadInt(); entity.MP = ms.ReadInt(); entity.ToSpeed = ms.ReadInt(); entity.WeaponDamageMin = ms.ReadInt(); entity.WeaponDamageMax = ms.ReadInt(); entity.AttackNumber = ms.ReadInt(); entity.StrikePower = ms.ReadInt(); entity.PiercingPower = ms.ReadInt(); entity.MagicPower = ms.ReadInt(); entity.ChoppingDefense = ms.ReadInt(); entity.PuncturDefense = ms.ReadInt(); entity.MagicDefense = ms.ReadInt(); 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++) { SkillEntity entity = new SkillEntity(); entity.Id = ms.ReadInt(); entity.SkillName = ms.ReadUTF8String(); entity.SkillDesc = ms.ReadUTF8String(); entity.SkillPic = ms.ReadUTF8String(); entity.LevelLimit = ms.ReadInt(); entity.IsPhyAttack = ms.ReadInt(); entity.AttackTargetCount = ms.ReadInt(); entity.AttackRange = ms.ReadFloat(); entity.AreaAttackRadius = ms.ReadFloat(); entity.ShowHurtEffectDelaySecond = ms.ReadFloat(); entity.RedScreen = ms.ReadInt(); entity.AttackState = ms.ReadInt(); entity.AbnormalState = ms.ReadInt(); entity.BuffInfoID = ms.ReadInt(); entity.BuffTargetFilter = ms.ReadInt(); entity.BuffIsPercentage = ms.ReadInt(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
public static System_GameServerConfigReturnProto GetProto(byte[] buffer, bool isChild = false) { System_GameServerConfigReturnProto proto = new System_GameServerConfigReturnProto(); MMO_MemoryStream ms = null; if (!isChild) { ms = GameEntry.Socket.SocketSendMS; } else { ms = GameEntry.Pool.DequeueClassObject <MMO_MemoryStream>(); } ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.ConfigCount = ms.ReadInt(); proto.ServerConfigList = new List <ConfigItem>(); for (int i = 0; i < proto.ConfigCount; i++) { ConfigItem _ServerConfig = new ConfigItem(); _ServerConfig.ConfigCode = ms.ReadUTF8String(); _ServerConfig.IsOpen = ms.ReadBool(); _ServerConfig.Param = ms.ReadUTF8String(); proto.ServerConfigList.Add(_ServerConfig); } if (isChild) { GameEntry.Pool.EnqueueClassObject(ms); } 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++) { MaterialEntity entity = new MaterialEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.Quality = ms.ReadInt(); entity.Description = ms.ReadUTF8String(); entity.Type = ms.ReadInt(); entity.FixedType = ms.ReadInt(); entity.FixedAddValue = ms.ReadInt(); entity.maxAmount = ms.ReadInt(); entity.packSort = ms.ReadInt(); entity.CompositionProps = ms.ReadUTF8String(); entity.CompositionMaterialID = ms.ReadInt(); entity.CompositionGold = ms.ReadUTF8String(); entity.SellMoney = ms.ReadInt(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
/// <summary> /// 初始化资源信息 /// </summary> private void InitAssetInfo(byte[] buffer) { buffer = ZlibHelper.DeCompressBytes(buffer); MMO_MemoryStream ms = new MMO_MemoryStream(buffer); int len = ms.ReadInt(); int depLen = 0; for (int i = 0; i < len; i++) { AssetEntity entity = new AssetEntity(); entity.Category = (AssetCategory)ms.ReadByte(); entity.AssetFullName = ms.ReadUTF8String(); entity.AssetBundleName = ms.ReadUTF8String(); depLen = ms.ReadInt(); if (depLen > 0) { entity.DependsAssetList = new List <AssetDependsEntity>(depLen); for (int j = 0; j < depLen; j++) { AssetDependsEntity assetDepends = new AssetDependsEntity(); assetDepends.Category = (AssetCategory)ms.ReadByte(); assetDepends.AssetFullName = ms.ReadUTF8String(); entity.DependsAssetList.Add(assetDepends); } } //Debug.LogError("entity.Category=" + entity.Category); //Debug.LogError("entity.AssetFullName=" + entity.AssetFullName); m_AssetInfoDic[entity.Category][entity.AssetFullName] = entity; } }
public static MailProto GetProto(byte[] buffer) { MailProto proto = new MailProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.Count = ms.ReadInt(); proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.SuccMsg = ms.ReadUTF8String(); proto.SuccCode = ms.ReadUTF8String(); } else { proto.ErrorCode = ms.ReadInt(); } proto.ItemCount = ms.ReadInt(); proto.ItemIdList = new List <int>(); proto.ItemNameList = new List <int>(); for (int i = 0; i < proto.ItemCount; i++) { int _ItemId = ms.ReadInt(); //道具编号 proto.ItemIdList.Add(_ItemId); int _ItemName = ms.ReadInt(); //道具名称 proto.ItemNameList.Add(_ItemName); } } return(proto); }
/// <summary> /// 根据字节数组获取资源包版本信息 /// </summary> /// <param name="buffer">字节数组</param> /// <param name="version">版本号</param> /// <returns></returns> public static Dictionary <string, AssetBundleInfoEntity> GetAssetBundleVersionList(byte[] buffer, ref string version) { buffer = ZlibHelper.DeCompressBytes(buffer); Dictionary <string, AssetBundleInfoEntity> dic = new Dictionary <string, AssetBundleInfoEntity>(); MMO_MemoryStream ms = new MMO_MemoryStream(buffer); int len = ms.ReadInt(); for (int i = 0; i < len; i++) { if (i == 0) { version = ms.ReadUTF8String().Trim(); } else { AssetBundleInfoEntity entity = new AssetBundleInfoEntity(); entity.AssetBundleName = ms.ReadUTF8String(); entity.MD5 = ms.ReadUTF8String(); entity.Size = ms.ReadULong(); entity.IsFirstData = ms.ReadByte() == 1; entity.IsEncrypt = ms.ReadByte() == 1; dic[entity.AssetBundleName] = entity; } } return(dic); }
public static RoleOperation_SelectRoleInfoReturnProto GetProto(MMO_MemoryStream ms, byte[] buffer) { RoleOperation_SelectRoleInfoReturnProto proto = new RoleOperation_SelectRoleInfoReturnProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.RoldId = ms.ReadInt(); proto.RoleNickName = ms.ReadUTF8String(); proto.JobId = (byte)ms.ReadByte(); proto.Level = ms.ReadInt(); proto.TotalRechargeMoney = ms.ReadInt(); proto.Money = ms.ReadInt(); proto.Gold = ms.ReadInt(); proto.Exp = ms.ReadInt(); proto.MaxHP = ms.ReadInt(); proto.MaxMP = ms.ReadInt(); proto.CurrHP = ms.ReadInt(); proto.CurrMP = ms.ReadInt(); proto.ToSpeed = ms.ReadInt(); proto.WeaponDamageMin = ms.ReadInt(); proto.WeaponDamageMax = ms.ReadInt(); proto.AttackNumber = ms.ReadInt(); proto.StrikePower = ms.ReadInt(); proto.PiercingPower = ms.ReadInt(); proto.MagicPower = ms.ReadInt(); proto.LastInWorldMapId = ms.ReadInt(); proto.LastInWorldMapPos = ms.ReadUTF8String(); proto.Equip_Weapon = ms.ReadInt(); proto.Equip_Pants = ms.ReadInt(); proto.Equip_Clothes = ms.ReadInt(); proto.Equip_Belt = ms.ReadInt(); proto.Equip_Cuff = ms.ReadInt(); proto.Equip_Necklace = ms.ReadInt(); proto.Equip_Shoe = ms.ReadInt(); proto.Equip_Ring = ms.ReadInt(); proto.Equip_WeaponTableId = ms.ReadInt(); proto.Equip_PantsTableId = ms.ReadInt(); proto.Equip_ClothesTableId = ms.ReadInt(); proto.Equip_BeltTableId = ms.ReadInt(); proto.Equip_CuffTableId = ms.ReadInt(); proto.Equip_NecklaceTableId = ms.ReadInt(); proto.Equip_ShoeTableId = ms.ReadInt(); proto.Equip_RingTableId = ms.ReadInt(); proto.ChoppingDefense = ms.ReadInt(); proto.PuncturDefense = ms.ReadInt(); proto.MagicDefense = ms.ReadInt(); } else { proto.MsgCode = ms.ReadInt(); } return(proto); }
public static RoleOperation_SelectRoleInfoReturnProto GetProto(byte[] buffer) { RoleOperation_SelectRoleInfoReturnProto proto = new RoleOperation_SelectRoleInfoReturnProto(); MMO_MemoryStream ms = GameEntry.Socket.SocketReceiveMS; ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.IsSuccess = ms.ReadBool(); if (proto.IsSuccess) { proto.RoldId = ms.ReadInt(); proto.RoleNickName = ms.ReadUTF8String(); proto.JobId = (byte)ms.ReadByte(); proto.Level = ms.ReadInt(); proto.TotalRechargeMoney = ms.ReadInt(); proto.Money = ms.ReadInt(); proto.Gold = ms.ReadInt(); proto.Exp = ms.ReadInt(); proto.MaxHP = ms.ReadInt(); proto.MaxMP = ms.ReadInt(); proto.CurrHP = ms.ReadInt(); proto.CurrMP = ms.ReadInt(); proto.Attack = ms.ReadInt(); proto.Defense = ms.ReadInt(); proto.Hit = ms.ReadInt(); proto.Dodge = ms.ReadInt(); proto.Cri = ms.ReadInt(); proto.Res = ms.ReadInt(); proto.Fighting = ms.ReadInt(); proto.LastInWorldMapId = ms.ReadInt(); proto.LastInWorldMapPos = ms.ReadUTF8String(); proto.Equip_Weapon = ms.ReadInt(); proto.Equip_Pants = ms.ReadInt(); proto.Equip_Clothes = ms.ReadInt(); proto.Equip_Belt = ms.ReadInt(); proto.Equip_Cuff = ms.ReadInt(); proto.Equip_Necklace = ms.ReadInt(); proto.Equip_Shoe = ms.ReadInt(); proto.Equip_Ring = ms.ReadInt(); proto.Equip_WeaponTableId = ms.ReadInt(); proto.Equip_PantsTableId = ms.ReadInt(); proto.Equip_ClothesTableId = ms.ReadInt(); proto.Equip_BeltTableId = ms.ReadInt(); proto.Equip_CuffTableId = ms.ReadInt(); proto.Equip_NecklaceTableId = ms.ReadInt(); proto.Equip_ShoeTableId = ms.ReadInt(); proto.Equip_RingTableId = ms.ReadInt(); } else { proto.MsgCode = ms.ReadInt(); } return(proto); }
protected override void LoadList(MMO_MemoryStream ms) { int rows = ms.ReadInt(); int columns = ms.ReadInt(); for (int i = 0; i < rows; i++) { LocalizationDic[ms.ReadUTF8String()] = ms.ReadUTF8String(); } }
public static AccountLogOnRequestProto GetProto(byte[] buffer) { AccountLogOnRequestProto proto = new AccountLogOnRequestProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.UserName = ms.ReadUTF8String(); proto.Pwd = ms.ReadUTF8String(); proto.DeviceIdentifier = ms.ReadUTF8String(); proto.DeviceModel = ms.ReadUTF8String(); } 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++) { GameLevelEntity entity = new GameLevelEntity(); entity.Id = ms.ReadInt(); entity.ChapterID = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.SceneName = ms.ReadUTF8String(); entity.SmallMapImg = ms.ReadUTF8String(); entity.isBoss = ms.ReadInt(); entity.Ico = ms.ReadUTF8String(); entity.PosInMap = ms.ReadUTF8String(); entity.DlgPic = ms.ReadUTF8String(); entity.CameraRotation = ms.ReadUTF8String(); entity.Audio_BG = ms.ReadUTF8String(); m_List.Add(entity); if (m_Dic.ContainsKey(entity.Id)) { UnityEngine.Debug.Log("包含 " + entity.Id); } else { m_Dic.Add(entity.Id, entity); } //m_Dic[entity.Id] = entity; } }
public static WorldMap_OtherRoleUpdateInfoProto GetProto(byte[] buffer, bool isChild = false) { WorldMap_OtherRoleUpdateInfoProto proto = new WorldMap_OtherRoleUpdateInfoProto(); MMO_MemoryStream ms = null; if (!isChild) { ms = GameEntry.Socket.SocketSendMS; } else { ms = GameEntry.Pool.DequeueClassObject <MMO_MemoryStream>(); } ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.RoldId = ms.ReadInt(); proto.RoleNickName = ms.ReadUTF8String(); if (isChild) { GameEntry.Pool.EnqueueClassObject(ms); } return(proto); }
public static RoleOperation_CreateRoleProto GetProto(byte[] buffer, bool isChild = false) { RoleOperation_CreateRoleProto proto = new RoleOperation_CreateRoleProto(); MMO_MemoryStream ms = null; if (!isChild) { ms = GameEntry.Socket.SocketSendMS; } else { ms = GameEntry.Pool.DequeueClassObject <MMO_MemoryStream>(); } ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.JobId = (byte)ms.ReadByte(); proto.RoleNickName = ms.ReadUTF8String(); if (isChild) { GameEntry.Pool.EnqueueClassObject(ms); } return(proto); }
public static WorldMap_InitRoleProto GetProto(byte[] buffer) { WorldMap_InitRoleProto proto = new WorldMap_InitRoleProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.RoleCount = ms.ReadInt(); proto.ItemList = new List <RoleItem>(); for (int i = 0; i < proto.RoleCount; i++) { RoleItem _Item = new RoleItem(); _Item.RoleId = ms.ReadInt(); _Item.RoleNickName = ms.ReadUTF8String(); _Item.RoleLevel = ms.ReadInt(); _Item.RoleMaxHP = ms.ReadInt(); _Item.RoleCurrHP = ms.ReadInt(); _Item.RoleMaxMP = ms.ReadInt(); _Item.RoleCurrMP = ms.ReadInt(); _Item.RoleJobId = ms.ReadInt(); _Item.RolePosX = ms.ReadFloat(); _Item.RolePosY = ms.ReadFloat(); _Item.RolePosZ = ms.ReadFloat(); _Item.RoleYAngle = ms.ReadFloat(); proto.ItemList.Add(_Item); } } 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_CodeEntity entity = new Sys_CodeEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.Key = ms.ReadUTF8String(); m_List.Add(entity); m_Dic[entity.Id] = entity; } }
public static RoleOperation_SelectRoleInfoReturnProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { RoleOperation_SelectRoleInfoReturnProto proto = new RoleOperation_SelectRoleInfoReturnProto(); proto.IsSucess = ms.ReadBool(); if (proto.IsSucess) { proto.RoleNickName = ms.ReadUTF8String(); proto.Level = ms.ReadInt(); proto.RoleId = ms.ReadInt(); proto.JobId = ms.ReadInt(); proto.Money = ms.ReadInt(); proto.Gold = ms.ReadInt(); proto.Exp = ms.ReadInt(); proto.MaxHP = ms.ReadInt(); proto.CurrentHP = ms.ReadInt(); proto.MaxMP = ms.ReadInt(); proto.CurrentMP = ms.ReadInt(); proto.Attack = ms.ReadInt(); proto.Defense = ms.ReadInt(); proto.Hit = ms.ReadInt(); proto.Dodge = ms.ReadInt(); proto.Cri = ms.ReadInt(); proto.Fighting = ms.ReadInt(); proto.Res = ms.ReadInt(); proto.LastSceneId = ms.ReadInt(); } else { proto.MessageId = ms.ReadInt(); } return(proto); } }
public static WorldMap_InitRoleProto GetProto(MMO_MemoryStream ms, byte[] buffer) { WorldMap_InitRoleProto proto = new WorldMap_InitRoleProto(); ms.SetLength(0); ms.Write(buffer, 0, buffer.Length); ms.Position = 0; proto.RoleCount = ms.ReadInt(); proto.ItemList = new List <RoleItem>(); for (int i = 0; i < proto.RoleCount; i++) { RoleItem _Item = new RoleItem(); _Item.RoleId = ms.ReadInt(); _Item.RoleNickName = ms.ReadUTF8String(); _Item.RoleLevel = ms.ReadInt(); _Item.RoleMaxHP = ms.ReadInt(); _Item.RoleCurrHP = ms.ReadInt(); _Item.RoleMaxMP = ms.ReadInt(); _Item.RoleCurrMP = ms.ReadInt(); _Item.RoleJobId = ms.ReadInt(); _Item.RolePosX = ms.ReadFloat(); _Item.RolePosY = ms.ReadFloat(); _Item.RolePosZ = ms.ReadFloat(); _Item.RoleYAngle = ms.ReadFloat(); proto.ItemList.Add(_Item); } 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++) { TaskEntity entity = new TaskEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.Status = ms.ReadInt(); entity.Content = 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++) { MessageEntity entity = new MessageEntity(); entity.Id = ms.ReadInt(); entity.Msg = ms.ReadUTF8String(); entity.Module = ms.ReadUTF8String(); entity.Description = 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++) { JobEntity entity = new JobEntity(); entity.Id = ms.ReadInt(); entity.Name = ms.ReadUTF8String(); entity.HeadPic = ms.ReadUTF8String(); entity.JobPic = ms.ReadUTF8String(); entity.PrefabName = ms.ReadUTF8String(); entity.Desc = ms.ReadUTF8String(); entity.Attack = ms.ReadInt(); entity.Defense = ms.ReadInt(); entity.Hit = ms.ReadInt(); entity.Dodge = ms.ReadInt(); entity.Cri = ms.ReadInt(); entity.Res = ms.ReadInt(); entity.UsedPhyAttackIds = ms.ReadUTF8String(); entity.UsedSkillIds = 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++) { Sys_SoundEntity entity = new Sys_SoundEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.AssetPath = ms.ReadUTF8String(); entity.Is3D = ms.ReadInt(); entity.Volume = ms.ReadFloat(); 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++) { Sys_UIItemEntity entity = new Sys_UIItemEntity(); entity.Id = ms.ReadInt(); entity.Desc = ms.ReadUTF8String(); entity.Name = ms.ReadUTF8String(); entity.AssetPath_Chinese = ms.ReadUTF8String(); entity.AssetPath_English = 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++) { 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; } }
public static System_GameServerConfigReturnProto GetProto(byte[] buffer) { System_GameServerConfigReturnProto proto = new System_GameServerConfigReturnProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.ConfigCount = ms.ReadInt(); proto.ServerConfigList = new List <ConfigItem>(); for (int i = 0; i < proto.ConfigCount; i++) { ConfigItem _ServerConfig = new ConfigItem(); _ServerConfig.ConfigCode = ms.ReadUTF8String(); _ServerConfig.IsOpen = ms.ReadBool(); _ServerConfig.Param = ms.ReadUTF8String(); proto.ServerConfigList.Add(_ServerConfig); } } return(proto); }
public static RoleOperation_CreateRoleProto ToProto(byte[] buffer) { using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { RoleOperation_CreateRoleProto proto = new RoleOperation_CreateRoleProto(); proto.JobID = ms.ReadInt(); proto.NickName = ms.ReadUTF8String(); 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 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 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 RoleOperation_CreateRoleProto GetProto(byte[] buffer) { RoleOperation_CreateRoleProto proto = new RoleOperation_CreateRoleProto(); using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer)) { proto.JobId = (byte)ms.ReadByte(); proto.RoleNickName = ms.ReadUTF8String(); } return(proto); }