diff options
author | Mattes D <github@xoft.cz> | 2020-08-01 20:18:03 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-01 21:04:31 +0200 |
commit | 46398f4671012a0d913bd7bc0c70ffdc2645f2ac (patch) | |
tree | 11d766b1ce592e526b6cbac8d7a245208bdce26e /src/Entities/EntityEffect.cpp | |
parent | Added HandleCraftItem call to ShiftClickedResult to make sure achievements are awarded (#4791) (diff) | |
download | cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar.gz cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar.bz2 cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar.lz cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar.xz cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.tar.zst cuberite-46398f4671012a0d913bd7bc0c70ffdc2645f2ac.zip |
Diffstat (limited to 'src/Entities/EntityEffect.cpp')
-rw-r--r-- | src/Entities/EntityEffect.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp index 9475a1710..ef38e3a80 100644 --- a/src/Entities/EntityEffect.cpp +++ b/src/Entities/EntityEffect.cpp @@ -191,31 +191,31 @@ std::unique_ptr<cEntityEffect> cEntityEffect::CreateEntityEffect(cEntityEffect:: { switch (a_EffectType) { - case cEntityEffect::effNoEffect: return cpp14::make_unique<cEntityEffect >(a_Duration, a_Intensity, a_DistanceModifier); - - case cEntityEffect::effAbsorption: return cpp14::make_unique<cEntityEffectAbsorption >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effBlindness: return cpp14::make_unique<cEntityEffectBlindness >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effFireResistance: return cpp14::make_unique<cEntityEffectFireResistance>(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effHaste: return cpp14::make_unique<cEntityEffectHaste >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effHealthBoost: return cpp14::make_unique<cEntityEffectHealthBoost >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effHunger: return cpp14::make_unique<cEntityEffectHunger >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effInstantDamage: return cpp14::make_unique<cEntityEffectInstantDamage >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effInstantHealth: return cpp14::make_unique<cEntityEffectInstantHealth >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effInvisibility: return cpp14::make_unique<cEntityEffectInvisibility >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effJumpBoost: return cpp14::make_unique<cEntityEffectJumpBoost >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effMiningFatigue: return cpp14::make_unique<cEntityEffectMiningFatigue >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effNausea: return cpp14::make_unique<cEntityEffectNausea >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effNightVision: return cpp14::make_unique<cEntityEffectNightVision >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effPoison: return cpp14::make_unique<cEntityEffectPoison >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effRegeneration: return cpp14::make_unique<cEntityEffectRegeneration >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effResistance: return cpp14::make_unique<cEntityEffectResistance >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effSaturation: return cpp14::make_unique<cEntityEffectSaturation >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effSlowness: return cpp14::make_unique<cEntityEffectSlowness >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effSpeed: return cpp14::make_unique<cEntityEffectSpeed >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effStrength: return cpp14::make_unique<cEntityEffectStrength >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effWaterBreathing: return cpp14::make_unique<cEntityEffectWaterBreathing>(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effWeakness: return cpp14::make_unique<cEntityEffectWeakness >(a_Duration, a_Intensity, a_DistanceModifier); - case cEntityEffect::effWither: return cpp14::make_unique<cEntityEffectWither >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effNoEffect: return std::make_unique<cEntityEffect >(a_Duration, a_Intensity, a_DistanceModifier); + + case cEntityEffect::effAbsorption: return std::make_unique<cEntityEffectAbsorption >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effBlindness: return std::make_unique<cEntityEffectBlindness >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effFireResistance: return std::make_unique<cEntityEffectFireResistance>(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effHaste: return std::make_unique<cEntityEffectHaste >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effHealthBoost: return std::make_unique<cEntityEffectHealthBoost >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effHunger: return std::make_unique<cEntityEffectHunger >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effInstantDamage: return std::make_unique<cEntityEffectInstantDamage >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effInstantHealth: return std::make_unique<cEntityEffectInstantHealth >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effInvisibility: return std::make_unique<cEntityEffectInvisibility >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effJumpBoost: return std::make_unique<cEntityEffectJumpBoost >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effMiningFatigue: return std::make_unique<cEntityEffectMiningFatigue >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effNausea: return std::make_unique<cEntityEffectNausea >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effNightVision: return std::make_unique<cEntityEffectNightVision >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effPoison: return std::make_unique<cEntityEffectPoison >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effRegeneration: return std::make_unique<cEntityEffectRegeneration >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effResistance: return std::make_unique<cEntityEffectResistance >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effSaturation: return std::make_unique<cEntityEffectSaturation >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effSlowness: return std::make_unique<cEntityEffectSlowness >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effSpeed: return std::make_unique<cEntityEffectSpeed >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effStrength: return std::make_unique<cEntityEffectStrength >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effWaterBreathing: return std::make_unique<cEntityEffectWaterBreathing>(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effWeakness: return std::make_unique<cEntityEffectWeakness >(a_Duration, a_Intensity, a_DistanceModifier); + case cEntityEffect::effWither: return std::make_unique<cEntityEffectWither >(a_Duration, a_Intensity, a_DistanceModifier); } UNREACHABLE("Unsupported entity effect"); } |