mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Removed old Spirit of Redemption code
This commit is contained in:
@@ -1859,7 +1859,7 @@ uint32 Battleground::GetAlivePlayersCountByTeam(uint32 Team) const
|
||||
if (itr->second.Team == Team)
|
||||
{
|
||||
Player* player = ObjectAccessor::FindPlayer(itr->first);
|
||||
if (player && player->IsAlive() && player->GetShapeshiftForm() != FORM_SPIRIT_OF_REDEMPTION)
|
||||
if (player && player->IsAlive())
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11032,32 +11032,8 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
|
||||
if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
killerPlayer->UpdateCriteria(CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, 0, victim);
|
||||
|
||||
// if talent known but not triggered (check priest class for speedup check)
|
||||
bool spiritOfRedemption = false;
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST)
|
||||
{
|
||||
if (AuraEffect const* spiritOfRedemptionEffect = GetAuraEffect(20711, EFFECT_0))
|
||||
{
|
||||
// save value before aura remove
|
||||
uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL);
|
||||
if (!ressSpellId)
|
||||
ressSpellId = victim->ToPlayer()->GetResurrectionSpellId();
|
||||
// Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers)
|
||||
victim->RemoveAllAurasOnDeath();
|
||||
// restore for use at real death
|
||||
victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
|
||||
|
||||
// FORM_SPIRIT_OF_REDEMPTION and related auras
|
||||
victim->CastSpell(victim, 27827, true, NULL, spiritOfRedemptionEffect);
|
||||
spiritOfRedemption = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!spiritOfRedemption)
|
||||
{
|
||||
TC_LOG_DEBUG("entities.unit", "SET JUST_DIED");
|
||||
victim->setDeathState(JUST_DIED);
|
||||
}
|
||||
TC_LOG_DEBUG("entities.unit", "SET JUST_DIED");
|
||||
victim->setDeathState(JUST_DIED);
|
||||
|
||||
// Inform pets (if any) when player kills target)
|
||||
// MUST come after victim->setDeathState(JUST_DIED); or pet next target
|
||||
|
||||
@@ -1317,6 +1317,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
case FORM_SPIRIT_OF_REDEMPTION:
|
||||
spellId = 27792;
|
||||
spellId2 = 27795;
|
||||
spellId3 = 62371;
|
||||
break;
|
||||
case FORM_SHADOWFORM:
|
||||
if (target->HasAura(107906)) // Glyph of Shadow
|
||||
@@ -1614,8 +1615,6 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m
|
||||
if (!target->IsStandState())
|
||||
target->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
target->SetHealth(1);
|
||||
}
|
||||
// die at aura end
|
||||
else if (target->IsAlive())
|
||||
|
||||
Reference in New Issue
Block a user