local AbsActExcel = require("excel.absAct")
local AbsActLogic = require("absAct.AbsActLogic")
local AbsActDefine = require("absAct.AbsActDefine")
local HeroGrid = require("hero.HeroGrid")

function getConfigByActID(id)
    local actId = AbsActExcel.absActivity[id].actId
    for k,v in pairs(AbsActExcel.heroUp) do
        if v.actID == actId then
            return v
        end
    end
end


function makeBanner(net, id)
   net.heroInfo={}
   local actConfig = getConfigByActID(id)
   if actConfig ~= nil then
       net.heroInfo = {general={[1]={}}}
       HeroGrid.makeHeroSimpleByID(net.heroInfo, actConfig.heroId, nil, nil, nil, true)
   end

   net.ad = AbsActExcel.absActivity[id].adIcon
end


function isOpen(human, YYInfo, funcConfig)
    return AbsActLogic.isStarted(human, funcConfig.funcID)
end

function isRed(human, YYInfo, funcConfig)
    return false
end

function isActive(human, YYInfo, funcConfig)
    return not isOpen(human, YYInfo, funcConfig)
end