mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
[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 --HG-- branch : trunk
This commit is contained in:
@@ -6544,3 +6544,29 @@ bool ChatHandler::HandleGroupRemoveCommand(const char* args)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandlePossessCommand(const char* args)
|
||||
{
|
||||
Unit* pUnit = getSelectedUnit();
|
||||
if(!pUnit)
|
||||
return false;
|
||||
|
||||
// Don't allow unlimited possession of players
|
||||
if (pUnit->GetTypeId() == TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
m_session->GetPlayer()->Possess(pUnit);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleUnPossessCommand(const char* args)
|
||||
{
|
||||
// Use this command to also unpossess ourselves
|
||||
if (m_session->GetPlayer()->isPossessed())
|
||||
m_session->GetPlayer()->UnpossessSelf(false);
|
||||
else
|
||||
m_session->GetPlayer()->RemovePossess(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user