mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Command] Add #show zone_variables (#4812)
This commit is contained in:
parent
a05d0752f6
commit
cd808416c8
@ -49,6 +49,7 @@
|
|||||||
#include "show/zone_loot.cpp"
|
#include "show/zone_loot.cpp"
|
||||||
#include "show/zone_points.cpp"
|
#include "show/zone_points.cpp"
|
||||||
#include "show/zone_status.cpp"
|
#include "show/zone_status.cpp"
|
||||||
|
#include "show/zone_variables.cpp"
|
||||||
|
|
||||||
void command_show(Client *c, const Seperator *sep)
|
void command_show(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
@ -110,6 +111,7 @@ void command_show(Client *c, const Seperator *sep)
|
|||||||
Cmd{.cmd = "zone_loot", .u = "zone_loot", .fn = ShowZoneLoot, .a = {"#viewzoneloot"}},
|
Cmd{.cmd = "zone_loot", .u = "zone_loot", .fn = ShowZoneLoot, .a = {"#viewzoneloot"}},
|
||||||
Cmd{.cmd = "zone_points", .u = "zone_points", .fn = ShowZonePoints, .a = {"#showzonepoints"}},
|
Cmd{.cmd = "zone_points", .u = "zone_points", .fn = ShowZonePoints, .a = {"#showzonepoints"}},
|
||||||
Cmd{.cmd = "zone_status", .u = "zone_status", .fn = ShowZoneStatus, .a = {"#zonestatus"}},
|
Cmd{.cmd = "zone_status", .u = "zone_status", .fn = ShowZoneStatus, .a = {"#zonestatus"}},
|
||||||
|
Cmd{.cmd = "zone_variables", .u = "zone_variables", .fn = ShowZoneVariables},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check for arguments
|
// Check for arguments
|
||||||
|
|||||||
16
zone/gm_commands/show/zone_variables.cpp
Normal file
16
zone/gm_commands/show/zone_variables.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "../../client.h"
|
||||||
|
#include "../../zone.h"
|
||||||
|
|
||||||
|
extern Zone* zone;
|
||||||
|
|
||||||
|
void ShowZoneVariables(Client *c, const Seperator *sep)
|
||||||
|
{
|
||||||
|
if (!zone->GetVariables().empty()) {
|
||||||
|
c->Message(Chat::White, "Zone Variables:");
|
||||||
|
for (auto &key: zone->GetVariables()) {
|
||||||
|
c->Message(Chat::White, fmt::format("{}: {}", key, zone->GetVariable(key)).c_str());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
c->Message(Chat::White, "No zone variables set.");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user