Core/Spells: fix Spirit of Redemption
This commit is contained in:
1 parent
b705a16631
commit
c904859682
2 files changed
+13
-25
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user