public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     name = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     accountId = reader.ReadInt();
     playerId  = reader.ReadVarUhLong();
     status    = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     playerId = reader.ReadVarLong();
     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.GuildInformations();
     guildInfo.Deserialize(reader);
     moodSmileyId = reader.ReadVarShort();
     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);
 }
Beispiel #4
0
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     name   = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
Beispiel #5
0
        public virtual void Deserialize(ICustomDataInput reader)
        {
            guestId = reader.ReadInt();
            if (guestId < 0)
            {
                throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0");
            }
            hostId = reader.ReadInt();
            if (hostId < 0)
            {
                throw new Exception("Forbidden value on hostId = " + hostId + ", it doesn't respect the following condition : hostId < 0");
            }
            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.ReadShort();

            companions = new Types.PartyCompanionBaseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                (companions as Types.PartyCompanionBaseInformations[])[i] = new Types.PartyCompanionBaseInformations();
                (companions as Types.PartyCompanionBaseInformations[])[i].Deserialize(reader);
            }
        }
Beispiel #6
0
        public virtual void Deserialize(IDataReader reader)
        {
            guestId = reader.ReadVarLong();
            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.ReadVarLong();
            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();
            var companions_ = new Types.PartyCompanionBaseInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                companions_[i] = new Types.PartyCompanionBaseInformations();
                companions_[i].Deserialize(reader);
            }
            companions = companions_;
        }
Beispiel #7
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     name   = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     name = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
Beispiel #9
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);
 }
Beispiel #10
0
 public virtual void Deserialize(BigEndianReader reader)
 {
     playerId = reader.ReadVarInt();
     if (playerId < 0)
     {
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     }
     playerName    = reader.ReadUTF();
     alignmentSide = reader.ReadSByte();
     breed         = reader.ReadSByte();
     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.ReadVarShort();
     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);
 }
Beispiel #11
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     playerId = reader.ReadVarUhInt();
     if (playerId < 0)
     {
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     }
     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.Eliotrope))
     {
         throw new Exception("Forbidden value on breed = " + breed + ", it doesn't respect the following condition : (breed < (byte)Enums.PlayableBreedEnum.Feca) || (breed > (byte)Enums.PlayableBreedEnum.Eliotrope)");
     }
     sex       = reader.ReadBoolean();
     guildInfo = new Types.BasicGuildInformations();
     guildInfo.Deserialize(reader);
     moodSmileyId = reader.ReadSByte();
     status       = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
Beispiel #12
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            lifePoints = reader.ReadVarInt();
            if (lifePoints < 0)
            {
                throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
            }
            maxLifePoints = reader.ReadVarInt();
            if (maxLifePoints < 0)
            {
                throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
            }
            prospecting = reader.ReadVarShort();
            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");
            }
            initiative = reader.ReadVarShort();
            if (initiative < 0)
            {
                throw new Exception("Forbidden value on initiative = " + initiative + ", it doesn't respect the following condition : initiative < 0");
            }
            alignmentSide = reader.ReadSByte();
            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.ReadVarShort();
            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);
            var limit       = reader.ReadUShort();
            var companions_ = new Types.PartyCompanionMemberInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                companions_[i] = new Types.PartyCompanionMemberInformations();
                companions_[i].Deserialize(reader);
            }
            companions = companions_;
        }
