mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 04:35:03 +00:00
Fix some Selection Handling for Abilities
This commit is contained in:
1 parent
b59f0b8f2f
commit
2ba2372bde
4 files changed
+65
-23
No files matched your search
@@ -794,11 +794,10 @@ public class NoppesUtilServer {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>();
|
||||
AbilityController controller = AbilityController.Instance;
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String name : controller.getAbilityNames()) {
|
||||
Ability ability = controller.getAbility(name);
|
||||
if (ability != null) {
|
||||
map.put(ability.getName(), index++);
|
||||
map.put(ability.getName(), ability.getAllowedBy().ordinal());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -809,11 +808,10 @@ public class NoppesUtilServer {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>();
|
||||
AbilityController controller = AbilityController.Instance;
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String name : controller.getCustomAbilityNames()) {
|
||||
Ability ability = controller.getCustomAbility(name);
|
||||
if (ability == null || !ability.getAllowedBy().allowsNpc()) continue;
|
||||
map.put(name, index++);
|
||||
if (ability == null) continue;
|
||||
map.put(name, ability.getAllowedBy().ordinal());
|
||||
}
|
||||
}
|
||||
sendScrollData(player, map, EnumScrollData.CUSTOM_ABILITIES);
|
||||
|
||||
Reference in new issue
Block a user