[11432] Provide access to some script data (names, count) for script DLL

This commit is contained in:
VladimirMangos 2011-05-07 18:18:04 +04:00
parent 3ecf19a05a
commit 341379e1ab
3 changed files with 15 additions and 1 deletions

View file

@ -1221,3 +1221,14 @@ uint32 GetScriptId(const char *name)
{
return sScriptMgr.GetScriptId(name);
}
char const* GetScriptName(uint32 id)
{
return sScriptMgr.GetScriptName(id);
}
uint32 GetScriptIdsCount()
{
return sScriptMgr.GetScriptIdsCount();
}

View file

@ -360,6 +360,7 @@ class ScriptMgr
const char* GetScriptName(uint32 id) const { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; }
uint32 GetScriptId(const char *name) const;
uint32 GetScriptIdsCount() const { return m_scriptNames.size(); }
ScriptLoadResult LoadScriptLibrary(const char* libName);
void UnloadScriptLibrary();
@ -452,5 +453,7 @@ class ScriptMgr
MANGOS_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 triggerId);
MANGOS_DLL_SPEC uint32 GetEventIdScriptId(uint32 eventId);
MANGOS_DLL_SPEC uint32 GetScriptId(const char *name);
MANGOS_DLL_SPEC char const* GetScriptName(uint32 id);
MANGOS_DLL_SPEC uint32 GetScriptIdsCount();
#endif

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11431"
#define REVISION_NR "11432"
#endif // __REVISION_NR_H__