mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
feat(Core/Command): Split respawn command (#11245)
* feat(Core/Command): Split respawn command * feat(Core/Command): Split respawn command * typo
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648810356834040900');
|
||||
|
||||
DELETE FROM `command` WHERE `name` IN ('respawn', 'respawn all');
|
||||
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||
('respawn', 2, 'Syntax: .respawn\nRespawn the selected unit without waiting respawn time expiration.'),
|
||||
('respawn all', 2, 'Syntax: .respawn all\nRespawn all nearest creatures and GO without waiting respawn time expiration.');
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
{ "setskill", HandleSetSkillCommand, SEC_GAMEMASTER, Console::No },
|
||||
{ "pinfo", HandlePInfoCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "respawn", HandleRespawnCommand, SEC_GAMEMASTER, Console::No },
|
||||
{ "respawn all", HandleRespawnAllCommand, SEC_GAMEMASTER, Console::No },
|
||||
{ "mute", HandleMuteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "mutehistory", HandleMuteInfoCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "unmute", HandleUnmuteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
@@ -2333,7 +2334,6 @@ public:
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
// accept only explicitly selected target (not implicitly self targeting case)
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (player->GetTarget() && target)
|
||||
{
|
||||
@@ -2351,6 +2351,15 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool HandleRespawnAllCommand(ChatHandler* handler)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
CellCoord p(Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Reference in New Issue
Block a user