From 4149f73f4c597d237c10749d6bbb49709130eeb7 Mon Sep 17 00:00:00 2001 From: testpushpleaseignore Date: Sat, 31 Dec 2022 11:47:37 -0600 Subject: [PATCH] Corrected typeLine_ for items that are "hybrid" It seems that support gems that have more than one skill within it (e.g. Predator Support), it would currently interpret that secondary skill as the gem name. Should have it fixed now to pull a "hybrid.baseTypeName" field, if it should exist. will tag this fix as v0.9.7 --- src/item.cpp | 5 ++++- src/version_defines.h | 8 ++++---- version.txt | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index bc7e722a9..ebbf5fd03 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -103,7 +103,10 @@ Item::Item(const rapidjson::Value& json, const ItemLocation& loc) : if (json.HasMember("name") && json["name"].IsString()) name_ = fixup_name(json["name"].GetString()); if (json.HasMember("typeLine") && json["typeLine"].IsString()) - typeLine_ = fixup_name(json["typeLine"].GetString()); + if(json.HasMember("hybrid") && json["hybrid"].HasMember("baseTypeName") && json["hybrid"]["baseTypeName"].IsString()) + typeLine_ = fixup_name(json["hybrid"]["baseTypeName"].GetString()); + else + typeLine_ = fixup_name(json["typeLine"].GetString()); if (json.HasMember("baseType") && json["baseType"].IsString()) baseType_ = fixup_name(json["baseType"].GetString()); diff --git a/src/version_defines.h b/src/version_defines.h index da33a2ba4..6b033ef46 100644 --- a/src/version_defines.h +++ b/src/version_defines.h @@ -4,10 +4,10 @@ //The program will look to this file in the GitHub repo, and compare it to //the VER_CODE in the current installation. If the number in the version.txt //file is greater than VER_CODE, then the updater will notify the user -#define VER_CODE 47 -#define VER_STR "v0.9.6" -#define VER_FILEVERSION 0,9,0,6 -#define VER_FILEVERSION_STR "0.9.0.6" +#define VER_CODE 48 +#define VER_STR "v0.9.7" +#define VER_FILEVERSION 0,9,0,7 +#define VER_FILEVERSION_STR "0.9.0.7" #define VER_PRODUCTVERSION VER_FILEVERSION #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR diff --git a/version.txt b/version.txt index 801f18010..31ff414b7 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -47 \ No newline at end of file +48 \ No newline at end of file