Shop

Add-Ons for MFPS.
User avatar
KKHackLabs
Member
Member
Posts: 52
Joined: Thu May 07, 2020 3:34 pm

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?
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

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);
        }
    }
}
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
KKHackLabs
Member
Member
Posts: 52
Joined: Thu May 07, 2020 3:34 pm

How do you edit the Weapon Names for the integration of the Shop and the Weapon Pack #1?
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

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.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
KKHackLabs
Member
Member
Posts: 52
Joined: Thu May 07, 2020 3:34 pm

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
User avatar
InCodeWeTrust
Contributor
Contributor
Posts: 18
Joined: Wed Mar 27, 2019 10:05 am

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.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

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
    }
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
stanimirp
New Member
New Member
Posts: 4
Joined: Sun Dec 01, 2019 12:43 pm

Is there any way to not show the owned items in the shop, i want to see them only in the inventory
User avatar
setdevil
Contributor
Contributor
Posts: 77
Joined: Thu Jun 25, 2020 11:44 am

Problem, when i click to the Shop button the action don't open the shop...

See this image ...

http://www.sdc2x.com/shopdontview.png
User avatar
Avocado Shark
Contributor
Contributor
Posts: 13
Joined: Thu Jan 21, 2021 12:42 am

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.
Post Reply