本文整理汇总了C#中BlueSheep.Common.IO.BigEndianReader.ReadVarShort方法的典型用法代码示例。如果您正苦于以下问题:C# BigEndianReader.ReadVarShort方法的具体用法?C# BigEndianReader.ReadVarShort怎么用?C# BigEndianReader.ReadVarShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlueSheep.Common.IO.BigEndianReader
的用法示例。
在下文中一共展示了BigEndianReader.ReadVarShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
maxPods = reader.ReadVarShort();
if (maxPods < 0)
throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
prospecting = reader.ReadVarShort();
if (prospecting < 0)
throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
wisdom = reader.ReadVarShort();
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.ReadVarInt();
if (kamas < 0)
throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0");
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");
pods = reader.ReadVarInt();
if (pods < 0)
throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
itemsValue = reader.ReadVarInt();
if (itemsValue < 0)
throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
}
示例2: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
bonesId = reader.ReadVarShort();
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.ReadVarShort();
}
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.ReadVarShort();
}
limit = reader.ReadUShort();
subentities = new Types.SubEntity[limit];
for (int i = 0; i < limit; i++)
{
subentities[i] = new Types.SubEntity();
subentities[i].Deserialize(reader);
}
}
示例3: Deserialize
public override void Deserialize(BigEndianReader reader)
{
teleporterType = reader.ReadSByte();
if (teleporterType < 0)
throw new Exception("Forbidden value on teleporterType = " + teleporterType + ", it doesn't respect the following condition : teleporterType < 0");
var limit = reader.ReadUShort();
mapIds = new int[limit];
for (int i = 0; i < limit; i++)
{
mapIds[i] = reader.ReadInt();
}
limit = reader.ReadUShort();
subAreaIds = new short[limit];
for (int i = 0; i < limit; i++)
{
subAreaIds[i] = reader.ReadVarShort();
}
limit = reader.ReadUShort();
costs = new short[limit];
for (int i = 0; i < limit; i++)
{
costs[i] = reader.ReadVarShort();
}
limit = reader.ReadUShort();
destTeleporterType = new sbyte[limit];
for (int i = 0; i < limit; i++)
{
destTeleporterType[i] = reader.ReadSByte();
}
}
示例4: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
uniqueId = reader.ReadInt();
firtNameId = reader.ReadVarShort();
if (firtNameId < 0)
throw new Exception("Forbidden value on firtNameId = " + firtNameId + ", it doesn't respect the following condition : firtNameId < 0");
lastNameId = reader.ReadVarShort();
if (lastNameId < 0)
throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
additionalInfos = new Types.AdditionalTaxCollectorInformations();
additionalInfos.Deserialize(reader);
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.ReadVarShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
state = reader.ReadSByte();
if (state < 0)
throw new Exception("Forbidden value on state = " + state + ", it doesn't respect the following condition : state < 0");
look = new Types.EntityLook();
look.Deserialize(reader);
var limit = reader.ReadUShort();
complements = new Types.TaxCollectorComplementaryInformations[limit];
for (int i = 0; i < limit; i++)
{
complements[i] = Types.ProtocolTypeManager.GetInstance<Types.TaxCollectorComplementaryInformations>(reader.ReadShort());
complements[i].Deserialize(reader);
}
}
示例5: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
@base = reader.ReadVarShort();
additionnal = reader.ReadVarShort();
objectsAndMountBonus = reader.ReadVarShort();
alignGiftBonus = reader.ReadVarShort();
contextModif = reader.ReadVarShort();
}
示例6: Deserialize
public override void Deserialize(BigEndianReader reader)
{
unread = reader.ReadVarShort();
if (unread < 0)
throw new Exception("Forbidden value on unread = " + unread + ", it doesn't respect the following condition : unread < 0");
total = reader.ReadVarShort();
if (total < 0)
throw new Exception("Forbidden value on total = " + total + ", it doesn't respect the following condition : total < 0");
}
示例7: Deserialize
public override void Deserialize(BigEndianReader reader)
{
oldCellId = reader.ReadVarShort();
if (oldCellId < 0 || oldCellId > 559)
throw new Exception("Forbidden value on oldCellId = " + oldCellId + ", it doesn't respect the following condition : oldCellId < 0 || oldCellId > 559");
newCellId = reader.ReadVarShort();
if (newCellId < 0 || newCellId > 559)
throw new Exception("Forbidden value on newCellId = " + newCellId + ", it doesn't respect the following condition : newCellId < 0 || newCellId > 559");
}
示例8: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
cellId = reader.ReadVarShort();
if (cellId < 0 || cellId > 559)
throw new Exception("Forbidden value on cellId = " + cellId + ", it doesn't respect the following condition : cellId < 0 || cellId > 559");
objectGID = reader.ReadVarShort();
if (objectGID < 0)
throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0");
}
示例9: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
targetId = reader.ReadInt();
spellId = reader.ReadVarShort();
if (spellId < 0)
throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
value = reader.ReadVarShort();
}
示例10: Deserialize
public override void Deserialize(BigEndianReader reader)
{
questId = reader.ReadVarShort();
if (questId < 0)
throw new Exception("Forbidden value on questId = " + questId + ", it doesn't respect the following condition : questId < 0");
stepId = reader.ReadVarShort();
if (stepId < 0)
throw new Exception("Forbidden value on stepId = " + stepId + ", it doesn't respect the following condition : stepId < 0");
}
示例11: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
curCompletion = reader.ReadVarShort();
if (curCompletion < 0)
throw new Exception("Forbidden value on curCompletion = " + curCompletion + ", it doesn't respect the following condition : curCompletion < 0");
maxCompletion = reader.ReadVarShort();
if (maxCompletion < 0)
throw new Exception("Forbidden value on maxCompletion = " + maxCompletion + ", it doesn't respect the following condition : maxCompletion < 0");
}
示例12: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
firstNameId = reader.ReadVarShort();
if (firstNameId < 0)
throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
lastNameId = reader.ReadVarShort();
if (lastNameId < 0)
throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
}
示例13: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
uid = reader.ReadUTF();
figure = reader.ReadVarShort();
if (figure < 0)
throw new Exception("Forbidden value on figure = " + figure + ", it doesn't respect the following condition : figure < 0");
pedestal = reader.ReadVarShort();
if (pedestal < 0)
throw new Exception("Forbidden value on pedestal = " + pedestal + ", it doesn't respect the following condition : pedestal < 0");
bound = reader.ReadBoolean();
}
示例14: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
targetId = reader.ReadInt();
loss = reader.ReadVarShort();
if (loss < 0)
throw new Exception("Forbidden value on loss = " + loss + ", it doesn't respect the following condition : loss < 0");
permanentDamages = reader.ReadVarShort();
if (permanentDamages < 0)
throw new Exception("Forbidden value on permanentDamages = " + permanentDamages + ", it doesn't respect the following condition : permanentDamages < 0");
}
示例15: Deserialize
public override void Deserialize(BigEndianReader reader)
{
subAreaId = reader.ReadVarShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
fightId = reader.ReadVarShort();
if (fightId < 0)
throw new Exception("Forbidden value on fightId = " + fightId + ", it doesn't respect the following condition : fightId < 0");
defender = Types.ProtocolTypeManager.GetInstance<Types.CharacterMinimalPlusLookInformations>(reader.ReadShort());
defender.Deserialize(reader);
}