Page 2 of 4

Re: Shop

Posted: Sun May 10, 2020 1:36 pm
by KKHackLabs
Nice, I hadn't completed a match during testing and they did not apply.

Another question/bug - When a character is available in the Player Select screen, but has not been purchased, the player button is blacked out, but you can still select the character bypassing the purchase lock.

In the screen, you can see the third character has a price and is blacked out, but you can still click and select the character for use.

Image

Is there a function I need to set or is this possibly a bug?

Re: Shop

Posted: Sun May 10, 2020 7:36 pm
by Lovatto
This is a bug, I have fixed, please replace the code of bl_PSOperatorUI.cs with this:

Code: Select all

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace MFPS.PlayerSelector
{
    public class bl_PSOperatorUI : MonoBehaviour
    {

        public Image PreviewImage;
        public GameObject BlockedUI;
        public GameObject SelectedUI;

        private bl_PlayerSelectorLobby Manager;
        private bl_PlayerSelectorInfo cacheInfo;
        public bool isBlocked = false;
        public void SetUp(bl_PlayerSelectorInfo info, bl_PlayerSelectorLobby manager)
        {
            Manager = manager;
            cacheInfo = info;
            PreviewImage.sprite = info.Preview;
            SelectedUI.SetActive(info.isEquipedOne());
#if SHOP && ULSP
            if (info.Price > 0 && bl_DataBase.Instance != null)
            {
                int pID = bl_PlayerSelectorData.Instance.GetPlayerID(info.Name);
                bool unlock = bl_DataBase.Instance.LocalUser.ShopData.isItemPurchase(ShopItemType.PlayerSkin, pID);
                isBlocked = !unlock;
                BlockedUI.SetActive(!unlock);
            }
            else { BlockedUI.SetActive(false); }
#else
            BlockedUI.SetActive(false);
#endif
        }

        public void OnOver()
        {
            Manager.OnShowUpOp(cacheInfo);
        }

        public void OnExit()
        {
            Manager.ShowUpSelectedOne(cacheInfo.team);
        }

        public void SelectThis()
        {
            if (isBlocked) return;
            Manager.SelectOperator(cacheInfo);
            bl_PSOperatorUI[] all = transform.parent.GetComponentsInChildren<bl_PSOperatorUI>();
            foreach(bl_PSOperatorUI ui in all)
            {
                ui.SelectedUI.SetActive(false);
            }
            SelectedUI.SetActive(true);
        }
    }
}

Re: Shop

Posted: Wed May 13, 2020 6:09 pm
by KKHackLabs
How do you edit the Weapon Names for the integration of the Shop and the Weapon Pack #1?

Re: Shop

Posted: Thu May 14, 2020 4:03 pm
by Lovatto
KKHackLabs wrote: Wed May 13, 2020 6:09 pm How do you edit the Weapon Names for the integration of the Shop and the Weapon Pack #1?
By editing the weapon info in GameData.

MFPS Resources folder -> GameData -> All Weapons -> [Find your weapon] -> Change the Name.

Re: Shop

Posted: Tue May 19, 2020 1:51 pm
by KKHackLabs
Are there any available details or docs about paypal integration?

I found where the options are to integrate and the drop down option within Unity, but there are no further details. And, the assetstore link to resource is no longer availble.

Thanks

Re: Shop Bug: Buy Coins

Posted: Tue Aug 25, 2020 7:27 pm
by InCodeWeTrust
Found a bug with how the buy coins options works from the main menu.

From the main menu scene, if you click on -> TopMenu -> Profile -> Buy Coins.

It throws this Error:

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
bl_Lobby.ShowBuyCoins () (at Assets/MFPS/Scripts/Network/Lobby/bl_Lobby.cs:596)
From what I can tell the Shop panel is deactivated somewhere in the code during start up.
If the Shop Panel is enabled in the editor before pressing the button it will show the buy coins as normal.

I can't seem to find where its disabling the contents as this is where the issue is.
It should turn of the Shop panel content, not the entire shop game object.

Logging in does not change the error.

Re: Shop

Posted: Wed Aug 26, 2020 7:24 pm
by Lovatto
in MFPS 1.7.5, try the following:

in bl_Lobby.cs replace the function ShowBuyCoins() -> with this:

Code: Select all

    public void ShowBuyCoins()
    {
#if SHOP
        bl_LobbyUI.Instance.ChangeWindow("shop");
        bl_ShopManager.Instance.BuyCoinsWindow.SetActive(true);
#else
        Debug.Log("Require shop addon.");
#endif
    }

Re: Shop

Posted: Tue Dec 15, 2020 6:14 am
by stanimirp
Is there any way to not show the owned items in the shop, i want to see them only in the inventory

Re: Shop

Posted: Tue Feb 02, 2021 12:20 pm
by setdevil
Problem, when i click to the Shop button the action don't open the shop...

See this image ...

http://www.sdc2x.com/shopdontview.png

Re: Shop

Posted: Thu Feb 11, 2021 1:27 pm
by Avocado Shark
Hi, I have a problem where I am using the Ulogin addon, but when I click the buy option on a weapon, the buy window disappears and I get this error:
HTTP/1.1 404 Not Found
UnityEngine.Debug:LogError(Object)
<ProcessBuy>d__41:MoveNext() (at Assets/Addons/Shop/Scripts/Core/bl_ShopManager.cs:306)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Just wondering if I can get some help on this.