%%---------------------------------------------------- %% 数据配置文件 %% @author whjing2011@gmail.com %%---------------------------------------------------- -module(primus_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = primus_data ,lua_name = primus_data ,desc = "最强仙尊-神殿" ,source = "primus_data.xml" ,target = "primus_data.erl" ,inc = [] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{list, cb_fun, handle, {list, ["数据"]}} ,{get, cb_fun, handle, {get_record, ["数据"], pos, new_map, all}} ,{get_unit, cb_fun, handle, {get_fun, ["单位数据"], "get_unit({~ts,N}) when N >= ~ts andalso N =< ~ts -> ~ts;", [pos, min, max, {rec, new_map, all}]}} ] ,callback_cli = [ {const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{upgrade, cb_fun_lua, handle, {key_val, ["数据"], pos, all}} ,{unitdata, cb_fun_lua, handle, {key_val, ["单位数据"], [pos,min], all}} ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{upgrade, cb_fun_json, handle, {key_val, ["数据"], pos, all}} ,{unitdata, cb_fun_json, handle, {key_val, ["单位数据"], [pos,min], all}} ] ,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 = pos, desc = "位置", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = int, name = honor_id, desc = "称号ID", mod = all} ,#f_column{type = int, name = look_id, desc = "默认外观", mod = all} ,#f_column{type = int, name = arena_rank, desc = "竞技场名次要求", mod = all} ]} ,{["单位数据"], [ #f_column{type = int, name = pos, desc = "位置", primary = true, mod = all} ,#f_column{type = int, name = min, desc = "次数下限", primary = true, mod = all} ,#f_column{type = int, name = max, desc = "次数上限", primary = true, mod = all} ,#f_column{type = int, name = unit_id, desc = "单位ID", mod = all} ,#f_column{type = term, name = attr, desc = "进化的属性增长", mod = all} ,#f_column{type = term, name = act_skill, desc = "主动技能展示", mod = client} ,#f_column{type = term, name = passive_skill, desc = "被动技能展示", mod = client} ,#f_column{type = term, name = lev, desc = "怪物等级提升"} ,#f_column{type = int, name = look_id, desc = "默认外观",mod = client} ]} ] }.