Files
fc/server/tools/gen_data/cfg/weapon_data.erl
T

55 lines
2.5 KiB
Erlang
Raw Normal View History

2026-05-23 22:10:14 +08:00
%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 16. 5月 2023 17:39
%%%-------------------------------------------------------------------
-module(weapon_data).
-author("Administrator").
-export([cfg/0]).
-include("data_config.hrl").
-include("common.hrl").
cfg() ->
#data_cfg{
name = weapon_data
,lua_name = weapon_data
,desc = "专属武器配置数据"
,source = "weapon_data.xml"
,target = "weapon_data.erl"
,inc = []
,callback = [
{get_weapon, [{data_reverse, true}], cb_fun, handle, {get_tuple, ["專屬武器"], partner_id, id}},
{get_weapon_partner_list, [{data_reverse, true}], cb_fun, handle, {tuple_list, ["專屬武器"], partner_id}}
,{get_skill, [{data_reverse, true}], cb_fun, handle, {get_tuple, ["專屬武器"], id, skill_id}}
,{{get_const, "undefined"}, cb_fun, handle, {get_tuple, ["常量"], key, val}}
%% ,{{rank_val, 0}, cb_fun, handle, {get_fun, ["计算配置"], "rank_val(Rank) when Rank >= ~ts andalso Rank =< ~ts -> ~ts;", [min, max, val]}}
%% ,{{get, 0}, cb_fun, handle, {get_fun, ["DATA"], "get(DiffLev) when DiffLev >= ~ts andalso DiffLev =< ~ts -> ~ts;", [min_lev, max_lev, {rec, new_map, all}]}}
]
,callback_cli = [
{const, cb_fun_lua, handle, {key_val, ["常量"], [key], all}},
{const, cb_fun_lua, handle, {key_val, ["專屬武器"], [id], all}}
%% ,{get, cb_fun_lua, handle, {fun_format, ["DATA"], "if v >= ~ts and v <= ~ts then return ~ts end", [min_lev, max_lev, all]}}
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, ["常量"], [key], all}},
{get_skill, cb_fun_json, handle, {key_val, ["專屬武器"], [id], all}}
%% ,{get, cb_fun_lua, handle, {fun_format, ["DATA"], "if v >= ~ts and v <= ~ts then return ~ts end", [min_lev, max_lev, all]}}
]
,sheet = [
{["常量"],
[#f_column{desc = "功能", type = atom, name = key, primary = true, mod = all}
, #f_column{desc = "", type = int, name = val, mod = all}
, #f_column{desc = "描述", type = bstr, name = desc, mod = client}
]}
,
{["專屬武器"], [
#f_column{type = int, name = id, desc = "專屬武器道具id", mod = all}
,#f_column{type = int, name = partner_id, desc = "對應英雄id", mod = all}
,#f_column{type = int, name = skill_id, desc = "讀取技能id", mod = all}
]}
]
}.