summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/messages.conf3
-rw-r--r--src/map/clif.c12
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;