本文整理汇总了C#中ICustomDataInput.ReadShort方法的典型用法代码示例。如果您正苦于以下问题:C# ICustomDataInput.ReadShort方法的具体用法?C# ICustomDataInput.ReadShort怎么用?C# ICustomDataInput.ReadShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICustomDataInput
的用法示例。
在下文中一共展示了ICustomDataInput.ReadShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize(ICustomDataInput 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 as Types.GameActionMarkedCell[])[i] = new Types.GameActionMarkedCell();
(cells as Types.GameActionMarkedCell[])[i].Deserialize(reader);
}
active = reader.ReadBoolean();
}
示例2: Deserialize
public virtual void Deserialize(ICustomDataInput reader)
{
modelId = reader.ReadVarUhInt();
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.ReadVarUhShort();
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 as int[])[i] = reader.ReadInt();
}
isLocked = reader.ReadBoolean();
price = reader.ReadVarUhInt();
if (price < 0)
throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0");
}
示例3: Deserialize
public override void Deserialize(ICustomDataInput 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)");
}
示例4: Deserialize
public override void Deserialize(ICustomDataInput 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);
}
示例5: Deserialize
public virtual void Deserialize(ICustomDataInput reader)
{
portalId = reader.ReadVarUhShort();
if (portalId < 0)
throw new Exception("Forbidden value on portalId = " + portalId + ", it doesn't respect the following condition : portalId < 0");
areaId = reader.ReadShort();
}
示例6: Deserialize
public override void Deserialize(ICustomDataInput 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)");
}
示例7: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
var limit = reader.ReadUShort();
finishedQuestsIds = new ushort[limit];
for (int i = 0; i < limit; i++)
{
(finishedQuestsIds as ushort[])[i] = reader.ReadVarUhShort();
}
limit = reader.ReadUShort();
finishedQuestsCounts = new ushort[limit];
for (int i = 0; i < limit; i++)
{
(finishedQuestsCounts as ushort[])[i] = reader.ReadVarUhShort();
}
limit = reader.ReadUShort();
activeQuests = new Types.QuestActiveInformations[limit];
for (int i = 0; i < limit; i++)
{
(activeQuests as Types.QuestActiveInformations[])[i] = Types.ProtocolTypeManager.GetInstance<Types.QuestActiveInformations>(reader.ReadShort());
(activeQuests as Types.QuestActiveInformations[])[i].Deserialize(reader);
}
limit = reader.ReadUShort();
reinitDoneQuestsIds = new ushort[limit];
for (int i = 0; i < limit; i++)
{
(reinitDoneQuestsIds as ushort[])[i] = reader.ReadVarUhShort();
}
}
示例8: Deserialize
public override void Deserialize(ICustomDataInput 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 as Types.TreasureHuntStep[])[i] = Types.ProtocolTypeManager.GetInstance<Types.TreasureHuntStep>(reader.ReadShort());
(knownStepsList as Types.TreasureHuntStep[])[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.ReadVarUhInt();
if (checkPointCurrent < 0)
throw new Exception("Forbidden value on checkPointCurrent = " + checkPointCurrent + ", it doesn't respect the following condition : checkPointCurrent < 0");
checkPointTotal = reader.ReadVarUhInt();
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 as Types.TreasureHuntFlag[])[i] = new Types.TreasureHuntFlag();
(flags as Types.TreasureHuntFlag[])[i].Deserialize(reader);
}
}
示例9: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
byte flag1 = reader.ReadByte();
self = BooleanByteWrapper.GetFlag(flag1, 0);
verbose = BooleanByteWrapper.GetFlag(flag1, 1);
position = reader.ReadSByte();
accountNickname = reader.ReadUTF();
accountId = reader.ReadInt();
if (accountId < 0)
throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
playerName = reader.ReadUTF();
playerId = reader.ReadVarUhInt();
if (playerId < 0)
throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
areaId = reader.ReadShort();
var limit = reader.ReadUShort();
socialGroups = new Types.AbstractSocialGroupInfos[limit];
for (int i = 0; i < limit; i++)
{
(socialGroups as Types.AbstractSocialGroupInfos[])[i] = Types.ProtocolTypeManager.GetInstance<Types.AbstractSocialGroupInfos>(reader.ReadShort());
(socialGroups as Types.AbstractSocialGroupInfos[])[i].Deserialize(reader);
}
playerState = reader.ReadSByte();
if (playerState < 0)
throw new Exception("Forbidden value on playerState = " + playerState + ", it doesn't respect the following condition : playerState < 0");
}
示例10: Deserialize
public virtual void Deserialize(ICustomDataInput reader)
{
memberId = reader.ReadInt();
if (memberId < 0)
throw new Exception("Forbidden value on memberId = " + memberId + ", it doesn't respect the following condition : memberId < 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.ReadVarUhShort();
if (subAreaId < 0)
throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
}
示例11: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
base.Deserialize(reader);
arg1 = reader.ReadInt();
arg2 = reader.ReadInt();
arg3 = reader.ReadInt();
delay = reader.ReadShort();
}
示例12: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
base.Deserialize(reader);
targetId = reader.ReadInt();
cellId = reader.ReadShort();
if ((cellId < -1) || (cellId > 559))
throw new Exception("Forbidden value on cellId = " + cellId + ", it doesn't respect the following condition : (cellId < -1) || (cellId > 559)");
}
示例13: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
type = reader.ReadSByte();
if (type < 0)
throw new Exception("Forbidden value on type = " + type + ", it doesn't respect the following condition : type < 0");
coords = Types.ProtocolTypeManager.GetInstance<Types.MapCoordinates>(reader.ReadShort());
coords.Deserialize(reader);
}
示例14: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
barType = reader.ReadSByte();
if (barType < 0)
throw new Exception("Forbidden value on barType = " + barType + ", it doesn't respect the following condition : barType < 0");
shortcut = Types.ProtocolTypeManager.GetInstance<Types.Shortcut>(reader.ReadShort());
shortcut.Deserialize(reader);
}
示例15: Deserialize
public override void Deserialize(ICustomDataInput reader)
{
fightId = reader.ReadShort();
if (fightId < 0)
throw new Exception("Forbidden value on fightId = " + fightId + ", it doesn't respect the following condition : fightId < 0");
team = new Types.FightTeamInformations();
team.Deserialize(reader);
}