public override void Deserialize(ICustomDataReader reader)
        {
            byte box = reader.ReadByte();

            this.IsMonoAccount   = BooleanByteWrapper.GetFlag(box, 0);
            this.IsSelectable    = BooleanByteWrapper.GetFlag(box, 1);
            this.Id_             = reader.ReadVarShort();
            this.Type            = reader.ReadByte();
            this.Status          = reader.ReadByte();
            this.Completion      = reader.ReadByte();
            this.CharactersCount = reader.ReadByte();
            this.CharactersSlots = reader.ReadByte();
            this.Date            = reader.ReadDouble();
        }
Beispiel #2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            this.success    = BooleanByteWrapper.GetFlag(flag1, 0);
            this.isFollowed = BooleanByteWrapper.GetFlag(flag1, 1);
            this.followedId = reader.ReadVarUhLong();

            if (this.followedId < 0 || this.followedId > 9007199254740990)
            {
                throw new Exception("Forbidden value on followedId = " + this.followedId + ", it doesn't respect the following condition : followedId < 0 || followedId > 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");
            }
        }
        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 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       = ProtocolManager.GetTypeInstance <GroupMonsterStaticInformations>(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)
        {
            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);
            }
        }
Beispiel #7
0
        public virtual void Deserialize(IDataReader 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();
        }
Beispiel #8
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 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)
        {
            base.Deserialize(reader);
            byte box0 = reader.ReadByte();

            KeyRingBonus      = BooleanByteWrapper.GetFlag(box0, 1);
            HasHardcoreDrop   = BooleanByteWrapper.GetFlag(box0, 2);
            HasAVARewardToken = BooleanByteWrapper.GetFlag(box0, 3);
            var staticInfosTypeId = reader.ReadShort();

            StaticInfos = new GroupMonsterStaticInformations();
            StaticInfos.Deserialize(reader);
            LootShare     = reader.ReadByte();
            AlignmentSide = reader.ReadByte();
        }
Beispiel #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 override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            var flag = reader.ReadByte();

            KeyRingBonus      = BooleanByteWrapper.GetFlag(flag, 0);
            HasHardcoreDrop   = BooleanByteWrapper.GetFlag(flag, 1);
            HasAVARewardToken = BooleanByteWrapper.GetFlag(flag, 2);
            StaticInfos       = ProtocolTypeManager.GetInstance <GroupMonsterStaticInformations>(reader.ReadUShort());
            StaticInfos.Deserialize(reader);
            CreationTime  = reader.ReadDouble();
            AgeBonusRate  = reader.ReadInt();
            LootShare     = reader.ReadSByte();
            AlignmentSide = reader.ReadSByte();
        }
Beispiel #13
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);
        }
        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(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 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(IDataReader reader)
        {
            byte num = reader.ReadByte();

            this.hasRights           = BooleanByteWrapper.GetFlag(num, 0);
            this.wasAlreadyConnected = BooleanByteWrapper.GetFlag(num, 1);
            this.login                       = reader.ReadUTF();
            this.nickname                    = reader.ReadUTF();
            this.accountId                   = reader.ReadInt();
            this.communityId                 = reader.ReadSByte();
            this.secretQuestion              = reader.ReadUTF();
            this.accountCreation             = reader.ReadDouble();
            this.subscriptionElapsedDuration = reader.ReadDouble();
            this.subscriptionEndDate         = reader.ReadDouble();
            this.havenbagAvailableRoom       = reader.ReadByte();
        }
        public override void Deserialize(IReader reader)
        {
            byte flag1 = reader.ReadByte();

            hasRights           = BooleanByteWrapper.GetFlag(flag1, 0);
            wasAlreadyConnected = BooleanByteWrapper.GetFlag(flag1, 1);
            login                       = reader.ReadUTF();
            nickname                    = reader.ReadUTF();
            accountId                   = reader.ReadInt();
            communityId                 = reader.ReadSByte();
            secretQuestion              = reader.ReadUTF();
            accountCreation             = reader.ReadDouble();
            subscriptionElapsedDuration = reader.ReadDouble();
            subscriptionEndDate         = reader.ReadDouble();
            havenbagAvailableRoom       = reader.ReadByte();
        }
        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();
        }
