mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 22:45:55 +00:00
This commit is contained in:
@@ -863,6 +863,11 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
|
||||
_requireCooldownInfo = false;
|
||||
}
|
||||
|
||||
SpellInfo::~SpellInfo()
|
||||
{
|
||||
_UnloadImplicitTargetConditionLists();
|
||||
}
|
||||
|
||||
uint32 SpellInfo::GetCategory() const
|
||||
{
|
||||
return CategoryEntry ? CategoryEntry->Id : 0;
|
||||
@@ -2868,6 +2873,23 @@ bool SpellInfo::_IsPositiveTarget(uint32 targetA, uint32 targetB)
|
||||
return true;
|
||||
}
|
||||
|
||||
void SpellInfo::_UnloadImplicitTargetConditionLists()
|
||||
{
|
||||
// find the same instances of ConditionList and delete them.
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
ConditionList* cur = Effects[i].ImplicitTargetConditions;
|
||||
if (!cur)
|
||||
continue;
|
||||
for (uint8 j = i; j < MAX_SPELL_EFFECTS; ++j)
|
||||
{
|
||||
if (Effects[j].ImplicitTargetConditions == cur)
|
||||
Effects[j].ImplicitTargetConditions = nullptr;
|
||||
}
|
||||
delete cur;
|
||||
}
|
||||
}
|
||||
|
||||
bool SpellInfo::CheckElixirStacking(Unit const* caster) const
|
||||
{
|
||||
if (!caster)
|
||||
|
||||
Reference in New Issue
Block a user