Did this some time ago. It’s a workaround however.
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 6fb8065..755449a 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4480,15 +4480,26 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_
return modifier;
}
-int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
+int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value, SpellInfo const* spellProto) const
{
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
- if ((*i)->GetMiscValue() == misc_value)
- modifier += (*i)->GetAmount();
+ if (spellProto)
+ {
+ if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellIconID == 548 && (*i)->GetId() == 58943)) // Mind Flay & Da Voodoo Shuffle
+ {
+ if ((*i)->GetMiscValue() == misc_value)
+ modifier += (*i)->GetAmount();
+ }
+ }
+ else
+ {
+ if ((*i)->GetMiscValue() == misc_value)
+ modifier += (*i)->GetAmount();
+ }
}
return modifier;
}
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 6371124..682a51c 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1806,7 +1806,7 @@ class Unit : public WorldObject
int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, const AuraEffect* except = NULL) const;
int32 GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const;
- int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
+ int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value, SpellInfo const* spellProto = NULL) const;
float GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_value) const;
int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const;
And since this patch did break lots of stuff, I re-fixed it ontop of it :
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index d9e5908..3d2e7d0 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4489,13 +4489,21 @@ int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value,
{
if (spellProto)
{
- // Mind Flay & Da Voodoo Shuffle
- if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellIconID == 548 && (*i)->GetId() == 58943))
+ // Mind Flay - Prevent Da Vodoo Shuffle from affecting it
+ if (spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellIconID == 548)
+ {
+ if ((*i)->GetId() != 58943)
+ if ((*i)->GetMiscValue() == misc_value)
+ modifier += (*i)->GetAmount();
+ }
+ // Any other case, even though a spellProto was provided - Just ignore the spellProto
+ else
{
if ((*i)->GetMiscValue() == misc_value)
modifier += (*i)->GetAmount();
}
}
+ // No SpellProto was provided, just add the modifier if miscValues matches
else
{
if ((*i)->GetMiscValue() == misc_value)
@@ -13124,7 +13132,7 @@ int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, in
if (!(mechanic & 1<<i))
continue;
// Find total mod value (negative bonus)
- int32 new_durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, i);
+ int32 new_durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, i, spellProto);
// Find max mod (negative bonus)
int32 new_durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, i);
// Check if mods applied before were weaker
Apply the first one, then the second. preferably by hand.