Changeset 174 for trunk/src/bindings/scripts
- Timestamp:
- 11/19/08 13:43:15 (17 years ago)
- Location:
- trunk/src/bindings/scripts
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/include/sc_creature.h
r153 r174 75 75 //Called at waypoint reached or PointMovement end 76 76 void MovementInform(uint32, uint32){} 77 78 // Called when AI is temporarily replaced or put back when possess is applied or removed 79 void OnPossess(bool apply) {} 77 80 78 81 //************* -
trunk/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
r158 r174 257 257 } 258 258 259 void npc_escortAI::OnPossess(bool apply) 260 { 261 // We got possessed in the middle of being escorted, store the point 262 // where we left off to come back to when possess is removed 263 if (IsBeingEscorted) 264 { 265 if (apply) 266 m_creature->GetPosition(LastPos.x, LastPos.y, LastPos.z); 267 else 268 { 269 Returning = true; 270 m_creature->GetMotionMaster()->MovementExpired(); 271 m_creature->GetMotionMaster()->MovePoint(WP_LAST_POINT, LastPos.x, LastPos.y, LastPos.z); 272 } 273 } 274 } 275 276 277 259 278 void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs) 260 279 { -
trunk/src/bindings/scripts/scripts/npc/npc_escortAI.h
r90 r174 52 52 void MovementInform(uint32, uint32); 53 53 54 void OnPossess(bool apply); 55 54 56 // EscortAI functions 55 57 void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0);