mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-08 23:07:46 +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:
@ -26,6 +26,10 @@ public class Actioneer extends PassiveSystem {
|
|||||||
|
|
||||||
byte mode = (byte) mClass.get(entityId).type.getMode(skill.anim);
|
byte mode = (byte) mClass.get(entityId).type.getMode(skill.anim);
|
||||||
log.trace("mode: {}", mode);
|
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);
|
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) {
|
public void onPressed(MappedKey key, int keycode) {
|
||||||
HotkeyButton button = keyMappings.get(key);
|
HotkeyButton button = keyMappings.get(key);
|
||||||
if (button == null) return;
|
if (button == null) return;
|
||||||
// TODO: Replace Riiablo.charData.action with this button's action
|
|
||||||
observer.copy(button);
|
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);
|
for (MappedKey Skill : Keys.Skill) Skill.addStateListener(mappedKeyListener);
|
||||||
|
Reference in New Issue
Block a user