diff options
| author | MitchesD <majklprofik@seznam.cz> | 2015-08-26 11:12:35 +0200 |
|---|---|---|
| committer | MitchesD <majklprofik@seznam.cz> | 2015-08-26 11:15:00 +0200 |
| commit | 614b5832ba96b4c5905ece5490a7b5d18c2f710b (patch) | |
| tree | 454e71dfcab1da90490466dfebd69a115950866d /src/server/database/Database/Implementation | |
| parent | ca5c5221ba8376d152a4c8216afd922924475802 (diff) | |
Core/Player: implemented Toybox
* now you can use all the things in toybox - add new toys, set them as favorite and use them
Diffstat (limited to 'src/server/database/Database/Implementation')
4 files changed, 14 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp index c037f1bce70..ff3f8e906c7 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.cpp +++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp @@ -417,6 +417,10 @@ void HotfixDatabaseConnection::DoPrepareStatements() PrepareStatement(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name, CategoryType, CategoryMask FROM totem_category ORDER BY ID DESC", CONNECTION_SYNCH); PREPARE_LOCALE_STMT(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name_lang FROM totem_category_locale WHERE locale = ?", CONNECTION_SYNCH); + // Toy.db2 + PrepareStatement(HOTFIX_SEL_TOY, "SELECT ID, ItemID, Flags, Description, CategoryFilter FROM toy ORDER BY ID DESC", CONNECTION_SYNCH); + PREPARE_LOCALE_STMT(HOTFIX_SEL_TOY, "SELECT ID, Description_lang FROM toy_locale WHERE locale = ?", CONNECTION_SYNCH); + // TransportAnimation.db2 PrepareStatement(HOTFIX_SEL_TRANSPORT_ANIMATION, "SELECT ID, TransportID, TimeIndex, PosX, PosY, PosZ, SequenceID FROM transport_animation" " ORDER BY ID DESC", CONNECTION_SYNCH); diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h index c92b7b23499..7740c78afc3 100644 --- a/src/server/database/Database/Implementation/HotfixDatabase.h +++ b/src/server/database/Database/Implementation/HotfixDatabase.h @@ -247,6 +247,9 @@ enum HotfixDatabaseStatements HOTFIX_SEL_TOTEM_CATEGORY, HOTFIX_SEL_TOTEM_CATEGORY_LOCALE, + HOTFIX_SEL_TOY, + HOTFIX_SEL_TOY_LOCALE, + HOTFIX_SEL_TRANSPORT_ANIMATION, HOTFIX_SEL_TRANSPORT_ROTATION, diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp index a3d04e03c79..869dc617246 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.cpp +++ b/src/server/database/Database/Implementation/LoginDatabase.cpp @@ -140,4 +140,8 @@ void LoginDatabaseConnection::DoPrepareStatements() PrepareStatement(LOGIN_SEL_LAST_CHAR_UNDELETE, "SELECT LastCharacterUndelete FROM battlenet_accounts WHERE Id = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_UPD_LAST_CHAR_UNDELETE, "UPDATE battlenet_accounts SET LastCharacterUndelete = UNIX_TIMESTAMP() WHERE Id = ?", CONNECTION_ASYNC); + + // Account wide toys + PrepareStatement(LOGIN_SEL_ACCOUNT_TOYS, "SELECT itemId, isFavourite FROM battlenet_account_toys WHERE accountId = ?", CONNECTION_ASYNC); + PrepareStatement(LOGIN_REP_ACCOUNT_TOYS, "REPLACE INTO battlenet_account_toys (accountId, itemId, isFavourite) VALUES (?, ?, ?)", CONNECTION_ASYNC); } diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h index 06d13f29da3..efef4e6ee36 100644 --- a/src/server/database/Database/Implementation/LoginDatabase.h +++ b/src/server/database/Database/Implementation/LoginDatabase.h @@ -143,6 +143,9 @@ enum LoginDatabaseStatements LOGIN_SEL_LAST_CHAR_UNDELETE, LOGIN_UPD_LAST_CHAR_UNDELETE, + LOGIN_SEL_ACCOUNT_TOYS, + LOGIN_REP_ACCOUNT_TOYS, + MAX_LOGINDATABASE_STATEMENTS }; |
