Update to item effect serialization
This commit is contained in:
@@ -476,15 +476,29 @@ public class ManageNPCMsg extends ClientNetMsg {
|
|||||||
else
|
else
|
||||||
writer.putInt(-1497023830);
|
writer.putInt(-1497023830);
|
||||||
|
|
||||||
if ((prefix != null && !item.isRandom()) || (prefix != null && item.isComplete()))
|
if (item.prefixToken == 0) {
|
||||||
writer.putInt(prefix.getToken());
|
if (!item.isComplete())
|
||||||
else
|
writer.putInt(0);
|
||||||
writer.putInt(0);
|
else
|
||||||
|
writer.putInt(prefix.getToken());
|
||||||
|
} else {
|
||||||
|
if (prefix != null)
|
||||||
|
writer.putInt(prefix.getToken());
|
||||||
|
else
|
||||||
|
writer.putInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
if ((suffix != null && !item.isRandom()) || (suffix != null && item.isComplete()))
|
if (item.suffixToken == 0) {
|
||||||
writer.putInt(suffix.getToken());
|
if (!item.isComplete())
|
||||||
else
|
writer.putInt(0);
|
||||||
writer.putInt(0);
|
else
|
||||||
|
writer.putInt(suffix.getToken());
|
||||||
|
} else {
|
||||||
|
if (suffix != null)
|
||||||
|
writer.putInt(suffix.getToken());
|
||||||
|
else
|
||||||
|
writer.putInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
writer.putString(item.name);
|
writer.putString(item.name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public class Item extends AbstractWorldObject {
|
|||||||
public int chargesRemaining;
|
public int chargesRemaining;
|
||||||
public mbEnums.EquipSlotType equipSlot;
|
public mbEnums.EquipSlotType equipSlot;
|
||||||
private boolean canDestroy;
|
private boolean canDestroy;
|
||||||
private boolean isRandom = false;
|
|
||||||
public int value;
|
public int value;
|
||||||
public OwnerType ownerType;
|
public OwnerType ownerType;
|
||||||
public int templateID;
|
public int templateID;
|
||||||
@@ -1129,14 +1128,6 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRandom() {
|
|
||||||
return isRandom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRandom(boolean isRandom) {
|
|
||||||
this.isRandom = isRandom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCustomValue() {
|
public boolean isCustomValue() {
|
||||||
if (this.value == 0)
|
if (this.value == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user