[8487] Fixes in paladin seals and related spells.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
nos4r2zod 2009-09-11 06:06:36 +04:00 committed by VladimirMangos
parent 53c96fc731
commit d91f2c2c35
9 changed files with 148 additions and 73 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0', `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'; ) 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'), ('30455', '0.1429', '0', '0', 'Mage - Ice Lance'),
('34913','0', '0', '0', 'Mage - Molten Armor Triggered'), ('34913','0', '0', '0', 'Mage - Molten Armor Triggered'),
/* Paladin */ /* Paladin */
('19750','0.4286', '0', '0', 'Paladin - Flash of Light'), (31935, 0.07, 0, 0.07, 'Paladin - Avengers Shiled'),
('635', '0.7143', '0', '0', 'Paladin - Holy Light'), (53742, 0, 0.0156, 0.03, 'Paladin - Blood Corruption'),
('25912', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt'), (26573, 0, 0.04, 0.04, 'Paladin - Consecration'),
('25914', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal'), (879, 0.15, 0, 0.15, 'Paladin - Exorcism'),
('31935', '0.07', '0', '0.07', 'Paladin - Avengers Shiled'), (19750, 0.4286, 0, 0, 'Paladin - Flash of Light'),
('26573', '0', '0.04', '0.04', 'Paladin - Consecration'), (53595, 0, 0, 0, 'Paladin - Hammer of the Righteous'),
('879', '0.15', '0', '0.15', 'Paladin - Exorcism'), (24275, 0.15, 0, 0.15, 'Paladin - Hammer of Wrath'),
('24275', '0.15', '0', '0.15', 'Paladin - Hammer of Wrath'), (635, 0.7143, 0, 0, 'Paladin - Holy Light'),
('20925', '0.09', '0', '0.056', 'Paladin - Holy Shield'), (25914, 0.4286, 0, 0, 'Paladin - Holy Shock Triggered Heal'),
('2812', '0.07', '0', '0.07', 'Paladin - Holy Wrath'), (25912, 0.4286, 0, 0, 'Paladin - Holy Shock Triggered Hurt'),
('31893', '0.25', '0', '0.16', 'Paladin - Seal of Blood Enemy Proc'), (20925, 0.09, 0, 0.056, 'Paladin - Holy Shield'),
('32221', '0.25', '0', '0.16', 'Paladin - Seal of Blood Self Proc'), (31803, 0, 0.0156, 0.03, 'Paladin - Holy Vengeance'),
('20424', '0.25', '0', '0.16', 'Paladin - Seal of Command Proc'), (2812, 0.07, 0, 0.07, 'Paladin - Holy Wrath'),
('379', '0', '0', '0', 'Shaman - Earth Shield Triggered'), (31898, 0.18, 0, 0.11, 'Paladin - Judgement of Blood Enemy'),
('20167', '0.25', '0', '0.16', 'Paladin - Seal of Light Proc'), (32220, 0.0594, 0, 0.0363,'Paladin - Judgement of Blood Self'),
('53719', '0.25', '0', '0.16', 'Paladin - Seal of The Martyr Enemy Proc'), (20467, 0.25, 0, 0.16, 'Paladin - Judgement of Command'),
('53718', '0.25', '0', '0.16', 'Paladin - Seal of The Martyr Self Proc'), (53733, 0, 0, 0, 'Paladin - Judgement of Corruption'),
('25742', '0.07', '0', '0.039', 'Paladin - Seal of Righteousness Dummy Proc'), (53726, 0.18, 0, 0.11, 'Paladin - Judgement of the Martyr Enemy'),
('53595', '0', '0', '0','Paladin - Hammer of the Righteous'), (53725, 0.0594, 0, 0.0363,'Paladin - Judgement of the Martyr Self'),
('31803', '0', '0.013', '0.15', 'Paladin - Holy Vengeance'), (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 */ /* Priest */
('32546', '0.8068', '0', '0', 'Priest - Binding Heal'), ('32546', '0.8068', '0', '0', 'Priest - Binding Heal'),
('34861', '0.402', '0', '0', 'Priest - Circle of Healing'), ('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'), ('585', '0.714', '0', '0', 'Priest - Smite'),
('34914', '0', '0.4', '0', 'Priest - Vampiric Touch'), ('34914', '0', '0.4', '0', 'Priest - Vampiric Touch'),
/* Shaman */ /* Shaman */
(379, 0, 0, 0, 'Shaman - Earth Shield Triggered'),
('974', '0.4762', '0', '0', 'Shaman - Earth Shield'), ('974', '0.4762', '0', '0', 'Shaman - Earth Shield'),
('1064', '1.34', '0', '0', 'Shaman - Chain Heal'), ('1064', '1.34', '0', '0', 'Shaman - Chain Heal'),
('331', '1.6106', '0', '0', 'Shaman - Healing Wave'), ('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), (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), (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), (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), (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), (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), (31836, 0x00000000, 10, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),

View file

@ -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");

View file

@ -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);

View file

@ -101,6 +101,8 @@ pkgdata_DATA = \
8462_01_mangos_creature_ai_texts.sql \ 8462_01_mangos_creature_ai_texts.sql \
8469_01_characters_character_spell.sql \ 8469_01_characters_character_spell.sql \
8482_01_mangos_spell_elixir.sql \ 8482_01_mangos_spell_elixir.sql \
8487_01_mangos_spell_bonus_data.sql \
8487_02_mangos_spell_proc_event.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -182,4 +184,6 @@ EXTRA_DIST = \
8462_01_mangos_creature_ai_texts.sql \ 8462_01_mangos_creature_ai_texts.sql \
8469_01_characters_character_spell.sql \ 8469_01_characters_character_spell.sql \
8482_01_mangos_spell_elixir.sql \ 8482_01_mangos_spell_elixir.sql \
8487_01_mangos_spell_bonus_data.sql \
8487_02_mangos_spell_proc_event.sql \
README README

View file

@ -998,13 +998,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo); caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo);
caster->DealSpellDamage(&damageInfo, true); 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) // Passive spell hits/misses or active spells only misses (only triggers)
else else

