mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Added hireling items to hireling panel
This commit is contained in:
parent
5ec59b5040
commit
3fad7d4b6a
@ -295,17 +295,17 @@ public class D2S {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
static class MercData {
|
||||
public static class MercData {
|
||||
static final int SIZE = 16;
|
||||
|
||||
static final int FLAG_DEAD = 0x100000;
|
||||
|
||||
int flags;
|
||||
int seed;
|
||||
short name;
|
||||
short type;
|
||||
int xp;
|
||||
MercItemData items;
|
||||
public int flags;
|
||||
public int seed;
|
||||
public short name;
|
||||
public short type;
|
||||
public int xp;
|
||||
public MercItemData items;
|
||||
|
||||
static MercData obtain(ByteBuffer buffer) {
|
||||
return new MercData().read(buffer);
|
||||
@ -338,7 +338,7 @@ public class D2S {
|
||||
return (flags & FLAG_DEAD) == FLAG_DEAD;
|
||||
}
|
||||
|
||||
static class MercItemData {
|
||||
public static class MercItemData {
|
||||
static final byte[] SECTION_HEADER = {0x6A, 0x66};
|
||||
|
||||
public byte header[];
|
||||
|
@ -107,6 +107,7 @@ public class Player extends Entity {
|
||||
|
||||
EnumMap<BodyLoc, Item> equipped = new EnumMap<>(BodyLoc.class);
|
||||
final Set<SlotListener> SLOT_LISTENERS = new CopyOnWriteArraySet<>();
|
||||
public D2S.MercData merc;
|
||||
|
||||
/** total number of items equipped for each set */
|
||||
public final IntIntMap SETS_EQUIP = new IntIntMap();
|
||||
@ -129,6 +130,10 @@ public class Player extends Entity {
|
||||
actions = d2s.actions;
|
||||
loadEquipped(d2s.items.equipped);
|
||||
loadInventory(d2s.items.inventory);
|
||||
merc = d2s.merc;
|
||||
for (Item item : merc.items.items.items) {
|
||||
item.load();
|
||||
}
|
||||
}
|
||||
|
||||
public Player(Connect connect) {
|
||||
|
@ -136,7 +136,7 @@ public class HirelingPanel extends WidgetGroup implements Disposable {
|
||||
for (int i = BodyLocs.HEAD; i < BodyLocs.NUM_LOCS; i++) {
|
||||
if (bodyParts[i] == null) continue;
|
||||
bodyParts[i].slot = i;
|
||||
//bodyParts[i].item = gameScreen.player.getSlot(BodyLoc.valueOf(i));
|
||||
bodyParts[i].item = gameScreen.player.merc.items.items.equipped.get(BodyLoc.valueOf(i));
|
||||
bodyParts[i].setBodyPart(Riiablo.files.bodylocs.get(i).Code);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user