[Core/Spells] Fix Blood Tap (finally fixes full spell)

ignore removal of aura provided by Souler thanks!
This commit is contained in:
kandera
2012-01-04 11:50:31 -05:00
parent 9c5637a35f
commit 34c437e973
2 changed files with 28 additions and 0 deletions
@@ -23201,6 +23201,9 @@ void Player::RemoveRunesByAuraEffect(AuraEffect const* aura)
void Player::RestoreBaseRune(uint8 index) void Player::RestoreBaseRune(uint8 index)
{ {
AuraEffect const* aura = m_runes->runes[index].ConvertAura; AuraEffect const* aura = m_runes->runes[index].ConvertAura;
// If rune was converted by a non-pasive aura that still active we should keep it converted
if (aura && !(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_PASSIVE))
return;
ConvertRune(index, GetBaseRune(index)); ConvertRune(index, GetBaseRune(index));
SetRuneConvertAura(index, NULL); SetRuneConvertAura(index, NULL);
// Don't drop passive talents providing rune convertion // Don't drop passive talents providing rune convertion
+25
View File
@@ -7003,10 +7003,35 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
{ {
if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue)) if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
{ {
if (m_spellInfo->Id == 45529)
if (player->GetBaseRune(j) != RuneType(m_spellInfo->Effects[effIndex].MiscValueB))
continue;
player->SetRuneCooldown(j, 0); player->SetRuneCooldown(j, 0);
--count; --count;
} }
} }
// Blood Tap
if (m_spellInfo->Id == 45529 && count > 0)
{
for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l)
{
// Check if both runes are on cd as that is the only time when this needs to come into effect
if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)))
{
// Should always update the rune with the lowest cd
if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1))
l++;
player->SetRuneCooldown(l, 0);
--count;
// is needed to push through to the client that the rune is active
player->ResyncRunes(MAX_RUNES);
}
else
break;
}
}
// Empower rune weapon // Empower rune weapon
if (m_spellInfo->Id == 47568) if (m_spellInfo->Id == 47568)
{ {