%%---------------------------------------------------- %% 数据配置文件 %% @author %%---------------------------------------------------- -module(boss_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = boss_data ,lua_name = boss_data ,desc = "BOSS配置数据" ,source = "boss_data.xml" ,target = "boss_data.erl" ,inc = ["boss.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{list_boss, cb_fun, handle, {list, ["个人BOSS"]}} ,{get_boss, cb_fun, handle, {get_record, ["个人BOSS"], id, boss_data, all}} ,{{month_boss, undefined}, cb_fun, handle, {get_tuple, ["个人BOSS"], [month_boss_tag, lev], id}} ,{list_world_boss, cb_fun, handle, {list, ["世界BOSS"]}} ,{get_world_boss, cb_fun, handle, {get_record, ["世界BOSS"], id, world_boss_data, all}} ,{world_combat_reward, cb_fun, handle, {get_fun, ["战斗奖励"], "world_combat_reward({~ts,HurtPer}) when HurtPer >= ~ts andalso HurtPer =< ~ts -> ~ts;", [id, min, max, {rec, new_map, all}]}} ,{world_rank_reward, cb_fun, handle, {get_fun, ["排名奖励"], "world_rank_reward({~ts,Rank}) when Rank >= ~ts andalso Rank =< ~ts -> ~ts;", [id, min, max, {rec, new_map, all}]}} ,{world_buy_num, cb_fun, handle, {get_record, ["次数购买"], num, new_map, all}} ] ,callback_cli = [ {boss_const, cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}} ,{single_boss, cb_fun_lua, handle, {key_val, ["个人BOSS"],[id], all}} ,{world_boss, cb_fun_lua, handle, {key_val, ["世界BOSS"], [id], all}} ,{limit_buy, cb_fun_lua, handle, {key_val, ["次数购买"], [num], all}} ] ,callback_json = [ {boss_const, cb_fun_json, handle, {key_val, ["常量配置"], [key], all}} ,{single_boss, cb_fun_json, handle, {key_val, ["个人BOSS"],[id], all}} ,{world_boss, cb_fun_json, handle, {key_val, ["世界BOSS"], [id], all}} ,{limit_buy, cb_fun_json, handle, {key_val, ["次数购买"], [num], 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} ]} ,{["个人BOSS"], [ #f_column{type = int, name = id, desc = "BOSS_ID", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "BOSS名", mod = all} ,#f_column{type = int, name = lev, desc = "等级", mod = all} ,#f_column{type = term, name = base_items, desc = "基本奖励", mod = all} ,#f_column{type = term, name = drop_ids, desc = "掉落ID"} ,#f_column{type = term, name = show_items, desc = "展示奖励", mod = client} ,#f_column{type = int, name = show_id, desc = "展示头像", mod = client} ,#f_column{type = int, name = month_boss_tag, desc = "月卡BOSS", mod = all, val = 0} ,#f_column{type = int, name = show_lev, desc = "显示等级", mod = all} ,#f_column{type = term, name = first_items, desc = "首通奖励", mod = all} ,#f_column{type = term, name = hook_lose, desc = "扫荡消耗", mod = all} ]} ,{["世界BOSS"], [ #f_column{type = int, name = id, desc = "BOSS_ID", primary = true, mod = all} ,#f_column{type = bstr, name = name, desc = "BOSS名", mod = all} ,#f_column{type = int, name = lev, desc = "等级", mod = all} ,#f_column{type = int, name = ref_time, desc = "刷新复活时间"} ,#f_column{type = int, name = ref_item_num, desc = "刷新道具数量", mod = all} ,#f_column{type = term, name = base_items, desc = "基本奖励", mod = all} ,#f_column{type = term, name = show_items, desc = "展示奖励", mod = client} ,#f_column{type = int, name = show_id, desc = "展示头像", mod = client} ,#f_column{type = int, name = show_lev, desc = "显示等级"} ,#f_column{type = term, name = show_gain_items, desc = "展示必得奖励",mod = client} ]} ,{["战斗奖励"], [ #f_column{type = int, name = id, desc = "BOSS_ID", mod = all} ,#f_column{type = int, name = min, desc = "血量比区间下限", mod = all} ,#f_column{type = int, name = max, desc = "血量比区间上限", mod = all} ,#f_column{type = term, name = per_items, desc = "血量百分比奖励", mod = all} ,#f_column{type = term, name = drop_ids, desc = "掉落ID"} ]} ,{["排名奖励"], [ #f_column{type = int, name = id, desc = "BOSS_ID", mod = all} ,#f_column{type = int, name = min, desc = "排名区间下限", mod = all} ,#f_column{type = int, name = max, desc = "排名区间上限", mod = all} ,#f_column{type = term, name = base_items, desc = "基本奖励", mod = all} ,#f_column{type = term, name = per_items, desc = "血量百分比奖励", mod = all} ,#f_column{type = term, name = drop_ids, desc = "排名随机奖励"} ]} ,{["次数购买"], [ #f_column{type = int, name = num, desc = "次数", primary = true, mod = all} ,#f_column{type = int, name = vip, desc = "VIP限制", mod = all} ,#f_column{type = int, name = cost, desc = "价格", mod = all} ]} ] }.