Exemple #1
0
 public BaseItemAccess(IUExport export) : this()
 {
     if (export.GetExport <ObjectProperty>("access_item") is ObjectProperty accessItem)
     {
         SItem = accessItem.Value.Resource.ObjectName.String;
         PakPackage p = Utils.GetPropertyPakPackage(accessItem.Value.Resource.OuterIndex.Resource.ObjectName.String);
         if (p.HasExport() && !p.Equals(default))
        public static bool GetDisplayAssetImage(BaseIcon icon, SoftObjectProperty o, string assetName)
        {
            string imageType = "DetailsImage";

            switch ("DA_Featured_" + assetName)
            {
            case "DA_Featured_Glider_ID_141_AshtonBoardwalk.uasset":
            case "DA_Featured_Glider_ID_150_TechOpsBlue.uasset":
            case "DA_Featured_Glider_ID_131_SpeedyMidnight.uasset":
            case "DA_Featured_Pickaxe_ID_178_SpeedyMidnight.uasset":
            case "DA_Featured_Glider_ID_015_Brite.uasset":
            case "DA_Featured_Glider_ID_016_Tactical.uasset":
            case "DA_Featured_Glider_ID_017_Assassin.uasset":
            case "DA_Featured_Pickaxe_ID_027_Scavenger.uasset":
            case "DA_Featured_Pickaxe_ID_028_Space.uasset":
            case "DA_Featured_Pickaxe_ID_029_Assassin.uasset":
                return(false);

            case "DA_Featured_Glider_ID_070_DarkViking.uasset":
            case "DA_Featured_CID_319_Athena_Commando_F_Nautilus.uasset":
                imageType = "TileImage";
                break;
            }

            string path = o?.Value.AssetPathName.String;

            if (string.IsNullOrEmpty(path))
            {
                path = "/Game/Catalog/DisplayAssets/DA_Featured_" + assetName.Substring(0, assetName.LastIndexOf("."));
            }

            PakPackage p = Utils.GetPropertyPakPackage(path);

            if (p.HasExport() && !p.Equals(default))
Exemple #3
0
        public BaseIcon(IUExport export, string assetName, bool forceHR) : this()
        {
            if (export.GetExport <ObjectProperty>("Series") is ObjectProperty series)
            {
                Serie.GetRarity(this, series);
            }
            else if (Properties.Settings.Default.UseGameColors)                          // override default green
            {
                Rarity.GetInGameRarity(this, export.GetExport <EnumProperty>("Rarity")); // uncommon will be triggered by Rarity being null
            }
            else if (export.GetExport <EnumProperty>("Rarity") is EnumProperty rarity)
            {
                Rarity.GetHardCodedRarity(this, rarity);
            }

            if (export.GetExport <ObjectProperty>("HeroDefinition", "WeaponDefinition") is ObjectProperty itemDef)
            {
                LargeSmallImage.GetPreviewImage(this, itemDef, assetName, forceHR);
            }
            else if (export.GetExport <SoftObjectProperty>(forceHR ? "LargePreviewImage" : "SmallPreviewImage", forceHR ? "ItemDisplayAsset" : "SmallImage") is SoftObjectProperty previewImage)
            {
                LargeSmallImage.GetPreviewImage(this, previewImage);
            }
            else if (export.GetExport <ObjectProperty>("access_item") is ObjectProperty accessItem)
            {
                PakPackage p = Utils.GetPropertyPakPackage(accessItem.Value.Resource.OuterIndex.Resource.ObjectName.String);
                if (p.HasExport() && !p.Equals(default))
Exemple #4
0
        public Quest(UObject obj) : this()
        {
            if (obj.TryGetValue("Description", out var d) && d is TextProperty description)
            {
                Description = Text.GetTextPropertyBase(description);
            }
            if (obj.TryGetValue("ObjectiveCompletionCount", out var o) && o is IntProperty objectiveCompletionCount)
            {
                Count = objectiveCompletionCount.Value;
            }

            if (obj.TryGetValue("Objectives", out var v1) && v1 is ArrayProperty a1 &&
                a1.Value.Length > 0 && a1.Value[0] is StructProperty s && s.Value is UObject objectives)
            {
                if (string.IsNullOrEmpty(Description) && objectives.TryGetValue("Description", out var od) && od is TextProperty objectivesDescription)
                {
                    Description = Text.GetTextPropertyBase(objectivesDescription);
                }

                if (Count == 0 && objectives.TryGetValue("Count", out var c) && c is IntProperty count)
                {
                    Count = count.Value;
                }
            }

            if (obj.TryGetValue("RewardsTable", out var v4) && v4 is ObjectProperty rewardsTable)
            {
                PakPackage p = Utils.GetPropertyPakPackage(rewardsTable.Value.Resource.OuterIndex.Resource.ObjectName.String);
                if (p.HasExport() && !p.Equals(default))
Exemple #5
0
        public Reward(IntProperty quantity, string assetName) : this()
        {
            RewardQuantity = quantity.Value;

            if (assetName.Contains(':'))
            {
                string[] parts = assetName.Split(':');
                if (parts[0].Equals("HomebaseBannerIcon", StringComparison.CurrentCultureIgnoreCase))
                {
                    PakPackage p = Utils.GetPropertyPakPackage("/Game/Banners/BannerIcons");
                    if (p.HasExport() && !p.Equals(default))
Exemple #6
0
        public static void GetPreviewImage(BaseIcon icon, ObjectProperty o, string assetName, bool hightRes)
        {
            string path = o.Value.Resource.OuterIndex.Resource.ObjectName.String;

            if (path.Equals("/Game/Athena/Items/Weapons/WID_Harvest_Pickaxe_STWCosmetic_Tier"))
            {
                path += "_" + assetName.Substring(assetName.LastIndexOf(".") - 1, 1);
            }

            PakPackage p = Utils.GetPropertyPakPackage(path);

            if (p.HasExport() && !p.Equals(default))
Exemple #7
0
 public static string GetTextPropertyBase(TextProperty t)
 {
     if (t.Value is FText text)
     {
         if (text.Text is FTextHistory.Base b)
         {
             return(b.SourceString.Replace("<Emphasized>", string.Empty).Replace("</>", string.Empty));
         }
         else if (text.Text is FTextHistory.StringTableEntry s)
         {
             PakPackage p = Utils.GetPropertyPakPackage(s.TableId.String);
             if (p.HasExport() && !p.Equals(default))
Exemple #8
0
        public BaseBundle(IUExport export, string assetFolder) : this()
        {
            if (export.GetExport <StructProperty>("DisplayStyle") is StructProperty displayStyle)
            {
                DisplayStyle = new Header(displayStyle, assetFolder);
            }
            if (export.GetExport <TextProperty>("DisplayName") is TextProperty displayName)
            {
                DisplayName = Text.GetTextPropertyBase(displayName);
            }

            if (export.GetExport <ArrayProperty>("CareerQuestBitShifts") is ArrayProperty careerQuestBitShifts)
            {
                foreach (SoftObjectProperty questPath in careerQuestBitShifts.Value)
                {
                    PakPackage p = Utils.GetPropertyPakPackage(questPath.Value.AssetPathName.String);
                    if (p.HasExport() && !p.Equals(default))
Exemple #9
0
        public static void GetRarity(BaseIcon icon, ObjectProperty o)
        {
            PakPackage p = Utils.GetPropertyPakPackage(o.Value.Resource.OuterIndex.Resource.ObjectName.String);

            if (p.HasExport() && !p.Equals(default))
Exemple #10
0
        public static void GetAmmoData(BaseIcon icon, SoftObjectProperty ammoData)
        {
            PakPackage p = Utils.GetPropertyPakPackage(ammoData.Value.AssetPathName.String);

            if (p.HasExport() && !p.Equals(default))
Exemple #11
0
 public static void GetUserFacingFlags(List <string> uffs, BaseIcon icon, string exportType)
 {
     if (uffs.Count > 0)
     {
         PakPackage p = Utils.GetPropertyPakPackage("/Game/Items/ItemCategories"); //PrimaryCategories - SecondaryCategories - TertiaryCategories
         if (p.HasExport() && !p.Equals(default))
Exemple #12
0
        public static void GetInGameRarity(BaseIcon icon, EnumProperty e)
        {
            PakPackage p = Utils.GetPropertyPakPackage("/Game/Balance/RarityData");

            if (p.HasExport() && !p.Equals(default))
Exemple #13
0
        private static string GetCosmeticSet(string setName)
        {
            PakPackage p = Utils.GetPropertyPakPackage("/Game/Athena/Items/Cosmetics/Metadata/CosmeticSets");

            if (p.HasExport() && !p.Equals(default))
Exemple #14
0
 public static void GetAmmoData(BaseIcon icon, SoftObjectProperty ammoData)
 {
     if (!ammoData.Value.AssetPathName.String.StartsWith("/Game/Athena/Items/Consumables/"))
     {
         PakPackage p = Utils.GetPropertyPakPackage(ammoData.Value.AssetPathName.String);
         if (p.HasExport() && !p.Equals(default))
Exemple #15
0
        public static void GetAsset(BaseLabel icon, SoftObjectProperty s)
        {
            PakPackage p = Utils.GetPropertyPakPackage(s.Value.AssetPathName.String);

            if (p.HasExport() && !p.Equals(default))