Correction on previous commit: use uint32 and not simple ints

--HG--
branch : trunk
This commit is contained in:
click
2010-08-07 15:04:28 +02:00
parent f2ddd5d067
commit f296addc47
+4 -3
View File
@@ -910,22 +910,23 @@ class ScriptMgr
public: /* ScriptRegistry */
// This is the global static registry of scripts.
template<class TScript>
class ScriptRegistry
{
// Counter used for code-only scripts.
static int _scriptIdCounter;
static uint32 _scriptIdCounter;
public:
typedef std::map<int, TScript*> ScriptMap;
typedef std::map<uint32, TScript*> ScriptMap;
// The actual list of scripts. This will be accessed concurrently, so it must not be modified
// after server startup.
static ScriptMap ScriptPointerList;
// Gets a script by its ID (assigned by ObjectMgr).
static TScript* GetScriptById(int id)
static TScript* GetScriptById(uint32 id)
{
ScriptMap it = ScriptPointerList.find(id);
if (it != ScriptPointerList.end())