Core/Conditions: Added conditions for old areatrigger system (AreaTrigger.db2)
Port From (https://github.com/TrinityCore/TrinityCore/commit/6ebd5926fb61a5457d7048504d2f92bc3c9318ab)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user