mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[6984] Update crushing blow chance calculation for 3.0.3.
Required 4 level difference. Player also can crushing blow if controlled and then considered as creature.
This commit is contained in:
parent
71c67a5202
commit
3f397ed035
2 changed files with 8 additions and 4 deletions
|
|
@ -2036,10 +2036,14 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
|
|||
}
|
||||
}
|
||||
|
||||
if ((GetTypeId()!=TYPEID_PLAYER && !(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) && !((Creature*)this)->isPet()))
|
||||
// mobs can score crushing blows if they're 4 or more levels above victim
|
||||
if (getLevelForTarget(pVictim) >= pVictim->getLevelForTarget(this) + 4 &&
|
||||
// can be from by creature (if can) or from controlled player that considered as creature
|
||||
(GetTypeId()!=TYPEID_PLAYER && !((Creature*)this)->isPet() &&
|
||||
!(((Creature*)this)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRUSH) ||
|
||||
GetTypeId()==TYPEID_PLAYER && GetCharmerOrOwnerGUID()))
|
||||
{
|
||||
// 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
|
||||
// when their weapon skill is 15 or more above victim's defense skill
|
||||
tmp = victimDefenseSkill;
|
||||
int32 tmpmax = victimMaxSkillValueForLevel;
|
||||
// having defense above your maximum (from items, talents etc.) has no effect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue