From 9db4209d1814c3467db20932fcc0e2bd263b8409 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 2 Sep 2022 17:48:00 -0300 Subject: [PATCH 01/11] fix(DB/SAI): Fix Andorgos teleports in AQ40 (#12939) * fix(DB/SAI): Fix Andorgos teleports in AQ40 * Update rev_1662141436327143600.sql * Update rev_1662141436327143600.sql --- .../rev_1662141436327143600.sql | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662141436327143600.sql diff --git a/data/sql/updates/pending_db_world/rev_1662141436327143600.sql b/data/sql/updates/pending_db_world/rev_1662141436327143600.sql new file mode 100644 index 000000000..e41aa6c91 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662141436327143600.sql @@ -0,0 +1,35 @@ +-- +DELETE FROM `gossip_menu` WHERE `MenuID` = 6644 AND `TextID` = 8701; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(6644, 8701); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 6644 AND `SourceEntry` IN (7899, 8701, 8702); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 6644, 7899, 0, 0, 13, 0, 7, 3, 2, 1, 0, 0, '', 'Andorgos show text 7899 if Twin Emperors is not done'), +(14, 6644, 8701, 0, 0, 13, 0, 7, 3, 2, 0, 0, 0, '', 'Andorgos show text 8701 if Twin Emperors is done'), +(14, 6644, 8701, 0, 0, 13, 0, 8, 3, 2, 1, 0, 0, '', 'Andorgos show text 8701 gossip if Ouro is not done'), +(14, 6644, 8702, 0, 0, 13, 0, 8, 3, 2, 0, 0, 0, '', 'Andorgos show text 8702 gossip if Ouro is done'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 6644 AND `SourceEntry` IN (0, 1); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 6644, 0, 0, 0, 13, 0, 7, 3, 2, 0, 0, 0, '', 'Andorgos show gossip if Twin Emperors is done'), +(15, 6644, 1, 0, 0, 13, 0, 8, 3, 2, 0, 0, 0, '', 'Andorgos show gossip if Ouro is done'); + +DELETE FROM `gossip_menu_option` WHERE (`MenuID`=6644 AND `OptionID` IN (0, 1)); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextId`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(6644, 0, 0, 'Teleport me to the lair of the Twin Emperors, please.', 12849, 1, 1, 0, 0, 0, 0, NULL, 0, 0), +(6644, 1, 0, 'Please teleport me to the final chamber.', 12851, 1, 1, 0, 0, 0, 0, NULL, 0, 0); + +DELETE FROM `spell_target_position` WHERE `ID` IN (29181, 29190); +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES +(29181, 0, 531, -8971.81, 1321.47, -104.249, 0, 0), +(29190, 0, 531, -8632.84, 2055.87, 108.86, 0, 0); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15502; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 15502) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 3)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(15502, 0, 0, 1, 62, 0, 100, 0, 6644, 0, 0, 0, 0, 11, 29182, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Andorgos - On Gossip Option 0 Selected - Cast \'Teleport to Twin Emperors\''), +(15502, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 85, 29181, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Andorgos - On Gossip Option 0 Selected - Invoker Cast \'Teleport to Twin Emps Effect DND\''), +(15502, 0, 2, 3, 62, 0, 100, 0, 6644, 1, 0, 0, 0, 11, 29188, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Andorgos - On Gossip Option 1 Selected - Cast \'Teleport to Final Chamber\''), +(15502, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 85, 29190, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Andorgos - On Gossip Option 1 Selected - Invoker Cast \'Teleport to Final Chamber Effect DND\''); From 048d81776bc0ca2adec0eab7d6c0b1c62064c366 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 2 Sep 2022 20:50:04 +0000 Subject: [PATCH 02/11] chore(DB): import pending files Referenced commit(s): 9db4209d1814c3467db20932fcc0e2bd263b8409 --- .../rev_1662141436327143600.sql => db_world/2022_09_02_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662141436327143600.sql => db_world/2022_09_02_05.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1662141436327143600.sql b/data/sql/updates/db_world/2022_09_02_05.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1662141436327143600.sql rename to data/sql/updates/db_world/2022_09_02_05.sql index e41aa6c91..74f4fd8c4 100644 --- a/data/sql/updates/pending_db_world/rev_1662141436327143600.sql +++ b/data/sql/updates/db_world/2022_09_02_05.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_02_04 -> 2022_09_02_05 -- DELETE FROM `gossip_menu` WHERE `MenuID` = 6644 AND `TextID` = 8701; INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES From be29669e0077e8fcfe2a2c648fc1a31ac1a08ce5 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 2 Sep 2022 21:32:41 -0300 Subject: [PATCH 03/11] fix(DB/Loot): Update AQ Scarab item drops (#12935) Create rev_1662127445191277200.sql --- data/sql/updates/pending_db_world/rev_1662127445191277200.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662127445191277200.sql diff --git a/data/sql/updates/pending_db_world/rev_1662127445191277200.sql b/data/sql/updates/pending_db_world/rev_1662127445191277200.sql new file mode 100644 index 000000000..93b4eab3a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662127445191277200.sql @@ -0,0 +1,4 @@ +-- +UPDATE `creature_loot_template` SET `QuestRequired`=0, `Chance`=2 WHERE `Item` BETWEEN 20858 AND 20865; +UPDATE `creature_loot_template` SET `QuestRequired`=0, `Chance`=4 WHERE `entry`=15335 AND `Item` BETWEEN 20858 AND 20865; +UPDATE `creature_loot_template` SET `QuestRequired`=0, `Chance`=6 WHERE `entry`=15333 AND `Item` BETWEEN 20858 AND 20865; From afbe59cc6a1a0988ab617154ddb4381626b050ac Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 3 Sep 2022 00:34:55 +0000 Subject: [PATCH 04/11] chore(DB): import pending files Referenced commit(s): be29669e0077e8fcfe2a2c648fc1a31ac1a08ce5 --- .../rev_1662127445191277200.sql => db_world/2022_09_03_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662127445191277200.sql => db_world/2022_09_03_00.sql} (88%) diff --git a/data/sql/updates/pending_db_world/rev_1662127445191277200.sql b/data/sql/updates/db_world/2022_09_03_00.sql similarity index 88% rename from data/sql/updates/pending_db_world/rev_1662127445191277200.sql rename to data/sql/updates/db_world/2022_09_03_00.sql index 93b4eab3a..c35ad91fd 100644 --- a/data/sql/updates/pending_db_world/rev_1662127445191277200.sql +++ b/data/sql/updates/db_world/2022_09_03_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_02_05 -> 2022_09_03_00 -- UPDATE `creature_loot_template` SET `QuestRequired`=0, `Chance`=2 WHERE `Item` BETWEEN 20858 AND 20865; UPDATE `creature_loot_template` SET `QuestRequired`=0, `Chance`=4 WHERE `entry`=15335 AND `Item` BETWEEN 20858 AND 20865; From cb5e5fb091f2253859e66239622c1dcaa33c76f6 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 2 Sep 2022 23:14:06 -0300 Subject: [PATCH 05/11] fix(DB/creature): Update Vekniss Guardian (15233) movement (#12940) Create rev_1662155367567816700.sql --- data/sql/updates/pending_db_world/rev_1662155367567816700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1662155367567816700.sql diff --git a/data/sql/updates/pending_db_world/rev_1662155367567816700.sql b/data/sql/updates/pending_db_world/rev_1662155367567816700.sql new file mode 100644 index 000000000..a72222626 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662155367567816700.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `MovementType`=1, `wander_distance`=3 WHERE `id1`=15233 AND `map`=531 AND `guid` NOT IN (87595,87596); From 58f0c0500292a45a8e534f3ecc3e2c81d926f1fb Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 3 Sep 2022 02:16:09 +0000 Subject: [PATCH 06/11] chore(DB): import pending files Referenced commit(s): cb5e5fb091f2253859e66239622c1dcaa33c76f6 --- .../rev_1662155367567816700.sql => db_world/2022_09_03_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1662155367567816700.sql => db_world/2022_09_03_01.sql} (74%) diff --git a/data/sql/updates/pending_db_world/rev_1662155367567816700.sql b/data/sql/updates/db_world/2022_09_03_01.sql similarity index 74% rename from data/sql/updates/pending_db_world/rev_1662155367567816700.sql rename to data/sql/updates/db_world/2022_09_03_01.sql index a72222626..0fd219304 100644 --- a/data/sql/updates/pending_db_world/rev_1662155367567816700.sql +++ b/data/sql/updates/db_world/2022_09_03_01.sql @@ -1,2 +1,3 @@ +-- DB update 2022_09_03_00 -> 2022_09_03_01 -- UPDATE `creature` SET `MovementType`=1, `wander_distance`=3 WHERE `id1`=15233 AND `map`=531 AND `guid` NOT IN (87595,87596); From b790038af86ffc8f7eec1bfa7acad84a794c4b0d Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sat, 3 Sep 2022 04:00:32 -0300 Subject: [PATCH 07/11] fix(DB/linked_respawn): General Angerforge shouldn't respawn adds when dead. (#12887) Create rev_1661702045258373700.sql --- .../updates/pending_db_world/rev_1661702045258373700.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1661702045258373700.sql diff --git a/data/sql/updates/pending_db_world/rev_1661702045258373700.sql b/data/sql/updates/pending_db_world/rev_1661702045258373700.sql new file mode 100644 index 000000000..99d550bcd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1661702045258373700.sql @@ -0,0 +1,8 @@ +-- General Angerforge +SET @BOSS=45954; +DELETE FROM `linked_respawn` WHERE `linkedGuid`=@BOSS AND `guid` IN (45955,45956,45958,45959); +INSERT INTO `linked_respawn` (`guid`, `linkedGuid`, `linkType`) VALUES +(45955, @BOSS, 0), +(45956, @BOSS, 0), +(45958, @BOSS, 0), +(45959, @BOSS, 0); From 9c5397572e365acf47ecab357cf88e58e29b323b Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Sat, 3 Sep 2022 03:01:20 -0400 Subject: [PATCH 08/11] chore(Core/Script): Correct spelling of Strength of Ossirian from Strenght (#12945) * Create blackrock-drakes.sql * Guess I guess * yummy english words * ALMOST FORGOT :))))) --- .../scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index 004665c1e..702974877 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -40,7 +40,7 @@ enum Spells SPELL_CURSE_OF_TONGUES = 25195, SPELL_ENVELOPING_WINDS = 25189, SPELL_WAR_STOMP = 25188, - SPELL_STRENGHT_OF_OSSIRIAN = 25176, + SPELL_STRENGTH_OF_OSSIRIAN = 25176, SPELL_SAND_STORM = 25160, SPELL_SUMMON_CRYSTAL = 25192, SPELL_SUMMON_SMALL_OBSIDIAN_CHUNK = 27627, // Server-side @@ -148,7 +148,7 @@ struct boss_ossirian : public BossAI { if (spell->Id == weakness) { - me->RemoveAurasDueToSpell(SPELL_STRENGHT_OF_OSSIRIAN); + me->RemoveAurasDueToSpell(SPELL_STRENGTH_OF_OSSIRIAN); } } } @@ -169,7 +169,7 @@ struct boss_ossirian : public BossAI events.ScheduleEvent(EVENT_SILENCE, 30s); events.ScheduleEvent(EVENT_CYCLONE, 20s); events.ScheduleEvent(EVENT_STOMP, 30s); - DoCastSelf(SPELL_STRENGHT_OF_OSSIRIAN); + DoCastSelf(SPELL_STRENGTH_OF_OSSIRIAN); Talk(SAY_AGGRO); Map* map = me->GetMap(); @@ -253,7 +253,7 @@ struct boss_ossirian : public BossAI events.Update(diff); bool applySupreme = true; - if (me->HasAura(SPELL_STRENGHT_OF_OSSIRIAN)) + if (me->HasAura(SPELL_STRENGTH_OF_OSSIRIAN)) { applySupreme = false; } @@ -271,7 +271,7 @@ struct boss_ossirian : public BossAI if (applySupreme) { - DoCastSelf(SPELL_STRENGHT_OF_OSSIRIAN); + DoCastSelf(SPELL_STRENGTH_OF_OSSIRIAN); Talk(SAY_SUPREME); } From 9e7aae74ac9ed36c4f2f985965d7b3baba2fc80d Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 3 Sep 2022 04:01:39 -0300 Subject: [PATCH 09/11] fix(Scripts/Spells): Fix Itch (26078) not applying Vekniss Catalyst (#12930) --- data/sql/updates/pending_db_world/rev_1662084538205393900.sql | 3 +++ src/server/scripts/Spells/spell_generic.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1662084538205393900.sql diff --git a/data/sql/updates/pending_db_world/rev_1662084538205393900.sql b/data/sql/updates/pending_db_world/rev_1662084538205393900.sql new file mode 100644 index 000000000..daa6332c3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1662084538205393900.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 26077 AND `ScriptName` = 'spell_itch_aq40'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (26077, 'spell_itch_aq40'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 6036ab00d..280fd2c60 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -4478,7 +4478,8 @@ enum AQSpells SPELL_CONSUME_LEECH_HEAL_AQ20 = 25378, SPELL_CONSUME_SPIT_OUT = 25383, - SPELL_HIVEZARA_CATALYST = 25187 + SPELL_HIVEZARA_CATALYST = 25187, + SPELL_VEKNISS_CATALYST = 26078 }; class spell_gen_consume : public AuraScript @@ -4706,4 +4707,5 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_remove_impairing_auras); RegisterSpellScriptWithArgs(spell_gen_consume, "spell_consume_aq20", SPELL_CONSUME_LEECH_AQ20, SPELL_CONSUME_LEECH_HEAL_AQ20); RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq20", SPELL_HIVEZARA_CATALYST, EFFECT_0, SPELL_AURA_DUMMY); + RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq40", SPELL_VEKNISS_CATALYST, EFFECT_0, SPELL_AURA_DUMMY); } From 674f7e0f12b90ebbb869d0bdcb1ba7e9e2daf8e0 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 3 Sep 2022 07:03:49 +0000 Subject: [PATCH 10/11] chore(DB): import pending files Referenced commit(s): 9e7aae74ac9ed36c4f2f985965d7b3baba2fc80d --- .../rev_1661702045258373700.sql => db_world/2022_09_03_02.sql} | 1 + .../rev_1662084538205393900.sql => db_world/2022_09_03_03.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1661702045258373700.sql => db_world/2022_09_03_02.sql} (86%) rename data/sql/updates/{pending_db_world/rev_1662084538205393900.sql => db_world/2022_09_03_03.sql} (81%) diff --git a/data/sql/updates/pending_db_world/rev_1661702045258373700.sql b/data/sql/updates/db_world/2022_09_03_02.sql similarity index 86% rename from data/sql/updates/pending_db_world/rev_1661702045258373700.sql rename to data/sql/updates/db_world/2022_09_03_02.sql index 99d550bcd..c093b1516 100644 --- a/data/sql/updates/pending_db_world/rev_1661702045258373700.sql +++ b/data/sql/updates/db_world/2022_09_03_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_03_01 -> 2022_09_03_02 -- General Angerforge SET @BOSS=45954; DELETE FROM `linked_respawn` WHERE `linkedGuid`=@BOSS AND `guid` IN (45955,45956,45958,45959); diff --git a/data/sql/updates/pending_db_world/rev_1662084538205393900.sql b/data/sql/updates/db_world/2022_09_03_03.sql similarity index 81% rename from data/sql/updates/pending_db_world/rev_1662084538205393900.sql rename to data/sql/updates/db_world/2022_09_03_03.sql index daa6332c3..91aec4a26 100644 --- a/data/sql/updates/pending_db_world/rev_1662084538205393900.sql +++ b/data/sql/updates/db_world/2022_09_03_03.sql @@ -1,3 +1,4 @@ +-- DB update 2022_09_03_02 -> 2022_09_03_03 -- DELETE FROM `spell_script_names` WHERE `spell_id` = 26077 AND `ScriptName` = 'spell_itch_aq40'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (26077, 'spell_itch_aq40'); From 31892275b0aa9b9fc3f56dedb83052d20923f04b Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 3 Sep 2022 15:32:30 +0200 Subject: [PATCH 11/11] fix(Core/Spells): Resistance auras should affect creatures. (#12946) Fixes #12867 --- .../game/Spells/Auras/SpellAuraEffects.cpp | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 0717511cc..4468cf6c2 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3953,20 +3953,11 @@ void AuraEffect::HandleAuraModBaseResistancePCT(AuraApplication const* aurApp, u return; Unit* target = aurApp->GetTarget(); - - // only players have base stats - if (target->GetTypeId() != TYPEID_PLAYER) + for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++) { - //pets only have base armor - if (target->IsPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)) - target->HandleStatModifier(UNIT_MOD_ARMOR, BASE_PCT, float(GetAmount()), apply); - } - else - { - for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++) + if (GetMiscValue() & int32(1 << x)) { - if (GetMiscValue() & int32(1 << x)) - target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(GetAmount()), apply); + target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(GetAmount()), apply); } } } @@ -3998,16 +3989,11 @@ void AuraEffect::HandleModBaseResistance(AuraApplication const* aurApp, uint8 mo return; Unit* target = aurApp->GetTarget(); - - // only players and pets have base stats - if (target->IsPlayer() || target->IsPet()) + for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) { - for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) + if (GetMiscValue() & (1 << i)) { - if (GetMiscValue() & (1 << i)) - { - target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(GetAmount()), apply); - } + target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(GetAmount()), apply); } } }