mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11432] Provide access to some script data (names, count) for script DLL
This commit is contained in:
parent
3ecf19a05a
commit
341379e1ab
3 changed files with 15 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11431"
|
||||
#define REVISION_NR "11432"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue