%%-----------------------------------------------------------------------------
%% desc     :活动-冒险征程
%% author   :ljy
%% time     :20/11/9
%%-----------------------------------------------------------------------------
-define(ONE_LOTTERY, 10).     %% 单抽和十连抽需要消耗的热点值
-define(TEN_LOTTERY, 100).

-define(CONSUME, 631).        %% 彩钻消费mod_id

%% 查询定制活动保存的数据
-define(SELECT_CUSTOM_ACT_DATA, <<"select `act_data` from `custom_act_data` where `rid`=~p and `type`=~p and `subtype`=~p">>).

%% 查询奖励领取次数
-define(SELECT_REWARD_RECEIVE_TIMES, <<"select grade, receive_times from custom_act_receive_reward where role_id = ~p and `type`=~p and `subtype`=~p">>).

%% 查询开启了冒险征途活动的玩家id
-define(SELECT_OPEN_ACT_ROLES, <<"SELECT `id` FROM `player_low` WHERE `lv` >= ~p">>).

-record(adventure_road, {
    score = 0,                 %% 热点值
    progress = 0,              %% 进度值
    consume = 0,               %% 活动期间累计消费
    recharge = 0,              %% 活动期间累计充值
    adventure_task = []        %% [{{mod_id, sub_id},Times}]
}).

-record(rand_reward, {
    sub_id      = 0,            %% 映射id
    grade_id    = 0,            %% 奖励id
    reward_list = [],           %% 奖励
    rate        = 0             %% 权重
}).