summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-09-21 00:03:05 -0300
committershennetsind <ind@henn.et>2014-09-21 00:03:05 -0300
commit09326b385734eb824a4e39b59f332f93a1fb2949 (patch)
treee802f769218c9251857c1bc8e7d779a2d64a5b38 /src
parentdb896b4ec75d0bd32a699d2b850e0c0bc66d6506 (diff)
downloadhercules-09326b385734eb824a4e39b59f332f93a1fb2949.tar.gz
hercules-09326b385734eb824a4e39b59f332f93a1fb2949.tar.bz2
hercules-09326b385734eb824a4e39b59f332f93a1fb2949.tar.xz
hercules-09326b385734eb824a4e39b59f332f93a1fb2949.zip
Fixed Bug 8344
socket.c will no longer drop connections based on wdata size vs WFIFO_MAX. Fixed issue in cooldown logic which'd cause invalid timers and provide characters with ever-lasting cooldowns Special Thanks to Haruna! http://hercules.ws/board/tracker/issue-8344-some-error-message-on-map-server/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/common/socket.c7
-rw-r--r--src/map/skill.c6
2 files changed, 3 insertions, 10 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 0c48c7c46..c57cba32d 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -744,13 +744,6 @@ int WFIFOSET(int fd, size_t len)
return 0;
}
- if (s->wdata_size+len > WFIFO_MAX) { // reached maximum write fifo size
- ShowError("WFIFOSET: Maximum write buffer size for client connection %d exceeded, most likely caused by packet 0x%04x (len=%"PRIuS", ip=%u.%u.%u.%u).\n",
- fd, WFIFOW(fd,0), len, CONVIP(s->client_addr));
- set_eof(fd);
- return 0;
- }
-
}
s->wdata_size += len;
#ifdef SHOW_SERVER_STATS
diff --git a/src/map/skill.c b/src/map/skill.c
index db1296260..e20a58429 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17522,12 +17522,12 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
} else {
int i;
- for(i = 0; i < MAX_SKILL_TREE; i++) {
+ for(i = 0; i < cd->cursor; i++) {
if( cd->entry[i] && cd->entry[i]->skidx == idx )
break;
}
- if( i != MAX_SKILL_TREE ) {/* duplicate, update necessary */
+ if( i != cd->cursor ) {/* duplicate, update necessary */
cd->entry[i]->duration = tick;
#if PACKETVER >= 20120604
cd->entry[i]->total = tick;
@@ -18597,7 +18597,7 @@ int do_init_skill(bool minimal) {
skill->unit_ers = ers_new(sizeof(struct skill_unit_group),"skill.c::skill_unit_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK);
skill->timer_ers = ers_new(sizeof(struct skill_timerskill),"skill.c::skill_timer_ers",ERS_OPT_NONE|ERS_OPT_FLEX_CHUNK);
skill->cd_ers = ers_new(sizeof(struct skill_cd),"skill.c::skill_cd_ers",ERS_OPT_CLEAR|ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK);
- skill->cd_entry_ers = ers_new(sizeof(struct skill_cd_entry),"skill.c::skill_cd_entry_ers",ERS_OPT_CLEAR|ERS_OPT_FLEX_CHUNK);
+ skill->cd_entry_ers = ers_new(sizeof(struct skill_cd_entry),"skill.c::skill_cd_entry_ers",ERS_OPT_CLEAR|ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK);
ers_chunk_size(skill->cd_ers, 25);
ers_chunk_size(skill->cd_entry_ers, 100);