本文整理汇总了C#中IDataReader.ReadUShort方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadUShort方法的具体用法?C# IDataReader.ReadUShort怎么用?C# IDataReader.ReadUShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.ReadUShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize(IDataReader reader)
{
int limit = reader.ReadUShort();
quantities = new int[limit];
for (int i = 0; i < limit; i++)
{
(quantities as int[])[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
types = new int[limit];
for (int i = 0; i < limit; i++)
{
(types as int[])[i] = reader.ReadInt();
}
taxPercentage = reader.ReadFloat();
maxItemLevel = reader.ReadInt();
if ( maxItemLevel < 0 )
{
throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0");
}
maxItemPerAccount = reader.ReadInt();
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.ReadShort();
if ( unsoldDelay < 0 )
{
throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
}
}
示例2: Deserialize
public override void Deserialize(IDataReader reader)
{
fightId = reader.ReadInt();
if (fightId < 0)
throw new Exception("Forbidden value on fightId = " + fightId + ", it doesn't respect the following condition : fightId < 0");
var limit = reader.ReadUShort();
names = new string[limit];
for (int i = 0; i < limit; i++)
{
names[i] = reader.ReadUTF();
}
limit = reader.ReadUShort();
levels = new short[limit];
for (int i = 0; i < limit; i++)
{
levels[i] = reader.ReadShort();
}
teamSwap = reader.ReadSByte();
if (teamSwap < 0)
throw new Exception("Forbidden value on teamSwap = " + teamSwap + ", it doesn't respect the following condition : teamSwap < 0");
limit = reader.ReadUShort();
alives = new bool[limit];
for (int i = 0; i < limit; i++)
{
alives[i] = reader.ReadBoolean();
}
}
示例3: 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();
}
示例4: 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");
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();
leaderId = reader.ReadInt();
if (leaderId < 0)
throw new Exception("Forbidden value on leaderId = " + leaderId + ", it doesn't respect the following condition : leaderId < 0");
var limit = reader.ReadUShort();
members = new Types.PartyInvitationMemberInformations[limit];
for (int i = 0; i < limit; i++)
{
members[i] = new Types.PartyInvitationMemberInformations();
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);
}
}
示例5: Deserialize
public override void Deserialize(IDataReader reader)
{
nbcollectorMax = reader.ReadSByte();
if ( nbcollectorMax < 0 )
{
throw new Exception("Forbidden value on nbcollectorMax = " + nbcollectorMax + ", it doesn't respect the following condition : nbcollectorMax < 0");
}
taxCollectorHireCost = reader.ReadShort();
if ( taxCollectorHireCost < 0 )
{
throw new Exception("Forbidden value on taxCollectorHireCost = " + taxCollectorHireCost + ", it doesn't respect the following condition : taxCollectorHireCost < 0");
}
int limit = reader.ReadUShort();
informations = new Types.TaxCollectorInformations[limit];
for (int i = 0; i < limit; i++)
{
(informations as Types.TaxCollectorInformations[])[i] = Types.ProtocolTypeManager.GetInstance<Types.TaxCollectorInformations>(reader.ReadShort());
(informations as Types.TaxCollectorInformations[])[i].Deserialize(reader);
}
limit = reader.ReadUShort();
fightersInformations = new Types.TaxCollectorFightersInformation[limit];
for (int i = 0; i < limit; i++)
{
(fightersInformations as Types.TaxCollectorFightersInformation[])[i] = new Types.TaxCollectorFightersInformation();
(fightersInformations as Types.TaxCollectorFightersInformation[])[i].Deserialize(reader);
}
}
示例6: Deserialize
public virtual void Deserialize(IDataReader reader)
{
bonesId = reader.ReadShort();
if (bonesId < 0)
throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
var limit = reader.ReadUShort();
skins = new short[limit];
for (int i = 0; i < limit; i++)
{
skins[i] = reader.ReadShort();
}
limit = reader.ReadUShort();
indexedColors = new int[limit];
for (int i = 0; i < limit; i++)
{
indexedColors[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
scales = new short[limit];
for (int i = 0; i < limit; i++)
{
scales[i] = reader.ReadShort();
}
limit = reader.ReadUShort();
subentities = new Types.SubEntity[limit];
for (int i = 0; i < limit; i++)
{
subentities[i] = new Types.SubEntity();
subentities[i].Deserialize(reader);
}
}
示例7: Deserialize
public virtual void Deserialize(IDataReader reader)
{
fightId = reader.ReadInt();
fightType = reader.ReadSByte();
if (fightType < 0)
throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
var limit = reader.ReadUShort();
fightTeams = new Types.FightTeamInformations[limit];
for (int i = 0; i < limit; i++)
{
fightTeams[i] = new Types.FightTeamInformations();
fightTeams[i].Deserialize(reader);
}
limit = reader.ReadUShort();
fightTeamsPositions = new short[limit];
for (int i = 0; i < limit; i++)
{
fightTeamsPositions[i] = reader.ReadShort();
}
limit = reader.ReadUShort();
fightTeamsOptions = new Types.FightOptionsInformations[limit];
for (int i = 0; i < limit; i++)
{
fightTeamsOptions[i] = new Types.FightOptionsInformations();
fightTeamsOptions[i].Deserialize(reader);
}
}
示例8: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
var limit = reader.ReadUShort();
charactersToRecolor = new Types.CharacterToRecolorInformation[limit];
for (int i = 0; i < limit; i++)
{
charactersToRecolor[i] = new Types.CharacterToRecolorInformation();
charactersToRecolor[i].Deserialize(reader);
}
limit = reader.ReadUShort();
charactersToRename = new int[limit];
for (int i = 0; i < limit; i++)
{
charactersToRename[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
unusableCharacters = new int[limit];
for (int i = 0; i < limit; i++)
{
unusableCharacters[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
charactersToRelook = new Types.CharacterToRelookInformation[limit];
for (int i = 0; i < limit; i++)
{
charactersToRelook[i] = new Types.CharacterToRelookInformation();
charactersToRelook[i].Deserialize(reader);
}
}
示例9: Deserialize
public override void Deserialize(IDataReader reader)
{
questId = reader.ReadUShort();
if (questId < 0 || questId > 65535)
throw new Exception("Forbidden value on questId = " + questId + ", it doesn't respect the following condition : questId < 0 || questId > 65535");
objectiveId = reader.ReadUShort();
if (objectiveId < 0 || objectiveId > 65535)
throw new Exception("Forbidden value on objectiveId = " + objectiveId + ", it doesn't respect the following condition : objectiveId < 0 || objectiveId > 65535");
}
示例10: Deserialize
public override void Deserialize(IDataReader reader)
{
position = reader.ReadUShort();
if (position < 0 || position > 65535)
throw new Exception("Forbidden value on position = " + position + ", it doesn't respect the following condition : position < 0 || position > 65535");
total = reader.ReadUShort();
if (total < 0 || total > 65535)
throw new Exception("Forbidden value on total = " + total + ", it doesn't respect the following condition : total < 0 || total > 65535");
}
示例11: Deserialize
public override void Deserialize(IDataReader reader)
{
subAreaId = reader.ReadShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
mapId = reader.ReadInt();
if (mapId < 0)
throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
subareaAlignmentSide = reader.ReadSByte();
var limit = reader.ReadUShort();
houses = new Types.HouseInformations[limit];
for (int i = 0; i < limit; i++)
{
houses[i] = Types.ProtocolTypeManager.GetInstance<Types.HouseInformations>(reader.ReadShort());
houses[i].Deserialize(reader);
}
limit = reader.ReadUShort();
actors = new Types.GameRolePlayActorInformations[limit];
for (int i = 0; i < limit; i++)
{
actors[i] = Types.ProtocolTypeManager.GetInstance<Types.GameRolePlayActorInformations>(reader.ReadShort());
actors[i].Deserialize(reader);
}
limit = reader.ReadUShort();
interactiveElements = new Types.InteractiveElement[limit];
for (int i = 0; i < limit; i++)
{
interactiveElements[i] = new Types.InteractiveElement();
interactiveElements[i].Deserialize(reader);
}
limit = reader.ReadUShort();
statedElements = new Types.StatedElement[limit];
for (int i = 0; i < limit; i++)
{
statedElements[i] = new Types.StatedElement();
statedElements[i].Deserialize(reader);
}
limit = reader.ReadUShort();
obstacles = new Types.MapObstacle[limit];
for (int i = 0; i < limit; i++)
{
obstacles[i] = new Types.MapObstacle();
obstacles[i].Deserialize(reader);
}
limit = reader.ReadUShort();
fights = new Types.FightCommonInformations[limit];
for (int i = 0; i < limit; i++)
{
fights[i] = new Types.FightCommonInformations();
fights[i].Deserialize(reader);
}
}
示例12: Deserialize
public override void Deserialize(IDataReader reader)
{
questId = reader.ReadUShort();
if ( questId < 0 || questId > 65535 )
{
throw new Exception("Forbidden value on questId = " + questId + ", it doesn't respect the following condition : questId < 0 || questId > 65535");
}
stepId = reader.ReadUShort();
if ( stepId < 0 || stepId > 65535 )
{
throw new Exception("Forbidden value on stepId = " + stepId + ", it doesn't respect the following condition : stepId < 0 || stepId > 65535");
}
}
示例13: Deserialize
public override void Deserialize(IDataReader reader)
{
id = reader.ReadUShort();
if (id < 0 || id > 65535)
throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0 || id > 65535");
var limit = reader.ReadUShort();
parameters = new string[limit];
for (int i = 0; i < limit; i++)
{
parameters[i] = reader.ReadUTF();
}
forceOpen = reader.ReadBoolean();
}
示例14: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
honor = reader.ReadUShort();
if (honor < 0 || honor > 20000)
throw new Exception("Forbidden value on honor = " + honor + ", it doesn't respect the following condition : honor < 0 || honor > 20000");
honorGradeFloor = reader.ReadUShort();
if (honorGradeFloor < 0 || honorGradeFloor > 20000)
throw new Exception("Forbidden value on honorGradeFloor = " + honorGradeFloor + ", it doesn't respect the following condition : honorGradeFloor < 0 || honorGradeFloor > 20000");
honorNextGradeFloor = reader.ReadUShort();
if (honorNextGradeFloor < 0 || honorNextGradeFloor > 20000)
throw new Exception("Forbidden value on honorNextGradeFloor = " + honorNextGradeFloor + ", it doesn't respect the following condition : honorNextGradeFloor < 0 || honorNextGradeFloor > 20000");
pvpEnabled = reader.ReadBoolean();
}
示例15: Deserialize
public override void Deserialize(IDataReader reader)
{
var limit = reader.ReadUShort();
targetIds = new int[limit];
for (int i = 0; i < limit; i++)
{
targetIds[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
targetCells = new short[limit];
for (int i = 0; i < limit; i++)
{
targetCells[i] = reader.ReadShort();
}
}