mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
commit
05a7838380
1 file changed
+9
-1
@@ -43,7 +43,15 @@ public final class NpcActionVerificationHandler extends MessageHandler<NpcAction
|
||||
}
|
||||
|
||||
NpcDefinition definition = npc.getDefinition();
|
||||
if (message.getOption() >= definition.getInteractions().length) {
|
||||
String[] actions = definition.getInteractions();
|
||||
int option = message.getOption();
|
||||
|
||||
if (option < 0 || option >= actions.length) {
|
||||
message.terminate();
|
||||
return;
|
||||
}
|
||||
|
||||
if ("null".equals(actions[option])) {
|
||||
message.terminate();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user