# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -5367,6 +5367,8 @@
nullpo_retv(sd);
fd = sd->fd;
+ if(sd->menuskill_id == skill_id)
+ return; //Avoid resending the menu twice or more times...
WFIFOHEAD(fd, 6 + 2 * MAX_SKILL_PRODUCE_DB);
WFIFOW(fd,0) = 0x25a;
WFIFOW(fd,4) = list_type; // list type
@@ -5384,23 +5386,14 @@
c++;
}
- if( skill_id == AM_PHARMACY ) { // Only send it while Cooking else check for c.
- WFIFOW(fd,2) = 6 + 2 * c;
- WFIFOSET(fd,WFIFOW(fd,2));
- }
-
- if( c > 0 ) {
+ if( c > 0 || skill_id == AM_PHARMACY) {
sd->menuskill_id = skill_id;
sd->menuskill_val = trigger;
- if( skill_id != AM_PHARMACY ) {
sd->menuskill_val2 = qty; // amount.
WFIFOW(fd,2) = 6 + 2 * c;
WFIFOSET(fd,WFIFOW(fd,2));
- }
} else {
clif_menuskill_clear(sd);
- if( skill_id != AM_PHARMACY ) { // AM_PHARMACY is used to Cooking.
- // It fails.
#if PACKETVER >= 20090922
clif_msg_skill(sd,skill_id,0x625);
#else
@@ -5409,7 +5402,6 @@
#endif
}
}
-}
/// Notifies clients of a status change.