本文整理汇总了C#中BlueSheep.Common.IO.BigEndianReader.ReadShort方法的典型用法代码示例。如果您正苦于以下问题:C# BigEndianReader.ReadShort方法的具体用法?C# BigEndianReader.ReadShort怎么用?C# BigEndianReader.ReadShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlueSheep.Common.IO.BigEndianReader
的用法示例。
在下文中一共展示了BigEndianReader.ReadShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
markAuthorId = reader.ReadInt();
markTeamId = reader.ReadSByte();
if (markTeamId < 0)
throw new Exception("Forbidden value on markTeamId = " + markTeamId + ", it doesn't respect the following condition : markTeamId < 0");
markSpellId = reader.ReadInt();
if (markSpellId < 0)
throw new Exception("Forbidden value on markSpellId = " + markSpellId + ", it doesn't respect the following condition : markSpellId < 0");
markSpellLevel = reader.ReadSByte();
if (markSpellLevel < 1 || markSpellLevel > 6)
throw new Exception("Forbidden value on markSpellLevel = " + markSpellLevel + ", it doesn't respect the following condition : markSpellLevel < 1 || markSpellLevel > 6");
markId = reader.ReadShort();
markType = reader.ReadSByte();
markimpactCell = reader.ReadShort();
if (markimpactCell < -1 || markimpactCell > 559)
throw new Exception("Forbidden value on markimpactCell = " + markimpactCell + ", it doesn't respect the following condition : markimpactCell < -1 || markimpactCell > 559");
var limit = reader.ReadUShort();
cells = new Types.GameActionMarkedCell[limit];
for (int i = 0; i < limit; i++)
{
cells[i] = new Types.GameActionMarkedCell();
cells[i].Deserialize(reader);
}
active = reader.ReadBoolean();
}
示例2: Deserialize
public virtual void Deserialize(BigEndianReader reader)
{
modelId = reader.ReadVarInt();
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.ReadVarShort();
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.ReadVarInt();
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(BigEndianReader reader)
{
//houseId = reader.ReadInt();
houseId = reader.ReadVarInt();
if (houseId < 0)
throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0");
modelId = reader.ReadVarInt();
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");
mapId = reader.ReadInt();
subAreaId = reader.ReadVarShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
var limit = reader.ReadUShort();
skillListIds = new int[limit];
for (int i = 0; i < limit; i++)
{
skillListIds[i] = reader.ReadInt();
}
guildshareParams = reader.ReadVarInt();
if (guildshareParams < 0)
throw new Exception("Forbidden value on guildshareParams = " + guildshareParams + ", it doesn't respect the following condition : guildshareParams < 0");
}
示例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 override void Deserialize(BigEndianReader 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.ReadVarShort();
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();
if (experience < -9.007199254740992E15 || experience > 9.007199254740992E15)
throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < -9.007199254740992E15 || experience > 9.007199254740992E15");
var limit = reader.ReadUShort();
objectsInfos = new Types.ObjectItemQuantity[limit];
for (int i = 0; i < limit; i++)
{
objectsInfos[i] = new Types.ObjectItemQuantity();
objectsInfos[i].Deserialize(reader);
}
}
示例6: Deserialize
public virtual void Deserialize(BigEndianReader 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");
}
示例7: Init
// Methods
internal override void Init(BigEndianReader Reader, int MapVersion)
{
this.SoundId = Reader.ReadInt();
this.BaseVolume = Reader.ReadShort();
this.FullVolumeDistance = Reader.ReadInt();
this.NullVolumeDistance = Reader.ReadInt();
this.MinDelayBetweenLoops = Reader.ReadShort();
this.MaxDelayBetweenLoops = Reader.ReadShort();
}
示例8: Deserialize
public override void Deserialize(BigEndianReader reader)
{
name = 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");
sterilizator = reader.ReadUTF();
}
示例9: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
targetId = reader.ReadInt();
startCellId = reader.ReadShort();
if (startCellId < -1 || startCellId > 559)
throw new Exception("Forbidden value on startCellId = " + startCellId + ", it doesn't respect the following condition : startCellId < -1 || startCellId > 559");
endCellId = reader.ReadShort();
if (endCellId < -1 || endCellId > 559)
throw new Exception("Forbidden value on endCellId = " + endCellId + ", it doesn't respect the following condition : endCellId < -1 || endCellId > 559");
}
示例10: 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");
mapId = reader.ReadInt();
if (mapId < 0)
throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
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++)
{
short id = reader.ReadShort();
actors[i] = Types.ProtocolTypeManager.GetInstance<Types.GameRolePlayActorInformations>(id);
actors[i].Deserialize(reader);
}
limit = reader.ReadUShort();
interactiveElements = new Types.InteractiveElement[limit];
for (int i = 0; i < limit; i++)
{
interactiveElements[i] = Types.ProtocolTypeManager.GetInstance<Types.InteractiveElement>(reader.ReadShort());
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);
}
}
示例11: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.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");
mapId = reader.ReadInt();
prism = Types.ProtocolTypeManager.GetInstance<Types.PrismInformation>(reader.ReadShort());
prism.Deserialize(reader);
}
示例12: Init
// Methods
internal void Init(BigEndianReader Reader, int MapVersion)
{
this.CellId = Reader.ReadShort();
this.ElementsCount = Reader.ReadShort();
int elementsCount = this.ElementsCount;
int i = 1;
while ((i <= elementsCount))
{
BasicElement elementFromType = BasicElement.GetElementFromType(Reader.ReadByte());
elementFromType.Init(Reader, MapVersion);
this.Elements.Add(elementFromType);
i += 1;
}
}
示例13: Init
// Methods
internal void Init(BigEndianReader Reader)
{
this.FixtureId = Reader.ReadInt();
this.OffsetX = Reader.ReadShort();
this.OffsetY = Reader.ReadShort();
this.Rotation = Reader.ReadShort();
this.xScale = Reader.ReadShort();
this.yScale = Reader.ReadShort();
this.RedMultiplier = Reader.ReadSByte();
this.GreenMultiplier = Reader.ReadSByte();
this.BlueMultiplier = Reader.ReadSByte();
this.Hue = ((this.RedMultiplier | this.GreenMultiplier) | this.BlueMultiplier);
this.Alpha = Reader.ReadByte();
}
示例14: Deserialize
public override void Deserialize(BigEndianReader reader)
{
base.Deserialize(reader);
ageBonus = reader.ReadShort();
if (ageBonus < -1 || ageBonus > 1000)
throw new Exception("Forbidden value on ageBonus = " + ageBonus + ", it doesn't respect the following condition : ageBonus < -1 || ageBonus > 1000");
}
示例15: Deserialize
public override void Deserialize(BigEndianReader reader)
{
questType = reader.ReadSByte();
if (questType < 0)
throw new Exception("Forbidden value on questType = " + questType + ", it doesn't respect the following condition : questType < 0");
startMapId = reader.ReadInt();
var limit = reader.ReadUShort();
knownStepsList = new Types.TreasureHuntStep[limit];
for (int i = 0; i < limit; i++)
{
knownStepsList[i] = Types.ProtocolTypeManager.GetInstance<Types.TreasureHuntStep>(reader.ReadShort());
knownStepsList[i].Deserialize(reader);
}
totalStepCount = reader.ReadSByte();
if (totalStepCount < 0)
throw new Exception("Forbidden value on totalStepCount = " + totalStepCount + ", it doesn't respect the following condition : totalStepCount < 0");
checkPointCurrent = reader.ReadVarInt();
if (checkPointCurrent < 0)
throw new Exception("Forbidden value on checkPointCurrent = " + checkPointCurrent + ", it doesn't respect the following condition : checkPointCurrent < 0");
checkPointTotal = reader.ReadVarInt();
if (checkPointTotal < 0)
throw new Exception("Forbidden value on checkPointTotal = " + checkPointTotal + ", it doesn't respect the following condition : checkPointTotal < 0");
availableRetryCount = reader.ReadInt();
limit = reader.ReadUShort();
flags = new Types.TreasureHuntFlag[limit];
for (int i = 0; i < limit; i++)
{
flags[i] = new Types.TreasureHuntFlag();
flags[i].Deserialize(reader);
}
}