summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-12 00:06:25 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-12 00:06:25 +0000
commitae57ff81700dbe6714ef107b34510457e9c9c5b6 (patch)
treee624b5ac4214e5ac9e00aee596055ce19ff95be5 /src/map/mail.c
parent20e444cce123f97b5e2d60cfb4c134c08479fb41 (diff)
downloadhercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.gz
hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.bz2
hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.tar.xz
hercules-ae57ff81700dbe6714ef107b34510457e9c9c5b6.zip
-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
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c23
1 files changed, 8 insertions, 15 deletions
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);
}