示例#1
0
            internal static unsafe GameplayTag Invoke(GameplayTag Value)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = Value;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, MakeLiteralGameplayTag_ptr, new IntPtr(p));;
                return(*((GameplayTag *)(b + 12)));
            }
        }
示例#2
0
            internal static unsafe void Invoke(IntPtr obj, GameplayTag InjectTag, BehaviorTree BehaviorAsset)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = InjectTag;
                *((IntPtr *)(b + 16))     = BehaviorAsset;
                Main.GetProcessEvent(obj, SetDynamicSubtree_ptr, new IntPtr(p));;
            }
        }
示例#3
0
            internal static unsafe bool Invoke(IntPtr obj, GameplayTag TagToCheck)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = TagToCheck;
                Main.GetProcessEvent(obj, HasMatchingGameplayTag_ptr, new IntPtr(p));;
                return(*((bool *)(b + 12)));
            }
        }
示例#4
0
            internal static unsafe GameplayTagContainer Invoke(GameplayTag SingleTag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = SingleTag;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, MakeGameplayTagContainerFromTag_ptr, new IntPtr(p));;
                return(*((GameplayTagContainer *)(b + 16)));
            }
        }
示例#5
0
            internal static unsafe void Invoke(GameplayTagContainer TagContainer, GameplayTag Tag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTagContainer *)(b + 0)) = TagContainer;
                *((GameplayTag *)(b + 32))         = Tag;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, AddGameplayTag_ptr, new IntPtr(p));;
            }
        }
示例#6
0
            internal static unsafe bool Invoke(GameplayTag GameplayTag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = GameplayTag;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, IsGameplayTagValid_ptr, new IntPtr(p));;
                return(*((bool *)(b + 12)));
            }
        }
示例#7
0
            internal static unsafe string Invoke(GameplayTag GameplayTag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = GameplayTag;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, GetDebugStringFromGameplayTag_ptr, new IntPtr(p));;
                return(FString.Get(b + 16));
            }
        }
示例#8
0
            internal static unsafe float Invoke(IntPtr obj, GameplayTag CooldownTag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = CooldownTag;
                Main.GetProcessEvent(obj, GetTagCooldownEndTime_ptr, new IntPtr(p));;
                return(*((float *)(b + 12)));
            }
        }
示例#9
0
            internal static unsafe void Invoke(IntPtr obj, GameplayTag CooldownTag, float CooldownDuration, bool bAddToExistingDuration)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = CooldownTag;
                *((float *)(b + 12))      = CooldownDuration;
                *((bool *)(b + 16))       = bAddToExistingDuration;
                Main.GetProcessEvent(obj, AddCooldownTagDuration_ptr, new IntPtr(p));;
            }
        }
示例#10
0
            internal static unsafe bool Invoke(GameplayTag A, GameplayTag B)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0))  = A;
                *((GameplayTag *)(b + 12)) = B;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, NotEqual_GameplayTag_ptr, new IntPtr(p));;
                return(*((bool *)(b + 24)));
            }
        }
示例#11
0
            internal static unsafe bool Invoke(GameplayTag TagOne, GameplayTag TagTwo, bool bExactMatch)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0))  = TagOne;
                *((GameplayTag *)(b + 12)) = TagTwo;
                *((bool *)(b + 24))        = bExactMatch;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, MatchesTag_ptr, new IntPtr(p));;
                return(*((bool *)(b + 25)));
            }
        }
示例#12
0
            internal static unsafe bool Invoke(GameplayTagContainer TagContainer, GameplayTag Tag, bool bExactMatch)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTagContainer *)(b + 0)) = TagContainer;
                *((GameplayTag *)(b + 32))         = Tag;
                *((bool *)(b + 44)) = bExactMatch;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, HasTag_ptr, new IntPtr(p));;
                return(*((bool *)(b + 45)));
            }
        }
示例#13
0
            internal static unsafe bool Invoke(byte TagContainerInterface /*TODO: interface TScriptInterface */, GameplayTag Tag)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                throw new NotImplementedException(); //TODO: interface TScriptInterface TagContainerInterface
                *((GameplayTag *)(b + 16)) = Tag;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, DoesTagAssetInterfaceHaveTag_ptr, new IntPtr(p));;
                //TODO: interface TScriptInterface TagContainerInterface
                return(*((bool *)(b + 28)));
            }
        }
示例#14
0
            internal static unsafe bool Invoke(GameplayTag TagOne, GameplayTagContainer OtherContainer, bool bExactMatch)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0))           = TagOne;
                *((GameplayTagContainer *)(b + 16)) = OtherContainer;
                *((bool *)(b + 48)) = bExactMatch;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, MatchesAnyTags_ptr, new IntPtr(p));;
                return(*((bool *)(b + 49)));
            }
        }
示例#15
0
            internal static unsafe bool Invoke(GameplayTag A, string B)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((GameplayTag *)(b + 0)) = A;
                var B_handle = GCHandle.Alloc(B, GCHandleType.Pinned);

                *(IntPtr *)(b + 16)                = B_handle.AddrOfPinnedObject();
                *(int *)(b + IntPtr.Size + 16)     = B.Length;
                *(int *)(b + IntPtr.Size + 4 + 16) = B.Length;
                Main.GetProcessEvent(BlueprintGameplayTagLibrary.DefaultObject, NotEqual_TagTag_ptr, new IntPtr(p));;
                B_handle.Free();
                return(*((bool *)(b + 32)));
            }
        }
