mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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
|
|
@ -692,24 +692,29 @@ void Spell::prepareDataForTriggerSystem()
|
||||||
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000010000000000))
|
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000010000000000))
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
|
case SPELLFAMILY_WARLOCK:
|
||||||
|
// For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
|
||||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000800000000060))
|
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000800000000060))
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_PRIEST: // For Penance,Mind Sear,Mind Flay heal/damage triggers need do it
|
case SPELLFAMILY_PRIEST:
|
||||||
|
// For Penance,Mind Sear,Mind Flay heal/damage triggers need do it
|
||||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001800000800000) || (m_spellInfo->SpellFamilyFlags2 & 0x00000040))
|
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001800000800000) || (m_spellInfo->SpellFamilyFlags2 & 0x00000040))
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_ROGUE: // For poisons need do it
|
case SPELLFAMILY_ROGUE:
|
||||||
|
// For poisons need do it
|
||||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000101001E000))
|
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000101001E000))
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_HUNTER: // Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot
|
case SPELLFAMILY_HUNTER:
|
||||||
|
// Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot
|
||||||
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0100200000000214)) ||
|
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0100200000000214)) ||
|
||||||
m_spellInfo->SpellFamilyFlags2 & 0x200)
|
m_spellInfo->SpellFamilyFlags2 & 0x200)
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_PALADIN: // For Judgements (all) / Holy Shock triggers need do it
|
case SPELLFAMILY_PALADIN:
|
||||||
|
// For Judgements (all) / Holy Shock triggers need do it
|
||||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001000900B80400))
|
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001000900B80400))
|
||||||
m_canTrigger = true;
|
m_canTrigger = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -9069,19 +9069,18 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_DAMAGE_CLASS_MELEE:
|
case SPELL_DAMAGE_CLASS_MELEE:
|
||||||
|
case SPELL_DAMAGE_CLASS_RANGED:
|
||||||
{
|
{
|
||||||
// Judgement of Command proc always crits on stunned target
|
// 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))
|
if(pVictim->hasUnitState(UNIT_STAT_STUNNED))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
case SPELL_DAMAGE_CLASS_RANGED:
|
|
||||||
{
|
|
||||||
if (pVictim)
|
if (pVictim)
|
||||||
crit_chance = GetUnitCriticalChance(attackType, pVictim);
|
crit_chance = GetUnitCriticalChance(attackType, pVictim);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9065"
|
#define REVISION_NR "9066"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue