155 lines
11 KiB
Erlang
155 lines
11 KiB
Erlang
%%----------------------------------------------------
|
|
%% 神装抽奖
|
|
%% @author yzq
|
|
%%----------------------------------------------------
|
|
-module(holy_eqm_lottery_data).
|
|
-export([cfg/0]).
|
|
-include("data_config.hrl").
|
|
-include("common.hrl").
|
|
cfg() ->
|
|
#data_cfg{
|
|
name = holy_eqm_lottery_data
|
|
,lua_name = holy_eqm_lottery_data
|
|
,desc = "神装抽奖"
|
|
,source = "holy_eqm_lottery_data.xml"
|
|
,target = "holy_eqm_lottery_data.erl"
|
|
,inc = []
|
|
,callback = [
|
|
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
|
|
, {get_group, cb_fun, handle, {get_record, ["祈祷石像配置"], group_id, new_map, all}}
|
|
, {{get_group_free, "0"}, cb_fun, handle, {get_tuple, ["祈祷石像配置"], group_id, free_times}}
|
|
, {{get_group_baodi, "0"}, cb_fun, handle, {get_tuple, ["祈祷石像配置"], group_id, every_baodi_n}}
|
|
, {{get_group_lucky_ids, "[]"}, cb_fun, handle, {get_tuple, ["祈祷石像配置"], group_id, can_set_ids}}
|
|
, {{get_group_lucky_num, "0"}, cb_fun, handle, {get_tuple, ["祈祷石像配置"], group_id, can_set_num}}
|
|
, {{get_day_limit_count, "0"}, cb_fun, handle, {get_tuple, ["祈祷石像配置"], group_id, day_limit_count}}
|
|
, {group_list, cb_fun, handle, {list, ["祈祷石像配置"]}}
|
|
, {rand_class, cb_fun, handle, {tuple_type, ["神像等级"], lev, [class_id, weight, must_hit_times, hit_must_not_after_m_times]}}
|
|
, {group_items1, cb_fun, handle, {record_list, ["奖励配置1"], new_map, all}}
|
|
, {group_items2, cb_fun, handle, {record_list, ["奖励配置2"], new_map, all}}
|
|
, {{group_must, "undefined"}, cb_fun, handle, {get_record, ["固定次数定死奖励配置"], [group_id, draw_type, num], new_map, all}}
|
|
, {rand_baodi_class, cb_fun, handle, {tuple_list, ["保底库"], [class_id, weight]}}
|
|
, {lev_up, cb_fun, handle, {get_tuple, ["神像升级"], lev, [items, open_cond]}}
|
|
, {get_baodi_reward, cb_fun, handle, {tuple_type, ["次数保底奖励"], group_id, [id, times, reward]}}
|
|
, {{get_lucky_items, "[]"}, cb_fun, handle, {tuple_type, ["可许愿道具映射"], group_id, [bid, add_pro]}}
|
|
]
|
|
,callback_cli = [
|
|
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
|
,{group, cb_fun_lua, handle, {key_val, ["祈祷石像配置"], group_id, all}}
|
|
,{wish_show, cb_fun_lua, handle, {key_val, ["许愿神装组显示配置"], [group_id], all}}
|
|
,{wish_id, cb_fun_lua, handle, {type_get_val, ["许愿神装组显示配置"], [type,group_id], [group_id]}}
|
|
,{award, cb_fun_lua, handle, {type_get_val, ["次数保底奖励"], [group_id,id], all}}
|
|
]
|
|
,callback_json = [
|
|
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
|
|
,{group, cb_fun_json, handle, {key_val, ["祈祷石像配置"], group_id, all}}
|
|
,{wish_show, cb_fun_json, handle, {key_val, ["许愿神装组显示配置"], [group_id], all}}
|
|
,{wish_id, cb_fun_json, handle, {type_get_val, ["许愿神装组显示配置"], [type,group_id], [group_id]}}
|
|
,{award, cb_fun_json, handle, {type_get_val, ["次数保底奖励"], [group_id,id], all}}
|
|
,{lev_up, cb_fun_json, handle, {type_get_val, ["神像升级"], [lev], all}}
|
|
,{pro_show, cb_fun_json, handle, {type_get_val, ["概率显示"], [lev, name], all}}
|
|
]
|
|
,sheet = [
|
|
{["常量配置"],
|
|
[#f_column{desc = "键", type = atom, name = key, primary = true, mod = all}
|
|
, #f_column{desc = "值", type = term, name = val, add_list_sign = false, mod = all}
|
|
, #f_column{desc = "描述", type = str, name = desc, mod = all}
|
|
]}
|
|
, {["祈祷石像配置"],
|
|
[#f_column{desc = "编号", type = int, name = group_id, mod = all}
|
|
, #f_column{desc = "石像名称", type = bstr, name = name, mod = all}
|
|
, #f_column{desc = "开启条件", type = int, name = open_cond, mod = all}
|
|
, #f_column{desc = "开启描述", type = bstr, name = open_desc, mod = all}
|
|
, #f_column{desc = "保底奖池所需累计抽奖次数", type = int, name = every_baodi_n, mod = server}
|
|
, #f_column{desc = "单抽道具消耗", type = term, name = loss_item_once, width = 200, comment = "{道具id, 数量}",mod = all}
|
|
, #f_column{desc = "单抽钻石消耗", type = int, name = loss_gold_once, width = 200, mod = all}
|
|
, #f_column{desc = "连抽道具消耗", type = term, name = loss_item_ten, width = 200, comment = "{道具id, 数量}",mod = all}
|
|
, #f_column{desc = "连抽钻石消耗", type = int, name = loss_gold_ten, width = 200, mod = all}
|
|
, #f_column{desc = "单抽兑换获得", type = term, name = gain_once, width = 200, comment = "{道具id, 数量}",mod = all}
|
|
, #f_column{desc = "保底参数", type = int, name = must_n, comment = "保底次数", mod = server}
|
|
, #f_column{desc = "道具预览", type = term, name = award, width = 200, comment = "{道具id, 数量}",mod = client}
|
|
, #f_column{desc = "免费次数", type = int, name = free_times, mod = all}
|
|
, #f_column{desc = "待机特效ID", type = int, name = effect_id, mod = client}
|
|
, #f_column{desc = "折扣图片资源", type = bstr, name = discount_res, mod = client}
|
|
, #f_column{desc = "详细说明内容", type = bstr, name = desc, mod = client}
|
|
, #f_column{desc = "可设置许愿的道具组", type = term, name = can_set_ids, mod = all}
|
|
, #f_column{desc = "可设置许愿最大数量", type = int, name = can_set_num, mod = all}
|
|
, #f_column{desc = "每日钻石抽奖次数上限", type = int, name = day_limit_count, mod = all}
|
|
, #f_column{desc = "石像影子贴图", type = bstr, name = shadow_res, mod = client}
|
|
]}
|
|
, {["神像等级"],
|
|
[
|
|
#f_column{desc = "等级", type = int, name = lev}
|
|
,#f_column{desc = "库编号", type = int, name = class_id}
|
|
, #f_column{desc = "名称", type = bstr, name = name, mod = desc}
|
|
, #f_column{desc = "权重", type = int, name = weight}
|
|
, #f_column{desc = "次数保底", type = int, val = "0", name = must_hit_times}
|
|
, #f_column{desc = "抽中后M次内必不出", type = int, val = "0", name = hit_must_not_after_m_times}
|
|
]}
|
|
, {["神像升级"],
|
|
[
|
|
#f_column{desc = "等级", type = int, name = lev,mod = all}
|
|
,#f_column{desc = "升级消耗", type = term, name = items,mod = all}
|
|
, #f_column{desc = "升级条件", type = int, name = open_cond,mod = all}
|
|
]}
|
|
, {["固定次数定死奖励配置"],
|
|
[#f_column{desc = "石像编号", type = int, name = group_id}
|
|
, #f_column{desc = "祈祷次数", type = int, name = num}
|
|
, #f_column{desc = "召唤伙伴道具Id", type = term, name = id}
|
|
, #f_column{desc = "抽卡类型", type = int, name = draw_type}
|
|
]}
|
|
, {["保底库"],
|
|
[#f_column{desc = "编号", type = int, name = class_id}
|
|
, #f_column{desc = "名称", type = bstr, name = name, mod = desc}
|
|
, #f_column{desc = "权重", type = int, name = weight}
|
|
]}
|
|
, {["奖励配置1"],
|
|
[#f_column{desc = "奖励ID", type = int, name = id}
|
|
, #f_column{desc = "库编号", type = int, name = class_id}
|
|
, #f_column{desc = "物品基础Id", type = int, name = bid, valid_list = [item]}
|
|
, #f_column{desc = "物品名称", type = bstr, name = name}
|
|
, #f_column{desc = "数量", type = int, name = num}
|
|
, #f_column{desc = "权重", type = int, name = weight}
|
|
, #f_column{desc = "M次以内必不出", type = int, name = must_not_in_m_times, comment = "0表示不限制"}
|
|
, #f_column{desc = "抽中后M次以内必不出", type = int, name = hit_must_not_after_m_times, comment = "抽中之后,要再抽M次之后才可再次中,0表示不限制"}
|
|
, #f_column{desc = "是否传闻", type = kv, name = is_notice, kv_type = bool, comment = "具体由各模块决定实际用途"}
|
|
, #f_column{desc = "是否公告", type = kv, name = is_log, kv_type = bool}
|
|
]} , {["奖励配置2"],
|
|
[#f_column{desc = "奖励ID", type = int, name = id}
|
|
, #f_column{desc = "库编号", type = int, name = class_id}
|
|
, #f_column{desc = "物品基础Id", type = int, name = bid, valid_list = [item]}
|
|
, #f_column{desc = "物品名称", type = bstr, name = name}
|
|
, #f_column{desc = "数量", type = int, name = num}
|
|
, #f_column{desc = "权重", type = int, name = weight}
|
|
, #f_column{desc = "M次以内必不出", type = int, name = must_not_in_m_times, comment = "0表示不限制"}
|
|
, #f_column{desc = "抽中后M次以内必不出", type = int, name = hit_must_not_after_m_times, comment = "抽中之后,要再抽M次之后才可再次中,0表示不限制"}
|
|
, #f_column{desc = "是否传闻", type = kv, name = is_notice, kv_type = bool, comment = "具体由各模块决定实际用途"}
|
|
, #f_column{desc = "是否公告", type = kv, name = is_log, kv_type = bool}
|
|
]}
|
|
,{["次数保底奖励"], [
|
|
#f_column{desc = "编号", type = int, name = group_id, mod = all}
|
|
,#f_column{type = int, name = id, desc = "奖励ID", mod = all}
|
|
,#f_column{type = int, name = times, desc = "次数", mod = all}
|
|
,#f_column{type = term, name = reward, desc = "奖励", mod = all}
|
|
]}
|
|
,{["可许愿道具映射"], [
|
|
#f_column{desc = "组id", type = int, name = group_id, mod = all}
|
|
,#f_column{desc = "道具ID", type = int, name = bid, mod = all}
|
|
,#f_column{desc = "权重增加倍率", type = int, name = add_pro, mod = all}
|
|
]}
|
|
,{["许愿神装组显示配置"], [
|
|
#f_column{desc = "组id", type = int, name = group_id, mod = all}
|
|
,#f_column{desc = "名称", type = bstr, name = name, mod = all}
|
|
,#f_column{desc = "图标", type = int, name = icon, mod = all}
|
|
,#f_column{desc = "分类", type = int, name = type, mod = all}
|
|
,#f_column{type = kv, kv_type = quality, name = quality, desc = "显示用品质", mod = all}
|
|
,#f_column{type = bstr, name = type_desc , desc = "显示用神装类型", mod = client}
|
|
,#f_column{type = bstr, name = desc , desc = "显示用描述文案", mod = client}
|
|
]}
|
|
,{["概率显示"], [
|
|
#f_column{desc = "等级", type = int, name = lev, mod = all}
|
|
,#f_column{desc = "名称", type = bstr, name = name, mod = all}
|
|
,#f_column{desc = "概率", type = bstr, name = pro, mod = all}
|
|
]}
|
|
]
|
|
}.
|