%%---------------------------------------------------- %% 数据配置文件 %% @author liufenglin %%---------------------------------------------------- -module(day_goals_data). -export([cfg/0, get/1]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = day_goals_data ,lua_name = day_goals_data ,desc = "章节副本配置数据" ,source = "day_goals_data.xml" ,target = "day_goals_data.erl" ,inc = ["common.hrl", "day_goals.hrl", "gain.hrl", "quest.hrl"] ,callback = [ {get_welfare_list, cb_fun, handle, {tuple_type, ["今日挑战"], period, [day, goal_id, progress, limit_req_time]}} ,{get_grow_list, cb_fun, handle, {tuple_type, ["成长目标"], period, [day, goal_id, lev]}} ,{get_price_list, cb_fun, handle, {tuple_type, ["半价抢购"], period, id}} ,{get_finish_list, cb_fun, handle, {tuple_type, ["全目标奖励"], period, [id, goal, award]}} ,{{get_welfare_condition, "undefined"}, cb_fun, handle, {get_tuple, ["今日挑战"], goal_id, progress}} ,{{get_award1, {0, "[]"}}, cb_fun, handle, {get_tuple, ["今日挑战", "成长目标"], goal_id, [day, award1]}} ,{{get_num, 0}, cb_fun, handle, {get_tuple, ["今日挑战", "成长目标"], goal_id, award2}} ,{get_award2, cb_fun, handle, {get_tuple, ["半价抢购"], id, [day, vip, price2, award1]}} ,{get_award3, cb_fun, handle, {get_tuple, ["全目标奖励"], id, [goal, award]}} ,{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~ts", [label,val,desc]}} ,{get_grow, cb_fun, handle, {record_type, ["成长目标"], period, grow_data, [goal_id, day, progress, lev, target_type]}} ,{get_grow1, cb_fun, handle, {record_type, ["今日挑战"], period, grow_data, [goal_id, day, progress, lev, target_type]}} ,{get_grow_data, cb_fun, handle, {get_record, ["今日挑战","成长目标"], goal_id, grow_data, [goal_id, day, progress, lev, target_type]}} ] ,callback_cli = [ {constant, cb_fun_lua, handle, {key_val, ["常量配置"], [label], all}} ,{welfarecollection, cb_fun_lua, handle, {type_val, ["今日挑战"], [period,day], all}} ,{growthtarget, cb_fun_lua, handle, {type_val, ["成长目标"], [period,day], all}} ,{halfdiscount, cb_fun_lua, handle, {type_val, ["半价抢购"], [period,id], all}} ,{all_target, cb_fun_lua, handle, {type_val, ["全目标奖励"], [period,id], all}} ,{drama_explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}} ] ,callback_json = [ {constant, cb_fun_json, handle, {key_val, ["常量配置"], [label], all}} ,{welfarecollection, cb_fun_json, handle, {type_val, ["今日挑战"], [period,day], all}} ,{growthtarget, cb_fun_json, handle, {type_val, ["成长目标"], [period,day], all}} ,{halfdiscount, cb_fun_json, handle, {type_val, ["半价抢购"], [period,id], all}} ,{all_target, cb_fun_json, handle, {type_val, ["全目标奖励"], [period,id], all}} ,{drama_explain, cb_fun_json, handle, {key_val, ["玩法说明"], [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 = target_type, desc = "成长目标类型", 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 = award1, desc = "奖励内容", mod = all} ,#f_column{type = int, name = award2, desc = "增加点数", mod = all} ,#f_column{type = int, name = lev, desc = "开启等级", val = "0", mod = all} ,#f_column{type = int, name = id, desc = "标志位", mod = client} ,#f_column{type = term, name = extend, desc = "参数", mod = all} ,#f_column{type = term, name = limit_req_time, desc = "注册时间限制", add_list_sign = false, val = "undefined", mod = server} ]}, {["成长目标"], [ #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 = int, name = target_type, desc = "成长目标类型", mod = all} ,#f_column{type = bstr, name = type_name, desc = "类型名字", mod = all} ,#f_column{type = bstr, name = desc, desc = "任务描述", mod = client} %% ,#f_column{type = term, name = condition, desc = "达成条件", mod = all} , #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 = award1, desc = "奖励内容", mod = all} ,#f_column{type = int, name = award2, desc = "增加点数", mod = all} ,#f_column{type = int, name = lev, desc = "开启等级", val = "0", mod = all} ,#f_column{type = int, name = id, desc = "标志位", mod = client} ,#f_column{type = term, name = extend, desc = "参数", mod = all} ]} ,{["半价抢购"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = id, desc = "ID", mod = all} ,#f_column{type = int, name = day, desc = "开启天数", mod = all} ,#f_column{type = int, name = vip, desc = "VIP", mod = all} ,#f_column{type = term, name = award1, desc = "道具内容", mod = all} ,#f_column{type = bstr, name = desc, desc = "道具名字", mod = all} ,#f_column{type = int, name = price1, desc = "原价", mod = all} ,#f_column{type = int, name = price2, desc = "现价", mod = all} ,#f_column{type = int, name = disc, desc = "折扣", mod = all} ]} ,{["全目标奖励"], [ #f_column{type = int, name = period, desc = "周期", mod = all} ,#f_column{type = int, name = id, desc = "奖励Id", mod = all} ,#f_column{type = int, name = goal, desc = "完成进度", mod = all} ,#f_column{type = term, name = award, 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} ]} ,{["玩法说明"], [ #f_column{type = int, name = id, desc = "标签", primary = true, mod = client} ,#f_column{type = str, name = title, desc = "标签名", mod = client} ,#f_column{type = str, name = desc, desc = "内容", mod = client} ]} ] }. get(type) -> [ {"默认类型", 0} ].