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


C# ICustomDataInput.ReadFloat方法代码示例

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


在下文中一共展示了ICustomDataInput.ReadFloat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 virtual 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");
     bonusMin = reader.ReadFloat();
     bonusMax = reader.ReadFloat();
     var limit = reader.ReadUShort();
     runesId = new ushort[limit];
     for (int i = 0; i < limit; i++)
     {
          (runesId as ushort[])[i] = reader.ReadVarUhShort();
     }
     limit = reader.ReadUShort();
     runesQty = new uint[limit];
     for (int i = 0; i < limit; i++)
     {
          (runesQty as uint[])[i] = reader.ReadVarUhInt();
     }
 }
开发者ID:thomasvinot,项目名称:Symbioz,代码行数:20,代码来源:DecraftedItemStackInfo.cs


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