[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:
VladimirMangos 2011-06-11 20:16:44 +04:00
parent 20e9484e74
commit c686697c2d
12 changed files with 117 additions and 127 deletions

View file

@ -1154,7 +1154,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
case SPELLFAMILY_WARRIOR:
{
// Retaliation
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0000000800000000))
if (dummySpell->IsFitToFamilyMask(UI64LIT(0x0000000800000000)))
{
// check attack comes not from behind
if (!HasInArc(M_PI_F, pVictim))
@ -3796,7 +3796,7 @@ SpellAuraProcResult Unit::HandleMendingAuraProc( Unit* /*pVictim*/, uint32 /*dam
if(Player* target = ((Player*)this)->GetNextRandomRaidMember(radius))
{
// aura will applied from caster, but spell casted from current aura holder
SpellModifier *mod = new SpellModifier(SPELLMOD_CHARGES,SPELLMOD_FLAT,jumps-5,spellProto->Id,spellProto->SpellFamilyFlags,spellProto->SpellFamilyFlags2);
SpellModifier *mod = new SpellModifier(SPELLMOD_CHARGES,SPELLMOD_FLAT,jumps-5,spellProto->Id,spellProto->SpellFamilyFlags);
// remove before apply next (locked against deleted)
triggeredByAura->SetInUse(true);