Files

119 lines
7.1 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 联盟远航数据配置文件
%% @author
%%----------------------------------------------------
-module(shipping_data).
-export([cfg/0, get/1]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = shipping_data
,lua_name = shipping_data
,desc = "联盟远航配置数据"
,source = "shipping_data.xml"
,target = "shipping_data.erl"
,inc = []
,callback =
[
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
, {rand_list, cb_fun, handle, {tuple_list, ["订单信息"], [rand_id, pro, max_count, must_no_count]}}
, {rand_list2, cb_fun, handle, {tuple_list, ["订单信息"], [rand_id, must_pro, max_count, must_no_count]}}
, {rand_list3, cb_fun, handle, {tuple_list, ["订单信息"], [rand_id, f_pro, max_count, must_no_count]}}
, {get_must_no_count, cb_fun, handle, {get_tuple, ["订单信息"], rand_id, must_no_count}}
, {get_pro_damping, cb_fun, handle, {get_tuple, ["订单信息"], rand_id, pro_damping}}
, {order_rand_list, cb_fun, handle, {tuple_type, ["订单随机库"], rand_id, [id, pro]}}
, {get_order_condition, cb_fun, handle, {get_tuple, ["订单基础"], id, condition}}
, {get_order_limit_num, cb_fun, handle, {get_tuple, ["订单基础"], id, limit_num}}
, {get_order_need_time, cb_fun, handle, {get_tuple, ["订单基础"], id, need_time}}
, {get_order_expend, cb_fun, handle, {get_tuple, ["订单基础"], id, expend}}
, {get_order_award, cb_fun, handle, {get_tuple, ["订单基础"], id, award}}
, {get_order_quality, cb_fun, handle, {get_tuple, ["订单基础"], id, quality}}
, {get_condition_info, cb_fun, handle, {get_tuple, ["派遣条件"], id, conition}}
, {get_expend_by_time, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["快速完成价格"], "get_expend_by_time(Time) when Time >= ~ts -> ~ts;", [min, gold]}}
, {get_ref_info, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["钻石刷新价格"], "get_ref_info(VipLev) when VipLev >= ~ts -> {~ts, ~ts, ~ts} ;", [vip_lev, all_times, expend, free_times]}}
]
,callback_cli = [
{const,cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
,{order,cb_fun_lua, handle, {key_val, ["订单基础"], [id], all}}
,{condition,cb_fun_lua, handle, {key_val, ["派遣条件"], [id], all}}
,{quick_cost,cb_fun_lua, handle, {key_val, ["快速完成价格"], [min], all}}
,{refresh,cb_fun_lua, handle, {key_val, ["钻石刷新价格"], [vip_lev], all}}
,{explain, cb_fun_lua, handle, {key_val, ["规则说明"], [id], all}}
]
,callback_json = [
{const,cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{order,cb_fun_json, handle, {key_val, ["订单基础"], [id], all}}
,{condition,cb_fun_json, handle, {key_val, ["派遣条件"], [id], all}}
,{quick_cost,cb_fun_json, handle, {key_val, ["快速完成价格"], [min], all}}
,{refresh,cb_fun_json, handle, {key_val, ["钻石刷新价格"], [vip_lev], all}}
,{explain, cb_fun_json, handle, {key_val, ["规则说明"], [id], 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 = "id", type = int, name = rand_id}
,#f_column{desc = "权重", type = int, name = pro}
,#f_column{desc = "每轮抽取次数上限", type = int, name = max_count}
,#f_column{desc = "保底权重", type = int, name = must_pro}
,#f_column{desc = "初次生成权重", type = int, name = f_pro}
,#f_column{desc = "抽中后M次内必不触发", type = int, val = "0", name = must_no_count}
,#f_column{desc = "每日刷新权重衰减", type = term, val = "[]", name = pro_damping}
]}
,{["订单随机库"],
[
#f_column{desc = "id", type = int, name = rand_id, mod = server}
,#f_column{desc = "订单id", type = int, name = id, mod = server}
,#f_column{desc = "权重", type = int, name = pro, mod = server}
]}
,{["订单基础"],
[
#f_column{desc = "订单id", type = int, name = id, mod = all}
,#f_column{desc = "订单名称", type = str, name = name, mod = all}
,#f_column{desc = "品质", type = kv, kv_type = {?MODULE, get, [quality]}, name = quality, mod = all}
,#f_column{desc = "最大可派遣英雄数量", type = int, name = limit_num, mod = all}
,#f_column{desc = "完成耗时(秒)", type = int, name = need_time, mod = all}
,#f_column{desc = "奖励", type = term, name = award, mod = all}
,#f_column{desc = "遣派条件", type = term, name = condition, mod = all}
,#f_column{desc = "遣派消耗", type = term, name = expend, mod = all}
]}
,{["派遣条件"],[
#f_column{desc = "条件Id", type = int, name = id, mod = all}
,#f_column{desc = "条件", type = term, name = conition, mod = all}
,#f_column{desc = "条件描述", type = str, name = desc, mod = client}
]}
,{["快速完成价格"],[
#f_column{desc = "剩余时间下限", type = int, name = min, mod = all}
,#f_column{desc = "剩余时间上限", type = int, name = max, mod = all}
,#f_column{desc = "消耗蓝钻", type = int, name = gold, mod = all}
]}
,{["钻石刷新价格"],[
#f_column{desc = "vip等级", type = int, name = vip_lev, mod = all}
,#f_column{desc = "刷新次数", type = int, name = all_times, mod = all}
,#f_column{desc = "花费", type = term, name = expend, mod = all}
,#f_column{desc = "每日免费次数", type = int, name = free_times, mod = all}
]}
,{["规则说明"], [
#f_column{type = int, name = id, desc = "标签", primary = true, mod = client}
,#f_column{type = str, name = desc, desc = "内容", mod = client}
]}
]
}.
get(quality) ->
[
{"", 0},
{"绿", 1},
{"", 2},
{"", 3},
{"", 4},
{"", 5}
];
get(_) -> [].