Example #1
0
        public override void Deserialize(ICustomDataInput reader)
        {
            byte flag1 = reader.ReadByte();

            this.success   = BooleanByteWrapper.GetFlag(flag1, 0);
            this.subscribe = BooleanByteWrapper.GetFlag(flag1, 1);
            this.dareId    = reader.ReadDouble();

            if (this.dareId < 0 || this.dareId > 9007199254740990)
            {
                throw new Exception("Forbidden value on dareId = " + this.dareId + ", it doesn't respect the following condition : dareId < 0 || dareId > 9007199254740990");
            }
            this.dareVersatilesInfos = new DareVersatileInformations();
            this.dareVersatilesInfos.Deserialize(reader);
        }
Example #2
0
        public override void Serialize(IDataWriter writer)
        {
            var flag = new byte();

            flag = BooleanByteWrapper.SetFlag(0, flag, IsMonoAccount);
            flag = BooleanByteWrapper.SetFlag(1, flag, IsSelectable);
            writer.WriteByte(flag);
            writer.WriteVarUhShort(Id);
            writer.WriteSByte(Type);
            writer.WriteSByte(Status);
            writer.WriteSByte(Completion);
            writer.WriteSByte(CharactersCount);
            writer.WriteSByte(CharactersSlots);
            writer.WriteDouble(Date);
        }
        public void Serialize(IDataWriter writer)
        {
            UInt32 wrappedBoolean = 0;

            writer.WriteInt((Int32)AccountId);
            wrappedBoolean = 0;
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 0, TutorialAvailable);
            writer.WriteByte((Byte)wrappedBoolean);
            writer.WriteVarInt((Int32)BreedsVisible);
            writer.WriteVarInt((Int32)BreedsAvailable);
            writer.WriteByte((Byte)Status);
            wrappedBoolean = 0;
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 0, CanCreateNewCharacter);
            writer.WriteByte((Byte)wrappedBoolean);
        }
Example #4
0
        public override void Serialize(ICustomDataOutput writer)
        {
            byte box0 = 0;

            box0 = BooleanByteWrapper.SetFlag(box0, 1, IsMonoAccount);
            box0 = BooleanByteWrapper.SetFlag(box0, 2, IsSelectable);
            writer.WriteByte(box0);
            writer.WriteVarShort(Id_);
            writer.WriteByte(Type);
            writer.WriteByte(Status);
            writer.WriteByte(Completion);
            writer.WriteByte(CharactersCount);
            writer.WriteByte(CharactersSlots);
            writer.WriteDouble(Date);
        }
        public virtual void Serialize(IDataWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, isMonoAccount);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, isSelectable);
            writer.WriteByte(flag1);
            writer.WriteVarShort((int)id);
            writer.WriteSbyte(type);
            writer.WriteSbyte(status);
            writer.WriteSbyte(completion);
            writer.WriteSbyte(charactersCount);
            writer.WriteSbyte(charactersSlots);
            writer.WriteDouble(date);
        }
        public override void Serialize(IDataWriter writer)
        {
            byte num = BooleanByteWrapper.SetFlag(0, 0, this.hasRights);

            writer.WriteByte(BooleanByteWrapper.SetFlag(num, 1, this.wasAlreadyConnected));
            writer.WriteUTF(this.login);
            writer.WriteUTF(this.nickname);
            writer.WriteInt(this.accountId);
            writer.WriteSByte(this.communityId);
            writer.WriteUTF(this.secretQuestion);
            writer.WriteDouble(this.accountCreation);
            writer.WriteDouble(this.subscriptionElapsedDuration);
            writer.WriteDouble(this.subscriptionEndDate);
            writer.WriteByte(this.havenbagAvailableRoom);
        }
