private void RecvGemSysTakeoffRes(short state, GemSysTakeoffRes msg = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (msg != null) { this.equipSlots[msg.type - EquipLibType.ELT.Weapon, msg.hole - 1].typeId = 0; this.equipSlots[msg.type - EquipLibType.ELT.Weapon, msg.hole - 1].id = 0L; GemUI gemUI = UIManagerControl.Instance.GetUIIfExist("GemUI") as GemUI; if (gemUI != null) { gemUI.RefreshEquipSlot(msg.hole - 1, 0); } GemSingleUI gemSingleUI = UIManagerControl.Instance.GetUIIfExist("GemSingleUI") as GemSingleUI; if (gemSingleUI != null) { gemSingleUI.Show(false); } EventDispatcher.Broadcast(EventNames.EquipDetailedShouldCheckBadge); EventDispatcher.Broadcast <int>(EventNames.UpdateEquipPosGemData, (int)msg.type); this.CheckCanShowWearingGemPromoteWay(); } }
private void RecvGemSysEmbedRes(short state, GemSysEmbedRes msg = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (msg != null) { EquipLibType.ELT type = msg.type; int hole = msg.hole; long newGemId = msg.newGemId; int newGemTypeId = msg.newGemTypeId; GemEmbedInfo gemEmbedInfo = this.equipSlots[type - EquipLibType.ELT.Weapon, hole - 1]; gemEmbedInfo.id = newGemId; gemEmbedInfo.typeId = newGemTypeId; GemUI gemUI = UIManagerControl.Instance.GetUIIfExist("GemUI") as GemUI; if (gemUI != null) { gemUI.RefreshEquipSlot(msg.hole - 1, newGemTypeId); } GemSelectUI gemSelectUI = UIManagerControl.Instance.GetUIIfExist("GemSelectUI") as GemSelectUI; if (gemSelectUI != null) { gemSelectUI.Show(false); } EventDispatcher.Broadcast <int>(EventNames.UpdateEquipPosGemData, (int)msg.type); EventDispatcher.Broadcast(EventNames.EquipDetailedShouldCheckBadge); this.CheckCanShowWearingGemPromoteWay(); } }