mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 10:37:02 +00:00
[10945] Restore check scripting lib API at load.
Also report result of script library load/reload to chat/console.
This commit is contained in:
parent
d4018322b9
commit
84b5ee3b43
10 changed files with 69 additions and 14 deletions
|
|
@ -304,6 +304,13 @@ extern ScriptMapMap sEventScripts;
|
|||
extern ScriptMapMap sGossipScripts;
|
||||
extern ScriptMapMap sCreatureMovementScripts;
|
||||
|
||||
enum ScriptLoadResult
|
||||
{
|
||||
SCRIPT_LOAR_OK,
|
||||
SCRIPT_LOAR_ERR_NOT_FOUND,
|
||||
SCRIPT_LOAR_ERR_WRONG_API
|
||||
};
|
||||
|
||||
class ScriptMgr
|
||||
{
|
||||
public:
|
||||
|
|
@ -330,7 +337,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;
|
||||
|
||||
bool LoadScriptLibrary(const char* libName);
|
||||
ScriptLoadResult LoadScriptLibrary(const char* libName);
|
||||
void UnloadScriptLibrary();
|
||||
|
||||
CreatureAI* GetCreatureAI(Creature* pCreature);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue