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

68 lines
2.9 KiB

  1. %%%-------------------------------------------------------------------
  2. %%% @author tyl
  3. %%% @doc
  4. %%% 社团协助头文件
  5. %%% @end
  6. %%% Created : 2021-03-15
  7. %%%-------------------------------------------------------------------
  8. %% 玩家进程dict感谢信和记录相关key
  9. -define(P_GUILD_SUPPORT_THANK, guild_support_thank). % 公会协助礼包
  10. -define(P_GUILD_SUPPORT_LOG, guild_support_log). % 公会协助记录
  11. %% 感谢信/感谢记录类型
  12. -define(THANK_TYPE_SUPPORT, 1).
  13. -define(THANK_TYPE_ORDER, 2).
  14. %% 协助进度状态
  15. -define(SUPPORT_NOT_STAR, 0). %% 协助未开始
  16. -define(SUPPORT_ON_GOING, 1). %% 协助进行中
  17. -define(SUPPORT_FINISH, 2). %% 协助已完成
  18. -define(SUPPORT_SEND_REWARD, 3). %% 已推送奖励
  19. %% 每日最大协助奖励次数
  20. -define(SUPPORT_MAX_COUNT, 9999). %% 默认值
  21. -define(SUPPORT_HUSONG_MAX_COUNT, 3). %% 护送
  22. %% 请求者和协助者身份状态是否冲突
  23. -define(NOT_CONFLICT, 0). %% 不冲突(例如社团采集)
  24. -define(IS_CONFLICT, 1). %% 冲突(例如幻魔)
  25. %% 退出场景是否取消协助
  26. -define(OUT_SCENE_NOT_CANCEL, 0). %% 不取消(例如社团采集)
  27. -define(OUT_SCENE_CANCEL, 1). %% 取消(例如幻魔)
  28. %% 协助是否成功
  29. -define(SUPPORT_FAIL, 0). %% 协助失败(例如超时等)
  30. -define(SUPPORT_SUCCESS, 1). %% 协助成功
  31. -define(SUPPORT_CANCEL, 2). %% 协助取消
  32. %% 感谢礼包
  33. -record(guild_thank_packet, {
  34. ask_id = 0,
  35. support_id = 0,
  36. role_list = [],
  37. support_cfg_id = 0,
  38. content = [],
  39. is_send = 0, %% 是否已经发送感谢
  40. time = 0
  41. }).
  42. %% 协助记录(需求请求者先发送感谢)
  43. -record(guild_thank_log, {
  44. ask_id = 0,
  45. support_id = 0,
  46. support_cfg_id = 0,
  47. content = [],
  48. chat_msg = "",
  49. is_receive = 0, %% 是否已经领取奖励
  50. time = 0
  51. }).
  52. -define(SAVE_SUPPORT_THANK, <<"REPLACE INTO guild_support_thank (`support_id`, `guild_id`, `ask_id`,`support_cfg_id`,`role_list`,`content`,`is_send`,`time`) VALUES (~p, ~p, ~p, ~p, '~ts', '~ts', ~p, ~p)">>).
  53. -define(SELECT_SUPPORT_THANK, <<"SELECT `support_id`,`guild_id`,`ask_id`,`support_cfg_id`,`role_list`,`content`,`is_send`,`time` FROM guild_support_thank WHERE `ask_id` = ~p and `time` > ~p">>).
  54. -define(DELETE_SUPPORT_THANK, <<"DELETE FROM guild_support_thank WHERE `time` < ~p">>).
  55. -define(BATCH_SAVE_SUPPORT_LOG, <<"REPLACE INTO guild_support_log (`support_id`,`guild_id`,`role_id`,`ask_id`,`support_cfg_id`,`content`,`chat_msg`,`is_receive`,`time`) VALUES ~ts">>).
  56. -define(BATCH_SAVE_SUPPORT_LOG_VALUE, <<"(~p, ~p, ~p, ~p, ~p, '~ts', '~ts', ~p, ~p)">>).
  57. -define(SELECT_SUPPORT_LOG, <<"SELECT `support_id`,`guild_id`,`role_id`,`ask_id`,`support_cfg_id`,`content`,`chat_msg`,`is_receive`,`time` FROM guild_support_log WHERE `role_id` = ~p and `time` > ~p">>).
  58. -define(DELETE_SUPPORT_LOG, <<"DELETE FROM guild_support_log WHERE `time` < ~p">>).