%%---------------------------------------------------- %% 等级好礼数据配置文件 %% @author liwl %%---------------------------------------------------- -module(star_gift_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = star_gift_data ,lua_name = star_gift_data ,desc = "星级养成礼配置数据" ,source = "star_gift_data.xml" ,target = "star_gift_data.erl" ,inc = ["common.hrl", "lev_gift.hrl"] ,callback = [ {{get_gift_id, "undefined"}, cb_fun, handle, {get_tuple, ["奖励配置"], codition, id}} ,{{gift_type_cond, "[]"}, cb_fun, handle, {tuple_type, ["奖励配置"], gift_type, [codition, id]}} ,{{get_gift_id_by_package_id, "undefined"}, cb_fun, handle, {get_tuple, ["奖励配置"], package_id, id}} ,{get_award, cb_fun, handle, {get_tuple, ["奖励配置"], id, reward}} ,{get_add_time, cb_fun, handle, {get_tuple, ["奖励配置"], id, time}} ,{const, cb_fun, handle, {get_fun, ["常量表"], "const(~ts) -> ~ts; %% ~ts", [label, val, desc]}} ] ,callback_cli = [ {limit_gift, cb_fun_lua, handle, {val_str, [ "奖励配置"], [id], all}} ] ,callback_json = [ {limit_gift, cb_fun_json, handle, {val_str, [ "奖励配置"], [id], all}} ] ,sheet = [ {["奖励配置"], [ #f_column{desc = "编号", name = id, type = int, mod = all} , #f_column{desc = "名称", name = name, type = bstr, mod = all} , #f_column{desc = "礼包类型", name = gift_type, type = int, mod = all} , #f_column{desc = "开启条件", name = codition, type = term, comment = "等级开启填{lev, 50}, 星级开启填{star, 5}", add_list_sign = false, mod = all} , #f_column{desc = "奖励", name = reward, type = term, mod = all} , #f_column{desc = "充值id", name = package_id, type = int, mod = all} , #f_column{desc = "持续时间(秒)", name = time, type = int, mod = all} , #f_column{desc = "资源icon", name = ico, type = int, mod = client} , #f_column{desc = "资源1", name = res_1, type = bstr, mod = client} , #f_column{desc = "资源2", name = res_2, type = bstr, mod = client} , #f_column{desc = "描述字段", name = desc, type = bstr, mod = client} ] } ,{["常量表"], [#f_column{desc = "常量名", type = term, name = label, add_list_sign = false} , #f_column{desc = "常量值", type = term, name = val, add_list_sign = false} , #f_column{desc = "描述", type = bstr, name = desc, mod = desc} ] } ] }.