public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     maxPods = reader.ReadVarShort();
     if (maxPods < 0)
         throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
     prospecting = reader.ReadVarShort();
     if (prospecting < 0)
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     wisdom = reader.ReadVarShort();
     if (wisdom < 0)
         throw new Exception("Forbidden value on wisdom = " + wisdom + ", it doesn't respect the following condition : wisdom < 0");
     taxCollectorsCount = reader.ReadSByte();
     if (taxCollectorsCount < 0)
         throw new Exception("Forbidden value on taxCollectorsCount = " + taxCollectorsCount + ", it doesn't respect the following condition : taxCollectorsCount < 0");
     taxCollectorAttack = reader.ReadInt();
     kamas = reader.ReadVarInt();
     if (kamas < 0)
         throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0");
     experience = reader.ReadVarUhLong();
     if (experience < 0 || experience > 9.007199254740992E15)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15");
     pods = reader.ReadVarInt();
     if (pods < 0)
         throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
     itemsValue = reader.ReadVarInt();
     if (itemsValue < 0)
         throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
 }
コード例 #2
0
ファイル: EntityLook.cs プロジェクト: DjTrilogic/BlueSheep
 public virtual void Deserialize(BigEndianReader reader)
 {
     bonesId = reader.ReadVarShort();
     if (bonesId < 0)
         throw new Exception("Forbidden value on bonesId = " + bonesId + ", it doesn't respect the following condition : bonesId < 0");
     var limit = reader.ReadUShort();
     skins = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          skins[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     indexedColors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          indexedColors[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     scales = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          scales[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     subentities = new Types.SubEntity[limit];
     for (int i = 0; i < limit; i++)
     {
          subentities[i] = new Types.SubEntity();
          subentities[i].Deserialize(reader);
     }
 }
コード例 #3
0
 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();
     }
 }
コード例 #4
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);
     }
 }
コード例 #5
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     @base = reader.ReadVarShort();
     additionnal = reader.ReadVarShort();
     objectsAndMountBonus = reader.ReadVarShort();
     alignGiftBonus = reader.ReadVarShort();
     contextModif = reader.ReadVarShort();
 }
コード例 #6
0
 public override void Deserialize(BigEndianReader reader)
 {
     unread = reader.ReadVarShort();
     if (unread < 0)
         throw new Exception("Forbidden value on unread = " + unread + ", it doesn't respect the following condition : unread < 0");
     total = reader.ReadVarShort();
     if (total < 0)
         throw new Exception("Forbidden value on total = " + total + ", it doesn't respect the following condition : total < 0");
 }
コード例 #7
0
 public override void Deserialize(BigEndianReader reader)
 {
     oldCellId = reader.ReadVarShort();
     if (oldCellId < 0 || oldCellId > 559)
         throw new Exception("Forbidden value on oldCellId = " + oldCellId + ", it doesn't respect the following condition : oldCellId < 0 || oldCellId > 559");
     newCellId = reader.ReadVarShort();
     if (newCellId < 0 || newCellId > 559)
         throw new Exception("Forbidden value on newCellId = " + newCellId + ", it doesn't respect the following condition : newCellId < 0 || newCellId > 559");
 }
コード例 #8
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");
     objectGID = reader.ReadVarShort();
     if (objectGID < 0)
         throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     targetId = reader.ReadInt();
     spellId = reader.ReadVarShort();
     if (spellId < 0)
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
     value = reader.ReadVarShort();
 }
コード例 #10
0
 public override void Deserialize(BigEndianReader reader)
 {
     questId = reader.ReadVarShort();
     if (questId < 0)
         throw new Exception("Forbidden value on questId = " + questId + ", it doesn't respect the following condition : questId < 0");
     stepId = reader.ReadVarShort();
     if (stepId < 0)
         throw new Exception("Forbidden value on stepId = " + stepId + ", it doesn't respect the following condition : stepId < 0");
 }
コード例 #11
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     curCompletion = reader.ReadVarShort();
     if (curCompletion < 0)
         throw new Exception("Forbidden value on curCompletion = " + curCompletion + ", it doesn't respect the following condition : curCompletion < 0");
     maxCompletion = reader.ReadVarShort();
     if (maxCompletion < 0)
         throw new Exception("Forbidden value on maxCompletion = " + maxCompletion + ", it doesn't respect the following condition : maxCompletion < 0");
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     firstNameId = reader.ReadVarShort();
     if (firstNameId < 0)
         throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
     lastNameId = reader.ReadVarShort();
     if (lastNameId < 0)
         throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
 }
