mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-06 07:30:41 +07:00
Fixed deserialization bug and appended additional fields to Item#toString
This commit is contained in:
parent
47d96abde4
commit
b6c21abbf7
@ -402,6 +402,18 @@ public class Item {
|
||||
.append("storeLoc", storeLoc)
|
||||
.append("gridX", gridX)
|
||||
.append("gridY", gridY)
|
||||
.append("socketsFilled", socketsFilled)
|
||||
.append("id", String.format("0x%08X", (int) id))
|
||||
.append("ilvl", ilvl)
|
||||
.append("quality", quality)
|
||||
.append("pictureId", pictureId)
|
||||
.append("classOnly", String.format("0x%04X", classOnly))
|
||||
.append("qualityId", String.format("0x%08X", qualityId))
|
||||
.append("qualityData", qualityData)
|
||||
.append("runewordData", String.format("0x%04X", runewordData))
|
||||
.append("inscription", inscription)
|
||||
.append("sockets", sockets)
|
||||
.append("attrs", Arrays.toString(stats))
|
||||
;
|
||||
} else {
|
||||
builder.append("location", location);
|
||||
|
@ -160,7 +160,7 @@ public class ItemSerializer {
|
||||
}
|
||||
|
||||
private static boolean readSockets(BitStream bitStream, Item item) {
|
||||
boolean hasSockets = (item.flags * Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED
|
||||
boolean hasSockets = (item.flags & Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED
|
||||
&& (item.type.is(Type.ARMO) || item.type.is(Type.WEAP));
|
||||
if (hasSockets) {
|
||||
int item_numsockets = item.attrs.base().read(Stat.item_numsockets, bitStream);
|
||||
|
Loading…
Reference in New Issue
Block a user