diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-19 14:07:32 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-19 14:07:32 +0000 |
commit | 14cfaf27b57916b61297b8d0fa4624dee8eae413 (patch) | |
tree | 629977912ea8a8b9a861878e483640ddd1a17420 /src | |
parent | c41360ba01534eb4864aee95eb1adce8c9606c95 (diff) | |
download | hercules-14cfaf27b57916b61297b8d0fa4624dee8eae413.tar.gz hercules-14cfaf27b57916b61297b8d0fa4624dee8eae413.tar.bz2 hercules-14cfaf27b57916b61297b8d0fa4624dee8eae413.tar.xz hercules-14cfaf27b57916b61297b8d0fa4624dee8eae413.zip |
- Simplified the code for @storage
- Added echoing messages back to self when using @/# commands on whispers and party/guild messages, to prevent the client from muting yourself.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8810 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 12 | ||||
-rw-r--r-- | src/map/clif.c | 24 |
2 files changed, 24 insertions, 12 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9ac6d6862..8d3756441 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2194,21 +2194,13 @@ int atcommand_storage( const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- struct storage *stor; //changes from Freya/Yor
nullpo_retr(-1, sd);
- if (sd->state.storage_flag) {
+ if (storage_storageopen(sd) == 1)
+ { //Already open.
clif_displaymessage(fd, msg_txt(250));
return -1;
}
-
- if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) {
- clif_displaymessage(fd, msg_txt(250));
- return -1;
- }
-
- storage_storageopen(sd);
-
return 0;
}
diff --git a/src/map/clif.c b/src/map/clif.c index 26683785b..f6aa5e223 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6740,8 +6740,6 @@ int clif_guild_memberlogin_notice(struct guild *g,int idx,int flag) nullpo_retr(0, g);
- // printf("clif_guild_message(%s, %d, %s)\n", g->name, account_id, mes);
-
WBUFW(buf, 0)=0x16d;
WBUFL(buf, 2)=g->member[idx].account_id;
WBUFL(buf, 6)=g->member[idx].char_id;
@@ -9040,6 +9038,7 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni if ((is_charcommand(fd, sd, gm_command, 0) != CharCommand_None) ||
(is_atcommand(fd, sd, gm_command, 0) != AtCommand_None)) {
if(gm_command) aFree(gm_command);
+ clif_wis_end(fd, 0); // Send success to prevent client from self-muting.
return;
}
if(gm_command) aFree(gm_command);
@@ -10393,7 +10392,18 @@ void clif_parse_PartyMessage(int fd, struct map_session_data *sd) { if (is_charcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != CharCommand_None ||
is_atcommand(fd, sd, (char*)RFIFOP(fd,4), 0) != AtCommand_None)
+ {
+ char *mes = RFIFOP(fd,4);
+ int len = RFIFOW(fd,2)-4;
+ //Send text to self to prevent client-muting.
+ WFIFOHEAD(fd, len+8);
+ WFIFOW(fd,0)=0x109;
+ WFIFOW(fd,2)=len+8;
+ WFIFOL(fd,4)=sd->status.account_id;
+ memcpy(WFIFOP(fd,8),mes,len);
+ WFIFOSET(fd, len+8);
return;
+ }
if (sd->sc.count && (
sd->sc.data[SC_BERSERK].timer!=-1 ||
(sd->sc.data[SC_NOCHAT].timer!=-1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCHAT)
@@ -10614,7 +10624,17 @@ void clif_parse_GuildMessage(int fd,struct map_session_data *sd) { if (is_charcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != CharCommand_None ||
is_atcommand(fd, sd, (char*)RFIFOP(fd, 4), 0) != AtCommand_None)
+ {
+ char *mes = RFIFOP(fd,4);
+ int len = RFIFOW(fd,2)-4;
+ //Send text to self to prevent client-muting.
+ WFIFOHEAD(fd, len+4);
+ WFIFOW(fd, 0) = 0x17f;
+ WFIFOW(fd, 2) = len+4;
+ memcpy(WFIFOP(fd,4), mes, len);
+ WFIFOSET(fd, len+4);
return;
+ }
if (sd->sc.count && (
sd->sc.data[SC_BERSERK].timer!=-1 ||
(sd->sc.data[SC_NOCHAT].timer!=-1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCHAT)
|