源战役
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

183 líneas
9.6 KiB

hace 4 semanas
  1. %%%------------------------------------------------
  2. %%% File : record.hrl
  3. %%% Author : xyao
  4. %%% Created : 2011-12-13
  5. %%% Description: 物品相关信息
  6. %%% map 存储所有物品 key 为背包位置 value 是该背包内的所有物品dict格式
  7. %%% 普通背包取消cell
  8. %%%
  9. %%%------------------------------------------------
  10. %% 物品状态表:存于进程字典
  11. -record(goods_status, {
  12. player_id = 0 %% 用户ID
  13. , player_lv = 0 %% 用户等级
  14. , dict = #{} %% 物品maps
  15. , cell_num = 0 %% 背包格子大小
  16. , storage_num = 0 %% 仓库格子大小
  17. , temp_bag = #{} %% 增加物品时,需要的背包大小
  18. }).
  19. %% 玩家物品记录
  20. %% 获得时初始化:lib_goods_util:get_new_goods/1
  21. %% 玩家数据加载时初始化:lib_goods_util:make/2
  22. -record(goods, {
  23. id=0, %% 物品Id
  24. player_id=0, %% 角色Id
  25. goods_id=0, %% 物品类型Id,对应ets_goods_type.goods_id
  26. type=0, %% 物品类型
  27. subtype=0, %% 物品子类型
  28. bind=0, %% 绑定状态,0非绑定,1绑定
  29. bag_location=0, %% 物品配置应当存放的背包位置, 见def_goods.hrl
  30. location=0, %% 物品所在位置, 见def_goods.hrl
  31. cell=0, %% 物品所在格子位置
  32. num=0, %% 物品数量
  33. expire_time=0, %% 有效期,0为无
  34. color=0, %% 物品颜色
  35. ctime = 0, %% 物品获得时间(创建):第一次使用程序时间:后面使用数据库的创建记录时间(时间有点误差)
  36. extra_data = [] %% 一般以[{key, value}|_]格式存储,或者不同物品类型自定义
  37. ,level=0 %% 物品等级
  38. }).
  39. %% 吞噬
  40. -record(status_devour, {
  41. lv = 0,
  42. exp = 0,
  43. is_auto = 1,
  44. active_lv = 0,
  45. attr = []
  46. }).
  47. %%物品类型记录
  48. -record(ets_goods_type, {
  49. goods_id = 0, %% 物品类型Id
  50. goods_name = <<>>, %% 物品名称
  51. type = 0, %% 物品类型
  52. subtype = 0, %% 物品子类型
  53. bind=0, %% 绑定状态,0非绑定,1绑定
  54. bag_location = 4, %% 物品存放的背包位置
  55. use = 0, %% 是否在背包使用,0默认不可使用,1可使用
  56. compose = 0, %% 是否在背包合成,0默认不可使用,1可合成
  57. sell = 0, %% 是否在背包出售,0为不可出售,1为可出售
  58. drop = 1, %% 是否可丢弃,0为不可丢弃,1为可丢弃
  59. quick_use = 0, %% 是否获得立即使用,0不立即使用,1立即使用
  60. level=0, %% 等级限制
  61. max_overlap=0, %% 可叠加数:0为不可叠加
  62. color=0, %% 物品颜色:0白色 1绿色 2蓝色 3紫色 4橙色 5红装
  63. expire_type = 0, %% 过期类型:0无类型 1开服天数 2合服天数
  64. expire_time=0, %% 有效期,0为无
  65. model_id = 0, %% 模型资源id
  66. jump = 0, %% 是否可以跳转:0否;1是
  67. sell_category = 0, %% 交易市场商品类型
  68. sell_subcategory = 0, %% 交易市场商品子类型
  69. trade_price=0, %% 交易底价(为0时无底价)
  70. price_markup = 0, %% 交易每次加价价格
  71. buyout_price = 0, %% 交易一口价(为0时无一口价)
  72. market_show_time = 0, %% 公示时间-上架多久后可交易(秒)
  73. selling_time = 0, %% 上架时间-可交易多长时间(秒)
  74. is_to_market = 0, %% 是否会流入世界拍卖(当上架公会拍卖流拍时是否能流入世界拍卖,1是0否)
  75. market_range = 0, %% 可上架区域,0表示社团和世界都可以上架,1表示只能上架世界,2表示只能上架社团
  76. sex=0, %% 性别限制,0为不限,1为男,2为女
  77. %% 不用
  78. career=0, %% 职业限制:0为不限 前端用
  79. base_attrlist=[] %% 基础属性 前端用
  80. }).
  81. %% 物品价格表(不经常修改)
  82. -record(goods_price, {
  83. goods_id = 0, %% 物品类型id
  84. price_type = 1, %% 价格类型:0:物品(一般物品出售不配为物品);1:钻石;2:绑定钻石;3金币;4:公会贡献
  85. price = 0, %% 购买价格
  86. sell_price_type = 3, %% 出售价格类型
  87. sell_price = 0 %% 出售价格
  88. }).
  89. %% 快速购买价格
  90. -record(quick_buy_price, {
  91. goods_type_id = 0,
  92. gold_price = 0,
  93. bgold_price = 0,
  94. coin_price = 0,
  95. consume_type = unknown
  96. }).
  97. %% 物品分解配置
  98. -record(goods_decompose_cfg, {
  99. goods_id = 0, %% 物品类型id
  100. module = 0, %% 功能id
  101. irregular_num = 0, %% 随机材料能获得的种类
  102. irregular_mat = [], %% 分解获得的随机材料
  103. regular_num = 0, %% 固定材料种类
  104. regular_mat = [] %% 分解获得的固定材料 [{type, goods_id, num}]
  105. }).
  106. %% 物品效果
  107. -record(goods_effect, {
  108. goods_id = 0, %% 物品类型ID
  109. goods_type = 0, %% 道具类型:0,即一次性道具;1BUFF道具
  110. buff_type = 0, %% BUFF类型ID
  111. effect_list = [], %% 效果[{coin,铜钱},{gold,元宝},{onhook_time, 1|2|5小时},{renet_day, Day}...]
  112. time = 0, %% 持续时长(秒)
  113. limit_type = 0, %% 限制类型:0无限制,1每日限制,2每周限制,3终生限制
  114. counter_module = 0, %% 次数所属模块ID
  115. counter_id = 0, %% 次数ID
  116. limit_scene = [] %% BUFF或者道具可使用和生效的场景ID
  117. }).
  118. %% 物品兑换规则
  119. -record(goods_exchange_cfg, {
  120. id = 0, %% 兑换规则id
  121. type = 0, %% 兑换类型
  122. role_lv = 0, %% 需要的玩家等级
  123. max_role_lv = 0, %% 最大玩家等级
  124. cost_list = [], %% 消耗的物品列表
  125. obtain_list = [], %% 获得的物品列表
  126. lim_type = 0, %% 次数限制类型 0: 不限制 1: 每天限制 2: 每周限制 3: 终身限制
  127. module = 0, %% 模块id
  128. sub_module = 0, %% 模块子功能id
  129. lim_num = 0, %% 限制兑换数量
  130. condition = [] %% 兑换开启条件[{Type, Value}], {Type:atom; Value:term}
  131. }).
  132. -define(SHOW_TIPS_0, 0). %% 0不飘
  133. -define(SHOW_TIPS_1, 1). %% 1右下角飘字
  134. -define(SHOW_TIPS_2, 2). %% 2聊天频道消息
  135. -define(SHOW_TIPS_3, 3). %% 3右下角飘字 + 聊天频道消
  136. %% 产出
  137. -record(produce, {
  138. type = undefined :: atom(), %% 类型
  139. subtype = 0, %% 子类型
  140. title = "", %% 标题[背包不足]
  141. content = "", %% 邮件[背包不足]
  142. off_title = "", %% 不在线标题(off_title或off_content为"",则取title和content的内容)
  143. off_content = "", %% 不在线标题
  144. module = 0,
  145. module_sub = 0,
  146. reward = [], %% 奖励
  147. remark = "", %% 备注
  148. show_tips = 3 %% 是否飘提示:0不飘|1右下角飘字|2聊天频道消息|3右下角飘字 + 聊天频道消
  149. }).
  150. %% 消耗额外参数
  151. -record(cost_log_about, {
  152. type = 0, %% 消费类型 商城为3
  153. data = [], %% 自定义类型
  154. remark = "" %% 备注
  155. }).
  156. %% 进化合成配置
  157. -record(base_goods_compose_or_evolution_info, {
  158. rule_id = 0 %% 规则id
  159. , target_goods_id %% 目标物品id
  160. , classify_id %% 合成分类
  161. , subclass %% 合成子类
  162. , condition %% 合成条件
  163. , main_goods_id %% 主材料id
  164. , cost_goods %% 消耗物品
  165. , cost_money %% 消耗钱财
  166. , base_ratio %% 初始成功率
  167. , show_tv %% 是否传闻
  168. }).