Core/Auras: Implemented SPELL_AURA_KEYBOUND_OVERRIDE (#28809)

Co-authored-by: MaxtorCoder <warsongkiller.s8@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Смердокрыл
2023-02-10 12:29:43 +02:00
committed by GitHub
parent 132ec70dd2
commit b37333c1d9
14 changed files with 84 additions and 7 deletions

View File

@@ -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);

View File

@@ -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,