mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +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_memspell(Client *c, const Seperator *sep)
|
||||
{
|
||||
uint32 slot;
|
||||
uint16 spell_id;
|
||||
|
||||
if (!(sep->IsNumber(1) && sep->IsNumber(2))) {
|
||||
c->Message(Chat::White, "Usage: #MemSpell slotid spellid");
|
||||
}
|
||||
else {
|
||||
slot = atoi(sep->arg[1]) - 1;
|
||||
spell_id = atoi(sep->arg[2]);
|
||||
if (slot > EQ::spells::SPELL_GEM_COUNT || spell_id >= SPDAT_RECORDS) {
|
||||
c->Message(Chat::White, "Error: #MemSpell: Arguement out of range");
|
||||
}
|
||||
else {
|
||||
c->MemSpell(spell_id, slot);
|
||||
c->Message(Chat::White, "Spell slot changed, have fun!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user