mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Crash] Bugfix for zone crash caused by #flymode -1 (#1291)
* Update command.cpp Fixed typo in the command description. * Bugfix for #flymode zone crash Bugfix for #flymode zone crash when invalid values are passed. Also, when entering #flymode without parameters, the correct syntax is now displayed. * Changed as requested
This commit is contained in:
parent
18a3ff5f12
commit
5035451af7
@ -2642,9 +2642,7 @@ void command_flymode(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *t = c;
|
||||
|
||||
if (strlen(sep->arg[1]) == 1 && !(sep->arg[1][0] == '0' || sep->arg[1][0] == '1' || sep->arg[1][0] == '2' || sep->arg[1][0] == '3' || sep->arg[1][0] == '4' || sep->arg[1][0] == '5'))
|
||||
c->Message(Chat::White, "#flymode [0/1/2/3/4/5]");
|
||||
else {
|
||||
if (strlen(sep->arg[1]) == 1 && sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 5) {
|
||||
if (c->GetTarget()) {
|
||||
t = c->GetTarget();
|
||||
}
|
||||
@ -2671,9 +2669,12 @@ void command_flymode(Client *c, const Seperator *sep)
|
||||
else if (sep->arg[1][0] == '5') {
|
||||
c->Message(Chat::White, "Setting %s to Levitating While Running", t->GetName());
|
||||
}
|
||||
} else {
|
||||
c->Message(Chat::White, "#flymode [0/1/2/3/4/5]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void command_showskills(Client *c, const Seperator *sep)
|
||||
{
|
||||
Client *t=c;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user