mirror of
https://github.com/DrPerkyLegit/LCEServerTest.git
synced 2026-05-23 03:54:34 +00:00
removed git history
This commit is contained in:
31
Minecraft.Client/Common/Tutorial/EffectChangedTask.cpp
Normal file
31
Minecraft.Client/Common/Tutorial/EffectChangedTask.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.world.effect.h"
|
||||
#include "EffectChangedTask.h"
|
||||
|
||||
EffectChangedTask::EffectChangedTask(Tutorial *tutorial, int descriptionId, MobEffect *effect, bool apply,
|
||||
bool enablePreCompletion, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders )
|
||||
: TutorialTask(tutorial,descriptionId,enablePreCompletion,nullptr,bShowMinimumTime,bAllowFade,bTaskReminders)
|
||||
{
|
||||
m_effect = effect;
|
||||
m_apply = apply;
|
||||
}
|
||||
|
||||
bool EffectChangedTask::isCompleted()
|
||||
{
|
||||
return bIsCompleted;
|
||||
}
|
||||
|
||||
void EffectChangedTask::onEffectChanged(MobEffect *effect, bool bRemoved /*=false*/)
|
||||
{
|
||||
if(effect == m_effect)
|
||||
{
|
||||
if(m_apply == !bRemoved)
|
||||
{
|
||||
bIsCompleted = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bIsCompleted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user