mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-04 05:16:21 -04:00
Finished NPC conversations, fixed disconnect bug, fixed AI atk speed check
This commit is contained in:
@@ -57,6 +57,7 @@ public class ConversationService implements INetworkDispatch {
|
||||
if(player.getConversingNpc() != null && player.getConversingNpc() != npc)
|
||||
handleEndConversation(player, player.getConversingNpc());
|
||||
|
||||
player.setConversingNpc(npc);
|
||||
sendStartConversation(player, npc);
|
||||
core.scriptService.callScript("scripts/conversation/", (String) npc.getAttachment("conversationFile"), "startConversation", core, player, npc);
|
||||
}
|
||||
@@ -65,16 +66,19 @@ public class ConversationService implements INetworkDispatch {
|
||||
|
||||
TangibleObject npc = player.getConversingNpc();
|
||||
|
||||
if(npc == null)
|
||||
if(npc == null) {
|
||||
System.out.println("npc is null");
|
||||
return;
|
||||
}
|
||||
|
||||
PyObject func = conversationHandlers.get(player);
|
||||
|
||||
if(func == null)
|
||||
if(func == null) {
|
||||
System.out.println("handler func is null");
|
||||
return;
|
||||
}
|
||||
|
||||
conversationHandlers.remove(player);
|
||||
|
||||
func.__call__(Py.java2py(core), Py.java2py(player), Py.java2py(npc), Py.java2py(selectionId));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user