diff --git a/sql/mangos.sql b/sql/mangos.sql index 65c9cd1e1..5db0de543 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -24,7 +24,7 @@ CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, `cache_id` int(10) default '0', - `required_8511_01_mangos_spell_proc_event` bit(1) default NULL + `required_8514_01_mangos_spell_bonus_data` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -13659,6 +13659,7 @@ INSERT INTO `spell_bonus_data` VALUES (20925, 0.09, 0, 0.056, 'Paladin - Holy Shield'), (31803, 0, 0.0156, 0.03, 'Paladin - Holy Vengeance'), (2812, 0.07, 0, 0.07, 'Paladin - Holy Wrath'), +(54158, 0.25, 0, 0, 'Paladin - Judgement'), (31898, 0.18, 0, 0.11, 'Paladin - Judgement of Blood Enemy'), (32220, 0.0594, 0, 0.0363,'Paladin - Judgement of Blood Self'), (20467, 0.25, 0, 0.16, 'Paladin - Judgement of Command'), diff --git a/sql/updates/8514_01_mangos_spell_bonus_data.sql b/sql/updates/8514_01_mangos_spell_bonus_data.sql new file mode 100644 index 000000000..8549ee6df --- /dev/null +++ b/sql/updates/8514_01_mangos_spell_bonus_data.sql @@ -0,0 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_8511_01_mangos_spell_proc_event required_8514_01_mangos_spell_bonus_data bit; + +DELETE FROM `spell_bonus_data` WHERE `entry` IN (54158); + +INSERT INTO `spell_bonus_data` VALUES +(54158, 0.25, 0, 0, 'Paladin - Judgement'); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 5ec5c3507..6174f2357 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -111,6 +111,7 @@ pkgdata_DATA = \ 8504_02_mangos_playercreateinfo_action.sql \ 8505_01_characters_character_spell.sql \ 8511_01_mangos_spell_proc_event.sql \ + 8514_01_mangos_spell_bonus_data.sql \ README ## Additional files to include when running 'make dist' @@ -202,4 +203,5 @@ EXTRA_DIST = \ 8504_02_mangos_playercreateinfo_action.sql \ 8505_01_characters_character_spell.sql \ 8511_01_mangos_spell_proc_event.sql \ + 8514_01_mangos_spell_bonus_data.sql \ README diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d2d6e464f..9566aa1c9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -669,6 +669,12 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) { damage+=int32(m_caster->GetShieldBlockValue()); } + // Judgement + else if (m_spellInfo->Id == 54158) + { + // [1 + 0.25 * SPH + 0.16 * AP] + damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.16f); + } break; } } @@ -5405,13 +5411,12 @@ void Spell::EffectScriptEffect(uint32 effIndex) sLog.outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id); return; } - // all seals have aura dummy in 2 effect + // offensive seals have aura dummy in 2 effect Unit::AuraList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY); for(Unit::AuraList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr) { - SpellEntry const *spellInfo = (*itr)->GetSpellProto(); - // search seal (all seals have judgement's aura dummy spell id in 2 effect - if ((*itr)->GetEffIndex() != 2 || !spellInfo || !IsSealSpell(spellInfo)) + // search seal (offensive seals have judgement's aura dummy spell id in 2 effect + if ((*itr)->GetEffIndex() != 2 || !IsSealSpell((*itr)->GetSpellProto())) continue; spellId2 = (*itr)->GetModifier()->m_amount; SpellEntry const *judge = sSpellStore.LookupEntry(spellId2); @@ -5419,6 +5424,18 @@ void Spell::EffectScriptEffect(uint32 effIndex) continue; break; } + // if there were no offensive seals than there is seal with proc trigger aura + if (!spellId2) + { + Unit::AuraList const& procTriggerAuras = m_caster->GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL); + for(Unit::AuraList::const_iterator itr = procTriggerAuras.begin(); itr != procTriggerAuras.end(); ++itr) + { + if ((*itr)->GetEffIndex() != 0 || !IsSealSpell((*itr)->GetSpellProto())) + continue; + spellId2 = 54158; + break; + } + } if (spellId1) m_caster->CastSpell(unitTarget, spellId1, true); if (spellId2) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 5ba8cfadf..43c17ce48 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8513" + #define REVISION_NR "8514" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index ad8ef1bbe..ee51ea207 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_8505_01_characters_character_spell" - #define REVISION_DB_MANGOS "required_8511_01_mangos_spell_proc_event" + #define REVISION_DB_MANGOS "required_8514_01_mangos_spell_bonus_data" #define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters" #endif // __REVISION_SQL_H__