aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Tutorial/RideEntityTask.cpp
blob: 29b776453b6c245fb6a96b775ba13d2e892b3c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "stdafx.h"

#include <string>

#include "Minecraft.h"
#include "Tutorial.h"

#include "..\Minecraft.World\EntityHorse.h"

#include "RideEntityTask.h"

RideEntityTask::RideEntityTask(const int eType, Tutorial *tutorial, int descriptionId,
	bool enablePreCompletion, vector<TutorialConstraint *> *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders)
	: TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ),
	m_eType( eType )
{
}

bool RideEntityTask::isCompleted()
{
	return bIsCompleted;
}

void RideEntityTask::onRideEntity(shared_ptr<Entity> entity)
{
	if (entity->instanceof(static_cast<eINSTANCEOF>(m_eType)))
	{
		bIsCompleted = true;
	}
}