Example #7
0
        public virtual void Serialize(IDataWriter writer)
        {
            byte num = BooleanByteWrapper.SetFlag(0, 0, this.isOnSale);

            writer.WriteByte(BooleanByteWrapper.SetFlag(num, 1, this.isSaleLocked));
            writer.WriteVarInt((int)this.houseId);
            writer.WriteShort((short)((int)this.doorsOnMap.Length));
            int[] numArray = this.doorsOnMap;
            for (int i = 0; i < (int)numArray.Length; i++)
            {
                writer.WriteInt(numArray[i]);
            }
            writer.WriteUTF(this.ownerName);
            writer.WriteVarShort((int)this.modelId);
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte num = reader.ReadByte();

            this.keyRingBonus      = BooleanByteWrapper.GetFlag(num, 0);
            this.hasHardcoreDrop   = BooleanByteWrapper.GetFlag(num, 1);
            this.hasAVARewardToken = BooleanByteWrapper.GetFlag(num, 2);
            this.staticInfos       = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>(reader.ReadUShort());
            this.staticInfos.Deserialize(reader);
            this.creationTime  = reader.ReadDouble();
            this.ageBonusRate  = reader.ReadInt();
            this.lootShare     = reader.ReadSByte();
            this.alignmentSide = reader.ReadSByte();
        }
        public override void Serialize(ICustomDataOutput writer)
        {
            base.Serialize(writer);
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, keyRingBonus);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, hasHardcoreDrop);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 2, hasAVARewardToken);
            writer.WriteByte(flag1);
            writer.WriteShort(staticInfos.TypeId);
            staticInfos.Serialize(writer);
            writer.WriteShort(ageBonus);
            writer.WriteSByte(lootShare);
            writer.WriteSByte(alignmentSide);
        }
        public override void Serialize(ICustomDataWriter writer)
        {
            byte box = 0;

            box = BooleanByteWrapper.SetFlag(box, 0, IsMonoAccount);
            box = BooleanByteWrapper.SetFlag(box, 1, IsSelectable);
            writer.WriteByte(box);
            writer.WriteVarShort(this.Id_);
            writer.WriteByte(this.Type);
            writer.WriteByte(this.Status);
            writer.WriteByte(this.Completion);
            writer.WriteByte(this.CharactersCount);
            writer.WriteByte(this.CharactersSlots);
            writer.WriteDouble(this.Date);
        }
Example #11
0
        public override void Deserialize(IReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            keyRingBonus      = BooleanByteWrapper.GetFlag(flag1, 0);
            hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag1, 1);
            hasAVARewardToken = BooleanByteWrapper.GetFlag(flag1, 2);
            staticInfos       = ProtocolTypeManager.GetInstance <Types.GroupMonsterStaticInformations>(reader.ReadUShort());
            staticInfos.Deserialize(reader);
            creationTime  = reader.ReadDouble();
            ageBonusRate  = reader.ReadInt();
            lootShare     = reader.ReadSByte();
            alignmentSide = reader.ReadSByte();
        }
 public virtual void Serialize(IDataWriter writer)
 {
     byte flag1 = 0;
     flag1 = BooleanByteWrapper.SetFlag(flag1, 0, isOnSale);
     flag1 = BooleanByteWrapper.SetFlag(flag1, 1, isSaleLocked);
     writer.WriteByte(flag1);
     writer.WriteInt(houseId);
     writer.WriteUShort((ushort)doorsOnMap.Length);
     foreach (var entry in doorsOnMap)
     {
          writer.WriteInt(entry);
     }
     writer.WriteUTF(ownerName);
     writer.WriteShort(modelId);
 }
Example #13
0
        public virtual void Deserialize(BigEndianReader reader)
        {
            byte flag1 = reader.ReadByte();

            sex   = BooleanByteWrapper.GetFlag(flag1, 0);
            alive = BooleanByteWrapper.GetFlag(flag1, 1);
            id    = reader.ReadInt();
            name  = reader.ReadUTF();
            level = reader.ReadShort();
            if (level < 0)
            {
                throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0");
            }
            breed = reader.ReadSByte();
        }
