diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-29 09:30:59 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-29 09:30:59 +0000 |
commit | fcdf995bd039935c5cdf4842ea9158d44ee6de29 (patch) | |
tree | 0ed34fadd8362c878e7f557bc64f10cada424157 /src/map | |
parent | dba707fd13f622a8b317a5e1143f57d76cd606f5 (diff) | |
download | hercules-fcdf995bd039935c5cdf4842ea9158d44ee6de29.tar.gz hercules-fcdf995bd039935c5cdf4842ea9158d44ee6de29.tar.bz2 hercules-fcdf995bd039935c5cdf4842ea9158d44ee6de29.tar.xz hercules-fcdf995bd039935c5cdf4842ea9158d44ee6de29.zip |
Enhanced the 'hack on npc menu' message in clif_parse_NpcSelectMenu.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13633 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 51ca50264..0ccb6a031 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9797,16 +9797,19 @@ void clif_parse_WeaponRefine(int fd, struct map_session_data *sd) *------------------------------------------*/ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd) { - uint8 select; + int npc_id = RFIFOL(fd,2); + uint8 select = RFIFOB(fd,6); - select = RFIFOB(fd,6); - if((select > sd->npc_menu && select != 0xff) || !select){ - ShowWarning("Hack on NPC Select Menu: %s (AID: %d)!\n",sd->status.name,sd->bl.id); + if( (select > sd->npc_menu && select != 0xff) || select == 0 ) + { + TBL_NPC* nd = map_id2nd(npc_id); + ShowWarning("Invalid menu selection on npc %d:'%s' - got %d, valid range is [%d..%d] (player AID:%d, CID:%d, name:'%s')!\n", npc_id, (nd)?nd->name:"invalid npc id", select, 1, sd->npc_menu, sd->bl.id, sd->status.char_id, sd->status.name); clif_GM_kick(NULL,sd); - } else { - sd->npc_menu=select; - npc_scriptcont(sd,RFIFOL(fd,2)); + return; } + + sd->npc_menu = select; + npc_scriptcont(sd,npc_id); } /*========================================== |