summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-19 02:58:40 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-19 02:58:40 +0000
commitb97753dfe8dec3dc954f8f44c039cd994e59a1b0 (patch)
tree5defc680e9cbfbce4f937aead79666290b85bf31
parenta5e721f8cf55f3e174f70412ef4a6f11aaa40a59 (diff)
downloadhercules-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
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/common/socket.c7
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/clif.c21
4 files changed, 21 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0f63b0524..a8dc00b14 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,11 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/18
+ * Fixed Spider Web fire damage bonus. [Skotlex]
+ * 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. [Skotlex]
* Merged Meruru's update to socket.c, which includes a rewritten parse
function, which should hopefully be more efficient than the previous code.
[Skotlex]
diff --git a/src/common/socket.c b/src/common/socket.c
index 3209008c5..450f6d09b 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -62,7 +62,10 @@ int ip_rules = 1;
#define TCP_FRAME_LEN 1024
#endif
-#ifndef MINCORE
+static int mode_neg=1;
+static int frame_size=TCP_FRAME_LEN;
+
+#ifndef MINICORE
enum {
ACO_DENY_ALLOW=0,
ACO_ALLOW_DENY,
@@ -75,8 +78,6 @@ static int access_order=ACO_DENY_ALLOW;
static int access_allownum=0;
static int access_denynum=0;
static int access_debug=0;
-static int mode_neg=1;
-static int frame_size=TCP_FRAME_LEN;
static int ddos_count = 10;
static int ddos_interval = 3000;
static int ddos_autoreset = 600*1000;
diff --git a/src/map/battle.c b/src/map/battle.c
index 9d7bf7514..f9590a50c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -201,8 +201,6 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
ratio += enchant_eff[sc->data[SC_VIOLENTGALE].val1-1];
if(sc->data[SC_DELUGE].timer!=-1 && atk_elem == ELE_WATER)
ratio += enchant_eff[sc->data[SC_DELUGE].val1-1];
- if(sc->data[SC_SPIDERWEB].timer!=-1 && atk_elem == ELE_FIRE) // [Celest]
- damage *= 2; //FIXME: Double damage instead of double ratio?
}
if (tsc && tsc->count)
{
@@ -214,6 +212,8 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
if (tsc->data[SC_ARMOR_ELEMENT].val3 == atk_elem)
ratio -= tsc->data[SC_ARMOR_ELEMENT].val4;
}
+ if(tsc->data[SC_SPIDERWEB].timer!=-1 && atk_elem == ELE_FIRE) // [Celest]
+ damage <<= 1;
}
return damage*ratio/100;
}
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);