示例#16
0
        /// <summary>
        /// Order:
        ///     1. Rarity
        ///     2. Image
        ///     3. Text
        ///         1. DisplayName
        ///         2. Description
        ///         3. Misc
        ///     4. GameplayTags
        ///         1. order doesn't matter
        ///         2. the importance here is to get the description before gameplay tags
        /// </summary>
        public BaseIcon(IUExport export, string exportType, ref string assetName) : this()
        {
            // rarity
            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);
            }

            // image
            if (Properties.Settings.Default.UseItemShopIcon &&
                DisplayAssetImage.GetDisplayAssetImage(this, export.GetExport <SoftObjectProperty>("DisplayAssetPath"), ref assetName))
            {
            }   // ^^^^ will return false if image not found, if so, we try to get the normal icon
            else if (export.GetExport <ObjectProperty>("HeroDefinition", "WeaponDefinition") is ObjectProperty itemDef)
            {
                LargeSmallImage.GetPreviewImage(this, itemDef, assetName);
            }
            else if (export.GetExport <SoftObjectProperty>("LargePreviewImage", "SmallPreviewImage", "ItemDisplayAsset") is SoftObjectProperty previewImage)
            {
                LargeSmallImage.GetPreviewImage(this, previewImage);
            }
            else if (export.GetExport <StructProperty>("IconBrush") is StructProperty iconBrush) // abilities
            {
                LargeSmallImage.GetPreviewImage(this, iconBrush);
            }

            // text
            if (export.GetExport <TextProperty>("DisplayName", "DefaultHeaderText", "UIDisplayName") is TextProperty displayName)
            {
                DisplayName = Text.GetTextPropertyBase(displayName);
            }
            if (export.GetExport <TextProperty>("Description", "DefaultBodyText") is TextProperty description)
            {
                Description = Text.GetTextPropertyBase(description);
            }
            else if (export.GetExport <ArrayProperty>("Description") is ArrayProperty arrayDescription) // abilities
            {
                Description = Text.GetTextPropertyBase(arrayDescription);
            }
            if (export.GetExport <StructProperty>("MaxStackSize") is StructProperty maxStackSize)
            {
                ShortDescription = Text.GetMaxStackSize(maxStackSize);
            }
            else if (export.GetExport <TextProperty>("ShortDescription") is TextProperty shortDescription)
            {
                ShortDescription = Text.GetTextPropertyBase(shortDescription);
            }
            else if (exportType.Equals("AthenaItemWrapDefinition")) // if no ShortDescription it's most likely a wrap
            {
                ShortDescription = Localizations.GetLocalization("Fort.Cosmetics", "ItemWrapShortDescription", "Wrap");
            }

            // gameplaytags
            if (export.GetExport <StructProperty>("GameplayTags") is StructProperty gameplayTags)
            {
                GameplayTag.GetGameplayTags(this, gameplayTags, exportType);
            }
            else if (export.GetExport <ObjectProperty>("cosmetic_item") is ObjectProperty cosmeticItem) // variants
            {
                CosmeticSource = cosmeticItem.Value.Resource.ObjectName.String;
            }

            if (export.GetExport <SoftObjectProperty>("AmmoData") is SoftObjectProperty ammoData)
            {
                Statistics.GetAmmoData(this, ammoData);
            }
            if (export.GetExport <StructProperty>("WeaponStatHandle") is StructProperty weaponStatHandle)
            {
                Statistics.GetWeaponStats(this, weaponStatHandle);
            }
            if (export.GetExport <ObjectProperty>("HeroGameplayDefinition") is ObjectProperty heroGameplayDefinition)
            {
                Statistics.GetHeroStats(this, heroGameplayDefinition);
            }

            /* Please do not add Schematics support because it takes way too much memory */
            /* Thank the STW Dev Team for using a 5,69Mb file to get... Oh nvm, they all left */

            AdditionalSize = 48 * Stats.Count;
        }
示例#17
0
 public static void SendGameplayEventToComponent(AbilitySystemComponent TargetAbilitySystem, GameplayTag EventTag, GameplayEventData Payload)
 {
     TargetAbilitySystem.HandleGameplayEvent(EventTag, Payload);
 }
示例#18
0
 ///<summary>@return the cooldown tag end time, 0.0f if CooldownTag is not found</summary>
 public float GetTagCooldownEndTime(GameplayTag CooldownTag) =>
 BehaviorTreeComponent_methods.GetTagCooldownEndTime_method.Invoke(ObjPointer, CooldownTag);
示例#19
0
 ///<summary>add to the cooldown tag's duration</summary>
 public void AddCooldownTagDuration(GameplayTag CooldownTag, float CooldownDuration, bool bAddToExistingDuration) =>
 BehaviorTreeComponent_methods.AddCooldownTagDuration_method.Invoke(ObjPointer, CooldownTag, CooldownDuration, bAddToExistingDuration);
示例#20
0
 ///<summary>assign subtree to RunBehaviorDynamic task specified by tag</summary>
 public void SetDynamicSubtree(GameplayTag InjectTag, BehaviorTree BehaviorAsset) =>
 BehaviorTreeComponent_methods.SetDynamicSubtree_method.Invoke(ObjPointer, InjectTag, BehaviorAsset);