From ae57ff81700dbe6714ef107b34510457e9c9c5b6 Mon Sep 17 00:00:00 2001 From: glighta Date: Mon, 12 Nov 2012 00:06:25 +0000 Subject: -Add Homon-S skills, 1st implementation (all done except Eleanors) --Upd Skill conf to set land-limit for homonculus by default (ground skill limit) --Mv MH_HEILIGE_STANGE and MH_ANGRIFFS_MODUS skill from Eleanor to Bayeri -Enforce all zeny transaction to use pc_payzeny and pc_getzeny handlers, (auto log and clif) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16914 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mail.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'src/map/mail.c') diff --git a/src/map/mail.c b/src/map/mail.c index 70c73c0a4..62d046ea4 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -48,9 +48,7 @@ int mail_removezeny(struct map_session_data *sd, short flag) if (flag && sd->mail.zeny > 0) { //Zeny send - log_zeny(sd, LOG_TYPE_MAIL, sd, -sd->mail.zeny); - - sd->status.zeny -= sd->mail.zeny; + pc_payzeny(sd,sd->mail.zeny,LOG_TYPE_MAIL, NULL); } sd->mail.zeny = 0; clif_updatestatus(sd, SP_ZENY); @@ -59,10 +57,10 @@ int mail_removezeny(struct map_session_data *sd, short flag) } unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { - + if( pc_istrading(sd) ) return 1; - + if( idx == 0 ) { // Zeny Transfer if( amount < 0 || !pc_can_give_items(sd) ) return 1; @@ -88,7 +86,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { sd->mail.index = idx; sd->mail.nameid = sd->status.inventory[idx].nameid; sd->mail.amount = amount; - + return 0; } } @@ -96,7 +94,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { bool mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { int n; - + nullpo_retr(false,sd); nullpo_retr(false,msg); @@ -140,8 +138,7 @@ void mail_getattachment(struct map_session_data* sd, int zeny, struct item* item if( zeny > 0 ) { //Zeny receive - log_zeny(sd, LOG_TYPE_MAIL, sd, zeny); - pc_getzeny(sd, zeny); + pc_getzeny(sd, zeny,LOG_TYPE_MAIL, NULL); } } @@ -170,13 +167,9 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) if( msg->zeny > 0 ) { - //Zeny receive (due to failure) - log_zeny(sd, LOG_TYPE_MAIL, sd, msg->zeny); - - sd->status.zeny += msg->zeny; - clif_updatestatus(sd, SP_ZENY); + pc_getzeny(sd,msg->zeny,LOG_TYPE_MAIL, NULL); //Zeny receive (due to failure) } - + clif_Mail_send(sd->fd, true); } -- cgit v1.2.3-60-g2f50