Files

79 lines
3.8 KiB
Erlang
Raw Permalink Normal View History

2026-05-23 22:10:14 +08:00
%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2024, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 25. 4月 2024 11:21
%%%-------------------------------------------------------------------
-module(happy_wheel_data).
-author("Administrator").
-include("common.hrl").
-include("data_config.hrl").
%% API
-export([cfg/0]).
cfg() ->
#data_cfg{
name = happy_wheel_data
,lua_name = happy_wheel_data
,desc = "大转盘配置数据"
,source = "happy_wheel_data.xml"
,target = "happy_wheel_data.erl"
,inc = ["common.hrl", "attr.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}}
,{get_group, cb_fun, handle, {get_record, ["抽奖配置"], camp_id, new_map, all}}
,{group_items, cb_fun, handle, {tuple_type, ["奖励配置"], [camp_id, group], [id, probability]}}
,{get_items, cb_fun, handle, {get_tuple, ["奖励配置"], [camp_id, id], [item_id, num, is_notice]}}
,{get_group_list, cb_fun, handle, {tuple_type, ["奖励配置"], camp_id, group}}
,{get_ext_reward, cb_fun, handle, {get_tuple, ["进度奖励"], [camp_id, id], all}}
,{get_ext_reward_list, cb_fun, handle, {tuple_type, ["进度奖励"], camp_id, id}}
]
,callback_cli = [
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, [ "常量配置"], [key], all}}
, {base_info, cb_fun_json, handle, {key_val, [ "抽奖配置"], [camp_id], all}}
, {reward_info, cb_fun_json, handle, {type_get_val, [ "奖励配置"], [camp_id, group, id], all}}
, {reach_reward, cb_fun_json, handle, {type_get_val, [ "进度奖励"], [camp_id, id], all}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = key, desc = "", mod = all}
,#f_column{type = term, name = val, desc = "", mod = all, add_list_sign = false}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
, {["抽奖配置"],
[ #f_column{desc = "活动id", type = int, name = camp_id, mod = all}
,#f_column{desc = "召唤名称", type = bstr, name = name, mod = all}
, #f_column{desc = "开启限制", type = term, name = limit_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{type = bstr, name = model, desc = "模型配置", mod = client}
,#f_column{type = bstr, name = shop, desc = "跳转商城", mod = client}
,#f_column{type = bstr, name = bgm, desc = "bgm", mod = client}
]}
,{["奖励配置"], [
#f_column{type = int, name = camp_id, desc = "活动id", mod = all}
,#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = int, name = group, desc = "组别", mod = all}
,#f_column{desc = "名称", type = bstr, name = name, mod = all}
,#f_column{type = int, name = item_id, desc = "奖励id", mod = all}
,#f_column{type = int, name = num, desc = "数量", mod = all}
,#f_column{type = int, name = probability, desc = "权重", mod = server}
,#f_column{desc = "是否传闻", type = int, name = is_notice}
,#f_column{type = int, name = point, desc = "位置", mod = client}
]}
,{["进度奖励"], [
#f_column{type = int, name = camp_id, desc = "活动id", mod = all}
,#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = int, name = num, desc = "次数", mod = all}
,#f_column{type = term, name = reward, desc = "奖励", mod = all}
]}
]
}.