//------------------------------------------------------------------------- public ToolTip getToolTip(_eUiItemParent item_from) { ToolTip tool_tip = new ToolTip(); switch (UnitType) { case "Consumables": ConsumToolTipHead consum_tooltip_head = new ConsumToolTipHead(); consum_tooltip_head.ItemIco = Icon; consum_tooltip_head.ItemName = Name; consum_tooltip_head.ItemTypeId = ItemTypeId; tool_tip.ToolTipHead = consum_tooltip_head; ConsumToolTipDetail consum_tooltip_detail = new ConsumToolTipDetail(); TbDataUnitConsumables consumable = EbDataMgr.Instance.getData <TbDataUnitConsumables>(Id); List <_ToolTipContentDetailInfo> list_consum_detail = ToolTipHelper.Instant.getToolTipNormalContentDetailText(consumable.ListEffect); consum_tooltip_detail.list_detail = list_consum_detail; consum_tooltip_detail.MadeBy = ""; tool_tip.ToolTipDetail = consum_tooltip_detail; break; } tool_tip.ToolTipEnd = _getToolTipEnd(item_from); return(tool_tip); }
//------------------------------------------------------------------------- ToolTipEnd _getToolTipEnd(_eUiItemParent item_from) { ItemOperateInfo main_operate = null; List <ItemOperateInfo> equip_list_operate_info = new List <ItemOperateInfo>(); if (item_from == _eUiItemParent.Help) { main_operate = new ItemOperateInfo(); main_operate.OperateId = "Compound"; main_operate.OperateName = "合成"; main_operate.IsCompoundType = true; main_operate.EffectData = new EffectData(); main_operate.EffectData.EffectId = 510; ItemOperateInfo operate1 = new ItemOperateInfo(); operate1.OperateId = "Market"; operate1.OperateName = "市场"; operate1.IsCompoundType = false; operate1.EffectData = new EffectData(); operate1.EffectData.EffectId = 0; equip_list_operate_info.Add(operate1); ItemOperateInfo operate2 = new ItemOperateInfo(); operate2.OperateId = "Drop"; operate2.OperateName = "掉落"; operate2.IsCompoundType = false; operate2.EffectData = new EffectData(); operate2.EffectData.EffectId = 0; equip_list_operate_info.Add(operate2); } else { TbDataItemType item_type = EbDataMgr.Instance.getData <TbDataItemType>(ItemTypeId); List <ItemOperateInfo> list_operate = new List <ItemOperateInfo>(item_type.ListOperateInfo); ToolTipHelper.Instant.getItemOperate(list_operate, this); equip_list_operate_info.AddRange(list_operate); main_operate = MainOperateInfo; } ToolTipEnd tooltip_end = new ToolTipEnd(); tooltip_end.ItemDesc = Desc; tooltip_end.MainOperateInfo = main_operate; tooltip_end.ListMoreOperateInfo = equip_list_operate_info; return(tooltip_end); }
//------------------------------------------------------------------------- public ToolTip getToolTip(_eUiItemParent item_from) { ToolTip tool_tip = new ToolTip(); ConsumToolTipHead tooltip_head = new ConsumToolTipHead(); tooltip_head.ItemIco = Item.TbDataItem.Icon; tooltip_head.ItemName = Item.TbDataItem.Name; tooltip_head.ItemTypeId = Item.TbDataItem.ItemTypeId; tool_tip.ToolTipHead = tooltip_head; ConsumToolTipDetail tooltip_detail = new ConsumToolTipDetail(); List <_ToolTipContentDetailInfo> list_detail = ToolTipHelper.Instant.getToolTipNormalContentDetailText(((UnitConsumables)Item.UnitLink).TbDataUnitConsumables.ListEffect); tooltip_detail.list_detail = list_detail; tooltip_detail.MadeBy = MadeBy; tool_tip.ToolTipDetail = tooltip_detail; ToolTipEnd tooltip_end = new ToolTipEnd(); tooltip_end.ItemDesc = Item.TbDataItem.Desc; ItemOperateInfo main_operate = null; List <ItemOperateInfo> list_operate_info = null; TbDataItemType item_type = EbDataMgr.Instance.getData <TbDataItemType>(Item.TbDataItem.ItemTypeId); if (item_from == _eUiItemParent.Chat || item_from == _eUiItemParent.Mail || item_from == _eUiItemParent.TaskReward) { } else { main_operate = Item.TbDataItem.MainOperateInfo; list_operate_info = new List <ItemOperateInfo>(); list_operate_info.AddRange(item_type.ListOperateInfo); } ToolTipHelper.Instant.getItemOperate(list_operate_info, Item.TbDataItem); tooltip_end.MainOperateInfo = main_operate; tooltip_end.ListMoreOperateInfo = list_operate_info; tool_tip.ToolTipEnd = tooltip_end; return(tool_tip); }