Beispiel #20
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);
        }
        public override void Deserialize(ICustomDataReader reader)
        {
            base.Deserialize(reader);
            byte box = reader.ReadByte();

            this.Sex            = BooleanByteWrapper.GetFlag(box, 0);
            this.HavenBagShared = BooleanByteWrapper.GetFlag(box, 1);
            this.PlayerId       = reader.ReadVarLong();
            this.PlayerName     = reader.ReadUTF();
            this.Level          = reader.ReadVarShort();
            this.AlignmentSide  = reader.ReadByte();
            this.Breed          = reader.ReadByte();
            this.GuildInfo      = new GuildInformations();
            this.GuildInfo.Deserialize(reader);
            this.MoodSmileyId = reader.ReadVarShort();
        }
Beispiel #22
0
        public static ProtocolJsonContent FromBytes(ProtocolJsonContent content, NetworkElement field, IDataReader reader)
        {
            if (content is null)
            {
                content = new ProtocolJsonContent();
            }
            if (field is null)
            {
                return(content);
            }

            try
            {
                if (field.super_serialize)
                {
                    NetworkElement super = ProtocolManager.Instance.Protocol[ProtocolKeyEnum.MessagesAndTypes, x => x.name == field.super];
                    content = FromBytes(content, super, reader);
                }
                IEnumerable <ClassField> boolWrapper = field.fields.Where(x => x.use_boolean_byte_wrapper).OrderBy(x => x.boolean_byte_wrapper_position);
                IEnumerable <ClassField> vars        = field.fields.Where(x => !boolWrapper.Contains(x)).OrderBy(x => x.position);

                byte flag = 0;

                for (byte i = 0; i < boolWrapper.Count(); i++)
                {
                    ClassField _bool = boolWrapper.ElementAt(i);

                    if (i % 8 == 0)
                    {
                        flag = reader.ReadByte();
                    }

                    content[_bool.name] = BooleanByteWrapper.GetFlag(flag, i);
                }

                foreach (ClassField _var in vars)
                {
                    content[_var.name] = _var.Parse(ref reader);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"{e}");
            }

            return(content);
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            byte flag1 = reader.ReadByte();

            this.isPrivate         = BooleanByteWrapper.GetFlag(flag1, 0);
            this.isForGuild        = BooleanByteWrapper.GetFlag(flag1, 1);
            this.isForAlliance     = BooleanByteWrapper.GetFlag(flag1, 2);
            this.needNotifications = BooleanByteWrapper.GetFlag(flag1, 3);
            this.subscriptionFee   = reader.ReadInt();

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

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

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

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

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

            this.criterions = new DareCriteria[limit];
            for (int i = 0; i < limit; i++)
            {
                this.criterions[i] = new DareCriteria();
                this.criterions[i].Deserialize(reader);
            }
        }
        public virtual void Deserialize(IDataReader reader)
        {
            byte flag1 = reader.ReadByte();

            isEntered = BooleanByteWrapper.GetFlag(flag1, 0);
            isInRoom  = BooleanByteWrapper.GetFlag(flag1, 1);
            areaId    = reader.ReadShort();
            if (areaId < 0)
            {
                throw new Exception("Forbidden value on areaId = " + areaId + ", it doesn't respect the following condition : areaId < 0");
            }
            areaAlignment = reader.ReadSByte();
            if (areaAlignment < 0)
            {
                throw new Exception("Forbidden value on areaAlignment = " + areaAlignment + ", it doesn't respect the following condition : areaAlignment < 0");
            }
        }
