diff options
author | Xanadu <none@none> | 2010-06-23 05:04:24 +0200 |
---|---|---|
committer | Xanadu <none@none> | 2010-06-23 05:04:24 +0200 |
commit | 30a59b7b6953a7f82f0d5c8c5c5d6fd7c1ee78e4 (patch) | |
tree | a80bdf873345eb45da2ab22d650e13cb3a6fce2d /src | |
parent | 05976b7708cf5e4ffe9fc70d0b530d31c9a96665 (diff) |
Mobs can no longer crit with spells. Closes issue #1704. Based on patch by PSZ.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6764b454c4f..76b87985dec 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10367,6 +10367,10 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const { + // Mobs can't crit with spells. + if (IS_CREATURE_GUID(GetGUID())) + return false; + // not critting spell if ((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT)) return false; |