mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
refactor(Core/Misc): Make DeathState enum class (#17607)
This commit is contained in:
@@ -937,7 +937,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
|
||||
pCurrChar->LoadCorpse(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION));
|
||||
|
||||
// setting Ghost+speed if dead
|
||||
if (pCurrChar->m_deathState != ALIVE)
|
||||
if (pCurrChar->m_deathState != DeathState::Alive)
|
||||
{
|
||||
// not blizz like, we must correctly save and load player instead...
|
||||
if (pCurrChar->getRace() == RACE_NIGHTELF)
|
||||
|
||||
@@ -69,7 +69,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
|
||||
// creatures can kill players
|
||||
// so if the server is lagging enough the player can
|
||||
// release spirit after he's killed but before he is updated
|
||||
if (GetPlayer()->getDeathState() == JUST_DIED)
|
||||
if (GetPlayer()->getDeathState() == DeathState::JustDied)
|
||||
{
|
||||
LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player {} ({}) was killed and before he was updated",
|
||||
GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString());
|
||||
|
||||
@@ -301,7 +301,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
|
||||
GetPlayer()->RemovePet(pet->ToPet(), PET_SAVE_AS_DELETED);
|
||||
else
|
||||
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
|
||||
pet->setDeathState(CORPSE);
|
||||
pet->setDeathState(DeathState::Corpse);
|
||||
}
|
||||
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user