diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-01-21 20:23:34 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2018-01-21 21:18:02 -0300 |
| commit | 4402f71eb7d17e5cf6b768a452baa00555eff7e4 (patch) | |
| tree | c63d6a8300f9197611f7380d444a91198d68003c /src | |
| parent | 3feb8a6955135ef7e9b0819e21702f03dfcf3890 (diff) | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 33 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 3 |
2 files changed, 15 insertions, 21 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 2a10110b88e..a7293b65120 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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->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); - - // FORM_SPIRITOFREDEMPTION and related auras - victim->CastSpell(victim, 27827, aurEff); - spiritOfRedemption = true; - } + if (AuraEffect const* aurEff = victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 0, 0, 0x200)) + { + // 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; } if (!spiritOfRedemption) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 21909965ebc..05943a924aa 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -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); |
