Files
fc/server/tools/gen_data/cfg/artifact_exchange_data.erl
2026-05-23 22:10:14 +08:00

66 lines
3.7 KiB
Erlang

%%----------------------------------------------------
%% 数据配置文件
%% @author
%%----------------------------------------------------
-module(artifact_exchange_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = artifact_exchange_data
,lua_name = artifact_exchange_data
,desc = "配置数据"
,source = "artifact_exchange_data.xml"
,target = "artifact_exchange_data.erl"
,inc = ["common.hrl","exchange.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{{vip_free, 0}, cb_fun, handle, {get_tuple, ["VIP次数"], vip_lev, free}}
,{{vip_max_num, 0}, cb_fun, handle, {get_tuple, ["VIP次数"], vip_lev, max}}
,{list1, cb_fun, handle, {record_type, ["神器商城随机库1"], tab, new_map, all}}
,{list2, cb_fun, handle, {record_type, ["神器商城随机库2"], [tab, type], new_map, all}}
]
,callback_cli = [
{artifact_exchange_const, cb_fun_lua, handle, {key_val, ["常量配置"], key, all}}
,{vip_lev, cb_fun_lua, handle, {key_val, ["VIP次数"], vip_lev, all}}
]
,callback_json = [
{artifact_exchange_const, cb_fun_json, handle, {key_val, ["常量配置"], key, all}}
,{vip_lev, cb_fun_json, handle, {key_val, ["VIP次数"], vip_lev, all}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = key, desc = "", primary = true, mod = all}
,#f_column{type = term, name = val, desc = "", add_list_sign=false, mod = all}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]},
{["神器商城随机库1"], [
#f_column{type = int, name = tab, desc = "商城类型"}
,#f_column{type = term, name = lv, desc = "等级", add_list_sign = false, mod = all}
,#f_column{type = atom, name = type, desc = "类型", mod = all}
,#f_column{type = int, name = pos, desc = "位置", mod = all}
,#f_column{type = int, name = pro, desc = "概率", mod = all}
]},
{["神器商城随机库2"], [
#f_column{type = int, name = tab, desc = "商城类型", mod = all}
,#f_column{type = term, name = lv, desc = "等级", add_list_sign = false, mod = all}
,#f_column{type = atom, name = type, desc = "类型", mod = all}
,#f_column{type = int, name = item, desc = "物品id", mod = all}
,#f_column{type = bstr, name = itemname, desc = "物品名", mod = all}
,#f_column{type = int, name = item_num, desc = "物品数量", mod = all}
,#f_column{type = int, name = pro, desc = "概率", mod = all}
,#f_column{type = int, name = price, desc = "价格", mod = all}
,#f_column{type = kv, name = pay_type, kv_type = gain_label, desc = "支付类型", mod = all}
,#f_column{type = kv, name = item_type, kv_type = exchange_item_type, desc = "物品类型", mod = all}
,#f_column{type = term, name = discount, desc = "折扣标签", add_list_sign = false, mod = server}
]},
{["VIP次数"], [
#f_column{type = int, name = vip_lev, desc = "VIP等级", mod = all}
,#f_column{type = int, name = free, desc = "免费刷新次数", mod = all}
,#f_column{type = int, name = max, desc = "刷新次数上限", mod = all}
]}
]
}.