public static bool RefreshCharaStatePanel() { if (!Loaded) { return(false); } MPCharCtrl _chara = GameObject.FindObjectsOfType <MPCharCtrl>().FirstOrDefault(); if (_chara == null) { return(false); } if (CurOCIChar != _chara.ociChar) { //CurOCIChar = _chara.ociChar; TreeNodeObject _selected = Instance.dicInfo.Where(x => (x.Value as OCIChar) == _chara.ociChar).Select(x => x.Key).FirstOrDefault(); OnSelectSingle?.Invoke(Instance.treeNodeCtrl, new TreeNodeEventArgs(_selected)); } if (Traverse.Create(_chara).Field <int>("select").Value != 0) { return(false); } _chara.OnClickRoot(0); return(true); }
internal static bool RefreshCharaStatePanel() { if (!Loaded) { return(false); } MPCharCtrl MPCharCtrl = FindObjectOfType <MPCharCtrl>(); if (MPCharCtrl == null) { return(false); } int select = Traverse.Create(MPCharCtrl).Field <int>("select").Value; if (select != 0) { return(false); } MPCharCtrl.OnClickRoot(0); return(true); }