mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 15:39:37 +00:00
NPCs are not spawned server side; change logic to handle it
This commit is contained in:
parent
db1cc788b4
commit
6516e4be1e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user