From 7db0a38b4ec702011d67b37160665499a8c837c1 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 1 May 2013 09:40:22 -0700 Subject: Really fix the stupid timers finally I was operating under sensible assumptions when I added those asserts. Unfortunately, the code wasn't. --- src/map/skill.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 4b7a935..47a2e5c 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -941,13 +941,19 @@ void skill_status_change_timer(TimerData *tid, tick_t tick, int id, StatusChange sc_data[type].timer = Timer(tick + std::chrono::seconds(1), std::bind(skill_status_change_timer, ph::_1, ph::_2, bl->id, type)); + return; } } else + { sc_data[type].timer = Timer(tick + std::chrono::seconds(2), std::bind(skill_status_change_timer, ph::_1, ph::_2, bl->id, type)); + return; + } break; + // If you manually reschedule the timer, you MUST skip the + // call to skill_status_change_end below. /* 時間切れ無し?? */ case StatusChange::SC_WEIGHT50: -- cgit v1.2.3-60-g2f50