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


C# ICustomDataInput.ReadVarInt方法代码示例

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


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

示例1: Deserialize

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

示例2: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     rideId = reader.ReadVarInt();
     var limit = reader.ReadUShort();
     boostToUpdateList = new Types.UpdateMountBoost[limit];
     for (int i = 0; i < limit; i++)
     {
          (boostToUpdateList as Types.UpdateMountBoost[])[i] = Types.ProtocolTypeManager.GetInstance<Types.UpdateMountBoost>(reader.ReadShort());
          (boostToUpdateList as Types.UpdateMountBoost[])[i].Deserialize(reader);
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:11,代码来源:UpdateMountBoostMessage.cs

示例3: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     mountId = reader.ReadVarInt();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:4,代码来源:MountSterilizedMessage.cs

示例4: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     quantity = reader.ReadVarInt();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:4,代码来源:ExchangeObjectMoveKamaMessage.cs

示例5: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     kamasTotal = reader.ReadVarInt();
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:4,代码来源:KamasUpdateMessage.cs

示例6: Deserialize

 public override void Deserialize(ICustomDataInput reader)
 {
     int n = reader.ReadVarInt();
     this._content = reader.ReadBytes((int)n);
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:5,代码来源:RawDataMessage.cs

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


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