GuildRedPacketManager = {} local this = GuildRedPacketManager -- 默认未检查公会红包 this.isCheck=false function this.Initialize() end -- 检查公会红包红点 function this.CheckGuildRedPacketRedPoint() -- Log(""..tostring(this.isCheck).."") -- if this.isCheck then -- return this.isCheck -- else -- return false -- end local list=MyGuildManager.GetMyGuidRedPackage() if list then LogRed("检测发红包红点") for key, value in pairs(list) do if value and value.num and value.num>0 then return true end end end return false end function this.CheckIsCanGetPackage() -- NetManager.GetAllRedPacketResponse(function(msg) -- -- local data={} -- -- for i,v in ipairs(msg.info) do -- -- table.insert(data,v) -- -- end -- local dataLength=#msg.info -- LogError("+++++++++++++++ "..dataLength ) -- if dataLength>0 then -- return true -- end -- return false -- end) LogError("can send package num:"..MyGuildManager.PackageNum) if MyGuildManager.PackageNum>0 then Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged) return true else Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged) return false end end return this