コード例 #13
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     uid = reader.ReadUTF();
     figure = reader.ReadVarShort();
     if (figure < 0)
         throw new Exception("Forbidden value on figure = " + figure + ", it doesn't respect the following condition : figure < 0");
     pedestal = reader.ReadVarShort();
     if (pedestal < 0)
         throw new Exception("Forbidden value on pedestal = " + pedestal + ", it doesn't respect the following condition : pedestal < 0");
     bound = reader.ReadBoolean();
 }
コード例 #14
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     targetId = reader.ReadInt();
     loss = reader.ReadVarShort();
     if (loss < 0)
         throw new Exception("Forbidden value on loss = " + loss + ", it doesn't respect the following condition : loss < 0");
     permanentDamages = reader.ReadVarShort();
     if (permanentDamages < 0)
         throw new Exception("Forbidden value on permanentDamages = " + permanentDamages + ", it doesn't respect the following condition : permanentDamages < 0");
 }
コード例 #15
0
 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");
     fightId = reader.ReadVarShort();
     if (fightId < 0)
         throw new Exception("Forbidden value on fightId = " + fightId + ", it doesn't respect the following condition : fightId < 0");
     defender = Types.ProtocolTypeManager.GetInstance<Types.CharacterMinimalPlusLookInformations>(reader.ReadShort());
     defender.Deserialize(reader);
 }
コード例 #16
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     firstNameId = reader.ReadVarShort();
     if (firstNameId < 0)
         throw new Exception("Forbidden value on firstNameId = " + firstNameId + ", it doesn't respect the following condition : firstNameId < 0");
     lastNameId = reader.ReadVarShort();
     if (lastNameId < 0)
         throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0");
     guildIdentity = new Types.GuildInformations();
     guildIdentity.Deserialize(reader);
 }
コード例 #17
0
 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     spellsId = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          spellsId[i] = reader.ReadVarShort();
     }
     boostPoint = reader.ReadVarShort();
     if (boostPoint < 0)
         throw new Exception("Forbidden value on boostPoint = " + boostPoint + ", it doesn't respect the following condition : boostPoint < 0");
 }
コード例 #18
0
 public override void Deserialize(BigEndianReader reader)
 {
     latency = reader.ReadUShort();
     if (latency < 0 || latency > 65535)
         throw new Exception("Forbidden value on latency = " + latency + ", it doesn't respect the following condition : latency < 0 || latency > 65535");
     sampleCount = reader.ReadVarShort();
     if (sampleCount < 0)
         throw new Exception("Forbidden value on sampleCount = " + sampleCount + ", it doesn't respect the following condition : sampleCount < 0");
     max = reader.ReadVarShort();
     if (max < 0)
         throw new Exception("Forbidden value on max = " + max + ", it doesn't respect the following condition : max < 0");
 }
コード例 #19
0
 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");
     fightId = reader.ReadVarShort();
     if (fightId < 0)
         throw new Exception("Forbidden value on fightId = " + fightId + ", it doesn't respect the following condition : fightId < 0");
     fighterToRemoveId = reader.ReadVarInt();
     if (fighterToRemoveId < 0)
         throw new Exception("Forbidden value on fighterToRemoveId = " + fighterToRemoveId + ", it doesn't respect the following condition : fighterToRemoveId < 0");
 }
コード例 #20
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     diceNum = reader.ReadVarShort();
     if (diceNum < 0)
         throw new Exception("Forbidden value on diceNum = " + diceNum + ", it doesn't respect the following condition : diceNum < 0");
     diceSide = reader.ReadVarShort();
     if (diceSide < 0)
         throw new Exception("Forbidden value on diceSide = " + diceSide + ", it doesn't respect the following condition : diceSide < 0");
     diceConst = reader.ReadVarShort();
     if (diceConst < 0)
         throw new Exception("Forbidden value on diceConst = " + diceConst + ", it doesn't respect the following condition : diceConst < 0");
 }
