Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-12-05 00:08:25 +08:00
121 changed files with 4818 additions and 1413 deletions
+2 -2
View File
@@ -8945,7 +8945,7 @@ void ObjectMgr::LoadGameTele()
LOG_INFO("server.loading", " ");
}
GameTele const* ObjectMgr::GetGameTele(std::string_view name) const
GameTele const* ObjectMgr::GetGameTele(std::string_view name, bool exactSearch) const
{
// explicit name case
std::wstring wname;
@@ -8961,7 +8961,7 @@ GameTele const* ObjectMgr::GetGameTele(std::string_view name) const
{
if (itr->second.wnameLow == wname)
return &itr->second;
else if (!alt && itr->second.wnameLow.find(wname) != std::wstring::npos)
else if (!exactSearch && !alt && itr->second.wnameLow.find(wname) != std::wstring::npos)
alt = &itr->second;
}
+1 -1
View File
@@ -1348,7 +1348,7 @@ public:
if (itr == _gameTeleStore.end()) return nullptr;
return &itr->second;
}
[[nodiscard]] GameTele const* GetGameTele(std::string_view name) const;
[[nodiscard]] GameTele const* GetGameTele(std::string_view name, bool exactSearch = false) const;
[[nodiscard]] GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
bool AddGameTele(GameTele& data);
bool DeleteGameTele(std::string_view name);