aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2008-10-12 14:43:55 -0500
committerXTZGZoReX <none@none>2008-10-12 14:43:55 -0500
commita4ceeacb517d4da05f85ba8230253818d94b9f98 (patch)
tree010cd77ceb51520ee602a500de8772d88b9a2294 /src/game/Level3.cpp
parent054725122f1ef534063ffcbc54b25e167ec3ed9c (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.cpp8
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()));