diff options
author | shennetsind <ind@henn.et> | 2014-09-21 00:03:05 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-09-21 00:03:05 -0300 |
commit | 09326b385734eb824a4e39b59f332f93a1fb2949 (patch) | |
tree | e802f769218c9251857c1bc8e7d779a2d64a5b38 /src/map/skill.c | |
parent | db896b4ec75d0bd32a699d2b850e0c0bc66d6506 (diff) | |
download | hercules-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/map/skill.c')
-rw-r--r-- | src/map/skill.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |