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(); }
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"); }
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"); }
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); } }
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); } }
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"); }
// 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(); }
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(); }
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"); }
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); } }
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); }
// 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; } }
// 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(); }
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"); }
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); } }
public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); partyType = reader.ReadSByte(); if (partyType < 0) throw new Exception("Forbidden value on partyType = " + partyType + ", it doesn't respect the following condition : partyType < 0"); partyLeaderId = reader.ReadVarInt(); if (partyLeaderId < 0) throw new Exception("Forbidden value on partyLeaderId = " + partyLeaderId + ", it doesn't respect the following condition : partyLeaderId < 0"); maxParticipants = reader.ReadSByte(); if (maxParticipants < 0) throw new Exception("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0"); var limit = reader.ReadUShort(); members = new Types.PartyMemberInformations[limit]; for (int i = 0; i < limit; i++) { members[i] = Types.ProtocolTypeManager.GetInstance<Types.PartyMemberInformations>(reader.ReadShort()); members[i].Deserialize(reader); } limit = reader.ReadUShort(); guests = new Types.PartyGuestInformations[limit]; for (int i = 0; i < limit; i++) { guests[i] = new Types.PartyGuestInformations(); guests[i].Deserialize(reader); } restricted = reader.ReadBoolean(); partyName = reader.ReadUTF(); }
public virtual void Deserialize(BigEndianReader 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.ReadVarShort(); if (subAreaId < 0) throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0"); }
public override void Deserialize(BigEndianReader reader) { byte flag1 = reader.ReadByte(); autoconnect = BooleanByteWrapper.GetFlag(flag1, 0); useCertificate = BooleanByteWrapper.GetFlag(flag1, 1); useLoginToken = BooleanByteWrapper.GetFlag(flag1, 2); version = new Types.VersionExtended(); version.Deserialize(reader); lang = reader.ReadUTF(); var limit = reader.ReadVarInt(); credentials = new sbyte[limit]; for (int i = 0; i < limit; i++) { credentials[i] = reader.ReadSByte(); } serverId = reader.ReadShort(); sessionOptionalSalt = reader.ReadDouble(); if (sessionOptionalSalt < -9.007199254740992E15 || sessionOptionalSalt > 9.007199254740992E15) throw new Exception("Forbidden value on sessionOptionalSalt = " + sessionOptionalSalt + ", it doesn't respect the following condition : sessionOptionalSalt < -9.007199254740992E15 || sessionOptionalSalt > 9.007199254740992E15"); ushort length = reader.ReadUShort(); failedAttempts = new List<short>(); for (int i = 0; i < length; i++) { failedAttempts.Add(reader.ReadVarShort()); } }
public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); objectGID = reader.ReadVarShort(); if (objectGID < 0) throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0"); 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.ReadVarInt(); if (objectUID < 0) throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0"); quantity = reader.ReadVarInt(); if (quantity < 0) throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0"); objectPrice = reader.ReadVarInt(); if (objectPrice < 0) throw new Exception("Forbidden value on objectPrice = " + objectPrice + ", it doesn't respect the following condition : objectPrice < 0"); publicPrice = reader.ReadVarInt(); if (publicPrice < 0) throw new Exception("Forbidden value on publicPrice = " + publicPrice + ", it doesn't respect the following condition : publicPrice < 0"); }
public override void Deserialize(BigEndianReader 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.ReadVarInt(); 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[i] = Types.ProtocolTypeManager.GetInstance<Types.AbstractSocialGroupInfos>(reader.ReadShort()); socialGroups[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 virtual void Deserialize(BigEndianReader reader) { portalId = reader.ReadVarShort(); if (portalId < 0) throw new Exception("Forbidden value on portalId = " + portalId + ", it doesn't respect the following condition : portalId < 0"); areaId = reader.ReadShort(); }
public virtual void Deserialize(BigEndianReader reader) { fightId = reader.ReadInt(); fightType = reader.ReadSByte(); if (fightType < 0) throw new Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0"); var limit = reader.ReadUShort(); fightTeams = new Types.FightTeamInformations[limit]; for (int i = 0; i < limit; i++) { fightTeams[i] = Types.ProtocolTypeManager.GetInstance<Types.FightTeamInformations>(reader.ReadShort()); fightTeams[i].Deserialize(reader); } limit = reader.ReadUShort(); fightTeamsPositions = new short[limit]; for (int i = 0; i < limit; i++) { fightTeamsPositions[i] = reader.ReadVarShort(); } limit = reader.ReadUShort(); fightTeamsOptions = new Types.FightOptionsInformations[limit]; for (int i = 0; i < limit; i++) { fightTeamsOptions[i] = new Types.FightOptionsInformations(); fightTeamsOptions[i].Deserialize(reader); } }
public override void Deserialize(BigEndianReader reader) { timestamp = reader.ReadDouble(); if (timestamp < 0 || timestamp > 9.007199254740992E15) throw new Exception("Forbidden value on timestamp = " + timestamp + ", it doesn't respect the following condition : timestamp < 0 || timestamp > 9.007199254740992E15"); timezoneOffset = reader.ReadShort(); }
public override void Deserialize(BigEndianReader 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"); }
public virtual void Deserialize(BigEndianReader reader) { contextualId = reader.ReadInt(); look = new Types.EntityLook(); look.Deserialize(reader); disposition = Types.ProtocolTypeManager.GetInstance<Types.EntityDispositionInformations>(reader.ReadShort()); disposition.Deserialize(reader); }
public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); arg1 = reader.ReadInt(); arg2 = reader.ReadInt(); arg3 = reader.ReadInt(); delay = reader.ReadShort(); }
public override void Deserialize(BigEndianReader 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); }
public override void Deserialize(BigEndianReader 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); }
public override void Deserialize(BigEndianReader 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); }
public virtual void Deserialize(BigEndianReader 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.ReadVarShort(); 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.ReadVarInt(); if (price < 0) throw new Exception("Forbidden value on price = " + price + ", it doesn't respect the following condition : price < 0"); }