/// <summary> /// 镶嵌格子数据UI事件回调 /// </summary> /// <param name="eventType"></param> /// <param name="data"></param> /// <param name="param"></param> private void OnInlayGridUIEventDlg(UIEventType eventType, object data, object param) { switch (eventType) { case UIEventType.Click: { if (data is UICtrTypeGrid) { UICtrTypeGrid ctg = data as UICtrTypeGrid; SetActiveGemType((GameCmd.GemType)ctg.ID); } else if (data is UIGemGrid) { UIGemGrid gGRid = data as UIGemGrid; //镶嵌 DoInlay(gGRid.Data); } else if (data is UIEquipPosStatusGrid) { UIEquipPosStatusGrid epsGrid = data as UIEquipPosStatusGrid; SetSelectPart(epsGrid.Data); } else if (data is UIGemInLayGrid) { UIGemInLayGrid gInlayGrid = data as UIGemInLayGrid; DoUnload(gInlayGrid.Data); } } break; } }
/// <summary> /// 宝石二级页签数据刷新 /// </summary> /// <param name="gridBase"></param> /// <param name="id"></param> /// <param name="index"></param> private void OnUpdateSecondGemGrid(UIGridBase gridBase, object id, int index) { if (gridBase is UIGemGrid && id is GameCmd.GemType) { GameCmd.GemType gemType = (GameCmd.GemType)id; GemInlayUpdateData data = GetGemInlayUpdateData(gemType); uint gembaseId = 0; if (null != data && data.TryGetBaseIdByIndex(index, out gembaseId)) { UIGemGrid gemGrid = gridBase as UIGemGrid; gemGrid.SetGridData(gembaseId); bool show = DataManager.Manager <ForgingManager>().HaveGemCanImprove(m_emSelectInlayPos, gemType) && (gembaseId == data.PrefectGemID && data.PrefectGemID != 0); gemGrid.SetRedPointStatus(show); } } }