%%---------------------------------------------------- %% 数据配置文件 %% @author linguohui %%---------------------------------------------------- -module(encounter_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = encounter_data ,lua_name = encounter_data ,js_name = encounter_data ,desc = "配置数据" ,source = "encounter_data.xml" ,target = "encounter_data.erl" ,splitv = 1 ,head_rows = 1 ,inc = [] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{get_reward, cb_fun, handle, {get_tuple, ["冒险奇遇"], id, reward}} ,{get_question, cb_fun, handle, {tuple_list, ["冒险奇遇"], [id, partner_bid, star, weight, first_power, first_lev]}} ,{get_lev_id, cb_fun, handle, {tuple_list, ["冒险奇遇"], [first_lev, id]}} ,{get_power_id, cb_fun, handle, {tuple_list, ["冒险奇遇"], [first_power, id]}} ] ,callback_cli = [ {encounter_const, cb_fun_lua, handle, {key_val, [ "常量配置"], [key], all}} ,{encounter_info, cb_fun_lua, handle, {key_val, ["冒险奇遇"], [id], all}} ,{encounter_bid_list, cb_fun_lua, handle, {list_val, ["冒险奇遇"], [partner_bid], [id]}} ] ,callback_json = [ {encounter_const, cb_fun_json, handle, {key_val, [ "常量配置"], [key], all}} ,{encounter_info, cb_fun_json, handle, {key_val, ["冒险奇遇"], [id], all}} ,{encounter_bid_list, cb_fun_json, handle, {list_val, ["冒险奇遇"], [partner_bid], [id]}} ] ,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 = all} ,#f_column{type = int, name = partner_bid, desc = "英雄基础id", mod = all} ,#f_column{type = int, name = star, desc = "星级要求", mod = all, val = 0} ,#f_column{type = int, name = weight, desc = "权重", mod = all} ,#f_column{type = int, name = first_power, desc = "战力首次达到值", mod = all, val = 0} ,#f_column{type = int, name = first_lev, desc = "等级首次达到值", mod = all, val = 0} ,#f_column{type = term , name = reward, desc = "选项对应奖励", mod = all} ,#f_column{type = str, name = question, desc = "题目", mod = client} ,#f_column{type = term, name = answer, desc = "答案", mod = client} ,#f_column{type = term, name = dialogue, desc = "对话", mod = client} ,#f_column{type = str, name = name , desc = "图鉴名称", mod = client} ]} ] }.