summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-02-24 06:25:33 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-02-24 06:25:33 +0800
commitadda8d74c3280ae1e3745591caafd9ce6e81ded7 (patch)
tree92bed0c62e31f392098c529184f78848dc9d6d05 /src/map/clif.c
parent6c6fbf026f039eeeaab4d1e6dd14155067b8075e (diff)
downloadhercules-adda8d74c3280ae1e3745591caafd9ce6e81ded7.tar.gz
hercules-adda8d74c3280ae1e3745591caafd9ce6e81ded7.tar.bz2
hercules-adda8d74c3280ae1e3745591caafd9ce6e81ded7.tar.xz
hercules-adda8d74c3280ae1e3745591caafd9ce6e81ded7.zip
Fixed Bug #7091
-Updated SN_SIGHT to its RE behavior. -Updated RE behavior that deals with NPC dialogs and using items/skills. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index b7117a64a..dcbeae3c4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9520,7 +9520,7 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd)
sd->st->state = END;
sd->progressbar.npc_id = sd->progressbar.timeout = 0;
- npc_scriptcont(sd, npc_id);
+ npc_scriptcont(sd, npc_id, false);
}
@@ -10179,12 +10179,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
return;
}
- //This flag enables you to use items while in an NPC. [Skotlex]
- if (sd->npc_id) {
- if (sd->npc_id != sd->npc_item_flag)
- return;
- }
- else if ( pc_istrading(sd) || sd->chatID )
+ if ( (!sd->npc_id && pc_istrading(sd)) || sd->chatID )
return;
//Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex]
@@ -10795,6 +10790,12 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
// Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
sd->idletime = last_tick;
+ if( sd->npc_id ){
+#ifdef RENEWAL
+ clif_msg(sd, 0x783); // TODO look for the client date that has this message.
+#endif
+ return;
+ }
if( pc_cant_act(sd) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
return;
if( pc_issit(sd) )
@@ -11129,7 +11130,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
}
sd->npc_menu = select;
- npc_scriptcont(sd,npc_id);
+ npc_scriptcont(sd,npc_id, false);
}
@@ -11137,7 +11138,7 @@ void clif_parse_NpcSelectMenu(int fd,struct map_session_data *sd)
/// 00b9 <npc id>.L
void clif_parse_NpcNextClicked(int fd,struct map_session_data *sd)
{
- npc_scriptcont(sd,RFIFOL(fd,2));
+ npc_scriptcont(sd,RFIFOL(fd,2), false);
}
@@ -11149,7 +11150,7 @@ void clif_parse_NpcAmountInput(int fd,struct map_session_data *sd)
int amount = (int)RFIFOL(fd,6);
sd->npc_amount = amount;
- npc_scriptcont(sd, npcid);
+ npc_scriptcont(sd, npcid, false);
}
@@ -11165,7 +11166,7 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd)
return; // invalid input
safestrncpy(sd->npc_str, message, min(message_len,CHATBOX_SIZE));
- npc_scriptcont(sd, npcid);
+ npc_scriptcont(sd, npcid, false);
}
@@ -11175,7 +11176,7 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
{
if (!sd->npc_id) //Avoid parsing anything when the script was done with. [Skotlex]
return;
- npc_scriptcont(sd,RFIFOL(fd,2));
+ npc_scriptcont(sd, RFIFOL(fd,2), true);
}