本文整理汇总了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();
}
}
示例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);
}
}
示例3: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
mountId = reader.ReadVarInt();
}
示例4: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
quantity = reader.ReadVarInt();
}
示例5: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
kamasTotal = reader.ReadVarInt();
}
示例6: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
int n = reader.ReadVarInt();
this._content = reader.ReadBytes((int)n);
}
示例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");
}