diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-19 02:58:40 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-19 02:58:40 +0000 |
commit | b97753dfe8dec3dc954f8f44c039cd994e59a1b0 (patch) | |
tree | 5defc680e9cbfbce4f937aead79666290b85bf31 /src/map/clif.c | |
parent | a5e721f8cf55f3e174f70412ef4a6f11aaa40a59 (diff) | |
download | hercules-b97753dfe8dec3dc954f8f44c039cd994e59a1b0.tar.gz hercules-b97753dfe8dec3dc954f8f44c039cd994e59a1b0.tar.bz2 hercules-b97753dfe8dec3dc954f8f44c039cd994e59a1b0.tar.xz hercules-b97753dfe8dec3dc954f8f44c039cd994e59a1b0.zip |
- Fixed Spider Web fire damage bonus.
- Made Global chat always reply back to you even on @/# commands, this prevents the client from muting yourself due to "hack". However, this same fix isn't easily applicable to @ commands invoked from whispers or party/guild messages, those are still pending.
- Some fixes in socket.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8801 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 67c85504c..26683785b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5834,8 +5834,6 @@ int clif_party_created(struct map_session_data *sd,int flag) {
int fd;
- // printf("clif_party_message(%s, %d, %s)\n", p->name, account_id, mes);
-
nullpo_retr(0, sd);
fd=sd->fd;
@@ -8673,9 +8671,6 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < return;
}
- if ((is_atcommand(fd, sd, message, 0) != AtCommand_None) ||
- (is_charcommand(fd, sd, message,0) != CharCommand_None))
- 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)))
@@ -8687,7 +8682,16 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < return;
sd->cantalk_tick = gettick() + battle_config.min_chat_delay;
}
-
+
+ // To prevent client auto-muting, always send global chat back to self.
+ memcpy(WFIFOP(fd,0), RFIFOP(fd,0), RFIFOW(fd,2));
+ WFIFOW(fd,0) = 0x8e;
+ WFIFOSET(fd, WFIFOW(fd,2));
+
+ if ((is_atcommand(fd, sd, message, 0) != AtCommand_None) ||
+ (is_charcommand(fd, sd, message,0) != CharCommand_None))
+ return;
+
if (RFIFOW(fd,2)+4 < 128)
buf = buf2; //Use a static buffer.
else
@@ -8702,11 +8706,6 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < if(buf != buf2) aFree(buf);
- // send back message to the speaker
- memcpy(WFIFOP(fd,0), RFIFOP(fd,0), RFIFOW(fd,2));
- WFIFOW(fd,0) = 0x8e;
- WFIFOSET(fd, WFIFOW(fd,2));
-
#ifdef PCRE_SUPPORT
map_foreachinrange(npc_chat_sub, &sd->bl, AREA_SIZE, BL_NPC, message, strlen(message), &sd->bl);
map_foreachinrange(mob_chat_sub, &sd->bl, AREA_SIZE, BL_MOB, message, strlen(message), &sd->bl);
|