mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +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
+21
@@ -0,0 +1,21 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_damage(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() == 0) {
|
||||
c->Message(Chat::White, "Error: #Damage: No Target.");
|
||||
}
|
||||
else if (!sep->IsNumber(1)) {
|
||||
c->Message(Chat::White, "Usage: #damage x");
|
||||
}
|
||||
else {
|
||||
int32 nkdmg = atoi(sep->arg[1]);
|
||||
if (nkdmg > 2100000000) {
|
||||
c->Message(Chat::White, "Enter a value less then 2,100,000,000.");
|
||||
}
|
||||
else {
|
||||
c->GetTarget()->Damage(c, nkdmg, SPELL_UNKNOWN, EQ::skills::SkillHandtoHand, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user