Esempio n. 1
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_;
        }
Esempio n. 2
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);
 }
Esempio n. 3
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);
 }
 public override void Deserialize(BigEndianReader reader)
 {
     base.Deserialize(reader);
     name = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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);
 }
Esempio n. 8
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);
            }
        }
Esempio n. 9
0
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     name   = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
Esempio n. 10
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);
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     base.Deserialize(reader);
     name = reader.ReadUTF();
     status = new Types.PlayerStatus();
     status.Deserialize(reader);
 }
Esempio n. 12
0
 public AcquaintanceOnlineInformation(int accountId, string accountName, sbyte playerState, double playerId, string playerName, uint moodSmileyId, Types.PlayerStatus status)
     : base(accountId, accountName, playerState)
 {
     this.playerId     = playerId;
     this.playerName   = playerName;
     this.moodSmileyId = moodSmileyId;
     this.status       = status;
 }
 public GameFightFighterNamedInformations(double contextualId, Types.EntityDispositionInformations disposition, Types.EntityLook look, Types.GameContextBasicSpawnInformation spawnInfo, sbyte wave, Types.GameFightMinimalStats stats, uint[] previousPositions, string name, Types.PlayerStatus status, int leagueId, int ladderPosition, bool hiddenInPrefight)
     : base(contextualId, disposition, look, spawnInfo, wave, stats, previousPositions)
 {
     this.name             = name;
     this.status           = status;
     this.leagueId         = leagueId;
     this.ladderPosition   = ladderPosition;
     this.hiddenInPrefight = hiddenInPrefight;
 }
Esempio n. 14
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_;
        }
Esempio n. 15
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 PartyGuestInformations(int guestId, int hostId, string name, Types.EntityLook guestLook, sbyte breed, bool sex, Types.PlayerStatus status)
 {
     this.guestId   = guestId;
     this.hostId    = hostId;
     this.name      = name;
     this.guestLook = guestLook;
     this.breed     = breed;
     this.sex       = sex;
     this.status    = status;
 }
 public PartyGuestInformations(int guestId, int hostId, string name, Types.EntityLook guestLook, sbyte breed, bool sex, Types.PlayerStatus status)
 {
     this.guestId = guestId;
     this.hostId = hostId;
     this.name = name;
     this.guestLook = guestLook;
     this.breed = breed;
     this.sex = sex;
     this.status = status;
 }
 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);
 }
 public PartyGuestInformations(double guestId, double hostId, string name, Types.EntityLook guestLook, sbyte breed, bool sex, Types.PlayerStatus status, Types.PartyEntityBaseInformation[] entities)
 {
     this.guestId   = guestId;
     this.hostId    = hostId;
     this.name      = name;
     this.guestLook = guestLook;
     this.breed     = breed;
     this.sex       = sex;
     this.status    = status;
     this.entities  = entities;
 }
 public PartyGuestInformations(int guestId, int hostId, string name, Types.EntityLook guestLook, sbyte breed, bool sex, Types.PlayerStatus status, IEnumerable<Types.PartyCompanionBaseInformations> companions)
 {
     this.guestId = guestId;
     this.hostId = hostId;
     this.name = name;
     this.guestLook = guestLook;
     this.breed = breed;
     this.sex = sex;
     this.status = status;
     this.companions = companions;
 }
