NPCs are not spawned server side; change logic to handle it

This commit is contained in:
KingRainbow44 2023-05-11 21:17:08 -04:00
parent db1cc788b4
commit 6516e4be1e
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -28,18 +28,18 @@ public final class TalkManager extends BasePlayerManager {
var player = this.getPlayer();
// Check if the NPC id is valid.
var entity = player.getScene().getEntityById(npcEntityId);
if (entity == null) return;
if (entity != null) {
// The config ID of the entity is the NPC's ID.
if (!talkData.getNpcId().contains(entity.getConfigId()))
return;
}
// Execute the talk action on associated handlers.
talkData
.getFinishExec()
.forEach(
e ->
this.getPlayer().getServer().getTalkSystem().triggerExec(getPlayer(), talkData, e));
player.getServer().getTalkSystem().triggerExec(player, talkData, e));
// Invoke the talking events for quests.
var questManager = player.getQuestManager();