mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[svn] Merge from mangos.
Wed Oct 29 15:06:00034b8a34a9Mon Oct 27 14:36:42fa072d1510--HG-- branch : trunk
This commit is contained in:
@@ -6784,11 +6784,17 @@ GameTele const* ObjectMgr::GetGameTele(std::string name) const
|
||||
// converting string that we try to find to lower case
|
||||
wstrToLower( wname );
|
||||
|
||||
// Alternative first GameTele what contains wnameLow as substring in case no GameTele location found
|
||||
const GameTele* alt = NULL;
|
||||
for(GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
|
||||
{
|
||||
if(itr->second.wnameLow == wname)
|
||||
return &itr->second;
|
||||
else if (alt == NULL && itr->second.wnameLow.find(wname) != std::wstring::npos)
|
||||
alt = &itr->second;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return alt;
|
||||
}
|
||||
|
||||
bool ObjectMgr::AddGameTele(GameTele& tele)
|
||||
|
||||
Reference in New Issue
Block a user