mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10988] Propertly note for not loaded script library version.
* Better support localization in case built-in version notes. * Move script library version functions to ScriptMgr
This commit is contained in:
parent
6e241689e7
commit
d2b3977fee
10 changed files with 43 additions and 19 deletions
|
|
@ -911,6 +911,14 @@ uint32 ScriptMgr::GetEventIdScriptId(uint32 eventId) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
char const* ScriptMgr::GetScriptLibraryVersion() const
|
||||
{
|
||||
if (!m_pGetScriptLibraryVersion)
|
||||
return "";
|
||||
|
||||
return m_pGetScriptLibraryVersion();
|
||||
}
|
||||
|
||||
CreatureAI* ScriptMgr::GetCreatureAI(Creature* pCreature)
|
||||
{
|
||||
if (!m_pGetCreatureAI)
|
||||
|
|
@ -1094,12 +1102,7 @@ ScriptLoadResult ScriptMgr::LoadScriptLibrary(const char* libName)
|
|||
if (strcmp(pGetMangosRevStr(), REVISION_NR) != 0)
|
||||
return SCRIPT_LOAD_ERR_OUTDATED;
|
||||
|
||||
if (m_pOnInitScriptLibrary)
|
||||
m_pOnInitScriptLibrary();
|
||||
|
||||
if (m_pGetScriptLibraryVersion)
|
||||
sWorld.SetScriptsVersion(m_pGetScriptLibraryVersion());
|
||||
|
||||
m_pOnInitScriptLibrary();
|
||||
return SCRIPT_LOAD_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue