diff --git a/Source/Game/Conditions/ConditionManager.cs b/Source/Game/Conditions/ConditionManager.cs index f0f958508..d821c43c8 100644 --- a/Source/Game/Conditions/ConditionManager.cs +++ b/Source/Game/Conditions/ConditionManager.cs @@ -1111,6 +1111,13 @@ namespace Game return false; } break; + case ConditionSourceType.AreatriggerClientTriggered: + if (!CliDB.AreaTriggerStorage.ContainsKey(cond.SourceEntry)) + { + Log.outError(LogFilter.Sql, $"{cond} SourceEntry in `condition` table, does not exists in AreaTrigger.db2, ignoring."); + return false; + } + break; default: Log.outError(LogFilter.Sql, $"{cond.ToString()} Invalid ConditionSourceType in `condition` table, ignoring."); return false; diff --git a/Source/Game/Handlers/MiscHandler.cs b/Source/Game/Handlers/MiscHandler.cs index bd7b9eae4..675e3840a 100644 --- a/Source/Game/Handlers/MiscHandler.cs +++ b/Source/Game/Handlers/MiscHandler.cs @@ -195,6 +195,9 @@ namespace Game if (player.IsDebugAreaTriggers) player.SendSysMessage(packet.Entered ? CypherStrings.DebugAreatriggerEntered : CypherStrings.DebugAreatriggerLeft, packet.AreaTriggerID); + if (!Global.ConditionMgr.IsObjectMeetingNotGroupedConditions(ConditionSourceType.AreatriggerClientTriggered, atEntry.Id, player)) + return; + if (Global.ScriptMgr.OnAreaTrigger(player, atEntry, packet.Entered)) return;