mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: fix Spirit of Redemption
- Who would have suspected GetAuraEffect (iconId override) did a check against null spellfamilyflags? - Remove mirror timers hack (triggered spell already allows underwater breathing)
This commit is contained in:
@@ -11842,25 +11842,22 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
|
||||
killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim);
|
||||
|
||||
// Spirit of Redemption
|
||||
// if talent known but not triggered (check priest class for speedup check)
|
||||
// if talent known but not triggered
|
||||
bool spiritOfRedemption = false;
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST)
|
||||
if (AuraEffect const* aurEff = victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 0, 0, 0x200))
|
||||
{
|
||||
if (AuraEffect const* aurEff = victim->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 1654, 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);
|
||||
// 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_SPIRITOFREDEMPTION and related auras
|
||||
victim->CastSpell(victim, 27827, aurEff);
|
||||
spiritOfRedemption = true;
|
||||
}
|
||||
// FORM_SPIRITOFREDEMPTION and related auras
|
||||
victim->CastSpell(victim, 27827, aurEff);
|
||||
spiritOfRedemption = true;
|
||||
}
|
||||
|
||||
if (!spiritOfRedemption)
|
||||
|
||||
@@ -1506,9 +1506,6 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m
|
||||
{
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// disable breath/etc timers
|
||||
target->ToPlayer()->StopMirrorTimers();
|
||||
|
||||
// set stand state (expected in this form)
|
||||
if (!target->IsStandState())
|
||||
target->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
Reference in New Issue
Block a user