diff options
-rw-r--r-- | sql/base/world_database.sql | 2 | ||||
-rw-r--r-- | sql/updates/world/2011_05_13_01_world_spell_bonus_data.sql | 4 | ||||
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 10 | ||||
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 18 |
4 files changed, 30 insertions, 4 deletions
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index 9f56ac3adf3..08c47498236 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -16901,6 +16901,7 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a (2912, 1, -1, -1, -1, 'Druid - Starfire'), (18562, 0, 0, 0, 0, 'Druid - Swiftmend'), (779, -1, -1, 0.063, -1, 'Druid - Swipe (Bear)'), +(467, 0.033, -1, -1, -1, 'Druid - Thorns'), (44203, 0.538, -1, -1, -1, 'Druid - Tranquility Triggered'), (61391, 0.193, -1, -1, -1, 'Druid - Typhoon'), (48438, -1, 0.11505, -1, -1, 'Druid - Wild Growth'), @@ -16973,6 +16974,7 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a (53725, 0.0833, -1, 0.0533, -1, 'Paladin - Judgement of the Martyr Self'), (31804, 0.22, 0, 0.14, 0, 'Paladin - Judgement of Vengeance'), (54158, 0.25, 0, 0.16, 0, 'Paladin - Judgement (Seal of Light, Seal of Wisdom, Seal of Justice)'), +(7294, 0.033, -1, -1, -1, 'Paladin - Retribution Aura'), (58597, 0.75, -1, -1, -1, 'Paladin - Sacred Shield'), (53601, 0.75, -1, -1, -1, 'Paladin - Sacred Shield'), (31893, 0, 0, 0, 0, 'Paladin - Seal of Blood Proc Enemy'), diff --git a/sql/updates/world/2011_05_13_01_world_spell_bonus_data.sql b/sql/updates/world/2011_05_13_01_world_spell_bonus_data.sql new file mode 100644 index 00000000000..63d0407efe7 --- /dev/null +++ b/sql/updates/world/2011_05_13_01_world_spell_bonus_data.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (467,7294); +INSERT INTO `spell_bonus_data` VALUES +(467,0.033,-1,-1,-1,'Druid - Thorns'), +(7294,0.033,-1,-1,-1,'Paladin - Retribution Aura'); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 2aa78e6f5b4..265a3248428 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1456,6 +1456,16 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) uint32 damage = (*dmgShieldItr)->GetAmount(); + int32 bonus = 0; + bonus += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, GetSpellSchoolMask(i_spellProto)); + if (Unit * caster = (*dmgShieldItr)->GetCaster()) + { + bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, GetSpellSchoolMask(i_spellProto)); + bonus += caster->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS, GetCreatureTypeMask()); + } + if (bonus) + AddPctN(damage, bonus); + // No Unit::CalcAbsorbResist here - opcode doesn't send that data - this damage is probably not affected by that pVictim->DealDamageMods(this, damage, NULL); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index fcfef1f9cfa..04c1eb0f3aa 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -597,10 +597,20 @@ int32 AuraEffect::CalculateAmount(Unit * caster) case SPELL_AURA_DAMAGE_SHIELD: if (!caster) break; - // Thorns - if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x100) - // 3.3% from sp bonus - DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.033f; + + if (caster->GetTypeId() == TYPEID_PLAYER) + { + DoneActualBenefit += caster->SpellDamageBonus(GetBase()->GetUnitOwner(), GetSpellProto(), 0, SPELL_DIRECT_DAMAGE); + DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto()); + amount += (int32)DoneActualBenefit; + + // Thorns + if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x100) + if (AuraEffect * aurEff = caster->GetAuraEffectOfRankedSpell(16836, 0)) + AddPctN(amount, aurEff->GetAmount()); + + return amount; + } break; case SPELL_AURA_PERIODIC_DAMAGE: if (!caster) |