public static bool CanOpenBattleShop(Units player, ShopInfo shopInfo, EBattleShopOpenType openType, out string err)
        {
            err = null;
            bool result = false;

            if (shopInfo != null && null != player && openType == EBattleShopOpenType.eFromButton)
            {
                switch (shopInfo.ShopType)
                {
                case EBattleShopType.eLM:
                    result = (!BattleEquipTools_op.IsOnLineBattle() || Singleton <PvpManager> .Instance.SelfTeamType == TeamType.LM);
                    break;

                case EBattleShopType.eBL:
                    result = (BattleEquipTools_op.IsOnLineBattle() && Singleton <PvpManager> .Instance.SelfTeamType == TeamType.BL);
                    break;

                case EBattleShopType.eNeutral:
                case EBattleShopType.eNeutral_2:
                {
                    bool flag = null != player && BattleEquipTools_op.WithinShopArea(shopInfo, player.transform.position);
                    result = flag;
                    break;
                }

                case EBattleShopType.eTeam3:
                    result = (Singleton <PvpManager> .Instance.SelfTeamType == TeamType.Team_3);
                    break;
                }
            }
            return(result);
        }