mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-05 23:20:32 +07:00
Added workaround for invalid spell cast modes
SQ defaults to SC when encountered until implemented SpellsQuickPanel changes CharData actions for the time being
This commit is contained in:
parent
8a820effc8
commit
0159615dba
@ -26,6 +26,10 @@ public class Actioneer extends PassiveSystem {
|
||||
|
||||
byte mode = (byte) mClass.get(entityId).type.getMode(skill.anim);
|
||||
log.trace("mode: {}", mode);
|
||||
if (mode == -1) { // TODO: replace -1 with some const INVALID_SKILL
|
||||
mode = (byte) mClass.get(entityId).type.getMode("SC");
|
||||
log.trace("changed mode to {} because it was invalid", mode);
|
||||
}
|
||||
|
||||
mSequence.create(entityId).sequence(mode, mMovementModes.get(entityId).NU);
|
||||
}
|
||||
|
@ -106,8 +106,12 @@ public class SpellsQuickPanel extends Table implements Disposable, CharData.Skil
|
||||
public void onPressed(MappedKey key, int keycode) {
|
||||
HotkeyButton button = keyMappings.get(key);
|
||||
if (button == null) return;
|
||||
// TODO: Replace Riiablo.charData.action with this button's action
|
||||
observer.copy(button);
|
||||
// FIXME: it isn't appropriate to have this call here -- should separate into a controller
|
||||
Riiablo.charData.setAction(
|
||||
Riiablo.charData.getItems().getAlternate(),
|
||||
leftSkills ? Input.Buttons.LEFT : Input.Buttons.RIGHT,
|
||||
button.getSkill());
|
||||
}
|
||||
};
|
||||
for (MappedKey Skill : Keys.Skill) Skill.addStateListener(mappedKeyListener);
|
||||
|
Loading…
Reference in New Issue
Block a user