本文整理汇总了C#中IDataReader.ReadSByte方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadSByte方法的具体用法?C# IDataReader.ReadSByte怎么用?C# IDataReader.ReadSByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.ReadSByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize(IDataReader reader)
{
playerId = reader.ReadInt();
if ( playerId < 0 )
{
throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
}
playerName = reader.ReadUTF();
alignmentSide = reader.ReadSByte();
breed = reader.ReadSByte();
if ( breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Steamer )
{
throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Steamer");
}
sex = reader.ReadBoolean();
isInWorkshop = reader.ReadBoolean();
worldX = reader.ReadShort();
if ( worldX < -255 || worldX > 255 )
{
throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
}
worldY = reader.ReadShort();
if ( worldY < -255 || worldY > 255 )
{
throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
}
mapId = reader.ReadInt();
subAreaId = reader.ReadShort();
if ( subAreaId < 0 )
{
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
}
}
示例2: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
partyType = reader.ReadSByte();
if (partyType < 0)
throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
partyLeaderId = reader.ReadInt();
if (partyLeaderId < 0)
throw new Exception("Forbidden value on partyLeaderId = " + partyLeaderId + ", it doesn't respect the following condition : partyLeaderId < 0");
maxParticipants = reader.ReadSByte();
if (maxParticipants < 0)
throw new Exception("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0");
var limit = reader.ReadUShort();
members = new Types.PartyMemberInformations[limit];
for (int i = 0; i < limit; i++)
{
members[i] = Types.ProtocolTypeManager.GetInstance<Types.PartyMemberInformations>(reader.ReadShort());
members[i].Deserialize(reader);
}
limit = reader.ReadUShort();
guests = new Types.PartyGuestInformations[limit];
for (int i = 0; i < limit; i++)
{
guests[i] = new Types.PartyGuestInformations();
guests[i].Deserialize(reader);
}
restricted = reader.ReadBoolean();
}
示例3: Deserialize
public virtual void Deserialize(IDataReader reader)
{
modelId = reader.ReadInt();
if (modelId < 0)
throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0");
ownerName = reader.ReadUTF();
ownerConnected = reader.ReadBoolean();
worldX = reader.ReadShort();
if (worldX < -255 || worldX > 255)
throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
worldY = reader.ReadShort();
if (worldY < -255 || worldY > 255)
throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
subAreaId = reader.ReadShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
nbRoom = reader.ReadSByte();
nbChest = reader.ReadSByte();
var limit = reader.ReadUShort();
skillListIds = new int[limit];
for (int i = 0; i < limit; i++)
{
skillListIds[i] = reader.ReadInt();
}
isLocked = reader.ReadBoolean();
price = reader.ReadInt();
if (price < 0)
throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0");
}
示例4: Deserialize
public override void Deserialize(IDataReader reader)
{
resultCode = reader.ReadSByte();
if (resultCode < 0)
throw new Exception("Forbidden value on resultCode = " + resultCode + ", it doesn't respect the following condition : resultCode < 0");
smileyId = reader.ReadSByte();
}
示例5: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
partyType = reader.ReadSByte();
if ( partyType < 0 )
{
throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0");
}
maxParticipants = reader.ReadSByte();
if ( maxParticipants < 0 )
{
throw new Exception("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0");
}
fromId = reader.ReadInt();
if ( fromId < 0 )
{
throw new Exception("Forbidden value on fromId = " + fromId + ", it doesn't respect the following condition : fromId < 0");
}
fromName = reader.ReadUTF();
toId = reader.ReadInt();
if ( toId < 0 )
{
throw new Exception("Forbidden value on toId = " + toId + ", it doesn't respect the following condition : toId < 0");
}
}
示例6: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
breed = reader.ReadSByte();
sex = reader.ReadBoolean();
rank = reader.ReadShort();
if (rank < 0)
throw new Exception("Forbidden value on rank = " + rank + ", it doesn't respect the following condition : rank < 0");
givenExperience = reader.ReadDouble();
if (givenExperience < 0)
throw new Exception("Forbidden value on givenExperience = " + givenExperience + ", it doesn't respect the following condition : givenExperience < 0");
experienceGivenPercent = reader.ReadSByte();
if (experienceGivenPercent < 0 || experienceGivenPercent > 100)
throw new Exception("Forbidden value on experienceGivenPercent = " + experienceGivenPercent + ", it doesn't respect the following condition : experienceGivenPercent < 0 || experienceGivenPercent > 100");
rights = reader.ReadUInt();
if (rights < 0 || rights > 4294967295)
throw new Exception("Forbidden value on rights = " + rights + ", it doesn't respect the following condition : rights < 0 || rights > 4294967295");
connected = reader.ReadSByte();
if (connected < 0)
throw new Exception("Forbidden value on connected = " + connected + ", it doesn't respect the following condition : connected < 0");
alignmentSide = reader.ReadSByte();
hoursSinceLastConnection = reader.ReadUShort();
if (hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535)
throw new Exception("Forbidden value on hoursSinceLastConnection = " + hoursSinceLastConnection + ", it doesn't respect the following condition : hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535");
moodSmileyId = reader.ReadSByte();
accountId = reader.ReadInt();
if (accountId < 0)
throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
achievementPoints = reader.ReadInt();
status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
status.Deserialize(reader);
}
示例7: Deserialize
public virtual void Deserialize(IDataReader 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.ReadSByte();
if ( jobLevel < 0 )
{
throw new Exception("Forbidden value on jobLevel = " + jobLevel + ", it doesn't respect the following condition : jobLevel < 0");
}
jobXP = reader.ReadDouble();
if ( jobXP < 0 )
{
throw new Exception("Forbidden value on jobXP = " + jobXP + ", it doesn't respect the following condition : jobXP < 0");
}
jobXpLevelFloor = reader.ReadDouble();
if ( jobXpLevelFloor < 0 )
{
throw new Exception("Forbidden value on jobXpLevelFloor = " + jobXpLevelFloor + ", it doesn't respect the following condition : jobXpLevelFloor < 0");
}
jobXpNextLevelFloor = reader.ReadDouble();
if ( jobXpNextLevelFloor < 0 )
{
throw new Exception("Forbidden value on jobXpNextLevelFloor = " + jobXpNextLevelFloor + ", it doesn't respect the following condition : jobXpNextLevelFloor < 0");
}
}
示例8: Deserialize
public virtual void Deserialize(IDataReader reader)
{
guildOwner = reader.ReadUTF();
worldX = reader.ReadShort();
if ( worldX < -255 || worldX > 255 )
{
throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
}
worldY = reader.ReadShort();
if ( worldY < -255 || worldY > 255 )
{
throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
}
subAreaId = reader.ReadShort();
if ( subAreaId < 0 )
{
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
}
nbMount = reader.ReadSByte();
nbObject = reader.ReadSByte();
price = reader.ReadInt();
if ( price < 0 )
{
throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0");
}
}
示例9: Deserialize
public override void Deserialize(IDataReader reader)
{
areaId = reader.ReadInt();
atLeastNbMount = reader.ReadSByte();
atLeastNbMachine = reader.ReadSByte();
maxPrice = reader.ReadInt();
if (maxPrice < 0)
throw new Exception("Forbidden value on maxPrice = " + maxPrice + ", it doesn't respect the following condition : maxPrice < 0");
}
示例10: Deserialize
public virtual void Deserialize(IDataReader reader)
{
cellId = reader.ReadShort();
if (cellId < 0 || cellId > 559)
throw new Exception("Forbidden value on cellId = " + cellId + ", it doesn't respect the following condition : cellId < 0 || cellId > 559");
zoneSize = reader.ReadSByte();
cellColor = reader.ReadInt();
cellsType = reader.ReadSByte();
}
示例11: Deserialize
public override void Deserialize(IDataReader reader)
{
totalBalanceValue = reader.ReadSByte();
if (totalBalanceValue < 0)
throw new Exception("Forbidden value on totalBalanceValue = " + totalBalanceValue + ", it doesn't respect the following condition : totalBalanceValue < 0");
subAreaBalanceValue = reader.ReadSByte();
if (subAreaBalanceValue < 0)
throw new Exception("Forbidden value on subAreaBalanceValue = " + subAreaBalanceValue + ", it doesn't respect the following condition : subAreaBalanceValue < 0");
}
示例12: Deserialize
public override void Deserialize(IDataReader reader)
{
presetId = reader.ReadSByte();
if (presetId < 0)
throw new Exception("Forbidden value on presetId = " + presetId + ", it doesn't respect the following condition : presetId < 0");
code = reader.ReadSByte();
if (code < 0)
throw new Exception("Forbidden value on code = " + code + ", it doesn't respect the following condition : code < 0");
}
示例13: Deserialize
public override void Deserialize(IDataReader reader)
{
serverId = reader.ReadShort();
error = reader.ReadSByte();
if (error < 0)
throw new Exception("Forbidden value on error = " + error + ", it doesn't respect the following condition : error < 0");
serverStatus = reader.ReadSByte();
if (serverStatus < 0)
throw new Exception("Forbidden value on serverStatus = " + serverStatus + ", it doesn't respect the following condition : serverStatus < 0");
}
示例14: Deserialize
public override void Deserialize(IDataReader reader)
{
presetId = reader.ReadSByte();
if (presetId < 0)
throw new Exception("Forbidden value on presetId = " + presetId + ", it doesn't respect the following condition : presetId < 0");
symbolId = reader.ReadSByte();
if (symbolId < 0)
throw new Exception("Forbidden value on symbolId = " + symbolId + ", it doesn't respect the following condition : symbolId < 0");
saveEquipment = reader.ReadBoolean();
}
示例15: Deserialize
public override void Deserialize(IDataReader reader)
{
lang = reader.ReadUTF();
community = reader.ReadSByte();
if (community < 0)
throw new Exception("Forbidden value on community = " + community + ", it doesn't respect the following condition : community < 0");
gameType = reader.ReadSByte();
if (gameType < 0)
throw new Exception("Forbidden value on gameType = " + gameType + ", it doesn't respect the following condition : gameType < 0");
}