Core/Waypoints: Drop waypoint_scripts table

Port From (https://github.com/TrinityCore/TrinityCore/commit/3f6f683ce4b5f4a95a2d70921de2c80de6b3a8fe)
This commit is contained in:
hondacrx
2024-02-03 11:47:02 -05:00
parent ee7b89560e
commit 284cb628c9
9 changed files with 5 additions and 345 deletions
@@ -288,7 +288,7 @@ namespace Game.Movement
}
if (_waitTimeRangeAtPathEnd.HasValue && _followPathBackwardsFromEndToStart
&& ((_isReturningToStart && _currentNode == 0) || (!_isReturningToStart && _currentNode == _path.nodes.Count - 1)))
&& ((_isReturningToStart && _currentNode == 0) || (!_isReturningToStart && _currentNode == _path.nodes.Count - 1)))
{
owner.ClearUnitState(UnitState.RoamingMove);
TimeSpan waitTime = RandomHelper.RandTime(_waitTimeRangeAtPathEnd.Value.min, _waitTimeRangeAtPathEnd.Value.max);
@@ -301,13 +301,6 @@ namespace Game.Movement
_nextMoveTime.Reset(waitTime);
}
if (waypoint.eventId != 0 && RandomHelper.URand(0, 99) < waypoint.eventChance)
{
Log.outDebug(LogFilter.MapsScript, $"Creature movement start script {waypoint.eventId} at point {_currentNode} for {owner.GetGUID()}.");
owner.ClearUnitState(UnitState.RoamingMove);
owner.GetMap().ScriptsStart(ScriptsType.Waypoint, waypoint.eventId, owner, null);
}
// inform AI
CreatureAI ai = owner.GetAI();
if (ai != null)