%%---------------------------------------------------- %% 数据配置文件 %% @author whjing2011@gmail.com %%---------------------------------------------------- -module(guild_quest_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = guild_quest_data ,lua_name = guild_quest_data ,desc = "帮会任务配置数据" ,source = "guild_quest_data.xml" ,target = "guild_quest_data.erl" ,inc = ["guild_quest.hrl", "quest.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{{get_lev, undefined}, cb_fun, handle, {get_record, ["等级"], lev, guild_quest_lev_data, all}} ,{list, cb_fun, handle, {list, ["任务数据"]}} ,{get, cb_fun, handle, {get_record, ["任务数据"], id, guild_quest_data, all}} ] ,callback_cli = [ {guild_action_data, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{lev_data, cb_fun_lua, handle, {key_val, ["等级"], [id], all}} ,{task_data, cb_fun_lua, handle, {key_val, ["任务数据"], [], all}} ,{max_lev, cb_fun_lua, handle, {type_get_val, ["等级"], [res_id], lev}} ] ,callback_json = [ {guild_action_data, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{lev_data, cb_fun_json, handle, {key_val, ["等级"], [id], all}} ,{task_data, cb_fun_json, handle, {list_val, ["任务数据"], all}} ,{max_lev, cb_fun_json, handle, {type_val, ["等级"], [res_id], lev}} ] ,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 = str, name = desc, desc = "描述", mod = all} ]} ,{["等级"], [ #f_column{type = int, name = id, desc = "ID", mod = client} ,#f_column{type = int, name = lev, desc = "等级", primary = true, mod = all} ,#f_column{type = int, name = exp, desc = "升级活跃值", mod = all} ,#f_column{type = term, name = items, desc = "等级奖励", mod = all} ,#f_column{type = term, name = attr, valid_list = [{atom, integer}], desc = "属性", mod = all} ,#f_column{type = int, name = res_id, desc = "法阵图标", mod = client} ]} ,{["任务数据"], [ #f_column{type = int, name = id, desc = "ID", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = kv, name = type, desc = "类型", kv_type = [{"日常",1}, {"周日常", 2}], mod = all} ,#f_column{type = int, name = exp, desc = "奖励活跃值", mod = all} ,#f_column{type = bstr, name = show_jump, 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 = bstr, name = desc, desc = "描述", mod = client} ]} ] }.