From 3c53303d1bd4f104c44f49cce36a8d8fcc3a6517 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 16 Aug 2020 13:40:43 -0700 Subject: [PATCH] Added support for reading corpse item list --- core/src/com/riiablo/save/d2s/D2S.java | 1 + core/src/com/riiablo/save/d2s/D2SReader96.java | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/core/src/com/riiablo/save/d2s/D2S.java b/core/src/com/riiablo/save/d2s/D2S.java index 2d364354..6e1347d2 100644 --- a/core/src/com/riiablo/save/d2s/D2S.java +++ b/core/src/com/riiablo/save/d2s/D2S.java @@ -55,6 +55,7 @@ public class D2S { StatData stats; SkillData skills; ItemData items; + ItemData corpse; GolemData golem; public static String getVersionString(int versionCode) { diff --git a/core/src/com/riiablo/save/d2s/D2SReader96.java b/core/src/com/riiablo/save/d2s/D2SReader96.java index b8cf49ef..199fc728 100644 --- a/core/src/com/riiablo/save/d2s/D2SReader96.java +++ b/core/src/com/riiablo/save/d2s/D2SReader96.java @@ -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) {