Files
fc/server/tools/gen_data/cfg/holiday_theme_pool_data.erl
T

80 lines
5.0 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 主題卡池的數據配置文件
%%----------------------------------------------------
-module(holiday_theme_pool_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = holiday_theme_pool_data
,lua_name = holiday_theme_pool_data
,desc = "配置數據"
,source = "holiday_theme_pool_data.xml"
,target = "holiday_theme_pool_data.erl"
,inc = ["common.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{{get_group, undefined}, cb_fun, handle, {record_type, ["随机库"], group_id, new_map, [id, rewards, weight, rumor]}}
,{get_rand_reward, cb_fun, handle, {get_tuple, ["随机库"], [group_id, id], rewards}}
,{{get_group_const, undefined}, cb_fun, handle, {get_tuple, ["分组常量"], group_id, [prop_id, draw_one, draw_ten, limit, battle_id, point_id]}}
,{{get_group_holiday, 0}, cb_fun, handle, {get_tuple, ["分组常量"], group_id, holiday_id}}
,{{get_trial, "[0,0]"}, cb_fun, handle, {get_tuple, ["分组常量"], battle_id, battle}}
,{get_holidays, cb_fun, handle, {tuple_list, ["分组常量"], [group_id, holiday_id]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{get_rules, cb_fun_lua, handle, {type_get_val, ["玩法说明"], [group_id, id], [title, content]}}
,{group_const, cb_fun_lua, handle, {type_get_val, ["分组常量"], [group_id], all}}
,{exchange_info, cb_fun_lua, handle, {type_get_val, ["直购商城"], [camp_id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{get_rules, cb_fun_json, handle, {type_get_val, ["玩法说明"], [group_id, id], [title, content]}}
,{group_const, cb_fun_json, handle, {type_get_val, ["分组常量"], [group_id], all}}
,{exchange_info, cb_fun_json, handle, {type_get_val, ["直购商城"], [group_id], 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 = bstr, name = desc, desc = "描述", mod = all}
]}
,{["分组常量"], [
#f_column{type = int, name = group_id, desc = "分組", mod = all}
,#f_column{type = int, name = holiday_id, desc = "活動id", mod = all}
,#f_column{type = int, name = prop_id, desc = "專屬道具", mod = all}
,#f_column{type = term, name = draw_one, desc = "單抽消耗", mod = all}
,#f_column{type = term, name = draw_ten, desc = "十連消耗", mod = all}
,#f_column{type = int, name = limit, desc = "限制次數", mod = all}
,#f_column{type = int, name = jump, desc = "商城跳轉", mod = client}
,#f_column{type = int, name = battle_id, desc = "戰鬥預覽編號", mod = all}
,#f_column{type = term, name = battle, desc = "戰鬥預覽", mod = server}
,#f_column{type = int, name = partner_id, desc = "显示伙伴", mod = client}
,#f_column{type = bstr, name = bg, desc = "背景", mod = client}
,#f_column{type = bstr, name = title, desc = "标题", mod = client}
,#f_column{type = bstr, name = effect, desc = "效果描述", mod = client}
,#f_column{type = int, name = point_id, desc = "积分Id", mod = client}
]},
{["随机库"], [
#f_column{type = int, name = group_id, desc = "分組", mod = server}
,#f_column{type = int, name = id, desc = "編號", mod = server}
,#f_column{type = term, name = rewards, desc = "獎勵", mod = server}
,#f_column{type = int, name = weight, desc = "權重", mod = server}
,#f_column{type = int, name = rumor, desc = "傳聞", mod = server}
]},
{["玩法说明"], [
#f_column{type = int, name = group_id, desc = "分組", mod = client}
,#f_column{type = int, name = id, desc = "標籤", mod = client}
,#f_column{type = bstr, name = title, desc = "標籤名", mod = client}
,#f_column{type = bstr, name = content, desc = "內容", mod = client}
]},
{["直购商城"], [
#f_column{type = int, name = group_id, desc = "分組", mod = all},
#f_column{type = int, name = camp_id, desc = "活动id", mod = client}
,#f_column{type = bstr, name = title, desc = "标题", mod = client}
,#f_column{type = bstr, name = bg, desc = "背景", mod = client}
]}
]
}.