#include "BCPlayerEvent.h"

using namespace BC;
using namespace BAL;

namespace BAL {

BIPlayerEvent* createBIPlayerEvent(BIPlayerEvent::Action action, BIPlayerPtr player, BIPlayerArgs args)
{
    return new BCPlayerEvent(action, player, args);
}

}

BCPlayerEvent::BCPlayerEvent(BIPlayerEvent::Action action, BIPlayerPtr player, BIPlayerArgs args)
    : m_action(action) 
    , m_player(player)
    , m_args(args)
{
}

BCPlayerEvent::~BCPlayerEvent()
{
    m_player.reset();
    delete m_args;
}

BIEvent* BCPlayerEvent::clone() const
{
    return new BCPlayerEvent(m_action, m_player, m_args);
}

BIPlayerEvent::Action BCPlayerEvent::action() const
{
    return m_action;
}

BIPlayerPtr BCPlayerEvent::getPlayer() const
{
    return m_player;
}

BIPlayerArgs BCPlayerEvent::getArgs() const
{
    return m_args;
}

