mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
23 lines
582 B
C++
Executable File
23 lines
582 B
C++
Executable File
#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());
|
|
}
|
|
}
|
|
|