diff options
Diffstat (limited to 'src/server/database/Database')
| -rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.cpp | 13 | ||||
| -rw-r--r-- | src/server/database/Database/Implementation/HotfixDatabase.h | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index f6e3f0ec08f..2df820e6fb4 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -23,13 +23,13 @@ // Force max id statements to appear exactly right after normal data fetch statement #define PREPARE_MAX_ID_STMT(stmtBase, sql, con) \ - static_assert(stmtBase + HOTFIX_MAX_ID_STMT_OFFSET == stmtBase##_MAX_ID, "Invalid prepared statement index for " #stmtBase "_MAX_ID"); \ - PrepareStatement(stmtBase##_MAX_ID, sql, con); + static_assert((stmtBase) + HOTFIX_MAX_ID_STMT_OFFSET == stmtBase##_MAX_ID, "Invalid prepared statement index for " #stmtBase "_MAX_ID"); \ + PrepareStatement(stmtBase##_MAX_ID, sql, con) // Force locale statements to be right after max id fetch statement #define PREPARE_LOCALE_STMT(stmtBase, sql, con) \ - static_assert(stmtBase + HOTFIX_LOCALE_STMT_OFFSET == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \ - PrepareStatement(stmtBase##_LOCALE, sql, con); + static_assert((stmtBase) + HOTFIX_LOCALE_STMT_OFFSET == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \ + PrepareStatement(stmtBase##_LOCALE, sql, con) void HotfixDatabaseConnection::DoPrepareStatements() { @@ -1465,6 +1465,11 @@ void HotfixDatabaseConnection::DoPrepareStatements() "Logic1, Logic2, Logic3, Logic4, Logic5 FROM spell_item_enchantment_condition WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, "SELECT MAX(ID) + 1 FROM spell_item_enchantment_condition", CONNECTION_SYNCH); + // SpellKeyboundOverride.db2 + PrepareStatement(HOTFIX_SEL_SPELL_KEYBOUND_OVERRIDE, "SELECT ID, `Function`, Type, Data, Flags FROM spell_keybound_override" + " WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); + PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_KEYBOUND_OVERRIDE, "SELECT MAX(ID) + 1 FROM spell_keybound_override", CONNECTION_SYNCH); + // SpellLabel.db2 PrepareStatement(HOTFIX_SEL_SPELL_LABEL, "SELECT ID, LabelID, SpellID FROM spell_label WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH); PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_LABEL, "SELECT MAX(ID) + 1 FROM spell_label", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index 46da89df7b0..a926f045989 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -844,6 +844,9 @@ enum HotfixDatabaseStatements : uint32 HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION, HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION_MAX_ID, + HOTFIX_SEL_SPELL_KEYBOUND_OVERRIDE, + HOTFIX_SEL_SPELL_KEYBOUND_OVERRIDE_MAX_ID, + HOTFIX_SEL_SPELL_LABEL, HOTFIX_SEL_SPELL_LABEL_MAX_ID, |
