Core/AI: UnitAI.h trimming part two. WaypointX methods kicked upstairs to CreatureAI.h.
This commit is contained in:
1 parent
85884c49bf
commit
2cc36c5eec
5 files changed
+16
-13
No files matched your search
@@ -59,8 +59,8 @@ void WaypointMovementGenerator<Creature>::DoInitialize(Creature* creature)
|
||||
_nextMoveTime.Reset(1000);
|
||||
|
||||
// inform AI
|
||||
if (creature->AI())
|
||||
creature->AI()->WaypointPathStarted(1, _path->id);
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->WaypointPathStarted(_path->id);
|
||||
}
|
||||
|
||||
void WaypointMovementGenerator<Creature>::DoFinalize(Creature* creature)
|
||||
@@ -102,7 +102,7 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
|
||||
}
|
||||
|
||||
// inform AI
|
||||
if (creature->AI())
|
||||
if (creature->IsAIEnabled)
|
||||
{
|
||||
creature->AI()->MovementInform(WAYPOINT_MOTION_TYPE, _currentNode);
|
||||
creature->AI()->WaypointReached(waypoint.id, _path->id);
|
||||
@@ -159,7 +159,7 @@ void WaypointMovementGenerator<Creature>::StartMove(Creature* creature, bool rel
|
||||
creature->UpdateCurrentWaypointInfo(0, 0);
|
||||
|
||||
// inform AI
|
||||
if (creature->AI())
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->WaypointPathEnded(waypoint.id, _path->id);
|
||||
return;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void WaypointMovementGenerator<Creature>::StartMove(Creature* creature, bool rel
|
||||
_currentNode = (_currentNode + 1) % _path->nodes.size();
|
||||
|
||||
// inform AI
|
||||
if (creature->AI())
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->WaypointStarted(waypoint.id, _path->id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user