Example #1
0
        protected override bool ExecCommand(StoryInstance instance, StoryMessageHandler handler, long delta)
        {
            object formatObj = m_Format.Value;
            string format    = formatObj as string;

            if (!string.IsNullOrEmpty(format) && m_FormatArgs.Count > 0)
            {
                ArrayList arglist = new ArrayList();
                for (int i = 0; i < m_FormatArgs.Count; i++)
                {
                    arglist.Add(m_FormatArgs[i].Value);
                }
                object[] args = arglist.ToArray();
                LogSystem.GmLog(format, args);
            }
            else if (!string.IsNullOrEmpty(format))
            {
                LogSystem.GmLog(format);
            }
            else
            {
                LogSystem.GmLog("{0}", formatObj);
            }
            return(false);
        }