public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            int membersCount = reader.ReadUShort();
            int membersIndex;

            m_members = new System.Collections.Generic.List <PartyInvitationMemberInformations>();
            for (membersIndex = 0; (membersIndex < membersCount); membersIndex = (membersIndex + 1))
            {
                PartyInvitationMemberInformations objectToAdd = new PartyInvitationMemberInformations();
                objectToAdd.Deserialize(reader);
                m_members.Add(objectToAdd);
            }
            int guestsCount = reader.ReadUShort();
            int guestsIndex;

            m_guests = new System.Collections.Generic.List <PartyGuestInformations>();
            for (guestsIndex = 0; (guestsIndex < guestsCount); guestsIndex = (guestsIndex + 1))
            {
                PartyGuestInformations objectToAdd = new PartyGuestInformations();
                objectToAdd.Deserialize(reader);
                m_guests.Add(objectToAdd);
            }
            m_partyType = reader.ReadByte();
            m_partyName = reader.ReadUTF();
            m_fromId    = reader.ReadVarUhLong();
            m_fromName  = reader.ReadUTF();
            m_leaderId  = reader.ReadVarUhLong();
        }
        public virtual void Deserialize(ICustomDataInput reader)
        {
            guestId = reader.ReadVarUhLong();
            if (guestId < 0 || guestId > 9007199254740990)
            {
                throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0 || guestId > 9007199254740990");
            }
            hostId = reader.ReadVarUhLong();
            if (hostId < 0 || hostId > 9007199254740990)
            {
                throw new Exception("Forbidden value on hostId = " + hostId + ", it doesn't respect the following condition : hostId < 0 || hostId > 9007199254740990");
            }
            name      = reader.ReadUTF();
            guestLook = new Types.EntityLook();
            guestLook.Deserialize(reader);
            breed  = reader.ReadSByte();
            sex    = reader.ReadBoolean();
            status = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
            status.Deserialize(reader);
            var limit = reader.ReadUShort();

            companions = new Types.PartyCompanionBaseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                companions[i] = new Types.PartyCompanionBaseInformations();
                companions[i].Deserialize(reader);
            }
        }
