예제 #1
0
 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
0
 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)
 {
     resultCode = reader.ReadSByte();
     if (resultCode < 0)
         throw new Exception("Forbidden value on resultCode = " + resultCode + ", it doesn't respect the following condition : resultCode < 0");
     smileyId = reader.ReadSByte();
 }
예제 #4
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     breed = reader.ReadSByte();
     sex = reader.ReadBoolean();
     rank = reader.ReadVarShort();
     if (rank < 0)
         throw new Exception("Forbidden value on rank = " + rank + ", it doesn't respect the following condition : rank < 0");
     givenExperience = reader.ReadVarUhLong();
     if (givenExperience < 0 || givenExperience > 9.007199254740992E15)
         throw new Exception("Forbidden value on givenExperience = " + givenExperience + ", it doesn't respect the following condition : givenExperience < 0 || givenExperience > 9.007199254740992E15");
     experienceGivenPercent = reader.ReadSByte();
     if (experienceGivenPercent < 0 || experienceGivenPercent > 100)
         throw new Exception("Forbidden value on experienceGivenPercent = " + experienceGivenPercent + ", it doesn't respect the following condition : experienceGivenPercent < 0 || experienceGivenPercent > 100");
     rights = reader.ReadVarInt();
     if (rights < 0)
         throw new Exception("Forbidden value on rights = " + rights + ", it doesn't respect the following condition : rights < 0");
     connected = reader.ReadSByte();
     if (connected < 0)
         throw new Exception("Forbidden value on connected = " + connected + ", it doesn't respect the following condition : connected < 0");
     alignmentSide = reader.ReadSByte();
     hoursSinceLastConnection = reader.ReadUShort();
     if (hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535)
         throw new Exception("Forbidden value on hoursSinceLastConnection = " + hoursSinceLastConnection + ", it doesn't respect the following condition : hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535");
     moodSmileyId = reader.ReadSByte();
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     achievementPoints = reader.ReadInt();
     status = (PlayerStatus)Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 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();
     }
 }
 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");
 }
예제 #7
0
 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 override void Deserialize(BigEndianReader reader)
 {
     areaId = reader.ReadInt();
     atLeastNbMount = reader.ReadSByte();
     atLeastNbMachine = reader.ReadSByte();
     maxPrice = reader.ReadVarInt();
     if (maxPrice < 0)
         throw new Exception("Forbidden value on maxPrice = " + maxPrice + ", it doesn't respect the following condition : maxPrice < 0");
 }
 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");
     slot = reader.ReadSByte();
     if (slot < 0 || slot > 99)
         throw new Exception("Forbidden value on slot = " + slot + ", it doesn't respect the following condition : slot < 0 || slot > 99");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     presetId = reader.ReadSByte();
     if (presetId < 0)
         throw new Exception("Forbidden value on presetId = " + presetId + ", it doesn't respect the following condition : presetId < 0");
     code = reader.ReadSByte();
     if (code < 0)
         throw new Exception("Forbidden value on code = " + code + ", it doesn't respect the following condition : code < 0");
 }
 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");
     result = reader.ReadSByte();
     if (result < 0)
         throw new Exception("Forbidden value on result = " + result + ", it doesn't respect the following condition : result < 0");
 }
예제 #12
0
 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");
     zoneSize = reader.ReadSByte();
     cellColor = reader.ReadInt();
     cellsType = reader.ReadSByte();
 }
예제 #13
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     install = reader.ReadSByte();
     if (install < 0)
         throw new Exception("Forbidden value on install = " + install + ", it doesn't respect the following condition : install < 0");
     technology = reader.ReadSByte();
     if (technology < 0)
         throw new Exception("Forbidden value on technology = " + technology + ", it doesn't respect the following condition : technology < 0");
 }
