mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 14:35:57 +00:00
fix(Script/Commands): tele add should only check exact match (#20785)
* fix(Script/Commands): tele add should only check exact match * closes https://github.com/azerothcore/azerothcore-wotlk/issues/20268 * better describe the variable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user