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"); }
public override void Deserialize(ICustomDataInput reader) { lockDuration = reader.ReadByte(); if ((lockDuration < 0) || (lockDuration > 255)) throw new Exception("Forbidden value on lockDuration = " + lockDuration + ", it doesn't respect the following condition : (lockDuration < 0) || (lockDuration > 255)"); author = reader.ReadUTF(); content = reader.ReadUTF(); }
public virtual void Deserialize(ICustomDataInput reader) { modelId = reader.ReadSByte(); if (modelId < 0) throw new Exception("Forbidden value on modelId = " + modelId + ", it doesn't respect the following condition : modelId < 0"); name = reader.ReadUTF(); ownerName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput 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)"); liberator = reader.ReadUTF(); }
public virtual void Deserialize(ICustomDataInput reader) { id = reader.ReadUTF(); state = reader.ReadSByte(); if (state < 0) throw new Exception("Forbidden value on state = " + state + ", it doesn't respect the following condition : state < 0"); }
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"); content = reader.ReadUTF(); }
public virtual void Deserialize(ICustomDataInput reader) { collectorCallerName = reader.ReadUTF(); date = reader.ReadInt(); if (date < 0) throw new Exception("Forbidden value on date = " + date + ", it doesn't respect the following condition : date < 0"); }
public override void Deserialize(ICustomDataInput reader) { content = reader.ReadUTF(); timestamp = reader.ReadInt(); if (timestamp < 0) throw new Exception("Forbidden value on timestamp = " + timestamp + ", it doesn't respect the following condition : timestamp < 0"); }
public virtual void Deserialize(ICustomDataInput reader) { teamId = reader.ReadSByte(); if (teamId < 0) throw new Exception("Forbidden value on teamId = " + teamId + ", it doesn't respect the following condition : teamId < 0"); partyName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { characterId = reader.ReadInt(); if (characterId < 0) throw new Exception("Forbidden value on characterId = " + characterId + ", it doesn't respect the following condition : characterId < 0"); secretAnswerHash = reader.ReadUTF(); }
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"); }
public virtual void Deserialize(ICustomDataInput reader) { id = reader.ReadInt(); if (id < 0) throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0"); hash = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { uid = reader.ReadUTF(); failure = reader.ReadSByte(); if (failure < 0) throw new Exception("Forbidden value on failure = " + failure + ", it doesn't respect the following condition : failure < 0"); }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); name = reader.ReadUTF(); status = new Types.PlayerStatus(); status.Deserialize(reader); }
public virtual void Deserialize(ICustomDataInput reader) { uid = reader.ReadInt(); if (uid < 0) throw new Exception("Forbidden value on uid = " + uid + ", it doesn't respect the following condition : uid < 0"); title = reader.ReadUTF(); text = reader.ReadUTF(); descUrl = reader.ReadUTF(); pictureUrl = reader.ReadUTF(); var limit = reader.ReadUShort(); items = new Types.ObjectItemInformationWithQuantity[limit]; for (int i = 0; i < limit; i++) { (items as Types.ObjectItemInformationWithQuantity[])[i] = new Types.ObjectItemInformationWithQuantity(); (items as Types.ObjectItemInformationWithQuantity[])[i].Deserialize(reader); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); allianceId = reader.ReadVarUhInt(); if (allianceId < 0) throw new Exception("Forbidden value on allianceId = " + allianceId + ", it doesn't respect the following condition : allianceId < 0"); allianceTag = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); receiverId = reader.ReadVarUhInt(); if (receiverId < 0) throw new Exception("Forbidden value on receiverId = " + receiverId + ", it doesn't respect the following condition : receiverId < 0"); receiverName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { recruterId = reader.ReadVarUhInt(); if (recruterId < 0) throw new Exception("Forbidden value on recruterId = " + recruterId + ", it doesn't respect the following condition : recruterId < 0"); recruterName = reader.ReadUTF(); allianceInfo = new Types.BasicNamedAllianceInformations(); allianceInfo.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { houseId = reader.ReadVarUhInt(); if (houseId < 0) throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0"); realPrice = reader.ReadVarUhInt(); if (realPrice < 0) throw new Exception("Forbidden value on realPrice = " + realPrice + ", it doesn't respect the following condition : realPrice < 0"); buyerName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { lang = reader.ReadUTF(); community = reader.ReadSByte(); if (community < 0) throw new Exception("Forbidden value on community = " + community + ", it doesn't respect the following condition : community < 0"); gameType = reader.ReadSByte(); if (gameType < 0) throw new Exception("Forbidden value on gameType = " + gameType + ", it doesn't respect the following condition : gameType < 0"); }
public override void Deserialize(ICustomDataInput reader) { salt = reader.ReadUTF(); var limit = reader.ReadUShort(); key = new sbyte[limit]; for (int i = 0; i < limit; i++) { (key as sbyte[])[i] = reader.ReadSByte(); } }
public override void Deserialize(ICustomDataInput reader) { var limit = reader.ReadUShort(); aliases = new string[limit]; for (int i = 0; i < limit; i++) { (aliases as string[])[i] = reader.ReadUTF(); } limit = reader.ReadUShort(); args = new string[limit]; for (int i = 0; i < limit; i++) { (args as string[])[i] = reader.ReadUTF(); } limit = reader.ReadUShort(); descriptions = new string[limit]; for (int i = 0; i < limit; i++) { (descriptions as string[])[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); playerId = reader.ReadVarUhInt(); if (playerId < 0) throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0"); playerName = reader.ReadUTF(); breed = reader.ReadSByte(); if ((breed < (byte)Enums.PlayableBreedEnum.Feca) || (breed > (byte)Enums.PlayableBreedEnum.Eliotrope)) throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : (breed < (byte)Enums.PlayableBreedEnum.Feca) || (breed > (byte)Enums.PlayableBreedEnum.Eliotrope)"); sex = reader.ReadBoolean(); }
public override void Deserialize(ICustomDataInput reader) { address = reader.ReadUTF(); port = reader.ReadUShort(); if ((port < 0) || (port > 65535)) throw new Exception("Forbidden value on port = " + port + ", it doesn't respect the following condition : (port < 0) || (port > 65535)"); var limit = reader.ReadUShort(); ticket = new sbyte[limit]; for (int i = 0; i < limit; i++) { (ticket as sbyte[])[i] = reader.ReadSByte(); } }
public override void Deserialize(ICustomDataInput reader) { id = reader.ReadVarUhShort(); if (id < 0) throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0"); var limit = reader.ReadUShort(); parameters = new string[limit]; for (int i = 0; i < limit; i++) { (parameters as string[])[i] = reader.ReadUTF(); } forceOpen = reader.ReadBoolean(); }
public override void Deserialize(ICustomDataInput reader) { entityId = reader.ReadInt(); textId = reader.ReadVarUhShort(); if (textId < 0) throw new Exception("Forbidden value on textId = " + textId + ", it doesn't respect the following condition : textId < 0"); var limit = reader.ReadUShort(); parameters = new string[limit]; for (int i = 0; i < limit; i++) { (parameters as string[])[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); leaderName = reader.ReadUTF(); nbConnectedMembers = reader.ReadVarUhShort(); if (nbConnectedMembers < 0) throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0"); nbTaxCollectors = reader.ReadSByte(); if (nbTaxCollectors < 0) throw new Exception("Forbidden value on nbTaxCollectors = " + nbTaxCollectors + ", it doesn't respect the following condition : nbTaxCollectors < 0"); lastActivity = reader.ReadInt(); if (lastActivity < 0) throw new Exception("Forbidden value on lastActivity = " + lastActivity + ", it doesn't respect the following condition : lastActivity < 0"); enabled = reader.ReadBoolean(); }
public override void Deserialize(ICustomDataInput reader) { byte flag1 = reader.ReadByte(); hasRights = BooleanByteWrapper.GetFlag(flag1, 0); wasAlreadyConnected = BooleanByteWrapper.GetFlag(flag1, 1); login = reader.ReadUTF(); nickname = 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"); communityId = reader.ReadSByte(); if (communityId < 0) throw new Exception("Forbidden value on communityId = " + communityId + ", it doesn't respect the following condition : communityId < 0"); secretQuestion = reader.ReadUTF(); accountCreation = reader.ReadDouble(); if ((accountCreation < 0) || (accountCreation > 9.007199254740992E15)) throw new Exception("Forbidden value on accountCreation = " + accountCreation + ", it doesn't respect the following condition : (accountCreation < 0) || (accountCreation > 9.007199254740992E15)"); subscriptionElapsedDuration = reader.ReadDouble(); if ((subscriptionElapsedDuration < 0) || (subscriptionElapsedDuration > 9.007199254740992E15)) throw new Exception("Forbidden value on subscriptionElapsedDuration = " + subscriptionElapsedDuration + ", it doesn't respect the following condition : (subscriptionElapsedDuration < 0) || (subscriptionElapsedDuration > 9.007199254740992E15)"); subscriptionEndDate = reader.ReadDouble(); if ((subscriptionEndDate < 0) || (subscriptionEndDate > 9.007199254740992E15)) throw new Exception("Forbidden value on subscriptionEndDate = " + subscriptionEndDate + ", it doesn't respect the following condition : (subscriptionEndDate < 0) || (subscriptionEndDate > 9.007199254740992E15)"); }
public virtual void Deserialize(ICustomDataInput reader) { objectiveId = reader.ReadVarUhShort(); if (objectiveId < 0) { throw new Exception("Forbidden value on objectiveId = " + objectiveId + ", it doesn't respect the following condition : objectiveId < 0"); } objectiveStatus = reader.ReadBoolean(); var limit = reader.ReadUShort(); dialogParams = new string[limit]; for (int i = 0; i < limit; i++) { (dialogParams as string[])[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { requestId = reader.ReadVarUhInt(); if (requestId < 0) { throw new Exception("Forbidden value on requestId = " + requestId + ", it doesn't respect the following condition : requestId < 0"); } playerName = reader.ReadUTF(); playerId = reader.ReadVarUhLong(); if (playerId < 0 || playerId > 9007199254740990) { throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0 || playerId > 9007199254740990"); } look = new Types.EntityLook(); look.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { serverId = reader.ReadVarUhShort(); if (serverId < 0) throw new Exception("Forbidden value on serverId = " + serverId + ", it doesn't respect the following condition : serverId < 0"); address = reader.ReadUTF(); port = reader.ReadUShort(); if ((port < 0) || (port > 65535)) throw new Exception("Forbidden value on port = " + port + ", it doesn't respect the following condition : (port < 0) || (port > 65535)"); canCreateNewCharacter = reader.ReadBoolean(); var limit = reader.ReadUShort(); ticket = new byte[limit]; for (int i = 0; i < limit; i++) { (ticket as byte[])[i] = reader.ReadByte(); } }
public override void Deserialize(ICustomDataInput reader) { PlayerId = reader.ReadVarLong(); PlayerName = reader.ReadUTF(); AlignmentSide = reader.ReadByte(); Breed = reader.ReadByte(); Sex = reader.ReadBoolean(); IsInWorkshop = reader.ReadBoolean(); WorldX = reader.ReadShort(); WorldY = reader.ReadShort(); MapId = reader.ReadDouble(); SubAreaId = reader.ReadVarShort(); var statusTypeId = reader.ReadShort(); Status = new PlayerStatus(); Status.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { this.lang = reader.ReadUTF(); this.community = reader.ReadSByte(); if (this.community < 0) { throw new Exception("Forbidden value on community = " + this.community + ", it doesn't respect the following condition : community < 0"); } this.gameType = reader.ReadSByte(); this.arenaLeaveBanTime = reader.ReadVarUhShort(); if (this.arenaLeaveBanTime < 0) { throw new Exception("Forbidden value on arenaLeaveBanTime = " + this.arenaLeaveBanTime + ", it doesn't respect the following condition : arenaLeaveBanTime < 0"); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); LastTimeSlotModificationDate = reader.ReadInt(); LastTimeSlotModificationAuthorGuildId = reader.ReadVarInt(); LastTimeSlotModificationAuthorId = reader.ReadVarLong(); LastTimeSlotModificationAuthorName = reader.ReadUTF(); var countModulesObjects = reader.ReadShort(); ModulesObjects = new List <ObjectItem>(); for (short i = 0; i < countModulesObjects; i++) { ObjectItem type = new ObjectItem(); type.Deserialize(reader); ModulesObjects.Add(type); } }
public override void Deserialize(ICustomDataInput reader) { this.address = reader.ReadUTF(); this.port = reader.ReadUShort(); if (this.port < 0 || this.port > 65535) { throw new Exception("Forbidden value on port = " + this.port + ", it doesn't respect the following condition : port < 0 || port > 65535"); } var limit = reader.ReadUShort(); this.ticket = new sbyte[limit]; for (int i = 0; i < limit; i++) { this.ticket[i] = reader.ReadSByte(); } }
public override void Deserialize(ICustomDataInput reader) { this.hangUp = reader.ReadBoolean(); this.msgId = reader.ReadVarUhShort(); if (this.msgId < 0) { throw new Exception("Forbidden value on msgId = " + this.msgId + ", it doesn't respect the following condition : msgId < 0"); } var limit = reader.ReadUShort(); this.parameters = new string[limit]; for (int i = 0; i < limit; i++) { this.parameters[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); this.senderId = reader.ReadDouble(); if (this.senderId < -9007199254740990 || this.senderId > 9007199254740990) { throw new Exception("Forbidden value on senderId = " + this.senderId + ", it doesn't respect the following condition : senderId < -9007199254740990 || senderId > 9007199254740990"); } this.senderName = reader.ReadUTF(); this.senderAccountId = reader.ReadInt(); if (this.senderAccountId < 0) { throw new Exception("Forbidden value on senderAccountId = " + this.senderAccountId + ", it doesn't respect the following condition : senderAccountId < 0"); } }
public override void Deserialize(ICustomDataInput reader) { this.movementType = reader.ReadSByte(); if (this.movementType < 0) { throw new Exception("Forbidden value on movementType = " + this.movementType + ", it doesn't respect the following condition : movementType < 0"); } this.basicInfos = new TaxCollectorBasicInformations(); this.basicInfos.Deserialize(reader); this.playerId = reader.ReadVarUhLong(); if (this.playerId < 0 || this.playerId > 9007199254740990) { throw new Exception("Forbidden value on playerId = " + this.playerId + ", it doesn't respect the following condition : playerId < 0 || playerId > 9007199254740990"); } this.playerName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); reason = reader.ReadSByte(); if (reason < 0) throw new Exception("Forbidden value on reason = " + reason + ", it doesn't respect the following condition : reason < 0"); memberId = reader.ReadVarUhInt(); if (memberId < 0) throw new Exception("Forbidden value on memberId = " + memberId + ", it doesn't respect the following condition : memberId < 0"); memberAccountId = reader.ReadInt(); if (memberAccountId < 0) throw new Exception("Forbidden value on memberAccountId = " + memberAccountId + ", it doesn't respect the following condition : memberAccountId < 0"); memberName = reader.ReadUTF(); fightId = reader.ReadInt(); fightMap = new Types.MapCoordinatesExtended(); fightMap.Deserialize(reader); timeBeforeFightStart = reader.ReadVarShort(); }
public virtual void Deserialize(ICustomDataInput reader) { name = reader.ReadUTF(); breed = reader.ReadSByte(); sex = reader.ReadBoolean(); cosmeticId = reader.ReadVarUhShort(); if (cosmeticId < 0) { throw new Exception("Forbidden value on cosmeticId = " + cosmeticId + ", it doesn't respect the following condition : cosmeticId < 0"); } var limit = reader.ReadUShort(); colors = new int[limit]; for (int i = 0; i < limit; i++) { (colors as int[])[i] = reader.ReadInt(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); int modulesObjectsCount = reader.ReadUShort(); int modulesObjectsIndex; m_modulesObjects = new System.Collections.Generic.List <ObjectItem>(); for (modulesObjectsIndex = 0; (modulesObjectsIndex < modulesObjectsCount); modulesObjectsIndex = (modulesObjectsIndex + 1)) { ObjectItem objectToAdd = new ObjectItem(); objectToAdd.Deserialize(reader); m_modulesObjects.Add(objectToAdd); } m_lastTimeSlotModificationDate = reader.ReadInt(); m_lastTimeSlotModificationAuthorGuildId = reader.ReadVarUhInt(); m_lastTimeSlotModificationAuthorId = reader.ReadVarUhLong(); m_lastTimeSlotModificationAuthorName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { MessageId_ = reader.ReadVarInt(); var countDialogParams = reader.ReadShort(); DialogParams = new List <string>(); for (short i = 0; i < countDialogParams; i++) { DialogParams.Add(reader.ReadUTF()); } var countVisibleReplies = reader.ReadShort(); VisibleReplies = new List <int>(); for (short i = 0; i < countVisibleReplies; i++) { VisibleReplies.Add(reader.ReadVarInt()); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); byte flag = reader.ReadByte(); m_sex = BooleanByteWrapper.GetFlag(flag, 0); m_havenBagShared = BooleanByteWrapper.GetFlag(flag, 1); m_playerId = reader.ReadVarUhLong(); m_playerName = reader.ReadUTF(); m_level = reader.ReadSByte(); m_alignmentSide = reader.ReadByte(); m_breed = reader.ReadByte(); m_guildInfo = new GuildInformations(); m_guildInfo.Deserialize(reader); m_moodSmileyId = reader.ReadVarUhShort(); m_status = ProtocolTypeManager.GetInstance <PlayerStatus>((short)reader.ReadUShort()); m_status.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { Address = reader.ReadUTF(); var countPorts = reader.ReadShort(); Ports = new List <short>(); for (short i = 0; i < countPorts; i++) { Ports.Add(reader.ReadShort()); } var countTicket = reader.ReadVarInt(); Ticket = new List <byte>(); for (int i = 0; i < countTicket; i++) { Ticket.Add(reader.ReadByte()); } }
public override void Deserialize(ICustomDataInput reader) { msgId = reader.ReadVarUhShort(); if (msgId < 0) { throw new Exception("Forbidden value on msgId = " + msgId + ", it doesn't respect the following condition : msgId < 0"); } timeStamp = reader.ReadInt(); if (timeStamp < 0) { throw new Exception("Forbidden value on timeStamp = " + timeStamp + ", it doesn't respect the following condition : timeStamp < 0"); } owner = reader.ReadUTF(); objectGenericId = reader.ReadVarUhShort(); if (objectGenericId < 0) { throw new Exception("Forbidden value on objectGenericId = " + objectGenericId + ", it doesn't respect the following condition : objectGenericId < 0"); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); InstanceId = reader.ReadInt(); SecondHand = reader.ReadBoolean(); OwnerName = reader.ReadUTF(); WorldX = reader.ReadShort(); WorldY = reader.ReadShort(); MapId = reader.ReadDouble(); SubAreaId = reader.ReadVarShort(); var countSkillListIds = reader.ReadShort(); SkillListIds = new List <int>(); for (short i = 0; i < countSkillListIds; i++) { SkillListIds.Add(reader.ReadInt()); } GuildshareParams = reader.ReadVarInt(); }
public virtual void Deserialize(ICustomDataInput reader) { houseId = reader.ReadVarUhInt(); if (houseId < 0) { throw new Exception("Forbidden value on houseId = " + houseId + ", it doesn't respect the following condition : houseId < 0"); } 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(); 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"); } var limit = reader.ReadUShort(); skillListIds = new int[limit]; for (int i = 0; i < limit; i++) { skillListIds[i] = reader.ReadInt(); } guildshareParams = reader.ReadVarUhInt(); if (guildshareParams < 0) { throw new Exception("Forbidden value on guildshareParams = " + guildshareParams + ", it doesn't respect the following condition : guildshareParams < 0"); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); this.playerId = reader.ReadVarUhLong(); if (this.playerId < 0 || this.playerId > 9007199254740990) { throw new Exception("Forbidden value on playerId = " + this.playerId + ", it doesn't respect the following condition : playerId < 0 || playerId > 9007199254740990"); } this.playerName = reader.ReadUTF(); this.breed = reader.ReadSByte(); if (this.breed < (byte)Enums.PlayableBreedEnum.Feca || this.breed > (byte)Enums.PlayableBreedEnum.Huppermage) { throw new Exception("Forbidden value on breed = " + this.breed + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage"); } this.sex = reader.ReadBoolean(); }
public override void Deserialize(ICustomDataInput reader) { ServerId = reader.ReadVarShort(); Address = reader.ReadUTF(); var countPorts = reader.ReadShort(); Ports = new List <int>(); for (short i = 0; i < countPorts; i++) { Ports.Add(reader.ReadInt()); } CanCreateNewCharacter = reader.ReadBoolean(); var countTicket = reader.ReadVarInt(); Ticket = new List <byte>(); for (int i = 0; i < countTicket; i++) { Ticket.Add(reader.ReadByte()); } }
public override void Deserialize(ICustomDataInput reader) { entityId = reader.ReadDouble(); if (entityId < -9007199254740990 || entityId > 9007199254740990) { throw new Exception("Forbidden value on entityId = " + entityId + ", it doesn't respect the following condition : entityId < -9007199254740990 || entityId > 9007199254740990"); } textId = reader.ReadVarUhShort(); if (textId < 0) { throw new Exception("Forbidden value on textId = " + textId + ", it doesn't respect the following condition : textId < 0"); } var limit = reader.ReadUShort(); parameters = new string[limit]; for (int i = 0; i < limit; i++) { parameters[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { msgId = reader.ReadVarUhShort(); if (msgId < 0) { throw new Exception("Forbidden value on msgId = " + msgId + ", it doesn't respect the following condition : msgId < 0"); } var limit = reader.ReadUShort(); parameters = new string[limit]; for (int i = 0; i < limit; i++) { parameters[i] = reader.ReadUTF(); } livingObject = reader.ReadVarUhInt(); if (livingObject < 0) { throw new Exception("Forbidden value on livingObject = " + livingObject + ", it doesn't respect the following condition : livingObject < 0"); } }
public override void Deserialize(ICustomDataInput reader) { msgType = reader.ReadSByte(); if (msgType < 0) { throw new Exception("Forbidden value on msgType = " + msgType + ", it doesn't respect the following condition : msgType < 0"); } msgId = reader.ReadVarUhShort(); if (msgId < 0) { throw new Exception("Forbidden value on msgId = " + msgId + ", it doesn't respect the following condition : msgId < 0"); } var limit = reader.ReadUShort(); parameters = new string[limit]; for (int i = 0; i < limit; i++) { (parameters as string[])[i] = reader.ReadUTF(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); int skillListIdsCount = reader.ReadUShort(); int skillListIdsIndex; m_skillListIds = new System.Collections.Generic.List <int>(); for (skillListIdsIndex = 0; (skillListIdsIndex < skillListIdsCount); skillListIdsIndex = (skillListIdsIndex + 1)) { m_skillListIds.Add(reader.ReadInt()); } m_instanceId = reader.ReadInt(); m_secondHand = reader.ReadBoolean(); m_ownerName = reader.ReadUTF(); m_worldX = reader.ReadShort(); m_worldY = reader.ReadShort(); m_mapId = reader.ReadInt(); m_subAreaId = reader.ReadVarUhShort(); m_guildshareParams = reader.ReadVarUhInt(); }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); byte box0 = reader.ReadByte(); Sex = BooleanByteWrapper.GetFlag(box0, 1); HavenBagShared = BooleanByteWrapper.GetFlag(box0, 2); PlayerId = reader.ReadVarLong(); PlayerName = reader.ReadUTF(); Level = reader.ReadVarShort(); AlignmentSide = reader.ReadByte(); Breed = reader.ReadByte(); GuildInfo = new GuildInformations(); GuildInfo.Deserialize(reader); MoodSmileyId = reader.ReadVarShort(); var statusTypeId = reader.ReadShort(); Status = new PlayerStatus(); Status.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { int dialogParamsCount = reader.ReadUShort(); int dialogParamsIndex; m_dialogParams = new System.Collections.Generic.List <string>(); for (dialogParamsIndex = 0; (dialogParamsIndex < dialogParamsCount); dialogParamsIndex = (dialogParamsIndex + 1)) { m_dialogParams.Add(reader.ReadUTF()); } int visibleRepliesCount = reader.ReadUShort(); int visibleRepliesIndex; m_visibleReplies = new System.Collections.Generic.List <uint>(); for (visibleRepliesIndex = 0; (visibleRepliesIndex < visibleRepliesCount); visibleRepliesIndex = (visibleRepliesIndex + 1)) { m_visibleReplies.Add(reader.ReadVarUhInt()); } m_messageId = reader.ReadVarUhInt(); }
public virtual void Deserialize(ICustomDataInput reader) { playerId = reader.ReadVarUhInt(); if (playerId < 0) { throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0"); } playerName = reader.ReadUTF(); breed = reader.ReadSByte(); if (breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Eliotrope) { throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Eliotrope"); } sex = reader.ReadBoolean(); level = reader.ReadByte(); if (level < 0 || level > 255) { throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0 || level > 255"); } }
public override void Deserialize(ICustomDataInput reader) { name = reader.ReadUTF(); breed = reader.ReadSByte(); if ((breed < (byte)Enums.PlayableBreedEnum.Feca) || (breed > (byte)Enums.PlayableBreedEnum.Eliotrope)) { throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : (breed < (byte)Enums.PlayableBreedEnum.Feca) || (breed > (byte)Enums.PlayableBreedEnum.Eliotrope)"); } sex = reader.ReadBoolean(); colors = new int[5]; for (int i = 0; i < 5; i++) { (colors as int[])[i] = reader.ReadInt(); } cosmeticId = reader.ReadVarUhShort(); if (cosmeticId < 0) { throw new Exception("Forbidden value on cosmeticId = " + cosmeticId + ", it doesn't respect the following condition : cosmeticId < 0"); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); this.partyType = reader.ReadSByte(); if (this.partyType < 0) { throw new Exception("Forbidden value on partyType = " + this.partyType + ", it doesn't respect the following condition : partyType < 0"); } this.partyLeaderId = reader.ReadVarUhLong(); if (this.partyLeaderId < 0 || this.partyLeaderId > 9007199254740990) { throw new Exception("Forbidden value on partyLeaderId = " + this.partyLeaderId + ", it doesn't respect the following condition : partyLeaderId < 0 || partyLeaderId > 9007199254740990"); } this.maxParticipants = reader.ReadSByte(); if (this.maxParticipants < 0) { throw new Exception("Forbidden value on maxParticipants = " + this.maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0"); } var limit = reader.ReadUShort(); this.members = new PartyMemberInformations[limit]; for (int i = 0; i < limit; i++) { this.members[i] = ProtocolTypeManager.GetInstance <PartyMemberInformations>(reader.ReadShort()); this.members[i].Deserialize(reader); } limit = reader.ReadUShort(); this.guests = new PartyGuestInformations[limit]; for (int i = 0; i < limit; i++) { this.guests[i] = new PartyGuestInformations(); this.guests[i].Deserialize(reader); } this.restricted = reader.ReadBoolean(); this.partyName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { messageId = reader.ReadVarUhShort(); if (messageId < 0) { throw new Exception("Forbidden value on messageId = " + messageId + ", it doesn't respect the following condition : messageId < 0"); } var limit = reader.ReadUShort(); dialogParams = new string[limit]; for (int i = 0; i < limit; i++) { (dialogParams as string[])[i] = reader.ReadUTF(); } limit = reader.ReadUShort(); visibleReplies = new ushort[limit]; for (int i = 0; i < limit; i++) { (visibleReplies as ushort[])[i] = reader.ReadVarUhShort(); } }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); leaderName = reader.ReadUTF(); nbConnectedMembers = reader.ReadVarUhShort(); if (nbConnectedMembers < 0) { throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0"); } nbTaxCollectors = reader.ReadSByte(); if (nbTaxCollectors < 0) { throw new Exception("Forbidden value on nbTaxCollectors = " + nbTaxCollectors + ", it doesn't respect the following condition : nbTaxCollectors < 0"); } lastActivity = reader.ReadInt(); if (lastActivity < 0) { throw new Exception("Forbidden value on lastActivity = " + lastActivity + ", it doesn't respect the following condition : lastActivity < 0"); } enabled = reader.ReadBoolean(); }