fix(Core/Misc): bunch of crashfixes (#7307)

This commit is contained in:
Viste
2021-09-14 15:38:56 +03:00
committed by GitHub
parent bd956b5a57
commit a9796af174
56 changed files with 435 additions and 328 deletions

View File

@@ -840,8 +840,9 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
SchoolMask = spellEntry->SchoolMask;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
Effects[i] = SpellEffectInfo(spellEntry, this, i);
ExplicitTargetMask = _GetExplicitTargetMask();
ChainEntry = nullptr;
ExplicitTargetMask = 0;
// Mine
_isStackableWithRanks = false;
@@ -2537,7 +2538,7 @@ bool SpellInfo::IsHighRankOf(SpellInfo const* spellInfo) const
return false;
}
uint32 SpellInfo::_GetExplicitTargetMask() const
void SpellInfo::_InitializeExplicitTargetMask()
{
bool srcSet = false;
bool dstSet = false;
@@ -2562,7 +2563,7 @@ uint32 SpellInfo::_GetExplicitTargetMask() const
effectTargetMask &= ~(TARGET_FLAG_UNIT_MASK | TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_DEST_LOCATION);
targetMask |= effectTargetMask;
}
return targetMask;
ExplicitTargetMask = targetMask;
}
bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const