예제 #14
0
 public override void Deserialize(BigEndianReader 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(BigEndianReader reader)
 {
     presetId = reader.ReadSByte();
     if (presetId < 0)
         throw new Exception("Forbidden value on presetId = " + presetId + ", it doesn't respect the following condition : presetId < 0");
     symbolId = reader.ReadSByte();
     if (symbolId < 0)
         throw new Exception("Forbidden value on symbolId = " + symbolId + ", it doesn't respect the following condition : symbolId < 0");
     saveEquipment = reader.ReadBoolean();
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     maxSlots = reader.ReadSByte();
     if (maxSlots < 0)
         throw new Exception("Forbidden value on maxSlots = " + maxSlots + ", it doesn't respect the following condition : maxSlots < 0");
     probability = reader.ReadSByte();
     if (probability < 0)
         throw new Exception("Forbidden value on probability = " + probability + ", it doesn't respect the following condition : probability < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     possibleChangeMask = reader.ReadSByte();
     if (possibleChangeMask < 0)
         throw new Exception("Forbidden value on possibleChangeMask = " + possibleChangeMask + ", it doesn't respect the following condition : possibleChangeMask < 0");
     mandatoryChangeMask = reader.ReadSByte();
     if (mandatoryChangeMask < 0)
         throw new Exception("Forbidden value on mandatoryChangeMask = " + mandatoryChangeMask + ", it doesn't respect the following condition : mandatoryChangeMask < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     id = reader.ReadSByte();
     if (id < 0)
         throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0");
     teamId = reader.ReadSByte();
     if (teamId < 0)
         throw new Exception("Forbidden value on teamId = " + teamId + ", it doesn't respect the following condition : teamId < 0");
     nbTurnBeforeNextWave = reader.ReadShort();
 }
예제 #19
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     bindingPointCategory = reader.ReadSByte();
     if (bindingPointCategory < 0)
         throw new Exception("Forbidden value on bindingPointCategory = " + bindingPointCategory + ", it doesn't respect the following condition : bindingPointCategory < 0");
     bindingPointIndex = reader.ReadSByte();
     if (bindingPointIndex < 0)
         throw new Exception("Forbidden value on bindingPointIndex = " + bindingPointIndex + ", it doesn't respect the following condition : bindingPointIndex < 0");
     subEntityLook = new Types.EntityLook();
     subEntityLook.Deserialize(reader);
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     indexId = reader.ReadSByte();
     if (indexId < 0)
         throw new Exception("Forbidden value on indexId = " + indexId + ", it doesn't respect the following condition : indexId < 0");
     companionGenericId = reader.ReadSByte();
     if (companionGenericId < 0)
         throw new Exception("Forbidden value on companionGenericId = " + companionGenericId + ", it doesn't respect the following condition : companionGenericId < 0");
     entityLook = new Types.EntityLook();
     entityLook.Deserialize(reader);
 }
 public override void Deserialize(BigEndianReader reader)
 {
     serverId = reader.ReadVarShort();
     if (serverId < 0)
         throw new Exception("Forbidden value on serverId = " + serverId + ", it doesn't respect the following condition : serverId < 0");
     error = reader.ReadSByte();
     if (error < 0)
         throw new Exception("Forbidden value on error = " + error + ", it doesn't respect the following condition : error < 0");
     serverStatus = reader.ReadSByte();
     if (serverStatus < 0)
         throw new Exception("Forbidden value on serverStatus = " + serverStatus + ", it doesn't respect the following condition : serverStatus < 0");
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     jobId = reader.ReadSByte();
     if (jobId < 0)
         throw new Exception("Forbidden value on jobId = " + jobId + ", it doesn't respect the following condition : jobId < 0");
     minSlot = reader.ReadSByte();
     if (minSlot < 0 || minSlot > 9)
         throw new Exception("Forbidden value on minSlot = " + minSlot + ", it doesn't respect the following condition : minSlot < 0 || minSlot > 9");
     userDefinedParams = reader.ReadSByte();
     if (userDefinedParams < 0)
         throw new Exception("Forbidden value on userDefinedParams = " + userDefinedParams + ", it doesn't respect the following condition : userDefinedParams < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     days = reader.ReadVarShort();
     if (days < 0)
         throw new Exception("Forbidden value on days = " + days + ", it doesn't respect the following condition : days < 0");
     hours = reader.ReadSByte();
     if (hours < 0)
         throw new Exception("Forbidden value on hours = " + hours + ", it doesn't respect the following condition : hours < 0");
     minutes = reader.ReadSByte();
     if (minutes < 0)
         throw new Exception("Forbidden value on minutes = " + minutes + ", it doesn't respect the following condition : minutes < 0");
 }
예제 #24
0
 public override void Deserialize(BigEndianReader reader)
 {
     day = reader.ReadSByte();
     if (day < 0)
         throw new Exception("Forbidden value on day = " + day + ", it doesn't respect the following condition : day < 0");
     month = reader.ReadSByte();
     if (month < 0)
         throw new Exception("Forbidden value on month = " + month + ", it doesn't respect the following condition : month < 0");
     year = reader.ReadShort();
     if (year < 0)
         throw new Exception("Forbidden value on year = " + year + ", it doesn't respect the following condition : year < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     maxCase = reader.ReadSByte();
     if (maxCase < 0)
         throw new Exception("Forbidden value on maxCase = " + maxCase + ", it doesn't respect the following condition : maxCase < 0");
     skillId = reader.ReadVarInt();
     if (skillId < 0)
         throw new Exception("Forbidden value on skillId = " + skillId + ", it doesn't respect the following condition : skillId < 0");
     crafterJobLevel = reader.ReadSByte();
     if (crafterJobLevel < 0)
         throw new Exception("Forbidden value on crafterJobLevel = " + crafterJobLevel + ", it doesn't respect the following condition : crafterJobLevel < 0");
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     alignmentSide = reader.ReadSByte();
     alignmentValue = reader.ReadSByte();
     if (alignmentValue < 0)
         throw new Exception("Forbidden value on alignmentValue = " + alignmentValue + ", it doesn't respect the following condition : alignmentValue < 0");
     alignmentGrade = reader.ReadSByte();
     if (alignmentGrade < 0)
         throw new Exception("Forbidden value on alignmentGrade = " + alignmentGrade + ", it doesn't respect the following condition : alignmentGrade < 0");
     characterPower = reader.ReadVarInt();
     if (characterPower < 0)
         throw new Exception("Forbidden value on characterPower = " + characterPower + ", it doesn't respect the following condition : characterPower < 0");
 }
 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");
     teamId = reader.ReadSByte();
     if (teamId < 0)
         throw new Exception("Forbidden value on teamId = " + teamId + ", it doesn't respect the following condition : teamId < 0");
     option = reader.ReadSByte();
     if (option < 0)
         throw new Exception("Forbidden value on option = " + option + ", it doesn't respect the following condition : option < 0");
     state = reader.ReadBoolean();
 }
예제 #28
0
 // 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 virtual void Deserialize(BigEndianReader reader)
 {
     teamId = reader.ReadSByte();
     if (teamId < 0)
         throw new Exception("Forbidden value on teamId = " + teamId + ", it doesn't respect the following condition : teamId < 0");
     leaderId = reader.ReadInt();
     teamSide = reader.ReadSByte();
     teamTypeId = reader.ReadSByte();
     if (teamTypeId < 0)
         throw new Exception("Forbidden value on teamTypeId = " + teamTypeId + ", it doesn't respect the following condition : teamTypeId < 0");
     nbWaves = reader.ReadSByte();
     if (nbWaves < 0)
         throw new Exception("Forbidden value on nbWaves = " + nbWaves + ", it doesn't respect the following condition : nbWaves < 0");
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     byte _loc2_ = reader.ReadByte();
      this.sex = BooleanByteWrapper.GetFlag(_loc2_,0);
      this.alive = BooleanByteWrapper.GetFlag(_loc2_,1);
     id = reader.ReadInt();
     wave = reader.ReadSByte();
     if (wave < 0)
         throw new Exception("Forbidden value on wave = " + wave + ", it doesn't respect the following condition : wave < 0");
     level = reader.ReadVarShort();
     if (level < 0)
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0");
     breed = reader.ReadSByte();
 }