summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-04-25 16:17:10 +0200
committerGitHub <noreply@github.com>2017-04-25 16:17:10 +0200
commit89ffb3db746b016ea1cc12ef2f148152ed280172 (patch)
tree8b537619dd8b5b8add45b99dc5e36433a49eab3b /src/map
parentbef73e430775667740df6f3db25bb810ac50c31b (diff)
parente4d0e0553249ee7f6454497b79b093f1acbb611b (diff)
downloadhercules-89ffb3db746b016ea1cc12ef2f148152ed280172.tar.gz
hercules-89ffb3db746b016ea1cc12ef2f148152ed280172.tar.bz2
hercules-89ffb3db746b016ea1cc12ef2f148152ed280172.tar.xz
hercules-89ffb3db746b016ea1cc12ef2f148152ed280172.zip
Merge pull request #1694 from Jedzkie/6-NPCWorkInProgressFix
Added the correct PACKETVER Date for MSG_NPC_WORK_IN_PROGRESS message.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c40
-rw-r--r--src/map/pc.c9
2 files changed, 30 insertions, 19 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8ab6e71a4..b5ebc4897 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10632,9 +10632,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
clif->clearunit_area(&sd->bl,CLR_DEAD);
return;
}
- if( sd->npc_id || sd->state.workinprogress&2 ){
-#ifdef RENEWAL
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message.
+ if (sd->npc_id || sd->state.workinprogress & 2) {
+#if PACKETVER >= 20110309
+ clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
return;
}
@@ -10647,9 +10649,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
clif->pActionRequest_sub(sd, 0x07, bl->id, timer->gettick());
break;
case BL_NPC:
- if( sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER ) {// TODO: should only work with none 3rd job skills
-#ifdef RENEWAL
+ if (sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER) { // TODO: should only work with none 3rd job skills
+#if PACKETVER >= 20110309
clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
break;
}
@@ -11032,12 +11036,14 @@ void clif_parse_ChangeCart(int fd, struct map_session_data *sd)
if (pc->checkskill(sd, MC_CHANGECART) == 0)
return;
-#ifdef RENEWAL
- if (sd->npc_id || sd->state.workinprogress&1) {
+ if (sd->npc_id || sd->state.workinprogress & 1) {
+#if PACKETVER >= 20110309
clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
+#endif
return;
}
-#endif
type = RFIFOW(fd, 2);
@@ -11241,9 +11247,11 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
// Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
pc->update_idle_time(sd, BCIDLE_USESKILLTOID);
- if( sd->npc_id || sd->state.workinprogress&1 ){
-#ifdef RENEWAL
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message.
+ if (sd->npc_id || sd->state.workinprogress & 1) {
+#if PACKETVER >= 20110309
+ clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
return;
}
@@ -11338,12 +11346,14 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
return;
}
-#ifdef RENEWAL
- if( sd->state.workinprogress&1 ){
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message.
+ if (sd->state.workinprogress & 1) {
+#if PACKETVER >= 20110309
+ clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
+#endif
return;
}
-#endif
//Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
pc->update_idle_time(sd, BCIDLE_USESKILLTOPOS);
diff --git a/src/map/pc.c b/src/map/pc.c
index 6da0bf035..b1203e519 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5005,10 +5005,11 @@ int pc_useitem(struct map_session_data *sd,int n) {
nullpo_ret(sd);
Assert_ret(n >= 0 && n < MAX_INVENTORY);
- if( sd->npc_id || sd->state.workinprogress&1 ){
- /* TODO: add to clif->messages enum */
-#ifdef RENEWAL
- clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message.
+ if (sd->npc_id || sd->state.workinprogress & 1) {
+#if PACKETVER >= 20110309
+ clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS);
+#else
+ clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48));
#endif
return 0;
}