Core/Conditions: Refactor ConditionMgr internals to get rid of separate containers for some condition source types
Port From (https://github.com/TrinityCore/TrinityCore/commit/0b5406dd882c6d96bc1be6fd0a78375c3b316415)
This commit is contained in:
@@ -3883,19 +3883,8 @@ namespace Game.Spells
|
||||
public void _UnloadImplicitTargetConditionLists()
|
||||
{
|
||||
// find the same instances of ConditionList and delete them.
|
||||
foreach (var effectInfo in _effects)
|
||||
{
|
||||
var cur = effectInfo.ImplicitTargetConditions;
|
||||
if (cur == null)
|
||||
continue;
|
||||
|
||||
for (int j = (int)effectInfo.EffectIndex; j < _effects.Count; ++j)
|
||||
{
|
||||
SpellEffectInfo eff = _effects[j];
|
||||
if (eff.ImplicitTargetConditions == cur)
|
||||
eff.ImplicitTargetConditions = null;
|
||||
}
|
||||
}
|
||||
foreach (SpellEffectInfo effect in _effects)
|
||||
effect.ImplicitTargetConditions = null;
|
||||
}
|
||||
|
||||
public bool MeetsFutureSpellPlayerCondition(Player player)
|
||||
|
||||
Reference in New Issue
Block a user