本文整理汇总了C#中IDataReader.ReadShort方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadShort方法的具体用法?C# IDataReader.ReadShort怎么用?C# IDataReader.ReadShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.ReadShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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");
}
}
示例3: Deserialize
public virtual void Deserialize(IDataReader reader)
{
symbolShape = reader.ReadShort();
symbolColor = reader.ReadInt();
backgroundShape = reader.ReadShort();
backgroundColor = reader.ReadInt();
}
示例4: Deserialize
public virtual void Deserialize(IDataReader reader)
{
uid = reader.ReadInt();
if ( uid < 0 )
{
throw new Exception("Forbidden value on uid = " + uid + ", it doesn't respect the following condition : uid < 0");
}
targetId = reader.ReadInt();
turnDuration = reader.ReadShort();
dispelable = reader.ReadSByte();
if ( dispelable < 0 )
{
throw new Exception("Forbidden value on dispelable = " + dispelable + ", it doesn't respect the following condition : dispelable < 0");
}
spellId = reader.ReadShort();
if ( spellId < 0 )
{
throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
}
parentBoostUid = reader.ReadInt();
if ( parentBoostUid < 0 )
{
throw new Exception("Forbidden value on parentBoostUid = " + parentBoostUid + ", it doesn't respect the following condition : parentBoostUid < 0");
}
}
示例5: Deserialize
public virtual void Deserialize(IDataReader reader)
{
firstNameId = reader.ReadShort();
if ( firstNameId < 0 )
{
throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
}
lastNameId = reader.ReadShort();
if ( lastNameId < 0 )
{
throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
}
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");
}
}
示例6: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
paddockId = reader.ReadInt();
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");
}
abandonned = reader.ReadBoolean();
int limit = reader.ReadUShort();
mountsInformations = new Types.MountInformationsForPaddock[limit];
for (int i = 0; i < limit; i++)
{
(mountsInformations as MountInformationsForPaddock[])[i] = new Types.MountInformationsForPaddock();
(mountsInformations as Types.MountInformationsForPaddock[])[i].Deserialize(reader);
}
}
示例7: 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);
}
}
示例8: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
firstNameId = reader.ReadShort();
if ( firstNameId < 0 )
{
throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
}
lastNameId = reader.ReadShort();
if ( lastNameId < 0 )
{
throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
}
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");
}
guildId = reader.ReadInt();
if ( guildId < 0 )
{
throw new Exception("Forbidden value on guildId = " + guildId + ", it doesn't respect the following condition : guildId < 0");
}
uid = reader.ReadInt();
if ( uid < 0 )
{
throw new Exception("Forbidden value on uid = " + uid + ", it doesn't respect the following condition : uid < 0");
}
}
示例9: Deserialize
public override void Deserialize(IDataReader reader)
{
collectorName = 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");
}
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");
}
userName = reader.ReadUTF();
experience = reader.ReadDouble();
int limit = reader.ReadUShort();
objectsInfos = new Types.ObjectItemQuantity[limit];
for (int i = 0; i < limit; i++)
{
(objectsInfos as Types.ObjectItemQuantity[])[i] = new Types.ObjectItemQuantity();
(objectsInfos as Types.ObjectItemQuantity[])[i].Deserialize(reader);
}
}
示例10: 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");
}
示例11: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
maxPods = reader.ReadShort();
if (maxPods < 0)
throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
prospecting = reader.ReadShort();
if (prospecting < 0)
throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
wisdom = reader.ReadShort();
if (wisdom < 0)
throw new Exception("Forbidden value on wisdom = " + wisdom + ", it doesn't respect the following condition : wisdom < 0");
taxCollectorsCount = reader.ReadSByte();
if (taxCollectorsCount < 0)
throw new Exception("Forbidden value on taxCollectorsCount = " + taxCollectorsCount + ", it doesn't respect the following condition : taxCollectorsCount < 0");
taxCollectorAttack = reader.ReadInt();
kamas = reader.ReadInt();
if (kamas < 0)
throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0");
experience = reader.ReadDouble();
if (experience < 0)
throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
pods = reader.ReadInt();
if (pods < 0)
throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
itemsValue = reader.ReadInt();
if (itemsValue < 0)
throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
}
示例12: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
year = reader.ReadShort();
if ( year < 0 )
{
throw new Exception("Forbidden value on year = " + year + ", it doesn't respect the following condition : year < 0");
}
month = reader.ReadShort();
if ( month < 0 )
{
throw new Exception("Forbidden value on month = " + month + ", it doesn't respect the following condition : month < 0");
}
day = reader.ReadShort();
if ( day < 0 )
{
throw new Exception("Forbidden value on day = " + day + ", it doesn't respect the following condition : day < 0");
}
hour = reader.ReadShort();
if ( hour < 0 )
{
throw new Exception("Forbidden value on hour = " + hour + ", it doesn't respect the following condition : hour < 0");
}
minute = reader.ReadShort();
if ( minute < 0 )
{
throw new Exception("Forbidden value on minute = " + minute + ", it doesn't respect the following condition : minute < 0");
}
}
示例13: Deserialize
public override void Deserialize(IDataReader reader)
{
base.Deserialize(reader);
objectGID = reader.ReadShort();
if (objectGID < 0)
throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0");
powerRate = reader.ReadShort();
overMax = reader.ReadBoolean();
var limit = reader.ReadUShort();
effects = new Types.ObjectEffect[limit];
for (int i = 0; i < limit; i++)
{
effects[i] = Types.ProtocolTypeManager.GetInstance<Types.ObjectEffect>(reader.ReadShort());
effects[i].Deserialize(reader);
}
objectUID = reader.ReadInt();
if (objectUID < 0)
throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
quantity = reader.ReadInt();
if (quantity < 0)
throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0");
objectPrice = reader.ReadInt();
if (objectPrice < 0)
throw new Exception("Forbidden value on objectPrice = " + objectPrice + ", it doesn't respect the following condition : objectPrice < 0");
publicPrice = reader.ReadInt();
if (publicPrice < 0)
throw new Exception("Forbidden value on publicPrice = " + publicPrice + ", it doesn't respect the following condition : publicPrice < 0");
}
示例14: Deserialize
public virtual void Deserialize(IDataReader reader)
{
houseId = reader.ReadInt();
if ( houseId < 0 )
{
throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
}
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();
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");
}
int limit = reader.ReadUShort();
skillListIds = new int[limit];
for (int i = 0; i < limit; i++)
{
(skillListIds as int[])[i] = reader.ReadInt();
}
guildshareParams = reader.ReadUInt();
if ( guildshareParams < 0 || guildshareParams > 4294967295 )
{
throw new Exception("Forbidden value on guildshareParams = " + guildshareParams + ", it doesn't respect the following condition : guildshareParams < 0 || guildshareParams > 4294967295");
}
}
示例15: Deserialize
public virtual void Deserialize(IDataReader reader)
{
@base = reader.ReadShort();
objectsAndMountBonus = reader.ReadShort();
alignGiftBonus = reader.ReadShort();
contextModif = reader.ReadShort();
}