mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-01 10:24:30 +07:00
Fixed bug specific to socketed misc items
Custom Tome of TP I have that has socket flag set and game still works This fix allows socketing of non armor or weapon items (as in original game)
This commit is contained in:
parent
3c56558e9c
commit
8506cc4324
@ -214,8 +214,7 @@ public class ItemReader {
|
||||
}
|
||||
|
||||
private static boolean readSockets(BitInput bits, Item item) {
|
||||
boolean hasSockets = (item.flags & Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED
|
||||
&& (item.type.is(Type.ARMO) || item.type.is(Type.WEAP));
|
||||
boolean hasSockets = (item.flags & Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED;
|
||||
if (hasSockets) {
|
||||
int item_numsockets = item.props.base().read(Stat.item_numsockets, bits);
|
||||
item.sockets = new Array<>(item_numsockets);
|
||||
|
@ -182,8 +182,7 @@ public class ItemWriter {
|
||||
}
|
||||
|
||||
private static boolean writeSockets(Item item, BitOutput bits) {
|
||||
boolean hasSockets = (item.flags & Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED
|
||||
&& (item.type.is(Type.ARMO) || item.type.is(Type.WEAP));
|
||||
boolean hasSockets = (item.flags & Item.ITEMFLAG_SOCKETED) == Item.ITEMFLAG_SOCKETED;
|
||||
if (hasSockets) {
|
||||
item.props.base().write(Stat.item_numsockets, bits);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user