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


C# ICustomDataInput.ReadByte方法代码示例

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


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

示例1: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     enabled = BooleanByteWrapper.GetFlag(flag1, 0);
     abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
     level = reader.ReadByte();
     if ((level < 0) || (level > 255))
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : (level < 0) || (level > 255)");
     expLevelFloor = reader.ReadVarUhLong();
     if ((expLevelFloor < 0) || (expLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on expLevelFloor = " + expLevelFloor + ", it doesn't respect the following condition : (expLevelFloor < 0) || (expLevelFloor > 9.007199254740992E15)");
     experience = reader.ReadVarUhLong();
     if ((experience < 0) || (experience > 9.007199254740992E15))
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : (experience < 0) || (experience > 9.007199254740992E15)");
     expNextLevelFloor = reader.ReadVarUhLong();
     if ((expNextLevelFloor < 0) || (expNextLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on expNextLevelFloor = " + expNextLevelFloor + ", it doesn't respect the following condition : (expNextLevelFloor < 0) || (expNextLevelFloor > 9.007199254740992E15)");
     creationDate = reader.ReadInt();
     if (creationDate < 0)
         throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0");
     nbTotalMembers = reader.ReadVarUhShort();
     if (nbTotalMembers < 0)
         throw new Exception("Forbidden value on nbTotalMembers = " + nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0");
     nbConnectedMembers = reader.ReadVarUhShort();
     if (nbConnectedMembers < 0)
         throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:27,代码来源:GuildInformationsGeneralMessage.cs

示例2: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     jobId = reader.ReadSByte();
     if (jobId < 0)
         throw new Exception("Forbidden value on jobId = " + jobId + ", it doesn't respect the following condition : jobId < 0");
     jobLevel = reader.ReadByte();
     if ((jobLevel < 1) || (jobLevel > 200))
         throw new Exception("Forbidden value on jobLevel = " + jobLevel + ", it doesn't respect the following condition : (jobLevel < 1) || (jobLevel > 200)");
     free = reader.ReadBoolean();
     minLevel = reader.ReadByte();
     if ((minLevel < 0) || (minLevel > 255))
         throw new Exception("Forbidden value on minLevel = " + minLevel + ", it doesn't respect the following condition : (minLevel < 0) || (minLevel > 255)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:13,代码来源:JobCrafterDirectoryEntryJobInfo.cs

示例3: 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

示例4: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     showExperience = BooleanByteWrapper.GetFlag(flag1, 0);
     showExperienceLevelFloor = BooleanByteWrapper.GetFlag(flag1, 1);
     showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(flag1, 2);
     showExperienceFightDelta = BooleanByteWrapper.GetFlag(flag1, 3);
     showExperienceForGuild = BooleanByteWrapper.GetFlag(flag1, 4);
     showExperienceForMount = BooleanByteWrapper.GetFlag(flag1, 5);
     isIncarnationExperience = BooleanByteWrapper.GetFlag(flag1, 6);
     experience = reader.ReadVarUhLong();
     if ((experience < 0) || (experience > 9.007199254740992E15))
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : (experience < 0) || (experience > 9.007199254740992E15)");
     experienceLevelFloor = reader.ReadVarUhLong();
     if ((experienceLevelFloor < 0) || (experienceLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : (experienceLevelFloor < 0) || (experienceLevelFloor > 9.007199254740992E15)");
     experienceNextLevelFloor = reader.ReadDouble();
     if ((experienceNextLevelFloor < 0) || (experienceNextLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : (experienceNextLevelFloor < 0) || (experienceNextLevelFloor > 9.007199254740992E15)");
     experienceFightDelta = reader.ReadVarInt();
     experienceForGuild = reader.ReadVarUhInt();
     if (experienceForGuild < 0)
         throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0");
     experienceForMount = reader.ReadVarUhInt();
     if (experienceForMount < 0)
         throw new Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0");
     rerollExperienceMul = reader.ReadSByte();
     if (rerollExperienceMul < 0)
         throw new Exception("Forbidden value on rerollExperienceMul = " + rerollExperienceMul + ", it doesn't respect the following condition : rerollExperienceMul < 0");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:31,代码来源:FightResultExperienceData.cs

示例5: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     self = BooleanByteWrapper.GetFlag(flag1, 0);
     verbose = BooleanByteWrapper.GetFlag(flag1, 1);
     position = reader.ReadSByte();
     accountNickname = reader.ReadUTF();
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     playerName = reader.ReadUTF();
     playerId = reader.ReadVarUhInt();
     if (playerId < 0)
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     areaId = reader.ReadShort();
     var limit = reader.ReadUShort();
     socialGroups = new Types.AbstractSocialGroupInfos[limit];
     for (int i = 0; i < limit; i++)
     {
          (socialGroups as Types.AbstractSocialGroupInfos[])[i] = Types.ProtocolTypeManager.GetInstance<Types.AbstractSocialGroupInfos>(reader.ReadShort());
          (socialGroups as Types.AbstractSocialGroupInfos[])[i].Deserialize(reader);
     }
     playerState = reader.ReadSByte();
     if (playerState < 0)
         throw new Exception("Forbidden value on playerState = " + playerState + ", it doesn't respect the following condition : playerState < 0");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:26,代码来源:BasicWhoIsMessage.cs

示例6: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     emoteId = reader.ReadByte();
     if ((emoteId < 0) || (emoteId > 255))
         throw new Exception("Forbidden value on emoteId = " + emoteId + ", it doesn't respect the following condition : (emoteId < 0) || (emoteId > 255)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:7,代码来源:ShortcutEmote.cs

示例7: Deserialize

 public virtual void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     isSecret = BooleanByteWrapper.GetFlag(flag1, 0);
     isRestrictedToPartyOnly = BooleanByteWrapper.GetFlag(flag1, 1);
     isClosed = BooleanByteWrapper.GetFlag(flag1, 2);
     isAskingForHelp = BooleanByteWrapper.GetFlag(flag1, 3);
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:8,代码来源:FightOptionsInformations.cs

示例8: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     lockDuration = reader.ReadByte();
     if ((lockDuration < 0) || (lockDuration > 255))
         throw new Exception("Forbidden value on lockDuration = " + lockDuration + ", it doesn't respect the following condition : (lockDuration < 0) || (lockDuration > 255)");
     author = reader.ReadUTF();
     content = reader.ReadUTF();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:8,代码来源:PopupWarningMessage.cs

示例9: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     emoteId = reader.ReadByte();
     if ((emoteId < 0) || (emoteId > 255))
         throw new Exception("Forbidden value on emoteId = " + emoteId + ", it doesn't respect the following condition : (emoteId < 0) || (emoteId > 255)");
     emoteStartTime = reader.ReadDouble();
     if ((emoteStartTime < -9.007199254740992E15) || (emoteStartTime > 9.007199254740992E15))
         throw new Exception("Forbidden value on emoteStartTime = " + emoteStartTime + ", it doesn't respect the following condition : (emoteStartTime < -9.007199254740992E15) || (emoteStartTime > 9.007199254740992E15)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:EmotePlayAbstractMessage.cs

示例10: Deserialize

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

示例11: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     skillId = reader.ReadVarUhInt();
     if (skillId < 0)
         throw new Exception("Forbidden value on skillId = " + skillId + ", it doesn't respect the following condition : skillId < 0");
     crafterJobLevel = reader.ReadByte();
     if ((crafterJobLevel < 0) || (crafterJobLevel > 255))
         throw new Exception("Forbidden value on crafterJobLevel = " + crafterJobLevel + ", it doesn't respect the following condition : (crafterJobLevel < 0) || (crafterJobLevel > 255)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:ExchangeStartOkMulticraftCustomerMessage.cs

示例12: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     hostUID = reader.ReadVarUhInt();
     if (hostUID < 0)
         throw new Exception("Forbidden value on hostUID = " + hostUID + ", it doesn't respect the following condition : hostUID < 0");
     hostPos = reader.ReadByte();
     if ((hostPos < 0) || (hostPos > 255))
         throw new Exception("Forbidden value on hostPos = " + hostPos + ", it doesn't respect the following condition : (hostPos < 0) || (hostPos > 255)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:WrapperObjectDissociateRequestMessage.cs

示例13: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     objectUID = reader.ReadVarUhInt();
     if (objectUID < 0)
         throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
     position = reader.ReadByte();
     if ((position < 0) || (position > 255))
         throw new Exception("Forbidden value on position = " + position + ", it doesn't respect the following condition : (position < 0) || (position > 255)");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:ObjectMovementMessage.cs

示例14: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     success = BooleanByteWrapper.GetFlag(flag1, 0);
     automaticAction = BooleanByteWrapper.GetFlag(flag1, 1);
     actionId = reader.ReadInt();
     if (actionId < 0)
         throw new Exception("Forbidden value on actionId = " + actionId + ", it doesn't respect the following condition : actionId < 0");
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:9,代码来源:StartupActionFinishedMessage.cs

示例15: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     level = reader.ReadByte();
     if ((level < 1) || (level > 200))
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : (level < 1) || (level > 200)");
     guildInfo = new Types.BasicGuildInformations();
     guildInfo.Deserialize(reader);
     experienceForGuild = reader.ReadInt();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:10,代码来源:FightResultTaxCollectorListEntry.cs


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