Esempio n. 1
0
        //-------------------------------------------------------------------------
        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);
        }
Esempio n. 2
0
        //-------------------------------------------------------------------------
        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);
        }
Esempio n. 3
0
        //-------------------------------------------------------------------------
        public override void load(EbPropSet prop_set)
        {
            ItemTypeId    = prop_set.getPropInt("I_ItemTypeId").get();
            Name          = prop_set.getPropString("T_Name").get();
            MaxOverlapNum = prop_set.getPropInt("I_MaxOverlapNum").get();
            Icon          = prop_set.getPropString("T_Icon").get();
            Desc          = prop_set.getPropString("T_Desc").get();
            UnitType      = prop_set.getPropString("T_UnitType").get();

            int prop_int = prop_set.getPropInt("I_OperateId").get();

            if (prop_int > 0)
            {
                MainOperateInfo            = new ItemOperateInfo();
                MainOperateInfo.OperateId  = ((_eOperateType)prop_int).ToString();
                MainOperateInfo.EffectData = new EffectData();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(prop_int);
                MainOperateInfo.EffectData.EffectId = operate_type.OperateEffectId;
                MainOperateInfo.OperateName         = operate_type.OperateName;
                MainOperateInfo.SubOverlapNum       = prop_set.getPropInt("I_SubOverlapNum").get();
                MainOperateInfo.CdMax = prop_set.getPropFloat("R_CdMax").get();
            }
        }
Esempio n. 4
0
        //-------------------------------------------------------------------------
        public override void load(EbPropSet prop_set)
        {
            ParentId = prop_set.getPropInt("I_ParentId").get();
            TypeName = prop_set.getPropString("T_TypeName").get();
            TypeDesc = prop_set.getPropString("T_TypeDesc").get();

            ListOperateInfo = new List <ItemOperateInfo>();

            int operate_id = prop_set.getPropInt("I_Operate1").get();

            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate2").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate3").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate4").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate5").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate6").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }

            operate_id = prop_set.getPropInt("I_Operate7").get();
            if (operate_id > 0)
            {
                ItemOperateInfo operate_info = new ItemOperateInfo();
                operate_info.OperateId = ((_eOperateType)operate_id).ToString();
                TbDataOperateType operate_type = EbDataMgr.Instance.getData <TbDataOperateType>(operate_id);
                operate_info.OperateName         = operate_type.OperateName;
                operate_info.IsCompoundType      = operate_type.IsCompandType;
                operate_info.EffectData          = new EffectData();
                operate_info.EffectData.EffectId = operate_type.OperateEffectId;
                ListOperateInfo.Add(operate_info);
            }
        }