%% ---------------------------------------------------------------------------
%% @doc game.hrl

%% @author  hjh
%% @email  hejiahua@163.com
%% @since  2017-01-13
%% @deprecated 游戏基础相关
%% ---------------------------------------------------------------------------

%% ----------------------------------------------------
%% 设置
%% ----------------------------------------------------

% 设置
-record(setting, {
        key = undefined     % {Type, Subtype}
        , type = 0          % 大类
        , subtype = 0       % 小类
        , is_open = 0       % 1开启;0关闭
    }).

-record(status_setting, {
        setting_map = maps:new()    % Key:#setting.key Value:#setting{}
    }).

-define(sql_player_setting_select, <<"SELECT `type`, `subtype`, is_open FROM player_setting WHERE id = ~p">>).
-define(sql_player_setting_replace, <<"REPLACE INTO player_setting(id, `type`, `subtype`, is_open) VALUES(~p, ~p, ~p, ~p)">>).

-define(sql_client_event_select, <<"SELECT `event_id`, `state` FROM client_event_data WHERE role_id = ~p">>).
-define(sql_client_event_replace, <<"REPLACE INTO client_event_data(`role_id`, `event_id`, `state`) VALUES(~p, ~p, ~p)">>).