summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-05-01 09:40:22 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-05-01 09:40:22 -0700
commit7db0a38b4ec702011d67b37160665499a8c837c1 (patch)
tree06d4d545b8ae6afc13d8380ab011c60ec4bf64a4
parentba57847533f1f39f90126e83bbeb544a3772e9ef (diff)
downloadtmwa-7db0a38b4ec702011d67b37160665499a8c837c1.tar.gz
tmwa-7db0a38b4ec702011d67b37160665499a8c837c1.tar.bz2
tmwa-7db0a38b4ec702011d67b37160665499a8c837c1.tar.xz
tmwa-7db0a38b4ec702011d67b37160665499a8c837c1.zip
Really fix the stupid timers finally
I was operating under sensible assumptions when I added those asserts. Unfortunately, the code wasn't.
-rw-r--r--src/map/skill.cpp6
1 files changed, 6 insertions, 0 deletions
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: