Esempio n. 1
0
    void ShareItem()
    {
        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        float fElspeTime = Time.time - GameManager.gameManager.PlayerDataPool.LastConsignShareTime;
        //加一个操作CD
        int nMaxCDTime = 30;

        if (fElspeTime < nMaxCDTime)
        {
            int nRemainTime = (int)(nMaxCDTime - fElspeTime);
            //吆喝操作过于频繁,距离下次可吆喝时间还剩{0}秒
            _mainPlayer.SendNoticMsg(false, "#{2749}", nRemainTime + 1);
            return;
        }

        string strAdditionShareMsg = StrDictionary.GetClientDictionaryString("#{2743}",
                                                                             m_MyItemInfo.ItemInfo.StackCount, m_MyItemInfo.ItemInfo.GetName(), m_MyItemInfo.Price);

        if (m_MyItemInfo.ItemInfo.IsEquipMent())
        {
            ShareTargetChooseLogic.InitEquipShare(m_MyItemInfo.ItemInfo, strAdditionShareMsg, true);
        }
        else
        {
            ShareTargetChooseLogic.InitItemShare(m_MyItemInfo.ItemInfo, strAdditionShareMsg, true);
        }
    }
Esempio n. 2
0
 void ItemShareLink()
 {
     if (m_Item != null && m_Item.IsValid())
     {
         ShareTargetChooseLogic.InitItemShare(m_Item);
     }
     //ShareLinkDirectChatInfo();
 }