예제 #1
0
    void OnTooltip(bool show)
    {
        if (!show)
        {
            ToolTipsMgr.ShowText(null);
            return;
        }

        if (mIsSkill)
        {
            ToolTipsMgr.ShowText(mSkillDes);
            return;
        }

        if (mItemGrid == null)
        {
            ToolTipsMgr.ShowText(null);
            return;
        }
        string tipStr = "";

        if (null != Item)
        {
            tipStr = Item.GetTooltip();
            tipStr = SuitAttribute(tipStr);
        }

        ToolTipsMgr.ShowText(tipStr);
    }
예제 #2
0
    void OnTooltip(bool show)
    {
        if (ListItemType.mItem == mType)
        {
            if (show == true && mItemSample == null && m_ProtoId != 0)
            {
                mItemSample = new ItemSample(m_ProtoId);
            }
            else if (show == false)
            {
                mItemSample = null;
            }

            if (mItemSample != null)
            {
                //string  tipStr = PELocalization.GetString(mItemSample.protoData.descriptionStringId);
                //ToolTipsMgr.ShowText(tipStr);
                _itemObj = ItemMgr.Instance.CreateItem(m_ProtoId);
                string tipStr = _itemObj.GetTooltip();
                ToolTipsMgr.ShowText(tipStr);
            }
            else
            {
                ItemMgr.Instance.DestroyItem(_itemObj);
                ToolTipsMgr.ShowText(null);
            }
        }
    }
예제 #3
0
    void OnTooltip(bool show)
    {
        if (mData == null)
        {
            return;
        }

        string desc = mData._desc + "\r\n" + PELocalization.GetString(8000160) + "[5CB0FF]" + GameUI.Instance.mSkillWndCtrl._SkillMgr.GetNextExpBySkillType(mData._skillType) + "[-]";

        ToolTipsMgr.ShowText(desc);
    }
예제 #4
0
 void OnTooltip(bool show)
 {
     if (show && skillIcon.spriteName != "Null")
     {
         string _desc = PELocalization.GetString(_localSkill.desc);
         ToolTipsMgr.ShowText(_desc);
     }
     else
     {
         ToolTipsMgr.ShowText(null);
     }
 }
예제 #5
0
    void OnTooltip(bool show)
    {
        if (!show)
        {
            ToolTipsMgr.ShowText(null);
            return;
        }

        string tipStr = "";

        tipStr = "Name:" + " " + mName.text + "\r\n" + "Position:" + " " + mPos.ToString();
        ToolTipsMgr.ShowText(tipStr);
    }
예제 #6
0
 void OnTooltip(bool show)
 {
     if (mBuffIns != null)
     {
         if ("0" != mBuffIns.m_buff.m_buffHint)
         {
             ToolTipsMgr.ShowText(mBuffIns.m_buff.m_buffHint);
         }
     }
     else
     {
         ToolTipsMgr.ShowText(null);
     }
 }
예제 #7
0
 void OnTooltip(bool show)
 {
     if (!show)
     {
         ToolTipsMgr.ShowText(null);
         return;
     }
     if (m_Npc != null)
     {
         ToolTipsMgr.ShowText(m_Npc.FullName);
     }
     //if (show)
     //    Debug.Log("进来了");
 }
    void OnTooltip(bool show)
    {
        if (ListItemType.mItem == mType)
        {
            if (show == true && mItemSample == null && mItemId != 0)
            {
                mItemSample = new ItemSample(mItemId);
            }
            else if (show == false)
            {
                mItemSample = null;
            }

            if (mItemSample != null)
            {
                //string tipStr = PELocalization.GetString(mItemSample.protoData.descriptionStringId);

                //string _eName = mItemSample.protoData.englishName;
                //int _itemObjId = ItemProto.Mgr.Instance.GetItemObjProtoId(_eName, mItemSample.protoData.id);
                //if (_itemObjId != -1)
                //{
                //   ItemObject _itemObj =ItemMgr.Instance.CreateItem(_itemObjId);
                //   tipStr = _itemObj.GetTooltip();
                //   ToolTipsMgr.ShowText(tipStr);
                //}
                //else
                //    ToolTipsMgr.ShowText(tipStr);

                _itemObj = ItemMgr.Instance.CreateItem(mItemId);
                string tipStr = _itemObj.GetTooltip();
                ToolTipsMgr.ShowText(tipStr);
            }
            else
            {
                ItemMgr.Instance.DestroyItem(_itemObj);
                ToolTipsMgr.ShowText(null);
            }
        }
    }
예제 #9
0
    void OnTooltip(bool show)
    {
        if (ListItemType.mItem == mType)
        {
            if (show == true && mItemSample == null && mprotoId != 0)
            {
                mItemSample = new ItemSample(mprotoId);
            }
            else if (show == false)
            {
                mItemSample = null;
            }

            if (mItemSample != null)
            {
                string tipStr = PELocalization.GetString(mItemSample.protoData.descriptionStringId);
                ToolTipsMgr.ShowText(tipStr);
            }
            else
            {
                ToolTipsMgr.ShowText(null);
            }
        }
    }
