fix(Scripts/Commands): Remove Spirit of Redemption when using Revive … (#20492)

fix(Scripts/Commands): Remove Spirit of Redemption when using Revive command
This commit is contained in:
Andrew
2024-11-10 15:02:02 -03:00
committed by GitHub
parent 264f924f46
commit 3866c35f2f

View File

@@ -1157,19 +1157,15 @@ public:
static bool HandleReviveCommand(ChatHandler* handler, Optional<PlayerIdentifier> target)
{
if (!target)
{
target = PlayerIdentifier::FromTargetOrSelf(handler);
}
if (!target)
{
return false;
}
if (target->IsConnected())
{
auto targetPlayer = target->GetConnectedPlayer();
targetPlayer->RemoveAurasDueToSpell(27827); // Spirit of Redemption
targetPlayer->ResurrectPlayer(!AccountMgr::IsPlayerAccount(targetPlayer->GetSession()->GetSecurity()) ? 1.0f : 0.5f);
targetPlayer->SpawnCorpseBones();
targetPlayer->SaveToDB(false, false);