mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
[Commands] Cleanup #depopzone Command. (#2537)
* [Commands] Cleanup #depopzone Command. - Cleanup messages and logic. - Add optional `start_spawn_timers` parameter to start spawn timers of NPCs when depopped. * Update depopzone.cpp
This commit is contained in:
@@ -2,7 +2,20 @@
|
||||
|
||||
void command_depopzone(Client *c, const Seperator *sep)
|
||||
{
|
||||
zone->Depop();
|
||||
c->Message(Chat::White, "Zone depoped.");
|
||||
auto start_spawn_timers = false;
|
||||
|
||||
if (sep->IsNumber(1)) {
|
||||
start_spawn_timers = std::stoi(sep->arg[1]) ? true : false;
|
||||
}
|
||||
|
||||
zone->Depop(start_spawn_timers);
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Zone depopped{}.",
|
||||
start_spawn_timers ? " and spawn timers started" : ""
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user