mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-10 02:47:02 +07:00
Added function to translate mode based on source entity type
This commit is contained in:
parent
2820ba7566
commit
60247a6699
@ -84,7 +84,7 @@ public class Actioneer extends PassiveSystem {
|
||||
|
||||
targetVec = targetVec != null ? targetVec.cpy() : Vector2.Zero;
|
||||
final Class.Type type = mClass.get(entityId).type;
|
||||
byte mode = (byte) type.getMode(skill.anim);
|
||||
byte mode = (byte) getMode(skill, type);
|
||||
log.trace("mode: {}", mode);
|
||||
if (mode == Engine.INVALID_MODE) {
|
||||
mode = (byte) type.getMode("SC");
|
||||
@ -101,6 +101,13 @@ public class Actioneer extends PassiveSystem {
|
||||
events.dispatch(SkillStartEvent.obtain(entityId, skillId, targetId, targetVec, skill.srvstfunc, skill.cltstfunc));
|
||||
}
|
||||
|
||||
int getMode(Skills.Entry skill, Class.Type type) {
|
||||
switch (type) {
|
||||
case MON: return type.getMode(skill.monanim);
|
||||
default: return type.getMode(skill.anim);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onAnimDataKeyframe(AnimDataKeyframeEvent event) {
|
||||
if (!mCasting.has(event.entityId)) return;
|
||||
|
Loading…
Reference in New Issue
Block a user