diff options
Diffstat (limited to 'Minecraft.World/HealthBoostMobEffect.cpp')
| -rw-r--r-- | Minecraft.World/HealthBoostMobEffect.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Minecraft.World/HealthBoostMobEffect.cpp b/Minecraft.World/HealthBoostMobEffect.cpp new file mode 100644 index 00000000..9066a041 --- /dev/null +++ b/Minecraft.World/HealthBoostMobEffect.cpp @@ -0,0 +1,16 @@ +#include "stdafx.h" +#include "net.minecraft.world.entity.h" +#include "HealthBoostMobEffect.h" + +HealthBoostMobEffect::HealthBoostMobEffect(int id, bool isHarmful, eMinecraftColour color) : MobEffect(id, isHarmful, color) +{ +} + +void HealthBoostMobEffect::removeAttributeModifiers(shared_ptr<LivingEntity> entity, BaseAttributeMap *attributes, int amplifier) +{ + MobEffect::removeAttributeModifiers(entity, attributes, amplifier); + if (entity->getHealth() > entity->getMaxHealth()) + { + entity->setHealth(entity->getMaxHealth()); + } +} |
