diff options
author | megamage <none@none> | 2008-10-29 18:06:01 -0500 |
---|---|---|
committer | megamage <none@none> | 2008-10-29 18:06:01 -0500 |
commit | 7ea14f94f1e9c2fa3483b4dd3526cd5d67e45161 (patch) | |
tree | 007e6bc047810a1891e0c916b0d77ad4a943861e /src/game/ObjectMgr.cpp | |
parent | cca2c3a6039227c844baef246939e2f393d5090d (diff) |
[svn] Merge from mangos.
Wed Oct 29 15:06:00 http://github.com/mangos/mangos/commit/034b8a34a9b621443e97d0ac4b667b603ba31ef1
Mon Oct 27 14:36:42 http://github.com/mangos/mangos/commit/fa072d15107b44344af8c9ef686839984e241a1b
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 38926c8cef0..8a49d4dac0c 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -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) |