private void TryUpdateValue(StoryInstance instance) { if (m_DlgId.HaveValue && m_Index.HaveValue) { m_HaveValue = true; int dlgId = m_DlgId.Value; int index = m_Index.Value; int dlgItemId = TableConfigUtility.GenStoryDlgItemId(dlgId, index); TableConfig.StoryDlg cfg = TableConfig.StoryDlgProvider.Instance.GetStoryDlg(dlgItemId); if (null != cfg) { m_Value = cfg; } else { m_Value = null; } } }
private void TryUpdateValue(StoryInstance instance) { Scene scene = instance.Context as Scene; if (null != scene) { if (m_DlgId.HaveValue && m_Index.HaveValue) { m_HaveValue = true; int dlgId = m_DlgId.Value; int index = m_Index.Value; int dlgItemId = TableConfigUtility.GenStoryDlgItemId(dlgId, index); TableConfig.StoryDlg cfg = TableConfig.StoryDlgProvider.Instance.GetStoryDlg(dlgItemId); if (null != cfg) { m_Value = BoxedValue.From(cfg); } else { m_Value = BoxedValue.NullObject; } } } }