forked from 2009Scape/Server
made it more flexible
This commit is contained in:
parent
3d1a00fe7a
commit
fe4505303e
1 changed files with 5 additions and 2 deletions
|
|
@ -101,8 +101,11 @@ public final class DialogueInterpreter {
|
|||
if (args.length > 0 && args[0] instanceof NPC) {
|
||||
NPC npc = (NPC) args[0];
|
||||
npc.setDialoguePlayer(player);
|
||||
npc.getWalkingQueue().reset();
|
||||
npc.getPulseManager().clear();
|
||||
try { //this prevents the dialogue interpreter from dying when you try opening an NPC's dialogue without passing the NPC itself as an argument
|
||||
npc.getWalkingQueue().reset();
|
||||
npc.getPulseManager().clear();
|
||||
} catch(Exception e){
|
||||
}
|
||||
} else if (args.length < 1) {
|
||||
args = new Object[] { dialogueKey };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue