[6978] Allow crashing blow only from auto-attack.

Signed-off-by:  Machiavelli <Machiavelli@getmangos.com>

Thanks to Dreamer for patch preparing for mangos.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Machiavelli 2008-12-29 23:24:34 +03:00 committed by VladimirMangos
parent 07394d45da
commit 04af12e82a
2 changed files with 3 additions and 2 deletions

View file

@ -2048,7 +2048,8 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
}
}
if(GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) && !((Creature*)this)->isPet() )
if ((GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) && !((Creature*)this)->isPet()) &&
!SpellCasted /*Only autoattack can be crashing blow*/ )
{
// mobs can score crushing blows if they're 3 or more levels above victim
// or when their weapon skill is 15 or more above victim's defense skill

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6977"
#define REVISION_NR "6978"
#endif // __REVISION_NR_H__