mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user