コード例 #1
0
        public void serialize(Utils.Objects.Packet sender)
        {
            // --------------- //
            // --- MINIMAL --- //
            // --------------- //

            sender.WriteInt(_character.Guid);
            sender.WriteByte( (byte)_character.Level );
            sender.WriteUTF(_character.Name);

            // ------------ //
            // --- LOOK --- //
            // ------------ //

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_character.Classe * 10 + (int)_character.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_character.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            // ------------ //
            // --- BASE --- //
            // ------------ //

            sender.WriteByte( (byte)_character.Classe );
            sender.WriteByte( (byte)_character.Sexe );
        }
コード例 #2
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort((short)Types.game.context.EntityDispositionInformations.ProtocolID);
            _target.Disposition.serialize(sender);
        }
コード例 #3
0
        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt(Member.Guid);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            // LOOK
            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort((short)((int)Member.Classe * 10 + (int)Member.Sexe));

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(Member.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort((short)140);

            sender.WriteShort(0); // nSubEntities

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Guid);

            ////// ENTITY LOOK //////

            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort( (short)( (int)_target.Classe * 10 + (int)_target.Sexe) );

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(_target.Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort( (short)140 );

            sender.WriteShort(0); // nSubEntities

            ////// ENTITY DISPOSITION

            sender.WriteShort(60); // EntityDisposition id

            sender.WriteShort(_target.CurCell);
            sender.WriteByte( (byte)_target.Direction );
        }
コード例 #5
0
        public static void serialize(Utils.Objects.Packet sender, Global.Character senderChar, Global.Character targetChar)
        {
            sender.WriteInt(senderChar.Guid);
            sender.WriteUTF(senderChar.Name);

            sender.WriteInt(targetChar.Guid);
            sender.WriteUTF(targetChar.Name);
        }
コード例 #6
0
 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
     sender.WriteUTF("abcdef"); // fingerprint ???
     sender.WriteInt((int)target.Id);
     sender.WriteUTF(target.Name);
 }
コード例 #7
0
 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt(Global.Environnement.getInstance().Timestamp);
     sender.WriteUTF("abcdef"); // fingerprint ???
     sender.WriteInt(target.Guid);
     sender.WriteUTF(target.Name);
 }
コード例 #8
0
ファイル: ChatServerMessage.cs プロジェクト: Emudofus/Aldos
 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt(Global.Environnement.getInstance().Timestamp);
     sender.WriteUTF("abcdef");
     sender.WriteInt(actor.Guid);
     sender.WriteUTF(actor.Name);
     sender.WriteInt(actor.AccountID);
 }
コード例 #9
0
ファイル: ChatServerMessage.cs プロジェクト: Emudofus/Aldos
 public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character actor)
 {
     sender.WriteByte((byte)chan);
     sender.WriteUTF(message);
     sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds );
     sender.WriteUTF(string.Empty);
     sender.WriteInt((int)actor.Id);
     sender.WriteUTF(actor.Name);
     sender.WriteInt((int)actor.Owner.Id);
 }
コード例 #10
0
 public static void serialize(Utils.Objects.Packet sender, int accountId)
 {
     sender.WriteInt(accountId);
     sender.WriteBool(false); // tutorial available
     sender.WriteShort(8191); // breeds visible
     sender.WriteShort(2047); // breeds available
 }
コード例 #11
0
 public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteShort((short)cell);
     sender.WriteInt(actor.Guid);
 }
コード例 #12
0
 public static void serialize(Utils.Objects.Packet sender, List<int> path, int targetMap)
 {
     sender.WriteShort( (short)path.Count );
     foreach (int cell in path)
         sender.WriteCell(cell);
     sender.WriteInt(targetMap);
 }
コード例 #13
0
 public static void serialize(Utils.Objects.Packet sender)
 {
     int nFlags = 0;
     sender.WriteShort((short)nFlags);
     for (int i = 0; i < nFlags; ++i)
         sender.WriteInt(0);
 }
コード例 #14
0
        public static void serialize(Utils.Objects.Packet packet, Global.Character character)
        {
            packet.WriteUTF(character.Name);
            packet.WriteByte((byte)character.Classe);
            packet.WriteByte((byte)character.Sexe);

            foreach (int color in character.Colors)
                packet.WriteInt(color);
        }
コード例 #15
0
        public void serialize(Utils.Objects.Packet sender)
        {
            // MINIMAL INFO
            sender.WriteInt((int)Member.Id);
            sender.WriteByte((byte)Member.Level);
            sender.WriteUTF(Member.Name);

            Member.Look.serialize(sender);

            // PARTY
            sender.WriteInt(Member.Characteristics.lifePoints);
            sender.WriteInt(Member.Characteristics.maxLifePoints);
            sender.WriteShort((short)Member.Characteristics.prospecting.Total);
            sender.WriteByte(0); // regenRate
            sender.WriteShort((short)Member.Characteristics.initiative.Total);
            sender.WriteBool(false); // pvp enabled
            sender.WriteByte(0); // alignment side
        }
