class EquipAction extends BaseItemAction
{

	public override function CompleteAction( gameInstance : GameInstance )
	{
		var req : EquipRequest;
		var obj : weak< GameObject >;
		obj = GetExecutor();
		req = new EquipRequest;
		req.itemID = GetItemData().GetID();
		req.owner = obj;
		EquipmentSystem.GetInstance( obj ).QueueRequest( req );
	}

	public override function IsVisible( const context : ref< GetActionsContext >, optional objectActionsCallbackController : weak< gameObjectActionsCallbackController > ) : Bool
	{
		var obj : weak< GameObject >;
		obj = GetExecutor();
		if( obj )
		{
			return EquipmentSystem.GetInstance( obj ).GetPlayerData( obj ).IsEquippable( GetItemData() );
		}
		return true;
	}

}