コード例 #21
0
 public override void Deserialize(BigEndianReader reader)
 {
     casterId = reader.ReadInt();
     targetCellId = reader.ReadVarShort();
     if (targetCellId < 0 || targetCellId > 559)
         throw new Exception("Forbidden value on targetCellId = " + targetCellId + ", it doesn't respect the following condition : targetCellId < 0 || targetCellId > 559");
     spellId = reader.ReadVarShort();
     if (spellId < 0)
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
     spellLevel = reader.ReadSByte();
     if (spellLevel < 1 || spellLevel > 6)
         throw new Exception("Forbidden value on spellLevel = " + spellLevel + ", it doesn't respect the following condition : spellLevel < 1 || spellLevel > 6");
 }
コード例 #22
0
 public override void Deserialize(BigEndianReader reader)
 {
     msgId = reader.ReadVarShort();
     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.ReadVarShort();
     if (objectGenericId < 0)
         throw new Exception("Forbidden value on objectGenericId = " + objectGenericId + ", it doesn't respect the following condition : objectGenericId < 0");
 }
コード例 #23
0
 public override void Deserialize(BigEndianReader reader)
 {
     entityId = reader.ReadVarInt();
     if (entityId < 0)
         throw new Exception("Forbidden value on entityId = " + entityId + ", it doesn't respect the following condition : entityId < 0");
     elemId = reader.ReadVarInt();
     if (elemId < 0)
         throw new Exception("Forbidden value on elemId = " + elemId + ", it doesn't respect the following condition : elemId < 0");
     skillId = reader.ReadVarShort();
     if (skillId < 0)
         throw new Exception("Forbidden value on skillId = " + skillId + ", it doesn't respect the following condition : skillId < 0");
     duration = reader.ReadVarShort();
     if (duration < 0)
         throw new Exception("Forbidden value on duration = " + duration + ", it doesn't respect the following condition : duration < 0");
 }
コード例 #24
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     allianceId = reader.ReadVarInt();
     if (allianceId < 0)
         throw new Exception("Forbidden value on allianceId = " + allianceId + ", it doesn't respect the following condition : allianceId < 0");
     nbGuilds = reader.ReadVarShort();
     if (nbGuilds < 0)
         throw new Exception("Forbidden value on nbGuilds = " + nbGuilds + ", it doesn't respect the following condition : nbGuilds < 0");
     nbMembers = reader.ReadVarShort();
     if (nbMembers < 0)
         throw new Exception("Forbidden value on nbMembers = " + nbMembers + ", it doesn't respect the following condition : nbMembers < 0");
     nbSubarea = reader.ReadVarShort();
     if (nbSubarea < 0)
         throw new Exception("Forbidden value on nbSubarea = " + nbSubarea + ", it doesn't respect the following condition : nbSubarea < 0");
 }
コード例 #25
0
 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     availables = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          availables[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     unavailables = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          unavailables[i] = reader.ReadVarShort();
     }
 }
コード例 #26
0
 public override void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     cells = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          cells[i] = reader.ReadVarShort();
     }
     limit = reader.ReadUShort();
     referenceIds = new short[limit];
     for (int i = 0; i < limit; i++)
     {
          referenceIds[i] = reader.ReadVarShort();
     }
 }
コード例 #27
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     value = reader.ReadVarShort();
     if (value < 0)
         throw new Exception("Forbidden value on value = " + value + ", it doesn't respect the following condition : value < 0");
 }
コード例 #28
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();
 }
コード例 #29
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     cells = reader.ReadVarShort();
     if (cells < 0 || cells > 559)
         throw new Exception("Forbidden value on cells = " + cells + ", it doesn't respect the following condition : cells < 0 || cells > 559");
 }
コード例 #30
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     var limit = reader.ReadUShort();
     quantities = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          quantities[i] = reader.ReadVarInt();
     }
     limit = reader.ReadUShort();
     types = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          types[i] = reader.ReadVarInt();
     }
     taxPercentage = reader.ReadFloat();
     taxModificationPercentage = reader.ReadFloat();
     maxItemLevel = reader.ReadByte();
     if (maxItemLevel < 0 || maxItemLevel > 255)
         throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0 || maxItemLevel > 255");
     maxItemPerAccount = reader.ReadVarInt();
     if (maxItemPerAccount < 0)
         throw new Exception("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0");
     npcContextualId = reader.ReadInt();
     unsoldDelay = reader.ReadVarShort();
     if (unsoldDelay < 0)
         throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
 }