- Fixed bug report 1170.

- Now char data is saved to on a success mail send or auction register operation.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12351 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
zephyrus 2008-03-12 21:49:42 +00:00
parent 078d492412
commit b493d16681
3 changed files with 14 additions and 3 deletions

View File

@ -105,11 +105,13 @@ minsave_time: 100
// 2: after every vending transaction
// 4: after closing storage/guild storage.
// 8: After hatching/returning to egg a pet.
// 16: After successfully sending a mail with attachment
// 32: After successfully submitting an item for auction
// NOTE: These settings decrease the chance of dupes/lost items when there's a
// server crash at the expense of increasing the map/char server lag. If your
// server rarely crashes, but experiences interserver lag, you may want to set
// these off.
save_settings: 15
save_settings: 63
// Message of the day file, when a character logs on, this message is displayed.
motd_txt: conf/motd.txt

View File

@ -7978,6 +7978,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
sd->state.night = 0;
clif_status_load(&sd->bl, SI_NIGHT, 0);
}
sd->state.changemap = false;
}
sd->state.using_fake_npc = 0;
@ -11681,7 +11682,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
if( DIFF_TICK(sd->cansendmail_tick, gettick()) > 0 )
{
clif_displaymessage(sd->fd,"Cannot send mails too fast!!.");
clif_Mail_send(fd, 1); // fail
clif_Mail_send(fd, true); // fail
return;
}
@ -11692,7 +11693,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
if( !mail_setattachment(sd, &msg) )
{ // Invalid Append condition
clif_Mail_send(sd->fd, 1); // fail
clif_Mail_send(sd->fd, true); // fail
mail_removeitem(sd,0);
mail_removezeny(sd,0);
return;

View File

@ -1644,7 +1644,11 @@ static void intif_parse_Mail_send(int fd)
if( fail )
mail_deliveryfail(sd, &msg);
else
{
clif_Mail_send(sd->fd, false);
if( save_settings&16 )
chrif_save(sd, 0);
}
}
if( fail )
@ -1738,7 +1742,11 @@ static void intif_parse_Auction_register(int fd)
return;
if( auction.auction_id > 0 )
{
clif_Auction_message(sd->fd, 1); // Confirmation Packet ??
if( save_settings&32 )
chrif_save(sd,0);
}
else
{
clif_Auction_message(sd->fd, 4);