diff --git a/sql/mangos.sql b/sql/mangos.sql index 35d5aa490..b625aaf43 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_8841_02_mangos_spell_chain` bit(1) default NULL + `required_8847_02_mangos_spell_chain` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -15166,6 +15166,10 @@ INSERT INTO spell_chain VALUES (27180,24239,24275,4,0), (48805,27180,24275,5,0), (48806,48805,24275,6,0), +/*Heart of the Crusader*/ +(20335, 0, 20335, 1, 0), +(20336, 20335, 20335, 2, 0), +(20337, 20336, 20335, 3, 0), /*Retribution Aura*/ (7294,0,7294,1,0), (10298,7294,7294,2,0), @@ -17759,6 +17763,7 @@ INSERT INTO `spell_proc_event` VALUES (20215, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (20234, 0x00000000, 10, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (20235, 0x00000000, 10, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(20335, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000008, 0x00000100, 0x00000000, 0.000000, 100.000000, 0), (20375, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 7.000000, 0.000000, 0), (20500, 0x00000000, 4, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (20501, 0x00000000, 4, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/8847_01_mangos_spell_proc_event.sql b/sql/updates/8847_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..d80a8277c --- /dev/null +++ b/sql/updates/8847_01_mangos_spell_proc_event.sql @@ -0,0 +1,7 @@ +ALTER TABLE db_version CHANGE COLUMN required_8841_02_mangos_spell_chain required_8847_01_mangos_spell_proc_event bit; + +-- (20335) Heart of the Crusader (Rank 1) +DELETE FROM `spell_proc_event` WHERE `entry` IN (20335); +INSERT INTO `spell_proc_event` VALUES + (20335, 0x00, 10, 0x00800000, 0x00000000, 0x00000008, 0x00000100, 0x00000000, 0.000000, 100.000000, 0); + diff --git a/sql/updates/8847_02_mangos_spell_chain.sql b/sql/updates/8847_02_mangos_spell_chain.sql new file mode 100644 index 000000000..f2a6d2560 --- /dev/null +++ b/sql/updates/8847_02_mangos_spell_chain.sql @@ -0,0 +1,8 @@ +ALTER TABLE db_version CHANGE COLUMN required_8847_01_mangos_spell_proc_event required_8847_02_mangos_spell_chain bit; + +DELETE FROM spell_chain WHERE first_spell = 20335; + +INSERT INTO spell_chain VALUES + (20335, 0, 20335, 1, 0), + (20336, 20335, 20335, 2, 0), + (20337, 20336, 20335, 3, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 8a871d150..6a42daadc 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -167,6 +167,8 @@ pkgdata_DATA = \ 8841_01_mangos_spell_proc_event.sql \ 8841_02_mangos_spell_chain.sql \ 8843_01_characters.sql \ + 8847_01_mangos_spell_proc_event.sql \ + 8847_02_mangos_spell_chain.sql \ README ## Additional files to include when running 'make dist' @@ -314,4 +316,6 @@ EXTRA_DIST = \ 8841_01_mangos_spell_proc_event.sql \ 8841_02_mangos_spell_chain.sql \ 8843_01_characters.sql \ + 8847_01_mangos_spell_proc_event.sql \ + 8847_02_mangos_spell_chain.sql \ README diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 2d4d5590c..a5d861c26 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -294,7 +294,8 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002190)) return SPELL_HAND; - if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200)) + // skip Heart of the Crusader that have also same spell family mask + if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200) && (spellInfo->SpellIconID != 237)) return SPELL_JUDGEMENT; // only paladin auras have this (for palaldin class family) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5bd16537a..b608a3416 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5793,20 +5793,32 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } return true; } - // Judgements of the Wise - case 31876: - case 31877: - case 31878: - // triggered only at casted Judgement spells, not at additional Judgement effects - if(!procSpell || procSpell->Category != 1210) - return false; - - target = this; - triggered_spell_id = 31930; - - // Replenishment - CastSpell(this, 57669, true, NULL, triggeredByAura); + // Heart of the Crusader (Rank 1) + case 20335: + triggered_spell_id = 21183; break; + // Heart of the Crusader (Rank 2) + case 20336: + triggered_spell_id = 54498; + break; + // Heart of the Crusader (Rank 3) + case 20337: + triggered_spell_id = 54499; + break; + case 20911: // Blessing of Sanctuary + case 25899: // Greater Blessing of Sanctuary + { + target = this; + switch (target->getPowerType()) + { + case POWER_MANA: + triggered_spell_id = 57319; + break; + default: + return false; + } + break; + } // Holy Power (Redemption Armor set) case 28789: { @@ -5838,20 +5850,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } break; } - case 25899: // Greater Blessing of Sanctuary - case 20911: // Blessing of Sanctuary - { - target = this; - switch (target->getPowerType()) - { - case POWER_MANA: - triggered_spell_id = 57319; - break; - default: - return false; - } - break; - } // Seal of Vengeance (damage calc on apply aura) case 31801: { @@ -5875,6 +5873,62 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu CastSpell(target,42463,true,NULL,triggeredByAura); break; } + // Judgements of the Wise + case 31876: + case 31877: + case 31878: + // triggered only at casted Judgement spells, not at additional Judgement effects + if(!procSpell || procSpell->Category != 1210) + return false; + + target = this; + triggered_spell_id = 31930; + + // 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: + { + if (!procSpell) + return false; + + float chance; + + // Flash of light/Holy light + if (procSpell->SpellFamilyFlags & UI64LIT(0x00000000C0000000)) + { + triggered_spell_id = 40471; + chance = 15.0f; + } + // Judgement (any) + else if (GetSpellSpecific(procSpell->Id)==SPELL_JUDGEMENT) + { + triggered_spell_id = 40472; + chance = 50.0f; + } + else + return false; + + if (!roll_chance_f(chance)) + return false; + + break; + } // Seal of Corruption (damage calc on apply aura) case 53736: { @@ -5898,20 +5952,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu CastSpell(target,53739,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; - } // Light's Beacon (heal target area aura) case 53651: { @@ -5947,34 +5987,6 @@ 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; } - // Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal) - case 40470: - { - if (!procSpell) - return false; - - float chance; - - // Flash of light/Holy light - if (procSpell->SpellFamilyFlags & UI64LIT(0x00000000C0000000)) - { - triggered_spell_id = 40471; - chance = 15.0f; - } - // Judgement (any) - else if (GetSpellSpecific(procSpell->Id)==SPELL_JUDGEMENT) - { - triggered_spell_id = 40472; - chance = 50.0f; - } - else - return false; - - if (!roll_chance_f(chance)) - return false; - - break; - } // Glyph of Divinity case 54939: { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d8b146786..7baed7acb 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 "8846" + #define REVISION_NR "8847" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 7a6159cd0..868960607 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_8843_01_characters" - #define REVISION_DB_MANGOS "required_8841_02_mangos_spell_chain" + #define REVISION_DB_MANGOS "required_8847_02_mangos_spell_chain" #define REVISION_DB_REALMD "required_8728_01_realmd_account" #endif // __REVISION_SQL_H__