源战役
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 rivejä
1.7 KiB

%%% -------------------------------------------------------
%%% @author huangyongxing@yeah.net
%%% @doc
%%% @end
%%% -------------------------------------------------------
-ifndef(QUICKBAR_HRL).
-define(QUICKBAR_HRL, ok).
%% 技能快捷栏槽位
-define(BASE_BTN_LOCS, [1, 2, 3, 4, 5, 6, 7, 8]).
%% 默认选择快捷栏编号
-define(DEFAULT_QUICKBAR, 1).
%% 快捷栏编号范围
-define(QUICKBAR_NUM_RANGE, [1, 3]).
%% 快捷栏按钮类型
%% (目前仅技能可用,其他类型废弃)
-define(BTN_GOODS, 1). % 物品按钮
-define(BTN_SKILL, 2). % 技能按钮
-define(BTN_ACTION, 3). % 动作按钮
-define(VER_CURRENT, 1). % 当前数据版本
%% 技能快捷栏数据结构
%% PS: 改版前,原快捷栏数据:[Btn]
%% Btn : {Loc, BtnType, Id, AutoUse}
%% 程序中需要在加载数据时,兼容产品线上旧版数据转换为新数据的处理
-record(quickbar, {
ver = ?VER_CURRENT % 当前版本(为后续调整升级按钮数据预留)
,selected = 1 % 当前快捷栏编号
,quickbar_list = [] % [{QuickbarNum, BtnList}, ...]
}).
%% 按钮信息
-record(btn, {
loc = 1 % 快捷栏位置编号(位置编号唯一)
,id = 0 % 对应类型的id(如物品id,技能id,动作id)
,btn_type = ?BTN_SKILL % 类型(1物品,2技能,3动作)
,auto_use = 0 % 是否自动施放
}).
%% 更新快捷栏
-define(SQL_UPDATE_QUICKBAR, <<"update `player_state` set `quickbar`='~ts' where id=~p">>).
-endif.