源战役
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 rivejä
1.5 KiB

4 viikkoa sitten
  1. -define(TODAY, 0). % 今天
  2. -define(YESTERDAY, 1). % 昨天
  3. -define(B_YESTERDAY, 2). % 前天
  4. -define(RESOURCE_BACK_OPEN_LV, 20). % 开放等级
  5. -define(STATE_NOT_FIND, 0). % 未找回
  6. -define(STATE_FIND, 1). % 已找回
  7. -define(STATE_FINISHED, 2). % 已完成
  8. %% 资源找回配置
  9. -record(base_res_act, {
  10. act_id = 0, % 模块id
  11. act_sub = 0, % 模块子id
  12. type = 0, % 找回类型
  13. level = 0, % 等级需求
  14. level_max = 0,
  15. server_min_lv = 0,
  16. server_max_lv = 0,
  17. name = "", % 名字
  18. dun_id = 0, % 副本id(副本类型找回 需通关的副本id)
  19. guild_limit = 0, % 公会限制(1:需要公会 0:不需要)
  20. coin_per = [], % 金币消耗
  21. coin_goods = [], % 金币对应奖励
  22. coin_exp = 0,
  23. gold_per = [], % 绑钻消耗
  24. gold_goods = [], % 绑钻对应奖励
  25. gold_exp = 0
  26. }).
  27. -record(resource_back, {
  28. cleartime = 0, %% 结算时间
  29. res_act_map = #{} %% #{?DayType => #{actid => #res_act{} }}
  30. }).
  31. -record(res_act, {
  32. act_id = 0, %% 模块id
  33. act_sub = 0, %% 模块子id
  34. lefttimes = 0, %% 剩余次数
  35. max = 0, %% 最大次数
  36. state = ?STATE_NOT_FIND %% 状态
  37. }).
  38. -define(SQL_BATCH_REPLACE_RES_BACK, "replace into `resource_back`(player_id, cleartime, daytype, act_list) values").
  39. -define(SQL_BATCH_REPLACE_VALUES, <<"(~p, ~p, ~p, '~s') ">>).
  40. -define(SQL_SELECT_RES_BACK, "select cleartime,daytype,act_list from `resource_back` where player_id=~p ").