summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-26 08:42:32 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-26 08:42:32 +0000
commit525e08137aa36cc2bbd8284f8b48de01bbb70b4f (patch)
tree9ef040444cbd22550778ccfca75ec1bc697142db /src/map/clif.c
parent9befe305370ddcc177ca36f1d4d6c295ddfb7533 (diff)
downloadhercules-525e08137aa36cc2bbd8284f8b48de01bbb70b4f.tar.gz
hercules-525e08137aa36cc2bbd8284f8b48de01bbb70b4f.tar.bz2
hercules-525e08137aa36cc2bbd8284f8b48de01bbb70b4f.tar.xz
hercules-525e08137aa36cc2bbd8284f8b48de01bbb70b4f.zip
* Removed confusing map_nick2sd_nocase(), let the charserver handle it
* Added correct packet for attachment retrieval failure when overweight * Fixed one more mistake in r11571 (Sql->SqlStmt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11579 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3b2fefc1c..0d0aa997b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11465,7 +11465,10 @@ void clif_parse_Mail_getattach(int fd, struct map_session_data *sd)
weight = data->weight * sd->mail.inbox.msg[i].item.amount;
if (weight > sd->max_weight - sd->weight)
{
- clif_displaymessage(fd, "Attachment to heavy for you...");
+ WFIFOHEAD(fd,packet_len(0x245));
+ WFIFOW(fd,0) = 0x245;
+ WFIFOB(fd,2) = 2;
+ WFIFOSET(fd,packet_len(0x245));
return;
}
}
@@ -11635,7 +11638,6 @@ void clif_Mail_send(int fd, unsigned char flag)
/// S 0248 <packet len>.w <nick>.24B <title>.40B <body len>.B <message>.?B
void clif_parse_Mail_send(int fd, struct map_session_data *sd)
{
- struct map_session_data *rd;
struct mail_message msg;
int body_len;
nullpo_retv(sd);
@@ -11653,14 +11655,6 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
}
body_len = RFIFOB(fd,68);
- rd = map_nick2sd_nocase(RFIFOP(fd,4));
-
- if (rd && rd == sd) {
- clif_Mail_send(fd, 1);
- mail_removeitem(sd,0);
- mail_removezeny(sd,0);
- return;
- }
if (body_len > MAIL_BODY_LENGTH)
body_len = MAIL_BODY_LENGTH;
@@ -11674,16 +11668,9 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
}
msg.send_id = sd->status.char_id;
+ msg.dest_id = 0; // will attempt to resolve name
safestrncpy(msg.send_name, sd->status.name, NAME_LENGTH);
-
- if (rd) {
- msg.dest_id = rd->status.char_id;
- safestrncpy(msg.dest_name, rd->status.name, NAME_LENGTH);
- } else {
- msg.dest_id = 0;
- safestrncpy(msg.dest_name, (char*)RFIFOP(fd,4), NAME_LENGTH);
- }
-
+ safestrncpy(msg.dest_name, (char*)RFIFOP(fd,4), NAME_LENGTH);
safestrncpy(msg.title, (char*)RFIFOP(fd,28), MAIL_TITLE_LENGTH);
if (body_len)