*Raise the log level of not-assigned script. Because that may cause crash.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-19 10:17:38 -05:00
parent a60d1867e1
commit 6baf53ad15

View File

@@ -2031,12 +2031,13 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target)
void Script::RegisterSelf()
{
int id = GetScriptId(Name.c_str());
if (id != 0)
if(id)
{
m_scripts[id] = this;
++num_sc_scripts;
} else
debug_log("SD2: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
}
else
error_db_log("CRASH ALERT! TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
}
//********************************