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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Level3.cpp

    r173 r174  
    65456545    return true; 
    65466546} 
     6547 
     6548bool ChatHandler::HandlePossessCommand(const char* args) 
     6549{ 
     6550    Unit* pUnit = getSelectedUnit(); 
     6551    if(!pUnit) 
     6552        return false; 
     6553 
     6554    // Don't allow unlimited possession of players 
     6555    if (pUnit->GetTypeId() == TYPEID_PLAYER) 
     6556        return false; 
     6557 
     6558    m_session->GetPlayer()->Possess(pUnit); 
     6559 
     6560    return true; 
     6561} 
     6562 
     6563bool ChatHandler::HandleUnPossessCommand(const char* args) 
     6564{ 
     6565    // Use this command to also unpossess ourselves 
     6566    if (m_session->GetPlayer()->isPossessed()) 
     6567        m_session->GetPlayer()->UnpossessSelf(false); 
     6568    else 
     6569        m_session->GetPlayer()->RemovePossess(false); 
     6570 
     6571    return true; 
     6572}