From dc6224d60ad64d4c5eaa69ed0fd814fe92d238e9 Mon Sep 17 00:00:00 2001 From: Shocker Date: Fri, 6 May 2011 13:36:03 +0300 Subject: [PATCH] Core/Spells: Fix Warrior T10 Protection 4P Bonus Closes #1307 --- sql/base/world_database.sql | 1 + .../world/2011_05_06_00_spell_proc_event.sql | 3 +++ src/server/game/Entities/Unit/Unit.cpp | 13 +++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 sql/updates/world/2011_05_06_00_spell_proc_event.sql diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql index c3233254c..80dcb0330 100644 --- a/sql/base/world_database.sql +++ b/sql/base/world_database.sql @@ -19418,6 +19418,7 @@ INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFam ( 70807, 0x00, 11, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Shaman T10 Restoration 2P Bonus ( 70830, 0x00, 11, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Shaman T10 Enhancement 2P Bonus ( 70841, 0x00, 5, 0x00000004, 0x00000100, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Item - Warlock T10 4P Bonus +( 70844, 0x00, 4, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Warrior T10 Protection 4P Bonus ( 70854, 0x00, 4, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Item - Warrior T10 Melee 2P Bonus ( 71176, 0x00, 7, 0x00200002, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Item - Druid T10 Balance Relic (Moonfire and Insect Swarm) ( 71178, 0x00, 7, 0x00000010, 0x00000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Item - Druid T10 Restoration Relic (Rejuvenation) diff --git a/sql/updates/world/2011_05_06_00_spell_proc_event.sql b/sql/updates/world/2011_05_06_00_spell_proc_event.sql new file mode 100644 index 000000000..d08e3df9c --- /dev/null +++ b/sql/updates/world/2011_05_06_00_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` = 70844; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(70844, 0, 4, 256, 0, 0, 0, 0, 0, 0, 0); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 21dc29ec3..1f5a75bd2 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7982,6 +7982,19 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, } break; } + case SPELLFAMILY_WARRIOR: + { + switch (dummySpell->Id) + { + // Item - Warrior T10 Protection 4P Bonus + case 70844: + { + int32 basepoints0 = CalculatePctN(GetMaxHealth(), SpellMgr::CalculateSpellEffectAmount(dummySpell, 1)); + CastCustomSpell(this, 70845, &basepoints0, NULL, NULL, true); + break; + } + } + } } return false; }