From 057384aa519d9b25b19d85417ce7f586211d0d03 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Tue, 17 Nov 2015 14:46:05 +0100 Subject: [PATCH] Partial revert of a674869 Fixes atcommands heal and jump not working without parameters anymore. --- conf/msg_conf/map_msg.conf | 2 +- conf/msg_conf/map_msg_chn.conf | 2 +- conf/msg_conf/map_msg_frn.conf | 2 +- conf/msg_conf/map_msg_grm.conf | 2 +- conf/msg_conf/map_msg_idn.conf | 2 +- conf/msg_conf/map_msg_por.conf | 2 +- conf/msg_conf/map_msg_rus.conf | 2 +- conf/msg_conf/map_msg_spn.conf | 2 +- conf/msg_conf/map_msg_tha.conf | 2 +- src/map/atcommand.c | 10 ++-------- 10 files changed, 11 insertions(+), 17 deletions(-) diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 3fa92fd405..e6dfbc4de1 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -423,7 +423,7 @@ 404: War of Emperium SE is currently in progress. 405: War of Emperium SE has been ended. 406: War of Emperium SE is currently not in progress. -407: Invalid amount of parameters. +//407 free //chrif related 408: Need disconnection to perform change-sex request... 409: Your sex has been changed (need disconnection by the server)... diff --git a/conf/msg_conf/map_msg_chn.conf b/conf/msg_conf/map_msg_chn.conf index c67ff30058..e1a23aa0c0 100644 --- a/conf/msg_conf/map_msg_chn.conf +++ b/conf/msg_conf/map_msg_chn.conf @@ -412,7 +412,7 @@ 404: 攻城戰第二版正在進行中 405: 攻城戰第二版結束了 406: 攻城戰第二版尚未開始 -407: Invalid amount of parameters. +//407 free //chrif related 408: 需要斷線以更改性別 409: 你的性別已更改(你將會被伺服器中斷連線) diff --git a/conf/msg_conf/map_msg_frn.conf b/conf/msg_conf/map_msg_frn.conf index f870714775..ddb1537624 100644 --- a/conf/msg_conf/map_msg_frn.conf +++ b/conf/msg_conf/map_msg_frn.conf @@ -420,7 +420,7 @@ 404: War of Emperium SE en cours. 405: War of Emperium SE est termine. 406: War of Emperium SE n'est pas en cours. -407: Invalid amount of parameters. +//407 free //chrif related 408: Besoin de vous dconnecter pour effectuer la demande de changement de sexe... 409: Changement de sexe (le serveur a besoin de vous dconnecter)... diff --git a/conf/msg_conf/map_msg_grm.conf b/conf/msg_conf/map_msg_grm.conf index b9aa9cfb70..93cab2eb47 100644 --- a/conf/msg_conf/map_msg_grm.conf +++ b/conf/msg_conf/map_msg_grm.conf @@ -403,7 +403,7 @@ 404: War of Emperium SE ist derzeitig im Gange. 405: War of Emperium SE wurde Beendet. 406: War of Emperium SE ist derzeitig nicht im Gange. -407: Invalid amount of parameters. +//407 free // Homunculus messages 450: Du hast bereitz ein Homunculus diff --git a/conf/msg_conf/map_msg_idn.conf b/conf/msg_conf/map_msg_idn.conf index 06a7ba09f5..8d5f057fa6 100644 --- a/conf/msg_conf/map_msg_idn.conf +++ b/conf/msg_conf/map_msg_idn.conf @@ -423,7 +423,7 @@ 404: War of Emperium SE saat ini sedang berjalan. 405: War of Emperium SE telah dimulai. 406: War of Emperium SE saat ini sedang tidak berjalan. -407: Invalid amount of parameters. +//407 free //berkaitan dengan chrif 408: Dibutuhkan pemutusan koneksi untuk melakukan permintaan ubah jenis kelamin ... 409: Jenis kelaminmu telah diganti (membutuhkan pemutusan koneksi oleh server) ... diff --git a/conf/msg_conf/map_msg_por.conf b/conf/msg_conf/map_msg_por.conf index 722977e3ba..24c555ff0f 100644 --- a/conf/msg_conf/map_msg_por.conf +++ b/conf/msg_conf/map_msg_por.conf @@ -410,7 +410,7 @@ 404: A Guerra do Emperium SE j est em progresso. 405: A Guerra do Emperium SE terminou! 406: A Guerra do Emperium SE ainda no foi iniciada. -407: Invalid amount of parameters. +//407 free //Mensagens relacionadas ao chrif 408: preciso desconectar-se para que o pedido de mudana de sexo seja processado... 409: O seu sexo foi alterado ( preciso desconectar-se do servidor)... diff --git a/conf/msg_conf/map_msg_rus.conf b/conf/msg_conf/map_msg_rus.conf index cc01c88fb7..c5aae93534 100644 --- a/conf/msg_conf/map_msg_rus.conf +++ b/conf/msg_conf/map_msg_rus.conf @@ -420,7 +420,7 @@ 404: 2.0 . 405: 2.0 . 406: 2.0 . -407: Invalid amount of parameters. +//407 free //chrif related 408: ... 409: ( )... diff --git a/conf/msg_conf/map_msg_spn.conf b/conf/msg_conf/map_msg_spn.conf index cff756c3bd..71f69459c8 100644 --- a/conf/msg_conf/map_msg_spn.conf +++ b/conf/msg_conf/map_msg_spn.conf @@ -411,7 +411,7 @@ 404: Hay una Guerra del Emperium de la2 edicin en marcha. 405: Ha finalizado la Guerra del Emperium de la 2 edicin. 406: No hay ninguna Guerra del Emperium de la 2 edicin en marcha. -407: Invalid amount of parameters. +//407 free //Mensajes de chrif 408: Necesitas desconectarte para realizar el cambio de sexo. 409: Has cambiado de sexo (necesitas desconectarte y volver a entrar) diff --git a/conf/msg_conf/map_msg_tha.conf b/conf/msg_conf/map_msg_tha.conf index e2976dd929..9716b77c4d 100644 --- a/conf/msg_conf/map_msg_tha.conf +++ b/conf/msg_conf/map_msg_tha.conf @@ -418,7 +418,7 @@ 404: War of Emperium SE ѧӧҹ㹢й. 405: War of Emperium SE 騺ŧ. 406: War of Emperium SE ӧҹ㹢й. -407: Invalid amount of parameters. +//407 free //chrif related 408: ͧѴ㹡ôԹâŧ ... 409: سŧº (ͧѴͨҡ)... diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 169f0c96aa..0ba3f1f910 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -578,10 +578,7 @@ ACMD_FUNC(jump) memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (sscanf(message, "%6hd %6hd", &x, &y) != 2) { - clif_displaymessage(fd, msg_txt(sd,407)); - return -1; - } + sscanf(message, "%6hd %6hd", &x, &y); if (map[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(sd,248)); // You are not authorized to warp from your current map. @@ -1145,10 +1142,7 @@ ACMD_FUNC(heal) int hp = 0, sp = 0; // [Valaris] thanks to fov nullpo_retr(-1, sd); - if (sscanf(message, "%11d %11d", &hp, &sp) != 2) { - clif_displaymessage(fd, msg_txt(sd,407)); - return -1; - } + sscanf(message, "%11d %11d", &hp, &sp); // some overflow checks if( hp == INT_MIN ) hp++;