diff options
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index a36571d20a4..f1a08f0b2c4 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -7290,19 +7290,19 @@ bool ChatHandler::HandlePossessCommand(const char* args) if(!pUnit) return false; - // Don't allow unlimited possession of players - if (pUnit->GetTypeId() == TYPEID_PLAYER) - return false; - - pUnit->SetCharmedOrPossessedBy(m_session->GetPlayer(), true); - + m_session->GetPlayer()->CastSpell(pUnit, 530, true); return true; } bool ChatHandler::HandleUnPossessCommand(const char* args) { - // Use this command to also unpossess ourselves - m_session->GetPlayer()->RemoveCharmedOrPossessedBy(NULL); + Unit* pUnit = getSelectedUnit(); + if(!pUnit) pUnit = m_session->GetPlayer(); + + pUnit->RemoveSpellsCausingAura(SPELL_AURA_MOD_CHARM); + pUnit->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS_PET); + pUnit->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS); + return true; } @@ -7312,11 +7312,7 @@ bool ChatHandler::HandleBindSightCommand(const char* args) if (!pUnit) return false; - if (m_session->GetPlayer()->isPossessing()) - return false; - - pUnit->AddPlayerToVision(m_session->GetPlayer()); - + m_session->GetPlayer()->CastSpell(pUnit, 6277, true); return true; } @@ -7325,6 +7321,6 @@ bool ChatHandler::HandleUnbindSightCommand(const char* args) if (m_session->GetPlayer()->isPossessing()) return false; - m_session->GetPlayer()->RemoveFarsightTarget(); + m_session->GetPlayer()->StopCastingBindSight(); return true; } |