Example #1
0
        public static void WriteCharacterStats(this IPacketWriter p, Character c)
        {
            p.WriteInt(c.ID);
            p.WriteString(c.Name, 13);

            p.WriteByte(c.Gender);
            p.WriteByte(c.Skin);
            p.WriteInt(c.Face);
            p.WriteInt(c.Hair);

            c.Pets.ForEach(sn => p.WriteLong(sn));

            p.WriteByte(c.Level);
            p.WriteShort(c.Job);
            p.WriteShort(c.STR);
            p.WriteShort(c.DEX);
            p.WriteShort(c.INT);
            p.WriteShort(c.LUK);
            p.WriteInt(c.HP);
            p.WriteInt(c.MaxHP);
            p.WriteInt(c.MP);
            p.WriteInt(c.MaxMP);

            p.WriteShort(c.AP);
            if (GameConstants.IsExtendSPJob(c.Job)) p.WriteCharacterExtendSP(c);
            else p.WriteShort(c.SP);

            p.WriteInt(c.EXP);
            p.WriteShort(c.POP);

            p.WriteInt(c.TempEXP);
            p.WriteInt(c.FieldID);
            p.WriteByte(c.FieldPortal);
            p.WriteInt(c.PlayTime);
            p.WriteShort(c.SubJob);
        }