Example #1
0
        protected override void WriteAmf3(IExternalWriter writer)
        {
            if (m_mounts == null)
                return;
            writer.WriteKey("ID");
            writer.WriteUTF(m_mounts.ID);

            writer.WriteKey("Experience");
            writer.WriteInt(m_mounts.Experience);

            writer.WriteKey("Level");
            writer.WriteInt(m_mounts.Level);

            writer.WriteKey("Status");
            writer.WriteInt(m_mounts.Status);

            writer.WriteKey("MountsID");
            writer.WriteUTF(m_mounts.MountsID);

            writer.WriteKey("PlayerID");
            writer.WriteUTF(m_mounts.PlayerID);

            writer.WriteKey("Rank");
            writer.WriteInt(m_mounts.Rank);

            if (m_mounts.Value == null)
                return;
            Variant skill = m_mounts.Value.GetVariantOrDefault("Skill");
            if (skill == null)
                return;

            writer.WriteKey("Skill");
            writer.WriteValue(skill);

            writer.WriteKey("FailCount");
            writer.WriteInt(m_mounts.FailCount);

            writer.WriteKey("FailTime");
            writer.WriteDateTime(m_mounts.FailTime);

            writer.WriteKey("ZhuFu");
            writer.WriteInt(m_mounts.ZhuFu);
        }
Example #2
0
        protected override void WriteAmf3(IExternalWriter writer)
        {
            m_player.WriteBase(writer);
            if (m_style == 0)
            {
                writer.WriteKey("Coat");
                writer.WriteUTF(m_player.Coat);
                writer.WriteKey("Weapon");
                writer.WriteUTF(m_player.Weapon);
                writer.WriteKey("Body");
                writer.WriteUTF(m_player.Body);
                writer.WriteKey("Mount");
                writer.WriteUTF(m_player.Mount);

                writer.WriteKey("SceneID");
                writer.WriteUTF(m_player.SceneID);

                writer.WriteKey("State");
                writer.WriteInt(m_player.State);
                if (m_player.State == 2)
                {
                    writer.WriteKey("DelTime");
                    writer.WriteDateTime(m_player.Modified.AddSeconds(GetRetainSecond(m_player.Level)));
                }
                return;
            }

            if (m_style == 2)
            {
                writer.WriteKey("Dian");
                writer.WriteInt(m_player.Dian);
            }

            writer.WriteKey("FamilyName");
            writer.WriteUTF(m_player.FamilyName);
            writer.WriteKey("FamilyJob");
            writer.WriteUTF(m_player.FamilyJob);

            writer.WriteKey("Online");
            writer.WriteBoolean(m_player.Online);
        }
Example #3
0
        protected override void WriteAmf3(IExternalWriter writer)
        {
            writer.WriteKey("ID");
            writer.WriteUTF(m_part.ID);

            writer.WriteKey("Start");
            writer.WriteDateTime(m_start);

            writer.WriteKey("End");
            writer.WriteDateTime(m_end);
        }
Example #4
0
        protected override void WriteAmf3(IExternalWriter writer)
        {
            WriteBase(writer);
            WriteScene(writer);
            WriteShape(writer);
            WriteOther(writer);
            WritePet(writer);

            writer.WriteKey("ActionState");
            writer.WriteInt((int)AState);

            //writer.WriteKey("ShiZhuangSkin");
            //writer.WriteUTF(ShiZhuangSkin);
            //writer.WriteKey("SZSkin");
            //writer.WriteUTF("SZSkin");
            //writer.WriteKey("PID");
            //writer.WriteInt(this.PID);

            if (m_teamJob != TeamJob.NoTeam)
            {
                if (m_team != null)
                {
                    writer.WriteKey("TeamJob");
                    writer.WriteInt((int)m_teamJob);
                    writer.WriteKey("TeamID");
                    writer.WriteUTF(m_team.TeamID);
                }
            }
            if (m_yellowTime > DateTime.UtcNow)
            {
                writer.WriteKey("Yellow");
                writer.WriteDateTime(m_yellowTime);
            }
            if (m_redTime > DateTime.UtcNow)
            {
                writer.WriteKey("Red");
                writer.WriteDateTime(m_redTime);
            }
        }