mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 01:22:54 +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();
|
var player = this.getPlayer();
|
||||||
// Check if the NPC id is valid.
|
// Check if the NPC id is valid.
|
||||||
var entity = player.getScene().getEntityById(npcEntityId);
|
var entity = player.getScene().getEntityById(npcEntityId);
|
||||||
if (entity == null) return;
|
if (entity != null) {
|
||||||
|
// The config ID of the entity is the NPC's ID.
|
||||||
// The config ID of the entity is the NPC's ID.
|
if (!talkData.getNpcId().contains(entity.getConfigId()))
|
||||||
if (!talkData.getNpcId().contains(entity.getConfigId()))
|
return;
|
||||||
return;
|
}
|
||||||
|
|
||||||
// Execute the talk action on associated handlers.
|
// Execute the talk action on associated handlers.
|
||||||
talkData
|
talkData
|
||||||
.getFinishExec()
|
.getFinishExec()
|
||||||
.forEach(
|
.forEach(
|
||||||
e ->
|
e ->
|
||||||
this.getPlayer().getServer().getTalkSystem().triggerExec(getPlayer(), talkData, e));
|
player.getServer().getTalkSystem().triggerExec(player, talkData, e));
|
||||||
|
|
||||||
// Invoke the talking events for quests.
|
// Invoke the talking events for quests.
|
||||||
var questManager = player.getQuestManager();
|
var questManager = player.getQuestManager();
|
||||||
|
Loading…
Reference in New Issue
Block a user