mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 05:16:37 +00:00
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files * Code cleanup
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_timers(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
||||
c->Message(Chat::White, "Need a player target for timers.");
|
||||
return;
|
||||
}
|
||||
Client *them = c->GetTarget()->CastToClient();
|
||||
|
||||
std::vector<std::pair<pTimerType, PersistentTimer *> > res;
|
||||
them->GetPTimers().ToVector(res);
|
||||
|
||||
c->Message(Chat::White, "Timers for target:");
|
||||
|
||||
int r;
|
||||
int l = res.size();
|
||||
for (r = 0; r < l; r++) {
|
||||
c->Message(Chat::White, "Timer %d: %d seconds remain.", res[r].first, res[r].second->GetRemainingTime());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user