summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 7a0d6b4ad..aa2091054 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8548,11 +8548,12 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
if (messagelen > CHAT_SIZE) { // messages mustn't be too long
int i;
// special case here - allow some more freedom for frost joke & dazzler
- for(i = 0; i < MAX_SKILLTIMERSKILL; i++) // the only way to check ~.~
- if (sd->ud.skilltimerskill[i] && sd->ud.skilltimerskill[i]->timer != -1 &&
- (sd->ud.skilltimerskill[i]->skill_id == BA_FROSTJOKE || sd->ud.skilltimerskill[i]->skill_id == DC_SCREAM))
- break;
- if (i == MAX_SKILLTIMERSKILL) { // normal message, too long
+ // TODO:? You could use a state flag when FrostJoke/Scream is used, and unset it once the skill triggers. [Skotlex]
+ for(i = 0; i < MAX_SKILLTIMERSKILL && sd->ud.skilltimerskill[i] &&
+ sd->ud.skilltimerskill[i]->skill_id != BA_FROSTJOKE &&
+ sd->ud.skilltimerskill[i]->skill_id != DC_SCREAM; i++);
+
+ if (i == MAX_SKILLTIMERSKILL || !sd->ud.skilltimerskill[i]) { // normal message, too long
ShowWarning("clif_parse_GlobalMessage: Player '%s' sent a message too long ('%.*s')!", sd->status.name, CHAT_SIZE, message);
return;
}