mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
refactor(Core/Misc): Make DeathState enum class (#17607)
This commit is contained in:
@@ -506,7 +506,7 @@ struct npc_echo_of_medivh : public ScriptedAI
|
||||
|
||||
piece->CombatStop();
|
||||
piece->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
piece->setDeathState(JUST_RESPAWNED);
|
||||
piece->setDeathState(DeathState::JustRespawned);
|
||||
piece->SetHealth(piece->GetMaxHealth());
|
||||
break;
|
||||
}
|
||||
@@ -528,7 +528,7 @@ struct npc_echo_of_medivh : public ScriptedAI
|
||||
|
||||
piece->CombatStop();
|
||||
piece->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
piece->setDeathState(JUST_RESPAWNED);
|
||||
piece->setDeathState(DeathState::JustRespawned);
|
||||
piece->SetHealth(piece->GetMaxHealth());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
if (Creature* piece = instance->GetCreature(chessPieceGUID))
|
||||
{
|
||||
piece->RemoveAllAuras();
|
||||
piece->setDeathState(JUST_RESPAWNED);
|
||||
piece->setDeathState(DeathState::JustRespawned);
|
||||
piece->SetHealth(piece->GetMaxHealth());
|
||||
float x, y, z, o;
|
||||
piece->GetHomePosition(x, y, z, o);
|
||||
|
||||
@@ -741,7 +741,7 @@ public:
|
||||
break;
|
||||
case 11:
|
||||
Talk(EMOTE_DIES);
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->setDeathState(DeathState::JustDied);
|
||||
me->SetHealth(0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
Creature* creature = (ObjectAccessor::GetCreature((*me), AddGUID[i]));
|
||||
if (!creature || !creature->IsAlive())
|
||||
{
|
||||
if (creature) creature->setDeathState(DEAD);
|
||||
if (creature) creature->setDeathState(DeathState::Dead);
|
||||
creature = me->SummonCreature(AddEntry[i], Pos_X[i], POS_Y, POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if (creature) AddGUID[i] = creature->GetGUID();
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, SpiritGUID[i]))
|
||||
{
|
||||
temp->SetVisible(false);
|
||||
temp->setDeathState(DEAD);
|
||||
temp->setDeathState(DeathState::Dead);
|
||||
}
|
||||
}
|
||||
SpiritGUID[i].Clear();
|
||||
|
||||
@@ -1300,7 +1300,7 @@ public:
|
||||
{
|
||||
khanokGUID = temp->GetGUID();
|
||||
if (Creature* khanok = ObjectAccessor::GetCreature(*me, khanokGUID))
|
||||
khanok->setDeathState(JUST_DIED);
|
||||
khanok->setDeathState(DeathState::JustDied);
|
||||
}
|
||||
if (Unit* temp = me->SummonCreature(NPC_PUTRESS, AllianceSpawn[12].x, AllianceSpawn[12].y, AllianceSpawn[12].z, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user