From 0ca1ab88b5040cb13226fc41bff448c22f5ff175 Mon Sep 17 00:00:00 2001 From: gumi Date: Wed, 3 Jan 2018 18:05:21 -0500 Subject: remove mob timers, make areatimer only work on PC --- src/map/map.hpp | 3 --- src/map/npc.cpp | 15 --------------- src/map/script-fun.cpp | 10 ---------- 3 files changed, 28 deletions(-) diff --git a/src/map/map.hpp b/src/map/map.hpp index 9a184d5..24037e9 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -479,9 +479,6 @@ struct mob_data : block_list // [Fate] mob-specific stats earray stats; short size; - // Npc Runscripts - std::list eventqueuel; - Array eventtimer; }; struct BlockLists diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 8f4e5c7..fb56c55 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -398,21 +398,6 @@ int npc_addeventtimer(dumb_ptr bl, interval_t tick, NpcEvent name) int i; nullpo_retz(bl); - if (bl->bl_type == BL::MOB) - { - dumb_ptr md = bl->is_mob(); - for (i = 0; i < MAX_EVENTTIMER; i++) - if (!md->eventtimer[i]) - break; - - if (i < MAX_EVENTTIMER) - { - md->eventtimer[i] = Timer(gettick() + tick, - std::bind(npc_eventtimer, ph::_1, ph::_2, - md->bl_id, name)); - return 1; - } - } if (bl->bl_type == BL::NPC) { dumb_ptr nd = bl->is_npc(); diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 8aa8b5c..ff50400 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -4409,10 +4409,6 @@ void builtin_areatimer_sub(dumb_ptr bl, interval_t tick, NpcEvent ev dumb_ptr sd = map_id_is_player(bl->bl_id); pc_addeventtimer(sd, tick, event); } - else - { - npc_addeventtimer(bl, tick, event); - } } static @@ -4439,12 +4435,6 @@ void builtin_areatimer(ScriptState *st) case 0: block_type = BL::PC; break; - case 1: - block_type = BL::NPC; - break; - case 2: - block_type = BL::MOB; - break; default: return; } -- cgit v1.2.3-60-g2f50