From 7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 30 Jun 2014 16:47:03 -0700 Subject: It's about time I did this --- src/map/npc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/map/npc.cpp') diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 16090b2..a6427d6 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -181,7 +181,7 @@ int npc_event_dequeue(dumb_ptr sd) if (!sd->eventqueuel.empty()) { - if (!pc_addeventtimer(sd, std::chrono::milliseconds(100), sd->eventqueuel.front())) + if (!pc_addeventtimer(sd, 100_ms, sd->eventqueuel.front())) { PRINTF("npc_event_dequeue(): Event timer is full.\n"_fmt); return 0; @@ -318,9 +318,9 @@ int npc_event_do_oninit(void) int c = npc_event_doall(stringish("OnInit"_s)); PRINTF("npc: OnInit Event done. (%d npc)\n"_fmt, c); - Timer(gettick() + std::chrono::milliseconds(100), + Timer(gettick() + 100_ms, npc_event_do_clock, - std::chrono::seconds(1) + 1_s ).detach(); return 0; @@ -1042,7 +1042,7 @@ int npc_parse_warp(XString w1, XString, NpcName w3, XString w4) nd->npc_class = WARP_CLASS; else nd->npc_class = WARP_DEBUG_CLASS; - nd->speed = std::chrono::milliseconds(200); + nd->speed = 200_ms; nd->option = Option::ZERO; nd->opt1 = Opt1::ZERO; nd->opt2 = Opt2::ZERO; @@ -1157,7 +1157,7 @@ int npc_parse_shop(XString w1, XString, NpcName w3, ZString w4a) nd->flag = 0; nd->name = w3; nd->npc_class = npc_class; - nd->speed = std::chrono::milliseconds(200); + nd->speed = 200_ms; nd->option = Option::ZERO; nd->opt1 = Opt1::ZERO; nd->opt2 = Opt2::ZERO; @@ -1338,7 +1338,7 @@ int npc_parse_script(XString w1, XString w2, NpcName w3, ZString w4, nd->dir = dir; nd->flag = 0; nd->npc_class = npc_class; - nd->speed = std::chrono::milliseconds(200); + nd->speed = 200_ms; nd->scr.script = std::move(script); nd->option = Option::ZERO; nd->opt1 = Opt1::ZERO; @@ -1620,7 +1620,7 @@ dumb_ptr npc_spawn_text(map_local *m, int x, int y, retval->message = message; retval->npc_class = npc_class; - retval->speed = std::chrono::milliseconds(200); + retval->speed = 200_ms; clif_spawnnpc(retval); map_addblock(retval); -- cgit v1.2.3-60-g2f50