diff --git a/.gitignore b/.gitignore index 1ff022513..0bc3175dd 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,8 @@ CMakeLists.txt.user # /.settings/ /.externalToolBuilders/* +/.vs +/out # exclude in all levels nbproject/ .sync.ffs_db diff --git a/.gitmodules b/.gitmodules index 8fbdb5467..8f982abf1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "deps/git-subrepo"] path = deps/git-subrepo url = https://github.com/ingydotnet/git-subrepo.git +[submodule "modules/mod-playerbots"] + path = modules/mod-playerbots + url = https://github.com/ZhengPeiRu21/mod-playerbots.git diff --git a/modules/mod-playerbots b/modules/mod-playerbots new file mode 160000 index 000000000..16ef20cd3 --- /dev/null +++ b/modules/mod-playerbots @@ -0,0 +1 @@ +Subproject commit 16ef20cd3e23aa38d4c373ff6a0fe991199ff69b diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 3648c850d..f00c06930 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -351,6 +351,7 @@ inline wchar_t wcharToLower(wchar_t wchar) void wstrToUpper(std::wstring& str); void wstrToLower(std::wstring& str); +void strToLower(std::string& str); std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension); diff --git a/src/server/database/Database/Implementation/PlayerbotsDatabase.cpp b/src/server/database/Database/Implementation/PlayerbotsDatabase.cpp index 4b318794a..250c91fb7 100644 --- a/src/server/database/Database/Implementation/PlayerbotsDatabase.cpp +++ b/src/server/database/Database/Implementation/PlayerbotsDatabase.cpp @@ -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); diff --git a/src/server/database/Database/Implementation/PlayerbotsDatabase.h b/src/server/database/Database/Implementation/PlayerbotsDatabase.h index a0cd5a630..2f33f8f90 100644 --- a/src/server/database/Database/Implementation/PlayerbotsDatabase.h +++ b/src/server/database/Database/Implementation/PlayerbotsDatabase.h @@ -78,6 +78,7 @@ enum PlayerbotsDatabaseStatements : uint32 PLAYERBOTS_INS_TELE_CACHE, PLAYERBOTS_SEL_TEXT, + PLAYERBOTS_SEL_DUNGEON_SUGGESTION, PLAYERBOTS_SEL_TRAVELNODE, PLAYERBOTS_INS_TRAVELNODE,