gitxsm пре 11 месеци
родитељ
комит
e825cda4df
2 измењених фајлова са 5 додато и 18 уклоњено
  1. 1 14
      script/common/CommonDB.lua
  2. 4 4
      script/module/absAct/LotteryByDiamondLogic.lua

+ 1 - 14
script/common/CommonDB.lua

@@ -42,6 +42,7 @@ KEY_COMMERCEACT_INFO = "commerceActInfo"				-- 跨服活动信息
 KEY_JJCLADDER_TIME = "jjcladderEndTime"					-- 天梯赛结束时间
 KEY_COMMERCEACT_MIDDLE_INFO = "commerceMiddleActInfo"	-- 中心服跨服商业活动信息
 KEY_BAN_DATA = "banData"								-- 封禁数据
+KEY_REBATE_DATA = "rebateData"							-- 渠道返利数据
 
 db = db or {
 	serverStartTime = nil,								-- 开服时间
@@ -72,35 +73,21 @@ db = db or {
 	commerceMiddleActInfo = {},							-- 中心服跨服商业活动信息
 }
 
-do
-	if _G.is_middle == true then
-		if not db[KEY_BAN_DATA] then
-			db[KEY_BAN_DATA] = {}
-		end
-	end
-end
 
 --普通服缓存的封禁数据
 local banList = {}
 
 
 
-
 function init()
 	LuaMongo.find(DB.db_common)
 	if not LuaMongo.next(db) then
 		LuaMongo.insert(DB.db_common, db)
 	end
-	if type(db[KEY_BAN_DATA]) ~= "table" then
-		db[KEY_BAN_DATA] = {}
-	end
 end
 
 -- 修改db单个字段
 function updateValue(key, value)
-	if key == KEY_BAN_DATA then
-		print("===========updateValue============", type(value))
-	end
 	if not key then return end	
 	if not db then return end
 	if value then

+ 4 - 4
script/module/absAct/LotteryByDiamondLogic.lua

@@ -70,7 +70,7 @@ function Query(human, id)
 
     --普通奖池
     local nLotteryCostCnt = lottery1CostCnt
-    if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+    if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
         nLotteryCostCnt = 0
     end
 
@@ -129,7 +129,7 @@ function Lottery(human, id, type)
     local targetTotalWeight = comTotalWeight
     local targetPrizeCfg = LotteryCfg[1].prizeData
     if type == 1 then
-        if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+        if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
             actData.lastFreeTime = os.time()
         else
             itemCnt = lottery1CostCnt
@@ -184,7 +184,7 @@ function Lottery(human, id, type)
     msgRet.lotteryTimes = actData.speLotteryTimes or 0
 
     local nLotteryCostCnt = lottery1CostCnt
-    if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+    if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
         nLotteryCostCnt = 0
     end
     Grid.makeItem(msgRet.lottery1cost, lotteryCostID, nLotteryCostCnt)
@@ -202,7 +202,7 @@ function isRed(human, YYInfo, funcConfig)
         return false
     end
 
-    if not tActData.lastFreeTime or not Util.isSameDay(tActData.lastFreeTime) then
+    if not tActData.lastFreeTime or not Util.isSameDayByTimes(tActData.lastFreeTime, os.time()) then
         return true
     end