Exemplo n.º 1
0
        public static void DoDestroyBangHui(DBManager dbMgr, int bhid)
        {
            lock (Global.BangHuiMutex)
            {
                DBWriter.DeleteBangHui(dbMgr, bhid);
                GameDBManager.BangHuiJunQiMgr.RemoveBangHuiJunQi(bhid);
                DBWriter.ClearAllRoleBangHuiInfo(dbMgr, bhid);
                List <DBRoleInfo> dbRoleInfoList = dbMgr.DBRoleMgr.GetCachingDBRoleInfoListByFaction(bhid);
                if (null != dbRoleInfoList)
                {
                    for (int i = 0; i < dbRoleInfoList.Count; i++)
                    {
                        dbRoleInfoList[i].Faction = 0;
                        dbRoleInfoList[i].BHName  = "";
                        dbRoleInfoList[i].BHZhiWu = 0;
                    }
                }
            }
            DBWriter.ClearBHLingDiByID(dbMgr, bhid);
            GameDBManager.BangHuiLingDiMgr.ClearBangHuiLingDi(bhid);
            ZhanMengShiJianManager.getInstance().onZhanMengJieSan(bhid);
            string gmCmdData = string.Format("-synclingdi", new object[0]);

            ChatMsgManager.AddGMCmdChatMsg(-1, gmCmdData);
        }
Exemplo n.º 2
0
        public static void ClearBangHuiLingDi(DBManager dbMgr, int bhid)
        {
            lock (Global.BangHuiMutex)
            {
                GameDBManager.BangHuiJunQiMgr.RemoveBangHuiJunQi(bhid);
            }
            DBWriter.ClearBHLingDiByID(dbMgr, bhid);
            GameDBManager.BangHuiLingDiMgr.ClearBangHuiLingDi(bhid);
            string gmCmdData = string.Format("-synclingdi", new object[0]);

            ChatMsgManager.AddGMCmdChatMsg(-1, gmCmdData);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 执行删除帮会的操作
        /// </summary>
        /// <param name="dbMgr"></param>
        public static void DoDestroyBangHui(DBManager dbMgr, int bhid)
        {
            lock (Global.BangHuiMutex)
            {
                //删除帮会信息
                //根据帮会ID删除帮会
                DBWriter.DeleteBangHui(dbMgr, bhid);

                //删除内存字典中的军旗
                GameDBManager.BangHuiJunQiMgr.RemoveBangHuiJunQi(bhid);

                //清空所有指定帮会用户的帮会信息
                DBWriter.ClearAllRoleBangHuiInfo(dbMgr, bhid);

                List <DBRoleInfo> dbRoleInfoList = dbMgr.DBRoleMgr.GetCachingDBRoleInfoListByFaction(bhid);
                if (null != dbRoleInfoList)
                {
                    for (int i = 0; i < dbRoleInfoList.Count; i++)
                    {
                        dbRoleInfoList[i].Faction = 0;
                        dbRoleInfoList[i].BHName  = "";
                        dbRoleInfoList[i].BHZhiWu = 0;
                        //dbRoleInfoList[i].BGDayID1 = 0;
                        //dbRoleInfoList[i].BGMoney = 0;
                        //dbRoleInfoList[i].BGDayID2 = 0;
                        //dbRoleInfoList[i].BGGoods = 0;
                        dbRoleInfoList[i].BangGong = 0;
                    }
                }
            }

            //清空某个帮会占领的领地列表
            DBWriter.ClearBHLingDiByID(dbMgr, bhid);

            //清空指定帮会的领地
            GameDBManager.BangHuiLingDiMgr.ClearBangHuiLingDi(bhid);

            //清空战盟事件
            ZhanMengShiJianManager.getInstance().onZhanMengJieSan(bhid);
        }