%% ---------------------------------------------------------
%% Author:  zmh
%% Created: 20201207
%% Description: 玩家新手任务奖励
%% --------------------------------------------------------
-module(pp_newer).
-export([handle/3]).
-include("server.hrl").
-include("common.hrl").

%%获取
handle(11400, Status, []) ->
    #player_status{id=RoleID}=Status,
    lib_role_newer:get_already_got(RoleID),
    {ok,Status};


%%领取
handle(11401,Status,[Type,TaskId])->
    NStatus = lib_role_newer:fetch_awards(Status,Type,TaskId),
    handle(11400, NStatus, []),
    {ok, NStatus};


handle(_Cmd, _Status, _Data) ->
    {error, "pp_newer no match"}.