Beispiel #13
0
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     playerId     = reader.ReadVarUhLong();
     playerName   = reader.ReadUTF();
     moodSmileyId = reader.ReadVarUhShort();
     status       = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     name   = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
     leagueId         = reader.ReadVarShort();
     ladderPosition   = reader.ReadInt();
     hiddenInPrefight = reader.ReadBoolean();
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     playerId = reader.ReadVarUhInt();
     if (playerId < 0)
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
Beispiel #16
0
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     breed = reader.ReadSByte();
     sex   = reader.ReadBoolean();
     rank  = reader.ReadVarUhShort();
     if (rank < 0)
     {
         throw new System.Exception("Forbidden value on rank = " + rank + ", it doesn't respect the following condition : rank < 0");
     }
     givenExperience = reader.ReadVarUhLong();
     if (givenExperience < 0 || givenExperience > 9.007199254740992E15)
     {
         throw new System.Exception("Forbidden value on givenExperience = " + givenExperience + ", it doesn't respect the following condition : givenExperience < 0 || givenExperience > 9.007199254740992E15");
     }
     experienceGivenPercent = reader.ReadSByte();
     if (experienceGivenPercent < 0 || experienceGivenPercent > 100)
     {
         throw new System.Exception("Forbidden value on experienceGivenPercent = " + experienceGivenPercent + ", it doesn't respect the following condition : experienceGivenPercent < 0 || experienceGivenPercent > 100");
     }
     rights = reader.ReadVarUhInt();
     if (rights < 0)
     {
         throw new System.Exception("Forbidden value on rights = " + rights + ", it doesn't respect the following condition : rights < 0");
     }
     connected = reader.ReadSByte();
     if (connected < 0)
     {
         throw new System.Exception("Forbidden value on connected = " + connected + ", it doesn't respect the following condition : connected < 0");
     }
     alignmentSide            = reader.ReadSByte();
     hoursSinceLastConnection = reader.ReadUShort();
     if (hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535)
     {
         throw new System.Exception("Forbidden value on hoursSinceLastConnection = " + hoursSinceLastConnection + ", it doesn't respect the following condition : hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535");
     }
     moodSmileyId = reader.ReadVarUhShort();
     if (moodSmileyId < 0)
     {
         throw new System.Exception("Forbidden value on moodSmileyId = " + moodSmileyId + ", it doesn't respect the following condition : moodSmileyId < 0");
     }
     accountId = reader.ReadInt();
     if (accountId < 0)
     {
         throw new System.Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     }
     achievementPoints = reader.ReadInt();
     status            = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     lifePoints = reader.ReadInt();
     if (lifePoints < 0)
     {
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     }
     maxLifePoints = reader.ReadInt();
     if (maxLifePoints < 0)
     {
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     }
     prospecting = reader.ReadShort();
     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");
     }
     initiative = reader.ReadShort();
     if (initiative < 0)
     {
         throw new Exception("Forbidden value on initiative = " + initiative + ", it doesn't respect the following condition : initiative < 0");
     }
     pvpEnabled    = reader.ReadBoolean();
     alignmentSide = reader.ReadSByte();
     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.ReadShort();
     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);
 }
 public void Deserialize(IDataReader reader)
 {
     accountId = reader.ReadInt();
     if (accountId < 0)
     {
         throw new System.Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     }
     playerId = reader.ReadVarUhLong();
     if (playerId < 0 || playerId > 9.007199254740992E15)
     {
         throw new System.Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0 || playerId > 9.007199254740992E15");
     }
     status = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 public virtual void Deserialize(IDataReader reader)
 {
     playerId      = reader.ReadVarUhLong();
     playerName    = reader.ReadUTF();
     alignmentSide = reader.ReadSbyte();
     breed         = reader.ReadSbyte();
     sex           = reader.ReadBoolean();
     isInWorkshop  = reader.ReadBoolean();
     worldX        = reader.ReadShort();
     worldY        = reader.ReadShort();
     mapId         = reader.ReadDouble();
     subAreaId     = reader.ReadVarUhShort();
     status        = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
     status.Deserialize(reader);
 }
Beispiel #20
0
 public override void Deserialize(BigEndianReader reader)
 {
     accountId = reader.ReadInt();
     if (accountId < 0)
     {
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     }
     playerId = reader.ReadVarInt();
     if (playerId < 0)
     {
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     }
     status = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 public virtual void Deserialize(IDataReader reader)
 {
     guestId = reader.ReadInt();
     if (guestId < 0)
         throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0");
     hostId = reader.ReadInt();
     if (hostId < 0)
         throw new Exception("Forbidden value on hostId = " + hostId + ", it doesn't respect the following condition : hostId < 0");
     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);
 }
        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(BigEndianReader reader)
 {
     base.Deserialize(reader);
     playerId = reader.ReadVarInt();
     if (playerId < 0)
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     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();
     sex = reader.ReadBoolean();
     guildInfo = new Types.BasicGuildInformations();
     guildInfo.Deserialize(reader);
     moodSmileyId = reader.ReadSByte();
     status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
        public virtual void Deserialize(IReader reader)
        {
            guestId   = reader.ReadVarUhLong();
            hostId    = reader.ReadVarUhLong();
            name      = reader.ReadUTF();
            guestLook = new Types.EntityLook();
            guestLook.Deserialize(reader);
            breed  = reader.ReadSByte();
            sex    = reader.ReadBoolean();
            status = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
            var limit = reader.ReadUShort();

            companions = new Types.PartyCompanionBaseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                (companions as Types.PartyCompanionBaseInformations[])[i] = new Types.PartyCompanionBaseInformations();
                (companions as Types.PartyCompanionBaseInformations[])[i].Deserialize(reader);
            }
        }
        public virtual void Deserialize(IDataReader reader)
        {
            guestId   = reader.ReadVarUhLong();
            hostId    = reader.ReadVarUhLong();
            name      = reader.ReadUTF();
            guestLook = new Types.EntityLook();
            guestLook.Deserialize(reader);
            breed  = reader.ReadSbyte();
            sex    = reader.ReadBoolean();
            status = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
            var limit = (ushort)reader.ReadUShort();

            entities = new Types.PartyEntityBaseInformation[limit];
            for (int i = 0; i < limit; i++)
            {
                entities[i] = new Types.PartyEntityBaseInformation();
                entities[i].Deserialize(reader);
            }
        }
 public virtual void Deserialize(BigEndianReader reader)
 {
     guestId = reader.ReadInt();
     if (guestId < 0)
     {
         throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0");
     }
     hostId = reader.ReadInt();
     if (hostId < 0)
     {
         throw new Exception("Forbidden value on hostId = " + hostId + ", it doesn't respect the following condition : hostId < 0");
     }
     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);
 }
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            byte flag1 = reader.ReadByte();

            sex                      = BooleanByteWrapper.GetFlag(flag1, 0);
            havenBagShared           = BooleanByteWrapper.GetFlag(flag1, 1);
            breed                    = reader.ReadSbyte();
            rank                     = reader.ReadVarUhShort();
            givenExperience          = reader.ReadVarUhLong();
            experienceGivenPercent   = reader.ReadSbyte();
            rights                   = reader.ReadVarUhInt();
            connected                = reader.ReadSbyte();
            alignmentSide            = reader.ReadSbyte();
            hoursSinceLastConnection = reader.ReadUShort();
            moodSmileyId             = reader.ReadVarUhShort();
            accountId                = reader.ReadInt();
            achievementPoints        = reader.ReadInt();
            status                   = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
        }
 public virtual void Deserialize(ICustomDataInput reader)
 {
     guestId = reader.ReadInt();
     if (guestId < 0)
         throw new Exception("Forbidden value on guestId = " + guestId + ", it doesn't respect the following condition : guestId < 0");
     hostId = reader.ReadInt();
     if (hostId < 0)
         throw new Exception("Forbidden value on hostId = " + hostId + ", it doesn't respect the following condition : hostId < 0");
     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 as Types.PartyCompanionBaseInformations[])[i] = new Types.PartyCompanionBaseInformations();
          (companions as Types.PartyCompanionBaseInformations[])[i].Deserialize(reader);
     }
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     playerId = reader.ReadVarInt();
     if (playerId < 0)
     {
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     }
     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();
     sex           = reader.ReadBoolean();
     guildInfo     = new Types.BasicGuildInformations();
     guildInfo.Deserialize(reader);
     moodSmileyId = reader.ReadSByte();
     status       = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
