本文整理汇总了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");
}
示例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)");
}
示例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");
}
示例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");
}
示例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");
}
示例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)");
}
示例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);
}
示例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();
}
示例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)");
}
示例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();
}
}
示例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)");
}
示例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)");
}
示例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)");
}
示例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");
}
示例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();
}