From d91f2c2c355cddca3fe8f5fe1edcf5ca055c7228 Mon Sep 17 00:00:00 2001 From: nos4r2zod Date: Fri, 11 Sep 2009 06:06:36 +0400 Subject: [PATCH] [8487] Fixes in paladin seals and related spells. Signed-off-by: VladimirMangos --- sql/mangos.sql | 54 ++++++++------ .../8487_01_mangos_spell_bonus_data.sql | 20 ++++++ .../8487_02_mangos_spell_proc_event.sql | 3 + sql/updates/Makefile.am | 4 ++ src/game/Spell.cpp | 7 -- src/game/SpellEffects.cpp | 58 +++++++++------ src/game/Unit.cpp | 71 ++++++++++++++----- src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 9 files changed, 148 insertions(+), 73 deletions(-) create mode 100644 sql/updates/8487_01_mangos_spell_bonus_data.sql create mode 100644 sql/updates/8487_02_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index 6a5a42f3a..9feb72f23 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_8482_01_mangos_spell_elixir` bit(1) default NULL + `required_8487_02_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -13648,26 +13648,36 @@ INSERT INTO `spell_bonus_data` VALUES ('30455', '0.1429', '0', '0', 'Mage - Ice Lance'), ('34913','0', '0', '0', 'Mage - Molten Armor Triggered'), /* Paladin */ -('19750','0.4286', '0', '0', 'Paladin - Flash of Light'), -('635', '0.7143', '0', '0', 'Paladin - Holy Light'), -('25912', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt'), -('25914', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal'), -('31935', '0.07', '0', '0.07', 'Paladin - Avengers Shiled'), -('26573', '0', '0.04', '0.04', 'Paladin - Consecration'), -('879', '0.15', '0', '0.15', 'Paladin - Exorcism'), -('24275', '0.15', '0', '0.15', 'Paladin - Hammer of Wrath'), -('20925', '0.09', '0', '0.056', 'Paladin - Holy Shield'), -('2812', '0.07', '0', '0.07', 'Paladin - Holy Wrath'), -('31893', '0.25', '0', '0.16', 'Paladin - Seal of Blood Enemy Proc'), -('32221', '0.25', '0', '0.16', 'Paladin - Seal of Blood Self Proc'), -('20424', '0.25', '0', '0.16', 'Paladin - Seal of Command Proc'), -('379', '0', '0', '0', 'Shaman - Earth Shield Triggered'), -('20167', '0.25', '0', '0.16', 'Paladin - Seal of Light Proc'), -('53719', '0.25', '0', '0.16', 'Paladin - Seal of The Martyr Enemy Proc'), -('53718', '0.25', '0', '0.16', 'Paladin - Seal of The Martyr Self Proc'), -('25742', '0.07', '0', '0.039', 'Paladin - Seal of Righteousness Dummy Proc'), -('53595', '0', '0', '0','Paladin - Hammer of the Righteous'), -('31803', '0', '0.013', '0.15', 'Paladin - Holy Vengeance'), +(31935, 0.07, 0, 0.07, 'Paladin - Avengers Shiled'), +(53742, 0, 0.0156, 0.03, 'Paladin - Blood Corruption'), +(26573, 0, 0.04, 0.04, 'Paladin - Consecration'), +(879, 0.15, 0, 0.15, 'Paladin - Exorcism'), +(19750, 0.4286, 0, 0, 'Paladin - Flash of Light'), +(53595, 0, 0, 0, 'Paladin - Hammer of the Righteous'), +(24275, 0.15, 0, 0.15, 'Paladin - Hammer of Wrath'), +(635, 0.7143, 0, 0, 'Paladin - Holy Light'), +(25914, 0.4286, 0, 0, 'Paladin - Holy Shock Triggered Heal'), +(25912, 0.4286, 0, 0, 'Paladin - Holy Shock Triggered Hurt'), +(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'), +(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'), +(53733, 0, 0, 0, 'Paladin - Judgement of Corruption'), +(53726, 0.18, 0, 0.11, 'Paladin - Judgement of the Martyr Enemy'), +(53725, 0.0594, 0, 0.0363,'Paladin - Judgement of the Martyr Self'), +(31804, 0, 0, 0, 'Paladin - Judgement of Vengeance'), +(31893, 0, 0, 0, 'Paladin - Seal of Blood Proc Enemy'), +(32221, 0, 0, 0, 'Paladin - Seal of Blood Proc Self'), +(20424, 0, 0, 0, 'Paladin - Seal of Command Proc'), +(53739, 0, 0.00156, 0.003, 'Paladin - Seal of Corruption (full stack proc)'), +(20167, 0.25, 0, 0.16, 'Paladin - Seal of Light Proc'), +(25742, 0.07, 0, 0.039, 'Paladin - Seal of Righteousness Dummy Proc'), +(53719, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Enemy'), +(53718, 0, 0, 0, 'Paladin - Seal of the Martyr Proc Self'), +(42463, 0, 0.00156, 0.003, 'Paladin - Seal of Vengeance (full stack proc)'), + /* Priest */ ('32546', '0.8068', '0', '0', 'Priest - Binding Heal'), ('34861', '0.402', '0', '0', 'Priest - Circle of Healing'), @@ -13692,6 +13702,7 @@ INSERT INTO `spell_bonus_data` VALUES ('585', '0.714', '0', '0', 'Priest - Smite'), ('34914', '0', '0.4', '0', 'Priest - Vampiric Touch'), /* Shaman */ +(379, 0, 0, 0, 'Shaman - Earth Shield Triggered'), ('974', '0.4762', '0', '0', 'Shaman - Earth Shield'), ('1064', '1.34', '0', '0', 'Shaman - Chain Heal'), ('331', '1.6106', '0', '0', 'Shaman - Healing Wave'), @@ -17483,7 +17494,6 @@ INSERT INTO `spell_proc_event` VALUES (31570, 0x00000000, 3, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (31785, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00008800, 0x00000000, 0.000000, 0.000000, 0), (31794, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), -(31801, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,20.000000, 0.000000, 0), (31833, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (31835, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (31836, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/8487_01_mangos_spell_bonus_data.sql b/sql/updates/8487_01_mangos_spell_bonus_data.sql new file mode 100644 index 000000000..880f4773b --- /dev/null +++ b/sql/updates/8487_01_mangos_spell_bonus_data.sql @@ -0,0 +1,20 @@ +ALTER TABLE db_version CHANGE COLUMN required_8482_01_mangos_spell_elixir required_8487_01_mangos_spell_bonus_data bit; + +DELETE FROM `spell_bonus_data` where entry in (20424, 20467, 42463, 53739, 31803, 53742, 31804, 53733, 31893, 32221, 32220, 31898, 53719, 53718, 53725, 53726); +INSERT INTO `spell_bonus_data` VALUES +(20424, 0, 0, 0, "Paladin - Seal of Command Proc"), +(20467, 0.25, 0, 0.16, "Paladin - Judgement of Command"), +(42463, 0, 0.00156, 0.003, "Paladin - Seal of Vengeance (full stack proc)"), +(53739, 0, 0.00156, 0.003, "Paladin - Seal of Corruption (full stack proc)"), +(31803, 0, 0.0156, 0.03, "Paladin - Holy Vengeance"), +(53742, 0, 0.0156, 0.03, "Paladin - Blood Corruption"), +(31804, 0, 0, 0, "Paladin - Judgement of Vengeance"), +(53733, 0, 0, 0, "Paladin - Judgement of Corruption"), +(31893, 0, 0, 0, "Paladin - Seal of Blood Proc Enemy"), +(32221, 0, 0, 0, "Paladin - Seal of Blood Proc Self"), +(31898, 0.18, 0, 0.11, "Paladin - Judgement of Blood Enemy"), +(32220, 0.0594, 0, 0.0363, "Paladin - Judgement of Blood Self"), +(53719, 0, 0, 0, "Paladin - Seal of the Martyr Proc Enemy"), +(53718, 0, 0, 0, "Paladin - Seal of the Martyr Proc Self"), +(53726, 0.18, 0, 0.11, "Paladin - Judgement of the Martyr Enemy"), +(53725, 0.0594, 0, 0.0363, "Paladin - Judgement of the Martyr Self"); diff --git a/sql/updates/8487_02_mangos_spell_proc_event.sql b/sql/updates/8487_02_mangos_spell_proc_event.sql new file mode 100644 index 000000000..2ca276dd8 --- /dev/null +++ b/sql/updates/8487_02_mangos_spell_proc_event.sql @@ -0,0 +1,3 @@ +ALTER TABLE db_version CHANGE COLUMN required_8487_01_mangos_spell_bonus_data required_8487_02_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE `entry` IN (31801, 53736); \ No newline at end of file diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 60ace4e61..f1e8f3be5 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -101,6 +101,8 @@ pkgdata_DATA = \ 8462_01_mangos_creature_ai_texts.sql \ 8469_01_characters_character_spell.sql \ 8482_01_mangos_spell_elixir.sql \ + 8487_01_mangos_spell_bonus_data.sql \ + 8487_02_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -182,4 +184,6 @@ EXTRA_DIST = \ 8462_01_mangos_creature_ai_texts.sql \ 8469_01_characters_character_spell.sql \ 8482_01_mangos_spell_elixir.sql \ + 8487_01_mangos_spell_bonus_data.sql \ + 8487_02_mangos_spell_proc_event.sql \ README diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 23e9fa7db..2899bf394 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -998,13 +998,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); caster->DealSpellDamage(&damageInfo, true); - - // Judgement of Blood - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000800000000)) && m_spellInfo->SpellIconID==153) - { - int32 damagePoint = damageInfo.damage * 33 / 100; - m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); - } } // Passive spell hits/misses or active spells only misses (only triggers) else diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 4a11368bd..fe7a4e5c2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -610,9 +610,17 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) } case SPELLFAMILY_PALADIN: { - // Judgement of Vengeance ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance on the target + // Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292) { + uint32 debuf_id; + switch(m_spellInfo->Id) + { + case 53733: debuf_id = 53742; break;// Judgement of Corruption -> Blood Corruption + case 31804: debuf_id = 31803; break;// Judgement of Vengeance -> Holy Vengeance + default: return; + } + float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget); @@ -621,11 +629,13 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) uint32 stacks = 0; Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) - if((*itr)->GetId() == 31803 && (*itr)->GetCasterGUID()==m_caster->GetGUID()) + { + if( ((*itr)->GetId() == debuf_id) && (*itr)->GetCasterGUID()==m_caster->GetGUID()) { stacks = (*itr)->GetStackAmount(); break; } + } // + 10% for each application of Holy Vengeance on the target if(stacks) damage += damage * stacks * 10 /100; @@ -1674,25 +1684,7 @@ void Spell::EffectDummy(uint32 i) if (!spell_proto) return; - if (!unitTarget->hasUnitState(UNIT_STAT_STUNNED) && m_caster->GetTypeId()==TYPEID_PLAYER) - { - // decreased damage (/2) for non-stunned target. - SpellModifier *mod = new SpellModifier; - mod->op = SPELLMOD_DAMAGE; - mod->value = -50; - mod->type = SPELLMOD_PCT; - mod->spellId = m_spellInfo->Id; - mod->mask = UI64LIT(0x0000020000000000); - mod->mask2= UI64LIT(0x0); - - ((Player*)m_caster)->AddSpellMod(mod, true); - m_caster->CastSpell(unitTarget, spell_proto, true, NULL); - // mod deleted - ((Player*)m_caster)->AddSpellMod(mod, false); - } - else - m_caster->CastSpell(unitTarget, spell_proto, true, NULL); - + m_caster->CastSpell(unitTarget, spell_proto, true, NULL); return; } } @@ -4654,13 +4646,33 @@ void Spell::EffectWeaponDmg(uint32 i) if(m_caster->GetTypeId()==TYPEID_PLAYER) ((Player*)m_caster)->AddComboPoints(unitTarget, 1); } - // Mangle (Cat): CP - if (m_spellInfo->SpellFamilyName==SPELLFAMILY_DRUID && (m_spellInfo->SpellFamilyFlags==UI64LIT(0x0000040000000000))) + else if (m_spellInfo->SpellFamilyName==SPELLFAMILY_DRUID && (m_spellInfo->SpellFamilyFlags==UI64LIT(0x0000040000000000))) { if(m_caster->GetTypeId()==TYPEID_PLAYER) ((Player*)m_caster)->AddComboPoints(unitTarget, 1); } + else if(m_spellInfo->SpellFamilyName==SPELLFAMILY_PALADIN) + { + // Judgement of Blood/of the Martyr backlash damage (33%) + if(m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL && m_spellInfo->SpellIconID==153) + { + int32 damagePoint = m_damage * 33 / 100; + if(m_spellInfo->Id == 31898) + m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); + else + m_caster->CastCustomSpell(m_caster, 53725, &damagePoint, NULL, NULL, true); + } + // Seal of Blood/of the Martyr backlash damage (10%) + else if(m_spellInfo->SpellIconID==2293) + { + int32 damagePoint = m_damage * 10 / 100; + if(m_spellInfo->Id == 31893) + m_caster->CastCustomSpell(m_caster, 32221, &damagePoint, NULL, NULL, true); + else + m_caster->CastCustomSpell(m_caster, 53718, &damagePoint, NULL, NULL, true); + } + } // take ammo if(m_attackType == RANGED_ATTACK && m_caster->GetTypeId() == TYPEID_PLAYER) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2725018f0..b32904c82 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5737,6 +5737,43 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return false; triggered_spell_id = 31803; + + // Add 5-stack effect + int8 stacks = 0; + AuraList const& auras = target->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) + { + if( ((*itr)->GetId() == 31803) && (*itr)->GetCasterGUID()==GetGUID()) + { + stacks = (*itr)->GetStackAmount(); + break; + } + } + if(stacks >= 5) + CastSpell(target,42463,true,NULL,triggeredByAura); + break; + } + // Seal of Corruption (damage calc on apply aura) + case 53736: + { + if(effIndex != 0) // effect 1,2 used by seal unleashing code + return false; + + triggered_spell_id = 53742; + + // Add 5-stack effect + int8 stacks = 0; + AuraList const& auras = target->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) + { + if( ((*itr)->GetId() == 53742) && (*itr)->GetCasterGUID()==GetGUID()) + { + stacks = (*itr)->GetStackAmount(); + break; + } + } + if(stacks >= 5) + CastSpell(target,53739,true,NULL,triggeredByAura); break; } // Spiritual Attunement @@ -5756,16 +5793,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Seal of Blood do damage trigger case 31892: { - if (effIndex == 0) // 0 effect - is proc on enemy + // 0 effect - is proc on enemy + if (effIndex == 0 && (procFlag & PROC_FLAG_SUCCESSFUL_MILEE_HIT)) triggered_spell_id = 31893; - else if (effIndex == 1) // 1 effect - is proc on self - { - // add spell damage from prev effect (27%) - damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100; - basepoints0 = triggerAmount * damage / 100; - target = this; - triggered_spell_id = 32221; - } else return true; break; @@ -5773,16 +5803,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Seal of the Martyr do damage trigger case 53720: { - if (effIndex == 0) // 0 effect - is proc on enemy + // 0 effect - is proc on enemy + if (effIndex == 0 && (procFlag & PROC_FLAG_SUCCESSFUL_MILEE_HIT)) triggered_spell_id = 53719; - else if (effIndex == 1) // 1 effect - is proc on self - { - // add spell damage from prev effect (27%) - damage += CalculateDamage(BASE_ATTACK, false) * 27 / 100; - basepoints0 = triggerAmount * damage / 100; - target = this; - triggered_spell_id = 53718; - } else return true; break; @@ -8453,12 +8476,22 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM break; } break; - } } break; } case SPELL_DAMAGE_CLASS_MELEE: + { + // Judgement of Command proc always crits on stunned target + if(spellProto->SpellFamilyName == SPELLFAMILY_PALADIN) + { + if(spellProto->SpellFamilyFlags & 0x0000000000800000LL && spellProto->SpellIconID == 561) + { + if(pVictim->hasUnitState(UNIT_STAT_STUNNED)) + return true; + } + } + } case SPELL_DAMAGE_CLASS_RANGED: { if (pVictim) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9a4c49a4a..a235038f8 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 "8486" + #define REVISION_NR "8487" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 1b4adb2c7..67808b66d 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_8469_01_characters_character_spell" - #define REVISION_DB_MANGOS "required_8482_01_mangos_spell_elixir" + #define REVISION_DB_MANGOS "required_8487_02_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters" #endif // __REVISION_SQL_H__