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

@@ -646,7 +646,7 @@ public:
{
deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true);
deathbringer->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
deathbringer->setDeathState(ALIVE);
deathbringer->setDeathState(DeathState::Alive);
}
_events.ScheduleEvent(EVENT_OUTRO_HORDE_4, 1000);
_events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 4000);

View File

@@ -1257,7 +1257,7 @@ public:
{
if (spell->Id == SPELL_REVIVE_CHAMPION && !IsUndead)
{
me->setDeathState(JUST_RESPAWNED);
me->setDeathState(DeathState::JustRespawned);
uint32 newEntry = 0;
switch (me->GetEntry())
{

View File

@@ -153,7 +153,7 @@ public:
if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
{
brann->setDeathState(JUST_DIED);
brann->setDeathState(DeathState::JustDied);
brann->Respawn();
brann->AI()->DoAction(5);
}

View File

@@ -601,7 +601,7 @@ public:
{
if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
{
brann->setDeathState(JUST_DIED);
brann->setDeathState(DeathState::JustDied);
brann->Respawn();
brann->AI()->DoAction(5);
}

View File

@@ -384,7 +384,7 @@ public:
{
if (param == ACTION_FERAL_RESPAWN)
{
me->setDeathState(JUST_RESPAWNED);
me->setDeathState(DeathState::JustRespawned);
if (Player* target = SelectTargetFromPlayerList(200))
AttackStart(target);

View File

@@ -1109,7 +1109,7 @@ public:
{
if (_isTrio && param == ACTION_RESPAWN_TRIO)
{
me->setDeathState(JUST_RESPAWNED);
me->setDeathState(DeathState::JustRespawned);
Reset();
}
}

View File

@@ -316,7 +316,7 @@ public:
{
creature->SetDisableGravity(true);
creature->SetPosition(creature->GetHomePosition());
creature->setDeathState(JUST_DIED);
creature->setDeathState(DeathState::JustDied);
creature->StopMovingOnCurrentPos();
}
break;

View File

@@ -158,7 +158,7 @@ public:
if (Mrfloppy->isDead())
{
me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
Mrfloppy->setDeathState(ALIVE);
Mrfloppy->setDeathState(DeathState::Alive);
Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
Talk(SAY_VICTORY3);
}

View File

@@ -686,7 +686,7 @@ public:
me->DespawnOrUnsummon();
}
else
me->setDeathState(JUST_DIED);
me->setDeathState(DeathState::JustDied);
}
}
}