From c9048596827de87a0d0f0880a79a8b8180dad2ce Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:27:52 +0100 Subject: [PATCH] Core/Spells: fix Spirit of Redemption --- src/server/game/Entities/Unit/Unit.cpp | 35 +++++++------------ .../game/Spells/Auras/SpellAuraEffects.cpp | 3 -- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8fd3df2a7c..a7f84306a6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11483,31 +11483,22 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself()) killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, 0, victim); - // 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)) { - AuraEffectList const& dummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); - for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) - { - if ((*itr)->GetSpellInfo()->SpellIconID == 1654) - { - AuraEffect const* aurEff = *itr; - // 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, true, NULL, aurEff); - spiritOfRedemption = true; - break; - } - } + // FORM_SPIRITOFREDEMPTION and related auras + victim->CastSpell(victim, 27827, aurEff); + spiritOfRedemption = true; } if (!spiritOfRedemption) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index edfa5525dc..68c1b44ae6 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1657,9 +1657,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);