%%---------------------------------------------------- %% 新七日目标数据配置文件 %% @author yzq %%---------------------------------------------------- -module(day_goals_new_data). -export([cfg/0, get/1]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = day_goals_new_data ,lua_name = day_goals_new_data ,desc = "新七日目标配置数据" ,source = "day_goals_new_data.xml" ,target = "day_goals_new_data.erl" ,inc = ["common.hrl", "day_goals.hrl", "gain.hrl", "quest.hrl"] ,callback = [ {get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~ts", [label,val,desc]}} ,{{get_reward, "[]"}, cb_fun, handle, {get_tuple, ["成长目标", "周期目标"], goal_id, award}} ,{{get_quest, undefined}, cb_fun, handle, {get_record, ["成长目标"], goal_id, grow_data, [goal_id, day, progress]}} ,{get_quest2, cb_fun, handle, {get_record, ["周期目标"], goal_id, grow_data, [goal_id, progress]}} ,{quest_list, cb_fun, handle, {record_type, ["成长目标"], [period, day], grow_data, [goal_id, day, progress]}} ,{quest_list2, cb_fun, handle, {record_type, ["周期目标"], period, grow_data, [goal_id, progress]}} ,{{get_exp_item, undefined}, cb_fun, handle, {get_tuple, ["周期配置"], period, item_id}} ,{get_max, cb_fun, handle, {get_max, ["周期配置"], period}} ,{period_list, cb_fun, handle, {list, ["周期配置"]}} ,{{get_lev, undefined}, [{data_reverse, 1}], cb_fun, handle, {get_fun, ["等级奖励"], "get_lev({~ts, Exp}) when Exp >= ~ts -> ~ts;", [period, exp, lev]}} ,{{get_lev_reward, "[]"}, cb_fun, handle, {get_tuple, ["等级奖励"], [period, lev], reward}} ,{lev_reward_list, cb_fun, handle, {tuple_type, ["等级奖励"], period, lev}} ,{get_icon, cb_fun, handle, {get_tuple, ["周期配置"], period, icon_id}} %% ,{item_period, cb_fun, handle, {get_tuple, ["周期配置"], item_id, period}} ,{period_name, cb_fun, handle, {get_tuple, ["周期配置"], period, name}} ] ,callback_cli = [ {constant, cb_fun_lua, handle, {key_val, ["常量配置"], [label], all}} ,{make_lev_list, cb_fun_lua, handle, {type_get_val, ["等级奖励"], [period,lev], all}} ,{circle_exp_item, cb_fun_lua, handle, {type_get_val, ["周期配置"], [period], [item_id]}} ,{group_list, cb_fun_lua, handle, {type_get_val, ["成长目标"], [period,goal_id], [goal_id,desc,source_id,award]}} ,{charge_list, cb_fun_lua, handle, {type_get_val, ["周期目标"], [period,goal_id], all}} ] ,callback_json = [ {constant, cb_fun_json, handle, {key_val, ["常量配置"], [label], all}} ,{make_lev_list, cb_fun_json, handle, {type_get_val, ["等级奖励"], [period,lev], all}} ,{circle_exp_item, cb_fun_json, handle, {type_get_val, ["周期配置"], [period], [item_id]}} ,{group_list, cb_fun_json, handle, {type_get_val, ["成长目标"], [period,goal_id], [goal_id,day,desc,source_id,award]}} ,{charge_list, cb_fun_json, handle, {type_get_val, ["周期目标"], [period,goal_id], all}} ] ,sheet = [ {["成长目标"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = goal_id, desc = "目标ID", mod = all} ,#f_column{type = int, name = day, desc = "天数", mod = all} ,#f_column{type = bstr, name = desc, desc = "任务描述", mod = client} , #f_column{desc = "达成条件", type = func, name = progress, width = 360, spilt_str = ";", type_func = {quest_data, progress}, fields = [ #f_column{desc = "服务端事件", type = term, name = label, add_list_sign = false} , #f_column{desc = "客户端标签", type = str, name = cli_label, mod = client} , #f_column{desc = "目标值", type = int, name = target, mod = all} , #f_column{desc = "目标需求值", type = int, name = target_val, mod = all} , #f_column{desc = "服务端附加参数", type = term, name = param, add_list_sign = false} , #f_column{desc = "客户端附加参数", type = term, name = param, add_list_sign = false, mod = client} ], valid_list = [ {atom, integer, integer}, {atom, integer, integer, term}, {atom, atom, integer, integer, term} ], comment = "{事件标签, 目标值, 目标需求值, 附加参数} 或 {服务端事件标签, 服务端事件标签, 目标值, 目标需求值, 附加参数}\n" "事件标签/服务端事件标签/客户端事件标签:英文字符串;\n" "目标值:整数\n" "目标需求值:整数\n" "附加参数需要用“[]”包括,其中每一项需要用“{}”包括:[{monitor}, {type, 1}]\n" "多个任务目标用“;”(分号)分隔,例如: {evt_get_item, 10001, 1, [{monitor}]};{evt_use_item, 10001, 1, [{type, 1}]}", mod = all } ,#f_column{type = int, name = source_id, desc = "客户端使用效果", mod = client} ,#f_column{type = term, name = award, desc = "奖励内容", mod = all} ,#f_column{type = int, name = id, desc = "标志位", mod = client} ]} ,{["等级奖励"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = lev, desc = "达到等级", mod = all} ,#f_column{type = int, name = exp, desc = "解锁经验", mod = all} ,#f_column{type = term, name = reward, desc = "等级奖励", mod = all} ,#f_column{type = bstr, name = title_name, desc = "标题内容", mod = client} ]} ,{["周期目标"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = goal_id, desc = "目标ID", mod = all} ,#f_column{type = bstr, name = desc, desc = "任务描述", mod = client} , #f_column{desc = "达成条件", type = func, name = progress, width = 360, spilt_str = ";", type_func = {quest_data, progress}, fields = [ #f_column{desc = "服务端事件", type = term, name = label, add_list_sign = false} , #f_column{desc = "客户端标签", type = str, name = cli_label, mod = client} , #f_column{desc = "目标值", type = int, name = target, mod = all} , #f_column{desc = "目标需求值", type = int, name = target_val, mod = all} , #f_column{desc = "服务端附加参数", type = term, name = param, add_list_sign = false} , #f_column{desc = "客户端附加参数", type = term, name = param, add_list_sign = false, mod = client} ], valid_list = [ {atom, integer, integer}, {atom, integer, integer, term}, {atom, atom, integer, integer, term} ], comment = "{事件标签, 目标值, 目标需求值, 附加参数} 或 {服务端事件标签, 服务端事件标签, 目标值, 目标需求值, 附加参数}\n" "事件标签/服务端事件标签/客户端事件标签:英文字符串;\n" "目标值:整数\n" "目标需求值:整数\n" "附加参数需要用“[]”包括,其中每一项需要用“{}”包括:[{monitor}, {type, 1}]\n" "多个任务目标用“;”(分号)分隔,例如: {evt_get_item, 10001, 1, [{monitor}]};{evt_use_item, 10001, 1, [{type, 1}]}", mod = all } ,#f_column{type = int, name = source_id, desc = "跳转", mod = client} ,#f_column{type = int, name = show_icon, desc = "客户端使用效果", mod = client} ,#f_column{type = term, name = award, desc = "奖励", mod = all} ,#f_column{type = int, name = id, desc = "ID", mod = client} ]} ,{["周期配置"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = item_id, desc = "经验物品ID", mod = all} ,#f_column{type = int, name = icon_id, desc = "图标ID", mod = all} ,#f_column{type = bstr, name = name, desc = "活动名称", mod = all} ]} ,{["常量配置"],[ #f_column{type = term, name = label, desc = "常量标识", add_list_sign = false,mod = all} , #f_column{type = term, name = val, desc = "常量值", add_list_sign = false,mod = all} , #f_column{type = bstr, name = desc, desc = "描述", mod = client} ]} ] }. get(type) -> [ {"默认类型", 0} ].