gametips.lua 949 B

12345678910111213141516171819202122232425262728293031323334
  1. GameTips = {}
  2. local this = {}
  3. GameTips.Type = {
  4. -- 默认
  5. default = 0,
  6. -- 月卡礼包
  7. month_gift = 1,
  8. }
  9. ---@param actor table 玩家对象
  10. ---@param reward table 奖励参数[itemid, count]
  11. function GameTips.sendGetRewardMsg(actor, reward)
  12. this.sendGetRewardMsg(actor, reward)
  13. end
  14. function GameTips.sendGetRewardMsgWithParam(actor, reward, type, param)
  15. this.sendGetRewardMsgWithParam(actor, reward, type, param)
  16. end
  17. ---------------------------------------------------
  18. function this.sendGetRewardMsg(actor, param)
  19. sendluamsg(actor, LuaMessageIdToClient.RES_SEND_GET_REWARD_MSG, param)
  20. end
  21. function this.sendGetRewardMsgWithParam(actor, reward, type, param)
  22. if not type then
  23. GameTips.sendGetRewardMsg(actor, reward)
  24. return
  25. end
  26. local data = { ['type'] = type, ['param'] = param, ['reward'] = reward }
  27. sendluamsg(actor, LuaMessageIdToClient.RES_COMMON_REWARD_PANEL_WITH_PARAM, data)
  28. end