예제 #10
0
    void OnTooltip(bool show)
    {
        if (ListItemType.mItem == mType)
        {
            if (show == true && mItemSample == null && mItemId != 0)
            {
                mItemSample = new ItemSample(mItemId);
            }
            else if (show == false)
            {
                mItemSample = null;
            }

            if (mItemSample != null)
            {
                //string  tipStr = PELocalization.GetString(mItemSample.protoData.descriptionStringId);

                //EffSkill skill = EffSkill.s_tblEffSkills.Find(iterSkill1=>EffSkill.MatchId(iterSkill1,mItemSample.mItemData.m_SkillID));
                //if(skill != null && skill.m_skillIdsGot != null)
                //{
                //    bool learnAllSkill = true;
                //    foreach(int id in skill.m_skillIdsGot)
                //    {
                //        if(!PlayerFactory.mMainPlayer.m_skillBook.m_mergeSkillIDs.Contains(id))
                //        {
                //            learnAllSkill = false;
                //            break;
                //        }
                //    }
                //    if(learnAllSkill)
                //        tipStr += PELocalization.GetString(4000001);
                //}

                //foreach(ItemProperty pro in Enum.GetValues(typeof(ItemProperty)))
                //{
                //    string replaceName = "$" + (int)pro + "$";
                //    switch(pro)
                //    {
                //    case ItemProperty.DamageReduceByShortAttack:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.DamageReduceByShortAttack))
                //            tipStr = tipStr.Replace(replaceName,((int)(mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.DamageReduceByShortAttack] * 100)).ToString() + "%");
                //        break;
                //    case ItemProperty.DamageReduceByProjectile:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.DamageReduceByProjectile))
                //            tipStr = tipStr.Replace(replaceName,((int)(mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.DamageReduceByProjectile] * 100)).ToString() + "%");
                //        break;
                //    case ItemProperty.ShieldEnergyCostFacter:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.ShieldEnergyCostFacter))
                //            tipStr = tipStr.Replace(replaceName,((int)(mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.ShieldEnergyCostFacter] * 100)).ToString() + "%");
                //        break;
                //    case ItemProperty.BatteryPower:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.BatteryPowerMax))
                //            tipStr = tipStr.Replace(replaceName,((int)mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.BatteryPowerMax]).ToString());
                //        break;
                //    case ItemProperty.Durability:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.DurabilityMax))
                //            tipStr = tipStr.Replace(replaceName,((int)mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.DurabilityMax]).ToString());
                //        break;
                //    case ItemProperty.ShieldEnergy:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(ItemProperty.ShieldMax))
                //            tipStr = tipStr.Replace(replaceName,((int)mItemSample.prototypeData.mEquipBaseProperty[ItemProperty.ShieldMax]).ToString());
                //        break;
                //    default:
                //        if(mItemSample.prototypeData.mEquipBaseProperty.ContainsKey(pro))
                //            tipStr = tipStr.Replace(replaceName,((int)mItemSample.prototypeData.mEquipBaseProperty[pro]).ToString());
                //        else
                //            tipStr = tipStr.Replace(replaceName, "0");
                //        break;
                //    }
                //}
                _itemObj = ItemMgr.Instance.CreateItem(mItemId);
                string tipStr = _itemObj.GetTooltip();
                ToolTipsMgr.ShowText(tipStr);
            }
            else
            {
                ItemMgr.Instance.DestroyItem(_itemObj);
                ToolTipsMgr.ShowText(null);
            }
        }
    }
예제 #11
0
    internal static void SendFile(SteamUploadEventHandler callBackSteamUploadResult, string name, string desc, byte[] preData, byte[] data, string[] tags, bool sendToServer = true, int id = -1, ulong fileId = 0, bool free = false)
    {
        ulong hash = CRC64.Compute(data);
        bool  ret  = false;

        try
        {
            if (string.IsNullOrEmpty(name))
            {
                VCEMsgBox.Show(VCEMsgBoxType.EXPORT_EMPTY_NAME);
                LogManager.Error("File name cannot be null.");
                return;
            }
            if (!SteamUser.BLoggedOn())
            {
                LogManager.Error("log back in steam...");
                return;
            }

            bool bPublish = !sendToServer;
            if (SteamRemoteStorage.FileExists(hash.ToString() + "_preview"))
            {            //file exist,don't publish it;
            }

            if (!SteamRemoteStorage.IsCloudEnabledForAccount())
            {
                throw new Exception("Account cloud disabled.");
            }

            if (!SteamRemoteStorage.IsCloudEnabledForApp())
            {
                throw new Exception("App cloud disabled.");
            }
            if (!bPublish)
            {
                SteamFileItem item = new SteamFileItem(callBackSteamUploadResult, name, desc, preData, data, hash, tags, bPublish, sendToServer, id, fileId, free);
                item.StartSend();
            }
            else
            {
                SendIsoCache iso = new SendIsoCache();
                iso.id           = id;
                iso.hash         = hash;
                iso.name         = name;
                iso.preData      = preData;
                iso.sendToServer = sendToServer;
                iso.tags         = tags;
                iso.data         = data;
                iso.desc         = desc;
                iso.callBackSteamUploadResult = callBackSteamUploadResult;
                iso.bPublish = bPublish;
                if (AddToIsoCache(iso))
                {
                    LobbyInterface.LobbyRPC(ELobbyMsgType.UploadISO, hash, SteamMgr.steamId.m_SteamID);
                }
                else
                {
                    return;
                }
            }

            VCEMsgBox.Show(VCEMsgBoxType.EXPORT_NETWORK);
            ret = true;
        }
        catch (Exception e)
        {
            VCEMsgBox.Show(VCEMsgBoxType.EXPORT_NETWORK_FAILED);
            Debug.LogWarning("workshop error :" + e.Message);
            ToolTipsMgr.ShowText(e.Message);
        }
        finally
        {
            if (!ret && callBackSteamUploadResult != null)
            {
                callBackSteamUploadResult(id, false, hash);
            }
        }
    }