summaryrefslogtreecommitdiff
path: root/src/game-server/npc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/npc.cpp')
-rw-r--r--src/game-server/npc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game-server/npc.cpp b/src/game-server/npc.cpp
index f9e714b9..7806e510 100644
--- a/src/game-server/npc.cpp
+++ b/src/game-server/npc.cpp
@@ -99,8 +99,9 @@ void Npc::start(Entity *npc, Entity *ch)
script->prepare(talkCallback);
script->push(npc);
script->push(ch);
- ch->getComponent<CharacterComponent>()
- ->startNpcThread(thread, static_cast<Actor*>(npc)->getPublicID());
+ auto *actorComponent = npc->getComponent<ActorComponent>();
+ ch->getComponent<CharacterComponent>()->startNpcThread(
+ thread, actorComponent->getPublicID());
}
}