Core/Conditions: Added conditions for old areatrigger system (AreaTrigger.db2)

Port From (https://github.com/TrinityCore/TrinityCore/commit/6ebd5926fb61a5457d7048504d2f92bc3c9318ab)
This commit is contained in:
hondacrx
2021-11-03 11:47:35 -04:00
parent 0bfef874de
commit 3a49852fa7
2 changed files with 10 additions and 0 deletions
@@ -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;
+3
View File
@@ -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;