예제 #3
0
        public override void Deserialize(ICustomDataInput reader)
        {
            this.experienceCharacter = reader.ReadVarUhLong();

            if (this.experienceCharacter < 0 || this.experienceCharacter > 9007199254740990)
            {
                throw new Exception("Forbidden value on experienceCharacter = " + this.experienceCharacter + ", it doesn't respect the following condition : experienceCharacter < 0 || experienceCharacter > 9007199254740990");
            }
            this.experienceMount = reader.ReadVarUhLong();

            if (this.experienceMount < 0 || this.experienceMount > 9007199254740990)
            {
                throw new Exception("Forbidden value on experienceMount = " + this.experienceMount + ", it doesn't respect the following condition : experienceMount < 0 || experienceMount > 9007199254740990");
            }
            this.experienceGuild = reader.ReadVarUhLong();

            if (this.experienceGuild < 0 || this.experienceGuild > 9007199254740990)
            {
                throw new Exception("Forbidden value on experienceGuild = " + this.experienceGuild + ", it doesn't respect the following condition : experienceGuild < 0 || experienceGuild > 9007199254740990");
            }
            this.experienceIncarnation = reader.ReadVarUhLong();

            if (this.experienceIncarnation < 0 || this.experienceIncarnation > 9007199254740990)
            {
                throw new Exception("Forbidden value on experienceIncarnation = "
                                    + this.experienceIncarnation
                                    + ", it doesn't respect the following condition : experienceIncarnation < 0 || experienceIncarnation > 9007199254740990");
            }
        }
 public override void Deserialize(ICustomDataInput reader)
 {
     m_fightId  = reader.ReadInt();
     m_sourceId = reader.ReadVarUhLong();
     m_targetId = reader.ReadVarUhLong();
     m_accept   = reader.ReadBoolean();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     enabled = BooleanByteWrapper.GetFlag(flag1, 0);
     abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
     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)");
     expLevelFloor = reader.ReadVarUhLong();
     if ((expLevelFloor < 0) || (expLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on expLevelFloor = " + expLevelFloor + ", it doesn't respect the following condition : (expLevelFloor < 0) || (expLevelFloor > 9.007199254740992E15)");
     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)");
     expNextLevelFloor = reader.ReadVarUhLong();
     if ((expNextLevelFloor < 0) || (expNextLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on expNextLevelFloor = " + expNextLevelFloor + ", it doesn't respect the following condition : (expNextLevelFloor < 0) || (expNextLevelFloor > 9.007199254740992E15)");
     creationDate = reader.ReadInt();
     if (creationDate < 0)
         throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0");
     nbTotalMembers = reader.ReadVarUhShort();
     if (nbTotalMembers < 0)
         throw new Exception("Forbidden value on nbTotalMembers = " + nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0");
     nbConnectedMembers = reader.ReadVarUhShort();
     if (nbConnectedMembers < 0)
         throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0");
 }
 public virtual void Deserialize(ICustomDataInput reader)
 {
     jobId = reader.ReadSByte();
     if (jobId < 0)
     {
         throw new Exception("Forbidden value on jobId = " + jobId + ", it doesn't respect the following condition : jobId < 0");
     }
     jobLevel = reader.ReadByte();
     if ((jobLevel < 0) || (jobLevel > 255))
     {
         throw new Exception("Forbidden value on jobLevel = " + jobLevel + ", it doesn't respect the following condition : (jobLevel < 0) || (jobLevel > 255)");
     }
     jobXP = reader.ReadVarUhLong();
     if ((jobXP < 0) || (jobXP > 9.007199254740992E15))
     {
         throw new Exception("Forbidden value on jobXP = " + jobXP + ", it doesn't respect the following condition : (jobXP < 0) || (jobXP > 9.007199254740992E15)");
     }
     jobXpLevelFloor = reader.ReadVarUhLong();
     if ((jobXpLevelFloor < 0) || (jobXpLevelFloor > 9.007199254740992E15))
     {
         throw new Exception("Forbidden value on jobXpLevelFloor = " + jobXpLevelFloor + ", it doesn't respect the following condition : (jobXpLevelFloor < 0) || (jobXpLevelFloor > 9.007199254740992E15)");
     }
     jobXpNextLevelFloor = reader.ReadVarUhLong();
     if ((jobXpNextLevelFloor < 0) || (jobXpNextLevelFloor > 9.007199254740992E15))
     {
         throw new Exception("Forbidden value on jobXpNextLevelFloor = " + jobXpNextLevelFloor + ", it doesn't respect the following condition : (jobXpNextLevelFloor < 0) || (jobXpNextLevelFloor > 9.007199254740992E15)");
     }
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     m_experienceCharacter   = reader.ReadVarUhLong();
     m_experienceMount       = reader.ReadVarUhLong();
     m_experienceGuild       = reader.ReadVarUhLong();
     m_experienceIncarnation = reader.ReadVarUhLong();
 }
예제 #8
0
 public override void Deserialize(ICustomDataInput 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");
     }
     partyName       = reader.ReadUTF();
     maxParticipants = reader.ReadSByte();
     if (maxParticipants < 0)
     {
         throw new Exception("Forbidden value on maxParticipants = " + maxParticipants + ", it doesn't respect the following condition : maxParticipants < 0");
     }
     fromId = reader.ReadVarUhLong();
     if (fromId < 0 || fromId > 9007199254740990)
     {
         throw new Exception("Forbidden value on fromId = " + fromId + ", it doesn't respect the following condition : fromId < 0 || fromId > 9007199254740990");
     }
     fromName = reader.ReadUTF();
     toId     = reader.ReadVarUhLong();
     if (toId < 0 || toId > 9007199254740990)
     {
         throw new Exception("Forbidden value on toId = " + toId + ", it doesn't respect the following condition : toId < 0 || toId > 9007199254740990");
     }
 }
예제 #9
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     m_kamas      = reader.ReadVarUhLong();
     m_experience = reader.ReadVarUhLong();
     m_pods       = reader.ReadVarUhInt();
     m_itemsValue = reader.ReadVarUhLong();
 }
예제 #10
0
 public override void Deserialize(ICustomDataInput reader)
 {
     m_jobId               = reader.ReadByte();
     m_jobLevel            = reader.ReadSByte();
     m_jobXP               = reader.ReadVarUhLong();
     m_jobXpLevelFloor     = reader.ReadVarUhLong();
     m_jobXpNextLevelFloor = reader.ReadVarUhLong();
 }
예제 #11
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     m_partyType       = reader.ReadByte();
     m_partyName       = reader.ReadUTF();
     m_maxParticipants = reader.ReadByte();
     m_fromId          = reader.ReadVarUhLong();
     m_fromName        = reader.ReadUTF();
     m_toId            = reader.ReadVarUhLong();
 }
