示例#1
0
        /// <summary>
        /// 保存所有
        /// </summary>
        public void Save()
        {
            Player player = UnitManager.Instance.GetUnitByIdx(m_char_idx) as Player;

            if (player == null)
            {
                return;
            }

            //保存需要删除的
            if (m_del_mails.Count > 0)
            {
                SQLMailHandle.DeleteMail(m_del_mails, player.db_id);
                m_del_mails.Clear();
            }
            //保存修改的
            if (m_save_mails.Count > 0)
            {
                SQLMailHandle.ModifyMailFlags(m_all_mails, m_save_mails, player.db_id);
                m_save_mails.Clear();
            }

            m_is_dirty       = false;
            m_last_save_time = Time.timeSinceStartup;
        }
        /// <summary>
        /// 保存所有
        /// </summary>
        public void Save()
        {
            //保存需要删除的
            if (m_del_mails.Count > 0)
            {
                SQLMailHandle.DeleteMail(m_del_mails);
            }
            m_del_mails.Clear();

            //保存修改的
            if (m_save_mails.Count > 0)
            {
                SQLMailHandle.ModifyMailFlags(m_all_mails, m_save_mails);
            }

            m_is_dirty       = false;
            m_last_save_time = Time.timeSinceStartup;
        }