Example #14
0
        public override void Deserialize(IDataReader reader)
        {
            byte flag1 = reader.ReadByte();

            hasStartupActions = BooleanByteWrapper.GetFlag(flag1, 0);
            tutorielAvailable = BooleanByteWrapper.GetFlag(flag1, 1);
            var limit = reader.ReadUShort();

            characters = new CharacterBaseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                characters[i] = (CharacterBaseInformations)ProtocolTypeManager.GetInstance(reader.ReadUShort());
                characters[i].Deserialize(reader);
            }
        }
Example #15
0
        public override void Deserialize(BigEndianReader reader)
        {
            byte flag = reader.ReadByte();

            m_hasRights           = BooleanByteWrapper.GetFlag(flag, 0);
            m_wasAlreadyConnected = BooleanByteWrapper.GetFlag(flag, 1);
            m_login                       = reader.ReadUTF();
            m_nickname                    = reader.ReadUTF();
            m_accountId                   = reader.ReadInt();
            m_communityId                 = reader.ReadByte();
            m_secretQuestion              = reader.ReadUTF();
            m_accountCreation             = reader.ReadDouble();
            m_subscriptionElapsedDuration = reader.ReadDouble();
            m_subscriptionEndDate         = reader.ReadDouble();
        }
        public override void Serialize(IDataWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, hasRights);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, wasAlreadyConnected);
            writer.WriteByte(flag1);
            writer.WriteUTF(login);
            writer.WriteUTF(nickname);
            writer.WriteInt(accountId);
            writer.WriteSByte(communityId);
            writer.WriteUTF(secretQuestion);
            writer.WriteDouble(subscriptionEndDate);
            writer.WriteDouble(accountCreation);
        }
Example #17
0
        public void Serialize(IDataWriter writer)
        {
            UInt32 wrappedBoolean = 0;

            writer.WriteInt((Int32)InstanceId);
            wrappedBoolean = 0;
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 0, SecondHand);
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 1, IsLocked);
            writer.WriteByte((Byte)wrappedBoolean);
            writer.WriteUTF(OwnerName);
            writer.WriteVarLong(Price);
            wrappedBoolean = 0;
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 0, IsSaleLocked);
            writer.WriteByte((Byte)wrappedBoolean);
        }
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, enabled);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, abandonnedPaddock);
            writer.WriteByte(flag1);
            writer.WriteByte(level);
            writer.WriteVarLong(expLevelFloor);
            writer.WriteVarLong(experience);
            writer.WriteVarLong(expNextLevelFloor);
            writer.WriteInt(creationDate);
            writer.WriteVarShort(nbTotalMembers);
            writer.WriteVarShort(nbConnectedMembers);
        }
        public override void Serialize(ICustomDataOutput writer)
        {
            byte flag1 = 0;

            flag1 = BooleanByteWrapper.SetFlag(flag1, 0, this.enabled);
            flag1 = BooleanByteWrapper.SetFlag(flag1, 1, this.abandonnedPaddock);
            writer.WriteByte(flag1);
            writer.WriteByte(this.level);
            writer.WriteVarUhLong(this.expLevelFloor);
            writer.WriteVarUhLong(this.experience);
            writer.WriteVarUhLong(this.expNextLevelFloor);
            writer.WriteInt(this.creationDate);
            writer.WriteVarUhShort(this.nbTotalMembers);
            writer.WriteVarUhShort(this.nbConnectedMembers);
        }
