Add prepared dungeon suggestion statement

This commit is contained in:
qudzy
2022-04-28 23:22:35 +02:00
parent 0e6a5bddbb
commit 44e4cd8cda
2 changed files with 19 additions and 0 deletions

View File

@@ -85,6 +85,24 @@ void PlayerbotsDatabaseConnection::DoPrepareStatements()
PrepareStatement(PLAYERBOTS_DEL_TRAVELNODE_PATH, "DELETE FROM playerbots_travelnode_path", CONNECTION_ASYNC);
PrepareStatement(PLAYERBOTS_SEL_TEXT, "SELECT `key`,`text` FROM playerbots_text", CONNECTION_SYNCH);
PrepareStatement(
PLAYERBOTS_SEL_DUNGEON_SUGGESTION,
"SELECT"
" d.`name`, "
" d.`difficulty`, "
" d.`min_level`, "
" d.`max_level`, "
" a.`abbrevation`, "
" s.`strategy` "
"FROM playerbots_dungeon_suggestion_definition d "
"LEFT OUTER JOIN playerbots_dungeon_suggestion_abbrevation a "
" ON d.slug = a.definition_slug "
"LEFT OUTER JOIN playerbots_dungeon_suggestion_strategy s "
" ON d.slug = s.definition_slug "
" AND d.difficulty = s.difficulty "
"WHERE d.expansion <= ?;",
CONNECTION_SYNCH
);
PrepareStatement(PLAYERBOTS_SEL_WEIGHTSCALES, "SELECT id, name, class FROM playerbots_weightscales", CONNECTION_SYNCH);
PrepareStatement(PLAYERBOTS_SEL_WEIGHTSCALE_DATA, "SELECT id, field, val FROM playerbots_weightscale_data", CONNECTION_SYNCH);

View File

@@ -78,6 +78,7 @@ enum PlayerbotsDatabaseStatements : uint32
PLAYERBOTS_INS_TELE_CACHE,
PLAYERBOTS_SEL_TEXT,
PLAYERBOTS_SEL_DUNGEON_SUGGESTION,
PLAYERBOTS_SEL_TRAVELNODE,
PLAYERBOTS_INS_TRAVELNODE,