--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-19 11:10:07 -05:00
7 changed files with 123 additions and 52 deletions

View File

@@ -1622,14 +1622,14 @@ 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("TSCR: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
error_db_log("CRASH ALERT! TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
delete this;
}
}