Core/Spells: Allow spells with SPELL_DAMAGE_CLASS_NONE to crit
Port From (https://github.com/TrinityCore/TrinityCore/commit/b4064d38c83bc26efa20a248426a9b8cfea6793f)
This commit is contained in:
@@ -3829,7 +3829,7 @@ namespace Game.Spells
|
||||
if (target.IsTypeId(TypeId.Player))
|
||||
target.ToPlayer().UpdateSpellHitChances();
|
||||
else
|
||||
target.ModSpellHitChance += (apply) ? GetAmount() : (-GetAmount());
|
||||
target.ModSpellHitChance += apply ? GetAmount() : (-GetAmount());
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModSpellCritChance)]
|
||||
@@ -3843,7 +3843,7 @@ namespace Game.Spells
|
||||
if (target.IsTypeId(TypeId.Player))
|
||||
target.ToPlayer().UpdateSpellCritChance();
|
||||
else
|
||||
target.BaseSpellCritChance += (apply) ? GetAmount() : -GetAmount();
|
||||
target.BaseSpellCritChance += apply ? GetAmount() : -GetAmount();
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModCritPct)]
|
||||
@@ -3856,7 +3856,7 @@ namespace Game.Spells
|
||||
|
||||
if (!target.IsTypeId(TypeId.Player))
|
||||
{
|
||||
target.BaseSpellCritChance += (apply) ? GetAmount() : -GetAmount();
|
||||
target.BaseSpellCritChance += apply ? GetAmount() : -GetAmount();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3155,19 +3155,6 @@ namespace Game.Entities
|
||||
});
|
||||
}
|
||||
|
||||
// Allows those to crit
|
||||
ApplySpellFix(new[] {
|
||||
379, // Earth Shield
|
||||
71607, // Item - Bauble of True Blood 10m
|
||||
71646, // Item - Bauble of True Blood 25m
|
||||
71610, // Item - Althor's Abacus trigger 10m
|
||||
71641 // Item - Althor's Abacus trigger 25m
|
||||
}, spellInfo =>
|
||||
{
|
||||
// We need more spells to find a general way (if there is any)
|
||||
spellInfo.DmgClass = SpellDmgClass.Magic;
|
||||
});
|
||||
|
||||
ApplySpellFix(new[] {
|
||||
63026, // Summon Aspirant Test NPC (HACK: Target shouldn't be changed)
|
||||
63137 // Summon Valiant Test (HACK: Target shouldn't be changed; summon position should be untied from spell destination)
|
||||
|
||||
Reference in New Issue
Block a user