mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[11623] Implement ClassFamilyMask as wrapper for uint64+uint32 spell family masks
Inspired by patch suggested by darkstalker Also * Remove existed enums for family masks as contra-productive for developement. * Drop one from horrible hack checks in SpellMgr::IsNoStackSpellDueToSpell (spells for any fimilies with exactly 0x800 mask) I fail find useful cases for current spell data with this check. All cases expected work correct without it. If will some problems detected with this please report for fix in less strange way.
This commit is contained in:
parent
20e9484e74
commit
c686697c2d
12 changed files with 117 additions and 127 deletions
|
|
@ -2127,7 +2127,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
continue;
|
||||
}
|
||||
// Reflective Shield
|
||||
if (spellProto->SpellFamilyFlags == 0x1 && canReflect)
|
||||
if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000001)) && canReflect)
|
||||
{
|
||||
if (pCaster == this)
|
||||
break;
|
||||
|
|
@ -9814,9 +9814,9 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||
{
|
||||
if (spellProcEvent)
|
||||
{
|
||||
if (spellProcEvent->spellFamilyMask[i] || spellProcEvent->spellFamilyMask2[i])
|
||||
if (spellProcEvent->spellFamilyMask[i])
|
||||
{
|
||||
if (!procSpell->IsFitToFamilyMask(spellProcEvent->spellFamilyMask[i], spellProcEvent->spellFamilyMask2[i]))
|
||||
if (!procSpell->IsFitToFamilyMask(spellProcEvent->spellFamilyMask[i]))
|
||||
continue;
|
||||
}
|
||||
// don't check dbc FamilyFlags if schoolMask exists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue