public void SetScriptID(int index, int state, int idScript, ScriptString pstrSection)
 {
     m_nType     = ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_SCRIPT_ID;
     m_state     = state;
     m_index     = index;
     m_idScript  = idScript;
     m_strString = pstrSection;
 }
    public bool Read(ref NetInputBuffer iStream)
    {
        int nType = Convert.ToInt32(m_nType);

        iStream.ReadInt(ref nType);
        m_nType = (ENUM_EVENT_ITEM_TYPE)nType;
        switch (m_nType)
        {
        case ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_TEXT:
            if (!m_strString.Read(ref iStream))
            {
                return(false);
            }
            break;

        case ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_SECTION:
            if (!m_strString.Read(ref iStream))
            {
                return(false);
            }
            break;

        case ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_SCRIPT_ID:
            if (iStream.ReadInt(ref m_index) != sizeof(int))
            {
                return(false);
            }
            if (iStream.ReadInt(ref m_state) != sizeof(int))
            {
                return(false);
            }
            if (iStream.ReadInt(ref m_idScript) != sizeof(int))
            {
                return(false);
            }
            if (!m_strString.Read(ref iStream))
            {
                return(false);
            }
            break;

        default:
            break;
        }

        return(true);
    }
 public void SetText(ScriptString pstrSection)
 {
     m_nType     = ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_TEXT;
     m_strString = pstrSection;
 }
 public void SetSection(ScriptString pstrSection)
 {
     m_nType     = ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_SECTION;
     m_strString = pstrSection;
 }
 public void Reset()
 {
     m_nType = ENUM_EVENT_ITEM_TYPE.EVENT_ITEM_TYPE_INVALID;
     m_strString.Reset();
 }