Esempio n. 1
0
 /// <summary>
 /// 外形信息:
 /// Mount/Body/Weapon/Coat/IsCoat
 /// </summary>
 /// <param name="writer"></param>
 public void WriteShape(IExternalWriter writer)
 {
     writer.WriteKey("Nicename");
     writer.WriteUTF(Nicename);
     writer.WriteKey("Mount");
     writer.WriteUTF(Mount);
     writer.WriteKey("Body");
     writer.WriteUTF(Body);
     writer.WriteKey("Weapon");
     writer.WriteUTF(Weapon);
     writer.WriteKey("Coat");
     writer.WriteUTF(Coat);
     writer.WriteKey("IsCoat");
     writer.WriteBoolean(IsCoat);
 }
Esempio n. 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);
        }
Esempio n. 3
0
        protected override void WriteAmf3(IExternalWriter writer)
        {
            Variant v = m_pet.Value;
            writer.WriteKey("ID");
            writer.WriteUTF(m_pet.ID);
            if (m_style != 2)
            {
                writer.WriteKey("PlayerID");
                writer.WriteUTF(m_pet.PlayerID);
            }

            if (m_style == 0)
            {
                writer.WriteKey("PlayerName");
                writer.WriteUTF(m_name);

                writer.WriteKey("CurSkill");
                writer.WriteUTF(m_pet.CurSkill);

                writer.WriteKey("Name");
                writer.WriteUTF(m_pet.Name);
                writer.WriteKey("Skin");
                writer.WriteUTF(v.GetStringOrDefault("Skin"));
                writer.WriteKey("PetsID");
                writer.WriteUTF(v.GetStringOrDefault("PetsID"));

                writer.WriteKey("IsWar");
                writer.WriteBoolean(m_pet.IsWar);

                writer.WriteKey("X");
                writer.WriteInt(m_pet.CurPoint.X);

                writer.WriteKey("Y");
                writer.WriteInt(m_pet.CurPoint.Y);

                writer.WriteKey("PetsRank");
                writer.WriteInt(v.GetIntOrDefault("PetsRank"));

                writer.WriteKey("PetsLevel");
                writer.WriteInt(m_level);

                writer.WriteKey("MoFa");
                writer.WriteValue(v.GetVariantOrDefault("MoFa"));

                writer.WriteKey("ShengMing");
                writer.WriteValue(v.GetVariantOrDefault("ShengMing"));
                    ;
                writer.WriteKey("SkillList");
                writer.WriteValue(v.GetVariantOrDefault("Skill"));

                writer.WriteKey("GroupName");
                writer.WriteUTF(m_pet.GroupName);

                writer.WriteKey("Fatigue");
                writer.WriteValue(m_fatigue);

                writer.WriteKey("FightDeath");
                writer.WriteInt(m_pet.FightDeath.Count);
            }
            if (m_style == 2)
            {
                writer.WriteKey("FightDeath");
                writer.WriteInt(m_pet.FightDeath.Count);
            }
        }