Esempio n. 22
0
 public PartyGuestInformations(long guestId, long hostId, string name, Types.EntityLook guestLook, sbyte breed, bool sex, Types.PlayerStatus status, IEnumerable <Types.PartyCompanionBaseInformations> companions)
 {
     this.guestId    = guestId;
     this.hostId     = hostId;
     this.name       = name;
     this.guestLook  = guestLook;
     this.breed      = breed;
     this.sex        = sex;
     this.status     = status;
     this.companions = companions;
 }
 public FriendOnlineInformations(int accountId, string accountName, sbyte playerState, int lastConnection, int achievementPoints, int playerId, string playerName, short level, sbyte alignmentSide, sbyte breed, bool sex, Types.BasicGuildInformations guildInfo, sbyte moodSmileyId, Types.PlayerStatus status)
     : base(accountId, accountName, playerState, lastConnection, achievementPoints)
 {
     this.playerId = playerId;
     this.playerName = playerName;
     this.level = level;
     this.alignmentSide = alignmentSide;
     this.breed = breed;
     this.sex = sex;
     this.guildInfo = guildInfo;
     this.moodSmileyId = moodSmileyId;
     this.status = status;
 }
 public FriendOnlineInformations(int accountId, string accountName, sbyte playerState, short lastConnection, int achievementPoints, int playerId, string playerName, byte level, sbyte alignmentSide, sbyte breed, bool sex, Types.BasicGuildInformations guildInfo, sbyte moodSmileyId, Types.PlayerStatus status)
     : base(accountId, accountName, playerState, lastConnection, achievementPoints)
 {
     this.playerId      = playerId;
     this.playerName    = playerName;
     this.level         = level;
     this.alignmentSide = alignmentSide;
     this.breed         = breed;
     this.sex           = sex;
     this.guildInfo     = guildInfo;
     this.moodSmileyId  = moodSmileyId;
     this.status        = status;
 }
Esempio n. 25
0
 public JobCrafterDirectoryEntryPlayerInfo(ulong playerId, string playerName, sbyte alignmentSide, sbyte breed, bool sex, bool isInWorkshop, short worldX, short worldY, int mapId, ushort subAreaId, Types.PlayerStatus status)
 {
     this.playerId      = playerId;
     this.playerName    = playerName;
     this.alignmentSide = alignmentSide;
     this.breed         = breed;
     this.sex           = sex;
     this.isInWorkshop  = isInWorkshop;
     this.worldX        = worldX;
     this.worldY        = worldY;
     this.mapId         = mapId;
     this.subAreaId     = subAreaId;
     this.status        = status;
 }
Esempio n. 26
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 FriendOnlineInformations(int accountId, string accountName, sbyte playerState, uint lastConnection, int achievementPoints, int leagueId, int ladderPosition, bool sex, bool havenBagShared, double playerId, string playerName, uint level, sbyte alignmentSide, sbyte breed, Types.GuildInformations guildInfo, uint moodSmileyId, Types.PlayerStatus status)
     : base(accountId, accountName, playerState, lastConnection, achievementPoints, leagueId, ladderPosition)
 {
     this.sex            = sex;
     this.havenBagShared = havenBagShared;
     this.playerId       = playerId;
     this.playerName     = playerName;
     this.level          = level;
     this.alignmentSide  = alignmentSide;
     this.breed          = breed;
     this.guildInfo      = guildInfo;
     this.moodSmileyId   = moodSmileyId;
     this.status         = status;
 }
 public JobCrafterDirectoryEntryPlayerInfo(int playerId, string playerName, sbyte alignmentSide, sbyte breed, bool sex, bool isInWorkshop, short worldX, short worldY, int mapId, short subAreaId, Types.PlayerStatus status)
 {
     this.playerId = playerId;
     this.playerName = playerName;
     this.alignmentSide = alignmentSide;
     this.breed = breed;
     this.sex = sex;
     this.isInWorkshop = isInWorkshop;
     this.worldX = worldX;
     this.worldY = worldY;
     this.mapId = mapId;
     this.subAreaId = subAreaId;
     this.status = status;
 }
 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 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);
 }
Esempio n. 31
0
 public PartyMemberInformations(int id, byte level, string name, Types.EntityLook entityLook, sbyte breed, bool sex, int lifePoints, int maxLifePoints, short prospecting, byte regenRate, short initiative, sbyte alignmentSide, short worldX, short worldY, int mapId, short subAreaId, Types.PlayerStatus status)
     : base(id, level, name, entityLook, breed, sex)
 {
     this.lifePoints    = lifePoints;
     this.maxLifePoints = maxLifePoints;
     this.prospecting   = prospecting;
     this.regenRate     = regenRate;
     this.initiative    = initiative;
     this.alignmentSide = alignmentSide;
     this.worldX        = worldX;
     this.worldY        = worldY;
     this.mapId         = mapId;
     this.subAreaId     = subAreaId;
     this.status        = status;
 }
 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);
 }
