summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-29 15:04:14 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-29 15:04:14 +0000
commitb61133ee839f83548f1b8c955fafddbf4cfecf27 (patch)
treea04a4947105c627889807086527f70431afe3ca8 /src/map/mail.c
parent181d6d4ee83bd3d8cc01f56f65b4188304602139 (diff)
downloadhercules-b61133ee839f83548f1b8c955fafddbf4cfecf27.tar.gz
hercules-b61133ee839f83548f1b8c955fafddbf4cfecf27.tar.bz2
hercules-b61133ee839f83548f1b8c955fafddbf4cfecf27.tar.xz
hercules-b61133ee839f83548f1b8c955fafddbf4cfecf27.zip
Added mail zeny loss prevention, bugreport:2919
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15310 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 3f72fc435..dfa7889e0 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -52,7 +52,8 @@ int mail_removeitem(struct map_session_data *sd, short flag)
int mail_removezeny(struct map_session_data *sd, short flag)
{
nullpo_ret(sd);
-
+ if( ( sd->status.zeny + sd->mail.zeny ) > MAX_ZENY )
+ return 1;
if (flag && sd->mail.zeny > 0)
{ //Zeny send
log_zeny(sd, LOG_TYPE_MAIL, sd, -sd->mail.zeny);