Skip to content

Commit

Permalink
Fix ravager axe not properly proccing deep wounds, weapon enchants et…
Browse files Browse the repository at this point in the history
…c on bladestorm hits, fixed ravager axe issue where channeling would stop when target died, extra attacks generated while channeling will now be applied after channelling is complete, this matches behaviour of classic. Fix issue with ravager bladestorm where its whirlwind hits could not reproc blade storm.
  • Loading branch information
scottnice committed Aug 14, 2023
1 parent 4e9b446 commit 066497b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sql/migrations/20230814003800_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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`='20230814003800');
IF v=0 THEN
INSERT INTO `migrations` VALUES ('20230814003800');
-- Add your query below.

-- Allow Ravager whirlwind to proc other things by setting AttributesEx3 to SPELL_ATTR_EX3_CAN_PROC_FROM_PROCS
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 (9633, 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 512, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 'Ravager Whirlwind weapon procs');

-- End of migration.
END IF;
END??
delimiter ;
CALL add_migration();
DROP PROCEDURE IF EXISTS add_migration;
2 changes: 2 additions & 0 deletions src/game/Objects/SpellCaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,8 @@ SpellCastResult SpellCaster::CastSpell(SpellCaster* pTarget, SpellEntry const* s
// as soon as the target dies or leaves the area of the effect
if (spellInfo->Targets & TARGET_FLAG_DEST_LOCATION)
targets.setDestination(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
// handle specific case of weapons that apply positive auras on hit like Ravager and Bonereaver's Edge
else if (spellInfo->Targets == TARGET_FLAG_SELF && spellInfo->Custom & SPELL_CUSTOM_POSITIVE) {}
else if (Unit* pUnitTarget = pTarget->ToUnit())
targets.setUnitTarget(pUnitTarget);
else if (GameObject* pGoTarget = pTarget->ToGameObject())
Expand Down
3 changes: 3 additions & 0 deletions src/game/Objects/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ AutoAttackCheckResult Unit::CanAutoAttackTarget(Unit const* pVictim) const
if (HasUnitState(UNIT_STAT_CAN_NOT_REACT) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
return ATTACK_RESULT_CANT_ATTACK;

if (IsPlayer() && m_currentSpells[CURRENT_CHANNELED_SPELL])
return ATTACK_RESULT_CANT_ATTACK;

if (!pVictim->IsAlive() || !IsAlive())
return ATTACK_RESULT_DEAD;

Expand Down
5 changes: 5 additions & 0 deletions src/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
(m_spellInfo->IsFitToFamilyMask<CF_PALADIN_JUDGEMENT_OF_RIGHTEOUSNESS>() && m_spellInfo->SpellIconID == 25))
triggerWeaponProcs = true;
}
// Ravager Whirlwind procs weapon attacks
else if (m_spellInfo->Id == 9633)
{
triggerWeaponProcs = true;
}
}

pCaster->DealSpellDamage(&damageInfo, true);
Expand Down

0 comments on commit 066497b

Please sign in to comment.