Esempio n. 33
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 PartyMemberInformations(uint id, byte level, string name, Types.EntityLook entityLook, sbyte breed, bool sex, uint lifePoints, uint maxLifePoints, ushort prospecting, byte regenRate, ushort initiative, sbyte alignmentSide, short worldX, short worldY, int mapId, ushort subAreaId, Types.PlayerStatus status, IEnumerable<Types.PartyCompanionMemberInformations> companions)
     : base(id, level, name, entityLook, breed, sex)
 {
     this.lifePoints = lifePoints;
     this.maxLifePoints = maxLifePoints;
     this.prospecting = prospecting;
     this.regenRate = regenRate;
     this.initiative = initiative;
     this.alignmentSide = alignmentSide;
     this.worldX = worldX;
     this.worldY = worldY;
     this.mapId = mapId;
     this.subAreaId = subAreaId;
     this.status = status;
     this.companions = companions;
 }
Esempio n. 36
0
 public GuildMember(uint id, byte level, string name, sbyte breed, bool sex, ushort rank, ulong givenExperience, sbyte experienceGivenPercent, uint rights, sbyte connected, sbyte alignmentSide, ushort hoursSinceLastConnection, sbyte moodSmileyId, int accountId, int achievementPoints, Types.PlayerStatus status)
     : base(id, level, name)
 {
     this.breed                    = breed;
     this.sex                      = sex;
     this.rank                     = rank;
     this.givenExperience          = givenExperience;
     this.experienceGivenPercent   = experienceGivenPercent;
     this.rights                   = rights;
     this.connected                = connected;
     this.alignmentSide            = alignmentSide;
     this.hoursSinceLastConnection = hoursSinceLastConnection;
     this.moodSmileyId             = moodSmileyId;
     this.accountId                = accountId;
     this.achievementPoints        = achievementPoints;
     this.status                   = status;
 }
Esempio n. 37
0
 public GuildMember(int id, byte level, string name, sbyte breed, bool sex, short rank, double givenExperience, sbyte experienceGivenPercent, uint rights, sbyte connected, sbyte alignmentSide, ushort hoursSinceLastConnection, sbyte moodSmileyId, int accountId, int achievementPoints, Types.PlayerStatus status)
     : base(id, level, name)
 {
     this.breed = breed;
     this.sex = sex;
     this.rank = rank;
     this.givenExperience = givenExperience;
     this.experienceGivenPercent = experienceGivenPercent;
     this.rights = rights;
     this.connected = connected;
     this.alignmentSide = alignmentSide;
     this.hoursSinceLastConnection = hoursSinceLastConnection;
     this.moodSmileyId = moodSmileyId;
     this.accountId = accountId;
     this.achievementPoints = achievementPoints;
     this.status = status;
 }
        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(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 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 PlayerStatusUpdateMessage(int accountId, uint playerId, Types.PlayerStatus status)
 {
     this.accountId = accountId;
     this.playerId = playerId;
     this.status = status;
 }
 public GameFightFighterNamedInformations(int contextualId, Types.EntityLook look, Types.EntityDispositionInformations disposition, sbyte teamId, sbyte wave, bool alive, Types.GameFightMinimalStats stats, short[] previousPositions, string name, Types.PlayerStatus status)
     : base(contextualId, look, disposition, teamId, wave, alive, stats, previousPositions)
 {
     this.name = name;
     this.status = status;
 }
 public override void Deserialize(IDataReader reader)
 {
     status = Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort());
     status.Deserialize(reader);
 }
Esempio n. 46
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 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);
 }
 public PlayerStatusUpdateRequestMessage(Types.PlayerStatus status)
 {
     this.status = status;
 }
 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);
     }
 }