mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 21:05:06 +00:00
Merge Dev into PR 110
This commit is contained in:
commit
3e43855128
39 files changed
+1149
-355
No files matched your search
@@ -10,13 +10,16 @@ import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.entity.data.IModelData;
|
||||
import noppes.npcs.api.handler.IOverlayHandler;
|
||||
import noppes.npcs.api.handler.data.IAnimationData;
|
||||
import noppes.npcs.api.handler.data.IDialog;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
import noppes.npcs.api.handler.data.ILines;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.jobs.IJob;
|
||||
import noppes.npcs.api.roles.IRole;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
import noppes.npcs.constants.*;
|
||||
import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.controllers.data.DialogOption;
|
||||
import noppes.npcs.controllers.data.Line;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -326,7 +329,49 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return;
|
||||
npc.say((EntityPlayer) player.getMCEntity(), new Line(message));
|
||||
}
|
||||
|
||||
|
||||
public IDialog getDialog(int slot) {
|
||||
return NpcAPI.Instance().getDialogs().get(this.getDialogId(slot));
|
||||
}
|
||||
|
||||
public int getDialogId(int slot) {
|
||||
if (npc.dialogs.containsKey(slot)) {
|
||||
DialogOption option = npc.dialogs.get(slot);
|
||||
if (option.hasDialog()) {
|
||||
return option.dialogId;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void setDialog(int slot, IDialog dialog) {
|
||||
this.setDialog(slot, dialog.getId());
|
||||
}
|
||||
|
||||
public void setDialog(int slot, int dialogId) {
|
||||
NoppesUtilServer.setNpcDialog(slot,dialogId, this.npc);
|
||||
}
|
||||
|
||||
public ILines getInteractLines() {
|
||||
return this.npc.advanced.interactLines;
|
||||
}
|
||||
|
||||
public ILines getWorldLines() {
|
||||
return this.npc.advanced.worldLines;
|
||||
}
|
||||
|
||||
public ILines getAttackLines() {
|
||||
return this.npc.advanced.attackLines;
|
||||
}
|
||||
|
||||
public ILines getKilledLines() {
|
||||
return this.npc.advanced.killedLines;
|
||||
}
|
||||
|
||||
public ILines getKillLines() {
|
||||
return this.npc.advanced.killLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the npc, doesnt't despawn it
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user