From 4d073061a5a090c931f6bf09085d12e7de850ca1 Mon Sep 17 00:00:00 2001 From: Ritshu <87380648+Ritshu@users.noreply.github.com> Date: Mon, 25 Dec 2023 04:36:50 +0700 Subject: [PATCH] Update main.cpp update support for itemsdat v16 --- source/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/main.cpp b/source/main.cpp index 6f081f4..3d6854a 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -374,7 +374,7 @@ void decode_itemsDat(){ memcpy(&item.newInt2, data + memPos, 4); memPos += 4; } - if (itemsdatVer >= 15){ + if (itemsdatVer >= 15) { item.canPlayerSit = data[memPos]; memPos++; item.sitPlayerOffsetX = *(int*)(data + memPos); @@ -398,6 +398,10 @@ void decode_itemsDat(){ } } } + if (itemsdatVer >= 16) { + int16_t strLen = *(int16_t*)&data[memPos]; + memPos += 2 + strLen; + } if (i != item.itemID) { cout << "Unordered item! Something gone wrong?" << endl; exit(-1);