本文整理汇总了C#中BlueSheep.Common.IO.BigEndianReader.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# BigEndianReader.ReadByte方法的具体用法?C# BigEndianReader.ReadByte怎么用?C# BigEndianReader.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlueSheep.Common.IO.BigEndianReader
的用法示例。
在下文中一共展示了BigEndianReader.ReadByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize(BigEndianReader 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.ReadVarShort();
if (nbTotalMembers < 0)
throw new Exception("Forbidden value on nbTotalMembers = " + nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0");
nbConnectedMembers = reader.ReadVarShort();
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(BigEndianReader reader)
{
var _loc_2 = reader.ReadByte();
this.cantBeAggressed = BooleanByteWrapper.GetFlag(_loc_2, 0);
this.cantBeChallenged = BooleanByteWrapper.GetFlag(_loc_2, 1);
this.cantTrade = BooleanByteWrapper.GetFlag(_loc_2, 2);
this.cantBeAttackedByMutant = BooleanByteWrapper.GetFlag(_loc_2, 3);
this.cantRun = BooleanByteWrapper.GetFlag(_loc_2, 4);
this.forceSlowWalk = BooleanByteWrapper.GetFlag(_loc_2, 5);
this.cantMinimize = BooleanByteWrapper.GetFlag(_loc_2, 6);
this.cantMove = BooleanByteWrapper.GetFlag(_loc_2, 7);
var _loc_3 = reader.ReadByte();
this.cantAggress = BooleanByteWrapper.GetFlag(_loc_3, 0);
this.cantChallenge = BooleanByteWrapper.GetFlag(_loc_3, 1);
this.cantExchange = BooleanByteWrapper.GetFlag(_loc_3, 2);
this.cantAttack = BooleanByteWrapper.GetFlag(_loc_3, 3);
this.cantChat = BooleanByteWrapper.GetFlag(_loc_3, 4);
this.cantBeMerchant = BooleanByteWrapper.GetFlag(_loc_3, 5);
this.cantUseObject = BooleanByteWrapper.GetFlag(_loc_3, 6);
this.cantUseTaxCollector = BooleanByteWrapper.GetFlag(_loc_3, 7);
var _loc_4 = reader.ReadByte();
this.cantUseInteractive = BooleanByteWrapper.GetFlag(_loc_4, 0);
this.cantSpeakToNPC = BooleanByteWrapper.GetFlag(_loc_4, 1);
this.cantChangeZone = BooleanByteWrapper.GetFlag(_loc_4, 2);
this.cantAttackMonster = BooleanByteWrapper.GetFlag(_loc_4, 3);
this.cantWalk8Directions = BooleanByteWrapper.GetFlag(_loc_4, 4);
}
示例3: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
guildLevel = reader.ReadByte();
if (guildLevel < 1 || guildLevel > 200)
throw new Exception("Forbidden value on guildLevel = " + guildLevel + ", it doesn't respect the following condition : guildLevel < 1 || guildLevel > 200");
nbMembers = reader.ReadByte();
if (nbMembers < 1 || nbMembers > 240)
throw new Exception("Forbidden value on nbMembers = " + nbMembers + ", it doesn't respect the following condition : nbMembers < 1 || nbMembers > 240");
enabled = reader.ReadBoolean();
}
示例4: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
guildId = reader.ReadVarInt();
if (guildId < 0)
throw new Exception("Forbidden value on guildId = " + guildId + ", it doesn't respect the following condition : guildId < 0");
leaderId = reader.ReadVarInt();
if (leaderId < 0)
throw new Exception("Forbidden value on leaderId = " + leaderId + ", it doesn't respect the following condition : leaderId < 0");
guildLevel = reader.ReadByte();
if (guildLevel < 1 || guildLevel > 200)
throw new Exception("Forbidden value on guildLevel = " + guildLevel + ", it doesn't respect the following condition : guildLevel < 1 || guildLevel > 200");
nbMembers = reader.ReadByte();
if (nbMembers < 1 || nbMembers > 240)
throw new Exception("Forbidden value on nbMembers = " + nbMembers + ", it doesn't respect the following condition : nbMembers < 1 || nbMembers > 240");
}
示例5: Deserialize
public override void Deserialize(BigEndianReader reader)
{
symbioteUID = reader.ReadVarInt();
if (symbioteUID < 0)
throw new Exception("Forbidden value on symbioteUID = " + symbioteUID + ", it doesn't respect the following condition : symbioteUID < 0");
symbiotePos = reader.ReadByte();
if (symbiotePos < 0 || symbiotePos > 255)
throw new Exception("Forbidden value on symbiotePos = " + symbiotePos + ", it doesn't respect the following condition : symbiotePos < 0 || symbiotePos > 255");
hostUID = reader.ReadVarInt();
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");
}
示例6: Deserialize
public override void Deserialize(BigEndianReader reader)
{
byte flag1 = reader.ReadByte();
success = BooleanByteWrapper.GetFlag(flag1, 0);
session = BooleanByteWrapper.GetFlag(flag1, 1);
name = reader.ReadUTF();
}
示例7: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
byte b= reader.ReadByte();
this.showExperience = BooleanByteWrapper.GetFlag(b,0);
this.showExperienceLevelFloor = BooleanByteWrapper.GetFlag(b, 1);
this.showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(b, 2);
this.showExperienceFightDelta = BooleanByteWrapper.GetFlag(b, 3);
this.showExperienceForGuild = BooleanByteWrapper.GetFlag(b, 4);
this.showExperienceForMount = BooleanByteWrapper.GetFlag(b, 5);
this.isIncarnationExperience = BooleanByteWrapper.GetFlag(b, 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.ReadVarInt();
if (experienceForGuild < 0)
throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0");
experienceForMount = reader.ReadVarInt();
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");
}
示例8: 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");
}
示例9: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
time = reader.ReadByte();
if (time < 0 || time > 255)
throw new Exception("Forbidden value on time = " + time + ", it doesn't respect the following condition : time < 0 || time > 255");
}
示例10: Deserialize
public override void Deserialize(BigEndianReader 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");
}
示例11: Deserialize
public override void Deserialize(BigEndianReader 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.ReadVarInt();
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[i] = Types.ProtocolTypeManager.GetInstance<Types.AbstractSocialGroupInfos>(reader.ReadShort());
socialGroups[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");
}
示例12: Deserialize
public override void Deserialize(BigEndianReader reader)
{
byte flag1 = reader.ReadByte();
autoconnect = BooleanByteWrapper.GetFlag(flag1, 0);
useCertificate = BooleanByteWrapper.GetFlag(flag1, 1);
useLoginToken = BooleanByteWrapper.GetFlag(flag1, 2);
version = new Types.VersionExtended();
version.Deserialize(reader);
lang = reader.ReadUTF();
var limit = reader.ReadVarInt();
credentials = new sbyte[limit];
for (int i = 0; i < limit; i++)
{
credentials[i] = reader.ReadSByte();
}
serverId = reader.ReadShort();
sessionOptionalSalt = reader.ReadDouble();
if (sessionOptionalSalt < -9.007199254740992E15 || sessionOptionalSalt > 9.007199254740992E15)
throw new Exception("Forbidden value on sessionOptionalSalt = " + sessionOptionalSalt + ", it doesn't respect the following condition : sessionOptionalSalt < -9.007199254740992E15 || sessionOptionalSalt > 9.007199254740992E15");
ushort length = reader.ReadUShort();
failedAttempts = new List<short>();
for (int i = 0; i < length; i++)
{
failedAttempts.Add(reader.ReadVarShort());
}
}
示例13: Deserialize
public override void Deserialize(BigEndianReader 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();
}
示例14: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
byte _loc2_ = reader.ReadByte();
this.isSecret = BooleanByteWrapper.GetFlag(_loc2_,0);
this.isRestrictedToPartyOnly = BooleanByteWrapper.GetFlag(_loc2_,1);
this.isClosed = BooleanByteWrapper.GetFlag(_loc2_,2);
this.isAskingForHelp = BooleanByteWrapper.GetFlag(_loc2_,3);
}
示例15: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
ownerName = reader.ReadUTF();
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");
}