mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Scripts: Fixed crash on shutdown
This commit is contained in:
@@ -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