Example #20
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag = reader.ReadByte();

            m_keyRingBonus      = BooleanByteWrapper.GetFlag(flag, 0);
            m_hasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag, 1);
            m_hasAVARewardToken = BooleanByteWrapper.GetFlag(flag, 2);
            m_staticInfos       = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>((short)reader.ReadUShort());
            m_staticInfos.Deserialize(reader);
            m_creationTime  = reader.ReadDouble();
            m_ageBonusRate  = reader.ReadInt();
            m_lootShare     = reader.ReadByte();
            m_alignmentSide = reader.ReadByte();
        }
        public override void Deserialize(IDataReader reader)
        {
            var flag = reader.ReadByte();

            IsMonoAccount = BooleanByteWrapper.GetFlag(flag, 0);
            IsSelectable  = BooleanByteWrapper.GetFlag(flag, 1);
            ObjectId      = reader.ReadVarUhShort();
            Type          = reader.ReadSByte();
            Status        = reader.ReadByte();
            Completion    = reader.ReadByte();

            CharactersCount = reader.ReadByte();
            CharactersSlots = reader.ReadByte();
            Date            = reader.ReadDouble();
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            var flag = reader.ReadByte();

            HasRights           = BooleanByteWrapper.GetFlag(flag, 0);
            WasAlreadyConnected = BooleanByteWrapper.GetFlag(flag, 1);
            Login                       = reader.ReadUTF();
            Nickname                    = reader.ReadUTF();
            AccountId                   = reader.ReadInt();
            CommunityId                 = reader.ReadByte();
            SecretQuestion              = reader.ReadUTF();
            AccountCreation             = reader.ReadDouble();
            SubscriptionElapsedDuration = reader.ReadDouble();
            SubscriptionEndDate         = reader.ReadDouble();
        }
        public override void Deserialize(IDataReader 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 System.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 System.Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15");
            }
            experienceNextLevelFloor = reader.ReadVarUhLong();
            if (experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15)
            {
                throw new System.Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15");
            }
            experienceFightDelta = reader.ReadVarUhLong();
            if (experienceFightDelta < 0 || experienceFightDelta > 9.007199254740992E15)
            {
                throw new System.Exception("Forbidden value on experienceFightDelta = " + experienceFightDelta + ", it doesn't respect the following condition : experienceFightDelta < 0 || experienceFightDelta > 9.007199254740992E15");
            }
            experienceForGuild = reader.ReadVarUhLong();
            if (experienceForGuild < 0 || experienceForGuild > 9.007199254740992E15)
            {
                throw new System.Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0 || experienceForGuild > 9.007199254740992E15");
            }
            experienceForMount = reader.ReadVarUhLong();
            if (experienceForMount < 0 || experienceForMount > 9.007199254740992E15)
            {
                throw new System.Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0 || experienceForMount > 9.007199254740992E15");
            }
            rerollExperienceMul = reader.ReadSByte();
            if (rerollExperienceMul < 0)
            {
                throw new System.Exception("Forbidden value on rerollExperienceMul = " + rerollExperienceMul + ", it doesn't respect the following condition : rerollExperienceMul < 0");
            }
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            byte flag1 = reader.ReadByte();

            this.hasRights           = BooleanByteWrapper.GetFlag(flag1, 0);
            this.wasAlreadyConnected = BooleanByteWrapper.GetFlag(flag1, 1);
            this.login     = reader.ReadUTF();
            this.nickname  = reader.ReadUTF();
            this.accountId = reader.ReadInt();

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

            if (this.communityId < 0)
            {
                throw new Exception("Forbidden value on communityId = " + this.communityId + ", it doesn't respect the following condition : communityId < 0");
            }
            this.secretQuestion  = reader.ReadUTF();
            this.accountCreation = reader.ReadDouble();

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

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

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

            if (this.havenbagAvailableRoom < 0 || this.havenbagAvailableRoom > 255)
            {
                throw new Exception("Forbidden value on havenbagAvailableRoom = " + this.havenbagAvailableRoom + ", it doesn't respect the following condition : havenbagAvailableRoom < 0 || havenbagAvailableRoom > 255");
            }
        }
        public override void Serialize(IDataWriter writer)
        {
            base.Serialize(writer);
            byte flag = new byte();

            BooleanByteWrapper.SetFlag(0, flag, m_keyRingBonus);
            BooleanByteWrapper.SetFlag(1, flag, m_hasHardcoreDrop);
            BooleanByteWrapper.SetFlag(2, flag, m_hasAVARewardToken);
            writer.WriteByte(flag);
            writer.WriteUShort(((ushort)(m_staticInfos.TypeID)));
            m_staticInfos.Serialize(writer);
            writer.WriteDouble(m_creationTime);
            writer.WriteInt(m_ageBonusRate);
            writer.WriteByte(m_lootShare);
            writer.WriteByte(m_alignmentSide);
        }
