123456789101112131415161718192021222324252627282930313233343536373839404142 |
- RedPoint = {}
- RedPoint.__index = RedPoint
- local this = {}
- local function sendMsg(actor, data)
- sendluamsg(actor, LuaMessageIdToClient.RES_COMMON_RED_POINT_MESSAGE, data)
- end
- -- 发送红点通用协议
- function RedPoint.SendRedPoint(actor, data)
- sendMsg(actor, data)
- end
- function RedPoint.sendOneRedPoint(actor, id, is_show)
- local data = { [id] = is_show }
- sendMsg(actor, data)
- end
- -- 登录时执行
- function RedPoint.login(actor)
- this.checkRedPoint(actor)
- end
- function this.checkRedPoint(actor)
- local red_data = {}
- RedPointEventListerTable:triggerEvent("0", red_data, actor)
- -- 每日目标红点信息
- --red_data[RedPoint.IdConst.DAILY_ACTIVITY] = DailyActivity.hasBoxUnReceived(actor)
- -- 勇气试炼红点信息
- --red_data[RedPoint.IdConst.BRAVE_TEST] = BraveTest.CheckEnter(actor)
- --red_data[RedPoint.IdConst.COMBO_TEST] = ComboTest.CheckEnter(actor)
- -- 大天使圣杯红点信息
- --red_data[RedPoint.IdConst.ANGEL_MAJOR_GRAIL] = AngelMajorGrail.checkEnter(actor)
- EventListerTable.print("上线触发小红点", actor, red_data)
- sendMsg(actor, red_data)
- end
- --- 事件注册
- LoginEventListerTable:eventLister("0", "红点通用协议登录事件", RedPoint.login)
|