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:
ariel-
2018-01-21 20:23:34 -03:00
parent 3feb8a6955
commit 4402f71eb7
2 changed files with 13 additions and 19 deletions

View File

@@ -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)

View File

@@ -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);