%%---------------------------------------------------- %% 数据配置文件 %% @author %%---------------------------------------------------- -module(guild_war_data). -export([cfg/0]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = guild_war_data ,lua_name = guild_war_data ,desc = "联盟战配置数据" ,source = "guild_war_data.xml" ,target = "guild_war_data.erl" ,inc = ["common.hrl", "guild_war.hrl"] ,callback = [ {{get_award, "[]"}, cb_fun, handle, {get_fun, ["战绩奖励"], "get_award(WarScore) when WarScore =< ~s -> ~s;", [num, award]}} ,{get_buff_list, cb_fun, handle, {list, ["增益项等级数据"]}} ,{{get_buff_attr, "[]"}, cb_fun, handle, {get_tuple, ["增益项等级数据"], lev, attr}} ,{{get_warscores, "[]"}, cb_fun, handle, {get_tuple, ["据点位置"], pos, warscore}} ,{{get_war_box_1, "[]"}, cb_fun, handle, {tuple_type, ["宝箱奖励池1"], type, [limit_num, item_id, item_num, num]}} ,{{get_war_box_2, "[]"}, cb_fun, handle, {tuple_type, ["宝箱奖励池2"], type, [item_id, item_num, pro]}} ,{get_const, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~s) -> ~s; %% ~s", [key,val,desc]}} ,{{get_marketplace_reward, undefined}, cb_fun, handle, {get_fun, ["宝库奖励"], "get_marketplace_reward(Power) when Power < ~ts andalso Power >= ~ts -> {~ts, ~ts}; ", [power_high, power_low, rand_reward, reward]}} ] ,callback_cli = [ {const,cb_fun_lua, handle, {key_val, ["常量配置"], [key], all}} ,{award, cb_fun_lua, handle, {key_val, ["战绩奖励"], [num], all}} ,{position, cb_fun_lua, handle, {key_val, ["据点位置"], [pos], [pos_x,pos_y,warscore]}} ,{buff, cb_fun_lua, handle, {key_val, ["增益项等级数据"], [lev], all}} ,{explain, cb_fun_lua, handle, {key_val, ["玩法说明"], [id], all}} ,{guard_power, cb_fun_lua, handle, {key_val, ["中立怪物战力显示"], [lev], all}} ,{box_award, cb_fun_lua, handle, {key_val, ["宝箱奖励展示"], [id], all}} ,{marketplace_reward, cb_fun_lua, handle, {list_val, ["宝库奖励"], all}} ] ,callback_json = [ {const,cb_fun_json, handle, {key_val, ["常量配置"], [key], all}} ,{award, cb_fun_json, handle, {key_val, ["战绩奖励"], [num], all}} ,{position, cb_fun_json, handle, {key_val, ["据点位置"], [pos], [pos_x,pos_y,warscore]}} ,{buff, cb_fun_json, handle, {key_val, ["增益项等级数据"], [lev], all}} ,{explain, cb_fun_json, handle, {key_val, ["玩法说明"], [id], all}} ,{guard_power, cb_fun_json, handle, {key_val, ["中立怪物战力显示"], [lev], all}} ,{box_award, cb_fun_json, handle, {key_val, ["宝箱奖励展示"], [id], all}} ,{marketplace_reward, cb_fun_json, handle, {list_val, ["宝库奖励"], 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 = client} ]} ,{["战绩奖励"], [ #f_column{type = int, name = num, desc = "战绩区间", primary = true, mod = all} ,#f_column{type = term, name = award, desc = "周奖励", mod = client} ]} ,{["据点位置"], [ #f_column{type = int, name = pos, desc = "键", primary = true, mod = all} ,#f_column{type = bstr, name = pos_x, desc = "X坐标", mod = client} ,#f_column{type = bstr, name = pos_y, desc = "Y坐标", mod = client} ,#f_column{type = term, name = warscore, desc = "战绩值", mod = all} ]} ,{["增益项等级数据"], [ #f_column{type = int, name = lev, desc = "等级", primary = true, mod = all} ,#f_column{type = term, name = attr, desc = "属性加成", mod = all} ]} ,{["玩法说明"], [ #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} ]} ,{["中立怪物战力显示"], [ #f_column{type = int, name = lev, desc = "等级", primary = true, mod = client} ,#f_column{type = int, name = power, desc = "战力显示", mod = client} ]} ,{["宝箱奖励池1"], [ #f_column{type = int, name = type, desc = "类型", comment = "0:失败宝箱 1:胜利宝箱", mod = server} ,#f_column{type = term, name = limit_num, desc = "宝箱区间", add_list_sign = false, mod = server} ,#f_column{type = int, name = item_id, desc = "物品id", mod = server} ,#f_column{type = int, name = item_num, desc = "物品数量", mod = server} ,#f_column{type = int, name = num, desc = "奖励份数", mod = server} ]} ,{["宝箱奖励池2"], [ #f_column{type = int, name = type, desc = "类型", comment = "0:失败宝箱 1:胜利宝箱", mod = server} ,#f_column{type = int, name = item_id, desc = "物品id", mod = server} ,#f_column{type = int, name = item_num, desc = "物品数量", mod = server} ,#f_column{type = int, name = pro, desc = "权重", mod = server} ]} ,{["宝箱奖励展示"], [ #f_column{type = int, name = id, desc = "类型", primary = true, mod = client} ,#f_column{type = term, name = award, desc = "奖励", mod = client} ]} ,{["宝库奖励"], [ #f_column{type = int, name = power_high, desc = "战力上限", mod = all} ,#f_column{type = int, name = power_low, desc = "战力下限", mod = all} ,#f_column{type = term, name = rand_reward, desc = "宝库随机奖励", mod = all} ,#f_column{type = term , name = reward, desc = "宝库固定奖励", mod = all} ]} ] }.