예제 #1
0
        internal override string BuildUriString(ref string uriString)
        {
            if (League > 0)
            {
                uriString += "&leag=" + League;
            }

            SetLevel(ref uriString);

            if (Nation > 0)
            {
                uriString += "&nat=" + Nation;
            }

            if (ChemistryStyle != ChemistryStyle.All)
            {
                uriString += "&playStyle=" + (ushort)ChemistryStyle;
            }

            if (Team > 0)
            {
                uriString += "&team=" + Team;
            }

            if (MinBuy > 0)
            {
                uriString += "&minb=" + MinBuy;
            }

            if (MaxBuy > 0)
            {
                uriString += "&maxb=" + MaxBuy;
            }

            if (MinBid > 0)
            {
                uriString += "&micr=" + MinBid;
            }

            if (MaxBid > 0)
            {
                uriString += "&macr=" + MaxBid;
            }

            if (ResourceId <= 16777216)
            {
                uriString += "&maskedDefId=" + ResourceId.CalculateBaseId();
            }
            else
            {
                uriString += "&definitionId=" + ResourceId;
            }

            SetPosition(ref uriString);

            uriString += "&type=" + Type.ToLower();

            return(uriString);
        }
        internal override string BuildUriString(ref string uriString)
        {
            if (League > 0)
            {
                uriString += "&leag=" + League;
            }

            SetLevel(ref uriString);

            if (Nation > 0)
            {
                uriString += "&nat=" + Nation;
            }

            if (ChemistryStyle != ChemistryStyle.All)
            {
                uriString += "&playStyle=" + (ushort)ChemistryStyle;
            }

            if (Team > 0)
            {
                uriString += "&team=" + Team;
            }

            if (MinBuy > 0)
            {
                uriString += "&minb=" + MinBuy;
            }

            if (MaxBuy > 0)
            {
                uriString += "&maxb=" + MaxBuy;
            }

            if (MinBid > 0)
            {
                uriString += "&micr=" + MinBid;
            }

            if (MaxBid > 0)
            {
                uriString += "&macr=" + MaxBid;
            }

            // changed based on this issue
            // https://github.com/trydis/FIFA-Ultimate-Team-Toolkit/issues/305#issuecomment-259940095
            if (ResourceId != 0)
            {
                if (ResourceId <= 16777216)
                {
                    uriString += "&maskedDefId=" + ResourceId.CalculateBaseId();
                }
                else
                {
                    uriString += "&definitionId=" + ResourceId;
                }
            }

            SetPosition(ref uriString);

            uriString += "&type=" + Type.ToLower();

            return(uriString);
        }