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

91 lines
2.5 KiB

  1. %%%------------------------------------
  2. %%% @Module : live_skill.hrl
  3. %%% @Author : zzy
  4. %%% @Created : 2018-10-17
  5. %%% @Description: 生活技能
  6. %%%------------------------------------
  7. -define(COOK_OPEN_LV, 160). %%烹饪开放等级
  8. -define(TYPE_FISH_SKILL, 1). %%钓鱼技能
  9. -define(TYPE_WOOD_SKILL, 2). %%伐木技能
  10. -define(TYPE_IRON_SKILL, 3). %%采石技能
  11. -define(TYPE_STONE_SKILL, 4). %%采矿技能
  12. -define(TYPE_COOK_SKILL, 5). %%烹饪技能
  13. -define(TYPE_EQUIP_SKILL, 6). %%打造技能
  14. -define(EQUIP_DATA_TYPE, [1, 2, 3]). %%家具材料类型(发成物品,家具转为家园内部数据)
  15. %%ps记录
  16. -record(status_live_skill,{
  17. skill_list = [],
  18. cook_list = [], %%食谱激活的食物类型id[食物类型id]
  19. equip_list = [] %%打造纸激活的打造类型id[打造类型id]
  20. }).
  21. %%生活技能
  22. -record(live_skill, {
  23. skill_type = 0, %%技能类型
  24. lv = 0, %%等级
  25. exp = 0 %%熟练度
  26. }).
  27. %% ---------------------------------------------------------------------------
  28. %% 配置定义
  29. %% ---------------------------------------------------------------------------
  30. %%食物种类配置
  31. -record(base_cook_type, {
  32. type_id = 0,
  33. kind = 0,
  34. name = "",
  35. need_lv = 0,
  36. good_id = 0,
  37. time = 0,
  38. add_exp = 0,
  39. cost_live = 0,
  40. cost = []
  41. }).
  42. %%食物配置
  43. -record(base_food,{
  44. food_id = 0,
  45. type_id = 0,
  46. name = "",
  47. need_lv = 0,
  48. weight = []
  49. }).
  50. %%家具种类配置
  51. -record(base_furniture_type, {
  52. type_id = 0,
  53. kind = 0,
  54. name = "",
  55. need_lv = 0,
  56. good_id = 0,
  57. time = 0,
  58. add_exp = 0,
  59. cost_live = 0,
  60. cost_res = [], %% 资源消耗
  61. cost = []
  62. }).
  63. %%家具表
  64. -record(base_furniture, {
  65. furniture_id = 0,
  66. type_id = 0,
  67. name = "",
  68. need_lv = 0,
  69. prosperity = 0, %% 繁荣度
  70. area = [],
  71. map_id = 0, %% 放置面 1 地面 2 右侧墙 3 左侧墙
  72. weight = []
  73. }).
  74. %% ---------------------------------------------------------------------------
  75. %% sql定义
  76. %% ---------------------------------------------------------------------------
  77. -define(sql_replace_live_skill_info, "replace into `role_live_skill_info`(role_id, cook_list, equip_list) VALUES (~p, '~s', '~s') ").
  78. -define(sql_select_live_skill_info, "select cook_list, equip_list from `role_live_skill_info` where `role_id`= ~p ").
  79. %%只存放烹饪和打造
  80. -define(sql_replace_live_skill, "replace into `role_live_skill`(role_id, skill_type, lv, exp) VALUES (~p, ~p, ~p, ~p) ").
  81. -define(sql_select_live_skill, "select skill_type, lv, exp from `role_live_skill` where `role_id`= ~p ").