From 38f9c1c18d0c1c7548f223d30b8f40bc46912d2d Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 9 Jun 2024 17:51:41 +0300 Subject: [PATCH 1/6] Update Unit.cpp --- src/game/Objects/Unit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/Objects/Unit.cpp b/src/game/Objects/Unit.cpp index 10199abd9b7..5f40644317e 100644 --- a/src/game/Objects/Unit.cpp +++ b/src/game/Objects/Unit.cpp @@ -5337,6 +5337,9 @@ bool Unit::IsSpellCrit(Unit const* pVictim, SpellEntry const* spellProto, SpellS if (spellProto->SpellFamilyName == SPELLFAMILY_POTION || (spellProto->IsFitToFamily())) crit_chance = 10.0f; + // flat 5% crit chance for Sweeping Strikes + if (spellProto->Id == 26654) + crit_chance = 5.0f; else { // Wand shoot forced to use ranged crit From 90f31400fc10c3fd435acd0f01beee5cf82993f9 Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 9 Jun 2024 17:55:29 +0300 Subject: [PATCH 2/6] Update UnitAuraProcHandler.cpp --- src/game/UnitAuraProcHandler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index a04d602083d..1b1295a242f 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -550,7 +550,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 amount, uint uint32 triggered_spell_id = 0; Unit* target = pVictim; int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0}; - + int8 stacks_left = triggeredByAura->GetHolder()->GetAuraCharges(); switch (dummySpell->SpellFamilyName) { @@ -635,6 +635,13 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 amount, uint triggered_spell_id = 12723; // Note this SS id deals 1 damage by itself (Cannot crit) } } + else if (procSpell && procSpell->Id == 1680 && stacks_left > 1) //Whirlwind + { + basepoints[0] = ditheru(amount * 100 / CalcArmorReducedDamage(pVictim, 100)); + triggered_spell_id = 12723; + CastSpell(pVictim, 26654, true); + triggeredByAura->GetHolder()->DropAuraCharge(); + } else // Full damage on anything else #endif { From 28c74abe3eeabb83e793dfe932990184fe3561a7 Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 9 Jun 2024 17:56:49 +0300 Subject: [PATCH 3/6] Create 20240609140450_world.sql --- sql/migrations/20240609140450_world.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/migrations/20240609140450_world.sql diff --git a/sql/migrations/20240609140450_world.sql b/sql/migrations/20240609140450_world.sql new file mode 100644 index 00000000000..24640ed0c62 --- /dev/null +++ b/sql/migrations/20240609140450_world.sql @@ -0,0 +1,22 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20240413115356'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20240609140450'); +-- Add your query below. + + +--Fix Sweeping Strikes flags (always hit, cant be dodged/parried/blocked) +INSERT INTO `spell_mod` (`Id`, `procChance`, `procFlags`, `procCharges`, `DurationIndex`, `Category`, `CastingTimeIndex`, `StackAmount`, `SpellIconID`, `activeIconID`, `manaCost`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `Custom`, `InterruptFlags`, `AuraInterruptFlags`, `ChannelInterruptFlags`, `Dispel`, `Stances`, `StancesNot`, `SpellVisual`, `ManaCostPercentage`, `StartRecoveryCategory`, `StartRecoveryTime`, `MaxAffectedTargets`, `MaxTargetLevel`, `DmgClass`, `rangeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `SpellFamilyName`, `SpellFamilyFlags`, `Mechanic`, `EquippedItemClass`, `Comment`) VALUES (12723, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2359312, -1, 541065344, 262656, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, NULL); +INSERT INTO `spell_mod` (`Id`, `procChance`, `procFlags`, `procCharges`, `DurationIndex`, `Category`, `CastingTimeIndex`, `StackAmount`, `SpellIconID`, `activeIconID`, `manaCost`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `Custom`, `InterruptFlags`, `AuraInterruptFlags`, `ChannelInterruptFlags`, `Dispel`, `Stances`, `StancesNot`, `SpellVisual`, `ManaCostPercentage`, `StartRecoveryCategory`, `StartRecoveryTime`, `MaxAffectedTargets`, `MaxTargetLevel`, `DmgClass`, `rangeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `SpellFamilyName`, `SpellFamilyFlags`, `Mechanic`, `EquippedItemClass`, `Comment`) VALUES (26654, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2359312, -1, 4194432, 262656, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, NULL); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; From bcc4d10e24cdb28af9fa5cf9819d5386b5f7b0d4 Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 9 Jun 2024 18:03:54 +0300 Subject: [PATCH 4/6] Update UnitAuraProcHandler.cpp --- src/game/UnitAuraProcHandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 1b1295a242f..c53adb6bc6b 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -371,7 +371,11 @@ SpellProcEventTriggerCheck Unit::IsTriggeredAtSpellProcEvent(Unit* pVictim, Spel return SPELL_PROC_TRIGGER_OK; } #endif - + // Never proc for Rend. + if (spellProto->Id == 12292) + { + if (procSpell->SpellIconID == 245) + return SPELL_PROC_TRIGGER_FAILED; // SHAMAN // Elemental Mastery // Do not consume aura if spell did not benefit from crit chance bonus. From 523870ede2a2b1ac4ba96d11b58adc5ca2979665 Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 9 Jun 2024 18:09:39 +0300 Subject: [PATCH 5/6] Sweeping strikes fixes --- src/game/UnitAuraProcHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index c53adb6bc6b..90d64fdfdb6 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -613,7 +613,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 amount, uint target = SelectRandomUnfriendlyTarget(pVictim, radius, false, true, false); #endif if (!target) - return SPELL_AURA_PROC_FAILED; + return SPELL_AURA_PROC_OK; //Burn charges when solo target // World of Warcraft Client Patch 1.10.0 (2006-03-28) // - Execute - This ability will now work with Sweeping Strikes again. If From d968531ea13130508f74094c02df4d51f6e519ea Mon Sep 17 00:00:00 2001 From: Spit <110714733+Otari98@users.noreply.github.com> Date: Sun, 30 Jun 2024 17:23:13 +0300 Subject: [PATCH 6/6] added missing closing bracket --- src/game/UnitAuraProcHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 90d64fdfdb6..ab6e167d853 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -376,6 +376,7 @@ SpellProcEventTriggerCheck Unit::IsTriggeredAtSpellProcEvent(Unit* pVictim, Spel { if (procSpell->SpellIconID == 245) return SPELL_PROC_TRIGGER_FAILED; + } // SHAMAN // Elemental Mastery // Do not consume aura if spell did not benefit from crit chance bonus.