mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[9037] Cleanups in spellmode apply code.
* Add constructores for spellmode creating instead explcit fields init * Use uint32 for family mask 2 instead unneded uint64 Also drop one from manual applies for uno-existed now spell.
This commit is contained in:
parent
9d0e943488
commit
15de428242
10 changed files with 70 additions and 127 deletions
|
|
@ -862,25 +862,6 @@ void SpellMgr::LoadSpellTargetPositions()
|
|||
sLog.outString( ">> Loaded %u spell teleport coordinates", count );
|
||||
}
|
||||
|
||||
bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const
|
||||
{
|
||||
// false for spellInfo == NULL
|
||||
if (!spellInfo || !mod)
|
||||
return false;
|
||||
|
||||
SpellEntry const *affect_spell = sSpellStore.LookupEntry(mod->spellId);
|
||||
// False if affect_spell == NULL or spellFamily not equal
|
||||
if (!affect_spell || affect_spell->SpellFamilyName != spellInfo->SpellFamilyName)
|
||||
return false;
|
||||
|
||||
// true
|
||||
if (mod->mask & spellInfo->SpellFamilyFlags ||
|
||||
mod->mask2 & spellInfo->SpellFamilyFlags2)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
struct DoSpellProcEvent
|
||||
{
|
||||
DoSpellProcEvent(SpellProcEventEntry const& _spe) : spe(_spe) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue