mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Fix to Dialog Event
This commit is contained in:
1 parent
763174525d
commit
6571e09911
1 file changed
+3
-14
@@ -132,7 +132,6 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
public static class RangedLaunchedEvent extends NpcEvent implements INpcEvent.RangedLaunchedEvent {
|
||||
public final IEntityLivingBase target;
|
||||
public float damage;
|
||||
//public List<IProjectile> projectiles = new ArrayList();
|
||||
|
||||
public RangedLaunchedEvent(ICustomNpc npc, float damage, EntityLivingBase target) {
|
||||
super(npc);
|
||||
@@ -344,16 +343,12 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
public final int optionId;
|
||||
public final IDialog dialogObj;
|
||||
|
||||
public final int dialog;
|
||||
|
||||
public DialogEvent(ICustomNpc npc, EntityPlayer player, int id, int optionId, Dialog dialog) {
|
||||
super(npc);
|
||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||
this.id = id;
|
||||
this.optionId = optionId;
|
||||
this.dialogObj = dialog;
|
||||
|
||||
this.dialog = id;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -369,7 +364,7 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
}
|
||||
|
||||
public int getDialogId() {
|
||||
return dialog;
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getOptionId() {
|
||||
@@ -390,18 +385,12 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
public final int optionId;
|
||||
public final Dialog dialogObj;
|
||||
|
||||
public final int dialog;
|
||||
public final int option;
|
||||
|
||||
public DialogClosedEvent(ICustomNpc npc, EntityPlayer player, int id, int optionId, Dialog dialog) {
|
||||
super(npc);
|
||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||
this.id = id;
|
||||
this.optionId = optionId;
|
||||
this.dialogObj = dialog;
|
||||
|
||||
this.dialog = id;
|
||||
this.option = optionId;
|
||||
}
|
||||
|
||||
public String getHookName() {
|
||||
@@ -417,11 +406,11 @@ public class NpcEvent extends CustomNPCsEvent implements INpcEvent {
|
||||
}
|
||||
|
||||
public int getDialogId() {
|
||||
return option;
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getOptionId() {
|
||||
return option;
|
||||
return optionId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user