aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/ScriptMgr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp
index c6170a15b44..26609430e27 100644
--- a/src/game/ScriptMgr.cpp
+++ b/src/game/ScriptMgr.cpp
@@ -164,9 +164,10 @@ void Script::RegisterSelf()
m_scripts[id] = this;
++num_sc_scripts;
}
- else if (Name.find("example") == std::string::npos)
+ else
{
- error_db_log("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
+ if (Name.find("example") == std::string::npos)
+ error_db_log("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
delete this;
}
}