Files

200 lines
15 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%----------------------------------------------------
%% 活动召唤配置文件
%% @author yzq
%%----------------------------------------------------
-module(recruit_holiday_lucky_data).
-export([cfg/0, get/1]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
TimeComment = "{reg_day, Day} | {reg_day, Day, OffSetSec} 开服时间 | {年, 月, 日, 时, 分, 秒}",
#data_cfg{
name = recruit_holiday_lucky_data
,lua_name = recruit_holiday_lucky_data
,desc = "活动召唤数据"
,source = "recruit_holiday_lucky_data.xml"
,target = "recruit_holiday_lucky_data.erl"
,inc = []
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get, cb_fun, handle, {get_tuple, ["直购商城"], charge_id, all}}
,{get_num, cb_fun, handle, {get_tuple, ["直购商城"], id, pay_num}}
,{get_gift_list, cb_fun, handle, {list, ["直购商城"]}}
,{get_camp_group, cb_fun, handle, {get_record, ["活动配置"], camp_id, new_map, all}}
,{get_all_camp_id, cb_fun, handle, {tuple_list, ["活动配置"], camp_id}}
,{get_group, cb_fun, handle, {get_record, ["召唤配置"], group_id, new_map, all}}
,{group_items, cb_fun, handle, {record_type, ["召唤随机库"], group_id, new_map, all}}
,{rand_class, cb_fun, handle, {tuple_type, ["召唤库"], group_id, [class_id, type, weight, must_not_in_m_times]}}
,{server_must_class, cb_fun, handle, {tuple_type, ["召唤库"], group_id, [class_id, type, hit_must_in_server_times]}}
, {class_type, cb_fun, handle, {get_tuple, ["召唤库"], class_id, type}}
, {get_reward, cb_fun, handle, {tuple_type, ["保底奖励"], camp_id, [id, times, reward]}}
, {get_reward_by_id, cb_fun, handle, {get_tuple, ["保底奖励"], [camp_id, id], [times, reward, self_reward]}}
, {{is_best, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, is_best}}
, {{must_hit_in_m_times, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, must_hit_in_m_times}}
, {{must_not_hit_in_m_times, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, must_not_hit_in_m_times}}
, {{hit_must_every_m_times, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, hit_must_every_m_times}}
, {get_luck_ids, cb_fun, handle, {tuple_type, ["许愿配置"], camp_id, id}}
, {get_luck_award_id, cb_fun, handle, {tuple_type, ["许愿配置"], id, award_id}}
, {{get_luck_group_id, "0"}, cb_fun, handle, {get_tuple, ["许愿配置"], [camp_id, id], add_pro_group_id}}
, {get_all_luck_group_id, cb_fun, handle, {tuple_list, ["许愿配置"], add_pro_group_id}}
, {{get_luck_bid, "0"}, cb_fun, handle, {get_tuple, ["许愿配置"], [camp_id, id], bid}}
, {{get_luck_id_by_bid, "0"}, cb_fun, handle, {get_tuple, ["许愿配置"], [camp_id, bid], id}}
,{{day_rank_reward, undefined}, cb_fun, handle, {get_fun, ["日排行榜"], "day_rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}}
,{{rank_reward, undefined}, cb_fun, handle, {get_fun, ["总排行榜"], "rank_reward(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [min, max, items]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}}
,{action, cb_fun_lua, handle, {key_val, ["活动配置"], [camp_id], all}}
,{summon, cb_fun_lua, handle, {key_val, ["召唤配置"], [group_id], all}}
,{award, cb_fun_lua, handle, {type_get_val, ["保底奖励"], [camp_id,id], all}}
,{probability, cb_fun_lua, handle, {type_get_val, ["概率展示"], [group_id,index], all}}
,{hero_show, cb_fun_lua, handle, {type_get_val, ["英雄展示"], [group_id,id], all}}
,{wish, cb_fun_lua, handle, {type_get_val, ["许愿配置"], [camp_id,bid], all}}
,{privilege_data, cb_fun_lua, handle, {key_val, ["直购商城"], id, all}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}}
,{action, cb_fun_json, handle, {key_val, ["活动配置"], [camp_id], all}}
,{summon, cb_fun_json, handle, {key_val, ["召唤配置"], [group_id], all}}
,{award, cb_fun_json, handle, {type_get_val, ["保底奖励"], [camp_id,id], all}}
,{probability, cb_fun_json, handle, {type_get_val, ["概率展示"], [group_id,index], all}}
,{hero_show, cb_fun_json, handle, {type_get_val, ["英雄展示"], [group_id,id], all}}
,{wish, cb_fun_json, handle, {type_get_val, ["许愿配置"], [camp_id,bid], all}}
,{privilege_data, cb_fun_json, handle, {key_val, ["直购商城"], id, all}}
,{day_rank_reward, cb_fun_json, handle, {list_val, ["日排行榜"], all}}
,{rank_reward, cb_fun_json, handle, {list_val, ["总排行榜"], all}}
,{desc, 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 = camp_id, mod = all}
,#f_column{desc = "召唤编号", type = int, name = group_id, mod = all}
, #f_column{desc = "奖励描述", type = str, name = desc, mod = client}
,#f_column{type = term, name = start_time2, desc = "活动开始时间", add_list_sign = false, comment=TimeComment, mod = all}
,#f_column{type = term, name = end_time2, desc = "活动预束时间", add_list_sign = false, comment=TimeComment, mod = all}
, #f_column{desc = "资源目录", type = bstr, name = res_paths, mod = client}
, #f_column{desc = "商城跳转", type = int, name = jump, mod = client}
]}
, {["召唤配置"],
[#f_column{desc = "召唤编号", type = int, name = group_id, mod = all}
, #f_column{desc = "召唤名称", type = bstr, name = name, mod = all}
, #f_column{desc = "首抽保底池", type = int, name = first_class_id, mod = server}
, #f_column{desc = "单抽额外奖励", type = term, name = gain_once, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "10抽额外奖励", type = term, name = gain_ten, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "单抽消耗钻石", type = term, name = loss_gold_once, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "10抽消耗钻石", type = term, name = loss_gold_ten, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "单抽消耗道具", type = term, name = loss_item_once, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "10抽消耗道具", type = term, name = loss_item_ten, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "特效动作", type = bstr, name = action_name, mod = client}
, #f_column{desc = "召唤背景", type = bstr, name = call_bg, mod = client}
, #f_column{desc = "卡牌翻牌特效动作", type = bstr, name = action_card_name, mod = client}
, #f_column{desc = "召唤背景特效ID", type = int, name = call_bg_action, mod = client}
, #f_column{desc = "背景资源", type = int, name = res_id, mod = client}
, #f_column{desc = "召唤底图", type = bstr, name = call_bg_card, mod = client}
]}
, {["召唤库"],
[#f_column{desc = "召唤编号", type = int, name = group_id}
, #f_column{desc = "召唤名称", type = bstr, name = name, mod = desc}
, #f_column{desc = "随机库编号", type = int, name = class_id}
, #f_column{desc = "随机库类型", type = kv, name = type, kv_type = [{"道具", 1}, {"伙伴", 2}]}
, #f_column{desc = "权重", type = int, name = weight}
, #f_column{desc = "M次以内必不出", type = int, name = must_not_in_m_times, comment = "0表示不限制", val = "0"}
, #f_column{desc = "全服每N次必触发", type = int, name = hit_must_in_server_times, comment = "0表示不限制", val = "0"}
, #f_column{desc = "首M次抽取必出", type = int, name = must_hit_in_m_times, comment = "0表示不限制", val = "0"}
, #f_column{desc = "首M次抽取必不出", type = int, name = must_not_hit_in_m_times, comment = "首M次抽取必不出"}
, #f_column{desc = "抽中后M次以内必不出", type = int, name = hit_must_not_after_m_times, comment = "抽中之后,要再抽M次之后才可再次中,0表示不限制"}
, #f_column{desc = "每M次抽取必出", type = int, name = hit_must_every_m_times, comment = "每抽M次后必出"}
, #f_column{desc = "是否保底", type = kv, name = is_best, kv_type = bool}
]}
, {["召唤随机库"],
[
#f_column{desc = "编号", type = int, name = id}
, #f_column{desc = "随机库编号", type = int, name = class_id}
, #f_column{desc = "召唤编号", type = int, name = group_id}
, #f_column{desc = "召唤名称", type = bstr, name = group_name, mod = desc}
, #f_column{desc = "物品基础Id", type = int, name = bid, valid_list = [item]}
, #f_column{desc = "物品名称", type = bstr, name = name}
, #f_column{desc = "数量", type = int, name = num}
, #f_column{desc = "权重", type = int, name = weight}
, #f_column{desc = "连抽必出权重", type = int, name = series_must_weight, comment = "连抽必出时使用"}
, #f_column{desc = "M次以内必不出", type = int, name = must_not_in_m_times, comment = "0表示不限制"}
, #f_column{desc = "抽中后M次以内必不出", type = int, name = hit_must_not_after_m_times, comment = "抽中之后,要再抽M次之后才可再次中,0表示不限制"}
, #f_column{desc = "是否传闻", type = kv, name = is_notice, kv_type = bool, comment = "具体由各模块决定实际用途"}
, #f_column{desc = "每M次抽取必出", type = int, name = hit_must_every_m_times, comment = "每抽M次后必出"}
]}
,{["保底奖励"], [
#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 = times, desc = "次数", mod = all}
,#f_column{type = term, name = reward, desc = "奖励", mod = all}
,#f_column{type = term, name = self_reward, desc = "自选奖励内容", val = "[]", mod = all}
]}
,{["概率展示"], [
#f_column{type = int, name = group_id, desc = "召唤编号", mod = client}
,#f_column{type = int, name = index, desc = "id", mod = client}
,#f_column{type = int, name = id, desc = "物品基础ID", mod = client}
,#f_column{type = int, name = num, desc = "数量", mod = client}
,#f_column{type = int, name = is_up, desc = "是否UP", mod = client}
,#f_column{type = bstr, name = star, desc = "星数", mod = client}
,#f_column{type = bstr, name = name, desc = "名称", mod = client}
,#f_column{type = int, name = is_chip, desc = "是否为碎片", mod = client}
,#f_column{type = bstr, name = probability, desc = "概率", mod = client}
]}
,{["英雄展示"], [
#f_column{type = int, name = group_id, desc = "召唤编号", mod = client}
,#f_column{type = int, name = id, desc = "物品基础ID", mod = client}
,#f_column{type = int, name = num, desc = "数量", mod = client}
,#f_column{type = bstr, name = name, desc = "名称", mod = client}
,#f_column{type = bstr, name = probability, desc = "概率", mod = client}
]}
,{["许愿配置"], [
#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 = bid, desc = "许愿伙伴bid", mod = all}
,#f_column{type = int, name = add_pro_group_id, desc = "关联随机库id", mod = server}
,#f_column{type = int, name = award_id, desc = "关联奖励id", mod = server}
,#f_column{type = bstr, name = bg, desc = "召唤背景", mod = client}
,#f_column{type = int, name = sort, desc = "排序", mod = client}
,#f_column{type = bstr, name = action, desc = "动作配置", mod = client}
]}
,{["直购商城"], [
#f_column{type = int, name = id, desc = "ID", mod = all}
,#f_column{type = kv, name = pay_type, desc = "支付方式", kv_type = [{"人民币", 1}, {"钻石", 2}], mod = all}
,#f_column{type = int, name = charge_id, desc = "充值ID", mod = all}
,#f_column{type = kv, name = limit_type, desc = "限购类型", kv_type = {?MODULE, get, [limit_type]}, mod = all}
,#f_column{type = int, name = limit_day, desc = "限购天数", mod = all}
,#f_column{type = term, name = item, desc = "物品", mod = all}
,#f_column{type = int, name = price, desc = "价格", mod = all}
,#f_column{type = int, name = pay_num, desc = "每月购买数量", mod = all}
]}
, {["日排行榜"],
[#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = term, name = items, desc = "奖励", mod = all}
]}
, {["总排行榜"],
[#f_column{type = int, name = min, desc = "排名上限", mod = all}
,#f_column{type = int, name = max, desc = "排名下限", mod = all}
,#f_column{type = term, name = items, desc = "奖励", mod = all}
]}
, {["活动说明"],
[#f_column{type = int, name = id, desc = "标签", mod = all}
,#f_column{type = bstr, name = name, desc = "标签名", mod = all}
,#f_column{type = bstr, name = desc, desc = "内容", mod = all}
]}
]
}.
get(limit_type) ->
[
{"永久限购", 0}
, {"日限购", 1}
];
get(_) ->
[].