コード例 #16
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt(_target.Id);

            _target.Look.serialize(sender);

            sender.WriteShort((short)EntityDispositionInformations.ProtocolID);
            _target.Disposition.serialize(sender);
        }
コード例 #17
0
ファイル: PartyJoinMessage.cs プロジェクト: Emudofus/Aldos
        public static void serialize(Utils.Objects.Packet sender, Global.Party party)
        {
            sender.WriteInt(party.Leader.Guid);

            sender.WriteShort((short)party.Members.Count);
            foreach (Global.Character member in party.Members)
                new Types.game.context.PartyMemberInformations(member).serialize(sender);

            sender.WriteBool(false); // restricted ??
        }
コード例 #18
0
ファイル: FriendInformations.cs プロジェクト: Emudofus/Aldos
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteUTF(Friend.Nickname);
            sender.WriteByte(Friend.CurrentCharacter != null ? (byte)Friend.CurrentCharacter.State : (byte)Enums.PlayerStateEnum.NOT_CONNECTED);
            sender.WriteInt(0);

            if (Friend.CurrentCharacter != null && Friend.CurrentCharacter.IsConnected)
            {
                sender.WriteUTF(Friend.CurrentCharacter.Name);
                sender.WriteShort((short)Friend.CurrentCharacter.Level);
                sender.WriteByte(0); // alignmentSide
                sender.WriteByte((byte)Friend.CurrentCharacter.Classe);
                sender.WriteByte((byte)Friend.CurrentCharacter.Sexe);

                sender.WriteInt(0); // guild guid
                sender.WriteUTF(""); // guild name

                sender.WriteByte(0xff); // mood smiley id
            }
        }
コード例 #19
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteInt( (int)Character.Id );
            sender.WriteByte( (byte)Character.Level );
            sender.WriteUTF(Character.Name);

            Character.Look.serialize(sender);

            sender.WriteByte( (byte)Character.Breed );
            sender.WriteByte( (byte)Character.Gender );
        }
コード例 #20
0
 public static void serialize(Utils.Objects.Packet sender, Global.Account acc)
 {
     int wrapper = 0;
     Utils.BooleanByteWrapper.setFlag(ref wrapper, 0, (int)acc.GmLvl > 0);
     Utils.BooleanByteWrapper.setFlag(ref wrapper, 1, acc.Connected);
     sender.WriteByte( (byte)wrapper );
     sender.WriteUTF("[" + acc.GmLvl + "] " + acc.Nickname);
     sender.WriteInt((int)acc.Id);
     sender.WriteByte(0); // communityID
     sender.WriteUTF(""); // question
     sender.WriteDouble(31536000000); // aboTime (un an en millisecondes)
 }
コード例 #21
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteByte((byte)alignmentSide);
            sender.WriteByte((byte)alignmentValue);
            sender.WriteByte((byte)alignmentGrade);
            sender.WriteShort((short)dishonor);
            sender.WriteInt(characterPower);

            sender.WriteShort((short)honor);
            sender.WriteShort((short)honorGradeFloor);
            sender.WriteShort((short)honorNextGradeFloor);
            sender.WriteBool(pvpEnabled);
        }
コード例 #22
0
ファイル: EntityLook.cs プロジェクト: Emudofus/Aldos
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteShort(1); // bones ID

            sender.WriteShort(1); // nSkins
            sender.WriteShort((short)((int)Target.Breed * 10 + (int)Target.Gender));

            sender.WriteShort((short)5);
            for (int i = 0; i < 5; ++i)
                sender.WriteInt(Colors[i] | (i + 1) * 0x1000000);

            sender.WriteShort(1); // nScales
            sender.WriteShort((short)140);

            sender.WriteShort(0); // nSubEntities
        }
コード例 #23
0
        public static void serialize(Utils.Objects.Packet sender, Global.Map map)
        {
            sender.WriteShort( (short)map.SubAreaID );
            sender.WriteInt( map.ID );
            sender.WriteByte(0); // subareaAlignmentSide

            sender.WriteShort(0); // nHouses

            sender.WriteShort( (short)map.Actors.Count );
            foreach (Global.Character actor in map.Actors)
            {
                sender.WriteShort((short)Types.game.context.GameRolePlayActorInformations.ProtocolID);
                new Types.game.context.GameRolePlayActorInformations(actor).serialize(sender);
            }

            sender.WriteShort(0); // nInteractiveElements

            sender.WriteShort(0); // nStatedElements

            sender.WriteShort(0); // nObstacles

            sender.WriteShort(0); // nFights
        }
