From 35712069f3401965c6e26233d01a1a893e0ca326 Mon Sep 17 00:00:00 2001 From: gepard1984 Date: Wed, 25 Jan 2012 20:35:49 +0000 Subject: * Fixed zeny duplication exploit in mail system, introduced in r15310. * Added proper mail zeny loss prevention (bugreport:2919, follow-up to r15310). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15520 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index e688ac467..b2cc2881a 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -13687,8 +13687,11 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd) if( sd->mail.inbox.msg[i].zeny < 1 && (sd->mail.inbox.msg[i].item.nameid < 1 || sd->mail.inbox.msg[i].item.amount < 1) ) return; - if( ( sd->mail.inbox.msg[i].zeny + sd->mail.inbox.msg[i].zeny ) > MAX_ZENY ) + if( sd->mail.inbox.msg[i].zeny + sd->status.zeny > MAX_ZENY ) + { + clif_Mail_getattachment(fd, 1); return; + } if( sd->mail.inbox.msg[i].item.nameid > 0 ) { -- cgit v1.2.3-70-g09d2