Core/Scripts: Fixed crash on shutdown
This commit is contained in:
1 parent
5a52acbe40
commit
7be13b6fda
2 files changed
+6
-5
No files matched your search
@@ -1379,10 +1379,11 @@ FormulaScript::FormulaScript(const char* name)
|
||||
ScriptRegistry<FormulaScript>::AddScript(this);
|
||||
}
|
||||
|
||||
UnitScript::UnitScript(const char* name)
|
||||
UnitScript::UnitScript(const char* name, bool addToScripts)
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<UnitScript>::AddScript(this);
|
||||
if (addToScripts)
|
||||
ScriptRegistry<UnitScript>::AddScript(this);
|
||||
}
|
||||
|
||||
WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
|
||||
@@ -1419,7 +1420,7 @@ ItemScript::ItemScript(const char* name)
|
||||
}
|
||||
|
||||
CreatureScript::CreatureScript(const char* name)
|
||||
: UnitScript(name)
|
||||
: UnitScript(name, false)
|
||||
{
|
||||
ScriptRegistry<CreatureScript>::AddScript(this);
|
||||
}
|
||||
@@ -1497,7 +1498,7 @@ AchievementCriteriaScript::AchievementCriteriaScript(const char* name)
|
||||
}
|
||||
|
||||
PlayerScript::PlayerScript(const char* name)
|
||||
: UnitScript(name)
|
||||
: UnitScript(name, false)
|
||||
{
|
||||
ScriptRegistry<PlayerScript>::AddScript(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user