summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf2
-rw-r--r--db/sc_config.txt2
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/rodex.c31
4 files changed, 31 insertions, 6 deletions
diff --git a/db/constants.conf b/db/constants.conf
index dd280612c..d4f6c8f0d 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1395,6 +1395,8 @@ constants_db: {
SC_SHRIMP: 650
SC_FRESHSHRIMP: 651
+ SC_DAILYSENDMAILCNT: 653
+
// Summer 2 Costume
SC_DRESS_UP: 652
diff --git a/db/sc_config.txt b/db/sc_config.txt
index 661e9bb87..797a2578b 100644
--- a/db/sc_config.txt
+++ b/db/sc_config.txt
@@ -498,3 +498,5 @@ SC_BITESCAR, 4
// Cant Clear
SC_ALL_RIDING, 397
+
+SC_DAILYSENDMAILCNT, 461
diff --git a/src/map/clif.c b/src/map/clif.c
index 28b20c9e2..1731e88ca 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -19679,7 +19679,7 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
void clif_rodex_icon(int fd, bool show)
{
// packet add date is 20140716, but from players reports it wrong. Using closer known correct version.
-#if PACKETVER >= 20150513
+#if PACKETVER >= 20141112
WFIFOHEAD(fd, 3);
WFIFOW(fd, 0) = rodexicon;
WFIFOB(fd, 2) = (show == true ? 1 : 0);
diff --git a/src/map/rodex.c b/src/map/rodex.c
index c041ecc6b..63d7242db 100644
--- a/src/map/rodex.c
+++ b/src/map/rodex.c
@@ -263,17 +263,38 @@ int rodex_send_mail(struct map_session_data *sd, const char *receiver_name, cons
for (i = 0; i < RODEX_MAX_ITEM; i++) {
int16 idx = sd->rodex.tmp.items[i].idx;
+ int j;
+ struct item *tmpItem = &sd->rodex.tmp.items[i].item;
+ struct item *invItem = &sd->status.inventory[idx];
- if (sd->rodex.tmp.items[i].item.nameid == 0)
+ if (tmpItem->nameid == 0)
continue;
- if (sd->rodex.tmp.items[i].item.nameid != sd->status.inventory[idx].nameid
- || sd->rodex.tmp.items[i].item.unique_id != sd->status.inventory[idx].unique_id
- || sd->rodex.tmp.items[i].item.amount > sd->status.inventory[idx].amount
- || sd->rodex.tmp.items[i].item.amount < 1) {
+ if (tmpItem->nameid != invItem->nameid ||
+ tmpItem->unique_id != invItem->unique_id ||
+ tmpItem->refine != invItem->refine ||
+ tmpItem->attribute != invItem->attribute ||
+ tmpItem->expire_time != invItem->expire_time ||
+ tmpItem->bound != invItem->bound ||
+ tmpItem->amount > invItem->amount ||
+ tmpItem->amount < 1) {
rodex->clean(sd, 1);
return RODEX_SEND_MAIL_ITEM_ERROR;
}
+ for (j = 0; j < MAX_SLOTS; j++) {
+ if (tmpItem->card[j] != invItem->card[j]) {
+ rodex->clean(sd, 1);
+ return RODEX_SEND_MAIL_ITEM_ERROR;
+ }
+ }
+ for (j = 0; j < MAX_ITEM_OPTIONS; j++) {
+ if (tmpItem->option[j].index != invItem->option[j].index ||
+ tmpItem->option[j].value != invItem->option[j].value ||
+ tmpItem->option[j].param != invItem->option[j].param) {
+ rodex->clean(sd, 1);
+ return RODEX_SEND_MAIL_ITEM_ERROR;
+ }
+ }
}
if (total_zeny > 0 && pc->payzeny(sd, (int)total_zeny, LOG_TYPE_MAIL, NULL) != 0) {