mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-08 23:07:46 +07:00
Added player actions array (left/right skills)
Added player actions array (left/right skills) Temporary fix for non-existing complex casting modes
This commit is contained in:
@ -732,13 +732,16 @@ public abstract class Entity implements Animation.AnimationListener {
|
||||
}
|
||||
|
||||
public boolean cast(final int spell) {
|
||||
if (spell < 0) return false;
|
||||
if (!isCastable(mode)) return false;
|
||||
setPath(null, null);
|
||||
//if (mode == getNeutralMode()) return;
|
||||
//animating = true;
|
||||
final Skills.Entry skill = Riiablo.files.skills.get(spell);
|
||||
byte tm = mode;
|
||||
boolean changed = sequence(type.getMode(skill.anim), getNeutralMode());
|
||||
byte newMode = type.getMode(skill.anim);
|
||||
if (newMode == -1) newMode = type.getMode("SC");
|
||||
boolean changed = sequence(newMode, getNeutralMode());
|
||||
if (!changed) return false;
|
||||
|
||||
System.out.println("cast " + type.MODE[tm] + "->" + type.MODE[mode]);
|
||||
|
@ -94,6 +94,7 @@ public class Player extends Entity {
|
||||
public Stats stats;
|
||||
public Skills skills;
|
||||
public int[] skillBar;
|
||||
public int[][] actions;
|
||||
public Map map;
|
||||
public Map.Zone curZone;
|
||||
public final CharacterClass charClass;
|
||||
@ -108,6 +109,7 @@ public class Player extends Entity {
|
||||
stats = new StatsImpl(name, characterClass.id);
|
||||
skills = new SkillsImpl();
|
||||
skillBar = new int[16];
|
||||
actions = new int[2][2];
|
||||
}
|
||||
|
||||
public Player(D2S d2s) {
|
||||
@ -115,6 +117,7 @@ public class Player extends Entity {
|
||||
stats = new D2SStats(d2s);
|
||||
skills = new D2SSkills(d2s);
|
||||
skillBar = d2s.skillBar;
|
||||
actions = d2s.actions;
|
||||
loadEquipped(d2s.items.equipped);
|
||||
loadInventory(d2s.items.inventory);
|
||||
}
|
||||
|
Reference in New Issue
Block a user