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

100 lines
6.5 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 材料制作活动配置文件
%% @author yzq
%%----------------------------------------------------
-module(holiday_make_data).
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = holiday_make_data
,lua_name = holiday_make_data
,desc = "材料制作活动"
,source = "holiday_make_data.xml"
,target = "holiday_make_data.erl"
,inc = ["common.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{make, cb_fun, handle, {get_tuple, ["制作物品"], [camp_id, id], [lev, limit, loss, exp]}}
,{reward_group, cb_fun, handle, {get_fun, ["物品奖励库"], "reward_group({~ts, OpenDay}) when OpenDay >= ~ts andalso OpenDay =< ~ts -> ~ts;", [camp_id, min, max, group_id]}}
,{reward, cb_fun, handle, {get_tuple, ["物品奖励"], [group_id, id], reward}}
,{lev_list, cb_fun, handle, {tuple_type, ["制作物品"], camp_id, [id, lev]}}
,{lev_exp, cb_fun, handle, {get_tuple, ["等级奖励"], [camp_id, lev], exp}}
,{lev_reward, cb_fun, handle, {get_tuple, ["等级奖励"], [camp_id, lev], reward}}
,{unit_reward, cb_fun, handle, {get_tuple, ["活动配置"], camp_id, [award, drop_id]}}
,{combat_num, cb_fun, handle, {get_tuple, ["活动配置"], camp_id, combat_num}}
,{buy_limit, cb_fun, handle, {get_tuple, ["活动配置"], camp_id, [buy_limit, buy_loss]}}
,{get_unit, cb_fun, handle, {get_fun, ["怪物难度"], "get_unit({~ts, Power}) when Power >= ~ts andalso Power =< ~ts -> {~ts, ~ts};", [camp_id, min, max, unit_id, recommend]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{make_list, cb_fun_lua, handle, {type_get_val, ["制作物品"], [camp_id,id], all}}
,{make_reward_list, cb_fun_lua, handle, {type_get_val, ["物品奖励"], [group_id,id], all}}
,{make_lev_list, cb_fun_lua, handle, {type_get_val, ["等级奖励"], [camp_id,lev], all}}
,{collect_list, cb_fun_lua, handle, {type_get_val, ["活动配置"], [camp_id], all}}
,{master_diff_list, cb_fun_lua, handle, {type_get_val, ["怪物难度"], [camp_id,id], all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}}
,{make_list, cb_fun_json, handle, {type_get_val, ["制作物品"], [camp_id,id], all}}
,{make_reward_list, cb_fun_json, handle, {type_get_val, ["物品奖励"], [group_id,id], all}}
,{make_lev_list, cb_fun_json, handle, {type_get_val, ["等级奖励"], [camp_id,lev], all}}
,{collect_list, cb_fun_json, handle, {type_get_val, ["活动配置"], [camp_id], all}}
,{master_diff_list, cb_fun_json, handle, {type_get_val, ["怪物难度"], [camp_id,id], all}}
]
,sheet = [
{["常量配置"],[
#f_column{type = term, name = key, desc = "常量标识", add_list_sign = false,mod = all}
,#f_column{type = term, name = val, desc = "常量值", add_list_sign = false,mod= all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
]}
,{["活动配置"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = combat_num, desc = "每日可挑战次数", mod = all}
,#f_column{type = term, name = award, desc = "固定奖励", val = "[]", mod = all}
,#f_column{type = term, name = drop_id, desc = "掉落奖励", val = "[]", mod = all}
,#f_column{type = bstr, name = desc, desc = "描述", mod = client}
,#f_column{type = int, name = buy_limit, desc = "购买次数上限", mod = all}
,#f_column{type = term, name = buy_loss, desc = "购买消耗", mod = all}
]}
,{["怪物难度"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = min, desc = "战力下限", mod = all}
,#f_column{type = int, name = max, desc = "战力上限", mod = all}
,#f_column{type = int, name = unit_id, desc = "怪物ID", mod = all}
,#f_column{type = int, name = recommend, desc = "推荐战力", val = "0", mod = client}
,#f_column{type = int, name = id, desc = "ID", mod = all}
]}
,{["制作物品"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = id, desc = "Id", mod = all}
,#f_column{type = int, name = lev, desc = "制作等级", mod = all}
,#f_column{type = int, name = limit, desc = "可制作次数", mod = all}
,#f_column{type = term, name = loss, desc = "制作材料", mod = all}
,#f_column{type = int, name = exp, desc = "获得经验", mod = all}
,#f_column{type = bstr, name = name, desc = "奖励名称", mod = all}
]}
,{["物品奖励库"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = min, desc = "开服天数下限", mod = all}
,#f_column{type = int, name = max, desc = "开服天数上限", mod = all}
,#f_column{type = int, name = group_id, desc = "奖励库ID", mod = all}
]}
,{["物品奖励"], [
#f_column{type = int, name = group_id, desc = "奖励库ID", mod = all}
,#f_column{type = int, name = id, desc = "Id", mod = all}
,#f_column{type = term, name = reward, desc = "制作奖励", mod = all}
]}
,{["等级奖励"], [
#f_column{type = int, name = camp_id, desc = "活动ID", mod = all}
,#f_column{type = int, name = lev, desc = "制作等级", mod = all}
,#f_column{type = int, name = exp, desc = "解锁经验", mod = all}
,#f_column{type = bstr, name = name, desc = "解锁道具", mod = all}
,#f_column{type = term, name = reward, desc = "等级奖励", mod = all}
,#f_column{type = bstr, name = unlock_name, desc = "解锁名字", mod = all}
]}
]
}.