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


C# ICustomDataInput.ReadUShort方法代码示例

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


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

示例1: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     quantities = new uint[limit];
     for (int i = 0; i < limit; i++)
     {
          (quantities as uint[])[i] = reader.ReadVarUhInt();
     }
     limit = reader.ReadUShort();
     types = new uint[limit];
     for (int i = 0; i < limit; i++)
     {
          (types as uint[])[i] = reader.ReadVarUhInt();
     }
     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.ReadVarUhInt();
     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.ReadVarUhShort();
     if (unsoldDelay < 0)
         throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:27,代码来源:SellerBuyerDescriptor.cs

示例2: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     effects = new Types.FightDispellableEffectExtendedInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          (effects as Types.FightDispellableEffectExtendedInformations[])[i] = new Types.FightDispellableEffectExtendedInformations();
          (effects as Types.FightDispellableEffectExtendedInformations[])[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     marks = new Types.GameActionMark[limit];
     for (int i = 0; i < limit; i++)
     {
          (marks as Types.GameActionMark[])[i] = new Types.GameActionMark();
          (marks as Types.GameActionMark[])[i].Deserialize(reader);
     }
     gameTurn = reader.ReadVarUhShort();
     if (gameTurn < 0)
         throw new Exception("Forbidden value on gameTurn = " + gameTurn + ", it doesn't respect the following condition : gameTurn < 0");
     fightStart = reader.ReadInt();
     if (fightStart < 0)
         throw new Exception("Forbidden value on fightStart = " + fightStart + ", it doesn't respect the following condition : fightStart < 0");
     limit = reader.ReadUShort();
     idols = new Types.Idol[limit];
     for (int i = 0; i < limit; i++)
     {
          (idols as Types.Idol[])[i] = new Types.Idol();
          (idols as Types.Idol[])[i].Deserialize(reader);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:30,代码来源:GameFightSpectateMessage.cs

示例3: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     finishedQuestsIds = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (finishedQuestsIds as ushort[])[i] = reader.ReadVarUhShort();
     }
     limit = reader.ReadUShort();
     finishedQuestsCounts = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (finishedQuestsCounts as ushort[])[i] = reader.ReadVarUhShort();
     }
     limit = reader.ReadUShort();
     activeQuests = new Types.QuestActiveInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          (activeQuests as Types.QuestActiveInformations[])[i] = Types.ProtocolTypeManager.GetInstance<Types.QuestActiveInformations>(reader.ReadShort());
          (activeQuests as Types.QuestActiveInformations[])[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     reinitDoneQuestsIds = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (reinitDoneQuestsIds as ushort[])[i] = reader.ReadVarUhShort();
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:28,代码来源:QuestListMessage.cs

示例4: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     bonesId = reader.ReadVarUhShort();
     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 List<ushort>();
     for (int i = 0; i < limit; i++)
     {
         skins.Add(reader.ReadVarUhShort());
     }
     limit = reader.ReadUShort();
     indexedColors = new List<int>();
     for (int i = 0; i < limit; i++)
     {
         indexedColors.Add(reader.ReadInt());
     }
     limit = reader.ReadUShort();
     scales = new List<short>();
     for (int i = 0; i < limit; i++)
     {
         scales.Add(reader.ReadVarShort());
     }
     limit = reader.ReadUShort();
     subentities = new List<SubEntity>();
     for (int i = 0; i < limit; i++)
     {
          var subentity = new Types.SubEntity();
         subentity.Deserialize(reader);
         subentities.Add(subentity);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:32,代码来源:EntityLook.cs

示例5: Deserialize

 public virtual void Deserialize(ICustomDataInput 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 as Types.FightTeamLightInformations[])[i] = new Types.FightTeamLightInformations();
          (fightTeams as Types.FightTeamLightInformations[])[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fightTeamsOptions = new Types.FightOptionsInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          (fightTeamsOptions as Types.FightOptionsInformations[])[i] = new Types.FightOptionsInformations();
          (fightTeamsOptions as Types.FightOptionsInformations[])[i].Deserialize(reader);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:25,代码来源:FightExternalInformations.cs

示例6: Deserialize

 public override void Deserialize(ICustomDataInput 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:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:QueueStatusMessage.cs

示例7: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     address = reader.ReadUTF();
     port = reader.ReadUShort();
     if ((port < 0) || (port > 65535))
         throw new Exception("Forbidden value on port = " + port + ", it doesn't respect the following condition : (port < 0) || (port > 65535)");
     var limit = reader.ReadUShort();
     ticket = new sbyte[limit];
     for (int i = 0; i < limit; i++)
     {
          (ticket as sbyte[])[i] = reader.ReadSByte();
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:13,代码来源:GameRolePlayArenaSwitchToFightServerMessage.cs

示例8: Deserialize

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

示例9: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     questsToValidId = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (questsToValidId as ushort[])[i] = reader.ReadVarUhShort();
     }
     limit = reader.ReadUShort();
     questsToStartId = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (questsToStartId as ushort[])[i] = reader.ReadVarUhShort();
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:15,代码来源:GameRolePlayNpcQuestFlag.cs

示例10: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     playerIds = new uint[limit];
     for (int i = 0; i < limit; i++)
     {
          (playerIds as uint[])[i] = reader.ReadVarUhInt();
     }
     limit = reader.ReadUShort();
     enable = new sbyte[limit];
     for (int i = 0; i < limit; i++)
     {
          (enable as sbyte[])[i] = reader.ReadSByte();
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:15,代码来源:UpdateMapPlayersAgressableStatusMessage.cs

示例11: Deserialize

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

示例12: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     var limit = reader.ReadUShort();
     finishedAchievementsIds = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (finishedAchievementsIds as ushort[])[i] = reader.ReadVarUhShort();
     }
     limit = reader.ReadUShort();
     rewardableAchievements = new Types.AchievementRewardable[limit];
     for (int i = 0; i < limit; i++)
     {
          (rewardableAchievements as Types.AchievementRewardable[])[i] = new Types.AchievementRewardable();
          (rewardableAchievements as Types.AchievementRewardable[])[i].Deserialize(reader);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:16,代码来源:AchievementListMessage.cs

示例13: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     tutorialAvailable = BooleanByteWrapper.GetFlag(flag1, 0);
     canCreateNewCharacter = BooleanByteWrapper.GetFlag(flag1, 1);
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     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:thomasvinot,项目名称:Symbioz,代码行数:16,代码来源:AccountCapabilitiesMessage.cs

示例14: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     markAuthorId = reader.ReadInt();
     markTeamId = reader.ReadSByte();
     if (markTeamId < 0)
         throw new Exception("Forbidden value on markTeamId = " + markTeamId + ", it doesn't respect the following condition : markTeamId < 0");
     markSpellId = reader.ReadInt();
     if (markSpellId < 0)
         throw new Exception("Forbidden value on markSpellId = " + markSpellId + ", it doesn't respect the following condition : markSpellId < 0");
     markSpellLevel = reader.ReadSByte();
     if ((markSpellLevel < 1) || (markSpellLevel > 6))
         throw new Exception("Forbidden value on markSpellLevel = " + markSpellLevel + ", it doesn't respect the following condition : (markSpellLevel < 1) || (markSpellLevel > 6)");
     markId = reader.ReadShort();
     markType = reader.ReadSByte();
     markimpactCell = reader.ReadShort();
     if ((markimpactCell < -1) || (markimpactCell > 559))
         throw new Exception("Forbidden value on markimpactCell = " + markimpactCell + ", it doesn't respect the following condition : (markimpactCell < -1) || (markimpactCell > 559)");
     var limit = reader.ReadUShort();
     cells = new Types.GameActionMarkedCell[limit];
     for (int i = 0; i < limit; i++)
     {
          (cells as Types.GameActionMarkedCell[])[i] = new Types.GameActionMarkedCell();
          (cells as Types.GameActionMarkedCell[])[i].Deserialize(reader);
     }
     active = reader.ReadBoolean();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:26,代码来源:GameActionMark.cs

示例15: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     questType = reader.ReadSByte();
     if (questType < 0)
         throw new Exception("Forbidden value on questType = " + questType + ", it doesn't respect the following condition : questType < 0");
     startMapId = reader.ReadInt();
     var limit = reader.ReadUShort();
     knownStepsList = new Types.TreasureHuntStep[limit];
     for (int i = 0; i < limit; i++)
     {
          (knownStepsList as Types.TreasureHuntStep[])[i] = Types.ProtocolTypeManager.GetInstance<Types.TreasureHuntStep>(reader.ReadShort());
          (knownStepsList as Types.TreasureHuntStep[])[i].Deserialize(reader);
     }
     totalStepCount = reader.ReadSByte();
     if (totalStepCount < 0)
         throw new Exception("Forbidden value on totalStepCount = " + totalStepCount + ", it doesn't respect the following condition : totalStepCount < 0");
     checkPointCurrent = reader.ReadVarUhInt();
     if (checkPointCurrent < 0)
         throw new Exception("Forbidden value on checkPointCurrent = " + checkPointCurrent + ", it doesn't respect the following condition : checkPointCurrent < 0");
     checkPointTotal = reader.ReadVarUhInt();
     if (checkPointTotal < 0)
         throw new Exception("Forbidden value on checkPointTotal = " + checkPointTotal + ", it doesn't respect the following condition : checkPointTotal < 0");
     availableRetryCount = reader.ReadInt();
     limit = reader.ReadUShort();
     flags = new Types.TreasureHuntFlag[limit];
     for (int i = 0; i < limit; i++)
     {
          (flags as Types.TreasureHuntFlag[])[i] = new Types.TreasureHuntFlag();
          (flags as Types.TreasureHuntFlag[])[i].Deserialize(reader);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:31,代码来源:TreasureHuntMessage.cs


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