Example #26
0
        public new void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            UInt32 wrappedBoolean = 0;

            StaticInfos = new GroupMonsterStaticInformations();
            StaticInfos.Deserialize(reader);
            CreationTime      = reader.ReadDouble();
            AgeBonusRate      = (UInt32)reader.ReadInt();
            LootShare         = (SByte)reader.ReadByte();
            AlignmentSide     = (SByte)reader.ReadByte();
            wrappedBoolean    = (UInt32)reader.ReadByte();
            KeyRingBonus      = BooleanByteWrapper.GetFlag(wrappedBoolean, 0);
            HasHardcoreDrop   = BooleanByteWrapper.GetFlag(wrappedBoolean, 1);
            HasAVARewardToken = BooleanByteWrapper.GetFlag(wrappedBoolean, 2);
        }
Example #27
0
        public new void Serialize(IDataWriter writer)
        {
            base.Serialize(writer);
            UInt32 wrappedBoolean = 0;

            StaticInfos.Serialize(writer);
            writer.WriteDouble(CreationTime);
            writer.WriteInt((Int32)AgeBonusRate);
            writer.WriteByte((Byte)LootShare);
            writer.WriteByte((Byte)AlignmentSide);
            wrappedBoolean = 0;
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 0, KeyRingBonus);
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 1, HasHardcoreDrop);
            wrappedBoolean = BooleanByteWrapper.SetFlag(wrappedBoolean, 2, HasAVARewardToken);
            writer.WriteByte((Byte)wrappedBoolean);
        }
Example #28
0
        public override void Serialize(BigEndianWriter writer)
        {
            byte flag = new byte();

            BooleanByteWrapper.SetFlag(0, flag, m_hasRights);
            BooleanByteWrapper.SetFlag(1, flag, m_wasAlreadyConnected);
            writer.WriteByte(flag);
            writer.WriteUTF(m_login);
            writer.WriteUTF(m_nickname);
            writer.WriteInt(m_accountId);
            writer.WriteByte(m_communityId);
            writer.WriteUTF(m_secretQuestion);
            writer.WriteDouble(m_accountCreation);
            writer.WriteDouble(m_subscriptionElapsedDuration);
            writer.WriteDouble(m_subscriptionEndDate);
        }
        public override void Deserialize(ICustomDataReader reader)
        {
            byte box = reader.ReadByte();

            this.HasRights           = BooleanByteWrapper.GetFlag(box, 0);
            this.WasAlreadyConnected = BooleanByteWrapper.GetFlag(box, 1);
            this.Login                       = reader.ReadUTF();
            this.Nickname                    = reader.ReadUTF();
            this.AccountId                   = reader.ReadInt();
            this.CommunityId                 = reader.ReadByte();
            this.SecretQuestion              = reader.ReadUTF();
            this.AccountCreation             = reader.ReadDouble();
            this.SubscriptionElapsedDuration = reader.ReadDouble();
            this.SubscriptionEndDate         = reader.ReadDouble();
            this.HavenbagAvailableRoom       = reader.ReadByte();
        }
        public override void Serialize(ICustomDataOutput writer)
        {
            var flag = new byte();

            BooleanByteWrapper.SetFlag(0, flag, HasRights);
            BooleanByteWrapper.SetFlag(1, flag, WasAlreadyConnected);
            writer.WriteByte(flag);
            writer.WriteUTF(Login);
            writer.WriteUTF(Nickname);
            writer.WriteInt(AccountId);
            writer.WriteByte(CommunityId);
            writer.WriteUTF(SecretQuestion);
            writer.WriteDouble(AccountCreation);
            writer.WriteDouble(SubscriptionElapsedDuration);
            writer.WriteDouble(SubscriptionEndDate);
        }