当前位置: 首页>>代码示例>>C#>>正文


C# BigEndianReader.ReadUShort方法代码示例

本文整理汇总了C#中BlueSheep.Common.IO.BigEndianReader.ReadUShort方法的典型用法代码示例。如果您正苦于以下问题:C# BigEndianReader.ReadUShort方法的具体用法?C# BigEndianReader.ReadUShort怎么用?C# BigEndianReader.ReadUShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BlueSheep.Common.IO.BigEndianReader的用法示例。


在下文中一共展示了BigEndianReader.ReadUShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     fightSpectatorLocked = reader.ReadBoolean();
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamLightInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = new Types.FightTeamLightInformations();
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:25,代码来源:FightExternalInformations.cs

示例2: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     var limit = reader.ReadUShort();
     charactersToRecolor = new Types.CharacterToRecolorInformation[limit];
     for (int i = 0; i < limit; i++)
     {
          charactersToRecolor[i] = new Types.CharacterToRecolorInformation();
          charactersToRecolor[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     charactersToRename = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          charactersToRename[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     unusableCharacters = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          unusableCharacters[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     charactersToRelook = new Types.CharacterToRelookInformation[limit];
     for (int i = 0; i < limit; i++)
     {
          charactersToRelook[i] = new Types.CharacterToRelookInformation();
          charactersToRelook[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:30,代码来源:CharactersListWithModificationsMessage.cs

示例3: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     quantities = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          quantities[i] = reader.ReadVarInt();
     }
     limit = reader.ReadUShort();
     types = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          types[i] = reader.ReadVarInt();
     }
     taxPercentage = reader.ReadFloat();
     taxModificationPercentage = reader.ReadFloat();
     maxItemLevel = reader.ReadByte();
     if (maxItemLevel < 0 || maxItemLevel > 255)
         throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0 || maxItemLevel > 255");
     maxItemPerAccount = reader.ReadVarInt();
     if (maxItemPerAccount < 0)
         throw new Exception("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0");
     npcContextualId = reader.ReadInt();
     unsoldDelay = reader.ReadVarShort();
     if (unsoldDelay < 0)
         throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:27,代码来源:SellerBuyerDescriptor.cs

示例4: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     partyType = reader.ReadSByte();
     if (partyType < 0)
         throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
     partyLeaderId = reader.ReadVarInt();
     if (partyLeaderId < 0)
         throw new Exception("Forbidden value on partyLeaderId = " + partyLeaderId + ", it doesn't respect the following condition : partyLeaderId < 0");
     maxParticipants = reader.ReadSByte();
     if (maxParticipants < 0)
         throw new Exception("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0");
     var limit = reader.ReadUShort();
     members = new Types.PartyMemberInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          members[i] = Types.ProtocolTypeManager.GetInstance<Types.PartyMemberInformations>(reader.ReadShort());
          members[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     guests = new Types.PartyGuestInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          guests[i] = new Types.PartyGuestInformations();
          guests[i].Deserialize(reader);
     }
     restricted = reader.ReadBoolean();
     partyName = reader.ReadUTF();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:29,代码来源:PartyJoinMessage.cs

示例5: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     bonesId = reader.ReadVarShort();
     if (bonesId < 0)
         throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
     var limit = reader.ReadUShort();
     skins = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          skins[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     indexedColors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          indexedColors[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     scales = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          scales[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     subentities = new Types.SubEntity[limit];
     for (int i = 0; i < limit; i++)
     {
          subentities[i] = new Types.SubEntity();
          subentities[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:31,代码来源:EntityLook.cs

示例6: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     partyType = reader.ReadSByte();
     if (partyType < 0)
         throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
     partyName = reader.ReadUTF();
     fromId = reader.ReadVarInt();
     if (fromId < 0)
         throw new Exception("Forbidden value on fromId = " + fromId + ", it doesn't respect the following condition : fromId < 0");
     fromName = reader.ReadUTF();
     leaderId = reader.ReadVarInt();
     if (leaderId < 0)
         throw new Exception("Forbidden value on leaderId = " + leaderId + ", it doesn't respect the following condition : leaderId < 0");
     var limit = reader.ReadUShort();
     members = new Types.PartyInvitationMemberInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          members[i] = new Types.PartyInvitationMemberInformations();
          members[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     guests = new Types.PartyGuestInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          guests[i] = new Types.PartyGuestInformations();
          guests[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:29,代码来源:PartyInvitationDetailsMessage.cs

示例7: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     fightId = reader.ReadInt();
     fightType = reader.ReadSByte();
     if (fightType < 0)
         throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
     var limit = reader.ReadUShort();
     fightTeams = new Types.FightTeamInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeams[i] = Types.ProtocolTypeManager.GetInstance<Types.FightTeamInformations>(reader.ReadShort());
          fightTeams[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsPositions = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsPositions[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fightTeamsOptions[i] = new Types.FightOptionsInformations();
          fightTeamsOptions[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:27,代码来源:FightCommonInformations.cs

示例8: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     teleporterType = reader.ReadSByte();
     if (teleporterType < 0)
         throw new Exception("Forbidden value on teleporterType = " + teleporterType + ", it doesn't respect the following condition : teleporterType < 0");
     var limit = reader.ReadUShort();
     mapIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          mapIds[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     subAreaIds = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          subAreaIds[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     costs = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          costs[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     destTeleporterType = new sbyte[limit];
     for (int i = 0; i < limit; i++)
     {
          destTeleporterType[i] = reader.ReadSByte();
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:30,代码来源:TeleportDestinationsListMessage.cs

示例9: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     position = reader.ReadUShort();
     if (position < 0 || position > 65535)
         throw new Exception("Forbidden value on position = " + position + ", it doesn't respect the following condition : position < 0 || position > 65535");
     total = reader.ReadUShort();
     if (total < 0 || total > 65535)
         throw new Exception("Forbidden value on total = " + total + ", it doesn't respect the following condition : total < 0 || total > 65535");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:9,代码来源:QueueStatusMessage.cs

示例10: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     subAreaId = reader.ReadVarShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     mapId = reader.ReadInt();
     if (mapId < 0)
         throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
     var limit = reader.ReadUShort();
     houses = new Types.HouseInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          houses[i] = Types.ProtocolTypeManager.GetInstance<Types.HouseInformations>(reader.ReadShort());
          houses[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     actors = new Types.GameRolePlayActorInformations[limit];
     for (int i = 0; i < limit; i++)
     {
         short id = reader.ReadShort();
         actors[i] = Types.ProtocolTypeManager.GetInstance<Types.GameRolePlayActorInformations>(id);
         actors[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     interactiveElements = new Types.InteractiveElement[limit];
     for (int i = 0; i < limit; i++)
     {
          interactiveElements[i] = Types.ProtocolTypeManager.GetInstance<Types.InteractiveElement>(reader.ReadShort());
          interactiveElements[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     statedElements = new Types.StatedElement[limit];
     for (int i = 0; i < limit; i++)
     {
          statedElements[i] = new Types.StatedElement();
          statedElements[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     obstacles = new Types.MapObstacle[limit];
     for (int i = 0; i < limit; i++)
     {
          obstacles[i] = new Types.MapObstacle();
          obstacles[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fights = new Types.FightCommonInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fights[i] = new Types.FightCommonInformations();
          fights[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:52,代码来源:MapComplementaryInformationsDataMessage.cs

示例11: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     tutorialAvailable = reader.ReadBoolean();
     breedsVisible = reader.ReadUShort();
     if (breedsVisible < 0 || breedsVisible > 65535)
         throw new Exception("Forbidden value on breedsVisible = " + breedsVisible + ", it doesn't respect the following condition : breedsVisible < 0 || breedsVisible > 65535");
     breedsAvailable = reader.ReadUShort();
     if (breedsAvailable < 0 || breedsAvailable > 65535)
         throw new Exception("Forbidden value on breedsAvailable = " + breedsAvailable + ", it doesn't respect the following condition : breedsAvailable < 0 || breedsAvailable > 65535");
     status = reader.ReadSByte();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:14,代码来源:AccountCapabilitiesMessage.cs

示例12: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     targetIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          targetIds[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     targetCells = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          targetCells[i] = reader.ReadShort();
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:15,代码来源:ChallengeTargetsListMessage.cs

示例13: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     channels = new sbyte[limit];
     for (int i = 0; i < limit; i++)
     {
          channels[i] = reader.ReadSByte();
     }
     limit = reader.ReadUShort();
     disallowed = new sbyte[limit];
     for (int i = 0; i < limit; i++)
     {
          disallowed[i] = reader.ReadSByte();
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:15,代码来源:EnabledChannelsMessage.cs

示例14: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     ids = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          ids[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     deadsIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          deadsIds[i] = reader.ReadInt();
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:15,代码来源:GameFightTurnListMessage.cs

示例15: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     ids = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          ids[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     avgPrices = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          avgPrices[i] = reader.ReadVarInt();
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:15,代码来源:ObjectAveragePricesMessage.cs


注:本文中的BlueSheep.Common.IO.BigEndianReader.ReadUShort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。