diff --git a/sql/mangos.sql b/sql/mangos.sql index d782ee46c..cd01f1f02 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_8929_01_mangos_gossip_scripts` bit(1) default NULL + `required_8930_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -18391,6 +18391,7 @@ INSERT INTO `spell_proc_event` VALUES (58364, 0x00000000, 4, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (58372, 0x00000000, 4, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (58386, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000020, 0.000000, 0.000000, 0), +(58597, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000, 0.000000, 100.000000,0), (58616, 0x00000000, 15, 0x01000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (58620, 0x00000000, 15, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (58626, 0x00000000, 15, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/8930_01_mangos_spell_proc_event.sql b/sql/updates/8930_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..9b05a2e63 --- /dev/null +++ b/sql/updates/8930_01_mangos_spell_proc_event.sql @@ -0,0 +1,5 @@ +ALTER TABLE db_version CHANGE COLUMN required_8929_01_mangos_gossip_scripts required_8930_01_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE `entry` IN (58597); +INSERT INTO `spell_proc_event` VALUES +(58597, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000, 0.000000, 100.000000,0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index a130d0092..fa414d1ac 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -191,6 +191,7 @@ pkgdata_DATA = \ 8917_01_mangos_spell_proc_event.sql \ 8923_01_mangos_gossip.sql \ 8929_01_mangos_gossip_scripts.sql \ + 8930_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -362,4 +363,5 @@ EXTRA_DIST = \ 8917_01_mangos_spell_proc_event.sql \ 8923_01_mangos_gossip.sql \ 8929_01_mangos_gossip_scripts.sql \ + 8930_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 701e5ec2a..1c7a8a7e8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5933,13 +5933,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu basepoints0 = GetAttackTime(BASE_ATTACK) * int32(ap*0.022f + 0.044f * holy) / 1000; break; } - // Sacred Shield - if (dummySpell->SpellFamilyFlags & UI64LIT(0x0008000000000000)) - { - triggered_spell_id = 58597; - target = this; - break; - } // Righteous Vengeance if (dummySpell->SpellIconID == 3025) { @@ -6040,6 +6033,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } + // Spiritual Attunement + case 31785: + case 33776: + { + // if healed by another unit (pVictim) + if(this == pVictim) + return false; + + // heal amount + basepoints0 = triggerAmount*damage/100; + target = this; + triggered_spell_id = 31786; + break; + } // Seal of Vengeance (damage calc on apply aura) case 31801: { @@ -6077,20 +6084,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Replenishment CastSpell(this, 57669, true, NULL, triggeredByAura); break; - // Spiritual Attunement - case 31785: - case 33776: - { - // if healed by another unit (pVictim) - if(this == pVictim) - return false; - - // heal amount - basepoints0 = triggerAmount*damage/100; - target = this; - triggered_spell_id = 31786; - break; - } // Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal) case 40470: { @@ -6119,29 +6112,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu 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; - } // Light's Beacon (heal target area aura) case 53651: { @@ -6177,6 +6147,43 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu beacon->CastCustomSpell(beacon,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura,pVictim->GetGUID()); return true; } + // 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; + } + // Glyph of Flash of Light + case 54936: + { + triggered_spell_id = 54957; + basepoints0 = triggerAmount*damage/100; + break; + } + // Glyph of Holy Light + case 54937: + { + triggered_spell_id = 54968; + basepoints0 = triggerAmount*damage/100; + break; + } // Glyph of Divinity case 54939: { @@ -6190,18 +6197,23 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } return true; } - // Glyph of Flash of Light - case 54936: + // Sacred Shield (buff) + case 58597: { - triggered_spell_id = 54957; - basepoints0 = triggerAmount*damage/100; + triggered_spell_id = 66922; + SpellEntry const* triggeredEntry = sSpellStore.LookupEntry(triggered_spell_id); + if (!triggeredEntry) + return false; + + basepoints0 = int32(damage / (GetSpellDuration(triggeredEntry) / triggeredEntry->EffectAmplitude[0])); + target = this; break; } - // Glyph of Holy Light - case 54937: + // Sacred Shield (talent rank) + case 53601: { - triggered_spell_id = 54968; - basepoints0 = triggerAmount*damage/100; + triggered_spell_id = 58597; + target = this; break; } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 27f77340c..80ae63a67 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 "8929" + #define REVISION_NR "8930" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 851acb02d..c1d431514 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_8874_01_characters_character_skills" - #define REVISION_DB_MANGOS "required_8929_01_mangos_gossip_scripts" + #define REVISION_DB_MANGOS "required_8930_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_8728_01_realmd_account" #endif // __REVISION_SQL_H__