Show
Ignore:
Timestamp:
11/19/08 13:43:15 (17 years ago)
Author:
yumileroy
Message:

[svn] Implemented player on player and player on creature possession:
* Implemented packet and vision forwarding through possessed units
* Added new OnPossess? script call alerting scripts on when possession is applied/removed
* Moved fall damage and fall under map calculations into the Player class
* Added new PossessedAI that is applied only while possession on creature is active
* Implemented summon possessed spell effect
* Fixed Eyes of the Beast

Original author: gvcoman
Date: 2008-11-05 20:51:05-06:00

Location:
trunk/src/bindings/scripts
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/include/sc_creature.h

    r153 r174  
    7575    //Called at waypoint reached or PointMovement end 
    7676    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) {} 
    7780 
    7881    //************* 
  • trunk/src/bindings/scripts/scripts/npc/npc_escortAI.cpp

    r158 r174  
    257257} 
    258258 
     259void 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 
    259278void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs) 
    260279{ 
  • trunk/src/bindings/scripts/scripts/npc/npc_escortAI.h

    r90 r174  
    5252        void MovementInform(uint32, uint32); 
    5353 
     54        void OnPossess(bool apply); 
     55 
    5456        // EscortAI functions 
    5557        void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0);