public void Deserialize(IDataReader reader)
{

byte flag1 = reader.ReadByte();
            isTeamPhase = BooleanByteWrapper.GetFlag(flag1, 0);
            canBeCancelled = BooleanByteWrapper.GetFlag(flag1, 1);
            canSayReady = BooleanByteWrapper.GetFlag(flag1, 2);
            isFightStarted = BooleanByteWrapper.GetFlag(flag1, 3);
            timeMaxBeforeFightStart = reader.ReadShort();
            if (timeMaxBeforeFightStart < 0)
                throw new System.Exception("Forbidden value on timeMaxBeforeFightStart = " + timeMaxBeforeFightStart + ", it doesn't respect the following condition : timeMaxBeforeFightStart < 0");
            fightType = reader.ReadSByte();
            if (fightType < 0)
                throw new System.Exception("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
            

}
Beispiel #26
0
        public virtual void Deserialize(IDataReader reader)
        {
            byte num = reader.ReadByte();

            this.isOnSale     = BooleanByteWrapper.GetFlag(num, 0);
            this.isSaleLocked = BooleanByteWrapper.GetFlag(num, 1);
            this.houseId      = reader.ReadVarUhInt();
            ushort num1 = reader.ReadUShort();

            this.doorsOnMap = new int[num1];
            for (int i = 0; i < num1; i++)
            {
                this.doorsOnMap[i] = reader.ReadInt();
            }
            this.ownerName = reader.ReadUTF();
            this.modelId   = reader.ReadVarUhShort();
        }
        public void Deserialize(IDataReader reader)
        {
            byte flag1 = reader.ReadByte();

            activate = BooleanByteWrapper.GetFlag(flag1, 0);
            party    = BooleanByteWrapper.GetFlag(flag1, 1);
            reason   = reader.ReadSByte();
            if (reason < 0)
            {
                throw new System.Exception("Forbidden value on reason = " + reason + ", it doesn't respect the following condition : reason < 0");
            }
            idolId = reader.ReadVarUhShort();
            if (idolId < 0)
            {
                throw new System.Exception("Forbidden value on idolId = " + idolId + ", it doesn't respect the following condition : idolId < 0");
            }
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            var flag = reader.ReadByte();

            Sex            = BooleanByteWrapper.GetFlag(flag, 0);
            HavenBagShared = BooleanByteWrapper.GetFlag(flag, 1);
            PlayerId       = reader.ReadVarUhLong();
            PlayerName     = reader.ReadUTF();
            Level          = reader.ReadVarUhShort();
            AlignmentSide  = reader.ReadSByte();
            Breed          = reader.ReadSByte();
            GuildInfo      = new GuildInformations();
            GuildInfo.Deserialize(reader);
            MoodSmileyId = reader.ReadVarUhShort();
            Status       = ProtocolTypeManager.GetInstance <PlayerStatus>(reader.ReadUShort());
            Status.Deserialize(reader);
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            sex            = BooleanByteWrapper.GetFlag(flag1, 0);
            havenBagShared = BooleanByteWrapper.GetFlag(flag1, 1);
            playerId       = reader.ReadVarUhLong();
            playerName     = reader.ReadUTF();
            level          = reader.ReadVarUhShort();
            alignmentSide  = reader.ReadSbyte();
            breed          = reader.ReadSbyte();
            guildInfo      = new Types.GuildInformations();
            guildInfo.Deserialize(reader);
            moodSmileyId = reader.ReadVarUhShort();
            status       = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
        }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag = reader.ReadByte();

            m_sex            = BooleanByteWrapper.GetFlag(flag, 0);
            m_havenBagShared = BooleanByteWrapper.GetFlag(flag, 1);
            m_guildInfo      = new GuildInformations();
            m_guildInfo.Deserialize(reader);
            m_status = ProtocolManager.GetTypeInstance <PlayerStatus>(reader.ReadUShort());
            m_status.Deserialize(reader);
            m_playerId      = reader.ReadVarUhLong();
            m_playerName    = reader.ReadUTF();
            m_level         = reader.ReadSByte();
            m_alignmentSide = reader.ReadByte();
            m_breed         = reader.ReadByte();
            m_moodSmileyId  = reader.ReadVarUhShort();
        }