Beispiel #30
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            lifePoints    = reader.ReadVarUhInt();
            maxLifePoints = reader.ReadVarUhInt();
            prospecting   = reader.ReadVarUhShort();
            regenRate     = reader.ReadByte();
            initiative    = reader.ReadVarUhShort();
            alignmentSide = reader.ReadSbyte();
            worldX        = reader.ReadShort();
            worldY        = reader.ReadShort();
            mapId         = reader.ReadDouble();
            subAreaId     = reader.ReadVarUhShort();
            status        = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
            var limit = (ushort)reader.ReadUShort();

            entities = new Types.PartyEntityBaseInformation[limit];
            for (int i = 0; i < limit; i++)
            {
                entities[i] = ProtocolTypeManager.GetInstance <Types.PartyEntityBaseInformation>(reader.ReadUShort());
                entities[i].Deserialize(reader);
            }
        }
        public override void Deserialize(IReader reader)
        {
            base.Deserialize(reader);
            lifePoints    = reader.ReadVarUhInt();
            maxLifePoints = reader.ReadVarUhInt();
            prospecting   = reader.ReadVarUhShort();
            regenRate     = reader.ReadByte();
            initiative    = reader.ReadVarUhShort();
            alignmentSide = reader.ReadSByte();
            worldX        = reader.ReadShort();
            worldY        = reader.ReadShort();
            mapId         = reader.ReadInt();
            subAreaId     = reader.ReadVarUhShort();
            status        = ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadUShort());
            status.Deserialize(reader);
            var limit = reader.ReadUShort();

            companions = new Types.PartyCompanionMemberInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                (companions as Types.PartyCompanionMemberInformations[])[i] = new Types.PartyCompanionMemberInformations();
                (companions as Types.PartyCompanionMemberInformations[])[i].Deserialize(reader);
            }
        }
 public override void Deserialize(IDataReader reader)
 {
     status = Types.ProtocolTypeManager.GetInstance <Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
Beispiel #34
0
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     breed = reader.ReadSByte();
     sex = reader.ReadBoolean();
     rank = reader.ReadShort();
     if (rank < 0)
         throw new Exception("Forbidden value on rank = " + rank + ", it doesn't respect the following condition : rank < 0");
     givenExperience = reader.ReadDouble();
     if (givenExperience < 0)
         throw new Exception("Forbidden value on givenExperience = " + givenExperience + ", it doesn't respect the following condition : givenExperience < 0");
     experienceGivenPercent = reader.ReadSByte();
     if (experienceGivenPercent < 0 || experienceGivenPercent > 100)
         throw new Exception("Forbidden value on experienceGivenPercent = " + experienceGivenPercent + ", it doesn't respect the following condition : experienceGivenPercent < 0 || experienceGivenPercent > 100");
     rights = reader.ReadUInt();
     if (rights < 0 || rights > 4294967295)
         throw new Exception("Forbidden value on rights = " + rights + ", it doesn't respect the following condition : rights < 0 || rights > 4294967295");
     connected = reader.ReadSByte();
     if (connected < 0)
         throw new Exception("Forbidden value on connected = " + connected + ", it doesn't respect the following condition : connected < 0");
     alignmentSide = reader.ReadSByte();
     hoursSinceLastConnection = reader.ReadUShort();
     if (hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535)
         throw new Exception("Forbidden value on hoursSinceLastConnection = " + hoursSinceLastConnection + ", it doesn't respect the following condition : hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535");
     moodSmileyId = reader.ReadSByte();
     accountId = reader.ReadInt();
     if (accountId < 0)
         throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0");
     achievementPoints = reader.ReadInt();
     status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     lifePoints = reader.ReadInt();
     if (lifePoints < 0)
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     maxLifePoints = reader.ReadInt();
     if (maxLifePoints < 0)
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     prospecting = reader.ReadShort();
     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");
     initiative = reader.ReadShort();
     if (initiative < 0)
         throw new Exception("Forbidden value on initiative = " + initiative + ", it doesn't respect the following condition : initiative < 0");
     pvpEnabled = reader.ReadBoolean();
     alignmentSide = reader.ReadSByte();
     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.ReadShort();
     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);
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     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)");
     initiative = reader.ReadVarUhShort();
     if (initiative < 0)
         throw new Exception("Forbidden value on initiative = " + initiative + ", it doesn't respect the following condition : initiative < 0");
     alignmentSide = reader.ReadSByte();
     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);
     var limit = reader.ReadUShort();
     companions = new Types.PartyCompanionMemberInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          (companions as Types.PartyCompanionMemberInformations[])[i] = new Types.PartyCompanionMemberInformations();
          (companions as Types.PartyCompanionMemberInformations[])[i].Deserialize(reader);
     }
 }
 public virtual void Deserialize(BigEndianReader reader)
 {
     playerId = reader.ReadVarInt();
     if (playerId < 0)
         throw new Exception("Forbidden value on playerId = " + playerId + ", it doesn't respect the following condition : playerId < 0");
     playerName = reader.ReadUTF();
     alignmentSide = reader.ReadSByte();
     breed = reader.ReadSByte();
     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.ReadVarShort();
     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);
 }