diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9d03dd057..bc539837d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -260,24 +260,28 @@ ACMD(send) if (type >= MIN_PACKET_DB && type <= MAX_PACKET_DB) { int off = 2; + if (clif->packet(type) == NULL) { + // unknown packet - ERROR + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,905), type); // Unknown packet: 0x%x + clif->message(fd, atcmd_output); + return false; + } + if (len) { // show packet length safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,904), type, clif->packet(type)->len); // Packet 0x%x length: %d clif->message(fd, atcmd_output); return true; } - + len = clif->packet(type)->len; - if (len == 0) { - // unknown packet - ERROR - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,905), type); // Unknown packet: 0x%x - clif->message(fd, atcmd_output); - return false; - } else if (len == -1) { + + if (len == -1) { // dynamic packet len = SHRT_MAX-4; // maximum length off = 4; } + WFIFOHEAD(sd->fd, len); WFIFOW(sd->fd,0)=TOW(type); @@ -3917,7 +3921,7 @@ ACMD(mapinfo) strcat(atcmd_output, msg_fd(fd,1096)); // PartyLock | if (map->list[m_id].flag.guildlock) strcat(atcmd_output, msg_fd(fd,1097)); // GuildLock | - if (map->list[m_id].flag.noviewid) + if (map->list[m_id].flag.noviewid != EQP_NONE) strcat(atcmd_output, msg_fd(fd,1079)); // NoViewID | clif->message(fd, atcmd_output); @@ -8414,6 +8418,7 @@ ACMD(charcommands) atcommand->commands_sub(sd, fd, COMMAND_CHARCOMMAND); return true; } + /* for new mounts */ ACMD(cashmount) { @@ -8425,7 +8430,7 @@ ACMD(cashmount) clif->message(sd->fd,msg_fd(fd,1362)); // NOTICE: If you crash with mount your LUA is outdated. if (!sd->sc.data[SC_ALL_RIDING]) { clif->message(sd->fd,msg_fd(fd,1363)); // You have mounted. - sc_start(NULL,&sd->bl,SC_ALL_RIDING,100,0,-1); + sc_start(NULL,&sd->bl,SC_ALL_RIDING,100,25,-1); } else { clif->message(sd->fd,msg_fd(fd,1364)); // You have released your mount. status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); |