mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-12 04:03:53 +00:00
Initial commit
This commit is contained in:
parent
def8cb4153
commit
b691c43c44
19437 changed files with 4363922 additions and 0 deletions
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,NULL,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue