summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/clif.c21
2 files changed, 12 insertions, 13 deletions
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);