%%% -------------------------------------------------------
%%% @author huangyongxing@yeah.net
%%% @doc
%%% 模拟客户端并发测试的客户端数据结构定义
%%% @end
%%% -------------------------------------------------------
-ifndef(CLI_SIMU_HRL).
-define(CLI_SIMU_HRL, ok).

-include("common.hrl").
-include("figure.hrl").
-include("attr.hrl").
-include("scene.hrl").

-include("otp_compatible.hrl").

%% 重新定义ERR、DEBUG、INFO宏
-ifdef(ERR).
-undef(ERR).
-endif.
-ifdef(DEBUG).
-undef(DEBUG).
-endif.
-ifdef(INFO).
-undef(INFO).
-endif.
-define(DEBUG(F, A), cli_simu_utils:debug(F, A, ?MODULE, ?LINE)).
-define(ERR(F, A),   cli_simu_utils:errlog(F, A, ?MODULE, ?LINE)).
-define(INFO(F, A),  cli_simu_utils:info(F, A, ?MODULE, ?LINE)).
-define(DEBUG(F),    ?DEBUG(F, [])).
-define(INFO(F),     ?INFO(F, [])).
-define(ERR(F),      ?ERR(F, [])).

%% 角色数据ETS表名
-define(CLI_ROLE, cli_role).

%% 客户端角色信息
-record(cli_role, {
        id = 0
        ,acc_id = 0
        ,account = <<>>
        ,name = <<>>
        ,server_id = 0
        ,scene_id = 0
        ,x = 0
        ,y = 0
        ,gold = 0
        ,coin = 0
        ,skill_list = []
        ,figure = #figure{}
        ,attr = #attr{}
        ,hp = 0
        ,hp_lim = 0
        ,speed = 0
        ,conn_pid = undefined       % 接收通过Socket传输的数据包的进程
        ,pid = undefined            % 客户端主进程pid
        ,socket = undefined
    }).

%% 其他玩家信息
-record(scene_role, {
        id = 0
        ,platform = ""
        ,server_id = 0
        ,figure = #figure{}
        ,x = 0
        ,y = 0
        ,hp = 0
        ,hp_lim = 0
        ,speed = 0
        ,hide = 0
        ,ghost = 0
        ,group = 0
        ,team_id = 0
        ,pk_status = 0
        ,power = 0
        ,is_ride = 0
        ,mount_figure = 0
        ,pk_value = 0
        ,pet_figure = 0
        ,pet_hide_status = 0
        ,pk_protect_time = 0
    }).

%% 怪物信息
-record(cli_mon, {
        id = 0
        ,x = 0
        ,y = 0
        ,mid = 0
        ,hp = 0
        ,hp_lim = 0
        ,level = 0
        ,name = ""
        ,speed = 0
        ,body = 0
        ,icon_eff = ""
        ,icon_texture = 0
        ,weapon_id = 0
        ,att_type = 0
        ,kind = 0
        ,color = 0
        ,out = 0
        ,boss = 0
        ,collect_time = 0
        ,is_be_clicked = 0
        ,is_be_atted = 0
        ,hide = 0
        ,ghost = 0
        ,group = 0
        ,guild_id = 0
        ,angle = 0
        ,attr_type = 0              % 五行属性
    }).

-endif.
