diff options
author | XTZGZoReX <none@none> | 2008-10-12 14:43:55 -0500 |
---|---|---|
committer | XTZGZoReX <none@none> | 2008-10-12 14:43:55 -0500 |
commit | a4ceeacb517d4da05f85ba8230253818d94b9f98 (patch) | |
tree | 010cd77ceb51520ee602a500de8772d88b9a2294 /src/game/Level3.cpp | |
parent | 054725122f1ef534063ffcbc54b25e167ec3ed9c (diff) |
[svn] * Changed: .respawn now respawns only single creature if selected. <3 Seline.
* Added: .nameannounce command. Includes name of announcer.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index c79bd3db21e..f860318bb06 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -4853,6 +4853,14 @@ bool ChatHandler::HandleBanListCommand(const char* args) bool ChatHandler::HandleRespawnCommand(const char* /*args*/) { + Unit* target = getSelectedUnit(); + + if(target && target->GetTypeId() == TYPEID_UNIT && target->isDead()) + { + ((Creature*)target)->Respawn(); + return true; + } + Player* pl = m_session->GetPlayer(); CellPair p(MaNGOS::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY())); |