mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-25 08:03:50 +00:00
Revert "dynamic_pointer_cast -> std::dynamic_pointer_cast"
This reverts commit 07ad68bc15.
This commit is contained in:
parent
07ad68bc15
commit
7ae0c13854
207 changed files with 623 additions and 623 deletions
|
|
@ -95,19 +95,19 @@ bool Monster::doHurtTarget(std::shared_ptr<Entity> target)
|
|||
dmg -= (2 << getEffect(MobEffect::weakness)->getAmplifier());
|
||||
}
|
||||
|
||||
DamageSource *damageSource = DamageSource::mobAttack(std::dynamic_pointer_cast<Mob>( shared_from_this() ) );
|
||||
DamageSource *damageSource = DamageSource::mobAttack(dynamic_pointer_cast<Mob>( shared_from_this() ) );
|
||||
bool didHurt = target->hurt(damageSource, dmg);
|
||||
delete damageSource;
|
||||
|
||||
if (didHurt)
|
||||
{
|
||||
int fireAspect = EnchantmentHelper::getFireAspect(std::dynamic_pointer_cast<Mob>(shared_from_this()));
|
||||
int fireAspect = EnchantmentHelper::getFireAspect(dynamic_pointer_cast<Mob>(shared_from_this()));
|
||||
if (fireAspect > 0)
|
||||
{
|
||||
target->setOnFire(fireAspect * 4);
|
||||
}
|
||||
|
||||
std::shared_ptr<Mob> mob = std::dynamic_pointer_cast<Mob>(target);
|
||||
std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(target);
|
||||
if (mob != NULL)
|
||||
{
|
||||
ThornsEnchantment::doThornsAfterAttack(shared_from_this(), mob, random);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue