Exemple #1
0
    /// <summary>
    /// 获取寄售物品的详细信息
    /// </summary>
    /// <param name="market_id"></param>
    public void ReqItemInfoConsignment(ItemPageInfo itemInfo)
    {
        if (itemInfo == null)
        {
            return;
        }
        if (m_itemInfoDic.ContainsKey(itemInfo.market_id))
        {
            TipsManager.Instance.ShowItemTips(m_itemInfoDic[itemInfo.market_id]);
            return;
        }
        else
        {
            BaseItem itemData = DataManager.Manager <ItemManager>().GetTempBaseItemByBaseID <BaseItem>(itemInfo.item_base_id);
            if (itemData != null && itemData.OverlayNum > 1)
            {
                TipsManager.Instance.ShowItemTips(itemData);
                return;
            }
        }
        stRequestItemInfoConsignmentUserCmd_C cmd = new stRequestItemInfoConsignmentUserCmd_C();

        cmd.market_id = itemInfo.market_id;
        NetService.Instance.Send(cmd);
    }
Exemple #2
0
 public void UpdateItemInfo(ItemPageInfo info, ItemSerialize data = null)
 {
     itemPageInfo = info;
     ResetInfoGrid(true);
     if (itemPageInfo != null)
     {
         marked_id = info.market_id;
         BaseItem baseItem = new BaseItem(itemPageInfo.item_base_id, data);
         itemName.text  = baseItem.Name;
         itemLevel.text = baseItem.UseLv.ToString();
         itemPrice.text = itemPageInfo.money.ToString();
         SetIcon(true, baseItem.Icon);
         bool enable = (itemPageInfo.item_num > 1) ? true : false;
         SetNum(enable, itemPageInfo.item_num.ToString());
         SetBorder(true, baseItem.BorderIcon);
         if (baseItem.IsMuhon)
         {
             SetMuhonMask(true, Muhon.GetMuhonStarLevel(baseItem.BaseId));
             SetMuhonLv(true, Muhon.GetMuhonLv(baseItem));
         }
         else if (baseItem.IsRuneStone)
         {
             SetRuneStoneMask(true, (uint)baseItem.Grade);
         }
         HadStard = DataManager.Manager <ConsignmentManager>().AllStarMarkedIDs.Contains(marked_id);
         SetStarValue(HadStard);
         m_l_leftSeconds      = (uint)((itemPageInfo.show_time - DateTimeHelper.Instance.Now) > 0 ? (itemPageInfo.show_time - DateTimeHelper.Instance.Now) :0);
         moneyIcon.spriteName = itemPageInfo.great ? CurrencyIconData.GetCurrencyIconByMoneyType(ClientMoneyType.YuanBao).smallIconName
                                                : CurrencyIconData.GetCurrencyIconByMoneyType(ClientMoneyType.YinLiang).smallIconName;
         IsGongShi.gameObject.SetActive(itemPageInfo.great);
     }
 }
Exemple #3
0
    public void UpdateItemInfo(ItemPageInfo itemData, ItemSellTimeInfo timeInfo, ItemSerialize data = null)
    {
        this.itemData = itemData;
        this.timeInfo = timeInfo;
        ResetInfoGrid(true);
        if (itemData != null)
        {
            BaseItem baseItem = new BaseItem(itemData.item_base_id, data);
            itemName.text = baseItem.Name;

            SetIcon(true, baseItem.Icon);
            bool enable = (itemData.item_num > 1) ? true : false;
            SetNum(enable, itemData.item_num.ToString());
            SetBorder(true, baseItem.BorderIcon);
            if (baseItem.IsMuhon)
            {
                SetMuhonMask(true, Muhon.GetMuhonStarLevel(baseItem.BaseId));
            }
            else if (baseItem.IsRuneStone)
            {
                SetRuneStoneMask(true, (uint)baseItem.Grade);
            }
            yuanbaoicon.gameObject.SetActive(itemData.great);
            jinbiicon.gameObject.SetActive(!itemData.great);
            itemPrice.text = itemData.money.ToString();

            int showTime = 0;
            if (baseItem.IsTreasure)
            {
                showTime           = GameTableManager.Instance.GetGlobalConfig <int>("GreatShowTime");
                m_l_GongShiSeconds = (int)(timeInfo.sell_time + showTime - DateTimeHelper.Instance.Now);
            }
            int unSalingTime = GameTableManager.Instance.GetGlobalConfig <int>("SellItemUnSalingTime");
            m_l_XiaJiaSeconds = (int)(timeInfo.sell_time + showTime + unSalingTime - DateTimeHelper.Instance.Now);



            remainTime.gameObject.SetActive((itemData.great && m_l_GongShiSeconds > 0));
        }
    }
Exemple #4
0
    public bool UpdateData(ulong marketID, ItemPageInfo pageInfo = null, GameCmd.ItemSerialize serverdata = null, ItemSellTimeInfo selltime = null)
    {
        bool success = false;

        if (marketID != 0)
        {
            this.Market_ID = marketID;
            if (pageInfo != null)
            {
                this.page_info = pageInfo;
            }
            if (serverdata != null)
            {
                this.server_data = serverdata;
            }
            if (selltime != null)
            {
                this.sell_timeInfo = selltime;
            }
            success = true;
        }
        return(success);
    }
Exemple #5
0
 public ConsignmentItem(ulong marketID, ItemPageInfo pageInfo = null, GameCmd.ItemSerialize serverdata = null, ItemSellTimeInfo selltime = null)
 {
     UpdateData(marketID, pageInfo, serverdata, selltime);
 }