源战役
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.

57 line
1.8 KiB

  1. %% ------------------------
  2. %% @doc :合成机头文件
  3. %% author :hh
  4. %% time :20/12/22
  5. %% ------------------------
  6. %% 常规抽奖(不按配方)
  7. -record (base_printer_draw, {
  8. id = 0, %% 唯一id
  9. item_suit = 0, %% 主题道具id
  10. exchange_item = 0 %% 物品id
  11. }).
  12. %% 配方合成配置
  13. -record (base_printer_draw_list, {
  14. id = 0, %% 唯一id
  15. exchange = [], %% 兑换消耗
  16. pic = 0, %% 物品图标
  17. item_suit = 0, %% 主题道具id
  18. name = "", %% 物品名
  19. pool = 0 %% 奖池id
  20. }).
  21. %% 配方合成奖池配置
  22. -record (base_printer_draw_pool, {
  23. id = 0, %% 唯一id
  24. pool = 0, %% 奖池id
  25. pool_type = 0, %% 主题套件
  26. opday = 0, %% 开服天数
  27. goods = [], %% 奖池奖励
  28. weight = 0 %% 权重
  29. }).
  30. -record (printer_draw_state, {
  31. act_info = [], %% 开放的活动列表
  32. draw_list = [], %% 首次解锁的配方列表 [{sub_type, [{role_id, id, time},...]}]
  33. cd_list = [] %% 冷却检查 [{sub_type, [{提问时间,第一个回答时间}]}]
  34. }).
  35. % -define (FORMULA, 1). %% 配方
  36. % -define (NORMAL_FORM, 2). %% 常规
  37. -define (FORMULA_LOCK, 1). %% 未解锁
  38. -define (FORMULA_UNLOCK, 2). %% 已解锁
  39. -define (SQL_SELECT_PRINT_DRAW,
  40. <<"SELECT sub_type, role_id, id, time FROM printer_draw">>).
  41. -define (SQL_REPLACE_PRINT_DRAW,
  42. <<"REPLACE INTO printer_draw SET sub_type = ~p, role_id = ~p, id = ~p, time = ~p">>).
  43. -define (SQL_DELETE_PRINT_DRAW_WITH_TYPE,
  44. <<"DELETE FROM printer_draw WHERE sub_type in ~s">>).
  45. -define (SQL_DELETE_PRINT_DRAW,
  46. <<"DELETE FROM printer_draw">>).