Skip to content

Commit

Permalink
Forgot to include fracturedMods when parsing mods from items
Browse files Browse the repository at this point in the history
Also fixed link to Fractured item icon
  • Loading branch information
testpushpleaseignore committed Jun 19, 2022
1 parent dcb2ab2 commit ed2b909
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<file alias="Redeemer-item-symbol.png">assets/Redeemer-item-symbol.png</file>
<file alias="Warlord-item-symbol.png">assets/Warlord-item-symbol.png</file>
<file alias="Eater-of-worlds-item-symbol.png">assets/Eater-of-worlds-item-symbol.png</file>
<file alias="Fractured-item-symbol">assets/Fractured-item-symbol.png</file>
<file alias="Fractured-item-symbol.png">assets/Fractured-item-symbol.png</file>
<file alias="Searing-exarch-item-symbol.png">assets/Searing-exarch-item-symbol.png</file>
<file alias="Synthesised-item-symbol.png">assets/Synthesised-item-symbol.png</file>

Expand Down
4 changes: 2 additions & 2 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const std::array<Item::CategoryReplaceMap, Item::k_CategoryLevels> Item::replace
};

const std::vector<std::string> ITEM_MOD_TYPES = {
"implicitMods", "enchantMods", "explicitMods", "craftedMods"
"implicitMods", "enchantMods", "explicitMods", "craftedMods", "fracturedMods"
};

static std::string item_unique_properties(const rapidjson::Value& json, const std::string& name) {
Expand Down Expand Up @@ -447,7 +447,7 @@ double Item::cDPS() const {
void Item::GenerateMods(const rapidjson::Value& json) {
bool mod_present = false;
double sum = 0;
for (auto& type : { "implicitMods", "explicitMods", "craftedMods" }) {
for (auto& type : { "implicitMods", "explicitMods", "craftedMods", "fracturedMods"}) {
if (!json.HasMember(type) || !json[type].IsArray())
continue;
for (auto& mod : json[type]) {
Expand Down
7 changes: 4 additions & 3 deletions src/sqlitedatastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ std::string SqliteDataStore::GetTabs(const ItemLocationType &type, const std::st

std::string SqliteDataStore::GetItems(const ItemLocation &loc, const std::string &default_value) {
std::string query = "SELECT value FROM items WHERE loc = ?";
std::string location = loc.get_tab_uniq_id();

sqlite3_stmt *stmt;
//sqlite3_prepare(db_, query.c_str(), -1, &stmt, 0);
sqlite3_prepare_v2(db_, query.c_str(), -1, &stmt, 0);
sqlite3_bind_text(stmt, 1, loc.get_tab_uniq_id().c_str(), -1, SQLITE_STATIC);
auto prepareResults = sqlite3_prepare_v2(db_, query.c_str(), -1, &stmt, NULL);
auto bindResults = sqlite3_bind_text(stmt, 1, location.c_str(), -1, SQLITE_STATIC);
std::string result(default_value);

auto rslt = sqlite3_step(stmt);
Expand Down
8 changes: 4 additions & 4 deletions src/version_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 43
#define VER_STR "v0.9.2"
#define VER_FILEVERSION 0,9,0,2
#define VER_FILEVERSION_STR "0.9.0.2"
#define VER_CODE 44
#define VER_STR "v0.9.3"
#define VER_FILEVERSION 0,9,0,3
#define VER_FILEVERSION_STR "0.9.0.3"

#define VER_PRODUCTVERSION VER_FILEVERSION
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
43
44

0 comments on commit ed2b909

Please sign in to comment.