Pārlūkot izejas kodu

删除无用的代码

gitxsm 9 mēneši atpakaļ
vecāks
revīzija
b4da724428

+ 1 - 1
script/module/role/CreateRole.lua

@@ -27,6 +27,7 @@ local MailManager = require("mail.MailManager")
 local TriggerLogic = require("trigger.TriggerLogic")
 local TriggerDefine = require("trigger.TriggerDefine")
 local RoleStorageBox = require("roleSystem.RoleStorageBox")
+local DataCache = require("core.DataCache")
 
 local ROLE_NAME_LEN_MAX = 21
 local ROLE_NAME_LEN_MIN = 5
@@ -135,7 +136,6 @@ function createNewRole(human)
 	ObjHuman.onLogin(human, true)
     createRoleSettingUp(human)
 
-	local DataCache = require("core.DataCache")
 	DataCache.Insert_PlayerUuidList(human.db._id, human.db.lv)
 
 	-- 特定渠道用户创角时发送的邮件

+ 0 - 76
script/module/role/RoleDBLogic.lua

@@ -607,10 +607,6 @@ end
 function roleDBInit()
     _G.collectgarbage("step", 1000000)
 
-
-	-- local repeatTb = {}
-
-
     LuaMongo.find(DB.db_char)
     local list = {}
     local all = 0
@@ -623,78 +619,6 @@ function roleDBInit()
         roleDBchanged = nil
         handleNew(data, newAddDBData)
 
-
-		--老账号暂时特殊处理下
-		-- if not data.newUniqueTag then
-		-- 	data.newUniqueTag = Generateuuid(MUZI_CHANNEL_ID, data.account, Config.NEW_SVR_INDEX)
-		-- 	LuaMongo.update(DB.db_char, {_id = data._id}, data)
-		-- end
-
-		-- --老账号暂时特殊处理下
-		-- if data.newUniqueTag then
-		-- 	local t = Util.split(data.newUniqueTag, "|")
-		-- 	if #t < 3 then
-		-- 		data.newUniqueTag = Generateuuid(MUZI_CHANNEL_ID, data.account, Config.NEW_SVR_INDEX)
-		-- 		LuaMongo.update(DB.db_char, {_id = data._id}, data)
-		-- 	end
-
-
-		-- 	--异常数据处理
-
-		-- 	--只处理当前合服过的区服
-		-- 	-- if Config.SVR_INDEX < NO_MERGE_SERVER_IDX then
-		-- 	-- 	--角色原本所在服的标识
-		-- 	-- 	local svrIndex = data.svrIndex
-
-		-- 	-- 	local old_svrIndex = svrIndex - SERVER_START_IDX
-		-- 	-- 	local now_svrIndex = tonumber(t[2])
-
-		-- 	-- 	if now_svrIndex ~= old_svrIndex then
-
-		-- 	-- 		--重新生成正确UTag
-		-- 	-- 		data.newUniqueTag = Generateuuid(MUZI_CHANNEL_ID, data.account, old_svrIndex)
-
-		-- 	-- 		if repeatTb[data.newUniqueTag] then
-		-- 	-- 			if Util.isSameDay(data.createTime) then
-		-- 	-- 				local ok, err = pcall(LuaMongo.remove, DB.db_char, {_id = data._id})
-		-- 	-- 				if ok then
-		-- 	-- 					print("删除成功")
-		-- 	-- 				end
-		-- 	-- 			end
-		-- 	-- 		else
-		-- 	-- 			repeatTb[data.newUniqueTag] = 1
-
-		-- 	-- 			local res, err = pcall(LuaMongo.update, DB.db_char, {_id = data._id}, data)
-		-- 	-- 			if not res then
-		-- 	-- 				print("更新失败", err)
-		-- 	-- 			end
-		-- 	-- 		end
-
-		-- 	-- 	end
-
-
-
-		-- 	-- 	if repeatTb[data.newUniqueTag] then
-		-- 	-- 		if Util.isSameDay(data.createTime) then
-		-- 	-- 			local ok, err = pcall(LuaMongo.remove, DB.db_char, {_id = data._id})
-		-- 	-- 			if ok then
-		-- 	-- 				print("删除成功")
-		-- 	-- 			end
-		-- 	-- 		end
-		-- 	-- 	else
-		-- 	-- 		repeatTb[data.newUniqueTag] = 1
-
-		-- 	-- 		-- local res, err = pcall(LuaMongo.update, DB.db_char, {_id = data._id}, data)
-		-- 	-- 		-- if not res then
-		-- 	-- 		-- 	print("更新失败", err)
-		-- 	-- 		-- end
-		-- 	-- 	end
-
-		-- 	-- end
-
-
-		-- end
-
         if roleDBchanged then
         	list[#list + 1] = data._id
         end