Added support for reading corpse item list

This commit is contained in:
Collin Smith 2020-08-16 13:40:43 -07:00
parent 506773d25c
commit 3c53303d1b
2 changed files with 3 additions and 10 deletions

View File

@ -55,6 +55,7 @@ public class D2S {
StatData stats;
SkillData skills;
ItemData items;
ItemData corpse;
GolemData golem;
public static String getVersionString(int versionCode) {

View File

@ -162,16 +162,8 @@ public class D2SReader96 {
d2s.skills = readSkillData(in);
Log.put("d2s.section", "items");
d2s.items = readItemData(in, itemReader);
try {
log.trace("Validating items footer signature");
itemReader.skipUntil(in.realign());
in.readSignature(ITEMS_FOOTER_SIGNATURE);
} catch (EndOfInput t) {
throw new InvalidFormat(
in,
"items footer " + ByteBufUtil.hexDump(ITEMS_FOOTER_SIGNATURE) + " is missing!",
t);
}
Log.put("d2s.section", "corpse");
d2s.corpse = readItemData(in, itemReader);
try {
in.skipUntil(MERC_SIGNATURE);
} catch (EndOfInput t) {