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


C# BigEndianReader.ReadVarInt方法代码示例

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


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

示例1: Deserialize

 public override void Deserialize(BigEndianReader 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[i] = Types.ProtocolTypeManager.GetInstance<Types.TreasureHuntStep>(reader.ReadShort());
          knownStepsList[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.ReadVarInt();
     if (checkPointCurrent < 0)
         throw new Exception("Forbidden value on checkPointCurrent = " + checkPointCurrent + ", it doesn't respect the following condition : checkPointCurrent < 0");
     checkPointTotal = reader.ReadVarInt();
     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[i] = new Types.TreasureHuntFlag();
          flags[i].Deserialize(reader);
     }
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:31,代码来源:TreasureHuntMessage.cs

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

示例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);
     objectGID = reader.ReadVarShort();
     if (objectGID < 0)
         throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0");
     var limit = reader.ReadUShort();
     effects = new Types.ObjectEffect[limit];
     for (int i = 0; i < limit; i++)
     {
          effects[i] = Types.ProtocolTypeManager.GetInstance<Types.ObjectEffect>(reader.ReadShort());
          effects[i].Deserialize(reader);
     }
     objectUID = reader.ReadVarInt();
     if (objectUID < 0)
         throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
     quantity = reader.ReadVarInt();
     if (quantity < 0)
         throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0");
     objectPrice = reader.ReadVarInt();
     if (objectPrice < 0)
         throw new Exception("Forbidden value on objectPrice = " + objectPrice + ", it doesn't respect the following condition : objectPrice < 0");
     publicPrice = reader.ReadVarInt();
     if (publicPrice < 0)
         throw new Exception("Forbidden value on publicPrice = " + publicPrice + ", it doesn't respect the following condition : publicPrice < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:26,代码来源:ObjectItemToSellInHumanVendorShop.cs

示例5: Deserialize

 public virtual void Deserialize(BigEndianReader reader)
 {
     //houseId = reader.ReadInt();
     houseId = reader.ReadVarInt();
     if (houseId < 0)
         throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
     modelId = reader.ReadVarInt();
     if (modelId < 0)
         throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0");
     ownerName = reader.ReadUTF();
     worldX = reader.ReadShort();
     if (worldX < -255 || worldX > 255)
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     worldY = reader.ReadShort();
     if (worldY < -255 || worldY > 255)
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     mapId = reader.ReadInt();
     subAreaId = reader.ReadVarShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     var limit = reader.ReadUShort();
     skillListIds = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          skillListIds[i] = reader.ReadInt();
     }
     guildshareParams = reader.ReadVarInt();
     if (guildshareParams < 0)
         throw new Exception("Forbidden value on guildshareParams = " + guildshareParams + ", it doesn't respect the following condition : guildshareParams < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:30,代码来源:HouseInformationsForGuild.cs

示例6: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     objectUID = reader.ReadVarInt();
     if (objectUID < 0)
         throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
     quantity = reader.ReadVarInt();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:7,代码来源:ExchangeObjectUseInWorkshopMessage.cs

示例7: Deserialize

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

示例8: Deserialize

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

示例9: Deserialize

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

示例10: Deserialize

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

示例11: Deserialize

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

示例12: Deserialize

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

示例13: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     initiatorId = reader.ReadVarInt();
     if (initiatorId < 0)
         throw new Exception("Forbidden value on initiatorId = " + initiatorId + ", it doesn't respect the following condition : initiatorId < 0");
     otherId = reader.ReadVarInt();
     if (otherId < 0)
         throw new Exception("Forbidden value on otherId = " + otherId + ", it doesn't respect the following condition : otherId < 0");
     role = reader.ReadSByte();
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:10,代码来源:ExchangeOkMultiCraftMessage.cs

示例14: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     houseId = reader.ReadVarInt();
     if (houseId < 0)
         throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
     bought = reader.ReadBoolean();
     realPrice = reader.ReadVarInt();
     if (realPrice < 0)
         throw new Exception("Forbidden value on realPrice = " + realPrice + ", it doesn't respect the following condition : realPrice < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:10,代码来源:HouseBuyResultMessage.cs

示例15: Deserialize

 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     min = reader.ReadVarInt();
     if (min < 0)
         throw new Exception("Forbidden value on min = " + min + ", it doesn't respect the following condition : min < 0");
     max = reader.ReadVarInt();
     if (max < 0)
         throw new Exception("Forbidden value on max = " + max + ", it doesn't respect the following condition : max < 0");
 }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:10,代码来源:ObjectEffectMinMax.cs


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