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:
hondacrx
2024-02-06 09:39:26 -05:00
parent ebcad7dbc5
commit 80936edeab
12 changed files with 292 additions and 383 deletions
+1 -2
View File
@@ -3301,8 +3301,7 @@ namespace Game.Entities
var clickBounds = Global.ObjectMgr.GetSpellClickInfoMapBounds(obj.GetEntry());
foreach (var spellClickInfo in clickBounds)
{
List<Condition> conds = Global.ConditionMgr.GetConditionsForSpellClickEvent(obj.GetEntry(), spellClickInfo.spellId);
if (conds != null)
if (Global.ConditionMgr.HasConditionsForSpellClickEvent(obj.GetEntry(), spellClickInfo.spellId))
{
ObjectFieldData objMask = new();
UnitData unitMask = new();