Esempio n. 1
0
        private int GetCount(CrewItem item)
        {
            switch (item.Key)
            {
            case "rank":
                return(this.crew.Ranks.Count - 2);

            default:
                return(0);
            }
        }
Esempio n. 2
0
        private bool CanBuy(CrewItem item, CommonPlayer player)
        {
            switch (item.Key)
            {
            case "logoworld":
                return(this.crew.LogoWorld == "");

            case "rankcreation":
                return(!this.crew.Unlocked("Ranks"));

            case "rank":
                return(this.crew.Unlocked("Ranks") && this.crew.Ranks.Count < item.MaxPurchases + 2);

            case "memberdescriptions":
                return(!this.crew.Unlocked("Descriptions"));

            case "unlockprofilecolor":
                return(!this.crew.Unlocked("Colors"));

            case "picknewcolor":
                return(this.crew.Unlocked("Colors") && !this.crew.Unlocked("ColorPick"));

            case "profiledivider":
                return(false);

            case "unlockfaceplates":
                return(!this.crew.Unlocked("Faceplates"));

            default:
            {
                if (!item.Key.StartsWith("faceplate"))
                {
                    return(false);
                }
                if (!this.crew.Unlocked("Faceplates"))
                {
                    return(false);
                }

                var id = item.Key.Substring(9);
                return(!this.crew.Faceplates.Contains(id) && (id != "gold" || player.HasGoldMembership));
            }
            }
        }