diff options
author | XTZGZoReX <none@none> | 2010-08-06 23:21:58 +0200 |
---|---|---|
committer | XTZGZoReX <none@none> | 2010-08-06 23:21:58 +0200 |
commit | 0993b1fcb5f2d33543bfd61f4ddb91a7a2db6086 (patch) | |
tree | 347a549a63c8b3220a633ddf29b6d335a0d387da /src/server/game/Scripting/ScriptMgr.h | |
parent | f413d609083a46ad57668e2f1ddd72ff417e22ed (diff) |
* Fixes for Linux build.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 842befaf057..5ae790e2cb7 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -914,11 +914,11 @@ class ScriptMgr // Gets a script by its ID (assigned by ObjectMgr). static TScript* GetScriptById(uint32 id) { - for (ScriptMap::iterator it = ScriptPointerList.begin(); it != ScriptPointerList.end(); ++it) - if (it->first == id) - return it->second; + ScriptMap::iterator it = ScriptPointerList.find(id); + if (it == ScriptPointerList.end()) + return NULL; - return NULL; + return it->second; } // Attempts to add a new script to the list. |