summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c5
-rw-r--r--src/map/mail.c10
-rw-r--r--src/map/mail.h1
-rw-r--r--src/map/status.c2
4 files changed, 17 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index f9ba58156..6974f7426 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7048,6 +7048,9 @@ int clif_message(struct block_list* bl, const char* msg)
int clif_refresh(struct map_session_data *sd)
{
nullpo_retr(-1, sd);
+
+ mail_clear(sd);
+
clif_changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
clif_inventorylist(sd);
if(pc_iscarton(sd)) {
@@ -7688,6 +7691,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
return;
}
+ mail_clear(sd);
+
if (sd->state.rewarp)
{ //Rewarp player.
sd->state.rewarp = 0;
diff --git a/src/map/mail.c b/src/map/mail.c
index a08d04c0d..8c80412a9 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -20,6 +20,16 @@ time_t mail_calctimes(void)
return mktime(localtime(&temp));
}
+void mail_clear(struct map_session_data *sd)
+{
+ sd->mail.nameid = 0;
+ sd->mail.index = 0;
+ sd->mail.amount = 0;
+ sd->mail.zeny = 0;
+
+ return;
+}
+
int mail_removeitem(struct map_session_data *sd, short flag)
{
nullpo_retr(0,sd);
diff --git a/src/map/mail.h b/src/map/mail.h
index bea33d3af..7940018b8 100644
--- a/src/map/mail.h
+++ b/src/map/mail.h
@@ -8,6 +8,7 @@
time_t mail_calctimes(void);
+void mail_clear(struct map_session_data *sd);
int mail_removeitem(struct map_session_data *sd, short flag);
int mail_removezeny(struct map_session_data *sd, short flag);
unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount);
diff --git a/src/map/status.c b/src/map/status.c
index c4cca766a..c56a764a1 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4925,7 +4925,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_ADRENALINE2:
case SC_WEAPONPERFECTION:
case SC_OVERTHRUST:
- if (sce->val2 > val2)
+ if (sce->val1 > val1)
return 0;
break;
case SC_HPREGEN: