--[[ human.db.absAct[id] = { [buyID] = cnt buyID ��Ӧ�޹����� } ]] local AbsActLogic = require("absAct.AbsActLogic") local AbsActExcel = require("excel.absAct") local BuyExcel = require("excel.buy") local BuyLogic = require("topup.BuyLogic") local SpecialCustomLogic = require("absAct.SpecialCustomLogic") local SevenDayLogic = require("absAct.SevenDayLogic") local DrumBlastingLogic = require("absAct.DrumBlastingLogic") function isOpen(human, YYInfo, funcConfig) local state, endTime, startTime = AbsActLogic.isStarted(human, funcConfig.funcID) if not state then return end local absAct = human.db.absAct[funcConfig.funcID] if absAct and absAct.dayCnt and absAct.dayCnt <= 0 and #absAct.item <= 0 then return false end return true, endTime, startTime end function isActive(human, YYInfo, funcConfig) return not isOpen(human, YYInfo, funcConfig) end -- ���ʣ��˫������ function getDoubleCnt(human, funcID, buyID) local config = AbsActExcel.absActivity[funcID] if not config then return 0 end local doubleConfig = AbsActExcel.doubleCharge[config.actId] if not doubleConfig then return 0 end if not doubleConfig.buyId[buyID] then return 0 end AbsActLogic.checkAbsActClean(human, funcID) local absAct = human.db.absAct[funcID] if not absAct then return 0 end local buyItemConfig = BuyExcel.buy[buyID] -- ���dz�ֵ���򷵻� if buyItemConfig.cmd ~= "topup" then return 0 end absAct.buyID = absAct.buyID or {} absAct.buyID[buyID] = absAct.buyID[buyID] or 4 return absAct.buyID[buyID] end -- 0������ function updateDaily(human, funcID) local state, endTime, starTime = AbsActLogic.isStarted(human, funcID) if not state then return end local config = AbsActExcel.absActivity[funcID] if not config then return end local doubleConfig = AbsActExcel.doubleCharge[config.actId] if not doubleConfig then return 0 end -- ��0��������Ϊ2��˫�� AbsActLogic.checkAbsActClean(human, funcID) local absAct = human.db.absAct[funcID] for buyID,_ in pairs(doubleConfig.buyId) do absAct.buyID = {} absAct.buyID[buyID] = 4 end end -- �ص� -- ��yunyinglogic ������ã��������жϻ�Ƿ��� -- function buyCall(human,id,buyID) local absAct = human.db.absAct[id] absAct.buyID = absAct.buyID or {} absAct.buyID[buyID] = absAct.buyID[buyID] or 4 absAct.buyID[buyID] = absAct.buyID[buyID] - 1 end