mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
refactor(Core/Misc): Make DeathState enum class (#17607)
This commit is contained in:
@@ -1755,7 +1755,7 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m
|
||||
// die at aura end
|
||||
else if (target->IsAlive())
|
||||
// call functions which may have additional effects after chainging state of unit
|
||||
target->setDeathState(JUST_DIED);
|
||||
target->setDeathState(DeathState::JustDied);
|
||||
|
||||
// xinef: damage immunity spell, not needed because of 93 aura (adds non_attackable state)
|
||||
// xinef: probably blizzard added it just in case in wotlk (id > 46000)
|
||||
|
||||
@@ -4514,7 +4514,7 @@ void Spell::finish(bool ok)
|
||||
if (spellInfo && spellInfo->SpellIconID == 2056)
|
||||
{
|
||||
LOG_DEBUG("spells.aura", "Statue {} is unsummoned in spell {} finish", m_caster->GetGUID().ToString(), m_spellInfo->Id);
|
||||
m_caster->setDeathState(JUST_DIED);
|
||||
m_caster->setDeathState(DeathState::JustDied);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user