This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
25 lines
768 B
C++
25 lines
768 B
C++
#include "stdafx.h"
|
|
#include "..\..\..\Minecraft.World\Entity.h"
|
|
#include "..\..\..\Minecraft.World\Level.h"
|
|
#include "..\..\..\Minecraft.World\ItemInstance.h"
|
|
#include "UseItemTask.h"
|
|
|
|
UseItemTask::UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId,
|
|
bool enablePreCompletion, vector<TutorialConstraint *> *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders)
|
|
: TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ),
|
|
itemId( itemId )
|
|
{
|
|
}
|
|
|
|
bool UseItemTask::isCompleted()
|
|
{
|
|
return bIsCompleted;
|
|
}
|
|
|
|
void UseItemTask::useItem(std::shared_ptr<ItemInstance> item,bool bTestUseOnly)
|
|
{
|
|
if(bTestUseOnly) return;
|
|
|
|
if( item->id == itemId )
|
|
bIsCompleted = true;
|
|
} |