コード例 #24
0
 public static void serialize(Utils.Objects.Packet sender, Global.IActor target)
 {
     sender.WriteInt((int)target.Id);
 }
コード例 #25
0
 public static void serialize(Utils.Objects.Packet sender, int characterId, string reponse)
 {
     sender.WriteInt(characterId);
     sender.WriteUTF(reponse);
 }
コード例 #26
0
        public void serialize(Utils.Objects.Packet sender)
        {
            sender.WriteDouble(experience);
            sender.WriteDouble(experienceLevelFloor);
            sender.WriteDouble(experienceNextLevelFloor);
            sender.WriteInt(kamas);
            sender.WriteInt(statsPoints);
            sender.WriteInt(spellsPoints);
            alignmentInfos.serialize(sender);
            sender.WriteInt(lifePoints);
            sender.WriteInt(maxLifePoints);
            sender.WriteShort((short)energyPoints);
            sender.WriteShort((short)maxEnergyPoints);
            sender.WriteShort((short)actionPointsCurrent);
            sender.WriteShort((short)movementPointsCurrent);
            initiative.serialize(sender);
            prospecting.serialize(sender);
            actionPoints.serialize(sender);
            movementPoints.serialize(sender);
            strength.serialize(sender);
            vitality.serialize(sender);
            wisdom.serialize(sender);
            chance.serialize(sender);
            agility.serialize(sender);
            intelligence.serialize(sender);
            range.serialize(sender);
            summonableCreaturesBoost.serialize(sender);
            reflect.serialize(sender);
            criticalHit.serialize(sender);
            sender.WriteShort((short)criticalHitWeapon);
            criticalMiss.serialize(sender);
            healBonus.serialize(sender);
            allDamagesBonus.serialize(sender);
            weaponDamagesBonusPercent.serialize(sender);
            damagesBonusPercent.serialize(sender);
            trapBonus.serialize(sender);
            trapBonusPercent.serialize(sender);
            permanentDamagePercent.serialize(sender);
            tackleBlock.serialize(sender);
            tackleEvade.serialize(sender);
            PAAttack.serialize(sender);
            PMAttack.serialize(sender);
            pushDamageBonus.serialize(sender);
            criticalDamageBonus.serialize(sender);
            neutralDamageBonus.serialize(sender);
            earthDamageBonus.serialize(sender);
            waterDamageBonus.serialize(sender);
            airDamageBonus.serialize(sender);
            fireDamageBonus.serialize(sender);
            dodgePALostProbability.serialize(sender);
            dodgePMLostProbability.serialize(sender);
            neutralElementResistPercent.serialize(sender);
            earthElementResistPercent.serialize(sender);
            waterElementResistPercent.serialize(sender);
            airElementResistPercent.serialize(sender);
            fireElementResistPercent.serialize(sender);
            neutralElementReduction.serialize(sender);
            earthElementReduction.serialize(sender);
            waterElementReduction.serialize(sender);
            airElementReduction.serialize(sender);
            fireElementReduction.serialize(sender);
            pushDamageReduction.serialize(sender);
            criticalDamageReduction.serialize(sender);
            pvpNeutralElementResistPercent.serialize(sender);
            pvpEarthElementResistPercent.serialize(sender);
            pvpWaterElementResistPercent.serialize(sender);
            pvpAirElementResistPercent.serialize(sender);
            pvpFireElementResistPercent.serialize(sender);
            pvpNeutralElementReduction.serialize(sender);
            pvpEarthElementReduction.serialize(sender);
            pvpWaterElementReduction.serialize(sender);
            pvpAirElementReduction.serialize(sender);
            pvpFireElementReduction.serialize(sender);

            sender.WriteShort(0); // nSpellModifications
        }
コード例 #27
0
 public static void serialize(Utils.Objects.Packet sender, Global.Character perso)
 {
     sender.WriteShort(0); // nItems
     sender.WriteInt(perso.Characteristics.kamas);
 }
コード例 #28
0
 public static void serialize(Utils.Objects.Packet sender, int leavingPlayerId)
 {
     sender.WriteInt(leavingPlayerId);
 }
コード例 #29
0
ファイル: ChangeMapMessage.cs プロジェクト: Emudofus/Aldos
 public static void serialize(Utils.Objects.Packet sender, int target)
 {
     sender.WriteInt(target);
 }
コード例 #30
0
ファイル: BasicTimeMessage.cs プロジェクト: Emudofus/Aldos
 public static void serialize(Utils.Objects.Packet sender)
 {
     sender.WriteInt( (int)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds ); // timestamp
     sender.WriteShort(3600); // timezoneOffset
 }