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

182 lines
12 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 数据配置文件
%% @author wujinhan<947537249@qq.com>
%%----------------------------------------------------
-module(holiday_personal_gift_data).
-export([cfg/0, get/1]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = holiday_personal_gift_data
,lua_name = holiday_personal_gift_data
,desc = "配置数据"
,source = "holiday_personal_gift_data.xml"
,target = "holiday_personal_gift_data.erl"
,inc = ["common.hrl", "dial.hrl"]
,callback = [
{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~ts", [label,val,desc]}}
,{period_list, cb_fun, handle, {tuple_list, ["周期配置"], [period, start_time, end_time, open_cond]}}
,{get_holiday_day, cb_fun, handle, {get_tuple, ["周期配置"], period, holiday_day}}
,{get_price, cb_fun, handle, {get_tuple, ["价格配置"], charge_id, price}}
,{get_award, cb_fun, handle, {get_tuple, ["礼包配置库"], [id, price], [award, limit_count]}}
,{get_award1, cb_fun, handle, {get_tuple, ["礼包配置库"], id, [award, limit_count]}}
,{list, cb_fun, handle, {list, ["标签类型"]}}
,{lev_range, cb_fun, handle, {get_tuple, ["标签类型"], type, lev_diff}}
,{partner_star_list, cb_fun, handle, {tuple_list, ["标签规则"], partner_star}}
,{eqm_list, cb_fun, handle, {tuple_list, ["标签规则"], eqm}}
,{holy_eqm_list, cb_fun, handle, {tuple_list, ["标签规则"], holy_eqm}}
,{aftifact_list, cb_fun, handle, {tuple_list, ["标签规则"], aftifact}}
,{skill_list, cb_fun, handle, {tuple_list, ["标签规则"], skill}}
,{hallow_lev_list, cb_fun, handle, {tuple_list, ["标签规则"], hallow_lev}}
,{hallow_refine_list, cb_fun, handle, {tuple_list, ["标签规则"], hallow_refine}}
,{halidom_list, cb_fun, handle, {tuple_list, ["标签规则"], halidom}}
,{guild_skill_list, cb_fun, handle, {tuple_list, ["标签规则"], guild_skill}}
,{partner_star_lable, cb_fun, handle, {get_tuple, ["标签规则"], partner_star, [id, name]}}
,{eqm_lable, cb_fun, handle, {get_tuple, ["标签规则"], eqm, [id, name]}}
,{holy_eqm_lable, cb_fun, handle, {get_tuple, ["标签规则"], holy_eqm, [id, name]}}
,{aftifact_lable, cb_fun, handle, {get_tuple, ["标签规则"], aftifact, [id, name]}}
,{skill_lable, cb_fun, handle, {get_tuple, ["标签规则"], skill, [id, name]}}
,{hallow_lev_lable, cb_fun, handle, {get_tuple, ["标签规则"], hallow_lev, [id, name]}}
,{hallow_refine_lable, cb_fun, handle, {get_tuple, ["标签规则"], hallow_refine, [id, name]}}
,{halidom_lable, cb_fun, handle, {get_tuple, ["标签规则"], halidom, [id, name]}}
,{guild_skill_lable, cb_fun, handle, {get_tuple, ["标签规则"], guild_skill, [id, name]}}
,{{partner_score, "0"}, cb_fun, handle, {get_tuple, ["英雄星级"], [bid, star], score}}
,{{eqm_score, "0"}, cb_fun, handle, {get_tuple, ["基础装备"], set_id, score}}
,{{holy_eqm_score, "0"}, cb_fun, handle, {get_tuple, ["神装"], [set_id, star, eqm_jie], price}}
,{{holy_eqm_one_score, "0"}, cb_fun, handle, {get_tuple, ["神装"], [set_id, star, eqm_jie], one_price}}
,{{aftifact_score, "0"}, cb_fun, handle, {get_tuple, ["符文"], bid, score}}
,{{skill_score, "0"}, cb_fun, handle, {get_tuple, ["天赋技能"], bid, score}}
,{{hallow_lev_score, "0"}, cb_fun, handle, {get_tuple, ["神器等级"], lev, score}}
,{{hallow_refine_score, "0"}, cb_fun, handle, {get_tuple, ["神器精炼"], lev, score}}
,{{halidom_score, "0"}, cb_fun, handle, {get_tuple, ["圣物等级"], lev, score}}
,{{guild_skill_score, "0"}, cb_fun, handle, {get_tuple, ["公会技能"], [id, num], score}}
,{vip_range, cb_fun, handle, {tuple_list, ["VIP等级范围"], range}}
,{vip_list, cb_fun, handle, {tuple_list, ["VIP等级范围"], id}}
,{{vip_id, "0"}, cb_fun, handle, {get_tuple, ["VIP等级范围"], range, id}}
,{{award, "undefined"}, cb_fun, handle, {get_tuple, ["礼包配置库"], [label1, vip_id], [id, limit_count, lev_min, lev_max]}}
]
,callback_cli = [
{price, cb_fun_lua, handle, {key_val, ["价格配置"], [price], all}}
,{gift_warehouse, cb_fun_lua, handle, {key_val, ["礼包配置库"], [id], [price,award,limit_count,name]}}
]
,callback_json = [
{price, cb_fun_json, handle, {key_val, ["价格配置"], [price], all}}
,{gift_warehouse, cb_fun_json, handle, {key_val, ["礼包配置库"], [id], [price,award,limit_count,name]}}
]
,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 = period, desc = "周期", mod = all}
,#f_column{type = term, name = start_time, desc = "开启时间", add_list_sign = false, mod = all}
,#f_column{type = term, name = end_time, desc = "结束时间", add_list_sign = false, mod = all}
,#f_column{type = term, name = open_cond, desc = "开启条件", mod = all}
,#f_column{type = int, name = holiday_day, desc = "活动持续天数", mod = all}
]},
{["标签类型"], [
#f_column{type = kv, name = type, kv_type = {?MODULE, get, [type]}, desc = "类型", mod = all}
,#f_column{type = term, name = lev_diff, desc = "世界等级差异", mod = all}
]},
{["标签规则"], [
#f_column{type = int, name = id, desc = "唯一id", mod = all}
,#f_column{type = bstr, name = name, desc = "标签名", mod = all}
,#f_column{type = term, name = partner_star, desc = "英雄星级", add_list_sign = false, mod = all}
,#f_column{type = term, name = eqm, desc = "基础装备", add_list_sign = false, mod = all}
,#f_column{type = term, name = holy_eqm, desc = "神装", add_list_sign = false, mod = all}
,#f_column{type = term, name = aftifact, desc = "符文", add_list_sign = false, mod = all}
,#f_column{type = term, name = skill, desc = "天赋技能", add_list_sign = false, mod = all}
,#f_column{type = term, name = hallow_lev, desc = "神器等级", add_list_sign = false, mod = all}
,#f_column{type = term, name = hallow_refine, desc = "神器精炼", add_list_sign = false, mod = all}
,#f_column{type = term, name = halidom, desc = "圣物等级", add_list_sign = false, mod = all}
,#f_column{type = term, name = guild_skill, desc = "公会技能", add_list_sign = false, mod = all}
]},
{["VIP等级范围"], [
#f_column{type = int, name = id, desc = "分组编号", mod = all}
,#f_column{type = term, name = range, desc = "VIP等级范围", add_list_sign = false, mod = all}
,#f_column{type = int, name = price, desc = "礼包价格", mod = all}
]},
{["礼包配置库"], [
#f_column{type = int, name = id, desc = "id", mod = all}
,#f_column{type = int, name = label1, desc = "标签id1", mod = all}
,#f_column{type = int, name = label2, desc = "标签id2", val = "0", mod = all}
,#f_column{type = int, name = label3, desc = "标签id3", val = "0", mod = all}
,#f_column{type = int, name = vip_id, desc = "VIP等级分组", mod = all}
,#f_column{type = int, name = lev_min, desc = "世界等级最小值", mod = all}
,#f_column{type = int, name = lev_max, desc = "世界等级最大值", mod = all}
,#f_column{type = int, name = price, desc = "礼包价格", mod = all}
,#f_column{type = int, name = limit_count, desc = "限购次数", mod = all}
,#f_column{type = term, name = award, desc = "奖励内容", mod = all}
,#f_column{type = bstr, name = name, desc = "礼包名称", mod = all}
,#f_column{type = bstr, name = dec, desc = "礼包描述", mod = all}
]},
{["价格配置"], [
#f_column{type = int, name = charge_id, desc = "支付id", mod = all}
,#f_column{type = int, name = price, desc = "礼包价格", mod = all}
]},
{["英雄星级"], [
#f_column{type = int, name = bid, desc = "英雄Bid", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = star, desc = "星级", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["基础装备"], [
#f_column{type = int, name = set_id, desc = "装备基础id", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["神装"], [
#f_column{type = int, name = set_id, desc = "神装bid", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = star, desc = "星级", mod = all}
,#f_column{type = int, name = eqm_jie, desc = "品阶", mod = all}
,#f_column{type = int, name = price, desc = "价值", mod = all}
,#f_column{type = int, name = one_price, desc = "洗炼一次价值", mod = all}
]},
{["符文"], [
#f_column{type = int, name = bid, desc = "符文bid", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["天赋技能"], [
#f_column{type = int, name = bid, desc = "技能id", mod = all}
,#f_column{type = bstr, name = name, desc = "名称", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["神器等级"], [
#f_column{type = int, name = lev, desc = "等级", mod = all}
,#f_column{type = int, name = score, desc = "累计经验值", mod = all}
]},
{["神器精炼"], [
#f_column{type = int, name = lev, desc = "精炼等级", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["圣物等级"], [
#f_column{type = int, name = lev, desc = "等级", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]},
{["公会技能"], [
#f_column{type = int, name = id, desc = "编号", mod = all}
,#f_column{type = int, name = num, desc = "圈数", mod = all}
,#f_column{type = int, name = score, desc = "评分", mod = all}
]}
]
}.
get(type) ->
[
{"英雄星级", 1},
{"装备", 2},
{"神装", 3},
{"符文", 4},
{"天赋技能", 5},
{"神器等级", 6},
{"神器精炼", 7},
{"圣物", 8},
{"公会技能", 9}
].