refactor(Core/Misc): Make DeathState enum class (#17607)

This commit is contained in:
Kitzunu
2023-10-28 10:54:03 +02:00
committed by GitHub
parent 79b39f9655
commit f757e93da5
47 changed files with 112 additions and 112 deletions

View File

@@ -3829,7 +3829,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
caster->RewardPlayerAndGroupAtEvent(18388, unitTarget);
if (Creature* target = unitTarget->ToCreature())
{
target->setDeathState(CORPSE);
target->setDeathState(DeathState::Corpse);
target->RemoveCorpse();
}
}
@@ -5247,7 +5247,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
pet->Relocate(x, y, z, player->GetOrientation()); // This is needed so SaveStayPosition() will get the proper coords.
pet->ReplaceAllDynamicFlags(UNIT_DYNFLAG_NONE);
pet->RemoveUnitFlag(UNIT_FLAG_SKINNABLE);
pet->setDeathState(ALIVE);
pet->setDeathState(DeathState::Alive);
pet->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_POSSESSED))); // xinef: just in case
pet->SetHealth(pet->CountPctFromMaxHealth(damage));
pet->SetDisplayId(pet->GetNativeDisplayId());