예제 #12
0
 public override void Deserialize(ICustomDataInput reader)
 {
     m_abandonnedPaddock  = reader.ReadBoolean();
     m_level              = reader.ReadSByte();
     m_expLevelFloor      = reader.ReadVarUhLong();
     m_experience         = reader.ReadVarUhLong();
     m_expNextLevelFloor  = reader.ReadVarUhLong();
     m_creationDate       = reader.ReadInt();
     m_nbTotalMembers     = reader.ReadVarUhShort();
     m_nbConnectedMembers = reader.ReadVarUhShort();
 }
예제 #13
0
 public override void Deserialize(ICustomDataInput reader)
 {
     attackerId = reader.ReadVarUhLong();
     if (attackerId < 0 || attackerId > 9007199254740990)
     {
         throw new Exception("Forbidden value on attackerId = " + attackerId + ", it doesn't respect the following condition : attackerId < 0 || attackerId > 9007199254740990");
     }
     defenderId = reader.ReadVarUhLong();
     if (defenderId < 0 || defenderId > 9007199254740990)
     {
         throw new Exception("Forbidden value on defenderId = " + defenderId + ", it doesn't respect the following condition : defenderId < 0 || defenderId > 9007199254740990");
     }
 }
예제 #14
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     m_maxPods            = reader.ReadVarUhShort();
     m_prospecting        = reader.ReadVarUhShort();
     m_wisdom             = reader.ReadVarUhShort();
     m_taxCollectorsCount = reader.ReadByte();
     m_taxCollectorAttack = reader.ReadInt();
     m_kamas      = reader.ReadVarUhLong();
     m_experience = reader.ReadVarUhLong();
     m_pods       = reader.ReadVarUhInt();
     m_itemsValue = reader.ReadVarUhLong();
 }
        public override void Deserialize(ICustomDataInput reader)
        {
            int invalidBuddiesIdsCount = reader.ReadUShort();
            int invalidBuddiesIdsIndex;

            m_invalidBuddiesIds = new System.Collections.Generic.List <ulong>();
            for (invalidBuddiesIdsIndex = 0; (invalidBuddiesIdsIndex < invalidBuddiesIdsCount); invalidBuddiesIdsIndex = (invalidBuddiesIdsIndex + 1))
            {
                m_invalidBuddiesIds.Add(reader.ReadVarUhLong());
            }
            m_dungeonId = reader.ReadVarUhShort();
            m_inviterId = reader.ReadVarUhLong();
        }
예제 #16
0
 public override void Deserialize(ICustomDataInput reader)
 {
     initiatorId = reader.ReadVarUhLong();
     if (initiatorId < 0 || initiatorId > 9007199254740990)
     {
         throw new Exception("Forbidden value on initiatorId = " + initiatorId + ", it doesn't respect the following condition : initiatorId < 0 || initiatorId > 9007199254740990");
     }
     otherId = reader.ReadVarUhLong();
     if (otherId < 0 || otherId > 9007199254740990)
     {
         throw new Exception("Forbidden value on otherId = " + otherId + ", it doesn't respect the following condition : otherId < 0 || otherId > 9007199254740990");
     }
     role = reader.ReadSByte();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     source = reader.ReadVarUhLong();
     if (source < 0 || source > 9007199254740990)
     {
         throw new Exception("Forbidden value on source = " + source + ", it doesn't respect the following condition : source < 0 || source > 9007199254740990");
     }
     target = reader.ReadVarUhLong();
     if (target < 0 || target > 9007199254740990)
     {
         throw new Exception("Forbidden value on target = " + target + ", it doesn't respect the following condition : target < 0 || target > 9007199254740990");
     }
 }
