summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2017-04-18 18:12:38 +0800
committerJedzkie <jedzkie13@rocketmail.com>2017-04-23 13:48:43 +0800
commite4d0e0553249ee7f6454497b79b093f1acbb611b (patch)
treef4e43b1aa7fb669d3d30c634f2222f5c0d98d728
parentb1fdb0176241759a3085ad8b4d5bf415d3392f03 (diff)
downloadhercules-e4d0e0553249ee7f6454497b79b093f1acbb611b.tar.gz
hercules-e4d0e0553249ee7f6454497b79b093f1acbb611b.tar.bz2
hercules-e4d0e0553249ee7f6454497b79b093f1acbb611b.tar.xz
hercules-e4d0e0553249ee7f6454497b79b093f1acbb611b.zip
Added the correct PACKETVER Date for MSG_NPC_WORK_IN_PROGRESS message.
-rw-r--r--conf/messages.conf3
-rw-r--r--src/map/clif.c40
-rw-r--r--src/map/pc.c9
3 files changed, 32 insertions, 20 deletions
diff --git a/conf/messages.conf b/conf/messages.conf
index efc8d8a36..bd9ffc509 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -72,7 +72,8 @@
45: Guild level change failed.
46: %s recalled!
47: Base level can't go any higher.
-//48-52 FREE
+48: Any work in progress (NPC dialog, manufacturing ...) quit and try again.
+//49-52 FREE
53: '%s' stats:
54: No player found in map '%s'.
55: 1 player found in map '%s'.
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 e9855c16d..fc2d57c7c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5019,10 +5019,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;
}