mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
ICustomNpc:
-Fix for setRetaliateType
This commit is contained in:
1 parent
bad6c3e9e4
commit
2819c76d0a
2 files changed
+7
-2
No files matched your search
@@ -1008,8 +1008,13 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
* @param type Retaliation type. 0:normal, 1:panic, 2:retreat, 3:nothing
|
||||
*/
|
||||
public void setRetaliateType(int type){
|
||||
if (type < 0)
|
||||
type = 0;
|
||||
if (type > 3)
|
||||
type = 3;
|
||||
|
||||
npc.ai.onAttack = type;
|
||||
npc.setResponse();
|
||||
npc.updateTasks();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user