diff options
author | shennetsind <ind@henn.et> | 2013-06-09 00:34:35 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-09 00:34:35 -0300 |
commit | 89a571a3c5d4c9366843a462c40efdebb24d17fe (patch) | |
tree | d2b388b44f2e389a676cf7a54b4f6d65d17d2925 | |
parent | 9189034a11186f37fba2a603bed656502c87f688 (diff) | |
download | hercules-89a571a3c5d4c9366843a462c40efdebb24d17fe.tar.gz hercules-89a571a3c5d4c9366843a462c40efdebb24d17fe.tar.bz2 hercules-89a571a3c5d4c9366843a462c40efdebb24d17fe.tar.xz hercules-89a571a3c5d4c9366843a462c40efdebb24d17fe.zip |
Fixed Bug #7318
Special Thanks to Beret, malufett, mkbu95~!
http://hercules.ws/board/tracker/issue-7318-using-skill-and-talking-with-npc/
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | conf/messages.conf | 3 | ||||
-rw-r--r-- | src/map/clif.c | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/conf/messages.conf b/conf/messages.conf index e2886a57d..5bff9a5af 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -1505,5 +1505,8 @@ //src/map/pc.c::pc_isUseitem 1474: You cannot use this item while sitting +//src/map/clif.c::clif_parse_NpcClicked +1476: You cannot interact with NPCs while casting skills + //Custom translations import: conf/import/msg_conf.txt diff --git a/src/map/clif.c b/src/map/clif.c index 6e4cae5c6..f808b00ab 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10747,22 +10747,24 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) { struct block_list *bl; - if(pc_isdead(sd)) { + if( pc_isdead(sd) ) { clif_clearunit_area(&sd->bl,CLR_DEAD); return; } - if ( pc_cant_act2(sd) ) + if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) ) return; - - bl = iMap->id2bl(RFIFOL(fd,2)); - if (!bl) return; + switch (bl->type) { case BL_MOB: case BL_PC: clif->pActionRequest_sub(sd, 0x07, bl->id, iTimer->gettick()); break; case BL_NPC: + if( sd->ud.skilltimer != INVALID_TIMER ) { + clif->colormes(fd,COLOR_WHITE,msg_txt(1476)); + break; + } if( bl->m != -1 )// the user can't click floating npcs directly (hack attempt) npc_click(sd,(TBL_NPC*)bl); break; |