Exemplo n.º 1
0
 public Reward(UObject uObject)
 {
     _theReward = new BaseIcon(uObject, EIconStyle.Default);
     _theReward.ParseForReward(false);
     _theReward.Border[0] = SKColors.White;
     _rewardQuantity      = _theReward.DisplayName;
 }
Exemplo n.º 2
0
        public Reward(int quantity, string assetName) : this()
        {
            _rewardQuantity = $"x{quantity:###,###,###}".Trim();

            if (assetName.Contains(':'))
            {
                var parts = assetName.Split(':');

                if (parts[0].Equals("HomebaseBannerIcon", StringComparison.CurrentCultureIgnoreCase))
                {
                    if (!Utils.TryLoadObject($"FortniteGame/Content/Items/BannerIcons/{parts[1]}.{parts[1]}", out UObject p))
                    {
                        return;
                    }

                    _theReward = new BaseIcon(p, EIconStyle.Default);
                    _theReward.ParseForReward(false);
                    _theReward.Border[0] = SKColors.White;
                    _rewardQuantity      = _theReward.DisplayName;
                }
                else
                {
                    GetReward(parts[1]);
                }
            }
            else
            {
                GetReward(assetName);
            }
        }
Exemplo n.º 3
0
        public override void ParseForInfo()
        {
            if (Object.TryGetValue(out FPackageIndex accessItem, "access_item") &&
                Utils.TryGetPackageIndexExport(accessItem, out UObject uObject))
            {
                _exportName = uObject.Name;
                _icon       = new BaseIcon(uObject, EIconStyle.Default);
                _icon.ParseForReward(false);
            }

            if (Object.TryGetValue(out FText displayName, "DisplayName") && displayName.Text != "TBD")
            {
                DisplayName = displayName.Text;
            }