예제 #18
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     cancelerId = reader.ReadVarUhLong();
     if (cancelerId < 0 || cancelerId > 9007199254740990)
     {
         throw new Exception("Forbidden value on cancelerId = " + cancelerId + ", it doesn't respect the following condition : cancelerId < 0 || cancelerId > 9007199254740990");
     }
     guestId = reader.ReadVarUhLong();
     if (guestId < 0 || guestId > 9007199254740990)
     {
         throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0 || guestId > 9007199254740990");
     }
 }
        public override void Deserialize(ICustomDataInput reader)
        {
            byte flag1 = reader.ReadByte();

            this.enabled           = BooleanByteWrapper.GetFlag(flag1, 0);
            this.abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1);
            this.level             = reader.ReadByte();

            if (this.level < 0 || this.level > 255)
            {
                throw new Exception("Forbidden value on level = " + this.level + ", it doesn't respect the following condition : level < 0 || level > 255");
            }
            this.expLevelFloor = reader.ReadVarUhLong();

            if (this.expLevelFloor < 0 || this.expLevelFloor > 9007199254740990)
            {
                throw new Exception("Forbidden value on expLevelFloor = " + this.expLevelFloor + ", it doesn't respect the following condition : expLevelFloor < 0 || expLevelFloor > 9007199254740990");
            }
            this.experience = reader.ReadVarUhLong();

            if (this.experience < 0 || this.experience > 9007199254740990)
            {
                throw new Exception("Forbidden value on experience = " + this.experience + ", it doesn't respect the following condition : experience < 0 || experience > 9007199254740990");
            }
            this.expNextLevelFloor = reader.ReadVarUhLong();

            if (this.expNextLevelFloor < 0 || this.expNextLevelFloor > 9007199254740990)
            {
                throw new Exception("Forbidden value on expNextLevelFloor = " + this.expNextLevelFloor + ", it doesn't respect the following condition : expNextLevelFloor < 0 || expNextLevelFloor > 9007199254740990");
            }
            this.creationDate = reader.ReadInt();

            if (this.creationDate < 0)
            {
                throw new Exception("Forbidden value on creationDate = " + this.creationDate + ", it doesn't respect the following condition : creationDate < 0");
            }
            this.nbTotalMembers = reader.ReadVarUhShort();

            if (this.nbTotalMembers < 0)
            {
                throw new Exception("Forbidden value on nbTotalMembers = " + this.nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0");
            }
            this.nbConnectedMembers = reader.ReadVarUhShort();

            if (this.nbConnectedMembers < 0)
            {
                throw new Exception("Forbidden value on nbConnectedMembers = " + this.nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0");
            }
        }
예제 #20
0
 public override void Deserialize(ICustomDataInput reader)
 {
     fightId  = reader.ReadInt();
     sourceId = reader.ReadVarUhLong();
     if (sourceId < 0 || sourceId > 9007199254740990)
     {
         throw new Exception("Forbidden value on sourceId = " + sourceId + ", it doesn't respect the following condition : sourceId < 0 || sourceId > 9007199254740990");
     }
     targetId = reader.ReadVarUhLong();
     if (targetId < 0 || targetId > 9007199254740990)
     {
         throw new Exception("Forbidden value on targetId = " + targetId + ", it doesn't respect the following condition : targetId < 0 || targetId > 9007199254740990");
     }
     accept = reader.ReadBoolean();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     experienceCharacter = reader.ReadVarUhLong();
     if ((experienceCharacter < 0) || (experienceCharacter > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceCharacter = " + experienceCharacter + ", it doesn't respect the following condition : (experienceCharacter < 0) || (experienceCharacter > 9.007199254740992E15)");
     experienceMount = reader.ReadVarUhLong();
     if ((experienceMount < 0) || (experienceMount > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceMount = " + experienceMount + ", it doesn't respect the following condition : (experienceMount < 0) || (experienceMount > 9.007199254740992E15)");
     experienceGuild = reader.ReadVarUhLong();
     if ((experienceGuild < 0) || (experienceGuild > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceGuild = " + experienceGuild + ", it doesn't respect the following condition : (experienceGuild < 0) || (experienceGuild > 9.007199254740992E15)");
     experienceIncarnation = reader.ReadVarUhLong();
     if ((experienceIncarnation < 0) || (experienceIncarnation > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceIncarnation = " + experienceIncarnation + ", it doesn't respect the following condition : (experienceIncarnation < 0) || (experienceIncarnation > 9.007199254740992E15)");
 }
예제 #22
0
 public virtual void Deserialize(ICustomDataInput reader)
 {
     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");
     }
     playerName    = reader.ReadUTF();
     alignmentSide = reader.ReadSByte();
     breed         = reader.ReadSByte();
     if (breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage)
     {
         throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage");
     }
     sex          = reader.ReadBoolean();
     isInWorkshop = 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");
     }
     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");
     }
     status = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
예제 #23
0
 public override void Deserialize(ICustomDataInput reader)
 {
     m_casterId     = reader.ReadVarUhLong();
     m_targetCellId = reader.ReadVarUhShort();
     m_spellId      = reader.ReadVarUhShort();
     m_spellLevel   = reader.ReadShort();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     byte flag1 = reader.ReadByte();
     showExperience = BooleanByteWrapper.GetFlag(flag1, 0);
     showExperienceLevelFloor = BooleanByteWrapper.GetFlag(flag1, 1);
     showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(flag1, 2);
     showExperienceFightDelta = BooleanByteWrapper.GetFlag(flag1, 3);
     showExperienceForGuild = BooleanByteWrapper.GetFlag(flag1, 4);
     showExperienceForMount = BooleanByteWrapper.GetFlag(flag1, 5);
     isIncarnationExperience = BooleanByteWrapper.GetFlag(flag1, 6);
     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)");
     experienceLevelFloor = reader.ReadVarUhLong();
     if ((experienceLevelFloor < 0) || (experienceLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : (experienceLevelFloor < 0) || (experienceLevelFloor > 9.007199254740992E15)");
     experienceNextLevelFloor = reader.ReadDouble();
     if ((experienceNextLevelFloor < 0) || (experienceNextLevelFloor > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : (experienceNextLevelFloor < 0) || (experienceNextLevelFloor > 9.007199254740992E15)");
     experienceFightDelta = reader.ReadVarInt();
     experienceForGuild = reader.ReadVarUhInt();
     if (experienceForGuild < 0)
         throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0");
     experienceForMount = reader.ReadVarUhInt();
     if (experienceForMount < 0)
         throw new Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0");
     rerollExperienceMul = reader.ReadSByte();
     if (rerollExperienceMul < 0)
         throw new Exception("Forbidden value on rerollExperienceMul = " + rerollExperienceMul + ", it doesn't respect the following condition : rerollExperienceMul < 0");
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     maxPods = reader.ReadVarUhShort();
     if (maxPods < 0)
         throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
     prospecting = reader.ReadVarUhShort();
     if (prospecting < 0)
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     wisdom = reader.ReadVarUhShort();
     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.ReadVarUhInt();
     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.ReadVarUhInt();
     if (pods < 0)
         throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
     itemsValue = reader.ReadVarUhInt();
     if (itemsValue < 0)
         throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
 }
예제 #26
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     id = reader.ReadVarUhLong();
     if (id < 0 || id > 9007199254740990)
     {
         throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < 0 || id > 9007199254740990");
     }
     lifePoints = reader.ReadVarUhInt();
     if (lifePoints < 0)
     {
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     }
     maxLifePoints = reader.ReadVarUhInt();
     if (maxLifePoints < 0)
     {
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     }
     prospecting = reader.ReadVarUhShort();
     if (prospecting < 0)
     {
         throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0");
     }
     regenRate = reader.ReadByte();
     if (regenRate < 0 || regenRate > 255)
     {
         throw new Exception("Forbidden value on regenRate = " + regenRate + ", it doesn't respect the following condition : regenRate < 0 || regenRate > 255");
     }
 }
예제 #27
0
 public override void Deserialize(ICustomDataInput reader)
 {
     m_areaId           = reader.ReadInt();
     m_atLeastNbMount   = reader.ReadByte();
     m_atLeastNbMachine = reader.ReadByte();
     m_maxPrice         = reader.ReadVarUhLong();
 }
예제 #28
0
        public override void Deserialize(ICustomDataInput reader)
        {
            byte flag = reader.ReadByte();

            m_self    = BooleanByteWrapper.GetFlag(flag, 0);
            m_verbose = BooleanByteWrapper.GetFlag(flag, 1);
            int socialGroupsCount = reader.ReadUShort();
            int socialGroupsIndex;

            m_socialGroups = new System.Collections.Generic.List <AbstractSocialGroupInfos>();
            for (socialGroupsIndex = 0; (socialGroupsIndex < socialGroupsCount); socialGroupsIndex = (socialGroupsIndex + 1))
            {
                AbstractSocialGroupInfos objectToAdd = ProtocolTypeManager.GetInstance <AbstractSocialGroupInfos>((short)reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_socialGroups.Add(objectToAdd);
            }
            m_position        = reader.ReadByte();
            m_accountNickname = reader.ReadUTF();
            m_accountId       = reader.ReadInt();
            m_playerName      = reader.ReadUTF();
            m_playerId        = reader.ReadVarUhLong();
            m_areaId          = reader.ReadShort();
            m_serverId        = reader.ReadShort();
            m_originServerId  = reader.ReadShort();
            m_playerState     = reader.ReadByte();
        }
예제 #29
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     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");
     }
     playerName = reader.ReadUTF();
     level      = reader.ReadByte();
     if (level < 0 || level > 200)
     {
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0 || level > 200");
     }
     alignmentSide = reader.ReadSByte();
     breed         = reader.ReadSByte();
     if (breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage)
     {
         throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : breed < (byte)Enums.PlayableBreedEnum.Feca || breed > (byte)Enums.PlayableBreedEnum.Huppermage");
     }
     sex       = reader.ReadBoolean();
     guildInfo = new Types.BasicGuildInformations();
     guildInfo.Deserialize(reader);
     moodSmileyId = reader.ReadVarUhShort();
     if (moodSmileyId < 0)
     {
         throw new Exception("Forbidden value on moodSmileyId = " + moodSmileyId + ", it doesn't respect the following condition : moodSmileyId < 0");
     }
     status = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
예제 #30
0
파일: DareReward.cs 프로젝트: xvolks/Cookie
 public override void Deserialize(ICustomDataInput reader)
 {
     m_type      = reader.ReadByte();
     m_monsterId = reader.ReadVarUhShort();
     m_kamas     = reader.ReadVarUhLong();
     m_dareId    = reader.ReadDouble();
 }
예제 #31
0
        public override void Deserialize(ICustomDataInput reader)
        {
            this.casterId = reader.ReadVarUhLong();

            if (this.casterId < 0 || this.casterId > 9007199254740990)
            {
                throw new Exception("Forbidden value on casterId = " + this.casterId + ", it doesn't respect the following condition : casterId < 0 || casterId > 9007199254740990");
            }
            this.targetCellId = reader.ReadVarUhShort();

            if (this.targetCellId < 0 || this.targetCellId > 559)
            {
                throw new Exception("Forbidden value on targetCellId = " + this.targetCellId + ", it doesn't respect the following condition : targetCellId < 0 || targetCellId > 559");
            }
            this.spellId = reader.ReadVarUhShort();

            if (this.spellId < 0)
            {
                throw new Exception("Forbidden value on spellId = " + this.spellId + ", it doesn't respect the following condition : spellId < 0");
            }
            this.spellLevel = reader.ReadSByte();

            if (this.spellLevel < 1 || this.spellLevel > 6)
            {
                throw new Exception("Forbidden value on spellLevel = " + this.spellLevel + ", it doesn't respect the following condition : spellLevel < 1 || spellLevel > 6");
            }
        }
예제 #32
0
        public override void Deserialize(ICustomDataInput reader)
        {
            this.infos = ProtocolTypeManager.GetInstance <AllianceFactSheetInformations>(reader.ReadShort());
            this.infos.Deserialize(reader);
            var limit = reader.ReadUShort();

            this.guilds = new GuildInAllianceInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                this.guilds[i] = new GuildInAllianceInformations();
                this.guilds[i].Deserialize(reader);
            }

            limit = reader.ReadUShort();
            this.controlledSubareaIds = new ushort[limit];
            for (int i = 0; i < limit; i++)
            {
                this.controlledSubareaIds[i] = reader.ReadVarUhShort();
            }

            this.leaderCharacterId = reader.ReadVarUhLong();

            if (this.leaderCharacterId < 0 || this.leaderCharacterId > 9007199254740990)
            {
                throw new Exception("Forbidden value on leaderCharacterId = " + this.leaderCharacterId + ", it doesn't respect the following condition : leaderCharacterId < 0 || leaderCharacterId > 9007199254740990");
            }
            this.leaderCharacterName = reader.ReadUTF();
        }
예제 #33
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            this.lastTimeSlotModificationDate = reader.ReadInt();

            if (this.lastTimeSlotModificationDate < 0)
            {
                throw new Exception("Forbidden value on lastTimeSlotModificationDate = " + this.lastTimeSlotModificationDate + ", it doesn't respect the following condition : lastTimeSlotModificationDate < 0");
            }
            this.lastTimeSlotModificationAuthorGuildId = reader.ReadVarUhInt();

            if (this.lastTimeSlotModificationAuthorGuildId < 0)
            {
                throw new Exception("Forbidden value on lastTimeSlotModificationAuthorGuildId = "
                                    + this.lastTimeSlotModificationAuthorGuildId
                                    + ", it doesn't respect the following condition : lastTimeSlotModificationAuthorGuildId < 0");
            }
            this.lastTimeSlotModificationAuthorId = reader.ReadVarUhLong();

            if (this.lastTimeSlotModificationAuthorId < 0 || this.lastTimeSlotModificationAuthorId > 9007199254740990)
            {
                throw new Exception("Forbidden value on lastTimeSlotModificationAuthorId = "
                                    + this.lastTimeSlotModificationAuthorId
                                    + ", it doesn't respect the following condition : lastTimeSlotModificationAuthorId < 0 || lastTimeSlotModificationAuthorId > 9007199254740990");
            }
            this.lastTimeSlotModificationAuthorName = reader.ReadUTF();
            var limit = reader.ReadUShort();

            this.modulesObjects = new ObjectItem[limit];
            for (int i = 0; i < limit; i++)
            {
                this.modulesObjects[i] = new ObjectItem();
                this.modulesObjects[i].Deserialize(reader);
            }
        }
예제 #34
0
 public override void Deserialize(ICustomDataInput reader)
 {
     m_status = ProtocolTypeManager.GetInstance <PlayerStatus>((short)reader.ReadUShort());
     m_status.Deserialize(reader);
     m_accountId = reader.ReadInt();
     m_playerId  = reader.ReadVarUhLong();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     kamas = reader.ReadVarUhInt();
     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.ReadVarUhInt();
     if (pods < 0)
         throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0");
     itemsValue = reader.ReadVarUhInt();
     if (itemsValue < 0)
         throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0");
 }
예제 #36
0
 public virtual void Deserialize(ICustomDataInput reader)
 {
     byte flag1 = reader.ReadByte();
     sex = BooleanByteWrapper.GetFlag(flag1, 0);
     isRideable = BooleanByteWrapper.GetFlag(flag1, 1);
     isWild = BooleanByteWrapper.GetFlag(flag1, 2);
     isFecondationReady = BooleanByteWrapper.GetFlag(flag1, 3);
     id = reader.ReadDouble();
     if ((id < -9.007199254740992E15) || (id > 9.007199254740992E15))
         throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : (id < -9.007199254740992E15) || (id > 9.007199254740992E15)");
     model = reader.ReadVarUhInt();
     if (model < 0)
         throw new Exception("Forbidden value on model = " + model + ", it doesn't respect the following condition : model < 0");
     var limit = reader.ReadUShort();
     ancestor = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          (ancestor as int[])[i] = reader.ReadInt();
     }
     limit = reader.ReadUShort();
     behaviors = new int[limit];
     for (int i = 0; i < limit; i++)
     {
          (behaviors as int[])[i] = reader.ReadInt();
     }
     name = reader.ReadUTF();
     ownerId = reader.ReadInt();
     if (ownerId < 0)
         throw new Exception("Forbidden value on ownerId = " + ownerId + ", it doesn't respect the following condition : ownerId < 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)");
     experienceForLevel = reader.ReadVarUhLong();
     if ((experienceForLevel < 0) || (experienceForLevel > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceForLevel = " + experienceForLevel + ", it doesn't respect the following condition : (experienceForLevel < 0) || (experienceForLevel > 9.007199254740992E15)");
     experienceForNextLevel = reader.ReadDouble();
     if ((experienceForNextLevel < -9.007199254740992E15) || (experienceForNextLevel > 9.007199254740992E15))
         throw new Exception("Forbidden value on experienceForNextLevel = " + experienceForNextLevel + ", it doesn't respect the following condition : (experienceForNextLevel < -9.007199254740992E15) || (experienceForNextLevel > 9.007199254740992E15)");
     level = reader.ReadSByte();
     if (level < 0)
         throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0");
     maxPods = reader.ReadVarUhInt();
     if (maxPods < 0)
         throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0");
     stamina = reader.ReadVarUhInt();
     if (stamina < 0)
         throw new Exception("Forbidden value on stamina = " + stamina + ", it doesn't respect the following condition : stamina < 0");
     staminaMax = reader.ReadVarUhInt();
     if (staminaMax < 0)
         throw new Exception("Forbidden value on staminaMax = " + staminaMax + ", it doesn't respect the following condition : staminaMax < 0");
     maturity = reader.ReadVarUhInt();
     if (maturity < 0)
         throw new Exception("Forbidden value on maturity = " + maturity + ", it doesn't respect the following condition : maturity < 0");
     maturityForAdult = reader.ReadVarUhInt();
     if (maturityForAdult < 0)
         throw new Exception("Forbidden value on maturityForAdult = " + maturityForAdult + ", it doesn't respect the following condition : maturityForAdult < 0");
     energy = reader.ReadVarUhInt();
     if (energy < 0)
         throw new Exception("Forbidden value on energy = " + energy + ", it doesn't respect the following condition : energy < 0");
     energyMax = reader.ReadVarUhInt();
     if (energyMax < 0)
         throw new Exception("Forbidden value on energyMax = " + energyMax + ", it doesn't respect the following condition : energyMax < 0");
     serenity = reader.ReadInt();
     aggressivityMax = reader.ReadInt();
     serenityMax = reader.ReadVarUhInt();
     if (serenityMax < 0)
         throw new Exception("Forbidden value on serenityMax = " + serenityMax + ", it doesn't respect the following condition : serenityMax < 0");
     love = reader.ReadVarUhInt();
     if (love < 0)
         throw new Exception("Forbidden value on love = " + love + ", it doesn't respect the following condition : love < 0");
     loveMax = reader.ReadVarUhInt();
     if (loveMax < 0)
         throw new Exception("Forbidden value on loveMax = " + loveMax + ", it doesn't respect the following condition : loveMax < 0");
     fecondationTime = reader.ReadInt();
     boostLimiter = reader.ReadInt();
     if (boostLimiter < 0)
         throw new Exception("Forbidden value on boostLimiter = " + boostLimiter + ", it doesn't respect the following condition : boostLimiter < 0");
     boostMax = reader.ReadDouble();
     if ((boostMax < -9.007199254740992E15) || (boostMax > 9.007199254740992E15))
         throw new Exception("Forbidden value on boostMax = " + boostMax + ", it doesn't respect the following condition : (boostMax < -9.007199254740992E15) || (boostMax > 9.007199254740992E15)");
     reproductionCount = reader.ReadInt();
     reproductionCountMax = reader.ReadVarUhInt();
     if (reproductionCountMax < 0)
         throw new Exception("Forbidden value on reproductionCountMax = " + reproductionCountMax + ", it doesn't respect the following condition : reproductionCountMax < 0");
     limit = reader.ReadUShort();
     effectList = new Types.ObjectEffectInteger[limit];
     for (int i = 0; i < limit; i++)
     {
          (effectList as Types.ObjectEffectInteger[])[i] = new Types.ObjectEffectInteger();
          (effectList as Types.ObjectEffectInteger[])[i].Deserialize(reader);
     }
 }