Exemplo n.º 1
0
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        writer.write_int(id);
        writer.write_str(name);
        writer.write_int(level);
        writer.write_long(exp);
        writer.write_int(prof);
        writer.write_int(cur_hp);
        writer.write_int(cur_mp);
        ushort lenproperty_list = (ushort)property_list.Count;

        writer.write_short(lenproperty_list);
        for (int i_property_list = 0; i_property_list < lenproperty_list; i_property_list++)
        {
            st.net.NetBase.property listData = property_list[i_property_list];
            listData.toBinary(writer);
        }
        ushort lenequip_id_list = (ushort)equip_id_list.Count;

        writer.write_short(lenequip_id_list);
        for (int i_equip_id_list = 0; i_equip_id_list < lenequip_id_list; i_equip_id_list++)
        {
            uint listData = equip_id_list[i_equip_id_list];
            writer.write_int(listData);
        }
        writer.write_int(camp);
        ushort lenresource_list = (ushort)resource_list.Count;

        writer.write_short(lenresource_list);
        for (int i_resource_list = 0; i_resource_list < lenresource_list; i_resource_list++)
        {
            st.net.NetBase.resource_list listData = resource_list[i_resource_list];
            listData.toBinary(writer);
        }
        writer.write_str(guild_name);
        ushort lenmodel_clothes_id = (ushort)model_clothes_id.Count;

        writer.write_short(lenmodel_clothes_id);
        for (int i_model_clothes_id = 0; i_model_clothes_id < lenmodel_clothes_id; i_model_clothes_id++)
        {
            int listData = model_clothes_id[i_model_clothes_id];
            writer.write_int(listData);
        }
        writer.write_int(title_id);
        writer.write_int(sla);
        writer.write_int(magic_weapon_id);
        writer.write_int(magic_strength_lev);
        writer.write_int(magic_strength_star);
        writer.write_int(fiight_score);
        writer.write_int(vip_lev);
        writer.write_int(guild_id);
        return(writer.data);
    }