mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9066] Small cleanups in spell code.
Mostly avoid unclear "lost" break case
This commit is contained in:
parent
3c2327e6e0
commit
e583f543a2
3 changed files with 15 additions and 11 deletions
|
|
@ -9069,19 +9069,18 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
|||
break;
|
||||
}
|
||||
case SPELL_DAMAGE_CLASS_MELEE:
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
{
|
||||
// Judgement of Command proc always crits on stunned target
|
||||
if(spellProto->SpellFamilyName == SPELLFAMILY_PALADIN)
|
||||
if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_MELEE && spellProto->SpellFamilyName == SPELLFAMILY_PALADIN)
|
||||
{
|
||||
if(spellProto->SpellFamilyFlags & 0x0000000000800000LL && spellProto->SpellIconID == 561)
|
||||
if ((spellProto->SpellFamilyFlags & UI64LIT(0x0000000000800000)) && spellProto->SpellIconID == 561)
|
||||
{
|
||||
if(pVictim->hasUnitState(UNIT_STAT_STUNNED))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
{
|
||||
|
||||
if (pVictim)
|
||||
crit_chance = GetUnitCriticalChance(attackType, pVictim);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue