aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/1589_world.sql3
-rw-r--r--src/game/SpellAuras.cpp14
-rw-r--r--src/game/Unit.cpp6
3 files changed, 21 insertions, 2 deletions
diff --git a/sql/updates/1589_world.sql b/sql/updates/1589_world.sql
new file mode 100644
index 00000000000..e3a76bedf7d
--- /dev/null
+++ b/sql/updates/1589_world.sql
@@ -0,0 +1,3 @@
+# 1589
+-- Spiritual Attunement
+UPDATE `spell_proc_event` SET `procFlags` = `procFlags`|0x80000 WHERE `entry` IN ('31785','33776');
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 937833eab7d..5e8241b486a 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1140,6 +1140,20 @@ void Aura::HandleAddModifier(bool apply, bool Real)
if(apply)
m_target->CastSpell(m_target,45471,true);
}
+
+ if(spellInfo->SpellFamilyName==SPELLFAMILY_PALADIN && (spellFamilyMask & 0x0000100000000000LL)) // Spiritual Attunement
+ {
+ if(m_target->HasAura(31785,0)) // rank 1
+ {
+ m_target->RemoveAurasDueToSpell(31785);
+ m_target->CastSpell(m_target,31785,true);
+ }
+ if(m_target->HasAura(33776,0)) // rank 2
+ {
+ m_target->RemoveAurasDueToSpell(33776);
+ m_target->CastSpell(m_target,33776,true);
+ }
+ }
}
void Aura::TriggerSpell()
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b4878cbac46..3031a89e0aa 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5908,9 +5908,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false;
// heal amount
- basepoints0 = triggeredByAura->GetModifier()->m_amount*damage/100;
+ basepoints0 = triggeredByAura->GetModifierValue()*std::min(damage,GetMaxHealth() - GetHealth())/100;
target = this;
- triggered_spell_id = 31786;
+
+ if(basepoints0)
+ triggered_spell_id = 31786;
break;
}
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)