diff options
| author | IntelligentQuantum <IntelligentQuantum@ProtonMail.Com> | 2019-12-09 10:33:33 +0330 |
|---|---|---|
| committer | Stoabrogga <38475780+Stoabrogga@users.noreply.github.com> | 2019-12-09 08:03:33 +0100 |
| commit | b6c0f58dda3dca708a5cf557208e3026af5e4d03 (patch) | |
| tree | 3d13651b722938d34fa655b59659fff8d3854ac4 /src/common/Database/Implementation/CharacterDatabase.cpp | |
| parent | e337f1e38da027a3c8566458cc4fe19e8a39cd2d (diff) | |
feat(Core/ItemHandler): Optional item recovery (#2442)
Diffstat (limited to 'src/common/Database/Implementation/CharacterDatabase.cpp')
| -rw-r--r-- | src/common/Database/Implementation/CharacterDatabase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/Database/Implementation/CharacterDatabase.cpp b/src/common/Database/Implementation/CharacterDatabase.cpp index 2f068fcf0d..002d2044c0 100644 --- a/src/common/Database/Implementation/CharacterDatabase.cpp +++ b/src/common/Database/Implementation/CharacterDatabase.cpp @@ -566,4 +566,8 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_QUEST_TRACK_GM_COMPLETE, "UPDATE quest_tracker SET completed_by_gm = 1 WHERE id = ? AND character_guid = ? ORDER BY quest_accept_time DESC LIMIT 1", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_QUEST_TRACK_COMPLETE_TIME, "UPDATE quest_tracker SET quest_complete_time = NOW() WHERE id = ? AND character_guid = ? ORDER BY quest_accept_time DESC LIMIT 1", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_QUEST_TRACK_ABANDON_TIME, "UPDATE quest_tracker SET quest_abandon_time = NOW() WHERE id = ? AND character_guid = ? ORDER BY quest_accept_time DESC LIMIT 1", CONNECTION_ASYNC); + + // Recovery Item + PrepareStatement(CHAR_INS_RECOVERY_ITEM, "INSERT INTO recovery_item (Guid, ItemEntry, Count) VALUES (?, ?, ?)", CONNECTION_SYNCH); + PrepareStatement(CHAR_DEL_RECOVERY_ITEM, "DELETE FROM recovery_item WHERE Guid = ? AND ItemEntry = ? ORDER BY Id DESC LIMIT 1", CONNECTION_ASYNC); } |
