summaryrefslogtreecommitdiff
path: root/src/map/atcommand.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-04-17 13:22:58 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-04-27 14:09:22 -0700
commitd18f5bdb682a1d9c6e3a191926bfd46d36e813c1 (patch)
treec987d53ea924b761e5445572a438e0c4bc825d48 /src/map/atcommand.cpp
parentda6b990ca1f553a017003f32a436304c66c62b9e (diff)
downloadtmwa-d18f5bdb682a1d9c6e3a191926bfd46d36e813c1.tar.gz
tmwa-d18f5bdb682a1d9c6e3a191926bfd46d36e813c1.tar.bz2
tmwa-d18f5bdb682a1d9c6e3a191926bfd46d36e813c1.tar.xz
tmwa-d18f5bdb682a1d9c6e3a191926bfd46d36e813c1.zip
Force timers to be managed
Diffstat (limited to 'src/map/atcommand.cpp')
-rw-r--r--src/map/atcommand.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index ea13a04..5fffaa3 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -1898,11 +1898,7 @@ int atcommand_pvpoff(const int fd, struct map_session_data *sd,
{
if (sd->bl.m == pl_sd->bl.m)
{
- if (pl_sd->pvp_timer)
- {
- delete_timer(pl_sd->pvp_timer);
- pl_sd->pvp_timer = nullptr;
- }
+ pl_sd->pvp_timer.cancel();
}
}
}
@@ -1943,7 +1939,7 @@ int atcommand_pvpon(const int fd, struct map_session_data *sd,
{
if (sd->bl.m == pl_sd->bl.m && !pl_sd->pvp_timer)
{
- pl_sd->pvp_timer = add_timer(gettick() + std::chrono::milliseconds(200),
+ pl_sd->pvp_timer = Timer(gettick() + std::chrono::milliseconds(200),
std::bind(pc_calc_pvprank_timer, ph::_1, ph::_2, pl_sd->bl.id));
pl_sd->pvp_rank = 0;
pl_sd->pvp_lastusers = 0;
@@ -6049,7 +6045,7 @@ int atcommand_summon(const int, struct map_session_data *sd,
md->master_id = sd->bl.id;
md->state.special_mob_ai = 1;
md->mode = mob_db[md->mob_class].mode | MobMode::AGGRESSIVE;
- md->deletetimer = add_timer(tick + std::chrono::minutes(1),
+ md->deletetimer = Timer(tick + std::chrono::minutes(1),
std::bind(mob_timer_delete, ph::_1, ph::_2,
id));
clif_misceffect(&md->bl, 344);