98 lines
5.3 KiB
Erlang
98 lines
5.3 KiB
Erlang
%%%-------------------------------------------------------------------
|
|
%%% @author Administrator
|
|
%%% @copyright (C) 2024, <COMPANY>
|
|
%%% @doc
|
|
%%%
|
|
%%% @end
|
|
%%% Created : 01. 4月 2024 10:52
|
|
%%%-------------------------------------------------------------------
|
|
-module(sprite_party_data).
|
|
-author("Administrator").
|
|
|
|
|
|
-export([cfg/0]).
|
|
-include("data_config.hrl").
|
|
-include("common.hrl").
|
|
cfg() ->
|
|
#data_cfg{
|
|
name = sprite_party_data
|
|
,lua_name = sprite_party_data
|
|
,desc = "配置數據"
|
|
,source = "sprite_party_data.xml"
|
|
,target = "sprite_party_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_rand_id, cb_fun, handle, {tuple_type, ["随机库"], group_id, [rand_id, weight]}}
|
|
,{{get_group_const, undefined}, cb_fun, handle, {get_tuple, ["分组常量"], group_id, [prop_id, draw_one, draw_ten, limit, point_id]}}
|
|
,{{get_group_holiday, 0}, cb_fun, handle, {get_tuple, ["分组常量"], holiday_id, group_id}}
|
|
%% ,{{get_trial, "[0,0]"}, cb_fun, handle, {get_tuple, ["分组常量"], battle_id, battle}}
|
|
,{get_holidays, cb_fun, handle, {tuple_list, ["分组常量"], [group_id, holiday_id]}}
|
|
,{get_reward_list, cb_fun, handle, {tuple_type, ["达成奖励"], group_id, num}},
|
|
{get_reward, cb_fun, handle, {get_tuple, ["达成奖励"], [group_id, num], rewards}}
|
|
]
|
|
,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}}
|
|
]
|
|
,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}}
|
|
,{reward, cb_fun_json, handle, {type_get_val, ["达成奖励"], [group_id, num], 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 = bstr, name = bg, desc = "背景", mod = client}
|
|
,#f_column{type = int, name = point_id, desc = "积分Id", mod = client}
|
|
,#f_column{type = term, name = one_point_num, desc = "单抽积分", mod = client}
|
|
,#f_column{type = term, name = ten_point_num, desc = "十连积分", mod = client}
|
|
,#f_column{type = term, name = award, desc = "奖池", add_list_sign = false, mod = client}
|
|
,#f_column{type = int, name = min_num, desc = "大奖循环", mod = client}
|
|
,#f_column{type = int, name = max_num, desc = "大奖循环", mod = client}
|
|
]},
|
|
{["随机库"], [
|
|
#f_column{type = int, name = group_id, desc = "分組", mod = server}
|
|
,#f_column{type = int, name = id, desc = "編號", mod = server}
|
|
,#f_column{type = int, name = rand_id, desc = "随即库id", mod = server}
|
|
,#f_column{type = int, name = weight, desc = "權重", mod = server}
|
|
]},
|
|
{["子随机库"], [
|
|
#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 = num, desc = "达成次数", mod = all}
|
|
,#f_column{type = term, name = rewards, desc = "奖励", mod = all}
|
|
,#f_column{type = bstr, name = res_id, desc = "资源", mod = client}
|
|
]}
|
|
]
|
|
}.
|
|
|
|
|