Core/AI: UnitAI trimming part two. WaypointX methods kicked upstairs to CreatureAI
Port From (https://github.com/TrinityCore/TrinityCore/commit/e0afca513a9bfbd82134942e1266e46811707cbb)
This commit is contained in:
@@ -500,6 +500,16 @@ namespace Game.AI
|
||||
}
|
||||
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
||||
|
||||
/// == Waypoints system =============================
|
||||
|
||||
public virtual void WaypointPathStarted(uint pathId) { }
|
||||
|
||||
public virtual void WaypointStarted(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void WaypointReached(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void WaypointPathEnded(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void PassengerBoarded(Unit passenger, sbyte seatId, bool apply) { }
|
||||
|
||||
public virtual void OnSpellClick(Unit clicker, ref bool result) { }
|
||||
|
||||
@@ -496,14 +496,6 @@ namespace Game.AI
|
||||
/// </summary>
|
||||
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
||||
|
||||
public virtual void WaypointPathStarted(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void WaypointStarted(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void WaypointReached(uint nodeId, uint pathId) { }
|
||||
|
||||
public virtual void WaypointPathEnded(uint nodeId, uint pathId) { }
|
||||
|
||||
public static AISpellInfoType GetAISpellInfo(uint spellId, Difficulty difficulty)
|
||||
{
|
||||
return _aiSpellInfo.LookupByKey((spellId, difficulty));
|
||||
|
||||
@@ -390,11 +390,12 @@ namespace Game.AI
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void WaypointPathStarted(uint nodeId, uint pathId)
|
||||
public override void WaypointPathStarted(uint pathId)
|
||||
{
|
||||
if (!HasEscortState(SmartEscortState.Escorting))
|
||||
{
|
||||
GetScript().ProcessEventsFor(SmartEvents.WaypointStart, null, nodeId, pathId);
|
||||
// @todo remove the constant 1 at some point, it's never anything different
|
||||
GetScript().ProcessEventsFor(SmartEvents.WaypointStart, null, 1, pathId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace Game.Movement
|
||||
_nextMoveTime.Reset(1000);
|
||||
|
||||
// inform AI
|
||||
if (creature.GetAI() != null)
|
||||
creature.GetAI().WaypointPathStarted(1, _path.id);
|
||||
if (creature.IsAIEnabled)
|
||||
creature.GetAI().WaypointPathStarted(_path.id);
|
||||
}
|
||||
|
||||
public override void DoInitialize(Creature creature)
|
||||
|
||||
Reference in New Issue
Block a user