summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/npc.cpp2
-rw-r--r--src/map/npc.hpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index c4187c1..a40a4ec 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -622,7 +622,7 @@ int npc_event(dumb_ptr<map_session_data> sd, NpcEvent eventname,
&& (sd->bl_y < nd->bl_y - ys / 2 || nd->bl_y + ys / 2 < sd->bl_y))
return 1;
}
- if (sd->npc_id)
+ if (sd->npc_id && sd->npc_pos > -1 && args.size() < 1) // if called from a timer we process async, otherwise sync
{
sd->eventqueuel.push_back(eventname);
return 1;
diff --git a/src/map/npc.hpp b/src/map/npc.hpp
index fa5b6a3..e230ffe 100644
--- a/src/map/npc.hpp
+++ b/src/map/npc.hpp
@@ -45,7 +45,6 @@ constexpr Species INVISIBLE_CLASS = wrap<Species>(32767);
int npc_event_dequeue(dumb_ptr<map_session_data> sd);
int npc_event(dumb_ptr<map_session_data>, NpcEvent, int, Slice<argrec_t>);
-int npc_event(BlockId, NpcEvent, int, Slice<argrec_t>);
inline
int npc_event(dumb_ptr<map_session_data> sd, NpcEvent npcname, int i)
{