View file

@ -610,9 +610,17 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
} }
case SPELLFAMILY_PALADIN: 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) 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); float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget); m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
@ -621,11 +629,13 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
uint32 stacks = 0; uint32 stacks = 0;
Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) 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(); stacks = (*itr)->GetStackAmount();
break; break;
} }
}
// + 10% for each application of Holy Vengeance on the target // + 10% for each application of Holy Vengeance on the target
if(stacks) if(stacks)
damage += damage * stacks * 10 /100; damage += damage * stacks * 10 /100;
@ -1674,25 +1684,7 @@ void Spell::EffectDummy(uint32 i)
if (!spell_proto) if (!spell_proto)
return; return;
if (!unitTarget->hasUnitState(UNIT_STAT_STUNNED) && m_caster->GetTypeId()==TYPEID_PLAYER) m_caster->CastSpell(unitTarget, spell_proto, true, NULL);
{
// 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);
return; return;
} }
} }
@ -4654,13 +4646,33 @@ void Spell::EffectWeaponDmg(uint32 i)
if(m_caster->GetTypeId()==TYPEID_PLAYER) if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1); ((Player*)m_caster)->AddComboPoints(unitTarget, 1);
} }
// Mangle (Cat): CP // 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) if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1); ((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 // take ammo
if(m_attackType == RANGED_ATTACK && m_caster->GetTypeId() == TYPEID_PLAYER) if(m_attackType == RANGED_ATTACK && m_caster->GetTypeId() == TYPEID_PLAYER)

View file

@ -5737,6 +5737,43 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false; return false;
triggered_spell_id = 31803; 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; break;
} }
// Spiritual Attunement // Spiritual Attunement
@ -5756,16 +5793,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Seal of Blood do damage trigger // Seal of Blood do damage trigger
case 31892: 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; 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 else
return true; return true;
break; break;
@ -5773,16 +5803,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Seal of the Martyr do damage trigger // Seal of the Martyr do damage trigger
case 53720: 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; 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 else
return true; return true;
break; break;
@ -8453,12 +8476,22 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break; break;
} }
break; break;
} }
} }
break; break;
} }
case SPELL_DAMAGE_CLASS_MELEE: 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: case SPELL_DAMAGE_CLASS_RANGED:
{ {
if (pVictim) if (pVictim)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8486" #define REVISION_NR "8487"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__ #ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__ #define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_8469_01_characters_character_spell" #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" #define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters"
#endif // __REVISION_SQL_H__ #endif // __REVISION_SQL_H__