Core/Scripts: added loading error message for SCRIPT_COMMAND_PLAY_ANIMKIT

This commit is contained in:
Lopfest
2016-01-26 21:03:59 +01:00
parent 54ab2e0bdb
commit d43d010f29
+11
View File
@@ -111,6 +111,7 @@ std::string GetScriptCommandName(ScriptCommands command)
case SCRIPT_COMMAND_MODEL: res = "SCRIPT_COMMAND_MODEL"; break;
case SCRIPT_COMMAND_CLOSE_GOSSIP: res = "SCRIPT_COMMAND_CLOSE_GOSSIP"; break;
case SCRIPT_COMMAND_PLAYMOVIE: res = "SCRIPT_COMMAND_PLAYMOVIE"; break;
case SCRIPT_COMMAND_PLAY_ANIMKIT: res = "SCRIPT_COMMAND_PLAY_ANIMKIT"; break;
default:
{
char sz[32];
@@ -4863,6 +4864,16 @@ void ObjectMgr::LoadScripts(ScriptsType type)
}
break;
}
case SCRIPT_COMMAND_PLAY_ANIMKIT:
{
if (!sAnimKitStore.LookupEntry(tmp.PlayAnimKit.AnimKitID))
{
TC_LOG_ERROR("sql.sql", "Table `%s` has invalid AnimKid id (datalong = %u) in SCRIPT_COMMAND_PLAY_ANIMKIT for script id %u",
tableName.c_str(), tmp.PlayAnimKit.AnimKitID, tmp.id);
continue;
}
break;
}
default:
break;
}