Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. -void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 waitTime /*= 0*/)
  2. +void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 waitTime)
  3. {
  4. Escort_Waypoint t(id, x, y, z, waitTime);
  5.  
  6. @@ -400,19 +396,13 @@ void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 wait
  7. PointMovementMap[wp.m_uiCreatureEntry].push_back(wp);*/
  8. }
  9.  
  10. -void npc_escortAI::AddWaypoint(uint32 id, Position const& pos, uint32 waitTime /*= 0*/)
  11. -{
  12. - AddWaypoint(id, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), waitTime);
  13. -}
  14. -
  15. void npc_escortAI::FillPointMovementListForCreature()
  16. {
  17. - ScriptPointVector const& movePoints = sScriptSystemMgr->GetPointMoveList(me->GetEntry());
  18. - if (movePoints.empty())
  19. + ScriptPointVector const* movePoints = sScriptSystemMgr->GetPointMoveList(me->GetEntry());
  20. + if (!movePoints)
  21. return;
  22.  
  23. - ScriptPointVector::const_iterator itrEnd = movePoints.end();
  24. - for (ScriptPointVector::const_iterator itr = movePoints.begin(); itr != itrEnd; ++itr)
  25. + for (ScriptPointVector::const_iterator itr = movePoints->begin(); itr != movePoints->end(); ++itr)
  26. {
  27. Escort_Waypoint point(itr->uiPointId, itr->fX, itr->fY, itr->fZ, itr->uiWaitTime);
  28. WaypointList.push_back(point);
  29. @@ -444,13 +434,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
  30. {
  31. if (me->GetVictim())
  32. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement