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; 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 diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index a04d602083d..ab6e167d853 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -371,7 +371,12 @@ 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. @@ -550,7 +555,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) { @@ -609,7 +614,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 @@ -635,6 +640,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 {