Files

210 lines
14 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 21. 4月 2023 13:41
%%%-------------------------------------------------------------------
-module(step_up_recruit_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 = step_up_recruit_data
,lua_name = step_up_recruit_data
,desc = "阶段伙伴招募数据"
,source = "step_up_recruit_data.xml"
,target = "step_up_recruit_data.erl"
,inc = []
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{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}}
,{rand_class, cb_fun, handle, {tuple_type, ["召唤库"], group_id, [class_id, type, weight, must_not_in_m_times]}}
, {rand_type, cb_fun, handle, {get_tuple, ["召唤库"], class_id, type}}
, {group_items, cb_fun, handle, {record_type, ["召唤随机库"], group_id, new_map, all}}
, {{is_best, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, is_best}}
, {class_type, cb_fun, handle, {get_tuple, ["召唤库"], class_id, type}}
, {{must_hit_in_m_times, "0"}, cb_fun, handle, {get_tuple, ["召唤库"], class_id, must_hit_in_m_times}}
,{server_must_class, cb_fun, handle, {tuple_type, ["召唤库"], group_id, [class_id, type, hit_must_in_server_times]}}
, {{group_must, "undefined"}, cb_fun, handle, {get_record, ["必出伙伴召唤"], [group_id, num], new_map, all}}
, {{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}}
, {reward_items, cb_fun, handle, {get_record, ["达成奖励"], [camp_id, turn], new_map, all}}
, {sign_in, cb_fun, handle, {get_record, ["签到"], [camp_id, day], new_map, all}}
%% , {good_luck_reward, cb_fun, handle, {record_list, ["幸运星"], new_map, all}}
,{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, ["直购商城"]}}
,{{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}}
,{probability, cb_fun_lua, handle, {type_get_val, ["概率展示"], [group_id,index], all}}
,{interface, cb_fun_lua, handle, {key_val, ["界面显示"], [group_id], all}}
, {reward_items, cb_fun_lua, handle, {key_val, ["达成奖励"], [reward_id], all}}
,{privilege_data, cb_fun_lua, handle, {key_val, ["直购商城"], id, all}}
%% ,{good_luck_reward, cb_fun_lua, handle, {key_val, ["幸运星"], reward_num, all}}
,{awards, cb_fun_lua, handle, {list_val, ["排行榜奖励"], 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}}
,{probability, cb_fun_json, handle, {type_get_val, ["概率展示"], [group_id,index], all}}
,{interface, cb_fun_json, handle, {key_val, ["界面显示"], [group_id], all}}
, {reward_items, cb_fun_json, handle, {type_get_val, ["达成奖励"], [camp_id, turn], all}}
, {sign_in, cb_fun_json, handle, {type_get_val, ["签到"], [camp_id, day], all}}
,{privilege_data, cb_fun_json, handle, {key_val, ["直购商城"], id, all}}
%% ,{good_luck_reward, cb_fun_json, handle, {key_val, ["幸运星"], reward_num, all}}
,{awards, 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 = term, name = group_id, mod = all}
, #f_column{desc = "奖励描述", type = str, name = desc, mod = client}
,#f_column{type = term, name = start_time1, desc = "活动预告开始时间", add_list_sign = false, comment=TimeComment, mod = all}
,#f_column{type = term, name = end_time1, desc = "活动预告结束时间", add_list_sign = false, comment=TimeComment, mod = all}
,#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{type = term, name = start_time3, desc = "活动展示开始时间", add_list_sign = false, comment=TimeComment, mod = all}
,#f_column{type = term, name = end_time3, desc = "活动展示结束时间", add_list_sign = false, comment=TimeComment, mod = all}
, #f_column{desc = "活动预告海报资源id", type = bstr, name = ziyuan_id, mod = client}
, #f_column{desc = "最终获得伙伴id", type = term, name = reward, mod = all}
, #f_column{desc = "主题伙伴id", type = int, name = partner_bid, mod = all}
, #f_column{desc = "资源目录", type = bstr, name = res_paths, mod = client}
, #f_column{desc = "商城配置", type = int, name = shop_camp_id, mod = client}
, #f_column{desc = "商城背景", type = bstr, name = shop_bg, 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 = "10抽消耗道具", type = term, name = loss_item_ten, 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 = "10抽额外奖励", type = term, name = gain_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 = 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 = 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 = 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 = bstr, name = star, 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 = group_id, desc = "召唤编号", mod = client}
,#f_column{type = bstr, name = label_name, desc = "标签名", mod = client}
,#f_column{type = int, name = item1_id, desc = "物品1基础id", mod = client}
,#f_column{type = int, name = item2_id, desc = "物品2基础id", mod = client}
,#f_column{type = int, name = item3_id, desc = "物品3基础id", mod = client}
,#f_column{type = bstr, name = content, desc = "内容", mod = client}
,#f_column{type = bstr, name = color, desc = "字体颜色", mod = client}
,#f_column{type = term, name = diamond_show, desc = "钻石显示", mod = client}
,#f_column{type = term, name = item_show, desc = "道具显示", mod = client}
]}
, {["必出伙伴召唤"],
[#f_column{desc = "召唤编号", type = int, name = group_id}
, #f_column{desc = "召唤次数", type = int, name = num}
, #f_column{desc = "召唤伙伴道具Id", type = term, name = id}
]}
, {["达成奖励"],
[#f_column{desc = "活动ID", type = int, name = camp_id, mod = all}
,#f_column{desc = "奖励id", type = int, name = reward_id, mod = all}
, #f_column{desc = "目标轮次", type = int, name = turn, mod = all}
, #f_column{desc = "奖励", type = term, name = reward, mod = all}
]}
,{["直购商城"], [
#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 = float, name = loss, desc = "消耗", 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 = reward_num, desc = "每日奖励人数", mod = all}
%% ,#f_column{type = term, name = reward_id, desc = "奖励id", mod = all}
%% ,#f_column{type = term, name = extract_time, desc = "每日抽取时间", add_list_sign = false, comment=TimeComment, mod = all}
%% ,#f_column{type = bstr, name = content, desc = "规则描述", mod = client}
%% ,#f_column{type = bstr, name = skin_image_id, desc = "皮肤立绘id", mod = client}
%% ]}
, {["排行榜奖励"],
[#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}
]}
, {["签到"],
[#f_column{desc = "活动ID", type = int, name = camp_id, mod = all}
,#f_column{desc = "天数", type = int, name = day, mod = all}
, #f_column{desc = "奖励", type = term, name = reward, mod = all}
]}
]
}.
get(limit_type) ->
[
{"永久限购", 0}
, {"日限购", 1}
];
get(_) ->
[].