From 503b99202ff3dd6f6c8f4c0500bb736f7476be35 Mon Sep 17 00:00:00 2001 From: Michidu Date: Thu, 25 Jan 2018 20:06:00 +0300 Subject: [PATCH] Pushed V2 --- .gitignore | 288 + ArkApi.sln | 28 - ArkApi/API/Actor.h | 4798 ----- ArkApi/API/Ark.cpp | 59 - ArkApi/API/Ark.h | 26 - ArkApi/API/Base.cpp | 18 - ArkApi/API/Enums.h | 246 - ArkApi/API/GameMode.h | 945 - ArkApi/API/GameState.h | 354 - ArkApi/API/Inventory.h | 1024 -- ArkApi/API/Other.h | 114 - ArkApi/API/PrimalStructure.h | 525 - ArkApi/API/Tribe.h | 129 - ArkApi/API/UE.h | 720 - ArkApi/ApiUtils.cpp | 38 - ArkApi/ApiUtils.h | 19 - ArkApi/ArkApi.cpp | 71 - ArkApi/ArkApi.vcxproj | 185 - ArkApi/ArkApi.vcxproj.filters | 108 - ArkApi/ArkApi.vcxproj.user | 4 - ArkApi/Commands.cpp | 142 - ArkApi/Commands.h | 64 - ArkApi/Hooks.cpp | 185 - ArkApi/Hooks.h | 27 - ArkApi/JsonUtils.cpp | 41 - ArkApi/JsonUtils.h | 13 - ArkApi/UpdateManager.cpp | 30 - ArkApi/UpdateManager.h | 12 - ArkApi/json.hpp | 14584 --------------- ArkApi/stdafx.cpp | 1 - ArkApi/stdafx.h | 5 - LICENSE.TXT | 2 +- config.json | 14 +- lib/libMinHook.x64.lib | Bin 0 -> 368772 bytes version.sln | 25 + version/Core/Private/ApiUtils.cpp | 40 + version/Core/Private/ApiUtils.h | 35 + version/Core/Private/Base.cpp | 23 + version/Core/Private/Commands.cpp | 103 + version/Core/Private/Commands.h | 122 + version/Core/Private/Hooks.cpp | 112 + version/Core/Private/Hooks.h | 44 + version/Core/Private/HooksImpl.cpp | 119 + version/Core/Private/HooksImpl.h | 6 + version/Core/Private/Logger.cpp | 13 + version/Core/Private/Offsets.cpp | 58 + version/Core/Private/Offsets.h | 36 + version/Core/Private/PDBReader/PDBReader.cpp | 346 + version/Core/Private/PDBReader/PDBReader.h | 38 + .../Private/PluginManager/PluginManager.cpp | 229 + .../Private/PluginManager/PluginManager.h | 91 + version/Core/Private/Tools.cpp | 47 + version/Core/Public/API/ARK/Actor.h | 4885 +++++ version/Core/Public/API/ARK/Ark.h | 27 + version/Core/Public/API/ARK/GameMode.h | 1000 ++ version/Core/Public/API/ARK/GameState.h | 295 + version/Core/Public/API/ARK/Inventory.h | 811 + version/Core/Public/API/ARK/Other.h | 262 + version/Core/Public/API/ARK/PrimalStructure.h | 566 + version/Core/Public/API/ARK/Tribe.h | 129 + {ArkApi => version/Core/Public}/API/Base.h | 80 +- version/Core/Public/API/Enums.h | 904 + version/Core/Public/API/Fields.h | 164 + version/Core/Public/API/UE/BasicTypes.h | 151 + .../API/UE/Containers/Algo/BinarySearch.h | 222 + .../API/UE/Containers/Algo/Impl/BinaryHeap.h | 144 + .../Public/API/UE/Containers/Algo/IntroSort.h | 178 + .../Public/API/UE/Containers/Algo/Reverse.h | 54 + .../Core/Public/API/UE/Containers/Algo/Sort.h | 57 + .../Core/Public/API/UE/Containers/BitArray.h | 1093 ++ .../Containers/ContainerAllocationPolicies.h | 803 + .../Public/API/UE/Containers/EnumAsByte.h | 140 + .../Core/Public/API/UE/Containers/FString.h | 3030 ++++ version/Core/Public/API/UE/Containers/Map.h | 1452 ++ .../Public/API/UE/Containers/ScriptArray.h | 192 + version/Core/Public/API/UE/Containers/Set.h | 1481 ++ .../Public/API/UE/Containers/SparseArray.h | 1076 ++ .../Core/Public/API/UE/Containers/TArray.h | 2022 +++ .../Public/API/UE/Delegates/IntegerSequence.h | 30 + .../UE/GenericPlatform/GenericPlatformMath.h | 626 + .../GenericPlatform/GenericPlatformMemory.h | 64 + .../GenericPlatform/GenericPlatformString.h | 208 + version/Core/Public/API/UE/HAL/UnrealMemory.h | 108 + version/Core/Public/API/UE/Math/Color.h | 634 + version/Core/Public/API/UE/Math/ColorList.h | 110 + version/Core/Public/API/UE/Math/IntPoint.h | 472 + version/Core/Public/API/UE/Math/IntVector.h | 530 + version/Core/Public/API/UE/Math/Quat.h | 942 + version/Core/Public/API/UE/Math/Rotator.h | 587 + .../Public/API/UE/Math/UnrealMathUtility.h | 700 + version/Core/Public/API/UE/Math/Vector.h | 1657 ++ version/Core/Public/API/UE/Math/Vector2D.h | 831 + version/Core/Public/API/UE/Misc/ByteSwap.h | 84 + version/Core/Public/API/UE/Misc/CString.h | 779 + version/Core/Public/API/UE/Misc/Char.h | 223 + .../Core/Public/API/UE/Misc/StructBuilder.h | 64 + version/Core/Public/API/UE/NetSerialization.h | 141 + .../API/UE/Templates/AlignmentTemplates.h | 56 + .../Core/Public/API/UE/Templates/AndOrNot.h | 71 + .../Public/API/UE/Templates/AreTypesEqual.h | 21 + .../Public/API/UE/Templates/ChooseClass.h | 21 + version/Core/Public/API/UE/Templates/Decay.h | 46 + .../Core/Public/API/UE/Templates/EnableIf.h | 58 + .../Core/Public/API/UE/Templates/Function.h | 695 + .../Public/API/UE/Templates/HasGetTypeHash.h | 53 + .../Public/API/UE/Templates/IdentityFunctor.h | 15 + version/Core/Public/API/UE/Templates/Invoke.h | 66 + .../Public/API/UE/Templates/IsArithmetic.h | 32 + .../API/UE/Templates/IsContiguousContainer.h | 39 + version/Core/Public/API/UE/Templates/IsEnum.h | 9 + .../Public/API/UE/Templates/IsEnumClass.h | 26 + .../Core/Public/API/UE/Templates/IsPODType.h | 27 + .../Core/Public/API/UE/Templates/IsPointer.h | 21 + .../UE/Templates/IsTriviallyCopyAssignable.h | 15 + .../Templates/IsTriviallyCopyConstructible.h | 15 + .../UE/Templates/IsTriviallyDestructible.h | 29 + version/Core/Public/API/UE/Templates/Less.h | 30 + .../Core/Public/API/UE/Templates/MemoryOps.h | 278 + .../UE/Templates/PointerIsConvertibleFromTo.h | 49 + .../Core/Public/API/UE/Templates/RemoveCV.h | 13 + .../Public/API/UE/Templates/RemoveReference.h | 10 + .../API/UE/Templates/ReversePredicate.h | 23 + .../Core/Public/API/UE/Templates/Sorting.h | 417 + version/Core/Public/API/UE/Templates/Tuple.h | 716 + .../API/UE/Templates/TypeCompatibleBytes.h | 60 + .../Core/Public/API/UE/Templates/TypeHash.h | 158 + .../Public/API/UE/Templates/UnrealTemplate.h | 566 + .../API/UE/Templates/UnrealTypeTraits.h | 482 + version/Core/Public/API/UE/UE.h | 659 + .../API/UE/Windows/MicrosoftPlatformString.h | 265 + version/Core/Public/IApiUtils.h | 512 + version/Core/Public/ICommands.h | 89 + version/Core/Public/IHooks.h | 39 + version/Core/Public/Logger/Logger.h | 43 + .../Core/Public/Logger/spdlog/async_logger.h | 82 + version/Core/Public/Logger/spdlog/common.h | 161 + .../Logger/spdlog/details/async_log_helper.h | 399 + .../Logger/spdlog/details/async_logger_impl.h | 107 + .../Logger/spdlog/details/file_helper.h | 146 + .../Public/Logger/spdlog/details/log_msg.h | 50 + .../Logger/spdlog/details/logger_impl.h | 373 + .../Logger/spdlog/details/mpmc_bounded_q.h | 176 + .../Public/Logger/spdlog/details/null_mutex.h | 45 + .../Core/Public/Logger/spdlog/details/os.h | 479 + .../spdlog/details/pattern_formatter_impl.h | 686 + .../Public/Logger/spdlog/details/registry.h | 214 + .../Logger/spdlog/details/spdlog_impl.h | 263 + .../Logger/spdlog/fmt/bundled/container.h | 82 + .../Logger/spdlog/fmt/bundled/format.cc | 495 + .../Public/Logger/spdlog/fmt/bundled/format.h | 4173 +++++ .../Logger/spdlog/fmt/bundled/ostream.cc | 35 + .../Logger/spdlog/fmt/bundled/ostream.h | 108 + .../Public/Logger/spdlog/fmt/bundled/posix.cc | 241 + .../Public/Logger/spdlog/fmt/bundled/posix.h | 367 + .../Logger/spdlog/fmt/bundled/printf.cc | 32 + .../Public/Logger/spdlog/fmt/bundled/printf.h | 603 + .../Public/Logger/spdlog/fmt/bundled/string.h | 148 + .../Public/Logger/spdlog/fmt/bundled/time.h | 143 + version/Core/Public/Logger/spdlog/fmt/fmt.h | 34 + version/Core/Public/Logger/spdlog/fmt/ostr.h | 17 + version/Core/Public/Logger/spdlog/formatter.h | 47 + version/Core/Public/Logger/spdlog/logger.h | 110 + .../Public/Logger/spdlog/sinks/android_sink.h | 90 + .../Logger/spdlog/sinks/ansicolor_sink.h | 133 + .../Public/Logger/spdlog/sinks/base_sink.h | 51 + .../Public/Logger/spdlog/sinks/dist_sink.h | 72 + .../Public/Logger/spdlog/sinks/file_sinks.h | 253 + .../Public/Logger/spdlog/sinks/msvc_sink.h | 51 + .../Public/Logger/spdlog/sinks/null_sink.h | 34 + .../Public/Logger/spdlog/sinks/ostream_sink.h | 47 + .../Core/Public/Logger/spdlog/sinks/sink.h | 53 + .../Public/Logger/spdlog/sinks/stdout_sinks.h | 77 + .../Public/Logger/spdlog/sinks/syslog_sink.h | 81 + .../Logger/spdlog/sinks/wincolor_sink.h | 122 + .../Logger/spdlog/sinks/windebug_sink.h | 29 + version/Core/Public/Logger/spdlog/spdlog.h | 188 + version/Core/Public/Logger/spdlog/tweakme.h | 160 + version/Core/Public/Tools.h | 17 + {ArkApi => version}/MinHook.h | 0 version/json.hpp | 14874 ++++++++++++++++ version/version.cpp | 118 + version/version.def | 19 + version/version.vcxproj | 205 + version/version.vcxproj.filters | 379 + version/version_asm.asm | 54 + 185 files changed, 64419 insertions(+), 24542 deletions(-) create mode 100644 .gitignore delete mode 100644 ArkApi.sln delete mode 100644 ArkApi/API/Actor.h delete mode 100644 ArkApi/API/Ark.cpp delete mode 100644 ArkApi/API/Ark.h delete mode 100644 ArkApi/API/Base.cpp delete mode 100644 ArkApi/API/Enums.h delete mode 100644 ArkApi/API/GameMode.h delete mode 100644 ArkApi/API/GameState.h delete mode 100644 ArkApi/API/Inventory.h delete mode 100644 ArkApi/API/Other.h delete mode 100644 ArkApi/API/PrimalStructure.h delete mode 100644 ArkApi/API/Tribe.h delete mode 100644 ArkApi/API/UE.h delete mode 100644 ArkApi/ApiUtils.cpp delete mode 100644 ArkApi/ApiUtils.h delete mode 100644 ArkApi/ArkApi.cpp delete mode 100644 ArkApi/ArkApi.vcxproj delete mode 100644 ArkApi/ArkApi.vcxproj.filters delete mode 100644 ArkApi/ArkApi.vcxproj.user delete mode 100644 ArkApi/Commands.cpp delete mode 100644 ArkApi/Commands.h delete mode 100644 ArkApi/Hooks.cpp delete mode 100644 ArkApi/Hooks.h delete mode 100644 ArkApi/JsonUtils.cpp delete mode 100644 ArkApi/JsonUtils.h delete mode 100644 ArkApi/UpdateManager.cpp delete mode 100644 ArkApi/UpdateManager.h delete mode 100644 ArkApi/json.hpp delete mode 100644 ArkApi/stdafx.cpp delete mode 100644 ArkApi/stdafx.h create mode 100644 lib/libMinHook.x64.lib create mode 100644 version.sln create mode 100644 version/Core/Private/ApiUtils.cpp create mode 100644 version/Core/Private/ApiUtils.h create mode 100644 version/Core/Private/Base.cpp create mode 100644 version/Core/Private/Commands.cpp create mode 100644 version/Core/Private/Commands.h create mode 100644 version/Core/Private/Hooks.cpp create mode 100644 version/Core/Private/Hooks.h create mode 100644 version/Core/Private/HooksImpl.cpp create mode 100644 version/Core/Private/HooksImpl.h create mode 100644 version/Core/Private/Logger.cpp create mode 100644 version/Core/Private/Offsets.cpp create mode 100644 version/Core/Private/Offsets.h create mode 100644 version/Core/Private/PDBReader/PDBReader.cpp create mode 100644 version/Core/Private/PDBReader/PDBReader.h create mode 100644 version/Core/Private/PluginManager/PluginManager.cpp create mode 100644 version/Core/Private/PluginManager/PluginManager.h create mode 100644 version/Core/Private/Tools.cpp create mode 100644 version/Core/Public/API/ARK/Actor.h create mode 100644 version/Core/Public/API/ARK/Ark.h create mode 100644 version/Core/Public/API/ARK/GameMode.h create mode 100644 version/Core/Public/API/ARK/GameState.h create mode 100644 version/Core/Public/API/ARK/Inventory.h create mode 100644 version/Core/Public/API/ARK/Other.h create mode 100644 version/Core/Public/API/ARK/PrimalStructure.h create mode 100644 version/Core/Public/API/ARK/Tribe.h rename {ArkApi => version/Core/Public}/API/Base.h (61%) create mode 100644 version/Core/Public/API/Enums.h create mode 100644 version/Core/Public/API/Fields.h create mode 100644 version/Core/Public/API/UE/BasicTypes.h create mode 100644 version/Core/Public/API/UE/Containers/Algo/BinarySearch.h create mode 100644 version/Core/Public/API/UE/Containers/Algo/Impl/BinaryHeap.h create mode 100644 version/Core/Public/API/UE/Containers/Algo/IntroSort.h create mode 100644 version/Core/Public/API/UE/Containers/Algo/Reverse.h create mode 100644 version/Core/Public/API/UE/Containers/Algo/Sort.h create mode 100644 version/Core/Public/API/UE/Containers/BitArray.h create mode 100644 version/Core/Public/API/UE/Containers/ContainerAllocationPolicies.h create mode 100644 version/Core/Public/API/UE/Containers/EnumAsByte.h create mode 100644 version/Core/Public/API/UE/Containers/FString.h create mode 100644 version/Core/Public/API/UE/Containers/Map.h create mode 100644 version/Core/Public/API/UE/Containers/ScriptArray.h create mode 100644 version/Core/Public/API/UE/Containers/Set.h create mode 100644 version/Core/Public/API/UE/Containers/SparseArray.h create mode 100644 version/Core/Public/API/UE/Containers/TArray.h create mode 100644 version/Core/Public/API/UE/Delegates/IntegerSequence.h create mode 100644 version/Core/Public/API/UE/GenericPlatform/GenericPlatformMath.h create mode 100644 version/Core/Public/API/UE/GenericPlatform/GenericPlatformMemory.h create mode 100644 version/Core/Public/API/UE/GenericPlatform/GenericPlatformString.h create mode 100644 version/Core/Public/API/UE/HAL/UnrealMemory.h create mode 100644 version/Core/Public/API/UE/Math/Color.h create mode 100644 version/Core/Public/API/UE/Math/ColorList.h create mode 100644 version/Core/Public/API/UE/Math/IntPoint.h create mode 100644 version/Core/Public/API/UE/Math/IntVector.h create mode 100644 version/Core/Public/API/UE/Math/Quat.h create mode 100644 version/Core/Public/API/UE/Math/Rotator.h create mode 100644 version/Core/Public/API/UE/Math/UnrealMathUtility.h create mode 100644 version/Core/Public/API/UE/Math/Vector.h create mode 100644 version/Core/Public/API/UE/Math/Vector2D.h create mode 100644 version/Core/Public/API/UE/Misc/ByteSwap.h create mode 100644 version/Core/Public/API/UE/Misc/CString.h create mode 100644 version/Core/Public/API/UE/Misc/Char.h create mode 100644 version/Core/Public/API/UE/Misc/StructBuilder.h create mode 100644 version/Core/Public/API/UE/NetSerialization.h create mode 100644 version/Core/Public/API/UE/Templates/AlignmentTemplates.h create mode 100644 version/Core/Public/API/UE/Templates/AndOrNot.h create mode 100644 version/Core/Public/API/UE/Templates/AreTypesEqual.h create mode 100644 version/Core/Public/API/UE/Templates/ChooseClass.h create mode 100644 version/Core/Public/API/UE/Templates/Decay.h create mode 100644 version/Core/Public/API/UE/Templates/EnableIf.h create mode 100644 version/Core/Public/API/UE/Templates/Function.h create mode 100644 version/Core/Public/API/UE/Templates/HasGetTypeHash.h create mode 100644 version/Core/Public/API/UE/Templates/IdentityFunctor.h create mode 100644 version/Core/Public/API/UE/Templates/Invoke.h create mode 100644 version/Core/Public/API/UE/Templates/IsArithmetic.h create mode 100644 version/Core/Public/API/UE/Templates/IsContiguousContainer.h create mode 100644 version/Core/Public/API/UE/Templates/IsEnum.h create mode 100644 version/Core/Public/API/UE/Templates/IsEnumClass.h create mode 100644 version/Core/Public/API/UE/Templates/IsPODType.h create mode 100644 version/Core/Public/API/UE/Templates/IsPointer.h create mode 100644 version/Core/Public/API/UE/Templates/IsTriviallyCopyAssignable.h create mode 100644 version/Core/Public/API/UE/Templates/IsTriviallyCopyConstructible.h create mode 100644 version/Core/Public/API/UE/Templates/IsTriviallyDestructible.h create mode 100644 version/Core/Public/API/UE/Templates/Less.h create mode 100644 version/Core/Public/API/UE/Templates/MemoryOps.h create mode 100644 version/Core/Public/API/UE/Templates/PointerIsConvertibleFromTo.h create mode 100644 version/Core/Public/API/UE/Templates/RemoveCV.h create mode 100644 version/Core/Public/API/UE/Templates/RemoveReference.h create mode 100644 version/Core/Public/API/UE/Templates/ReversePredicate.h create mode 100644 version/Core/Public/API/UE/Templates/Sorting.h create mode 100644 version/Core/Public/API/UE/Templates/Tuple.h create mode 100644 version/Core/Public/API/UE/Templates/TypeCompatibleBytes.h create mode 100644 version/Core/Public/API/UE/Templates/TypeHash.h create mode 100644 version/Core/Public/API/UE/Templates/UnrealTemplate.h create mode 100644 version/Core/Public/API/UE/Templates/UnrealTypeTraits.h create mode 100644 version/Core/Public/API/UE/UE.h create mode 100644 version/Core/Public/API/UE/Windows/MicrosoftPlatformString.h create mode 100644 version/Core/Public/IApiUtils.h create mode 100644 version/Core/Public/ICommands.h create mode 100644 version/Core/Public/IHooks.h create mode 100644 version/Core/Public/Logger/Logger.h create mode 100644 version/Core/Public/Logger/spdlog/async_logger.h create mode 100644 version/Core/Public/Logger/spdlog/common.h create mode 100644 version/Core/Public/Logger/spdlog/details/async_log_helper.h create mode 100644 version/Core/Public/Logger/spdlog/details/async_logger_impl.h create mode 100644 version/Core/Public/Logger/spdlog/details/file_helper.h create mode 100644 version/Core/Public/Logger/spdlog/details/log_msg.h create mode 100644 version/Core/Public/Logger/spdlog/details/logger_impl.h create mode 100644 version/Core/Public/Logger/spdlog/details/mpmc_bounded_q.h create mode 100644 version/Core/Public/Logger/spdlog/details/null_mutex.h create mode 100644 version/Core/Public/Logger/spdlog/details/os.h create mode 100644 version/Core/Public/Logger/spdlog/details/pattern_formatter_impl.h create mode 100644 version/Core/Public/Logger/spdlog/details/registry.h create mode 100644 version/Core/Public/Logger/spdlog/details/spdlog_impl.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/container.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/format.cc create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/format.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/ostream.cc create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/ostream.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/posix.cc create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/posix.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/printf.cc create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/printf.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/string.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/bundled/time.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/fmt.h create mode 100644 version/Core/Public/Logger/spdlog/fmt/ostr.h create mode 100644 version/Core/Public/Logger/spdlog/formatter.h create mode 100644 version/Core/Public/Logger/spdlog/logger.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/android_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/ansicolor_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/base_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/dist_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/file_sinks.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/msvc_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/null_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/ostream_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/stdout_sinks.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/syslog_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/wincolor_sink.h create mode 100644 version/Core/Public/Logger/spdlog/sinks/windebug_sink.h create mode 100644 version/Core/Public/Logger/spdlog/spdlog.h create mode 100644 version/Core/Public/Logger/spdlog/tweakme.h create mode 100644 version/Core/Public/Tools.h rename {ArkApi => version}/MinHook.h (100%) create mode 100644 version/json.hpp create mode 100644 version/version.cpp create mode 100644 version/version.def create mode 100644 version/version.vcxproj create mode 100644 version/version.vcxproj.filters create mode 100644 version/version_asm.asm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..940794e --- /dev/null +++ b/.gitignore @@ -0,0 +1,288 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs diff --git a/ArkApi.sln b/ArkApi.sln deleted file mode 100644 index 7cdb4b7..0000000 --- a/ArkApi.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArkApi", "ArkApi\ArkApi.vcxproj", "{4E607BF7-3883-4BB7-9922-4FDED2B99A47}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Debug|x64.ActiveCfg = Debug|x64 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Debug|x64.Build.0 = Debug|x64 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Debug|x86.ActiveCfg = Debug|Win32 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Debug|x86.Build.0 = Debug|Win32 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Release|x64.ActiveCfg = Release|x64 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Release|x64.Build.0 = Release|x64 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Release|x86.ActiveCfg = Release|Win32 - {4E607BF7-3883-4BB7-9922-4FDED2B99A47}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ArkApi/API/Actor.h b/ArkApi/API/Actor.h deleted file mode 100644 index b40570a..0000000 --- a/ArkApi/API/Actor.h +++ /dev/null @@ -1,4798 +0,0 @@ -#pragma once - -#include "Base.h" - -struct FChatMessage -{ - FString SenderName; - FString SenderSteamName; - FString SenderTribeName; - unsigned int SenderId; - FString Message; - FString Receiver; - int SenderTeamIndex; - long double ReceivedTime; - EChatSendMode::Type SendMode; - unsigned int RadioFrequency; - EChatType::Type ChatType; - DWORD64 SenderIcon; - FString UserId; - - FChatMessage(): SenderId(0), SenderTeamIndex(0), ReceivedTime(0), SendMode(), RadioFrequency(0), ChatType(), SenderIcon(0) - { - } - - FChatMessage(FChatMessage* __that) { NativeCall((DWORD64)this, "FChatMessage", "FChatMessage", __that); } - FChatMessage* operator=(FChatMessage* __that) { return NativeCall((DWORD64)this, "FChatMessage", "operator=", __that); } -}; - -struct USceneComponent -{ -public: - FTransform GetComponentToWorldField() const { return GetNativeField(this, "USceneComponent", "ComponentToWorld"); } - void SetComponentToWorldField(FTransform newValue) { SetNativeField(this, "USceneComponent", "ComponentToWorld", newValue); } - USceneComponent* GetAttachParentField() const { return GetNativeField(this, "USceneComponent", "AttachParent"); } - void SetAttachParentField(USceneComponent* newValue) { SetNativeField(this, "USceneComponent", "AttachParent", newValue); } - FName GetAttachSocketNameField() const { return GetNativeField(this, "USceneComponent", "AttachSocketName"); } - void SetAttachSocketNameField(FName newValue) { SetNativeField(this, "USceneComponent", "AttachSocketName", newValue); } - TArray GetAttachChildrenField() const { return GetNativeField>(this, "USceneComponent", "AttachChildren"); } - void SetAttachChildrenField(TArray newValue) { SetNativeField(this, "USceneComponent", "AttachChildren", newValue); } - FVector GetRelativeLocationField() const { return GetNativeField(this, "USceneComponent", "RelativeLocation"); } - void SetRelativeLocationField(FVector newValue) { SetNativeField(this, "USceneComponent", "RelativeLocation", newValue); } - FRotator GetRelativeRotationField() const { return GetNativeField(this, "USceneComponent", "RelativeRotation"); } - void SetRelativeRotationField(FRotator newValue) { SetNativeField(this, "USceneComponent", "RelativeRotation", newValue); } - FVector GetRelativeTranslation_DEPRECATEDField() const { return GetNativeField(this, "USceneComponent", "RelativeTranslation_DEPRECATED"); } - void SetRelativeTranslation_DEPRECATEDField(FVector newValue) { SetNativeField(this, "USceneComponent", "RelativeTranslation_DEPRECATED", newValue); } - TEnumAsByte GetDetailModeField() const { return GetNativeField>(this, "USceneComponent", "DetailMode"); } - void SetDetailModeField(TEnumAsByte newValue) { SetNativeField(this, "USceneComponent", "DetailMode", newValue); } - float GetRelativeScale_DEPRECATEDField() const { return GetNativeField(this, "USceneComponent", "RelativeScale_DEPRECATED"); } - void SetRelativeScale_DEPRECATEDField(float newValue) { SetNativeField(this, "USceneComponent", "RelativeScale_DEPRECATED", newValue); } - bool GetNetUpdateTransformField() const { return GetNativeField(this, "USceneComponent", "NetUpdateTransform"); } - void SetNetUpdateTransformField(bool newValue) { SetNativeField(this, "USceneComponent", "NetUpdateTransform", newValue); } - USceneComponent* GetNetOldAttachParentField() const { return GetNativeField(this, "USceneComponent", "NetOldAttachParent"); } - void SetNetOldAttachParentField(USceneComponent* newValue) { SetNativeField(this, "USceneComponent", "NetOldAttachParent", newValue); } - FName GetNetOldAttachSocketNameField() const { return GetNativeField(this, "USceneComponent", "NetOldAttachSocketName"); } - void SetNetOldAttachSocketNameField(FName newValue) { SetNativeField(this, "USceneComponent", "NetOldAttachSocketName", newValue); } - FVector GetRelativeScale3DField() const { return GetNativeField(this, "USceneComponent", "RelativeScale3D"); } - void SetRelativeScale3DField(FVector newValue) { SetNativeField(this, "USceneComponent", "RelativeScale3D", newValue); } - FVector GetComponentVelocityField() const { return GetNativeField(this, "USceneComponent", "ComponentVelocity"); } - void SetComponentVelocityField(FVector newValue) { SetNativeField(this, "USceneComponent", "ComponentVelocity", newValue); } - - // Functions - - FVector* GetCustomLocation(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetCustomLocation", result); } - FVector* GetForwardVector(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetForwardVector", result); } - FTransform* CalcNewComponentToWorld(FTransform* result, FTransform* NewRelativeTransform, USceneComponent* Parent) { return NativeCall((DWORD64)this, "USceneComponent", "CalcNewComponentToWorld", result, NewRelativeTransform, Parent); } - void UpdateComponentToWorld(bool bSkipPhysicsMove) { NativeCall((DWORD64)this, "USceneComponent", "UpdateComponentToWorld", bSkipPhysicsMove); } - void PropagateTransformUpdate(bool bTransformChanged, bool bSkipPhysicsMove) { NativeCall((DWORD64)this, "USceneComponent", "PropagateTransformUpdate", bTransformChanged, bSkipPhysicsMove); } - void DestroyComponent() { NativeCall((DWORD64)this, "USceneComponent", "DestroyComponent"); } - void CalcBoundingCylinder(float* CylinderRadius, float* CylinderHalfHeight) { NativeCall((DWORD64)this, "USceneComponent", "CalcBoundingCylinder", CylinderRadius, CylinderHalfHeight); } - void UpdateBounds() { NativeCall((DWORD64)this, "USceneComponent", "UpdateBounds"); } - void SetRelativeLocationAndRotation() { NativeCall((DWORD64)this, "USceneComponent", "SetRelativeLocationAndRotation"); } - void AddLocalOffset() { NativeCall((DWORD64)this, "USceneComponent", "AddLocalOffset"); } - void AddLocalRotation() { NativeCall((DWORD64)this, "USceneComponent", "AddLocalRotation"); } - void AddLocalTransform(FTransform* DeltaTransform, bool bSweep) { NativeCall((DWORD64)this, "USceneComponent", "AddLocalTransform", DeltaTransform, bSweep); } - void AddWorldTransform(FTransform* DeltaTransform, bool bSweep) { NativeCall((DWORD64)this, "USceneComponent", "AddWorldTransform", DeltaTransform, bSweep); } - void SetRelativeScale3D() { NativeCall((DWORD64)this, "USceneComponent", "SetRelativeScale3D"); } - void ResetRelativeTransform() { NativeCall((DWORD64)this, "USceneComponent", "ResetRelativeTransform"); } - void SetRelativeTransform(FTransform* NewTransform, bool bSweep) { NativeCall((DWORD64)this, "USceneComponent", "SetRelativeTransform", NewTransform, bSweep); } - FTransform* GetRelativeTransform(FTransform* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetRelativeTransform", result); } - void SetWorldLocation() { NativeCall((DWORD64)this, "USceneComponent", "SetWorldLocation"); } - void SetWorldScale3D() { NativeCall((DWORD64)this, "USceneComponent", "SetWorldScale3D"); } - void SetWorldTransform(FTransform* NewTransform, bool bSweep) { NativeCall((DWORD64)this, "USceneComponent", "SetWorldTransform", NewTransform, bSweep); } - void SetWorldLocationAndRotation() { NativeCall((DWORD64)this, "USceneComponent", "SetWorldLocationAndRotation"); } - void SetWorldLocationAndRotationNoPhysics(FVector* NewLocation, FRotator* NewRotation) { NativeCall((DWORD64)this, "USceneComponent", "SetWorldLocationAndRotationNoPhysics", NewLocation, NewRotation); } - FVector* GetRightVector(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetRightVector", result); } - FVector* GetUpVector(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetUpVector", result); } - void GetParentComponents(TArray* Parents) { NativeCall *>((DWORD64)this, "USceneComponent", "GetParentComponents", Parents); } - void GetChildrenComponents(bool bIncludeAllDescendants, TArray* Children) { NativeCall *>((DWORD64)this, "USceneComponent", "GetChildrenComponents", bIncludeAllDescendants, Children); } - void AppendDescendants(TArray* Children) { NativeCall *>((DWORD64)this, "USceneComponent", "AppendDescendants", Children); } - void DetachFromParent(bool bMaintainWorldPosition) { NativeCall((DWORD64)this, "USceneComponent", "DetachFromParent", bMaintainWorldPosition); } - FVector* GetMeshScaleMultiplier(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetMeshScaleMultiplier", result); } - AActor* GetAttachmentRootActor() { return NativeCall((DWORD64)this, "USceneComponent", "GetAttachmentRootActor"); } - void UpdateChildTransforms() { NativeCall((DWORD64)this, "USceneComponent", "UpdateChildTransforms"); } - void PostInterpChange(UProperty* PropertyThatChanged) { NativeCall((DWORD64)this, "USceneComponent", "PostInterpChange", PropertyThatChanged); } - FVector* GetSocketLocation(FVector* result, FName SocketName) { return NativeCall((DWORD64)this, "USceneComponent", "GetSocketLocation", result, SocketName); } - FRotator* GetSocketRotation(FRotator* result, FName SocketName) { return NativeCall((DWORD64)this, "USceneComponent", "GetSocketRotation", result, SocketName); } - FVector* GetComponentVelocity(FVector* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetComponentVelocity", result); } - void GetSocketWorldLocationAndRotation(FName InSocketName, FVector* OutLocation, FRotator* OutRotation) { NativeCall((DWORD64)this, "USceneComponent", "GetSocketWorldLocationAndRotation", InSocketName, OutLocation, OutRotation); } - //void SetMobility(EComponentMobility::Type NewMobility) { NativeCall((DWORD64)this, "USceneComponent", "SetMobility", NewMobility); } - bool IsAnySimulatingPhysics() { return NativeCall((DWORD64)this, "USceneComponent", "IsAnySimulatingPhysics"); } - void UpdatePhysicsVolume(bool bTriggerNotifiers) { NativeCall((DWORD64)this, "USceneComponent", "UpdatePhysicsVolume", bTriggerNotifiers); } - void BeginDestroy() { NativeCall((DWORD64)this, "USceneComponent", "BeginDestroy"); } - bool InternalSetWorldLocationAndRotation() { return NativeCall((DWORD64)this, "USceneComponent", "InternalSetWorldLocationAndRotation"); } - bool IsVisibleInEditor() { return NativeCall((DWORD64)this, "USceneComponent", "IsVisibleInEditor"); } - bool ShouldRender() { return NativeCall((DWORD64)this, "USceneComponent", "ShouldRender"); } - bool CanEverRender() { return NativeCall((DWORD64)this, "USceneComponent", "CanEverRender"); } - bool IsVisible() { return NativeCall((DWORD64)this, "USceneComponent", "IsVisible"); } - void SetVisibility(bool bNewVisibility, bool bPropagateToChildren) { NativeCall((DWORD64)this, "USceneComponent", "SetVisibility", bNewVisibility, bPropagateToChildren); } - void SetHiddenInGame(bool NewHiddenGame, bool bPropagateToChildren) { NativeCall((DWORD64)this, "USceneComponent", "SetHiddenInGame", NewHiddenGame, bPropagateToChildren); } - void ApplyWorldOffset(FVector* InOffset, bool bWorldShift) { NativeCall((DWORD64)this, "USceneComponent", "ApplyWorldOffset", InOffset, bWorldShift); } - FBoxSphereBounds* GetPlacementExtent(FBoxSphereBounds* result) { return NativeCall((DWORD64)this, "USceneComponent", "GetPlacementExtent", result); } - void PreNetReceive() { NativeCall((DWORD64)this, "USceneComponent", "PreNetReceive"); } - void PostNetReceive() { NativeCall((DWORD64)this, "USceneComponent", "PostNetReceive"); } -}; - -// Actor - -struct AActor : public UObjectBaseUtility -{ -public: - float GetCustomTimeDilationField() const { return GetNativeField(this, "AActor", "CustomTimeDilation"); } - void SetCustomTimeDilationField(float newValue) { SetNativeField(this, "AActor", "CustomTimeDilation", newValue); } - float GetClientReplicationSendNowThresholdField() const { return GetNativeField(this, "AActor", "ClientReplicationSendNowThreshold"); } - void SetClientReplicationSendNowThresholdField(float newValue) { SetNativeField(this, "AActor", "ClientReplicationSendNowThreshold", newValue); } - TEnumAsByte GetRemoteRoleField() const { return GetNativeField>(this, "AActor", "RemoteRole"); } - void SetRemoteRoleField(TEnumAsByte newValue) { SetNativeField(this, "AActor", "RemoteRole", newValue); } - AActor* GetOwnerField() const { return GetNativeField(this, "AActor", "Owner"); } - long double GetLastReplicatedMovementField() const { return GetNativeField(this, "AActor", "LastReplicatedMovement"); } - void SetLastReplicatedMovementField(long double newValue) { SetNativeField(this, "AActor", "LastReplicatedMovement", newValue); } - TEnumAsByte GetRoleField() const { return GetNativeField>(this, "AActor", "Role"); } - TEnumAsByte GetNetDormancyField() const { return GetNativeField>(this, "AActor", "NetDormancy"); } - int GetDefaultStasisComponentOctreeFlagsField() const { return GetNativeField(this, "AActor", "DefaultStasisComponentOctreeFlags"); } - void SetDefaultStasisComponentOctreeFlagsField(int newValue) { SetNativeField(this, "AActor", "DefaultStasisComponentOctreeFlags", newValue); } - TArray GetNetworkSpatializationChildrenField() const { return GetNativeField>(this, "AActor", "NetworkSpatializationChildren"); } - void SetNetworkSpatializationChildrenField(TArray newValue) { SetNativeField(this, "AActor", "NetworkSpatializationChildren", newValue); } - AActor* GetNetworkSpatializationParentField() const { return GetNativeField(this, "AActor", "NetworkSpatializationParent"); } - void SetNetworkSpatializationParentField(AActor* newValue) { SetNativeField(this, "AActor", "NetworkSpatializationParent", newValue); } - float GetNetworkAndStasisRangeMultiplierField() const { return GetNativeField(this, "AActor", "NetworkAndStasisRangeMultiplier"); } - void SetNetworkAndStasisRangeMultiplierField(float newValue) { SetNativeField(this, "AActor", "NetworkAndStasisRangeMultiplier", newValue); } - float GetUnstasisLastInRangeTimeField() const { return GetNativeField(this, "AActor", "UnstasisLastInRangeTime"); } - void SetUnstasisLastInRangeTimeField(float newValue) { SetNativeField(this, "AActor", "UnstasisLastInRangeTime", newValue); } - long double GetLastPreReplicationTimeField() const { return GetNativeField(this, "AActor", "LastPreReplicationTime"); } - void SetLastPreReplicationTimeField(long double newValue) { SetNativeField(this, "AActor", "LastPreReplicationTime", newValue); } - long double GetLastEnterStasisTimeField() const { return GetNativeField(this, "AActor", "LastEnterStasisTime"); } - void SetLastEnterStasisTimeField(long double newValue) { SetNativeField(this, "AActor", "LastEnterStasisTime", newValue); } - long double GetLastExitStasisTimeField() const { return GetNativeField(this, "AActor", "LastExitStasisTime"); } - void SetLastExitStasisTimeField(long double newValue) { SetNativeField(this, "AActor", "LastExitStasisTime", newValue); } - FName GetCustomTagField() const { return GetNativeField(this, "AActor", "CustomTag"); } - void SetCustomTagField(FName newValue) { SetNativeField(this, "AActor", "CustomTag", newValue); } - int GetCustomDataField() const { return GetNativeField(this, "AActor", "CustomData"); } - void SetCustomDataField(int newValue) { SetNativeField(this, "AActor", "CustomData", newValue); } - float GetReplicationIntervalMultiplierField() const { return GetNativeField(this, "AActor", "ReplicationIntervalMultiplier"); } - void SetReplicationIntervalMultiplierField(float newValue) { SetNativeField(this, "AActor", "ReplicationIntervalMultiplier", newValue); } - int GetForceImmediateReplicationFrameField() const { return GetNativeField(this, "AActor", "ForceImmediateReplicationFrame"); } - void SetForceImmediateReplicationFrameField(int newValue) { SetNativeField(this, "AActor", "ForceImmediateReplicationFrame", newValue); } - char GetStasisSetIndexField() const { return GetNativeField(this, "AActor", "StasisSetIndex"); } - void SetStasisSetIndexField(char newValue) { SetNativeField(this, "AActor", "StasisSetIndex", newValue); } - char GetRandomStartByteField() const { return GetNativeField(this, "AActor", "RandomStartByte"); } - void SetRandomStartByteField(char newValue) { SetNativeField(this, "AActor", "RandomStartByte", newValue); } - unsigned __int64 GetLastFrameUnStasisField() const { return GetNativeField(this, "AActor", "LastFrameUnStasis"); } - void SetLastFrameUnStasisField(unsigned __int64 newValue) { SetNativeField(this, "AActor", "LastFrameUnStasis", newValue); } - volatile int GetLastUnstasisFrameCounterField() const { return GetNativeField(this, "AActor", "LastUnstasisFrameCounter"); } - void SetLastUnstasisFrameCounterField(volatile int newValue) { SetNativeField(this, "AActor", "LastUnstasisFrameCounter", newValue); } - TEnumAsByte GetInputConsumeOption_DEPRECATEDField() const { return GetNativeField>(this, "AActor", "InputConsumeOption_DEPRECATED"); } - void SetInputConsumeOption_DEPRECATEDField(TEnumAsByte newValue) { SetNativeField(this, "AActor", "InputConsumeOption_DEPRECATED", newValue); } - float GetNetCullDistanceSquaredField() const { return GetNativeField(this, "AActor", "NetCullDistanceSquared"); } - void SetNetCullDistanceSquaredField(float newValue) { SetNativeField(this, "AActor", "NetCullDistanceSquared", newValue); } - float GetNetCullDistanceSquaredDormantField() const { return GetNativeField(this, "AActor", "NetCullDistanceSquaredDormant"); } - void SetNetCullDistanceSquaredDormantField(float newValue) { SetNativeField(this, "AActor", "NetCullDistanceSquaredDormant", newValue); } - int GetNetTagField() const { return GetNativeField(this, "AActor", "NetTag"); } - void SetNetTagField(int newValue) { SetNativeField(this, "AActor", "NetTag", newValue); } - long double GetNetUpdateTimeField() const { return GetNativeField(this, "AActor", "NetUpdateTime"); } - void SetNetUpdateTimeField(long double newValue) { SetNativeField(this, "AActor", "NetUpdateTime", newValue); } - float GetNetUpdateFrequencyField() const { return GetNativeField(this, "AActor", "NetUpdateFrequency"); } - void SetNetUpdateFrequencyField(float newValue) { SetNativeField(this, "AActor", "NetUpdateFrequency", newValue); } - float GetNetPriorityField() const { return GetNativeField(this, "AActor", "NetPriority"); } - void SetNetPriorityField(float newValue) { SetNativeField(this, "AActor", "NetPriority", newValue); } - long double GetLastNetUpdateTimeField() const { return GetNativeField(this, "AActor", "LastNetUpdateTime"); } - void SetLastNetUpdateTimeField(long double newValue) { SetNativeField(this, "AActor", "LastNetUpdateTime", newValue); } - FName GetNetDriverNameField() const { return GetNativeField(this, "AActor", "NetDriverName"); } - void SetNetDriverNameField(FName newValue) { SetNativeField(this, "AActor", "NetDriverName", newValue); } - int GetTargetingTeamField() const { return GetNativeField(this, "AActor", "TargetingTeam"); } - void SetTargetingTeamField(int newValue) { SetNativeField(this, "AActor", "TargetingTeam", newValue); } - float GetOverrideStasisComponentRadiusField() const { return GetNativeField(this, "AActor", "OverrideStasisComponentRadius"); } - void SetOverrideStasisComponentRadiusField(float newValue) { SetNativeField(this, "AActor", "OverrideStasisComponentRadius", newValue); } - APawn* GetInstigatorField() const { return GetNativeField(this, "AActor", "Instigator"); } - void SetInstigatorField(APawn* newValue) { SetNativeField(this, "AActor", "Instigator", newValue); } - long double GetCreationTimeField() const { return GetNativeField(this, "AActor", "CreationTime"); } - void SetCreationTimeField(long double newValue) { SetNativeField(this, "AActor", "CreationTime", newValue); } - long double GetOriginalCreationTimeField() const { return GetNativeField(this, "AActor", "OriginalCreationTime"); } - void SetOriginalCreationTimeField(long double newValue) { SetNativeField(this, "AActor", "OriginalCreationTime", newValue); } - TArray GetChildrenField() const { return GetNativeField>(this, "AActor", "Children"); } - void SetChildrenField(TArray newValue) { SetNativeField(this, "AActor", "Children", newValue); } - unsigned int GetAnimUpdateRateShiftTagField() const { return GetNativeField(this, "AActor", "AnimUpdateRateShiftTag"); } - void SetAnimUpdateRateShiftTagField(unsigned int newValue) { SetNativeField(this, "AActor", "AnimUpdateRateShiftTag", newValue); } - unsigned int GetAnimUpdateRateFrameCountField() const { return GetNativeField(this, "AActor", "AnimUpdateRateFrameCount"); } - void SetAnimUpdateRateFrameCountField(unsigned int newValue) { SetNativeField(this, "AActor", "AnimUpdateRateFrameCount", newValue); } - USceneComponent* GetRootComponentField() const { return GetNativeField(this, "AActor", "RootComponent"); } - void SetRootComponentField(USceneComponent* newValue) { SetNativeField(this, "AActor", "RootComponent", newValue); } - float GetInitialLifeSpanField() const { return GetNativeField(this, "AActor", "InitialLifeSpan"); } - void SetInitialLifeSpanField(float newValue) { SetNativeField(this, "AActor", "InitialLifeSpan", newValue); } - TArray GetLayersField() const { return GetNativeField>(this, "AActor", "Layers"); } - void SetLayersField(TArray newValue) { SetNativeField(this, "AActor", "Layers", newValue); } - long double GetLastRenderTimeField() const { return GetNativeField(this, "AActor", "LastRenderTime"); } - void SetLastRenderTimeField(long double newValue) { SetNativeField(this, "AActor", "LastRenderTime", newValue); } - long double GetLastRenderTimeIgnoreShadowField() const { return GetNativeField(this, "AActor", "LastRenderTimeIgnoreShadow"); } - void SetLastRenderTimeIgnoreShadowField(long double newValue) { SetNativeField(this, "AActor", "LastRenderTimeIgnoreShadow", newValue); } - TArray GetTagsField() const { return GetNativeField>(this, "AActor", "Tags"); } - void SetTagsField(TArray newValue) { SetNativeField(this, "AActor", "Tags", newValue); } - FVector GetDefaultActorLocationField() const { return GetNativeField(this, "AActor", "DefaultActorLocation"); } - FGuid GetUniqueGuidIdField() const { return GetNativeField(this, "AActor", "UniqueGuidId"); } - float GetForceMaximumReplicationRateUntilTimeField() const { return GetNativeField(this, "AActor", "ForceMaximumReplicationRateUntilTime"); } - void SetForceMaximumReplicationRateUntilTimeField(float newValue) { SetNativeField(this, "AActor", "ForceMaximumReplicationRateUntilTime", newValue); } - long double GetLastActorForceReplicationTimeField() const { return GetNativeField(this, "AActor", "LastActorForceReplicationTime"); } - void SetLastActorForceReplicationTimeField(long double newValue) { SetNativeField(this, "AActor", "LastActorForceReplicationTime", newValue); } - - // Functions - - FVector* GetTargetPathfindingLocation(FVector* result, AActor* RequestedBy) { return NativeCall((DWORD64)this, "AActor", "GetTargetPathfindingLocation", result, RequestedBy); } - FVector* GetTargetingLocation(FVector* result) { return NativeCall((DWORD64)this, "AActor", "GetTargetingLocation", result); } - bool IsLevelBoundsRelevant() { return NativeCall((DWORD64)this, "AActor", "IsLevelBoundsRelevant"); } - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "AActor", "GetPrivateStaticClass"); } - void OutsideWorldBounds() { NativeCall((DWORD64)this, "AActor", "OutsideWorldBounds"); } - FString* GetHumanReadableName(FString* result) { return NativeCall((DWORD64)this, "AActor", "GetHumanReadableName", result); } - bool CheckDefaultSubobjectsInternal() { return NativeCall((DWORD64)this, "AActor", "CheckDefaultSubobjectsInternal"); } - bool CheckActorComponents() { return NativeCall((DWORD64)this, "AActor", "CheckActorComponents"); } - void ResetOwnedComponents() { NativeCall((DWORD64)this, "AActor", "ResetOwnedComponents"); } - void PostInitProperties() { NativeCall((DWORD64)this, "AActor", "PostInitProperties"); } - UWorld* GetWorld() { return NativeCall((DWORD64)this, "AActor", "GetWorld"); } - bool IsInGameplayWorld() { return NativeCall((DWORD64)this, "AActor", "IsInGameplayWorld"); } - void ClearCrossLevelReferences() { NativeCall((DWORD64)this, "AActor", "ClearCrossLevelReferences"); } - bool TeleportTo(FVector* DestLocation, FRotator* DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall((DWORD64)this, "AActor", "TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } - void AddTickPrerequisiteActor(AActor* PrerequisiteActor) { NativeCall((DWORD64)this, "AActor", "AddTickPrerequisiteActor", PrerequisiteActor); } - void RemoveTickPrerequisiteActor(AActor* PrerequisiteActor) { NativeCall((DWORD64)this, "AActor", "RemoveTickPrerequisiteActor", PrerequisiteActor); } - void BeginDestroy() { NativeCall((DWORD64)this, "AActor", "BeginDestroy"); } - bool IsReadyForFinishDestroy() { return NativeCall((DWORD64)this, "AActor", "IsReadyForFinishDestroy"); } - void PostLoad() { NativeCall((DWORD64)this, "AActor", "PostLoad"); } - void ProcessEvent(UFunction* Function, void* Parameters) { NativeCall((DWORD64)this, "AActor", "ProcessEvent", Function, Parameters); } - void RegisterActorTickFunctions(bool bRegister, bool bSaveAndRestoreTickState) { NativeCall((DWORD64)this, "AActor", "RegisterActorTickFunctions", bRegister, bSaveAndRestoreTickState); } - void RegisterAllActorTickFunctions(bool bRegister, bool bDoComponents, bool bSaveAndRestoreTickState) { NativeCall((DWORD64)this, "AActor", "RegisterAllActorTickFunctions", bRegister, bDoComponents, bSaveAndRestoreTickState); } - void SetActorTickEnabled(bool bEnabled) { NativeCall((DWORD64)this, "AActor", "SetActorTickEnabled", bEnabled); } - bool Rename(const wchar_t* InName, UObject* NewOuter, unsigned int Flags) { return NativeCall((DWORD64)this, "AActor", "Rename", InName, NewOuter, Flags); } - //UNetConnection * GetNetConnection() { return NativeCall((DWORD64)this, "AActor", "GetNetConnection"); } - UPlayer* GetNetOwningPlayer() { return NativeCall((DWORD64)this, "AActor", "GetNetOwningPlayer"); } - void GetComponentsBoundingCylinder(float* OutCollisionRadius, float* OutCollisionHalfHeight, bool bNonColliding) { NativeCall((DWORD64)this, "AActor", "GetComponentsBoundingCylinder", OutCollisionRadius, OutCollisionHalfHeight, bNonColliding); } - void GetSimpleCollisionCylinder(float* CollisionRadius, float* CollisionHalfHeight) { NativeCall((DWORD64)this, "AActor", "GetSimpleCollisionCylinder", CollisionRadius, CollisionHalfHeight); } - bool IsRootComponentCollisionRegistered() { return NativeCall((DWORD64)this, "AActor", "IsRootComponentCollisionRegistered"); } - bool IsAttachedTo(AActor* Other) { return NativeCall((DWORD64)this, "AActor", "IsAttachedTo", Other); } - bool IsBasedOnActor(AActor* Other) { return NativeCall((DWORD64)this, "AActor", "IsBasedOnActor", Other); } - bool Modify(bool bAlwaysMarkDirty) { return NativeCall((DWORD64)this, "AActor", "Modify", bAlwaysMarkDirty); } - FBox* GetComponentsBoundingBox(FBox* result, bool bNonColliding) { return NativeCall((DWORD64)this, "AActor", "GetComponentsBoundingBox", result, bNonColliding); } - FBox* GetComponentsBoundingBoxForLevelBounds(FBox* result) { return NativeCall((DWORD64)this, "AActor", "GetComponentsBoundingBoxForLevelBounds", result); } - bool CheckStillInWorld() { return NativeCall((DWORD64)this, "AActor", "CheckStillInWorld"); } - void GetOverlappingActors(TArray* OverlappingActors, UClass* ClassFilter) { NativeCall *, UClass *>((DWORD64)this, "AActor", "GetOverlappingActors", OverlappingActors, ClassFilter); } - float GetLastRenderTime(bool ignoreShadow) { return NativeCall((DWORD64)this, "AActor", "GetLastRenderTime", ignoreShadow); } - void SetOwner(AActor* NewOwner) { NativeCall((DWORD64)this, "AActor", "SetOwner", NewOwner); } - bool HasNetOwner() { return NativeCall((DWORD64)this, "AActor", "HasNetOwner"); } - void OnRep_AttachmentReplication() { NativeCall((DWORD64)this, "AActor", "OnRep_AttachmentReplication"); } - void DetachRootComponentFromParent(bool bMaintainWorldPosition) { NativeCall((DWORD64)this, "AActor", "DetachRootComponentFromParent", bMaintainWorldPosition); } - AActor* GetAttachParentActor() { return NativeCall((DWORD64)this, "AActor", "GetAttachParentActor"); } - FName* GetAttachParentSocketName(FName* result) { return NativeCall((DWORD64)this, "AActor", "GetAttachParentSocketName", result); } - void GetAttachedActors(TArray* OutActors) { NativeCall *>((DWORD64)this, "AActor", "GetAttachedActors", OutActors); } - bool ActorHasTag(FName Tag) { return NativeCall((DWORD64)this, "AActor", "ActorHasTag", Tag); } - bool IsMatineeControlled() { return NativeCall((DWORD64)this, "AActor", "IsMatineeControlled"); } - bool IsRelevancyOwnerFor(AActor* ReplicatedActor, AActor* ActorOwner, AActor* ConnectionActor) { return NativeCall((DWORD64)this, "AActor", "IsRelevancyOwnerFor", ReplicatedActor, ActorOwner, ConnectionActor); } - void PrestreamTextures(float Seconds, bool bEnableStreaming, int CinematicTextureGroups) { NativeCall((DWORD64)this, "AActor", "PrestreamTextures", Seconds, bEnableStreaming, CinematicTextureGroups); } - FTransform* GetTransform(FTransform* result) { return NativeCall((DWORD64)this, "AActor", "GetTransform", result); } - void ClearNetworkSpatializationParent() { NativeCall((DWORD64)this, "AActor", "ClearNetworkSpatializationParent"); } - void SetNetworkSpatializationParent(AActor* NewParent) { NativeCall((DWORD64)this, "AActor", "SetNetworkSpatializationParent", NewParent); } - void Destroyed() { NativeCall((DWORD64)this, "AActor", "Destroyed"); } - void MakeNoise() { NativeCall((DWORD64)this, "AActor", "MakeNoise"); } - float TakeDamage(float DamageAmount, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "AActor", "TakeDamage", DamageAmount, DamageEvent, EventInstigator, DamageCauser); } - void BecomeViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "AActor", "BecomeViewTarget", PC); } - void EndViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "AActor", "EndViewTarget", PC); } - void ForceNetRelevant() { NativeCall((DWORD64)this, "AActor", "ForceNetRelevant"); } - void InventoryItemUsed(UObject* InventoryItemObject) { NativeCall((DWORD64)this, "AActor", "InventoryItemUsed", InventoryItemObject); } - void InventoryItemDropped(UObject* InventoryItemObject) { NativeCall((DWORD64)this, "AActor", "InventoryItemDropped", InventoryItemObject); } - bool ForceAllowsInventoryUse(UObject* InventoryItemObject) { return NativeCall((DWORD64)this, "AActor", "ForceAllowsInventoryUse", InventoryItemObject); } - void DisableComponentsSimulatePhysics() { NativeCall((DWORD64)this, "AActor", "DisableComponentsSimulatePhysics"); } - void PostSpawnInitialize(FVector* SpawnLocation, FRotator* SpawnRotation, AActor* InOwner, APawn* InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction, bool bDeferBeginPlay) { NativeCall((DWORD64)this, "AActor", "PostSpawnInitialize", SpawnLocation, SpawnRotation, InOwner, InInstigator, bRemoteOwned, bNoFail, bDeferConstruction, bDeferBeginPlay); } - void FinishSpawning(FTransform* Transform, bool bIsDefaultTransform) { NativeCall((DWORD64)this, "AActor", "FinishSpawning", Transform, bIsDefaultTransform); } - void PreSave() { NativeCall((DWORD64)this, "AActor", "PreSave"); } - void PostActorConstruction() { NativeCall((DWORD64)this, "AActor", "PostActorConstruction"); } - void SetReplicates(bool bInReplicates) { NativeCall((DWORD64)this, "AActor", "SetReplicates", bInReplicates); } - void CopyRemoteRoleFrom(AActor* CopyFromActor) { NativeCall((DWORD64)this, "AActor", "CopyRemoteRoleFrom", CopyFromActor); } - void PostNetInit() { NativeCall((DWORD64)this, "AActor", "PostNetInit"); } - void BeginPlay() { NativeCall((DWORD64)this, "AActor", "BeginPlay"); } - void MatineeUpdated() { NativeCall((DWORD64)this, "AActor", "MatineeUpdated"); } - void ForceReplicateNowWithChannel() { NativeCall((DWORD64)this, "AActor", "ForceReplicateNowWithChannel"); } - void EnableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "AActor", "EnableInput", PlayerController); } - void DisableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "AActor", "DisableInput", PlayerController); } - float GetInputAxisValue(FName InputAxisName) { return NativeCall((DWORD64)this, "AActor", "GetInputAxisValue", InputAxisName); } - float GetInputAxisKeyValue() { return NativeCall((DWORD64)this, "AActor", "GetInputAxisKeyValue"); } - FVector* GetInputVectorAxisValue() { return NativeCall((DWORD64)this, "AActor", "GetInputVectorAxisValue"); } - bool SetActorLocation(FVector* NewLocation, bool bSweep) { return NativeCall((DWORD64)this, "AActor", "SetActorLocation", NewLocation, bSweep); } - bool SetActorRotation() { return NativeCall((DWORD64)this, "AActor", "SetActorRotation"); } - bool SetActorLocationAndRotation() { return NativeCall((DWORD64)this, "AActor", "SetActorLocationAndRotation"); } - void SetActorScale3D(FVector* NewScale3D) { NativeCall((DWORD64)this, "AActor", "SetActorScale3D", NewScale3D); } - void SetActorRelativeScale3D() { NativeCall((DWORD64)this, "AActor", "SetActorRelativeScale3D"); } - void SetActorHiddenInGame(bool bNewHidden) { NativeCall((DWORD64)this, "AActor", "SetActorHiddenInGame", bNewHidden); } - void SetActorEnableCollision(bool bNewActorEnableCollision) { NativeCall((DWORD64)this, "AActor", "SetActorEnableCollision", bNewActorEnableCollision); } - bool Destroy(bool bNetForce, bool bShouldModifyLevel) { return NativeCall((DWORD64)this, "AActor", "Destroy", bNetForce, bShouldModifyLevel); } - bool SetRootComponent(USceneComponent* NewRootComponent) { return NativeCall((DWORD64)this, "AActor", "SetRootComponent", NewRootComponent); } - FVector* GetActorForwardVector(FVector* result) { return NativeCall((DWORD64)this, "AActor", "GetActorForwardVector", result); } - FVector* GetActorUpVector(FVector* result) { return NativeCall((DWORD64)this, "AActor", "GetActorUpVector", result); } - FVector* GetActorRightVector(FVector* result) { return NativeCall((DWORD64)this, "AActor", "GetActorRightVector", result); } - void GetActorBounds(bool bOnlyCollidingComponents, FVector* Origin, FVector* BoxExtent) { NativeCall((DWORD64)this, "AActor", "GetActorBounds", bOnlyCollidingComponents, Origin, BoxExtent); } - //void PlaySoundOnActor(USoundCue * InSoundCue, float VolumeMultiplier, float PitchMultiplier) { NativeCall((DWORD64)this, "AActor", "PlaySoundOnActor", InSoundCue, VolumeMultiplier, PitchMultiplier); } - void PlaySoundAtLocation() { NativeCall((DWORD64)this, "AActor", "PlaySoundAtLocation"); } - void UnregisterAllComponents() { NativeCall((DWORD64)this, "AActor", "UnregisterAllComponents"); } - void RegisterAllComponents() { NativeCall((DWORD64)this, "AActor", "RegisterAllComponents"); } - void MarkComponentsAsPendingKill() { NativeCall((DWORD64)this, "AActor", "MarkComponentsAsPendingKill"); } - void ReregisterAllComponents() { NativeCall((DWORD64)this, "AActor", "ReregisterAllComponents"); } - void MarkComponentsRenderStateDirty() { NativeCall((DWORD64)this, "AActor", "MarkComponentsRenderStateDirty"); } - void InitializeComponents() { NativeCall((DWORD64)this, "AActor", "InitializeComponents"); } - void UninitializeComponents() { NativeCall((DWORD64)this, "AActor", "UninitializeComponents"); } - void InvalidateLightingCacheDetailed(bool bTranslationOnly) { NativeCall((DWORD64)this, "AActor", "InvalidateLightingCacheDetailed", bTranslationOnly); } - void SetLifeSpan(float InLifespan) { NativeCall((DWORD64)this, "AActor", "SetLifeSpan", InLifespan); } - float GetLifeSpan() { return NativeCall((DWORD64)this, "AActor", "GetLifeSpan"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AActor", "PostInitializeComponents"); } - void Stasis() { NativeCall((DWORD64)this, "AActor", "Stasis"); } - void Unstasis() { NativeCall((DWORD64)this, "AActor", "Unstasis"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "AActor", "PreInitializeComponents"); } - float GetDistanceTo(AActor* OtherActor) { return NativeCall((DWORD64)this, "AActor", "GetDistanceTo", OtherActor); } - float GetHorizontalDistanceTo(AActor* OtherActor) { return NativeCall((DWORD64)this, "AActor", "GetHorizontalDistanceTo", OtherActor); } - float GetVerticalDistanceTo(AActor* OtherActor) { return NativeCall((DWORD64)this, "AActor", "GetVerticalDistanceTo", OtherActor); } - float GetDotProductTo(AActor* OtherActor) { return NativeCall((DWORD64)this, "AActor", "GetDotProductTo", OtherActor); } - float GetHorizontalDotProductTo(AActor* OtherActor) { return NativeCall((DWORD64)this, "AActor", "GetHorizontalDotProductTo", OtherActor); } - APlayerController* GetOwnerController() { return NativeCall((DWORD64)this, "AActor", "GetOwnerController"); } - bool AlwaysReplicatePropertyConditional(UProperty* forProperty) { return NativeCall((DWORD64)this, "AActor", "AlwaysReplicatePropertyConditional", forProperty); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "AActor", "TryMultiUse", ForPC, UseIndex); } - void ChangeActorTeam(int NewTeam) { NativeCall((DWORD64)this, "AActor", "ChangeActorTeam", NewTeam); } - bool AllowSaving() { return NativeCall((DWORD64)this, "AActor", "AllowSaving"); } - bool GetIsMapActor() { return NativeCall((DWORD64)this, "AActor", "GetIsMapActor"); } - bool IsOwnedOrControlledBy(AActor* TestOwner) { return NativeCall((DWORD64)this, "AActor", "IsOwnedOrControlledBy", TestOwner); } - void ResetPropertiesForConstruction() { NativeCall((DWORD64)this, "AActor", "ResetPropertiesForConstruction"); } - void DestroyConstructedComponents() { NativeCall((DWORD64)this, "AActor", "DestroyConstructedComponents"); } - void RerunConstructionScripts() { NativeCall((DWORD64)this, "AActor", "RerunConstructionScripts"); } - void PreNetReceive() { NativeCall((DWORD64)this, "AActor", "PreNetReceive"); } - void PostNetReceive() { NativeCall((DWORD64)this, "AActor", "PostNetReceive"); } - void OnRep_ReplicatedMovement() { NativeCall((DWORD64)this, "AActor", "OnRep_ReplicatedMovement"); } - void PostNetReceiveLocationAndRotation() { NativeCall((DWORD64)this, "AActor", "PostNetReceiveLocationAndRotation"); } - void PostNetReceivePhysicState() { NativeCall((DWORD64)this, "AActor", "PostNetReceivePhysicState"); } - bool IsNetRelevantFor(APlayerController* RealViewer, AActor* Viewer, FVector* SrcLocation) { return NativeCall((DWORD64)this, "AActor", "IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } - void GetSubobjectsWithStableNamesForNetworking(TArray* ObjList) { NativeCall *>((DWORD64)this, "AActor", "GetSubobjectsWithStableNamesForNetworking", ObjList); } - void OnSubobjectCreatedFromReplication(UObject* NewSubobject) { NativeCall((DWORD64)this, "AActor", "OnSubobjectCreatedFromReplication", NewSubobject); } - void OnSubobjectDestroyFromReplication(UObject* NewSubobject) { NativeCall((DWORD64)this, "AActor", "OnSubobjectDestroyFromReplication", NewSubobject); } - bool IsNameStableForNetworking() { return NativeCall((DWORD64)this, "AActor", "IsNameStableForNetworking"); } - void GatherCurrentMovement() { NativeCall((DWORD64)this, "AActor", "GatherCurrentMovement"); } - void ForceReplicateNow(bool bForceCreateChannel, bool bForceCreateChannelIfRelevant) { NativeCall((DWORD64)this, "AActor", "ForceReplicateNow", bForceCreateChannel, bForceCreateChannelIfRelevant); } - void ForceNetUpdate(bool bDormantDontReplicateProperties) { NativeCall((DWORD64)this, "AActor", "ForceNetUpdate", bDormantDontReplicateProperties); } - bool BPForceAllowsInventoryUse(UObject* InventoryItemObject) { return NativeCall((DWORD64)this, "AActor", "BPForceAllowsInventoryUse", InventoryItemObject); } - void BPInventoryItemDropped(UObject* InventoryItemObject) { NativeCall((DWORD64)this, "AActor", "BPInventoryItemDropped", InventoryItemObject); } - void BPInventoryItemUsed(UObject* InventoryItemObject) { NativeCall((DWORD64)this, "AActor", "BPInventoryItemUsed", InventoryItemObject); } - void K2_OnBecomeViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "AActor", "K2_OnBecomeViewTarget", PC); } - void K2_OnEndViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "AActor", "K2_OnEndViewTarget", PC); } - void ReceiveActorBeginCursorOver() { NativeCall((DWORD64)this, "AActor", "ReceiveActorBeginCursorOver"); } - void ReceiveActorBeginOverlap(AActor* OtherActor) { NativeCall((DWORD64)this, "AActor", "ReceiveActorBeginOverlap", OtherActor); } - void ReceiveActorEndCursorOver() { NativeCall((DWORD64)this, "AActor", "ReceiveActorEndCursorOver"); } - void ReceiveActorEndOverlap(AActor* OtherActor) { NativeCall((DWORD64)this, "AActor", "ReceiveActorEndOverlap", OtherActor); } - void ReceiveActorOnClicked() { NativeCall((DWORD64)this, "AActor", "ReceiveActorOnClicked"); } - void ReceiveActorOnReleased() { NativeCall((DWORD64)this, "AActor", "ReceiveActorOnReleased"); } - void ReceiveAnyDamage(float Damage, UDamageType* DamageType, AController* InstigatedBy, AActor* DamageCauser) { NativeCall((DWORD64)this, "AActor", "ReceiveAnyDamage", Damage, DamageType, InstigatedBy, DamageCauser); } - void ReceiveBeginPlay() { NativeCall((DWORD64)this, "AActor", "ReceiveBeginPlay"); } - void ReceiveDestroyed() { NativeCall((DWORD64)this, "AActor", "ReceiveDestroyed"); } - void ReceiveHit() { NativeCall((DWORD64)this, "AActor", "ReceiveHit"); } - void ReceiveInput() { NativeCall((DWORD64)this, "AActor", "ReceiveInput"); } - void ReceivePointDamage() { NativeCall((DWORD64)this, "AActor", "ReceivePointDamage"); } - void ReceiveRadialDamage() { NativeCall((DWORD64)this, "AActor", "ReceiveRadialDamage"); } - void ReceiveTick(float DeltaSeconds) { NativeCall((DWORD64)this, "AActor", "ReceiveTick", DeltaSeconds); } - void RecieveMatineeUpdated() { NativeCall((DWORD64)this, "AActor", "RecieveMatineeUpdated"); } - void UserConstructionScript() { NativeCall((DWORD64)this, "AActor", "UserConstructionScript"); } -}; - -struct APawn : public AActor -{ -public: - float GetBaseEyeHeightField() const { return GetNativeField(this, "APawn", "BaseEyeHeight"); } - void SetBaseEyeHeightField(float newValue) { SetNativeField(this, "APawn", "BaseEyeHeight", newValue); } - TSubclassOf GetAIControllerClassField() const { return GetNativeField>(this, "APawn", "AIControllerClass"); } - void SetAIControllerClassField(TSubclassOf newValue) { SetNativeField(this, "APawn", "AIControllerClass", newValue); } - APlayerState* GetPlayerStateField() const { return GetNativeField(this, "APawn", "PlayerState"); } - void SetPlayerStateField(APlayerState* newValue) { SetNativeField(this, "APawn", "PlayerState", newValue); } - char GetRemoteViewPitchField() const { return GetNativeField(this, "APawn", "RemoteViewPitch"); } - void SetRemoteViewPitchField(char newValue) { SetNativeField(this, "APawn", "RemoteViewPitch", newValue); } - AController* GetLastHitByField() const { return GetNativeField(this, "APawn", "LastHitBy"); } - void SetLastHitByField(AController* newValue) { SetNativeField(this, "APawn", "LastHitBy", newValue); } - AController* GetControllerField() const { return GetNativeField(this, "APawn", "Controller"); } - void SetControllerField(AController* newValue) { SetNativeField(this, "APawn", "Controller", newValue); } - bool GetbClearOnConsumeField() const { return GetNativeField(this, "APawn", "bClearOnConsume"); } - void SetbClearOnConsumeField(bool newValue) { SetNativeField(this, "APawn", "bClearOnConsume", newValue); } - FVector GetControlInputVectorField() const { return GetNativeField(this, "APawn", "ControlInputVector"); } - void SetControlInputVectorField(FVector newValue) { SetNativeField(this, "APawn", "ControlInputVector", newValue); } - FVector GetLastControlInputVectorField() const { return GetNativeField(this, "APawn", "LastControlInputVector"); } - void SetLastControlInputVectorField(FVector newValue) { SetNativeField(this, "APawn", "LastControlInputVector", newValue); } - - // Functions - - FVector* GetNavAgentLocation(FVector* result) { return NativeCall((DWORD64)this, "APawn", "GetNavAgentLocation", result); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "APawn", "PreInitializeComponents"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APawn", "PostInitializeComponents"); } - void PostLoad() { NativeCall((DWORD64)this, "APawn", "PostLoad"); } - void PostRegisterAllComponents() { NativeCall((DWORD64)this, "APawn", "PostRegisterAllComponents"); } - void UpdateNavAgent() { NativeCall((DWORD64)this, "APawn", "UpdateNavAgent"); } - FVector* GetVelocity(FVector* result, bool bIsForRagdoll) { return NativeCall((DWORD64)this, "APawn", "GetVelocity", result, bIsForRagdoll); } - bool IsLocallyControlled() { return NativeCall((DWORD64)this, "APawn", "IsLocallyControlled"); } - bool ReachedDesiredRotation() { return NativeCall((DWORD64)this, "APawn", "ReachedDesiredRotation"); } - float GetDefaultHalfHeight() { return NativeCall((DWORD64)this, "APawn", "GetDefaultHalfHeight"); } - bool ShouldTickIfViewportsOnly() { return NativeCall((DWORD64)this, "APawn", "ShouldTickIfViewportsOnly"); } - FVector* GetPawnViewLocation(FVector* result, bool bAllTransforms) { return NativeCall((DWORD64)this, "APawn", "GetPawnViewLocation", result, bAllTransforms); } - FRotator* GetViewRotation(FRotator* result) { return NativeCall((DWORD64)this, "APawn", "GetViewRotation", result); } - void SpawnDefaultController() { NativeCall((DWORD64)this, "APawn", "SpawnDefaultController"); } - void TurnOff() { NativeCall((DWORD64)this, "APawn", "TurnOff"); } - void BecomeViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "APawn", "BecomeViewTarget", PC); } - void PawnClientRestart() { NativeCall((DWORD64)this, "APawn", "PawnClientRestart"); } - void Destroyed() { NativeCall((DWORD64)this, "APawn", "Destroyed"); } - bool ShouldTakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APawn", "ShouldTakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - float TakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APawn", "TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - FRotator* GetControlRotation(FRotator* result) { return NativeCall((DWORD64)this, "APawn", "GetControlRotation", result); } - void OnRep_Controller() { NativeCall((DWORD64)this, "APawn", "OnRep_Controller"); } - void PossessedBy(AController* NewController) { NativeCall((DWORD64)this, "APawn", "PossessedBy", NewController); } - void UnPossessed() { NativeCall((DWORD64)this, "APawn", "UnPossessed"); } - UPlayer* GetNetOwningPlayer() { return NativeCall((DWORD64)this, "APawn", "GetNetOwningPlayer"); } - void DestroyPlayerInputComponent() { NativeCall((DWORD64)this, "APawn", "DestroyPlayerInputComponent"); } - bool IsMoveInputIgnored() { return NativeCall((DWORD64)this, "APawn", "IsMoveInputIgnored"); } - void AddMovementInput() { NativeCall((DWORD64)this, "APawn", "AddMovementInput"); } - FVector* ConsumeMovementInputVector(FVector* result) { return NativeCall((DWORD64)this, "APawn", "ConsumeMovementInputVector", result); } - void Internal_AddMovementInput() { NativeCall((DWORD64)this, "APawn", "Internal_AddMovementInput"); } - void PostInputProcessed() { NativeCall((DWORD64)this, "APawn", "PostInputProcessed"); } - FVector* Internal_ConsumeMovementInputVector(FVector* result) { return NativeCall((DWORD64)this, "APawn", "Internal_ConsumeMovementInputVector", result); } - void AddControllerPitchInput(float Val) { NativeCall((DWORD64)this, "APawn", "AddControllerPitchInput", Val); } - void AddControllerYawInput(float Val) { NativeCall((DWORD64)this, "APawn", "AddControllerYawInput", Val); } - void AddControllerRollInput(float Val) { NativeCall((DWORD64)this, "APawn", "AddControllerRollInput", Val); } - void Restart() { NativeCall((DWORD64)this, "APawn", "Restart"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "APawn", "Tick", DeltaSeconds); } - void RecalculateBaseEyeHeight() { NativeCall((DWORD64)this, "APawn", "RecalculateBaseEyeHeight"); } - void Reset() { NativeCall((DWORD64)this, "APawn", "Reset"); } - FString* GetHumanReadableName(FString* result) { return NativeCall((DWORD64)this, "APawn", "GetHumanReadableName", result); } - void GetActorEyesViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "APawn", "GetActorEyesViewPoint", out_Location, out_Rotation); } - FRotator* GetBaseAimRotation(FRotator* result) { return NativeCall((DWORD64)this, "APawn", "GetBaseAimRotation", result); } - bool InFreeCam() { return NativeCall((DWORD64)this, "APawn", "InFreeCam"); } - void OutsideWorldBounds() { NativeCall((DWORD64)this, "APawn", "OutsideWorldBounds"); } - void ClientSetRotation() { NativeCall((DWORD64)this, "APawn", "ClientSetRotation"); } - void FaceRotation() { NativeCall((DWORD64)this, "APawn", "FaceRotation"); } - void DetachFromControllerPendingDestroy() { NativeCall((DWORD64)this, "APawn", "DetachFromControllerPendingDestroy"); } - AController* GetDamageInstigator(AController* InstigatedBy, UDamageType* DamageType) { return NativeCall((DWORD64)this, "APawn", "GetDamageInstigator", InstigatedBy, DamageType); } - void EnableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "APawn", "EnableInput", PlayerController); } - void DisableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "APawn", "DisableInput", PlayerController); } - bool IsWalking() { return NativeCall((DWORD64)this, "APawn", "IsWalking"); } - bool IsFalling() { return NativeCall((DWORD64)this, "APawn", "IsFalling"); } - bool IsCrouched() { return NativeCall((DWORD64)this, "APawn", "IsCrouched"); } - void PostNetReceiveVelocity(FVector* NewVelocity) { NativeCall((DWORD64)this, "APawn", "PostNetReceiveVelocity", NewVelocity); } - void PostNetReceiveLocationAndRotation() { NativeCall((DWORD64)this, "APawn", "PostNetReceiveLocationAndRotation"); } - bool IsBasedOnActor(AActor* Other) { return NativeCall((DWORD64)this, "APawn", "IsBasedOnActor", Other); } - bool IsNetRelevantFor(APlayerController* RealViewer, AActor* Viewer, FVector* SrcLocation) { return NativeCall((DWORD64)this, "APawn", "IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } - void PawnMakeNoise() { NativeCall((DWORD64)this, "APawn", "PawnMakeNoise"); } - APlayerController* GetOwnerController() { return NativeCall((DWORD64)this, "APawn", "GetOwnerController"); } - AController* GetCharacterController() { return NativeCall((DWORD64)this, "APawn", "GetCharacterController"); } -}; - -// Cheat Managers - -struct UCheatManager -{ - void FreezeFrame(float delay) { NativeCall((DWORD64)this, "UCheatManager", "FreezeFrame", delay); } - void Teleport() { NativeCall((DWORD64)this, "UCheatManager", "Teleport"); } - void ChangeSize(float F) { NativeCall((DWORD64)this, "UCheatManager", "ChangeSize", F); } - void Fly() { NativeCall((DWORD64)this, "UCheatManager", "Fly"); } - void Walk() { NativeCall((DWORD64)this, "UCheatManager", "Walk"); } - void Ghost() { NativeCall((DWORD64)this, "UCheatManager", "Ghost"); } - void God() { NativeCall((DWORD64)this, "UCheatManager", "God"); } - void Slomo(float T) { NativeCall((DWORD64)this, "UCheatManager", "Slomo", T); } - void DamageTarget(float DamageAmount) { NativeCall((DWORD64)this, "UCheatManager", "DamageTarget", DamageAmount); } - void DestroyTarget() { NativeCall((DWORD64)this, "UCheatManager", "DestroyTarget"); } - void DestroyAll(TSubclassOf aClass) { NativeCall>((DWORD64)this, "UCheatManager", "DestroyAll", aClass); } - void DestroyPawns(TSubclassOf aClass) { NativeCall>((DWORD64)this, "UCheatManager", "DestroyPawns", aClass); } - void Summon(FString* ClassName) { NativeCall((DWORD64)this, "UCheatManager", "Summon", ClassName); } - void PlayersOnly() { NativeCall((DWORD64)this, "UCheatManager", "PlayersOnly"); } - void ViewSelf() { NativeCall((DWORD64)this, "UCheatManager", "ViewSelf"); } - void ViewPlayer(FString* S) { NativeCall((DWORD64)this, "UCheatManager", "ViewPlayer", S); } - void ViewActor(FName ActorName) { NativeCall((DWORD64)this, "UCheatManager", "ViewActor", ActorName); } - void SetLevelStreamingStatus(FName PackageName, bool bShouldBeLoaded, bool bShouldBeVisible) { NativeCall((DWORD64)this, "UCheatManager", "SetLevelStreamingStatus", PackageName, bShouldBeLoaded, bShouldBeVisible); } - void StreamLevelIn(FName PackageName) { NativeCall((DWORD64)this, "UCheatManager", "StreamLevelIn", PackageName); } - void OnlyLoadLevel(FName PackageName) { NativeCall((DWORD64)this, "UCheatManager", "OnlyLoadLevel", PackageName); } - void StreamLevelOut(FName PackageName) { NativeCall((DWORD64)this, "UCheatManager", "StreamLevelOut", PackageName); } - void ToggleDebugCamera() { NativeCall((DWORD64)this, "UCheatManager", "ToggleDebugCamera"); } - void EnableDebugCamera() { NativeCall((DWORD64)this, "UCheatManager", "EnableDebugCamera"); } - void DisableDebugCamera() { NativeCall((DWORD64)this, "UCheatManager", "DisableDebugCamera"); } - void DebugCapsuleSweep() { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweep"); } - void DebugCapsuleSweepSize(float HalfHeight, float Radius) { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweepSize", HalfHeight, Radius); } - void DebugCapsuleSweepComplex(bool bTraceComplex) { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweepComplex", bTraceComplex); } - void DebugCapsuleSweepCapture() { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweepCapture"); } - void DebugCapsuleSweepPawn() { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweepPawn"); } - void DebugCapsuleSweepClear() { NativeCall((DWORD64)this, "UCheatManager", "DebugCapsuleSweepClear"); } - void TestCollisionDistance() { NativeCall((DWORD64)this, "UCheatManager", "TestCollisionDistance"); } - void WidgetReflector() { NativeCall((DWORD64)this, "UCheatManager", "WidgetReflector"); } - void RebuildNavigation() { NativeCall((DWORD64)this, "UCheatManager", "RebuildNavigation"); } - void DumpOnlineSessionState() { NativeCall((DWORD64)this, "UCheatManager", "DumpOnlineSessionState"); } - void DumpVoiceMutingState() { NativeCall((DWORD64)this, "UCheatManager", "DumpVoiceMutingState"); } - UWorld* GetWorld() { return NativeCall((DWORD64)this, "UCheatManager", "GetWorld"); } - void BugItGo(float X, float Y, float Z, float Pitch, float Yaw, float Roll) { NativeCall((DWORD64)this, "UCheatManager", "BugItGo", X, Y, Z, Pitch, Yaw, Roll); } - void BugItGoString(FString* TheLocation, FString* TheRotation) { NativeCall((DWORD64)this, "UCheatManager", "BugItGoString", TheLocation, TheRotation); } - void BugItWorker() { NativeCall((DWORD64)this, "UCheatManager", "BugItWorker"); } - void BugIt(FString* ScreenShotDescription) { NativeCall((DWORD64)this, "UCheatManager", "BugIt", ScreenShotDescription); } - void BugItStringCreator() { NativeCall((DWORD64)this, "UCheatManager", "BugItStringCreator"); } - void FlushLog() { NativeCall((DWORD64)this, "UCheatManager", "FlushLog"); } - void LogLoc() { NativeCall((DWORD64)this, "UCheatManager", "LogLoc"); } - void SetWorldOrigin() { NativeCall((DWORD64)this, "UCheatManager", "SetWorldOrigin"); } - void ServerToggleAILogging() { NativeCall((DWORD64)this, "UCheatManager", "ServerToggleAILogging"); } -}; - -struct UShooterCheatManager : UCheatManager -{ - bool GetbIsRCONCheatManagerField() const { return GetNativeField(this, "UShooterCheatManager", "bIsRCONCheatManager"); } - void SetbIsRCONCheatManagerField(bool newValue) { SetNativeField(this, "UShooterCheatManager", "bIsRCONCheatManager", newValue); } - AShooterPlayerController* GetMyPCField() const { return GetNativeField(this, "UShooterCheatManager", "MyPC"); } - - // Functions - - void TakeAllStructure() { NativeCall((DWORD64)this, "UShooterCheatManager", "TakeAllStructure"); } - void TakeAllDino() { NativeCall((DWORD64)this, "UShooterCheatManager", "TakeAllDino"); } - void GMBuff() { NativeCall((DWORD64)this, "UShooterCheatManager", "GMBuff"); } - void GMSummon(FString* ClassName, int Level) { NativeCall((DWORD64)this, "UShooterCheatManager", "GMSummon", ClassName, Level); } - void AllowPlayerToJoinNoCheck(FString* SteamId) { NativeCall((DWORD64)this, "UShooterCheatManager", "AllowPlayerToJoinNoCheck", SteamId); } - void RenameTribe(FString* TribeName, FString* NewName) { NativeCall((DWORD64)this, "UShooterCheatManager", "RenameTribe", TribeName, NewName); } - void RenamePlayer(FString* PlayerName, FString* NewName) { NativeCall((DWORD64)this, "UShooterCheatManager", "RenamePlayer", PlayerName, NewName); } - void DestroyActors(FString* ClassName) { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyActors", ClassName); } - void StartSaveBackup() { NativeCall((DWORD64)this, "UShooterCheatManager", "StartSaveBackup"); } - void DoExit() { NativeCall((DWORD64)this, "UShooterCheatManager", "DoExit"); } - void OpenMap(FString* MapName) { NativeCall((DWORD64)this, "UShooterCheatManager", "OpenMap", MapName); } - void DoRestartLevel() { NativeCall((DWORD64)this, "UShooterCheatManager", "DoRestartLevel"); } - void SetGlobalPause(bool bIsPaused) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetGlobalPause", bIsPaused); } - void DisallowPlayerToJoinNoCheck(FString* SteamId) { NativeCall((DWORD64)this, "UShooterCheatManager", "DisallowPlayerToJoinNoCheck", SteamId); } - void GiveExpToPlayer(__int64 PlayerID, float HowMuch, bool fromTribeShare, bool bPreventSharingWithTribe) { NativeCall((DWORD64)this, "UShooterCheatManager", "GiveExpToPlayer", PlayerID, HowMuch, fromTribeShare, bPreventSharingWithTribe); } - void DestroyMyTarget() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyMyTarget"); } - void SetTargetDinoColor(int ColorRegion, int ColorID) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetTargetDinoColor", ColorRegion, ColorID); } - void Kill() { NativeCall((DWORD64)this, "UShooterCheatManager", "Kill"); } - void KillPlayer(__int64 PlayerID) { NativeCall((DWORD64)this, "UShooterCheatManager", "KillPlayer", PlayerID); } - void TeleportPlayerIDToMe(__int64 PlayerID) { NativeCall((DWORD64)this, "UShooterCheatManager", "TeleportPlayerIDToMe", PlayerID); } - void TeleportPlayerNameToMe(FString* PlayerName) { NativeCall((DWORD64)this, "UShooterCheatManager", "TeleportPlayerNameToMe", PlayerName); } - void TeleportToPlayer(__int64 PlayerID) { NativeCall((DWORD64)this, "UShooterCheatManager", "TeleportToPlayer", PlayerID); } - void DestroyTribePlayers() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyTribePlayers"); } - void DestroyTribeDinos() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyTribeDinos"); } - void DestroyTribeStructures() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyTribeStructures"); } - void ForcePlayerToJoinTargetTribe(__int64 PlayerID) { NativeCall((DWORD64)this, "UShooterCheatManager", "ForcePlayerToJoinTargetTribe", PlayerID); } - void ForcePlayerToJoinTribe() { NativeCall((DWORD64)this, "UShooterCheatManager", "ForcePlayerToJoinTribe"); } - void SpawnActorTamed(FString* blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset) { NativeCall((DWORD64)this, "UShooterCheatManager", "SpawnActorTamed", blueprintPath, spawnDistance, spawnYOffset, ZOffset); } - AActor* DoSummon(FString* ClassName) { return NativeCall((DWORD64)this, "UShooterCheatManager", "DoSummon", ClassName); } - void Summon(FString* ClassName) { NativeCall((DWORD64)this, "UShooterCheatManager", "Summon", ClassName); } - void SummonTamed(FString* ClassName) { NativeCall((DWORD64)this, "UShooterCheatManager", "SummonTamed", ClassName); } - void EnableCheats() { NativeCall((DWORD64)this, "UShooterCheatManager", "EnableCheats"); } - void BanPlayer() { NativeCall((DWORD64)this, "UShooterCheatManager", "BanPlayer"); } - void UnbanPlayer() { NativeCall((DWORD64)this, "UShooterCheatManager", "UnbanPlayer"); } - void KickPlayer() { NativeCall((DWORD64)this, "UShooterCheatManager", "KickPlayer"); } - void Suicide() { NativeCall((DWORD64)this, "UShooterCheatManager", "Suicide"); } - void ForceTame() { NativeCall((DWORD64)this, "UShooterCheatManager", "ForceTame"); } - void SetImprintQuality(float ImprintQuality) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetImprintQuality", ImprintQuality); } - void DoTame() { NativeCall((DWORD64)this, "UShooterCheatManager", "DoTame"); } - void GiveToMe() { NativeCall((DWORD64)this, "UShooterCheatManager", "GiveToMe"); } - void GiveAllStructure() { NativeCall((DWORD64)this, "UShooterCheatManager", "GiveAllStructure"); } - void SetTargetPlayerBodyVal(int BodyValIndex, float BodyVal) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetTargetPlayerBodyVal", BodyValIndex, BodyVal); } - void SetTargetPlayerColorVal(int ColorValIndex, float ColorVal) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetTargetPlayerColorVal", ColorValIndex, ColorVal); } - void SetBabyAge(float AgeValue) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetBabyAge", AgeValue); } - void ListPlayers() { NativeCall((DWORD64)this, "UShooterCheatManager", "ListPlayers"); } - void EnemyInVisible(bool Invisible) { NativeCall((DWORD64)this, "UShooterCheatManager", "EnemyInVisible", Invisible); } - void AddItemToAllClustersInventory() { NativeCall((DWORD64)this, "UShooterCheatManager", "AddItemToAllClustersInventory"); } - void GiveItemToPlayer(int playerID, FString* blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { NativeCall((DWORD64)this, "UShooterCheatManager", "GiveItemToPlayer", playerID, blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); } - void GiveItemNumToPlayer(int playerID, int masterIndexNum, int quantityOverride, float qualityOverride, bool bForceBlueprint) { NativeCall((DWORD64)this, "UShooterCheatManager", "GiveItemNumToPlayer", playerID, masterIndexNum, quantityOverride, qualityOverride, bForceBlueprint); } - void ClearPlayerInventory(int playerID, bool bClearInventory, bool bClearSlotItems, bool bClearEquippedItems) { NativeCall((DWORD64)this, "UShooterCheatManager", "ClearPlayerInventory", playerID, bClearInventory, bClearSlotItems, bClearEquippedItems); } - void DestroyAllEnemies() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyAllEnemies"); } - void DestroyWildDinos() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyWildDinos"); } - void DestroyStructures() { NativeCall((DWORD64)this, "UShooterCheatManager", "DestroyStructures"); } - void PrintActorLocation(FString* ActorName) { NativeCall((DWORD64)this, "UShooterCheatManager", "PrintActorLocation", ActorName); } - void TeleportToActorLocation(FString* ActorName) { NativeCall((DWORD64)this, "UShooterCheatManager", "TeleportToActorLocation", ActorName); } - void ServerChat(FString* MessageText) { NativeCall((DWORD64)this, "UShooterCheatManager", "ServerChat", MessageText); } - AShooterPlayerController* FindPlayerControllerFromPlayerID(__int64 PlayerID) { return NativeCall((DWORD64)this, "UShooterCheatManager", "FindPlayerControllerFromPlayerID", PlayerID); } - void GameCommand(FString* TheCommand) { NativeCall((DWORD64)this, "UShooterCheatManager", "GameCommand", TheCommand); } - void ScriptCommand(FString* commandString) { NativeCall((DWORD64)this, "UShooterCheatManager", "ScriptCommand", commandString); } - void RemoveTribeAdmin() { NativeCall((DWORD64)this, "UShooterCheatManager", "RemoveTribeAdmin"); } - void MakeTribeFounder() { NativeCall((DWORD64)this, "UShooterCheatManager", "MakeTribeFounder"); } - void VisualizeWorld() { NativeCall((DWORD64)this, "UShooterCheatManager", "VisualizeWorld"); } - void VisualizeWorldGeo() { NativeCall((DWORD64)this, "UShooterCheatManager", "VisualizeWorldGeo"); } - void UnlockEngram(FString* ItemClassName) { NativeCall((DWORD64)this, "UShooterCheatManager", "UnlockEngram", ItemClassName); } - void SetHeadHairPercent(float thePercent) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetHeadHairPercent", thePercent); } - void SetFacialHairPercent(float thePercent) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetFacialHairPercent", thePercent); } - void SetHeadHairstyle(int hairStyleIndex) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetHeadHairstyle", hairStyleIndex); } - void SetFacialHairstyle(int hairStyleIndex) { NativeCall((DWORD64)this, "UShooterCheatManager", "SetFacialHairstyle", hairStyleIndex); } - void PrintMessageOut(FString* Msg) { NativeCall((DWORD64)this, "UShooterCheatManager", "PrintMessageOut", Msg); } - void GetTribeIdPlayerList(int TribeID) { NativeCall((DWORD64)this, "UShooterCheatManager", "GetTribeIdPlayerList", TribeID); } - void GetSteamIDForPlayerID(int PlayerID) { NativeCall((DWORD64)this, "UShooterCheatManager", "GetSteamIDForPlayerID", PlayerID); } - void GetPlayerIDForSteamID(int SteamID) { NativeCall((DWORD64)this, "UShooterCheatManager", "GetPlayerIDForSteamID", SteamID); } - static UField* GetPrivateStaticClass() { return NativeCall(nullptr, "UShooterCheatManager", "GetPrivateStaticClass"); } -}; - -// Player - -struct UPlayer -{ - APlayerController* GetPlayerControllerField() const { return GetNativeField(this, "UPlayer", "PlayerController"); } - int GetCurrentNetSpeedField() const { return GetNativeField(this, "UPlayer", "CurrentNetSpeed"); } - void SetCurrentNetSpeedField(int newValue) { SetNativeField(this, "UPlayer", "CurrentNetSpeed", newValue); } - int GetConfiguredInternetSpeedField() const { return GetNativeField(this, "UPlayer", "ConfiguredInternetSpeed"); } - void SetConfiguredInternetSpeedField(int newValue) { SetNativeField(this, "UPlayer", "ConfiguredInternetSpeed", newValue); } - int GetConfiguredLanSpeedField() const { return GetNativeField(this, "UPlayer", "ConfiguredLanSpeed"); } - void SetConfiguredLanSpeedField(int newValue) { SetNativeField(this, "UPlayer", "ConfiguredLanSpeed", newValue); } - unsigned __int64 GetTransferringPlayerDataIdField() const { return GetNativeField(this, "UPlayer", "TransferringPlayerDataId"); } - void SetTransferringPlayerDataIdField(unsigned __int64 newValue) { SetNativeField(this, "UPlayer", "TransferringPlayerDataId", newValue); } -}; - -struct APlayerState : public AActor -{ - float GetScoreField() const { return GetNativeField(this, "APlayerState", "Score"); } - void SetScoreField(float newValue) { SetNativeField(this, "APlayerState", "Score", newValue); } - char GetPingField() const { return GetNativeField(this, "APlayerState", "Ping"); } - void SetPingField(char newValue) { SetNativeField(this, "APlayerState", "Ping", newValue); } - FString GetPlayerNameField() const { return GetNativeField(this, "APlayerState", "PlayerName"); } - void SetPlayerNameField(FString newValue) { SetNativeField(this, "APlayerState", "PlayerName", newValue); } - FString GetOldNameField() const { return GetNativeField(this, "APlayerState", "OldName"); } - void SetOldNameField(FString newValue) { SetNativeField(this, "APlayerState", "OldName", newValue); } - int GetPlayerIdField() const { return GetNativeField(this, "APlayerState", "PlayerId"); } - void SetPlayerIdField(int newValue) { SetNativeField(this, "APlayerState", "PlayerId", newValue); } - __int32 Get_bf46cField() const { return GetNativeField<__int32>(this, "APlayerState", "_bf46c"); } - void Set_bf46cField(__int32 newValue) { SetNativeField(this, "APlayerState", "_bf46c", newValue); } - int GetStartTimeField() const { return GetNativeField(this, "APlayerState", "StartTime"); } - void SetStartTimeField(int newValue) { SetNativeField(this, "APlayerState", "StartTime", newValue); } - float GetExactPingField() const { return GetNativeField(this, "APlayerState", "ExactPing"); } - void SetExactPingField(float newValue) { SetNativeField(this, "APlayerState", "ExactPing", newValue); } - FString GetSavedNetworkAddressField() const { return GetNativeField(this, "APlayerState", "SavedNetworkAddress"); } - void SetSavedNetworkAddressField(FString newValue) { SetNativeField(this, "APlayerState", "SavedNetworkAddress", newValue); } - FUniqueNetIdRepl* GetUniqueIdField() const { return GetNativePointerField(this, "APlayerState", "UniqueId"); } - FName GetSessionNameField() const { return GetNativeField(this, "APlayerState", "SessionName"); } - void SetSessionNameField(FName newValue) { SetNativeField(this, "APlayerState", "SessionName", newValue); } - char GetCurPingBucketField() const { return GetNativeField(this, "APlayerState", "CurPingBucket"); } - void SetCurPingBucketField(char newValue) { SetNativeField(this, "APlayerState", "CurPingBucket", newValue); } - float GetCurPingBucketTimestampField() const { return GetNativeField(this, "APlayerState", "CurPingBucketTimestamp"); } - void SetCurPingBucketTimestampField(float newValue) { SetNativeField(this, "APlayerState", "CurPingBucketTimestamp", newValue); } - - - // Functions - - void UpdatePing(float InPing) { NativeCall((DWORD64)this, "APlayerState", "UpdatePing", InPing); } - void RecalculateAvgPing() { NativeCall((DWORD64)this, "APlayerState", "RecalculateAvgPing"); } - void OverrideWith(APlayerState* PlayerState) { NativeCall((DWORD64)this, "APlayerState", "OverrideWith", PlayerState); } - void CopyProperties(APlayerState* PlayerState) { NativeCall((DWORD64)this, "APlayerState", "CopyProperties", PlayerState); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APlayerState", "PostInitializeComponents"); } - void ClientInitialize(AController* C) { NativeCall((DWORD64)this, "APlayerState", "ClientInitialize", C); } - void OnRep_PlayerName() { NativeCall((DWORD64)this, "APlayerState", "OnRep_PlayerName"); } - void OnRep_bIsInactive() { NativeCall((DWORD64)this, "APlayerState", "OnRep_bIsInactive"); } - bool ShouldBroadCastWelcomeMessage(bool bExiting) { return NativeCall((DWORD64)this, "APlayerState", "ShouldBroadCastWelcomeMessage", bExiting); } - void Destroyed() { NativeCall((DWORD64)this, "APlayerState", "Destroyed"); } - FString* GetHumanReadableName(FString* result) { return NativeCall((DWORD64)this, "APlayerState", "GetHumanReadableName", result); } - void SetPlayerName(FString* S) { NativeCall((DWORD64)this, "APlayerState", "SetPlayerName", S); } - void OnRep_UniqueId() { NativeCall((DWORD64)this, "APlayerState", "OnRep_UniqueId"); } - void SetUniqueId(TSharedPtr* InUniqueId) { NativeCall *>((DWORD64)this, "APlayerState", "SetUniqueId", InUniqueId); } - void RegisterPlayerWithSession(bool bWasFromInvite) { NativeCall((DWORD64)this, "APlayerState", "RegisterPlayerWithSession", bWasFromInvite); } - void UnregisterPlayerWithSession() { NativeCall((DWORD64)this, "APlayerState", "UnregisterPlayerWithSession"); } - APlayerState* Duplicate() { return NativeCall((DWORD64)this, "APlayerState", "Duplicate"); } - void SeamlessTravelTo(APlayerState* NewPlayerState) { NativeCall((DWORD64)this, "APlayerState", "SeamlessTravelTo", NewPlayerState); } -}; - -struct AShooterPlayerState : APlayerState -{ - UPrimalPlayerData* GetMyPlayerDataField() const { return GetNativeField(this, "AShooterPlayerState", "MyPlayerData"); } - FPrimalPlayerDataStruct* GetMyPlayerDataStructField() const { return GetNativePointerField(this, "AShooterPlayerState", "MyPlayerDataStruct"); } - FTribeData* GetMyTribeDataField() const { return GetNativePointerField(this, "AShooterPlayerState", "MyTribeData"); } - FTribeData* GetLastTribeInviteDataField() const { return GetNativePointerField(this, "AShooterPlayerState", "LastTribeInviteData"); } - int GetTotalEngramPointsField() const { return GetNativeField(this, "AShooterPlayerState", "TotalEngramPoints"); } - void SetTotalEngramPointsField(int newValue) { SetNativeField(this, "AShooterPlayerState", "TotalEngramPoints", newValue); } - int GetFreeEngramPointsField() const { return GetNativeField(this, "AShooterPlayerState", "FreeEngramPoints"); } - void SetFreeEngramPointsField(int newValue) { SetNativeField(this, "AShooterPlayerState", "FreeEngramPoints", newValue); } - TArray> GetEngramItemBlueprintsField() const { return GetNativeField>>(this, "AShooterPlayerState", "EngramItemBlueprints"); } - long double GetNextAllowedRespawnTimeField() const { return GetNativeField(this, "AShooterPlayerState", "NextAllowedRespawnTime"); } - void SetNextAllowedRespawnTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerState", "NextAllowedRespawnTime", newValue); } - float GetAllowedRespawnIntervalField() const { return GetNativeField(this, "AShooterPlayerState", "AllowedRespawnInterval"); } - void SetAllowedRespawnIntervalField(float newValue) { SetNativeField(this, "AShooterPlayerState", "AllowedRespawnInterval", newValue); } - long double GetLastTimeDiedToEnemyTeamField() const { return GetNativeField(this, "AShooterPlayerState", "LastTimeDiedToEnemyTeam"); } - void SetLastTimeDiedToEnemyTeamField(long double newValue) { SetNativeField(this, "AShooterPlayerState", "LastTimeDiedToEnemyTeam", newValue); } - int GetCurrentlySelectedDinoOrderGroupField() const { return GetNativeField(this, "AShooterPlayerState", "CurrentlySelectedDinoOrderGroup"); } - void SetCurrentlySelectedDinoOrderGroupField(int newValue) { SetNativeField(this, "AShooterPlayerState", "CurrentlySelectedDinoOrderGroup", newValue); } - long double GetLastTribeRequestTimeField() const { return GetNativeField(this, "AShooterPlayerState", "LastTribeRequestTime"); } - void SetLastTribeRequestTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerState", "LastTribeRequestTime", newValue); } - - // Functions - - void Reset() { NativeCall((DWORD64)this, "AShooterPlayerState", "Reset"); } - void UnregisterPlayerWithSession() { NativeCall((DWORD64)this, "AShooterPlayerState", "UnregisterPlayerWithSession"); } - void ClientInitialize(AController* InController) { NativeCall((DWORD64)this, "AShooterPlayerState", "ClientInitialize", InController); } - void CopyProperties(APlayerState* PlayerState) { NativeCall((DWORD64)this, "AShooterPlayerState", "CopyProperties", PlayerState); } - void ServerGetAllPlayerNamesAndLocations_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetAllPlayerNamesAndLocations_Implementation"); } - void ServerGetAlivePlayerConnectedData_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetAlivePlayerConnectedData_Implementation"); } - void ServerGetPlayerConnectedData_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetPlayerConnectedData_Implementation"); } - void ServerGetServerOptions_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetServerOptions_Implementation"); } - void ServerGetPlayerBannedData_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetPlayerBannedData_Implementation"); } - void ServerGetPlayerWhiteListedData_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetPlayerWhiteListedData_Implementation"); } - void BroadcastDeath_Implementation(AShooterPlayerState* KillerPlayerState, UDamageType* KillerDamageType, AShooterPlayerState* KilledPlayerState) { NativeCall((DWORD64)this, "AShooterPlayerState", "BroadcastDeath_Implementation", KillerPlayerState, KillerDamageType, KilledPlayerState); } - void Destroyed() { NativeCall((DWORD64)this, "AShooterPlayerState", "Destroyed"); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterPlayerState", "BeginPlay"); } - void PromoteToTribeAdmin() { NativeCall((DWORD64)this, "AShooterPlayerState", "PromoteToTribeAdmin"); } - bool AddToTribe(FTribeData* MyNewTribe, bool bMergeTribe, bool bForce, bool bIsFromInvite) { return NativeCall((DWORD64)this, "AShooterPlayerState", "AddToTribe", MyNewTribe, bMergeTribe, bForce, bIsFromInvite); } - void ClearTribe(bool bDontRemoveFromTribe, bool bForce) { NativeCall((DWORD64)this, "AShooterPlayerState", "ClearTribe", bDontRemoveFromTribe, bForce); } - void TransferTribalObjects(FTribeData* TribeData, bool bTransferToTribe, bool bDontIncludePlayers) { NativeCall((DWORD64)this, "AShooterPlayerState", "TransferTribalObjects", TribeData, bTransferToTribe, bDontIncludePlayers); } - bool IsTribeOwner(unsigned int CheckPlayerDataID) { return NativeCall((DWORD64)this, "AShooterPlayerState", "IsTribeOwner", CheckPlayerDataID); } - bool IsTribeAdmin() { return NativeCall((DWORD64)this, "AShooterPlayerState", "IsTribeAdmin"); } - void ServerRequestDinoOrderGroups_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestDinoOrderGroups_Implementation"); } - void ClientRefreshDinoOrderGroup_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ClientRefreshDinoOrderGroup_Implementation"); } - bool AllowDinoOrderByGroup(APrimalDinoCharacter* orderDino) { return NativeCall((DWORD64)this, "AShooterPlayerState", "AllowDinoOrderByGroup", orderDino); } - void ServerDinoOrderGroup_AddOrRemoveDinoClass_Implementation(int groupIndex, TSubclassOf DinoClass, bool bAdd) { NativeCall, bool>((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_AddOrRemoveDinoClass_Implementation", groupIndex, DinoClass, bAdd); } - void ServerSetDinoGroupName_Implementation(int groupIndex, FString* GroupName) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerSetDinoGroupName_Implementation", groupIndex, GroupName); } - FString* GetDinoOrderGroupName(FString* result, int groupIndex) { return NativeCall((DWORD64)this, "AShooterPlayerState", "GetDinoOrderGroupName", result, groupIndex); } - bool IsDinoInOrderGroup(int groupIndex, APrimalDinoCharacter* dinoChar) { return NativeCall((DWORD64)this, "AShooterPlayerState", "IsDinoInOrderGroup", groupIndex, dinoChar); } - bool IsDinoClassInOrderGroup(int groupIndex, TSubclassOf dinoClass) { return NativeCall>((DWORD64)this, "AShooterPlayerState", "IsDinoClassInOrderGroup", groupIndex, dinoClass); } - void ServerDinoOrderGroup_AddOrRemoveDinoCharacter_Implementation(int groupIndex, APrimalDinoCharacter* DinoCharacter, bool bAdd) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_AddOrRemoveDinoCharacter_Implementation", groupIndex, DinoCharacter, bAdd); } - void ServerDinoOrderGroup_Clear_Implementation(int groupIndex, bool bClearClasses, bool bClearChars) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_Clear_Implementation", groupIndex, bClearClasses, bClearChars); } - void ServerDinoOrderGroup_RemoveEntryByIndex_Implementation(int groupIndex, bool bIsClass, int entryIndex) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_RemoveEntryByIndex_Implementation", groupIndex, bIsClass, entryIndex); } - void ServerSetSelectedDinoOrderGroup_Implementation(int newGroup) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerSetSelectedDinoOrderGroup_Implementation", newGroup); } - void ServerRequestRenameTribe_Implementation(FString* TribeName) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestRenameTribe_Implementation", TribeName); } - void ServerRequestSetTribeGovernment_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestSetTribeGovernment_Implementation"); } - void ServerRequestCreateNewTribe_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestCreateNewTribe_Implementation"); } - void ServerRequestLeaveTribe_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestLeaveTribe_Implementation"); } - void ServerRequestRemovePlayerIndexFromMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestRemovePlayerIndexFromMyTribe_Implementation", PlayerIndexInTribe); } - void ServerRequestPromotePlayerInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestPromotePlayerInMyTribe_Implementation", PlayerIndexInTribe); } - void ServerRequestDemotePlayerInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestDemotePlayerInMyTribe_Implementation", PlayerIndexInTribe); } - void InvitedRankGroupPlayerIntoTribe(AShooterPlayerState* OtherPlayer) { NativeCall((DWORD64)this, "AShooterPlayerState", "InvitedRankGroupPlayerIntoTribe", OtherPlayer); } - void ServerRequestSetTribeMemberGroupRank_Implementation(int PlayerIndexInTribe, int RankGroupIndex) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestSetTribeMemberGroupRank_Implementation", PlayerIndexInTribe, RankGroupIndex); } - void ServerTribeRequestAddRankGroup_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestAddRankGroup_Implementation"); } - void ServerTribeRequestRemoveRankGroup_Implementation(int RankGroupIndex) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestRemoveRankGroup_Implementation", RankGroupIndex); } - void ServerTribeRequestApplyRankGroupSettings_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestApplyRankGroupSettings_Implementation"); } - void ServerRequestTransferOwnershipInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestTransferOwnershipInMyTribe_Implementation", PlayerIndexInTribe); } - FString* GetPlayerName(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerState", "GetPlayerName", result); } - void ServerRequestMySpawnPoints_Implementation(int IgnoreBedID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestMySpawnPoints_Implementation", IgnoreBedID); } - void ServerRequestCreateNewPlayer_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestCreateNewPlayer_Implementation"); } - void RequestCreateNewPlayerWithArkData(UPrimalPlayerData* PlayerArkData) { NativeCall((DWORD64)this, "AShooterPlayerState", "RequestCreateNewPlayerWithArkData", PlayerArkData); } - void ServerRequestApplyEngramPoints_Implementation(TSubclassOf forItemEntry) { NativeCall>((DWORD64)this, "AShooterPlayerState", "ServerRequestApplyEngramPoints_Implementation", forItemEntry); } - void ServerUnlockEngram(TSubclassOf forItemEntry, bool bNotifyPlayerHUD) { NativeCall, bool>((DWORD64)this, "AShooterPlayerState", "ServerUnlockEngram", forItemEntry, bNotifyPlayerHUD); } - void AddEngramBlueprintToPlayerInventory(UPrimalInventoryComponent* invComp, TSubclassOf engramItemBlueprint) { NativeCall>((DWORD64)this, "AShooterPlayerState", "AddEngramBlueprintToPlayerInventory", invComp, engramItemBlueprint); } - UObject* GetObjectW() { return NativeCall((DWORD64)this, "AShooterPlayerState", "GetObjectW"); } - bool HasEngram(TSubclassOf ItemClass) { return NativeCall>((DWORD64)this, "AShooterPlayerState", "HasEngram", ItemClass); } - void NotifyPlayerJoinedTribe_Implementation(FString* ThePlayerName, FString* TribeName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerJoinedTribe_Implementation", ThePlayerName, TribeName); } - void NotifyPlayerLeftTribe_Implementation(FString* ThePlayerName, FString* TribeName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerLeftTribe_Implementation", ThePlayerName, TribeName); } - void NotifyPlayerJoined_Implementation(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerJoined_Implementation", ThePlayerName); } - void NotifyTribememberJoined_Implementation(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyTribememberJoined_Implementation", ThePlayerName); } - void NotifyPlayerLeft_Implementation(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerLeft_Implementation", ThePlayerName); } - void NotifyTribememberLeft_Implementation(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyTribememberLeft_Implementation", ThePlayerName); } - void ServerSetDefaultItemSlotClass_Implementation(int slotNum, TSubclassOf ItemClass, bool bIsEngram) { NativeCall, bool>((DWORD64)this, "AShooterPlayerState", "ServerSetDefaultItemSlotClass_Implementation", slotNum, ItemClass, bIsEngram); } - void ClientNotifyLevelUpAvailable_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "ClientNotifyLevelUpAvailable_Implementation"); } - void SetTribeTamingDinoSettings(APrimalDinoCharacter* aDinoChar) { NativeCall((DWORD64)this, "AShooterPlayerState", "SetTribeTamingDinoSettings", aDinoChar); } - void SendTribeInviteData_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerState", "SendTribeInviteData_Implementation"); } - void DoRespec() { NativeCall((DWORD64)this, "AShooterPlayerState", "DoRespec"); } - FString* GetUniqueIdString(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerState", "GetUniqueIdString", result); } - bool IsInTribeWar(int EnemyTeam) { return NativeCall((DWORD64)this, "AShooterPlayerState", "IsInTribeWar", EnemyTeam); } - void ServerDeclareTribeWar_Implementation(int EnemyTeamID, int StartDayNum, int EndDayNumber, float WarStartTime, float WarEndTime) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDeclareTribeWar_Implementation", EnemyTeamID, StartDayNum, EndDayNumber, WarStartTime, WarEndTime); } - void ServerAcceptTribeWar_Implementation(int EnemyTeamID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerAcceptTribeWar_Implementation", EnemyTeamID); } - void ServerRejectTribeWar_Implementation(int EnemyTeamID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRejectTribeWar_Implementation", EnemyTeamID); } - FTribeWar* GetTribeWar(FTribeWar* result, int EnemyTeam) { return NativeCall((DWORD64)this, "AShooterPlayerState", "GetTribeWar", result, EnemyTeam); } - void ServerRequestRemoveAllianceMember_Implementation(unsigned int AllianceID, unsigned int MemberID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestRemoveAllianceMember_Implementation", AllianceID, MemberID); } - void ServerRequestPromoteAllianceMember_Implementation(unsigned int AllianceID, unsigned int MemberID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestPromoteAllianceMember_Implementation", AllianceID, MemberID); } - void ServerTribeRequestNewAlliance_Implementation(FString* AllianceName) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestNewAlliance_Implementation", AllianceName); } - void ServerRequestLeaveAlliance_Implementation(unsigned int AllianceID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestLeaveAlliance_Implementation", AllianceID); } - void AcceptJoinAlliance() { NativeCall((DWORD64)this, "AShooterPlayerState", "AcceptJoinAlliance"); } - void ServerRequestSpawnPointsForDownloadedCharacters_Implementation(unsigned __int64 PlayerDataID, int IgnoreBedID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestSpawnPointsForDownloadedCharacters_Implementation", PlayerDataID, IgnoreBedID); } - void StaticRegisterNativesAShooterPlayerState() { NativeCall((DWORD64)this, "AShooterPlayerState", "StaticRegisterNativesAShooterPlayerState"); } - static UField* GetPrivateStaticClass() { return NativeCall(nullptr, "AShooterPlayerState", "GetPrivateStaticClass"); } - void ClientGetServerOptions() { NativeCall((DWORD64)this, "AShooterPlayerState", "ClientGetServerOptions"); } - void ClientRefreshDinoOrderGroup() { NativeCall((DWORD64)this, "AShooterPlayerState", "ClientRefreshDinoOrderGroup"); } - void NotifyPlayerJoined(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerJoined", ThePlayerName); } - void NotifyPlayerJoinedTribe(FString* ThePlayerName, FString* TribeName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerJoinedTribe", ThePlayerName, TribeName); } - void NotifyPlayerLeft(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerLeft", ThePlayerName); } - void NotifyPlayerLeftTribe(FString* ThePlayerName, FString* TribeName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyPlayerLeftTribe", ThePlayerName, TribeName); } - void NotifyTribememberJoined(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyTribememberJoined", ThePlayerName); } - void NotifyTribememberLeft(FString* ThePlayerName) { NativeCall((DWORD64)this, "AShooterPlayerState", "NotifyTribememberLeft", ThePlayerName); } - void SendTribeInviteData() { NativeCall((DWORD64)this, "AShooterPlayerState", "SendTribeInviteData"); } - void ServerAcceptTribeWar(int EnemyTeamID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerAcceptTribeWar", EnemyTeamID); } - void ServerDinoOrderGroup_AddOrRemoveDinoCharacter(int groupIndex, APrimalDinoCharacter* DinoCharacter, bool bAdd) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_AddOrRemoveDinoCharacter", groupIndex, DinoCharacter, bAdd); } - void ServerDinoOrderGroup_RemoveEntryByIndex(int groupIndex, bool bIsClass, int entryIndex) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerDinoOrderGroup_RemoveEntryByIndex", groupIndex, bIsClass, entryIndex); } - void ServerGetAllPlayerNamesAndLocations() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerGetAllPlayerNamesAndLocations"); } - void ServerRequestApplyEngramPoints(TSubclassOf forItemEntry) { NativeCall>((DWORD64)this, "AShooterPlayerState", "ServerRequestApplyEngramPoints", forItemEntry); } - void ServerRequestCreateNewPlayer() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestCreateNewPlayer"); } - void ServerRequestCreateNewTribe() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestCreateNewTribe"); } - void ServerRequestRenameTribe(FString* ServerRequestRenameTribe) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestRenameTribe", ServerRequestRenameTribe); } - void ServerRequestSetTribeMemberGroupRank(int PlayerIndexInTribe, int RankGroupIndex) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestSetTribeMemberGroupRank", PlayerIndexInTribe, RankGroupIndex); } - void ServerRequestSpawnPointsForDownloadedCharacters(unsigned __int64 PlayerDataID, int IgnoreBedID) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerRequestSpawnPointsForDownloadedCharacters", PlayerDataID, IgnoreBedID); } - void ServerSetDefaultItemSlotClass(int slotNum, TSubclassOf ItemClass, bool bIsEngram) { NativeCall, bool>((DWORD64)this, "AShooterPlayerState", "ServerSetDefaultItemSlotClass", slotNum, ItemClass, bIsEngram); } - void ServerSetDinoGroupName(int groupIndex, FString* GroupName) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerSetDinoGroupName", groupIndex, GroupName); } - void ServerTribeRequestApplyRankGroupSettings() { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestApplyRankGroupSettings"); } - void ServerTribeRequestNewAlliance(FString* AllianceName) { NativeCall((DWORD64)this, "AShooterPlayerState", "ServerTribeRequestNewAlliance", AllianceName); } -}; - -// Controller - -struct AController : public AActor -{ - TWeakObjectPtr GetOldPawnField() const { return GetNativeField>(this, "AController", "OldPawn"); } - ACharacter* GetCharacterField() const { return GetNativeField(this, "AController", "Character"); } - APlayerState* GetPlayerStateField() const { return GetNativeField(this, "AController", "PlayerState"); } - APawn* GetPawnField() const { return GetNativeField(this, "AController", "Pawn"); } - FRotator GetControlRotationField() const { return GetNativeField(this, "AController", "ControlRotation"); } - TWeakObjectPtr GetStartSpotField() const { return GetNativeField>(this, "AController", "StartSpot"); } - FName GetStateNameField() const { return GetNativeField(this, "AController", "StateName"); } - void SetStateNameField(FName newValue) { SetNativeField(this, "AController", "StateName", newValue); } - - // Functions - - bool IsLocalController() { return NativeCall((DWORD64)this, "AController", "IsLocalController"); } - void FailedToSpawnPawn() { NativeCall((DWORD64)this, "AController", "FailedToSpawnPawn"); } - void SetInitialLocationAndRotation(FVector* NewLocation, FRotator* NewRotation) { NativeCall((DWORD64)this, "AController", "SetInitialLocationAndRotation", NewLocation, NewRotation); } - FRotator* GetControlRotation(FRotator* result) { return NativeCall((DWORD64)this, "AController", "GetControlRotation", result); } - void SetControlRotation(FRotator* NewRotation) { NativeCall((DWORD64)this, "AController", "SetControlRotation", NewRotation); } - void AttachToPawn(APawn* InPawn) { NativeCall((DWORD64)this, "AController", "AttachToPawn", InPawn); } - void DetachFromPawn() { NativeCall((DWORD64)this, "AController", "DetachFromPawn"); } - AActor* GetViewTarget() { return NativeCall((DWORD64)this, "AController", "GetViewTarget"); } - void GetPlayerViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "AController", "GetPlayerViewPoint", out_Location, out_Rotation); } - bool LineOfSightTo() { return NativeCall((DWORD64)this, "AController", "LineOfSightTo"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AController", "PostInitializeComponents"); } - void Possess(APawn* InPawn) { NativeCall((DWORD64)this, "AController", "Possess", InPawn); } - void PawnPendingDestroy(APawn* inPawn) { NativeCall((DWORD64)this, "AController", "PawnPendingDestroy", inPawn); } - void Reset() { NativeCall((DWORD64)this, "AController", "Reset"); } - void ClientSetLocation_Implementation() { NativeCall((DWORD64)this, "AController", "ClientSetLocation_Implementation"); } - void ClientSetRotation_Implementation() { NativeCall((DWORD64)this, "AController", "ClientSetRotation_Implementation"); } - void RemovePawnTickDependency(APawn* InOldPawn) { NativeCall((DWORD64)this, "AController", "RemovePawnTickDependency", InOldPawn); } - void AddPawnTickDependency(APawn* NewPawn) { NativeCall((DWORD64)this, "AController", "AddPawnTickDependency", NewPawn); } - void SetPawn(APawn* InPawn) { NativeCall((DWORD64)this, "AController", "SetPawn", InPawn); } - void OnRep_Pawn() { NativeCall((DWORD64)this, "AController", "OnRep_Pawn"); } - void OnRep_PlayerState() { NativeCall((DWORD64)this, "AController", "OnRep_PlayerState"); } - void Destroyed() { NativeCall((DWORD64)this, "AController", "Destroyed"); } - void CleanupPlayerState() { NativeCall((DWORD64)this, "AController", "CleanupPlayerState"); } - void InstigatedAnyDamage(float Damage, UDamageType* DamageType, AActor* DamagedActor, AActor* DamageCauser) { NativeCall((DWORD64)this, "AController", "InstigatedAnyDamage", Damage, DamageType, DamagedActor, DamageCauser); } - void InitPlayerState() { NativeCall((DWORD64)this, "AController", "InitPlayerState"); } - FRotator* GetDesiredRotation(FRotator* result) { return NativeCall((DWORD64)this, "AController", "GetDesiredRotation", result); } - void GetActorEyesViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "AController", "GetActorEyesViewPoint", out_Location, out_Rotation); } - FString* GetHumanReadableName(FString* result) { return NativeCall((DWORD64)this, "AController", "GetHumanReadableName", result); } - void ChangeState(FName NewState) { NativeCall((DWORD64)this, "AController", "ChangeState", NewState); } - FVector* GetNavAgentLocation(FVector* result) { return NativeCall((DWORD64)this, "AController", "GetNavAgentLocation", result); } - void GetMoveGoalReachTest(AActor* MovingActor, FVector* MoveOffset, FVector* GoalOffset, float* GoalRadius, float* GoalHalfHeight) { NativeCall((DWORD64)this, "AController", "GetMoveGoalReachTest", MovingActor, MoveOffset, GoalOffset, GoalRadius, GoalHalfHeight); } - void UpdateNavigationComponents() { NativeCall((DWORD64)this, "AController", "UpdateNavigationComponents"); } - static UField* GetPrivateStaticClass() { return NativeCall(nullptr, "AController", "GetPrivateStaticClass"); } - void ReceiveInstigatedAnyDamage(float Damage, UDamageType* DamageType, AActor* DamagedActor, AActor* DamageCauser) { NativeCall((DWORD64)this, "AController", "ReceiveInstigatedAnyDamage", Damage, DamageType, DamagedActor, DamageCauser); } -}; - -struct APlayerController : public AController -{ -public: - UPlayer* GetPlayerField() const { return GetNativeField(this, "APlayerController", "Player"); } - APawn* GetAcknowledgedPawnField() const { return GetNativeField(this, "APlayerController", "AcknowledgedPawn"); } - bool GetbAutoManageActiveCameraTargetField() const { return GetNativeField(this, "APlayerController", "bAutoManageActiveCameraTarget"); } - void SetbAutoManageActiveCameraTargetField(bool newValue) { SetNativeField(this, "APlayerController", "bAutoManageActiveCameraTarget", newValue); } - FRotator GetTargetViewRotationField() const { return GetNativeField(this, "APlayerController", "TargetViewRotation"); } - void SetTargetViewRotationField(FRotator newValue) { SetNativeField(this, "APlayerController", "TargetViewRotation", newValue); } - FRotator GetBlendedTargetViewRotationField() const { return GetNativeField(this, "APlayerController", "BlendedTargetViewRotation"); } - void SetBlendedTargetViewRotationField(FRotator newValue) { SetNativeField(this, "APlayerController", "BlendedTargetViewRotation", newValue); } - float GetLastSpectatorStateSynchTimeField() const { return GetNativeField(this, "APlayerController", "LastSpectatorStateSynchTime"); } - void SetLastSpectatorStateSynchTimeField(float newValue) { SetNativeField(this, "APlayerController", "LastSpectatorStateSynchTime", newValue); } - int GetClientCapField() const { return GetNativeField(this, "APlayerController", "ClientCap"); } - void SetClientCapField(int newValue) { SetNativeField(this, "APlayerController", "ClientCap", newValue); } - long double GetServerLastReceivedSpectatorLocTimeField() const { return GetNativeField(this, "APlayerController", "ServerLastReceivedSpectatorLocTime"); } - void SetServerLastReceivedSpectatorLocTimeField(long double newValue) { SetNativeField(this, "APlayerController", "ServerLastReceivedSpectatorLocTime", newValue); } - UCheatManager* GetCheatManagerField() const { return GetNativeField(this, "APlayerController", "CheatManager"); } - TSubclassOf GetCheatClassField() const { return GetNativeField>(this, "APlayerController", "CheatClass"); } - void SetCheatClassField(TSubclassOf newValue) { SetNativeField(this, "APlayerController", "CheatClass", newValue); } - TArray GetPendingMapChangeLevelNamesField() const { return GetNativeField>(this, "APlayerController", "PendingMapChangeLevelNames"); } - char GetNetPlayerIndexField() const { return GetNativeField(this, "APlayerController", "NetPlayerIndex"); } - //FPlayerMuteList GetMuteListField() const { return GetNativeField(this, "APlayerController", "MuteList"); } - //void SetMuteListField(FPlayerMuteList newValue) { SetNativeField(this, "APlayerController", "MuteList", newValue); } - //UNetConnection * GetNetConnectionField() const { return GetNativeField(this, "APlayerController", "NetConnection"); } - FRotator GetRotationInputField() const { return GetNativeField(this, "APlayerController", "RotationInput"); } - void SetRotationInputField(FRotator newValue) { SetNativeField(this, "APlayerController", "RotationInput", newValue); } - float GetInputYawScaleField() const { return GetNativeField(this, "APlayerController", "InputYawScale"); } - void SetInputYawScaleField(float newValue) { SetNativeField(this, "APlayerController", "InputYawScale", newValue); } - float GetInputPitchScaleField() const { return GetNativeField(this, "APlayerController", "InputPitchScale"); } - void SetInputPitchScaleField(float newValue) { SetNativeField(this, "APlayerController", "InputPitchScale", newValue); } - float GetInputRollScaleField() const { return GetNativeField(this, "APlayerController", "InputRollScale"); } - void SetInputRollScaleField(float newValue) { SetNativeField(this, "APlayerController", "InputRollScale", newValue); } - bool GetbLockedInputUIField() const { return GetNativeField(this, "APlayerController", "bLockedInputUI"); } - void SetbLockedInputUIField(bool newValue) { SetNativeField(this, "APlayerController", "bLockedInputUI", newValue); } - FVector GetAudioListenerLocationOverrideField() const { return GetNativeField(this, "APlayerController", "AudioListenerLocationOverride"); } - void SetAudioListenerLocationOverrideField(FVector newValue) { SetNativeField(this, "APlayerController", "AudioListenerLocationOverride", newValue); } - FRotator GetAudioListenerRotationOverrideField() const { return GetNativeField(this, "APlayerController", "AudioListenerRotationOverride"); } - void SetAudioListenerRotationOverrideField(FRotator newValue) { SetNativeField(this, "APlayerController", "AudioListenerRotationOverride", newValue); } - //ASpectatorPawn * GetSpectatorPawnField() const { return GetNativeField(this, "APlayerController", "SpectatorPawn"); } - FVector GetSpawnLocationField() const { return GetNativeField(this, "APlayerController", "SpawnLocation"); } - void SetSpawnLocationField(FVector newValue) { SetNativeField(this, "APlayerController", "SpawnLocation", newValue); } - float GetLastRetryPlayerTimeField() const { return GetNativeField(this, "APlayerController", "LastRetryPlayerTime"); } - void SetLastRetryPlayerTimeField(float newValue) { SetNativeField(this, "APlayerController", "LastRetryPlayerTime", newValue); } - unsigned __int16 GetSeamlessTravelCountField() const { return GetNativeField(this, "APlayerController", "SeamlessTravelCount"); } - void SetSeamlessTravelCountField(unsigned __int16 newValue) { SetNativeField(this, "APlayerController", "SeamlessTravelCount", newValue); } - unsigned __int16 GetLastCompletedSeamlessTravelCountField() const { return GetNativeField(this, "APlayerController", "LastCompletedSeamlessTravelCount"); } - void SetLastCompletedSeamlessTravelCountField(unsigned __int16 newValue) { SetNativeField(this, "APlayerController", "LastCompletedSeamlessTravelCount", newValue); } - FVector GetLastReplicatedFocalLocField() const { return GetNativeField(this, "APlayerController", "LastReplicatedFocalLoc"); } - void SetLastReplicatedFocalLocField(FVector newValue) { SetNativeField(this, "APlayerController", "LastReplicatedFocalLoc", newValue); } - - // Functions - - //AActor * GetAimedUseActor(UActorComponent ** UseComponent, int * hitBodyIndex) { return NativeCall((DWORD64)this, "APlayerController", "GetAimedUseActor", UseComponent, hitBodyIndex); } - AActor* BaseGetPlayerCharacter() { return NativeCall((DWORD64)this, "APlayerController", "BaseGetPlayerCharacter"); } - static UClass* StaticClass() { return NativeCall(nullptr, "APlayerController", "StaticClass"); } - UPlayer* GetNetOwningPlayer() { return NativeCall((DWORD64)this, "APlayerController", "GetNetOwningPlayer"); } - //UNetConnection * GetNetConnection() { return NativeCall((DWORD64)this, "APlayerController", "GetNetConnection"); } - bool IsLocalController() { return NativeCall((DWORD64)this, "APlayerController", "IsLocalController"); } - bool ServerPause_Validate() { return NativeCall((DWORD64)this, "APlayerController", "ServerPause_Validate"); } - void FailedToSpawnPawn() { NativeCall((DWORD64)this, "APlayerController", "FailedToSpawnPawn"); } - void ClientFlushLevelStreaming_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientFlushLevelStreaming_Implementation"); } - void ServerUpdateLevelVisibility_Implementation(FName PackageName, bool bIsVisible) { NativeCall((DWORD64)this, "APlayerController", "ServerUpdateLevelVisibility_Implementation", PackageName, bIsVisible); } - bool ServerUpdateLevelVisibility_Validate(FName PackageName, bool bIsVisible) { return NativeCall((DWORD64)this, "APlayerController", "ServerUpdateLevelVisibility_Validate", PackageName, bIsVisible); } - FString* ConsoleCommand(FString* result, FString* Cmd, bool bWriteToLog) { return NativeCall((DWORD64)this, "APlayerController", "ConsoleCommand", result, Cmd, bWriteToLog); } - void CleanUpAudioComponents() { NativeCall((DWORD64)this, "APlayerController", "CleanUpAudioComponents"); } - AActor* GetViewTarget() { return NativeCall((DWORD64)this, "APlayerController", "GetViewTarget"); } - void SetViewTarget() { NativeCall((DWORD64)this, "APlayerController", "SetViewTarget"); } - void AutoManageActiveCameraTarget(AActor* SuggestedTarget) { NativeCall((DWORD64)this, "APlayerController", "AutoManageActiveCameraTarget", SuggestedTarget); } - void ServerNotifyLoadedWorld_Implementation(FName WorldPackageName) { NativeCall((DWORD64)this, "APlayerController", "ServerNotifyLoadedWorld_Implementation", WorldPackageName); } - bool HasClientLoadedCurrentWorld() { return NativeCall((DWORD64)this, "APlayerController", "HasClientLoadedCurrentWorld"); } - void ForceSingleNetUpdateFor(AActor* Target) { NativeCall((DWORD64)this, "APlayerController", "ForceSingleNetUpdateFor", Target); } - void SmoothTargetViewRotation(APawn* TargetPawn, float DeltaSeconds) { NativeCall((DWORD64)this, "APlayerController", "SmoothTargetViewRotation", TargetPawn, DeltaSeconds); } - void InitInputSystem() { NativeCall((DWORD64)this, "APlayerController", "InitInputSystem"); } - void SafeRetryClientRestart() { NativeCall((DWORD64)this, "APlayerController", "SafeRetryClientRestart"); } - void ClientRetryClientRestart_Implementation(APawn* NewPawn) { NativeCall((DWORD64)this, "APlayerController", "ClientRetryClientRestart_Implementation", NewPawn); } - void ClientRestart_Implementation(APawn* NewPawn) { NativeCall((DWORD64)this, "APlayerController", "ClientRestart_Implementation", NewPawn); } - void Possess(APawn* PawnToPossess) { NativeCall((DWORD64)this, "APlayerController", "Possess", PawnToPossess); } - void AcknowledgePossession(APawn* P) { NativeCall((DWORD64)this, "APlayerController", "AcknowledgePossession", P); } - void ReceivedPlayer() { NativeCall((DWORD64)this, "APlayerController", "ReceivedPlayer"); } - FVector* GetFocalLocation(FVector* result) { return NativeCall((DWORD64)this, "APlayerController", "GetFocalLocation", result); } - void PostLoad() { NativeCall((DWORD64)this, "APlayerController", "PostLoad"); } - void GetActorEyesViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "APlayerController", "GetActorEyesViewPoint", out_Location, out_Rotation); } - void GetPlayerViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "APlayerController", "GetPlayerViewPoint", out_Location, out_Rotation); } - void UpdateRotation(float DeltaTime) { NativeCall((DWORD64)this, "APlayerController", "UpdateRotation", DeltaTime); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APlayerController", "PostInitializeComponents"); } - void ServerShortTimeout_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerShortTimeout_Implementation"); } - void AddCheats(bool bForce) { NativeCall((DWORD64)this, "APlayerController", "AddCheats", bForce); } - void EnableCheats() { NativeCall((DWORD64)this, "APlayerController", "EnableCheats"); } - void SpawnDefaultHUD() { NativeCall((DWORD64)this, "APlayerController", "SpawnDefaultHUD"); } - void CreateTouchInterface() { NativeCall((DWORD64)this, "APlayerController", "CreateTouchInterface"); } - void CleanupGameViewport() { NativeCall((DWORD64)this, "APlayerController", "CleanupGameViewport"); } - void GetViewportSize(int* SizeX, int* SizeY) { NativeCall((DWORD64)this, "APlayerController", "GetViewportSize", SizeX, SizeY); } - void Reset() { NativeCall((DWORD64)this, "APlayerController", "Reset"); } - void ClientReset_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientReset_Implementation"); } - void ClientGotoState_Implementation(FName NewState) { NativeCall((DWORD64)this, "APlayerController", "ClientGotoState_Implementation", NewState); } - bool IsFrozen() { return NativeCall((DWORD64)this, "APlayerController", "IsFrozen"); } - void ServerAcknowledgePossession_Implementation(APawn* P) { NativeCall((DWORD64)this, "APlayerController", "ServerAcknowledgePossession_Implementation", P); } - bool ServerAcknowledgePossession_Validate(APawn* P) { return NativeCall((DWORD64)this, "APlayerController", "ServerAcknowledgePossession_Validate", P); } - void UnPossess() { NativeCall((DWORD64)this, "APlayerController", "UnPossess"); } - void CleanupPlayerState() { NativeCall((DWORD64)this, "APlayerController", "CleanupPlayerState"); } - //void ClientPlaySound_Implementation(USoundBase * Sound, float VolumeMultiplier, float PitchMultiplier) { NativeCall((DWORD64)this, "APlayerController", "ClientPlaySound_Implementation", Sound, VolumeMultiplier, PitchMultiplier); } - void ClientPlaySoundAtLocation_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientPlaySoundAtLocation_Implementation"); } - void ClientMessage_Implementation(FString* S, FName Type, float MsgLifeTime) { NativeCall((DWORD64)this, "APlayerController", "ClientMessage_Implementation", S, Type, MsgLifeTime); } - void ClientTeamMessage_Implementation(APlayerState* SenderPlayerState, FString* S, FName Type, float MsgLifeTime) { NativeCall((DWORD64)this, "APlayerController", "ClientTeamMessage_Implementation", SenderPlayerState, S, Type, MsgLifeTime); } - void ServerToggleAILogging_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerToggleAILogging_Implementation"); } - void PawnLeavingGame() { NativeCall((DWORD64)this, "APlayerController", "PawnLeavingGame"); } - void Destroyed() { NativeCall((DWORD64)this, "APlayerController", "Destroyed"); } - void FOV(float F) { NativeCall((DWORD64)this, "APlayerController", "FOV", F); } - void Camera(FName NewMode) { NativeCall((DWORD64)this, "APlayerController", "Camera", NewMode); } - void ServerCamera_Implementation(FName NewMode) { NativeCall((DWORD64)this, "APlayerController", "ServerCamera_Implementation", NewMode); } - bool ServerCamera_Validate(FName NewMode) { return NativeCall((DWORD64)this, "APlayerController", "ServerCamera_Validate", NewMode); } - void SetCameraMode(FName NewCamMode) { NativeCall((DWORD64)this, "APlayerController", "SetCameraMode", NewCamMode); } - void ResetCameraMode() { NativeCall((DWORD64)this, "APlayerController", "ResetCameraMode"); } - void ClientSetCameraFade_Implementation(bool bEnableFading, FColor FadeColor, FVector2D FadeAlpha, float FadeTime, bool bFadeAudio) { NativeCall((DWORD64)this, "APlayerController", "ClientSetCameraFade_Implementation", bEnableFading, FadeColor, FadeAlpha, FadeTime, bFadeAudio); } - void SendClientAdjustment() { NativeCall((DWORD64)this, "APlayerController", "SendClientAdjustment"); } - void ClientCapBandwidth_Implementation(int Cap) { NativeCall((DWORD64)this, "APlayerController", "ClientCapBandwidth_Implementation", Cap); } - void SetSpawnLocation(FVector* NewLocation) { NativeCall((DWORD64)this, "APlayerController", "SetSpawnLocation", NewLocation); } - void SetInitialLocationAndRotation(FVector* NewLocation, FRotator* NewRotation) { NativeCall((DWORD64)this, "APlayerController", "SetInitialLocationAndRotation", NewLocation, NewRotation); } - void ServerUpdateCamera_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerUpdateCamera_Implementation"); } - void RestartLevel() { NativeCall((DWORD64)this, "APlayerController", "RestartLevel"); } - void LocalTravel(FString* FURL) { NativeCall((DWORD64)this, "APlayerController", "LocalTravel", FURL); } - void ClientReturnToMainMenu_Implementation(FString* ReturnReason) { NativeCall((DWORD64)this, "APlayerController", "ClientReturnToMainMenu_Implementation", ReturnReason); } - void Pause() { NativeCall((DWORD64)this, "APlayerController", "Pause"); } - void ServerPause_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerPause_Implementation"); } - void SetName(FString* S) { NativeCall((DWORD64)this, "APlayerController", "SetName", S); } - void ServerChangeName_Implementation(FString* S) { NativeCall((DWORD64)this, "APlayerController", "ServerChangeName_Implementation", S); } - bool ServerChangeName_Validate(FString* S) { return NativeCall((DWORD64)this, "APlayerController", "ServerChangeName_Validate", S); } - void SwitchLevel(FString* FURL) { NativeCall((DWORD64)this, "APlayerController", "SwitchLevel", FURL); } - void NotifyLoadedWorld(FName WorldPackageName, bool bFinalDest) { NativeCall((DWORD64)this, "APlayerController", "NotifyLoadedWorld", WorldPackageName, bFinalDest); } - void GameHasEnded(AActor* EndGameFocus, bool bIsWinner) { NativeCall((DWORD64)this, "APlayerController", "GameHasEnded", EndGameFocus, bIsWinner); } - void ClientGameEnded_Implementation(AActor* EndGameFocus, bool bIsWinner) { NativeCall((DWORD64)this, "APlayerController", "ClientGameEnded_Implementation", EndGameFocus, bIsWinner); } - //bool GetHitResultUnderCursor(ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultUnderCursor", TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultUnderCursorByChannel(ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultUnderCursorByChannel", TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultUnderCursorForObjects(TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>((DWORD64)this, "APlayerController", "GetHitResultUnderCursorForObjects", ObjectTypes, bTraceComplex, HitResult); } - //bool GetHitResultUnderFinger(ETouchIndex::Type FingerIndex, ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultUnderFinger", FingerIndex, TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultUnderFingerByChannel(ETouchIndex::Type FingerIndex, ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultUnderFingerByChannel", FingerIndex, TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultUnderFingerForObjects(ETouchIndex::Type FingerIndex, TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>((DWORD64)this, "APlayerController", "GetHitResultUnderFingerForObjects", FingerIndex, ObjectTypes, bTraceComplex, HitResult); } - bool DeprojectMousePositionToWorld(FVector* WorldLocation, FVector* WorldDirection) { return NativeCall((DWORD64)this, "APlayerController", "DeprojectMousePositionToWorld", WorldLocation, WorldDirection); } - bool DeprojectScreenPositionToWorld(float ScreenX, float ScreenY, FVector* WorldLocation, FVector* WorldDirection) { return NativeCall((DWORD64)this, "APlayerController", "DeprojectScreenPositionToWorld", ScreenX, ScreenY, WorldLocation, WorldDirection); } - bool ProjectWorldLocationToScreen() { return NativeCall((DWORD64)this, "APlayerController", "ProjectWorldLocationToScreen"); } - //bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultAtScreenPosition", ScreenPosition, TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall((DWORD64)this, "APlayerController", "GetHitResultAtScreenPosition", ScreenPosition, TraceChannel, bTraceComplex, HitResult); } - //bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>((DWORD64)this, "APlayerController", "GetHitResultAtScreenPosition", ScreenPosition, ObjectTypes, bTraceComplex, HitResult); } - void PlayerTick(float DeltaTime) { NativeCall((DWORD64)this, "APlayerController", "PlayerTick", DeltaTime); } - void FlushPressedKeys() { NativeCall((DWORD64)this, "APlayerController", "FlushPressedKeys"); } - bool InputKey() { return NativeCall((DWORD64)this, "APlayerController", "InputKey"); } - bool InputAxis() { return NativeCall((DWORD64)this, "APlayerController", "InputAxis"); } - bool InputMotion(FVector* Tilt, FVector* RotationRate, FVector* Gravity, FVector* Acceleration) { return NativeCall((DWORD64)this, "APlayerController", "InputMotion", Tilt, RotationRate, Gravity, Acceleration); } - bool ShouldShowMouseCursor() { return NativeCall((DWORD64)this, "APlayerController", "ShouldShowMouseCursor"); } - void SetupInputComponent() { NativeCall((DWORD64)this, "APlayerController", "SetupInputComponent"); } - void ProcessPlayerInput(const float DeltaTime, const bool bGamePaused) { NativeCall((DWORD64)this, "APlayerController", "ProcessPlayerInput", DeltaTime, bGamePaused); } - void PostProcessInput(const float DeltaTime, const bool bGamePaused) { NativeCall((DWORD64)this, "APlayerController", "PostProcessInput", DeltaTime, bGamePaused); } - void ResetIgnoreInputFlags() { NativeCall((DWORD64)this, "APlayerController", "ResetIgnoreInputFlags"); } - void SetCinematicMode(bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning) { NativeCall((DWORD64)this, "APlayerController", "SetCinematicMode", bInCinematicMode, bAffectsMovement, bAffectsTurning); } - void SetIgnoreMoveInput(bool bNewMoveInput) { NativeCall((DWORD64)this, "APlayerController", "SetIgnoreMoveInput", bNewMoveInput); } - bool IsMoveInputIgnored() { return NativeCall((DWORD64)this, "APlayerController", "IsMoveInputIgnored"); } - void SetIgnoreLookInput(bool bNewLookInput) { NativeCall((DWORD64)this, "APlayerController", "SetIgnoreLookInput", bNewLookInput); } - bool IsLookInputIgnored() { return NativeCall((DWORD64)this, "APlayerController", "IsLookInputIgnored"); } - void ClientSetViewTarget_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientSetViewTarget_Implementation"); } - void ServerVerifyViewTarget_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerVerifyViewTarget_Implementation"); } - void SpawnPlayerCameraManager() { NativeCall((DWORD64)this, "APlayerController", "SpawnPlayerCameraManager"); } - void GetAudioListenerPosition(FVector* OutLocation, FVector* OutFrontDir, FVector* OutRightDir) { NativeCall((DWORD64)this, "APlayerController", "GetAudioListenerPosition", OutLocation, OutFrontDir, OutRightDir); } - void ServerCheckClientPossession_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerCheckClientPossession_Implementation"); } - void SafeServerCheckClientPossession() { NativeCall((DWORD64)this, "APlayerController", "SafeServerCheckClientPossession"); } - void SafeServerUpdateSpectatorState() { NativeCall((DWORD64)this, "APlayerController", "SafeServerUpdateSpectatorState"); } - void ServerSetSpectatorLocation_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerSetSpectatorLocation_Implementation"); } - void ServerViewNextPlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerViewNextPlayer_Implementation"); } - void ServerViewPrevPlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerViewPrevPlayer_Implementation"); } - APlayerState* GetNextViewablePlayer(int dir) { return NativeCall((DWORD64)this, "APlayerController", "GetNextViewablePlayer", dir); } - void ViewAPlayer(int dir) { NativeCall((DWORD64)this, "APlayerController", "ViewAPlayer", dir); } - void ServerViewSelf_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerViewSelf_Implementation"); } - void StartFire(char FireModeNum) { NativeCall((DWORD64)this, "APlayerController", "StartFire", FireModeNum); } - bool NotifyServerReceivedClientData(APawn* InPawn, float TimeStamp) { return NativeCall((DWORD64)this, "APlayerController", "NotifyServerReceivedClientData", InPawn, TimeStamp); } - void ServerRestartPlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerRestartPlayer_Implementation"); } - bool CanRestartPlayer() { return NativeCall((DWORD64)this, "APlayerController", "CanRestartPlayer"); } - void ClientIgnoreMoveInput_Implementation(bool bIgnore) { NativeCall((DWORD64)this, "APlayerController", "ClientIgnoreMoveInput_Implementation", bIgnore); } - void ClientIgnoreLookInput_Implementation(bool bIgnore) { NativeCall((DWORD64)this, "APlayerController", "ClientIgnoreLookInput_Implementation", bIgnore); } - void SetCinematicMode(bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning) { NativeCall((DWORD64)this, "APlayerController", "SetCinematicMode", bInCinematicMode, bHidePlayer, bAffectsHUD, bAffectsMovement, bAffectsTurning); } - void ClientSetCinematicMode_Implementation(bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning, bool bAffectsHUD) { NativeCall((DWORD64)this, "APlayerController", "ClientSetCinematicMode_Implementation", bInCinematicMode, bAffectsMovement, bAffectsTurning, bAffectsHUD); } - void ClientForceGarbageCollection_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientForceGarbageCollection_Implementation"); } - void ClientPrepareMapChange_Implementation(FName LevelName, bool bFirst, bool bLast) { NativeCall((DWORD64)this, "APlayerController", "ClientPrepareMapChange_Implementation", LevelName, bFirst, bLast); } - void DelayedPrepareMapChange() { NativeCall((DWORD64)this, "APlayerController", "DelayedPrepareMapChange"); } - void ClientCommitMapChange_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientCommitMapChange_Implementation"); } - void ClientCancelPendingMapChange_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientCancelPendingMapChange_Implementation"); } - void ClientSetBlockOnAsyncLoading_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientSetBlockOnAsyncLoading_Implementation"); } - void GetSeamlessTravelActorList(bool bToEntry, TArray* ActorList) { NativeCall *>((DWORD64)this, "APlayerController", "GetSeamlessTravelActorList", bToEntry, ActorList); } - void SeamlessTravelFrom(APlayerController* OldPC) { NativeCall((DWORD64)this, "APlayerController", "SeamlessTravelFrom", OldPC); } - void ClientEnableNetworkVoice_Implementation(bool bEnable) { NativeCall((DWORD64)this, "APlayerController", "ClientEnableNetworkVoice_Implementation", bEnable); } - void StartTalking() { NativeCall((DWORD64)this, "APlayerController", "StartTalking"); } - void ToggleSpeaking(bool bSpeaking) { NativeCall((DWORD64)this, "APlayerController", "ToggleSpeaking", bSpeaking); } - void ClientVoiceHandshakeComplete_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientVoiceHandshakeComplete_Implementation"); } - void ServerMutePlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerMutePlayer_Implementation"); } - bool ServerUnmutePlayer_Validate() { return NativeCall((DWORD64)this, "APlayerController", "ServerUnmutePlayer_Validate"); } - void ServerUnmutePlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerUnmutePlayer_Implementation"); } - void ClientMutePlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientMutePlayer_Implementation"); } - void ClientUnmutePlayer_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientUnmutePlayer_Implementation"); } - bool IsPlayerMuted(FUniqueNetId* PlayerId) { return NativeCall((DWORD64)this, "APlayerController", "IsPlayerMuted", PlayerId); } - bool ShouldReplicateVoicePacketFrom(FUniqueNetId* Sender, char* PlaybackFlags) { return NativeCall((DWORD64)this, "APlayerController", "ShouldReplicateVoicePacketFrom", Sender, PlaybackFlags); } - void ClientWasKicked_Implementation(FText* KickReason) { NativeCall((DWORD64)this, "APlayerController", "ClientWasKicked_Implementation", KickReason); } - bool IsSplitscreenPlayer(int* OutSplitscreenPlayerIndex) { return NativeCall((DWORD64)this, "APlayerController", "IsSplitscreenPlayer", OutSplitscreenPlayerIndex); } - void ClientPrestreamTextures_Implementation(AActor* ForcedActor, float ForceDuration, bool bEnableStreaming, int CinematicTextureGroups) { NativeCall((DWORD64)this, "APlayerController", "ClientPrestreamTextures_Implementation", ForcedActor, ForceDuration, bEnableStreaming, CinematicTextureGroups); } - void PlayDynamicForceFeedback() { NativeCall((DWORD64)this, "APlayerController", "PlayDynamicForceFeedback"); } - void ProcessForceFeedback(const float DeltaTime, const bool bGamePaused) { NativeCall((DWORD64)this, "APlayerController", "ProcessForceFeedback", DeltaTime, bGamePaused); } - void ClientPlayCameraShake_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientPlayCameraShake_Implementation"); } - void ClientPlayCameraAnim_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientPlayCameraAnim_Implementation"); } - void ClientClearCameraLensEffects_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientClearCameraLensEffects_Implementation"); } - void SetPawn(APawn* InPawn) { NativeCall((DWORD64)this, "APlayerController", "SetPawn", InPawn); } - void SetPlayer(UPlayer* InPlayer) { NativeCall((DWORD64)this, "APlayerController", "SetPlayer", InPlayer); } - void TickPlayerInput(const float DeltaSeconds, const bool bGamePaused) { NativeCall((DWORD64)this, "APlayerController", "TickPlayerInput", DeltaSeconds, bGamePaused); } - bool IsNetRelevantFor(APlayerController* RealViewer, AActor* Viewer, FVector* SrcLocation) { return NativeCall((DWORD64)this, "APlayerController", "IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } - void ClientTravel() { NativeCall((DWORD64)this, "APlayerController", "ClientTravel"); } - void ClientTravelInternal_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientTravelInternal_Implementation"); } - bool DefaultCanUnpause() { return NativeCall((DWORD64)this, "APlayerController", "DefaultCanUnpause"); } - void StartSpectatingOnly() { NativeCall((DWORD64)this, "APlayerController", "StartSpectatingOnly"); } - void EndPlayingState() { NativeCall((DWORD64)this, "APlayerController", "EndPlayingState"); } - void BeginSpectatingState() { NativeCall((DWORD64)this, "APlayerController", "BeginSpectatingState"); } - void DestroySpectatorPawn() { NativeCall((DWORD64)this, "APlayerController", "DestroySpectatorPawn"); } - void UpdateStateInputComponents() { NativeCall((DWORD64)this, "APlayerController", "UpdateStateInputComponents"); } - void ChangeState(FName NewState) { NativeCall((DWORD64)this, "APlayerController", "ChangeState", NewState); } - void EndSpectatingState() { NativeCall((DWORD64)this, "APlayerController", "EndSpectatingState"); } - void BeginInactiveState() { NativeCall((DWORD64)this, "APlayerController", "BeginInactiveState"); } - void AddPitchInput(float Val) { NativeCall((DWORD64)this, "APlayerController", "AddPitchInput", Val); } - void AddYawInput(float Val) { NativeCall((DWORD64)this, "APlayerController", "AddYawInput", Val); } - void AddRollInput(float Val) { NativeCall((DWORD64)this, "APlayerController", "AddRollInput", Val); } - bool IsInputKeyDown() { return NativeCall((DWORD64)this, "APlayerController", "IsInputKeyDown"); } - bool WasInputKeyJustPressed() { return NativeCall((DWORD64)this, "APlayerController", "WasInputKeyJustPressed"); } - bool WasInputKeyJustReleased() { return NativeCall((DWORD64)this, "APlayerController", "WasInputKeyJustReleased"); } - float GetInputAnalogKeyState() { return NativeCall((DWORD64)this, "APlayerController", "GetInputAnalogKeyState"); } - FVector* GetInputVectorKeyState() { return NativeCall((DWORD64)this, "APlayerController", "GetInputVectorKeyState"); } - void GetInputMotionState(FVector* Tilt, FVector* RotationRate, FVector* Gravity, FVector* Acceleration) { NativeCall((DWORD64)this, "APlayerController", "GetInputMotionState", Tilt, RotationRate, Gravity, Acceleration); } - float GetInputKeyTimeDown() { return NativeCall((DWORD64)this, "APlayerController", "GetInputKeyTimeDown"); } - bool GetMousePosition(float* LocationX, float* LocationY) { return NativeCall((DWORD64)this, "APlayerController", "GetMousePosition", LocationX, LocationY); } - void GetInputMouseDelta(float* DeltaX, float* DeltaY) { NativeCall((DWORD64)this, "APlayerController", "GetInputMouseDelta", DeltaX, DeltaY); } - void EnableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "APlayerController", "EnableInput", PlayerController); } - void DisableInput(APlayerController* PlayerController) { NativeCall((DWORD64)this, "APlayerController", "DisableInput", PlayerController); } - void SetVirtualJoystickVisibility(bool bVisible) { NativeCall((DWORD64)this, "APlayerController", "SetVirtualJoystickVisibility", bVisible); } - void UpdateCameraManager(float DeltaSeconds) { NativeCall((DWORD64)this, "APlayerController", "UpdateCameraManager", DeltaSeconds); } - void ClientRepObjRef_Implementation(UObject* Object) { NativeCall((DWORD64)this, "APlayerController", "ClientRepObjRef_Implementation", Object); } - void NetSpawnActorAtLocation_Implementation() { NativeCall((DWORD64)this, "APlayerController", "NetSpawnActorAtLocation_Implementation"); } - void ServerReceivedPlayerControllerAck_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerReceivedPlayerControllerAck_Implementation"); } - void ClientProcessNetExecCommandUnreliable_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientProcessNetExecCommandUnreliable_Implementation"); } - void ServerProcessNetExecCommand_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ServerProcessNetExecCommand_Implementation"); } - void ClientProcessNetExecCommandBP_Implementation() { NativeCall((DWORD64)this, "APlayerController", "ClientProcessNetExecCommandBP_Implementation"); } - void ClientClearCameraLensEffects() { NativeCall((DWORD64)this, "APlayerController", "ClientClearCameraLensEffects"); } - void ClientCommitMapChange() { NativeCall((DWORD64)this, "APlayerController", "ClientCommitMapChange"); } - void ClientEnableNetworkVoice(bool bEnable) { NativeCall((DWORD64)this, "APlayerController", "ClientEnableNetworkVoice", bEnable); } - void ClientMessage(FString* S, FName Type, float MsgLifeTime) { NativeCall((DWORD64)this, "APlayerController", "ClientMessage", S, Type, MsgLifeTime); } - void ClientMutePlayer() { NativeCall((DWORD64)this, "APlayerController", "ClientMutePlayer"); } - void ClientPlayCameraShake() { NativeCall((DWORD64)this, "APlayerController", "ClientPlayCameraShake"); } - void ClientProcessNetExecCommandBP() { NativeCall((DWORD64)this, "APlayerController", "ClientProcessNetExecCommandBP"); } - void ClientProcessNetExecCommandUnreliableBP() { NativeCall((DWORD64)this, "APlayerController", "ClientProcessNetExecCommandUnreliableBP"); } - void ClientRepObjRef(UObject* Object) { NativeCall((DWORD64)this, "APlayerController", "ClientRepObjRef", Object); } - void ClientReturnToMainMenu(FString* ReturnReason) { NativeCall((DWORD64)this, "APlayerController", "ClientReturnToMainMenu", ReturnReason); } - void ClientSetViewTarget() { NativeCall((DWORD64)this, "APlayerController", "ClientSetViewTarget"); } - void ClientTeamMessage(APlayerState* SenderPlayerState, FString* S, FName Type, float MsgLifeTime) { NativeCall((DWORD64)this, "APlayerController", "ClientTeamMessage", SenderPlayerState, S, Type, MsgLifeTime); } - void ClientUnmutePlayer() { NativeCall((DWORD64)this, "APlayerController", "ClientUnmutePlayer"); } - void ClientVoiceHandshakeComplete() { NativeCall((DWORD64)this, "APlayerController", "ClientVoiceHandshakeComplete"); } - void ClientWasKicked(FText* KickReason) { NativeCall((DWORD64)this, "APlayerController", "ClientWasKicked", KickReason); } - void ServerChangeName(FString* S) { NativeCall((DWORD64)this, "APlayerController", "ServerChangeName", S); } - void ServerMutePlayer() { NativeCall((DWORD64)this, "APlayerController", "ServerMutePlayer"); } - void ServerProcessNetExecCommand() { NativeCall((DWORD64)this, "APlayerController", "ServerProcessNetExecCommand"); } - void ServerProcessNetExecCommandUnreliable() { NativeCall((DWORD64)this, "APlayerController", "ServerProcessNetExecCommandUnreliable"); } - void ServerRestartPlayer() { NativeCall((DWORD64)this, "APlayerController", "ServerRestartPlayer"); } - void ServerUnmutePlayer() { NativeCall((DWORD64)this, "APlayerController", "ServerUnmutePlayer"); } - void ServerVerifyViewTarget() { NativeCall((DWORD64)this, "APlayerController", "ServerVerifyViewTarget"); } -}; - -struct AShooterPlayerController : APlayerController -{ - char* GetHeldItemSlotField() const { return GetNativeField(this, "AShooterPlayerController", "HeldItemSlot"); } //char[10] - char* GetUsedItemSlotField() const { return GetNativeField(this, "AShooterPlayerController", "UsedItemSlot"); } //char[10] - FVector GetCurrentPlayerCharacterLocationField() const { return GetNativeField(this, "AShooterPlayerController", "CurrentPlayerCharacterLocation"); } - void SetCurrentPlayerCharacterLocationField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "CurrentPlayerCharacterLocation", newValue); } - //APrimalStructurePlacer * GetStructurePlacerField() const { return GetNativeField(this, "AShooterPlayerController", "StructurePlacer"); } - FVector GetLastDeathLocationField() const { return GetNativeField(this, "AShooterPlayerController", "LastDeathLocation"); } - void SetLastDeathLocationField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "LastDeathLocation", newValue); } - long double GetLastDeathTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastDeathTime"); } - void SetLastDeathTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastDeathTime", newValue); } - TWeakObjectPtr GetLastDeathPrimalCharacterField() const { return GetNativeField>(this, "AShooterPlayerController", "LastDeathPrimalCharacter"); } - void SetLastDeathPrimalCharacterField(TWeakObjectPtr newValue) { SetNativeField(this, "AShooterPlayerController", "LastDeathPrimalCharacter", newValue); } - bool GetbWasDeadField() const { return GetNativeField(this, "AShooterPlayerController", "bWasDead"); } - void SetbWasDeadField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bWasDead", newValue); } - long double GetLastDeadCharacterDestructionTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastDeadCharacterDestructionTime"); } - void SetLastDeadCharacterDestructionTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastDeadCharacterDestructionTime", newValue); } - bool GetbShowGameModeHUDField() const { return GetNativeField(this, "AShooterPlayerController", "bShowGameModeHUD"); } - void SetbShowGameModeHUDField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bShowGameModeHUD", newValue); } - FVector2D GetCurrentRadialDirection1Field() const { return GetNativeField(this, "AShooterPlayerController", "CurrentRadialDirection1"); } - void SetCurrentRadialDirection1Field(FVector2D newValue) { SetNativeField(this, "AShooterPlayerController", "CurrentRadialDirection1", newValue); } - FVector2D GetCurrentRadialDirection2Field() const { return GetNativeField(this, "AShooterPlayerController", "CurrentRadialDirection2"); } - void SetCurrentRadialDirection2Field(FVector2D newValue) { SetNativeField(this, "AShooterPlayerController", "CurrentRadialDirection2", newValue); } - TWeakObjectPtr GetSelectedSlotItemField() const { return GetNativeField>(this, "AShooterPlayerController", "SelectedSlotItem"); } - void SetSelectedSlotItemField(TWeakObjectPtr newValue) { SetNativeField(this, "AShooterPlayerController", "SelectedSlotItem", newValue); } - USoundCue* GetSelectSlotSoundField() const { return GetNativeField(this, "AShooterPlayerController", "SelectSlotSound"); } - void SetSelectSlotSoundField(USoundCue* newValue) { SetNativeField(this, "AShooterPlayerController", "SelectSlotSound", newValue); } - bool GetbPlayerSpeakingField() const { return GetNativeField(this, "AShooterPlayerController", "bPlayerSpeaking"); } - void SetbPlayerSpeakingField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bPlayerSpeaking", newValue); } - int GetCurrentGameModeMaxNumOfRespawnsField() const { return GetNativeField(this, "AShooterPlayerController", "CurrentGameModeMaxNumOfRespawns"); } - void SetCurrentGameModeMaxNumOfRespawnsField(int newValue) { SetNativeField(this, "AShooterPlayerController", "CurrentGameModeMaxNumOfRespawns", newValue); } - unsigned __int64 GetTargetOrbitedPlayerIdField() const { return GetNativeField(this, "AShooterPlayerController", "TargetOrbitedPlayerId"); } - void SetTargetOrbitedPlayerIdField(unsigned __int64 newValue) { SetNativeField(this, "AShooterPlayerController", "TargetOrbitedPlayerId", newValue); } - char GetTargetOrbitedTrialCountField() const { return GetNativeField(this, "AShooterPlayerController", "TargetOrbitedTrialCount"); } - void SetTargetOrbitedTrialCountField(char newValue) { SetNativeField(this, "AShooterPlayerController", "TargetOrbitedTrialCount", newValue); } - TWeakObjectPtr GetLastControlledPlayerCharacterField() const { return GetNativeField>(this, "AShooterPlayerController", "LastControlledPlayerCharacter"); } - void SetLastControlledPlayerCharacterField(TWeakObjectPtr newValue) { SetNativeField(this, "AShooterPlayerController", "LastControlledPlayerCharacter", newValue); } - float GetMaxUseDistanceField() const { return GetNativeField(this, "AShooterPlayerController", "MaxUseDistance"); } - void SetMaxUseDistanceField(float newValue) { SetNativeField(this, "AShooterPlayerController", "MaxUseDistance", newValue); } - float GetMaxUseCheckRadiusField() const { return GetNativeField(this, "AShooterPlayerController", "MaxUseCheckRadius"); } - void SetMaxUseCheckRadiusField(float newValue) { SetNativeField(this, "AShooterPlayerController", "MaxUseCheckRadius", newValue); } - TArray> GetRemoteViewingInventoriesField() const { return GetNativeField>>(this, "AShooterPlayerController", "RemoteViewingInventories"); } - void SetRemoteViewingInventoriesField(TArray> newValue) { SetNativeField(this, "AShooterPlayerController", "RemoteViewingInventories", newValue); } - TWeakObjectPtr GetLastHeldUseActorField() const { return GetNativeField>(this, "AShooterPlayerController", "LastHeldUseActor"); } - void SetLastHeldUseActorField(TWeakObjectPtr newValue) { SetNativeField(this, "AShooterPlayerController", "LastHeldUseActor", newValue); } - int GetLastHeldUseHitBodyIndexField() const { return GetNativeField(this, "AShooterPlayerController", "LastHeldUseHitBodyIndex"); } - void SetLastHeldUseHitBodyIndexField(int newValue) { SetNativeField(this, "AShooterPlayerController", "LastHeldUseHitBodyIndex", newValue); } - bool GetbUsePressedFromGamepadField() const { return GetNativeField(this, "AShooterPlayerController", "bUsePressedFromGamepad"); } - void SetbUsePressedFromGamepadField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bUsePressedFromGamepad", newValue); } - TWeakObjectPtr GetSpawnAtBedField() const { return GetNativeField>(this, "AShooterPlayerController", "SpawnAtBed"); } - void SetSpawnAtBedField(TWeakObjectPtr newValue) { SetNativeField(this, "AShooterPlayerController", "SpawnAtBed", newValue); } - APawn* GetTempLastLostPawnField() const { return GetNativeField(this, "AShooterPlayerController", "TempLastLostPawn"); } - void SetTempLastLostPawnField(APawn* newValue) { SetNativeField(this, "AShooterPlayerController", "TempLastLostPawn", newValue); } - bool GetbLockedInputDontRecenterMouseField() const { return GetNativeField(this, "AShooterPlayerController", "bLockedInputDontRecenterMouse"); } - void SetbLockedInputDontRecenterMouseField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bLockedInputDontRecenterMouse", newValue); } - long double GetLastRespawnTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastRespawnTime"); } - void SetLastRespawnTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastRespawnTime", newValue); } - bool GetbIsFirstSpawnField() const { return GetNativeField(this, "AShooterPlayerController", "bIsFirstSpawn"); } - void SetbIsFirstSpawnField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bIsFirstSpawn", newValue); } - bool GetbIsRespawningField() const { return GetNativeField(this, "AShooterPlayerController", "bIsRespawning"); } - void SetbIsRespawningField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bIsRespawning", newValue); } - bool GetbIsVRPlayerField() const { return GetNativeField(this, "AShooterPlayerController", "bIsVRPlayer"); } - void SetbIsVRPlayerField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bIsVRPlayer", newValue); } - FItemNetID GetLastEquipedItemNetIDField() const { return GetNativeField(this, "AShooterPlayerController", "LastEquipedItemNetID"); } - void SetLastEquipedItemNetIDField(FItemNetID newValue) { SetNativeField(this, "AShooterPlayerController", "LastEquipedItemNetID", newValue); } - FItemNetID GetLastUnequippedItemNetIDField() const { return GetNativeField(this, "AShooterPlayerController", "LastUnequippedItemNetID"); } - void SetLastUnequippedItemNetIDField(FItemNetID newValue) { SetNativeField(this, "AShooterPlayerController", "LastUnequippedItemNetID", newValue); } - __int64 GetLinkedPlayerIDField() const { return GetNativeField<__int64>(this, "AShooterPlayerController", "LinkedPlayerID"); } - void SetLinkedPlayerIDField(__int64 newValue) { SetNativeField(this, "AShooterPlayerController", "LinkedPlayerID", newValue); } - bool GetbDrawLocationField() const { return GetNativeField(this, "AShooterPlayerController", "bDrawLocation"); } - void SetbDrawLocationField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bDrawLocation", newValue); } - int GetPlayerControllerNumField() const { return GetNativeField(this, "AShooterPlayerController", "PlayerControllerNum"); } - void SetPlayerControllerNumField(int newValue) { SetNativeField(this, "AShooterPlayerController", "PlayerControllerNum", newValue); } - FVector GetLastTurnSpeedField() const { return GetNativeField(this, "AShooterPlayerController", "LastTurnSpeed"); } - void SetLastTurnSpeedField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "LastTurnSpeed", newValue); } - long double GetLastMultiUseInteractionTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastMultiUseInteractionTime"); } - void SetLastMultiUseInteractionTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastMultiUseInteractionTime", newValue); } - float GetLastTimeSentCarriedRotationField() const { return GetNativeField(this, "AShooterPlayerController", "LastTimeSentCarriedRotation"); } - void SetLastTimeSentCarriedRotationField(float newValue) { SetNativeField(this, "AShooterPlayerController", "LastTimeSentCarriedRotation", newValue); } - FItemNetID GetLastSteamItemIDToRemoveField() const { return GetNativeField(this, "AShooterPlayerController", "LastSteamItemIDToRemove"); } - void SetLastSteamItemIDToRemoveField(FItemNetID newValue) { SetNativeField(this, "AShooterPlayerController", "LastSteamItemIDToRemove", newValue); } - FItemNetID GetLastSteamItemIDToAddField() const { return GetNativeField(this, "AShooterPlayerController", "LastSteamItemIDToAdd"); } - void SetLastSteamItemIDToAddField(FItemNetID newValue) { SetNativeField(this, "AShooterPlayerController", "LastSteamItemIDToAdd", newValue); } - bool GetbConsumeItemSucceededField() const { return GetNativeField(this, "AShooterPlayerController", "bConsumeItemSucceeded"); } - void SetbConsumeItemSucceededField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bConsumeItemSucceeded", newValue); } - bool GetbRefreshedInvetoryForRemoveField() const { return GetNativeField(this, "AShooterPlayerController", "bRefreshedInvetoryForRemove"); } - void SetbRefreshedInvetoryForRemoveField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bRefreshedInvetoryForRemove", newValue); } - bool GetbServerRefreshedSteamInventoryField() const { return GetNativeField(this, "AShooterPlayerController", "bServerRefreshedSteamInventory"); } - void SetbServerRefreshedSteamInventoryField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bServerRefreshedSteamInventory", newValue); } - bool GetbServerRefreshStatusField() const { return GetNativeField(this, "AShooterPlayerController", "bServerRefreshStatus"); } - void SetbServerRefreshStatusField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bServerRefreshStatus", newValue); } - bool GetbCloseSteamStatusSceneField() const { return GetNativeField(this, "AShooterPlayerController", "bCloseSteamStatusScene"); } - void SetbCloseSteamStatusSceneField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bCloseSteamStatusScene", newValue); } - long double GetLastSteamInventoryRefreshTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastSteamInventoryRefreshTime"); } - void SetLastSteamInventoryRefreshTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastSteamInventoryRefreshTime", newValue); } - long double GetLastRequesteDinoAncestorsTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastRequesteDinoAncestorsTime"); } - void SetLastRequesteDinoAncestorsTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastRequesteDinoAncestorsTime", newValue); } - long double GetLastDiedMessageTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastDiedMessageTime"); } - void SetLastDiedMessageTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastDiedMessageTime", newValue); } - long double GetLastNotifiedTorpidityIncreaseTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastNotifiedTorpidityIncreaseTime"); } - void SetLastNotifiedTorpidityIncreaseTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastNotifiedTorpidityIncreaseTime", newValue); } - long double GetLastInvDropRequestTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastInvDropRequestTime"); } - void SetLastInvDropRequestTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastInvDropRequestTime", newValue); } - long double GetLastHadPawnTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastHadPawnTime"); } - void SetLastHadPawnTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastHadPawnTime", newValue); } - long double GetLastChatMessageTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastChatMessageTime"); } - void SetLastChatMessageTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastChatMessageTime", newValue); } - FItemNetInfo GetARKTributeItemNetInfoField() const { return GetNativeField(this, "AShooterPlayerController", "ARKTributeItemNetInfo"); } - void SetARKTributeItemNetInfoField(FItemNetInfo newValue) { SetNativeField(this, "AShooterPlayerController", "ARKTributeItemNetInfo", newValue); } - bool GetbServerIsPaintingField() const { return GetNativeField(this, "AShooterPlayerController", "bServerIsPainting"); } - void SetbServerIsPaintingField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bServerIsPainting", newValue); } - bool GetbServerPaintingSuccessField() const { return GetNativeField(this, "AShooterPlayerController", "bServerPaintingSuccess"); } - void SetbServerPaintingSuccessField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bServerPaintingSuccess", newValue); } - long double GetLastListenServerNotifyOutOfRangeTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastListenServerNotifyOutOfRangeTime"); } - void SetLastListenServerNotifyOutOfRangeTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastListenServerNotifyOutOfRangeTime", newValue); } - int GetSpectatorCycleIndexField() const { return GetNativeField(this, "AShooterPlayerController", "SpectatorCycleIndex"); } - void SetSpectatorCycleIndexField(int newValue) { SetNativeField(this, "AShooterPlayerController", "SpectatorCycleIndex", newValue); } - bool GetbPossessedAnyPawnField() const { return GetNativeField(this, "AShooterPlayerController", "bPossessedAnyPawn"); } - void SetbPossessedAnyPawnField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bPossessedAnyPawn", newValue); } - bool GetbIsFastTravellingField() const { return GetNativeField(this, "AShooterPlayerController", "bIsFastTravelling"); } - void SetbIsFastTravellingField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bIsFastTravelling", newValue); } - bool GetbSuppressAdminIconField() const { return GetNativeField(this, "AShooterPlayerController", "bSuppressAdminIcon"); } - void SetbSuppressAdminIconField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bSuppressAdminIcon", newValue); } - long double GetWaitingForSpawnUITimeField() const { return GetNativeField(this, "AShooterPlayerController", "WaitingForSpawnUITime"); } - void SetWaitingForSpawnUITimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "WaitingForSpawnUITime", newValue); } - float GetChatSpamWeightField() const { return GetNativeField(this, "AShooterPlayerController", "ChatSpamWeight"); } - void SetChatSpamWeightField(float newValue) { SetNativeField(this, "AShooterPlayerController", "ChatSpamWeight", newValue); } - bool GetbChatSpammedField() const { return GetNativeField(this, "AShooterPlayerController", "bChatSpammed"); } - void SetbChatSpammedField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bChatSpammed", newValue); } - long double GetEnteredSpectatingStateTimeField() const { return GetNativeField(this, "AShooterPlayerController", "EnteredSpectatingStateTime"); } - void SetEnteredSpectatingStateTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "EnteredSpectatingStateTime", newValue); } - bool GetbPreventPaintingStreamingField() const { return GetNativeField(this, "AShooterPlayerController", "bPreventPaintingStreaming"); } - void SetbPreventPaintingStreamingField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bPreventPaintingStreaming", newValue); } - long double GetLastUsePressTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastUsePressTime"); } - void SetLastUsePressTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastUsePressTime", newValue); } - TArray GetPlayerAppIDsField() const { return GetNativeField>(this, "AShooterPlayerController", "PlayerAppIDs"); } - void SetPlayerAppIDsField(TArray newValue) { SetNativeField(this, "AShooterPlayerController", "PlayerAppIDs", newValue); } - TArray GetNotifiedTribeWarIDsField() const { return GetNativeField>(this, "AShooterPlayerController", "NotifiedTribeWarIDs"); } - void SetNotifiedTribeWarIDsField(TArray newValue) { SetNativeField(this, "AShooterPlayerController", "NotifiedTribeWarIDs", newValue); } - TArray GetNotifiedTribeWarNamesField() const { return GetNativeField>(this, "AShooterPlayerController", "NotifiedTribeWarNames"); } - void SetNotifiedTribeWarNamesField(TArray newValue) { SetNativeField(this, "AShooterPlayerController", "NotifiedTribeWarNames", newValue); } - int GetServerTribeLogLastLogIndexField() const { return GetNativeField(this, "AShooterPlayerController", "ServerTribeLogLastLogIndex"); } - void SetServerTribeLogLastLogIndexField(int newValue) { SetNativeField(this, "AShooterPlayerController", "ServerTribeLogLastLogIndex", newValue); } - int GetServerTribeLogLastTribeIDField() const { return GetNativeField(this, "AShooterPlayerController", "ServerTribeLogLastTribeID"); } - void SetServerTribeLogLastTribeIDField(int newValue) { SetNativeField(this, "AShooterPlayerController", "ServerTribeLogLastTribeID", newValue); } - FVector GetLastViewLocationField() const { return GetNativeField(this, "AShooterPlayerController", "LastViewLocation"); } - void SetLastViewLocationField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "LastViewLocation", newValue); } - bool GetbHasGottenInitialSpawnLocationField() const { return GetNativeField(this, "AShooterPlayerController", "bHasGottenInitialSpawnLocation"); } - void SetbHasGottenInitialSpawnLocationField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bHasGottenInitialSpawnLocation", newValue); } - bool GetbClientReceivedTribeLogField() const { return GetNativeField(this, "AShooterPlayerController", "bClientReceivedTribeLog"); } - void SetbClientReceivedTribeLogField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bClientReceivedTribeLog", newValue); } - TArray GetCurrentTribeLogField() const { return GetNativeField>(this, "AShooterPlayerController", "CurrentTribeLog"); } - void SetCurrentTribeLogField(TArray newValue) { SetNativeField(this, "AShooterPlayerController", "CurrentTribeLog", newValue); } - long double GetLastTribeLogRequestTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastTribeLogRequestTime"); } - void SetLastTribeLogRequestTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastTribeLogRequestTime", newValue); } - long double GetLastRPCStayAliveTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastRPCStayAliveTime"); } - void SetLastRPCStayAliveTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastRPCStayAliveTime", newValue); } - int GetPlayerBadgeGroupField() const { return GetNativeField(this, "AShooterPlayerController", "PlayerBadgeGroup"); } - void SetPlayerBadgeGroupField(int newValue) { SetNativeField(this, "AShooterPlayerController", "PlayerBadgeGroup", newValue); } - long double GetLastMultiUseTraceTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastMultiUseTraceTime"); } - void SetLastMultiUseTraceTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastMultiUseTraceTime", newValue); } - FVector GetLastLargeMoveLocationField() const { return GetNativeField(this, "AShooterPlayerController", "LastLargeMoveLocation"); } - void SetLastLargeMoveLocationField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "LastLargeMoveLocation", newValue); } - long double GetLastLargeMoveTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastLargeMoveTime"); } - void SetLastLargeMoveTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastLargeMoveTime", newValue); } - long double GetLastNotOnUnriddenDinoTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastNotOnUnriddenDinoTime"); } - void SetLastNotOnUnriddenDinoTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastNotOnUnriddenDinoTime", newValue); } - long double GetLastHitMarkerCharacterTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastHitMarkerCharacterTime"); } - void SetLastHitMarkerCharacterTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastHitMarkerCharacterTime", newValue); } - bool GetbLastHitMarkerCharacterAllyField() const { return GetNativeField(this, "AShooterPlayerController", "bLastHitMarkerCharacterAlly"); } - void SetbLastHitMarkerCharacterAllyField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bLastHitMarkerCharacterAlly", newValue); } - long double GetLastHitMarkerStructureTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastHitMarkerStructureTime"); } - void SetLastHitMarkerStructureTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastHitMarkerStructureTime", newValue); } - bool GetbLastHitMarkerStructureAllyField() const { return GetNativeField(this, "AShooterPlayerController", "bLastHitMarkerStructureAlly"); } - void SetbLastHitMarkerStructureAllyField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bLastHitMarkerStructureAlly", newValue); } - float GetDoFSettingCurrentTimerField() const { return GetNativeField(this, "AShooterPlayerController", "DoFSettingCurrentTimer"); } - void SetDoFSettingCurrentTimerField(float newValue) { SetNativeField(this, "AShooterPlayerController", "DoFSettingCurrentTimer", newValue); } - float GetDoFSettingTargetTimerField() const { return GetNativeField(this, "AShooterPlayerController", "DoFSettingTargetTimer"); } - void SetDoFSettingTargetTimerField(float newValue) { SetNativeField(this, "AShooterPlayerController", "DoFSettingTargetTimer", newValue); } - //TArray GetPlayerInventoryItemsField() const { return GetNativeField>(this, "AShooterPlayerController", "PlayerInventoryItems"); } - int GetLastSpawnPointIDField() const { return GetNativeField(this, "AShooterPlayerController", "LastSpawnPointID"); } - void SetLastSpawnPointIDField(int newValue) { SetNativeField(this, "AShooterPlayerController", "LastSpawnPointID", newValue); } - int GetLastSpawnRegionIndexField() const { return GetNativeField(this, "AShooterPlayerController", "LastSpawnRegionIndex"); } - void SetLastSpawnRegionIndexField(int newValue) { SetNativeField(this, "AShooterPlayerController", "LastSpawnRegionIndex", newValue); } - unsigned __int64 GetLastTransferredPlayerIDField() const { return GetNativeField(this, "AShooterPlayerController", "LastTransferredPlayerID"); } - void SetLastTransferredPlayerIDField(unsigned __int64 newValue) { SetNativeField(this, "AShooterPlayerController", "LastTransferredPlayerID", newValue); } - bool GetbReceivedSubscribedAppsField() const { return GetNativeField(this, "AShooterPlayerController", "bReceivedSubscribedApps"); } - void SetbReceivedSubscribedAppsField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bReceivedSubscribedApps", newValue); } - bool GetbIsTransferringCharacterField() const { return GetNativeField(this, "AShooterPlayerController", "bIsTransferringCharacter"); } - void SetbIsTransferringCharacterField(bool newValue) { SetNativeField(this, "AShooterPlayerController", "bIsTransferringCharacter", newValue); } - long double GetPossessedFirstPawnTimeField() const { return GetNativeField(this, "AShooterPlayerController", "PossessedFirstPawnTime"); } - void SetPossessedFirstPawnTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "PossessedFirstPawnTime", newValue); } - int GetSnapPointCycleField() const { return GetNativeField(this, "AShooterPlayerController", "SnapPointCycle"); } - void SetSnapPointCycleField(int newValue) { SetNativeField(this, "AShooterPlayerController", "SnapPointCycle", newValue); } - FVector GetLastSnapPointCyclePositionField() const { return GetNativeField(this, "AShooterPlayerController", "LastSnapPointCyclePosition"); } - void SetLastSnapPointCyclePositionField(FVector newValue) { SetNativeField(this, "AShooterPlayerController", "LastSnapPointCyclePosition", newValue); } - int GetViewingWheelCategoryField() const { return GetNativeField(this, "AShooterPlayerController", "ViewingWheelCategory"); } - void SetViewingWheelCategoryField(int newValue) { SetNativeField(this, "AShooterPlayerController", "ViewingWheelCategory", newValue); } - long double GetForceDrawCurrentGroupsUntilTimeField() const { return GetNativeField(this, "AShooterPlayerController", "ForceDrawCurrentGroupsUntilTime"); } - void SetForceDrawCurrentGroupsUntilTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "ForceDrawCurrentGroupsUntilTime", newValue); } - long double GetLastRequestedPlaceStructureTimeField() const { return GetNativeField(this, "AShooterPlayerController", "LastRequestedPlaceStructureTime"); } - void SetLastRequestedPlaceStructureTimeField(long double newValue) { SetNativeField(this, "AShooterPlayerController", "LastRequestedPlaceStructureTime", newValue); } - int GetPersonalDinoTameCountField() const { return GetNativeField(this, "AShooterPlayerController", "PersonalDinoTameCount"); } - void SetPersonalDinoTameCountField(int newValue) { SetNativeField(this, "AShooterPlayerController", "PersonalDinoTameCount", newValue); } - - // Functions - - void EnableCheats(FString Pass) { NativeCall((DWORD64)this, "AShooterPlayerController", "EnableCheats", Pass); } - void CheckCheatsPassword_Implementation(FString* Pass) { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckCheatsPassword_Implementation", Pass); } - void CheckRequestSpectator_Implementation(FString* InSpectatorPass) { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckRequestSpectator_Implementation", InSpectatorPass); } - void ServerStopSpectating_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerStopSpectating_Implementation"); } - TArray* GetCheatsCommands(TArray* result) { return NativeCall *, TArray *>((DWORD64)this, "AShooterPlayerController", "GetCheatsCommands", result); } - void SetupInputComponent() { NativeCall((DWORD64)this, "AShooterPlayerController", "SetupInputComponent"); } - void OnLevelView() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnLevelView"); } - void LevelView() { NativeCall((DWORD64)this, "AShooterPlayerController", "LevelView"); } - void SpectatorDetachOrbitCamera() { NativeCall((DWORD64)this, "AShooterPlayerController", "SpectatorDetachOrbitCamera"); } - void SpectatorPreviousPlayer() { NativeCall((DWORD64)this, "AShooterPlayerController", "SpectatorPreviousPlayer"); } - void SpectatorNextPlayer() { NativeCall((DWORD64)this, "AShooterPlayerController", "SpectatorNextPlayer"); } - void DelayedTeamSpectatorSetup() { NativeCall((DWORD64)this, "AShooterPlayerController", "DelayedTeamSpectatorSetup"); } - void ServerCycleSpectator_Implementation(bool bNext) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCycleSpectator_Implementation", bNext); } - void ServerSpectateToPlayerByID_Implementation(unsigned __int64 PlayerID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSpectateToPlayerByID_Implementation", PlayerID); } - void ClientTeleportSpectator_Implementation(FVector Location, unsigned __int64 PlayerID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientTeleportSpectator_Implementation", Location, PlayerID); } - void ForceCraftPressed() { NativeCall((DWORD64)this, "AShooterPlayerController", "ForceCraftPressed"); } - void ForceCraftReleased() { NativeCall((DWORD64)this, "AShooterPlayerController", "ForceCraftReleased"); } - void StopTalkingWrapper() { NativeCall((DWORD64)this, "AShooterPlayerController", "StopTalkingWrapper"); } - void ToggleHUDHidden() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleHUDHidden"); } - void OnUseItemSlotForStructure(int ItemSlotNumber) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnUseItemSlotForStructure", ItemSlotNumber); } - void OnUsePress(bool bFromGamepad) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnUsePress", bFromGamepad); } - bool GetAllAimedHarvestActors(float MaxDistance, TArray* OutHarvestActors, TArray* OutHarvestComponents, TArray* OutHitBodyIndices) { return NativeCall *, TArray *, TArray *>((DWORD64)this, "AShooterPlayerController", "GetAllAimedHarvestActors", MaxDistance, OutHarvestActors, OutHarvestComponents, OutHitBodyIndices); } - AActor* GetAimedUseActor(UActorComponent** UseComponent, int* hitBodyIndex) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetAimedUseActor", UseComponent, hitBodyIndex); } - void OnUseRelease(bool bFromGamepad) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnUseRelease", bFromGamepad); } - void ActivateMultiUseSelection(bool bIsFromUseRelease) { NativeCall((DWORD64)this, "AShooterPlayerController", "ActivateMultiUseSelection", bIsFromUseRelease); } - void CancelMultiUseSelection() { NativeCall((DWORD64)this, "AShooterPlayerController", "CancelMultiUseSelection"); } - void OnKeyboardUsePress() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnKeyboardUsePress"); } - void OnKeyboardUseRelease() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnKeyboardUseRelease"); } - void OnGamepadUsePress() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnGamepadUsePress"); } - void OnGamepadUseRelease() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnGamepadUseRelease"); } - void OnRepeatUseHeldTimer() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnRepeatUseHeldTimer"); } - void OnUseHeldTimer() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnUseHeldTimer"); } - void SetMultiUseWheelCategory(int Category) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetMultiUseWheelCategory", Category); } - void StartInventoryRadialSelector() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartInventoryRadialSelector"); } - void EndInventoryRadialSelector() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndInventoryRadialSelector"); } - void StartPlayerActionRadialSelector() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartPlayerActionRadialSelector"); } - void EndPlayerActionRadialSelector() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndPlayerActionRadialSelector"); } - void OnEmoteKey2Press() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnEmoteKey2Press"); } - void OnEmoteKey1Release() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnEmoteKey1Release"); } - void SaveSpectatorPos(int Index) { NativeCall((DWORD64)this, "AShooterPlayerController", "SaveSpectatorPos", Index); } - void LoadSpectatorPos(int Index) { NativeCall((DWORD64)this, "AShooterPlayerController", "LoadSpectatorPos", Index); } - void OnEmoteKey2Release() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnEmoteKey2Release"); } - void StartEmoteSelection() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartEmoteSelection"); } - void OnWhistlePress() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnWhistlePress"); } - void StartWhistleSelection() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartWhistleSelection"); } - void EndWhistleSelection() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndWhistleSelection"); } - void EndEmoteSelection() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndEmoteSelection"); } - void TriggerPlayerAction(int ActionIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "TriggerPlayerAction", ActionIndex); } - void ShowMyInventory() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowMyInventory"); } - void ShowMyCraftables() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowMyCraftables"); } - void ShowTribeManager() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowTribeManager"); } - void ShowGlobalChat() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowGlobalChat"); } - void ShowTribeChat() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowTribeChat"); } - void ShowAllianceChat() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowAllianceChat"); } - void ShowLocalChat() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowLocalChat"); } - void ShowTutorial(int TutorialIndex, bool bForceDisplay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowTutorial", TutorialIndex, bForceDisplay); } - void ClearTutorials() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClearTutorials"); } - void ToggleAutoChat() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleAutoChat"); } - void ScrollChatDown() { NativeCall((DWORD64)this, "AShooterPlayerController", "ScrollChatDown"); } - void ScrollChatUp() { NativeCall((DWORD64)this, "AShooterPlayerController", "ScrollChatUp"); } - void ToggleMap() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleMap"); } - void OpenMapMarkers() { NativeCall((DWORD64)this, "AShooterPlayerController", "OpenMapMarkers"); } - void ShowAllPlayersListToFollow() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowAllPlayersListToFollow"); } - void ToggleShowAllPlayersWhenSpectatingLocal() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleShowAllPlayersWhenSpectatingLocal"); } - void ToggleDinoNameTags() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleDinoNameTags"); } - void ToggleShowAllPlayersWhenSpectating() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleShowAllPlayersWhenSpectating"); } - void ToggleWeaponAccessory() { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleWeaponAccessory"); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterPlayerController", "BeginPlay"); } - void SaveProfile() { NativeCall((DWORD64)this, "AShooterPlayerController", "SaveProfile"); } - void ClientNotifyPaintFinished_Implementation(bool bSuccess) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPaintFinished_Implementation", bSuccess); } - bool IsValidUnStasisCaster() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsValidUnStasisCaster"); } - void ServerSetSpectatorLocation_Implementation(FVector NewLoc) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSetSpectatorLocation_Implementation", NewLoc); } - void SetPlayer(UPlayer* InPlayer) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetPlayer", InPlayer); } - void UnFreeze() { NativeCall((DWORD64)this, "AShooterPlayerController", "UnFreeze"); } - void ServerCheckUnfreeze_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCheckUnfreeze_Implementation"); } - void DoServerCheckUnfreeze_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "DoServerCheckUnfreeze_Implementation"); } - void FailedToSpawnPawn() { NativeCall((DWORD64)this, "AShooterPlayerController", "FailedToSpawnPawn"); } - void EnableSpectator() { NativeCall((DWORD64)this, "AShooterPlayerController", "EnableSpectator"); } - void DisableSpectator() { NativeCall((DWORD64)this, "AShooterPlayerController", "DisableSpectator"); } - void OnDisableSpectator_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnDisableSpectator_Implementation"); } - void ServerSaveWorld_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSaveWorld_Implementation"); } - void ServerLoadWorld_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerLoadWorld_Implementation"); } - void CheckforOrbiting() { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckforOrbiting"); } - bool CheckforOrbitingInstantaneously() { return NativeCall((DWORD64)this, "AShooterPlayerController", "CheckforOrbitingInstantaneously"); } - void OnToggleInGameMenu() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnToggleInGameMenu"); } - void OnToggleDoFMenu() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnToggleDoFMenu"); } - void MoveForward(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "MoveForward", Val); } - void MoveRight(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "MoveRight", Val); } - void TurnAtRate(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "TurnAtRate", Val); } - void LookUpAtRate(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "LookUpAtRate", Val); } - void SpectatorTurn(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "SpectatorTurn", Val); } - void TurnInput(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "TurnInput", Val); } - void LookInput(float Val) { NativeCall((DWORD64)this, "AShooterPlayerController", "LookInput", Val); } - void OnStartFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStartFire"); } - void OnStopFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStopFire"); } - void OnStartGamepadRightFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStartGamepadRightFire"); } - void OnStopGamepadRightFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStopGamepadRightFire"); } - void ShowBattleGameModeHUD() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowBattleGameModeHUD"); } - void OnStartTargeting() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStartTargeting"); } - void OnStopTargeting() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStopTargeting"); } - void OnStartGamepadLeftFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStartGamepadLeftFire"); } - void OnStopGamepadLeftFire() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnStopGamepadLeftFire"); } - void ServerRequestPlaceStructure_Implementation(int StructureIndex, FVector BuildLocation, FRotator BuildRotation, FRotator PlayerViewRotation, APawn* AttachToPawn, APrimalDinoCharacter* DinoCharacter, FName BoneName, FItemNetID PlaceUsingItemID, bool bSnapped, bool bIsCheat, bool bIsFlipped, int SnapPoCycle) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestPlaceStructure_Implementation", StructureIndex, BuildLocation, BuildRotation, PlayerViewRotation, AttachToPawn, DinoCharacter, BoneName, PlaceUsingItemID, bSnapped, bIsCheat, bIsFlipped, SnapPoCycle); } - void SetCinematicMode(bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetCinematicMode", bInCinematicMode, bHidePlayer, bAffectsHUD, bAffectsMovement, bAffectsTurning); } - void PawnLeavingGame() { NativeCall((DWORD64)this, "AShooterPlayerController", "PawnLeavingGame"); } - void InitInputSystem() { NativeCall((DWORD64)this, "AShooterPlayerController", "InitInputSystem"); } - void FlushPressedKeys() { NativeCall((DWORD64)this, "AShooterPlayerController", "FlushPressedKeys"); } - void EnemyInVisible(bool Invisible) { NativeCall((DWORD64)this, "AShooterPlayerController", "EnemyInVisible", Invisible); } - void ServerSuicide_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSuicide_Implementation"); } - void ServerRemovePassenger_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemovePassenger_Implementation"); } - void ClientTeamMessage_Implementation(APlayerState* SenderPlayerState, FString* S, FName Type, float MsgLifeTime) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientTeamMessage_Implementation", SenderPlayerState, S, Type, MsgLifeTime); } - void DrawHUD(AShooterHUD* HUD) { NativeCall((DWORD64)this, "AShooterPlayerController", "DrawHUD", HUD); } - void SetControlRotation(FRotator* NewRotation) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetControlRotation", NewRotation); } - void AcknowledgePossession(APawn* P) { NativeCall((DWORD64)this, "AShooterPlayerController", "AcknowledgePossession", P); } - void LeaveMeAlone() { NativeCall((DWORD64)this, "AShooterPlayerController", "LeaveMeAlone"); } - void InfiniteStats() { NativeCall((DWORD64)this, "AShooterPlayerController", "InfiniteStats"); } - void Destroyed() { NativeCall((DWORD64)this, "AShooterPlayerController", "Destroyed"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AShooterPlayerController", "PostInitializeComponents"); } - void ServerGetMessageOfTheDay_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerGetMessageOfTheDay_Implementation"); } - void ClientGetMessageOfTheDay_Implementation(FString* Message) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientGetMessageOfTheDay_Implementation", Message); } - void ServerReadMessageOFTheDay_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerReadMessageOFTheDay_Implementation"); } - void ClientStartReceivingActorItems_Implementation(UPrimalInventoryComponent* forInventory, bool bEquippedItems) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientStartReceivingActorItems_Implementation", forInventory, bEquippedItems); } - void ClientFinishedReceivingActorItems_Implementation(UPrimalInventoryComponent* forInventory, bool bEquippedItems) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFinishedReceivingActorItems_Implementation", forInventory, bEquippedItems); } - void ClientAddActorItem_Implementation(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddActorItem_Implementation", forInventory, itemInfo, bEquipItem, ShowHUDNotification); } - void ClientAddActorItemToFolder_Implementation(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification, FString* ToFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddActorItemToFolder_Implementation", forInventory, itemInfo, bEquipItem, ShowHUDNotification, ToFolder); } - void ClientAddItemToArk_Implementation(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bFromLoad) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddItemToArk_Implementation", forInventory, itemInfo, bFromLoad); } - void ClientAddFolderToInventoryComponent_Implementation(UPrimalInventoryComponent* forInventory, FString* NewCustomFolderName, int InventoryCompType) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddFolderToInventoryComponent_Implementation", forInventory, NewCustomFolderName, InventoryCompType); } - void ClientLoadArkItems_Implementation(UPrimalInventoryComponent* forInventory, TArray* itemInfos) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientLoadArkItems_Implementation", forInventory, itemInfos); } - void ClientFinishedLoadArkItems_Implementation(UPrimalInventoryComponent* forInventory) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFinishedLoadArkItems_Implementation", forInventory); } - void ClientInsertActorItem_Implementation(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, FItemNetID InsertAfterItemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientInsertActorItem_Implementation", forInventory, itemInfo, InsertAfterItemID); } - void ClientRemoveActorItem_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID, bool showHUDMessage) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientRemoveActorItem_Implementation", forInventory, itemID, showHUDMessage); } - void ClientSwapActorItems_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID1, FItemNetID itemID2) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSwapActorItems_Implementation", forInventory, itemID1, itemID2); } - void ClientUpdateInventoryCraftQueue_Implementation(UPrimalInventoryComponent* forInventory, TArray* CraftQueueEntries) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientUpdateInventoryCraftQueue_Implementation", forInventory, CraftQueueEntries); } - void ServerRequestActorItems_Implementation(UPrimalInventoryComponent* forInventory, bool bInventoryItems, bool bIsFirstSpawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestActorItems_Implementation", forInventory, bInventoryItems, bIsFirstSpawn); } - void ServerRemovePawnItem_Implementation(FItemNetID itemID, bool bSecondryAction) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemovePawnItem_Implementation", itemID, bSecondryAction); } - void ServerEquipPawnItem_Implementation(FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerEquipPawnItem_Implementation", itemID); } - void ServerDeleteCustomFolder_Implementation(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDeleteCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType); } - void ServerAddItemToCustomFolder_Implementation(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddItemToCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType, ItemId); } - void ServerDeleteItemFromCustomFolder_Implementation(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDeleteItemFromCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType, ItemId); } - void ServerCraftItem_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCraftItem_Implementation", inventoryComp, itemID); } - void ServerRepairItem_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRepairItem_Implementation", inventoryComp, itemID); } - void ServerRequestInventorySwapItems_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, FItemNetID itemID2) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventorySwapItems_Implementation", inventoryComp, itemID1, itemID2); } - void ServerRequestInventoryUseItemWithItem_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, FItemNetID itemID2, int AdditionalData) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItemWithItem_Implementation", inventoryComp, itemID1, itemID2, AdditionalData); } - void ServerRequestInventoryUseItemWithActor_Implementation(AActor* anActor, UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, int AdditionalData) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItemWithActor_Implementation", anActor, inventoryComp, itemID1, AdditionalData); } - void ServerRequestInventoryUseItem_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItem_Implementation", inventoryComp, itemID); } - void ServerActorViewRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerActorViewRemoteInventory_Implementation", inventoryComp); } - void ServerActorCloseRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerActorCloseRemoteInventory_Implementation", inventoryComp); } - void ServerDropFromRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDropFromRemoteInventory_Implementation", inventoryComp, itemID); } - void ServerInventoryClearCraftQueue_Implementation(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerInventoryClearCraftQueue_Implementation", inventoryComp); } - void ServerRequestRemoveItemSkin_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoveItemSkin_Implementation", inventoryComp, itemID); } - void ServerRequestRemoveItemSkinOnly_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoveItemSkinOnly_Implementation", inventoryComp, itemID); } - void ServerRequestRemoveWeaponAccessoryOnly_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoveWeaponAccessoryOnly_Implementation", inventoryComp, itemID); } - void ServerRequestRemoveWeaponClipAmmo_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoveWeaponClipAmmo_Implementation", inventoryComp, itemID); } - void ServerEquipToRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerEquipToRemoteInventory_Implementation", inventoryComp, itemID); } - void ServerTransferFromRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, int requestedQuantity, int ToSlotIndex, bool bEquipItem) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferFromRemoteInventory_Implementation", inventoryComp, itemID, requestedQuantity, ToSlotIndex, bEquipItem); } - void ServerTransferAllFromRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FString* CurrentCustomFolderFilter, FString* CurrentNameFilter, FString* CurrentDestinationFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferAllFromRemoteInventory_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder); } - void ServerTransferAllToRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FString* CurrentCustomFolderFilter, FString* CurrentNameFilter, FString* CurrentDestinationFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferAllToRemoteInventory_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder); } - void ServerTransferToRemoteInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, bool bAlsoTryToEqup, int requestedQuantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferToRemoteInventory_Implementation", inventoryComp, itemID, bAlsoTryToEqup, requestedQuantity); } - void ClientFailedToAddItemFromArkInventory_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFailedToAddItemFromArkInventory_Implementation"); } - void ServerAddItemFromArkInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, int requestedQuantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddItemFromArkInventory_Implementation", inventoryComp, itemID, requestedQuantity); } - void OnRefreshSteamInventoryFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnRefreshSteamInventoryFinished", bSuccess, SteamID); } - void ServerTakeItemFromArkInventoryAfterRefresh() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTakeItemFromArkInventoryAfterRefresh"); } - void ClientRemoveItemFromArk_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID RemovedItemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientRemoveItemFromArk_Implementation", forInventory, RemovedItemID); } - void UploadCharaterDataToArk(UPrimalInventoryComponent* InvComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "UploadCharaterDataToArk", InvComp); } - void ServerRequestCreateNewPlayerWithArkData(TArray* PlayerArkDataBytes, unsigned __int64 TribeID) { NativeCall *, unsigned __int64>((DWORD64)this, "AShooterPlayerController", "ServerRequestCreateNewPlayerWithArkData", PlayerArkDataBytes, TribeID); } - void ServerUploadCurrentCharacterAndItems_Implementation(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUploadCurrentCharacterAndItems_Implementation", inventoryComp); } - void ClientOnCurrentCharacterAndItemsUploaded_Implementation(unsigned __int64 TransferringPlayerDataId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientOnCurrentCharacterAndItemsUploaded_Implementation", TransferringPlayerDataId); } - void OnCurrentCharacterAndItemsUploaded(bool Success) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnCurrentCharacterAndItemsUploaded", Success); } - void ServerUploadCharaterDataToArk_Implementation(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUploadCharaterDataToArk_Implementation", inventoryComp); } - void RemoveInvetoryItem(unsigned int ItemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "RemoveInvetoryItem", ItemID); } - AShooterCharacter* GetPlayerCharacter() { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerCharacter"); } - void SetPawn(APawn* InPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetPawn", InPawn); } - void ServerRepeatMultiUse_Implementation(UObject* ForObject, int useIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRepeatMultiUse_Implementation", ForObject, useIndex); } - void ServerMultiUse_Implementation(UObject* ForObject, int useIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerMultiUse_Implementation", ForObject, useIndex); } - void ClientDoMultiUse_Implementation(UObject* ForObject, int useIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientDoMultiUse_Implementation", ForObject, useIndex); } - void ClientUpdateItemQuantity_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID, int ItemQuantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUpdateItemQuantity_Implementation", forInventory, itemID, ItemQuantity); } - void ClientUpdateItemDurability_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID, float ItemDurability) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUpdateItemDurability_Implementation", forInventory, itemID, ItemDurability); } - void ClientUpdateItemWeaponClipAmmo_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID, int Ammo) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUpdateItemWeaponClipAmmo_Implementation", forInventory, itemID, Ammo); } - void ClientUsedActorItem_Implementation(UPrimalInventoryComponent* forInventory, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUsedActorItem_Implementation", forInventory, itemID); } - void UnPossess() { NativeCall((DWORD64)this, "AShooterPlayerController", "UnPossess"); } - void Possess(APawn* inPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "Possess", inPawn); } - void UpdateRotation(float DeltaTime) { NativeCall((DWORD64)this, "AShooterPlayerController", "UpdateRotation", DeltaTime); } - bool CanDoPlayerCharacterInput(bool bIgnoreCurrentWeapon, bool bWeaponForcesMountedWeaponry) { return NativeCall((DWORD64)this, "AShooterPlayerController", "CanDoPlayerCharacterInput", bIgnoreCurrentWeapon, bWeaponForcesMountedWeaponry); } - AActor* GetPlayerControllerViewerOverride() { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerControllerViewerOverride"); } - void ForceTame(bool bCheatTame) { NativeCall((DWORD64)this, "AShooterPlayerController", "ForceTame", bCheatTame); } - void SetImprintQuality(float ImprintingQuality) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetImprintQuality", ImprintingQuality); } - void GiveToMe() { NativeCall((DWORD64)this, "AShooterPlayerController", "GiveToMe"); } - void GiveActorToMe(AActor* anAct, bool bNotifyNetwork) { NativeCall((DWORD64)this, "AShooterPlayerController", "GiveActorToMe", anAct, bNotifyNetwork); } - void ServerRequestLevelUp_Implementation(UPrimalCharacterStatusComponent* forStatusComp, EPrimalCharacterStatusValue::Type ValueType) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestLevelUp_Implementation", forStatusComp, ValueType); } - void AddExperience(float HowMuch, bool fromTribeShare, bool bPreventSharingWithTribe) { NativeCall((DWORD64)this, "AShooterPlayerController", "AddExperience", HowMuch, fromTribeShare, bPreventSharingWithTribe); } - void ServerRequestSetPin_Implementation(UObject* forTarget, int PinValue, bool bIsSetting, int TheCustomIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestSetPin_Implementation", forTarget, PinValue, bIsSetting, TheCustomIndex); } - void ClientNotifyTribeXP_Implementation(float HowMuch) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyTribeXP_Implementation", HowMuch); } - void ServerRequestRespawnAtPoint_Implementation(int spawnPoID, int spawnRegionIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRespawnAtPoint_Implementation", spawnPoID, spawnRegionIndex); } - void ServerRequestFastTravelToPoint_Implementation(int fromSpawnPoID, int spawnPoID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestFastTravelToPoint_Implementation", fromSpawnPoID, spawnPoID); } - void ServerUploadDino_Implementation(APrimalDinoCharacter* DownloadedDino) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUploadDino_Implementation", DownloadedDino); } - void ServerRequestRemoteDropAllItems_Implementation(UPrimalInventoryComponent* inventoryComp, FString* CurrentCustomFolderFilter, FString* CurrentNameFilter) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoteDropAllItems_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter); } - void ServerRequestDropAllItems_Implementation(FString* CurrentCustomFolderFilter, FString* CurrentNameFilter) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestDropAllItems_Implementation", CurrentCustomFolderFilter, CurrentNameFilter); } - void ClientShowSpawnUI_Implementation(float Delay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientShowSpawnUI_Implementation", Delay); } - void ClientShowCharacterCreationUI_Implementation(bool bShowDownloadCharacter) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientShowCharacterCreationUI_Implementation", bShowDownloadCharacter); } - AActor* SpawnActor(FString* blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay) { return NativeCall((DWORD64)this, "AShooterPlayerController", "SpawnActor", blueprintPath, spawnDistance, spawnYOffset, ZOffset, bDoDeferBeginPlay); } - bool GiveItem(FString* blueprintPath, int quantityOverride, float qualityOverride, bool bForceBluepr) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GiveItem", blueprintPath, quantityOverride, qualityOverride, bForceBluepr); } - bool GiveFast(FName* blueprintPath, int quantityOverride, float qualityOverride, bool bForceBluepr) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GiveFast", blueprintPath, quantityOverride, qualityOverride, bForceBluepr); } - bool GiveSlotItem(FString* blueprintPath, int slotNum, int quantityOverride) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GiveSlotItem", blueprintPath, slotNum, quantityOverride); } - bool GiveSlotItemNum(int masterIndexNum, int slotNum, int quantityOverride) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GiveSlotItemNum", masterIndexNum, slotNum, quantityOverride); } - bool GiveItemNum(int masterIndexNum, int quantityOverride, float qualityOverride, bool bForceBluepr) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GiveItemNum", masterIndexNum, quantityOverride, qualityOverride, bForceBluepr); } - FString* GetUniqueNetIdAsString(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetUniqueNetIdAsString", result); } - void ClientOnAddedItemsToAllClustersInventory_Implementation(bool Success, FString* UserId, TArray* MasterIndexNum) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientOnAddedItemsToAllClustersInventory_Implementation", Success, UserId, MasterIndexNum); } - void OnAddedItemsToAllClustersInventory(bool Success, FString* UserId, TArray* MasterIndexNum) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "OnAddedItemsToAllClustersInventory", Success, UserId, MasterIndexNum); } - bool AddItemToAllClustersInventory(FString UserId, int MasterIndexNum) { return NativeCall((DWORD64)this, "AShooterPlayerController", "AddItemToAllClustersInventory", UserId, MasterIndexNum); } - void BeginInactiveState() { NativeCall((DWORD64)this, "AShooterPlayerController", "BeginInactiveState"); } - void PawnPendingDestroy(APawn* inPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "PawnPendingDestroy", inPawn); } - void BeginSpectatingState() { NativeCall((DWORD64)this, "AShooterPlayerController", "BeginSpectatingState"); } - void SetGraphicsQuality(int val) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetGraphicsQuality", val); } - void ResetSpawnTime() { NativeCall((DWORD64)this, "AShooterPlayerController", "ResetSpawnTime"); } - void GetPlayerViewPoint(FVector* out_Location, FRotator* out_Rotation) { NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerViewPoint", out_Location, out_Rotation); } - void GetPlayerViewPoint(FVector* out_Location, FRotator* out_Rotation, bool ForAiming) { NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerViewPoint", out_Location, out_Rotation, ForAiming); } - void GetPlayerViewPointNoModifiers(FVector* out_Location, FRotator* out_Rotation, bool ForAiming, bool bNoTPVAim) { NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerViewPointNoModifiers", out_Location, out_Rotation, ForAiming, bNoTPVAim); } - void ClientNotifyEditText_Implementation(TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject* ForObject) { NativeCall, unsigned int, unsigned int, UObject *>((DWORD64)this, "AShooterPlayerController", "ClientNotifyEditText_Implementation", ForObjectClass, ExtraID1, ExtraID2, ForObject); } - void ServerNotifyEditText_Implementation(FString* TextToUse, bool checkedBox, TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject* ForObject) { NativeCall, unsigned int, unsigned int, UObject *>((DWORD64)this, "AShooterPlayerController", "ServerNotifyEditText_Implementation", TextToUse, checkedBox, ForObjectClass, ExtraID1, ExtraID2, ForObject); } - void ServerSendChatMessage_Implementation(FString* ChatMessage, EChatSendMode::Type SendMode) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSendChatMessage_Implementation", ChatMessage, SendMode); } - void ClientChatMessage_Implementation(FChatMessage Chat) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientChatMessage_Implementation", Chat); } - void ClientServerChatMessage_Implementation(FString* MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerChatMessage_Implementation", MessageText, MessageColor, bIsBold); } - void ClientServerChatDirectMessage_Implementation(FString* MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerChatDirectMessage_Implementation", MessageText, MessageColor, bIsBold); } - void ClientServerNotification_Implementation(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerNotification_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } - void ClientServerNotificationSingle_Implementation(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay, int MessageTypeID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerNotificationSingle_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay, MessageTypeID); } - void ClientServerSOTFNotificationCustom_Implementation(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerSOTFNotificationCustom_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } - void ServerGetOriginalHairColor_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerGetOriginalHairColor_Implementation"); } - void ClientReceiveOriginalHairColor_Implementation(FLinearColor HairColor) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientReceiveOriginalHairColor_Implementation", HairColor); } - FString* WritePNTScreenshot(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerController", "WritePNTScreenshot", result); } - void TestNotification() { NativeCall((DWORD64)this, "AShooterPlayerController", "TestNotification"); } - void ClientReset_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientReset_Implementation"); } - void Reset() { NativeCall((DWORD64)this, "AShooterPlayerController", "Reset"); } - void TestAlarmNotification(FString Title, FString Message) { NativeCall((DWORD64)this, "AShooterPlayerController", "TestAlarmNotification", Title, Message); } - void SendAlarmNotification(FString SteamID, FString Title, FString Message) { NativeCall((DWORD64)this, "AShooterPlayerController", "SendAlarmNotification", SteamID, Title, Message); } - bool SendUseItemSlotToStructure() { return NativeCall((DWORD64)this, "AShooterPlayerController", "SendUseItemSlotToStructure"); } - void SpectatorUseItem(int Index) { NativeCall((DWORD64)this, "AShooterPlayerController", "SpectatorUseItem", Index); } - void ApplyDepthOfFieldSetting(int Index, float CurrentTimer) { NativeCall((DWORD64)this, "AShooterPlayerController", "ApplyDepthOfFieldSetting", Index, CurrentTimer); } - void ServerReleaseSeatingStructure_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerReleaseSeatingStructure_Implementation"); } - void AdminCheat(FString* Msg) { NativeCall((DWORD64)this, "AShooterPlayerController", "AdminCheat", Msg); } - void OnExtendedInfoPress() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnExtendedInfoPress"); } - void OnExtendedInfoRelease() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnExtendedInfoRelease"); } - void ClientNotifyPlayerDeath_Implementation(APawn* InstigatingPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPlayerDeath_Implementation", InstigatingPawn); } - void ClientNotifyPlayerDeathReason_Implementation(FString* ReasonString) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPlayerDeathReason_Implementation", ReasonString); } - void ServerShowMessageOfTheDay_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerShowMessageOfTheDay_Implementation"); } - void ServerSetMessageOfTheDay_Implementation(FString* Message) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSetMessageOfTheDay_Implementation", Message); } - void ClientNotifyMessageOfTheDay_Implementation(FString* Message, float TimeToDisplay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyMessageOfTheDay_Implementation", Message, TimeToDisplay); } - void ClientNotifyRemotePlayerDeath_Implementation(FString* PlayerName, FString* AttackerName) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyRemotePlayerDeath_Implementation", PlayerName, AttackerName); } - void ClientNotifyPlayerKill_Implementation(AActor* PlayerPawn, APawn* VictimPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPlayerKill_Implementation", PlayerPawn, VictimPawn); } - void ClientNotifyDinoKill_Implementation(APrimalDinoCharacter* InstigatingPawn, APawn* VictimPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyDinoKill_Implementation", InstigatingPawn, VictimPawn); } - void ClientNotifyDinoDeath_Implementation(FString* DinoName, FString* AttackerName, bool bIsVehicle) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyDinoDeath_Implementation", DinoName, AttackerName, bIsVehicle); } - void ClientNotifyRespawned_Implementation(APawn* NewPawn, bool IsFirstSpawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyRespawned_Implementation", NewPawn, IsFirstSpawn); } - void ClientNotifyReconnected_Implementation(APawn* NewPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyReconnected_Implementation", NewPawn); } - void ClientResetRespawningFlag_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientResetRespawningFlag_Implementation"); } - void CheckForPlayerInventory() { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckForPlayerInventory"); } - void ReportSpawnManagers() { NativeCall((DWORD64)this, "AShooterPlayerController", "ReportSpawnManagers"); } - void HibernationReport(FString* ClassName) { NativeCall((DWORD64)this, "AShooterPlayerController", "HibernationReport", ClassName); } - void HiWarp(FString* ClassName, int Index) { NativeCall((DWORD64)this, "AShooterPlayerController", "HiWarp", ClassName, Index); } - void ReportLeastSpawnManagers() { NativeCall((DWORD64)this, "AShooterPlayerController", "ReportLeastSpawnManagers"); } - void FlushLevelStreaming() { NativeCall((DWORD64)this, "AShooterPlayerController", "FlushLevelStreaming"); } - void DoFlushLevelStreaming() { NativeCall((DWORD64)this, "AShooterPlayerController", "DoFlushLevelStreaming"); } - void FinalFlushLevelStreaming() { NativeCall((DWORD64)this, "AShooterPlayerController", "FinalFlushLevelStreaming"); } - void ClientNotifyCantHarvest_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyCantHarvest_Implementation"); } - void ClientNotifyHitHarvest_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyHitHarvest_Implementation"); } - void ClientNotifyCantHitHarvest_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyCantHitHarvest_Implementation"); } - void ServerSetVRPlayer_Implementation(bool bSetVRPlayer) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSetVRPlayer_Implementation", bSetVRPlayer); } - void ClientNotifyTamedDino_Implementation(TSubclassOf DinoClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientNotifyTamedDino_Implementation", DinoClass); } - void ClientNotifySummonedDino_Implementation(TSubclassOf DinoClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientNotifySummonedDino_Implementation", DinoClass); } - void ClientNotifyDefeatedDino_Implementation(TSubclassOf DinoClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientNotifyDefeatedDino_Implementation", DinoClass); } - void SetPlayerPos(float X, float Y, float Z) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetPlayerPos", X, Y, Z); } - void SPI(float X, float Y, float Z, float Yaw, float Pitch) { NativeCall((DWORD64)this, "AShooterPlayerController", "SPI", X, Y, Z, Yaw, Pitch); } - void ClientSetSpectatorLocation_Implementation(FVector NewLocation) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSetSpectatorLocation_Implementation", NewLocation); } - void ClientSetControlRotation_Implementation(FRotator NewRotation) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSetControlRotation_Implementation", NewRotation); } - bool ShouldReplicateVoicePacketFrom(FUniqueNetId* Sender, char* PlaybackFlags) { return NativeCall((DWORD64)this, "AShooterPlayerController", "ShouldReplicateVoicePacketFrom", Sender, PlaybackFlags); } - bool HasRadio(bool allowVoice) { return NativeCall((DWORD64)this, "AShooterPlayerController", "HasRadio", allowVoice); } - TArray* GetRadioFrequencies(TArray* result) { return NativeCall *, TArray *>((DWORD64)this, "AShooterPlayerController", "GetRadioFrequencies", result); } - bool HasSameRadioFrequency(AShooterPlayerController* OtherPC, unsigned int* SharedFrequency) { return NativeCall((DWORD64)this, "AShooterPlayerController", "HasSameRadioFrequency", OtherPC, SharedFrequency); } - bool CanCommunicateVoiceWithRadio(AShooterPlayerController* otherPC) { return NativeCall((DWORD64)this, "AShooterPlayerController", "CanCommunicateVoiceWithRadio", otherPC); } - void ToggleSpeaking(bool bSpeaking) { NativeCall((DWORD64)this, "AShooterPlayerController", "ToggleSpeaking", bSpeaking); } - void ForceUnstasisAtLocation(FVector AtLocation) { NativeCall((DWORD64)this, "AShooterPlayerController", "ForceUnstasisAtLocation", AtLocation); } - void SpawnActorSpread(FString* blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, int NumberActors, float SpreadAmount) { NativeCall((DWORD64)this, "AShooterPlayerController", "SpawnActorSpread", blueprintPath, spawnDistance, spawnYOffset, ZOffset, NumberActors, SpreadAmount); } - void SpawnActorSpreadTamed(FString* blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, int NumberActors, float SpreadAmount) { NativeCall((DWORD64)this, "AShooterPlayerController", "SpawnActorSpreadTamed", blueprintPath, spawnDistance, spawnYOffset, ZOffset, NumberActors, SpreadAmount); } - void GiveResources() { NativeCall((DWORD64)this, "AShooterPlayerController", "GiveResources"); } - void GiveEngrams() { NativeCall((DWORD64)this, "AShooterPlayerController", "GiveEngrams"); } - void ForceTribes(FString* PlayerName1, FString* PlayerName2, FString* NewTribeName) { NativeCall((DWORD64)this, "AShooterPlayerController", "ForceTribes", PlayerName1, PlayerName2, NewTribeName); } - void ClientPlayLocalSound_Implementation(USoundBase* aSound, bool bAttach) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientPlayLocalSound_Implementation", aSound, bAttach); } - void ClientStopLocalSound_Implementation(USoundBase* aSound) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientStopLocalSound_Implementation", aSound); } - void ServerAddItemToArkInventory_Implementation(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, int requestedQuantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddItemToArkInventory_Implementation", inventoryComp, itemID, requestedQuantity); } - void OnArkTributeAllClustersInventoryItemsLoaded(TArray* Items) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "OnArkTributeAllClustersInventoryItemsLoaded", Items); } - void OnArkTributeSaved(bool Success) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnArkTributeSaved", Success); } - void ClientSetArkTributeLimits_Implementation(bool LimitItems, bool LimitDinos, bool LimitCharacters, int MaxItems, int MaxDinos, int MaxCharacters) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSetArkTributeLimits_Implementation", LimitItems, LimitDinos, LimitCharacters, MaxItems, MaxDinos, MaxCharacters); } - void ServerLoadArkInventoryItems_Implementation(TArray* ArkInventoryItemsInfo) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ServerLoadArkInventoryItems_Implementation", ArkInventoryItemsInfo); } - void GetTamedDinosNearBy(TArray>* Dinos, float RangeRadius) { NativeCall> *, float>((DWORD64)this, "AShooterPlayerController", "GetTamedDinosNearBy", Dinos, RangeRadius); } - bool IsTamedDinoNearBy(APrimalDinoCharacter* Dino, float RangeRadius) { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsTamedDinoNearBy", Dino, RangeRadius); } - void ServerCharacterUploadWithItems_CharaterPayload_Implementation(unsigned __int64 PlayerDataId, TArray* PlayerDataChunk) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ServerCharacterUploadWithItems_CharaterPayload_Implementation", PlayerDataId, PlayerDataChunk); } - void ServerCharacterUploadWithItems_UploadItem_Implementation(unsigned __int64 PlayerDataId, FItemNetInfo InvItem) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCharacterUploadWithItems_UploadItem_Implementation", PlayerDataId, InvItem); } - void ServerCharacterUploadWithItems_FinishAndCreateCharacter_Implementation(unsigned __int64 PlayerDataId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCharacterUploadWithItems_FinishAndCreateCharacter_Implementation", PlayerDataId); } - void RequestCreateNewPlayerWithArkData(TArray PlayerArkDataBytes, unsigned __int64 TribeID) { NativeCall, unsigned __int64>((DWORD64)this, "AShooterPlayerController", "RequestCreateNewPlayerWithArkData", PlayerArkDataBytes, TribeID); } - void LoadLocalPlayerArkData() { NativeCall((DWORD64)this, "AShooterPlayerController", "LoadLocalPlayerArkData"); } - void ServerLoadUploadedDinos_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerLoadUploadedDinos_Implementation"); } - void ClientDownloadDinoRequestFinished_Implementation(bool Success) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientDownloadDinoRequestFinished_Implementation", Success); } - void ServerLoadUploadedCharacters_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerLoadUploadedCharacters_Implementation"); } - void ClientOnStartDownloadTransferredPlayerCharacter_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientOnStartDownloadTransferredPlayerCharacter_Implementation"); } - void ClientOnEndDownloadTransferredPlayerCharacter_Implementation(bool Success, int FailureResponseCode, FString* FailureResponseMessage) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientOnEndDownloadTransferredPlayerCharacter_Implementation", Success, FailureResponseCode, FailureResponseMessage); } - void DownloadTransferredPlayerCharacter() { NativeCall((DWORD64)this, "AShooterPlayerController", "DownloadTransferredPlayerCharacter"); } - void ClientDownloadPlayerCharacterRequestFinished_Implementation(bool Success) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientDownloadPlayerCharacterRequestFinished_Implementation", Success); } - void ServerSetSubscribedApp_Implementation(int AppID, bool bPreventDefaultItems) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSetSubscribedApp_Implementation", AppID, bPreventDefaultItems); } - void ServerAddItemToSteamInventory(int ItemSteamDefID, int Quantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddItemToSteamInventory", ItemSteamDefID, Quantity); } - void ClientRemoveItemFromSteamInventory_Implementation(TArray* ItemSteamUserID, int Quantity) { NativeCall *, int>((DWORD64)this, "AShooterPlayerController", "ClientRemoveItemFromSteamInventory_Implementation", ItemSteamUserID, Quantity); } - void ServerRemoveSteamItemSucceeded_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemoveSteamItemSucceeded_Implementation"); } - void OnConsumeItemFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnConsumeItemFinished", bSuccess, SteamID); } - void OnAddItemFinished(bool bSuccess, TArray SteamItemUserIds, unsigned __int64 SteamID) { NativeCall, unsigned __int64>((DWORD64)this, "AShooterPlayerController", "OnAddItemFinished", bSuccess, SteamItemUserIds, SteamID); } - void ServerRefreshSteamInventoryForRemove() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRefreshSteamInventoryForRemove"); } - void ServerRefreshSteamInventoryToCheckConsume() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRefreshSteamInventoryToCheckConsume"); } - void ServerRefreshSteamInventory_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRefreshSteamInventory_Implementation"); } - void OnServerRefreshSteamInventoryFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnServerRefreshSteamInventoryFinished", bSuccess, SteamID); } - void OnRefreshSteamInventoryToCheckConsumeFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnRefreshSteamInventoryToCheckConsumeFinished", bSuccess, SteamID); } - void ClientRefreshSteamInventoryFinished_Implementation(bool bSuccess) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientRefreshSteamInventoryFinished_Implementation", bSuccess); } - void RefreshSteamInventory() { NativeCall((DWORD64)this, "AShooterPlayerController", "RefreshSteamInventory"); } - void ServerRemoveSteamItem_Implementation(unsigned int ItemdDefId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemoveSteamItem_Implementation", ItemdDefId); } - void ReceivedPlayerState() { NativeCall((DWORD64)this, "AShooterPlayerController", "ReceivedPlayerState"); } - void CloseSteamStatusScene() { NativeCall((DWORD64)this, "AShooterPlayerController", "CloseSteamStatusScene"); } - void ServerAllowPlayerToJoinNoCheck_Implementation(FString* PlayerId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAllowPlayerToJoinNoCheck_Implementation", PlayerId); } - void ServerDisallowPlayerToJoinNoCheck_Implementation(FString* PlayerId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDisallowPlayerToJoinNoCheck_Implementation", PlayerId); } - void ServerSendDirectMessage_Implementation(FString* PlayerSteamID, FString* MessageText) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSendDirectMessage_Implementation", PlayerSteamID, MessageText); } - void ServerListPlayers_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerListPlayers_Implementation"); } - void KickPlayer(FString PlayerSteamName) { NativeCall((DWORD64)this, "AShooterPlayerController", "KickPlayer", PlayerSteamName); } - void ServerKickPlayer_Implementation(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerKickPlayer_Implementation", PlayerSteamName, PlayerSteamID); } - void BanPlayer(FString PlayerSteamName) { NativeCall((DWORD64)this, "AShooterPlayerController", "BanPlayer", PlayerSteamName); } - void ServerBanPlayer_Implementation(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerBanPlayer_Implementation", PlayerSteamName, PlayerSteamID); } - void UnbanPlayer(FString PlayerSteamName) { NativeCall((DWORD64)this, "AShooterPlayerController", "UnbanPlayer", PlayerSteamName); } - void ServerUnbanPlayer_Implementation(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUnbanPlayer_Implementation", PlayerSteamName, PlayerSteamID); } - void SetKickedNotification(FString KickReason) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetKickedNotification", KickReason); } - void ClientUnlockAchievement_Implementation(FString* AchievementID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUnlockAchievement_Implementation", AchievementID); } - void ClientNotifyLevelUp_Implementation(APrimalCharacter* ForChar, int NewLevel) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyLevelUp_Implementation", ForChar, NewLevel); } - void ClientNotifyAdmin_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyAdmin_Implementation"); } - void ClientNotifyTorpidityIncrease_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyTorpidityIncrease_Implementation"); } - void InitCharacterPainting_Implementation(APrimalCharacter* Char) { NativeCall((DWORD64)this, "AShooterPlayerController", "InitCharacterPainting_Implementation", Char); } - void ClientNotifyListenServerOutOfRange_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyListenServerOutOfRange_Implementation"); } - void StopLoadingMusic() { NativeCall((DWORD64)this, "AShooterPlayerController", "StopLoadingMusic"); } - void FadeOutLoadingMusic() { NativeCall((DWORD64)this, "AShooterPlayerController", "FadeOutLoadingMusic"); } - void ChangeState(FName NewState) { NativeCall((DWORD64)this, "AShooterPlayerController", "ChangeState", NewState); } - bool IsSpectator() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsSpectator"); } - void ClientFailedRemoveSaddle_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFailedRemoveSaddle_Implementation"); } - void PrintColors() { NativeCall((DWORD64)this, "AShooterPlayerController", "PrintColors"); } - FString* ConsoleCommand(FString* result, FString* Command, bool bWriteToLog) { return NativeCall((DWORD64)this, "AShooterPlayerController", "ConsoleCommand", result, Command, bWriteToLog); } - void GiveColors(int quantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "GiveColors", quantity); } - void ClientShowPaintingUI_Implementation(UObject* ObjectToPaint) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientShowPaintingUI_Implementation", ObjectToPaint); } - void HideRiders(bool bDoHide) { NativeCall((DWORD64)this, "AShooterPlayerController", "HideRiders", bDoHide); } - void SetAdminIcon(bool bAdminIcon) { NativeCall((DWORD64)this, "AShooterPlayerController", "SetAdminIcon", bAdminIcon); } - void SpawnPlayerCameraManager() { NativeCall((DWORD64)this, "AShooterPlayerController", "SpawnPlayerCameraManager"); } - void ServerSetSupressAdminIcon_Implementation(bool bSuppress) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSetSupressAdminIcon_Implementation", bSuppress); } - void NotifyTribeWarStatus_Implementation(FString* EnemyTribeString, int StatusType) { NativeCall((DWORD64)this, "AShooterPlayerController", "NotifyTribeWarStatus_Implementation", EnemyTribeString, StatusType); } - void StartArkGamepadLeftShoulder() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadLeftShoulder"); } - void StartArkGamepadRightShoulder() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadRightShoulder"); } - void EndArkGamepadRightShoulder() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadRightShoulder"); } - void ServerRequestTribeLog_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestTribeLog_Implementation"); } - void ClientStartReceivingTribeLog_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientStartReceivingTribeLog_Implementation"); } - void ClientReceiveTribeLog_Implementation(FString* LogString) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientReceiveTribeLog_Implementation", LogString); } - void ClientEndReceivingTribeLog_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientEndReceivingTribeLog_Implementation"); } - void EndArkGamepadLeftShoulder() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadLeftShoulder"); } - void RPCStayAlive_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "RPCStayAlive_Implementation"); } - void StartArkGamepadBackButton() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadBackButton"); } - void EndArkGamepadBackButton() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadBackButton"); } - void StartArkGamepadFaceButtonLeft() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadFaceButtonLeft"); } - void EndArkGamepadFaceButtonLeft() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadFaceButtonLeft"); } - void StartArkGamepadFaceButtonRight() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadFaceButtonRight"); } - void EndArkGamepadFaceButtonRight() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadFaceButtonRight"); } - void StartArkGamepadFaceButtonTop() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadFaceButtonTop"); } - void EndArkGamepadFaceButtonTop() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadFaceButtonTop"); } - void StartArkGamepadFaceButtonBottom() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadFaceButtonBottom"); } - void EndArkGamepadFaceButtonBottom() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadFaceButtonBottom"); } - void StartArkGamepadDpadLeft() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadDpadLeft"); } - void EndArkGamepadDpadLeft() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadDpadLeft"); } - void StartArkGamepadDpadUp() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadDpadUp"); } - void EndAArkGamepadDpadUp() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndAArkGamepadDpadUp"); } - void StartArkGamepadDpadRight() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadDpadRight"); } - void EndArkGamepadDpadRight() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadDpadRight"); } - void StartArkGamepadDpadDown() { NativeCall((DWORD64)this, "AShooterPlayerController", "StartArkGamepadDpadDown"); } - void EndArkGamepadDpadDown() { NativeCall((DWORD64)this, "AShooterPlayerController", "EndArkGamepadDpadDown"); } - void ServerAddAchievementID_Implementation(FString* AchievementID, bool bIsOnSpawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddAchievementID_Implementation", AchievementID, bIsOnSpawn); } - FString* GetPlayerCharacterName(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetPlayerCharacterName", result); } - void ClientCollectedAchievementItem_Implementation(TSubclassOf ItemClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientCollectedAchievementItem_Implementation", ItemClass); } - bool UseTribeGroupRanks() { return NativeCall((DWORD64)this, "AShooterPlayerController", "UseTribeGroupRanks"); } - bool IsTribeAdmin() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsTribeAdmin"); } - UPrimalItem* GetInventoryUISelectedItemLocal() { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetInventoryUISelectedItemLocal"); } - UPrimalItem* GetInventoryUISelectedItemRemote() { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetInventoryUISelectedItemRemote"); } - void PlayHitMarkerCharacter_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "PlayHitMarkerCharacter_Implementation"); } - void PlayHitMarkerStructure_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "PlayHitMarkerStructure_Implementation"); } - void PlayHitMarkerCharacterAlly_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "PlayHitMarkerCharacterAlly_Implementation"); } - void PlayHitMarkerStructureAlly_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "PlayHitMarkerStructureAlly_Implementation"); } - void ClientShowTransferredPlayerConfirmationDialog_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientShowTransferredPlayerConfirmationDialog_Implementation"); } - void ShowTransferCharacterConfirmationDialog() { NativeCall((DWORD64)this, "AShooterPlayerController", "ShowTransferCharacterConfirmationDialog"); } - void OnTransferCharacterConfirmationDialogClosed(bool bAccept) { NativeCall((DWORD64)this, "AShooterPlayerController", "OnTransferCharacterConfirmationDialogClosed", bAccept); } - void ServerTransferredPlayerConfirmationResult_Implementation(bool bAccpet) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferredPlayerConfirmationResult_Implementation", bAccpet); } - void ServerDownloadTransferredPlayer_Implementation(int spawnPoID, int spawnPoRegionIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDownloadTransferredPlayer_Implementation", spawnPoID, spawnPoRegionIndex); } - void GetAudioListenerPosition(FVector* OutLocation, FVector* OutFrontDir, FVector* OutRightDir) { NativeCall((DWORD64)this, "AShooterPlayerController", "GetAudioListenerPosition", OutLocation, OutFrontDir, OutRightDir); } - void ServerStartWeaponFire_Implementation(AShooterWeapon* weapon) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerStartWeaponFire_Implementation", weapon); } - void ServerStopWeaponFire_Implementation(AShooterWeapon* weapon) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerStopWeaponFire_Implementation", weapon); } - void ServerStartWeaponAltFire_Implementation(AShooterWeapon* weapon) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerStartWeaponAltFire_Implementation", weapon); } - void ServerStopWeaponAltFire_Implementation(AShooterWeapon* weapon) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerStopWeaponAltFire_Implementation", weapon); } - void ClientStartSurfaceCameraForPassenger_Implementation(float yaw, float pitch, float roll, bool bInvertTurnInput) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientStartSurfaceCameraForPassenger_Implementation", yaw, pitch, roll, bInvertTurnInput); } - void ServerUnlockPerMapExplorerNote_Implementation(int ExplorerNoteIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUnlockPerMapExplorerNote_Implementation", ExplorerNoteIndex); } - void UnlockExplorerNote(int ExplorerNoteIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "UnlockExplorerNote", ExplorerNoteIndex); } - void ClientUnlockExplorerNote_Implementation(int ExplorerNoteIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUnlockExplorerNote_Implementation", ExplorerNoteIndex); } - APawn* GetResponsibleDamager(AActor* DamageCauser) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetResponsibleDamager", DamageCauser); } - void UnlockEmote(FName EmoteName) { NativeCall((DWORD64)this, "AShooterPlayerController", "UnlockEmote", EmoteName); } - bool IsEmoteUnlocked(FName EmoteName) { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsEmoteUnlocked", EmoteName); } - int GetCurrentMultiUseWheelCategory() { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetCurrentMultiUseWheelCategory"); } - void ClientReceiveDinoAncestors_Implementation(APrimalDinoCharacter* ForDino, TArray* DinoAncestors, TArray* DinoAncestorsMale, int RandomMutationsFemale, int RandomMutationsMale) { NativeCall *, TArray *, int, int>((DWORD64)this, "AShooterPlayerController", "ClientReceiveDinoAncestors_Implementation", ForDino, DinoAncestors, DinoAncestorsMale, RandomMutationsFemale, RandomMutationsMale); } - void ServerRequestDinoAncestors_Implementation(APrimalDinoCharacter* ForDino) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestDinoAncestors_Implementation", ForDino); } - void OnPressGroupAddOrRemoveTame() { NativeCall((DWORD64)this, "AShooterPlayerController", "OnPressGroupAddOrRemoveTame"); } - AActor* BaseGetPlayerCharacter() { return NativeCall((DWORD64)this, "AShooterPlayerController", "BaseGetPlayerCharacter"); } - void ClientNotifyUnlockedEngram_Implementation(TSubclassOf ItemClass, bool bTekGram) { NativeCall, bool>((DWORD64)this, "AShooterPlayerController", "ClientNotifyUnlockedEngram_Implementation", ItemClass, bTekGram); } - void ClientTeleportSucceeded_Implementation(FVector TeleportLoc, FRotator TeleportRot) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientTeleportSucceeded_Implementation", TeleportLoc, TeleportRot); } - bool IsAtPersonalTameLimit() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsAtPersonalTameLimit"); } - FString* GetPersonalTameLimitString(FString* result) { return NativeCall((DWORD64)this, "AShooterPlayerController", "GetPersonalTameLimitString", result); } - void ClientSetPersonalDinoTameCount_Implementation(int NewPersonalDinoTameCount) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSetPersonalDinoTameCount_Implementation", NewPersonalDinoTameCount); } - void UpdatePostProcessVolumes() { NativeCall((DWORD64)this, "AShooterPlayerController", "UpdatePostProcessVolumes"); } - bool IsSavingData() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsSavingData"); } - FString* PlayerCommand_Implementation(FString* result, FString* TheCommand) { return NativeCall((DWORD64)this, "AShooterPlayerController", "PlayerCommand_Implementation", result, TheCommand); } - void TryToForceUploadCharacter_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "TryToForceUploadCharacter_Implementation"); } - void ServerDPC_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDPC_Implementation"); } - void QuitToMainMenu() { NativeCall((DWORD64)this, "AShooterPlayerController", "QuitToMainMenu"); } - bool IsViewingInventoryUI() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsViewingInventoryUI"); } - bool IsFirstLocalPlayerOrLivingLocalPlayer() { return NativeCall((DWORD64)this, "AShooterPlayerController", "IsFirstLocalPlayerOrLivingLocalPlayer"); } - void ServerRequestMyTribeOnlineList_Implementation() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestMyTribeOnlineList_Implementation"); } - void ClientReceiveMyTribeOnlineList_Implementation(TArray* OnlinePlayerIDs) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientReceiveMyTribeOnlineList_Implementation", OnlinePlayerIDs); } - void ClientNotifyUnlockHairStyleOrEmote_Implementation(FName HairstyleOrEmoteName) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyUnlockHairStyleOrEmote_Implementation", HairstyleOrEmoteName); } - void psc(FString* command) { NativeCall((DWORD64)this, "AShooterPlayerController", "psc", command); } - void StaticRegisterNativesAShooterPlayerController() { NativeCall((DWORD64)this, "AShooterPlayerController", "StaticRegisterNativesAShooterPlayerController"); } - void CheckCheatsPassword(FString* pass) { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckCheatsPassword", pass); } - void CheckRequestSpectator(FString* InSpectatorPass) { NativeCall((DWORD64)this, "AShooterPlayerController", "CheckRequestSpectator", InSpectatorPass); } - void ClientAddActorItem(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddActorItem", forInventory, itemInfo, bEquipItem, ShowHUDNotification); } - void ClientAddActorItemToFolder(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification, FString* ToFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddActorItemToFolder", forInventory, itemInfo, bEquipItem, ShowHUDNotification, ToFolder); } - void ClientAddItemToArk(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, bool bFromLoad) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientAddItemToArk", forInventory, itemInfo, bFromLoad); } - void ClientChatMessage(FChatMessage Chat) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientChatMessage", Chat); } - void ClientCollectedAchievementItem(TSubclassOf ItemClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientCollectedAchievementItem", ItemClass); } - void ClientDoMultiUse(UObject* ForObject, int useIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientDoMultiUse", ForObject, useIndex); } - void ClientFailedRemoveSaddle() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFailedRemoveSaddle"); } - void ClientFailedToAddItemFromArkInventory() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientFailedToAddItemFromArkInventory"); } - void ClientInsertActorItem(UPrimalInventoryComponent* forInventory, FItemNetInfo itemInfo, FItemNetID InsertAfterItemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientInsertActorItem", forInventory, itemInfo, InsertAfterItemID); } - void ClientNotifyAdmin() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyAdmin"); } - void ClientNotifyDinoDeath(FString* DinoName, FString* AttackerName, bool bIsVehicle) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyDinoDeath", DinoName, AttackerName, bIsVehicle); } - void ClientNotifyDinoKill(APrimalDinoCharacter* InstigatingPawn, APawn* VictimPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyDinoKill", InstigatingPawn, VictimPawn); } - void ClientNotifyEditText(TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject* ForObject) { NativeCall, unsigned int, unsigned int, UObject *>((DWORD64)this, "AShooterPlayerController", "ClientNotifyEditText", ForObjectClass, ExtraID1, ExtraID2, ForObject); } - void ClientNotifyListenServerOutOfRange() { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyListenServerOutOfRange"); } - void ClientNotifyMessageOfTheDay(FString* Message, float timeToDisplay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyMessageOfTheDay", Message, timeToDisplay); } - void ClientNotifyPlayerDeathReason(FString* ReasonString) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPlayerDeathReason", ReasonString); } - void ClientNotifyPlayerKill(AActor* PlayerPawn, APawn* VictimPawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientNotifyPlayerKill", PlayerPawn, VictimPawn); } - void ClientNotifyTamedDino(TSubclassOf DinoClass) { NativeCall>((DWORD64)this, "AShooterPlayerController", "ClientNotifyTamedDino", DinoClass); } - void ClientOnAddedItemsToAllClustersInventory(bool Success, FString* UserId, TArray* MasterIndexNum) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientOnAddedItemsToAllClustersInventory", Success, UserId, MasterIndexNum); } - void ClientOnEndDownloadTransferredPlayerCharacter(bool Success, int FailureResponseCode, FString* FailureResponseMessage) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientOnEndDownloadTransferredPlayerCharacter", Success, FailureResponseCode, FailureResponseMessage); } - void ClientPlayLocalSound(USoundBase* aSound, bool bAttach) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientPlayLocalSound", aSound, bAttach); } - void ClientReceiveDinoAncestors(APrimalDinoCharacter* ForDino, TArray* DinoAncestors, TArray* DinoAncestorsMale, int RandomMutationsFemale, int RandomMutationsMale) { NativeCall *, TArray *, int, int>((DWORD64)this, "AShooterPlayerController", "ClientReceiveDinoAncestors", ForDino, DinoAncestors, DinoAncestorsMale, RandomMutationsFemale, RandomMutationsMale); } - void ClientReceiveTribeLog(FString* LogString) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientReceiveTribeLog", LogString); } - void ClientRemoveItemFromSteamInventory(TArray* ItemSteamUserID, int Quantity) { NativeCall *, int>((DWORD64)this, "AShooterPlayerController", "ClientRemoveItemFromSteamInventory", ItemSteamUserID, Quantity); } - void ClientServerChatDirectMessage(FString* MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerChatDirectMessage", MessageText, MessageColor, bIsBold); } - void ClientServerNotification(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerNotification", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } - void ClientServerSOTFNotificationCustom(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientServerSOTFNotificationCustom", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } - void ClientSetArkTributeLimits(bool LimitItems, bool LimitDinos, bool LimitCharacters, int MaxItems, int MaxDinos, int MaxCharacters) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientSetArkTributeLimits", LimitItems, LimitDinos, LimitCharacters, MaxItems, MaxDinos, MaxCharacters); } - void ClientShowPaintingUI(UObject* ObjectToPaint) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientShowPaintingUI", ObjectToPaint); } - void ClientUnlockAchievement(FString* AchievementID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ClientUnlockAchievement", AchievementID); } - void ClientUpdateInventoryCraftQueue(UPrimalInventoryComponent* forInventory, TArray* CraftQueueEntries) { NativeCall *>((DWORD64)this, "AShooterPlayerController", "ClientUpdateInventoryCraftQueue", forInventory, CraftQueueEntries); } - void NotifyTribeWarStatus(FString* EnemyTribeString, int StatusType) { NativeCall((DWORD64)this, "AShooterPlayerController", "NotifyTribeWarStatus", EnemyTribeString, StatusType); } - FString* PlayerCommand(FString* result, FString* TheCommand) { return NativeCall((DWORD64)this, "AShooterPlayerController", "PlayerCommand", result, TheCommand); } - void ServerAddAchievementID(FString* AchievementID, bool bIsOnSpawn) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddAchievementID", AchievementID, bIsOnSpawn); } - void ServerAddItemToCustomFolder(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAddItemToCustomFolder", forInventory, CFolderName, InventoryCompType, ItemId); } - void ServerAllowPlayerToJoinNoCheck(FString* PlayerId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerAllowPlayerToJoinNoCheck", PlayerId); } - void ServerBanPlayer(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerBanPlayer", PlayerSteamName, PlayerSteamID); } - void ServerCharacterUploadWithItems_UploadItem(unsigned __int64 PlayerDataId, FItemNetInfo InvItem) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCharacterUploadWithItems_UploadItem", PlayerDataId, InvItem); } - void ServerCraftItem(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerCraftItem", inventoryComp, itemID); } - void ServerDeleteCustomFolder(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDeleteCustomFolder", forInventory, CFolderName, InventoryCompType); } - void ServerDeleteItemFromCustomFolder(UPrimalInventoryComponent* forInventory, FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDeleteItemFromCustomFolder", forInventory, CFolderName, InventoryCompType, ItemId); } - void ServerDisallowPlayerToJoinNoCheck(FString* PlayerId) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDisallowPlayerToJoinNoCheck", PlayerId); } - void ServerDPC() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDPC"); } - void ServerDropFromRemoteInventory(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerDropFromRemoteInventory", inventoryComp, itemID); } - void ServerEquipPawnItem(FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerEquipPawnItem", itemID); } - void ServerEquipToRemoteInventory(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerEquipToRemoteInventory", inventoryComp, itemID); } - void ServerKickPlayer(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerKickPlayer", PlayerSteamName, PlayerSteamID); } - void ServerMultiUse(UObject* ForObject, int useIndex) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerMultiUse", ForObject, useIndex); } - void ServerRemovePassenger() { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemovePassenger"); } - void ServerRemovePawnItem(FItemNetID itemID, bool bSecondryAction) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRemovePawnItem", itemID, bSecondryAction); } - void ServerRepairItem(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRepairItem", inventoryComp, itemID); } - void ServerRequestInventorySwapItems(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, FItemNetID itemID2) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventorySwapItems", inventoryComp, itemID1, itemID2); } - void ServerRequestInventoryUseItem(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItem", inventoryComp, itemID); } - void ServerRequestInventoryUseItemWithActor(AActor* anActor, UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, int AdditionalData) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItemWithActor", anActor, inventoryComp, itemID1, AdditionalData); } - void ServerRequestInventoryUseItemWithItem(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID1, FItemNetID itemID2, int AdditionalData) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestInventoryUseItemWithItem", inventoryComp, itemID1, itemID2, AdditionalData); } - void ServerRequestRemoveWeaponClipAmmo(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerRequestRemoveWeaponClipAmmo", inventoryComp, itemID); } - void ServerSendChatMessage(FString* ChatMessage, EChatSendMode::Type SendMode) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSendChatMessage", ChatMessage, SendMode); } - void ServerSendDirectMessage(FString* PlayerSteamID, FString* Message) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerSendDirectMessage", PlayerSteamID, Message); } - void ServerTransferAllFromRemoteInventory(UPrimalInventoryComponent* inventoryComp, FString* CurrentCustomFolderFilter, FString* CurrentNameFilter, FString* CurrentDestinationFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferAllFromRemoteInventory", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder); } - void ServerTransferAllToRemoteInventory(UPrimalInventoryComponent* inventoryComp, FString* CurrentCustomFolderFilter, FString* CurrentNameFilter, FString* CurrentDestinationFolder) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferAllToRemoteInventory", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder); } - void ServerTransferFromRemoteInventory(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, int requestedQuantity, int ToSlotIndex, bool bEquipItem) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferFromRemoteInventory", inventoryComp, itemID, requestedQuantity, ToSlotIndex, bEquipItem); } - void ServerTransferToRemoteInventory(UPrimalInventoryComponent* inventoryComp, FItemNetID itemID, bool bAlsoTryToEqup, int requestedQuantity) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerTransferToRemoteInventory", inventoryComp, itemID, bAlsoTryToEqup, requestedQuantity); } - void ServerUnbanPlayer(FString* PlayerSteamName, FString* PlayerSteamID) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUnbanPlayer", PlayerSteamName, PlayerSteamID); } - void ServerUploadCurrentCharacterAndItems(UPrimalInventoryComponent* inventoryComp) { NativeCall((DWORD64)this, "AShooterPlayerController", "ServerUploadCurrentCharacterAndItems", inventoryComp); } -}; - -// Character - -struct ACharacter : public APawn -{ - FVector GetBaseTranslationOffsetField() const { return GetNativeField(this, "ACharacter", "BaseTranslationOffset"); } - void SetBaseTranslationOffsetField(FVector newValue) { SetNativeField(this, "ACharacter", "BaseTranslationOffset", newValue); } - char GetReplicatedMovementModeField() const { return GetNativeField(this, "ACharacter", "ReplicatedMovementMode"); } - void SetReplicatedMovementModeField(char newValue) { SetNativeField(this, "ACharacter", "ReplicatedMovementMode", newValue); } - bool GetbInBaseReplicationField() const { return GetNativeField(this, "ACharacter", "bInBaseReplication"); } - void SetbInBaseReplicationField(bool newValue) { SetNativeField(this, "ACharacter", "bInBaseReplication", newValue); } - float GetLeftDynamicActorBaseTimeField() const { return GetNativeField(this, "ACharacter", "LeftDynamicActorBaseTime"); } - void SetLeftDynamicActorBaseTimeField(float newValue) { SetNativeField(this, "ACharacter", "LeftDynamicActorBaseTime", newValue); } - float GetCrouchedEyeHeightField() const { return GetNativeField(this, "ACharacter", "CrouchedEyeHeight"); } - void SetCrouchedEyeHeightField(float newValue) { SetNativeField(this, "ACharacter", "CrouchedEyeHeight", newValue); } - float GetProneEyeHeightField() const { return GetNativeField(this, "ACharacter", "ProneEyeHeight"); } - void SetProneEyeHeightField(float newValue) { SetNativeField(this, "ACharacter", "ProneEyeHeight", newValue); } - float GetJumpKeyHoldTimeField() const { return GetNativeField(this, "ACharacter", "JumpKeyHoldTime"); } - void SetJumpKeyHoldTimeField(float newValue) { SetNativeField(this, "ACharacter", "JumpKeyHoldTime", newValue); } - float GetJumpMaxHoldTimeField() const { return GetNativeField(this, "ACharacter", "JumpMaxHoldTime"); } - void SetJumpMaxHoldTimeField(float newValue) { SetNativeField(this, "ACharacter", "JumpMaxHoldTime", newValue); } - - // Functions - - bool NotifyLanded(FHitResult* Hit) { return NativeCall((DWORD64)this, "ACharacter", "NotifyLanded", Hit); } - bool IsJumping() { return NativeCall((DWORD64)this, "ACharacter", "IsJumping"); } - void GetSimpleCollisionCylinder(float* CollisionRadius, float* CollisionHalfHeight) { NativeCall((DWORD64)this, "ACharacter", "GetSimpleCollisionCylinder", CollisionRadius, CollisionHalfHeight); } - void ApplyWorldOffset(FVector* InOffset, bool bWorldShift) { NativeCall((DWORD64)this, "ACharacter", "ApplyWorldOffset", InOffset, bWorldShift); } - float GetDefaultHalfHeight() { return NativeCall((DWORD64)this, "ACharacter", "GetDefaultHalfHeight"); } - void Landed(FHitResult* Hit) { NativeCall((DWORD64)this, "ACharacter", "Landed", Hit); } - bool CanJump() { return NativeCall((DWORD64)this, "ACharacter", "CanJump"); } - bool CanJumpInternal_Implementation() { return NativeCall((DWORD64)this, "ACharacter", "CanJumpInternal_Implementation"); } - bool DoJump(bool bReplayingMoves) { return NativeCall((DWORD64)this, "ACharacter", "DoJump", bReplayingMoves); } - void RecalculateBaseEyeHeight() { NativeCall((DWORD64)this, "ACharacter", "RecalculateBaseEyeHeight"); } - void OnRep_IsCrouched() { NativeCall((DWORD64)this, "ACharacter", "OnRep_IsCrouched"); } - void OnRep_IsProne() { NativeCall((DWORD64)this, "ACharacter", "OnRep_IsProne"); } - bool CanCrouch() { return NativeCall((DWORD64)this, "ACharacter", "CanCrouch"); } - void Crouch(bool bClientSimulation) { NativeCall((DWORD64)this, "ACharacter", "Crouch", bClientSimulation); } - void UnCrouch(bool bClientSimulation) { NativeCall((DWORD64)this, "ACharacter", "UnCrouch", bClientSimulation); } - bool CanProne() { return NativeCall((DWORD64)this, "ACharacter", "CanProne"); } - void Prone(bool bClientSimulation) { NativeCall((DWORD64)this, "ACharacter", "Prone", bClientSimulation); } - void UnProne(bool bClientSimulation) { NativeCall((DWORD64)this, "ACharacter", "UnProne", bClientSimulation); } - void OnEndCrouch(float HeightAdjust, float ScaledHeightAdjust) { NativeCall((DWORD64)this, "ACharacter", "OnEndCrouch", HeightAdjust, ScaledHeightAdjust); } - void OnStartCrouch(float HeightAdjust, float ScaledHeightAdjust) { NativeCall((DWORD64)this, "ACharacter", "OnStartCrouch", HeightAdjust, ScaledHeightAdjust); } - void ApplyDamageMomentum(float DamageTaken, FDamageEvent* DamageEvent, APawn* PawnInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "ACharacter", "ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } - void TeleportSucceeded(bool bIsATest) { NativeCall((DWORD64)this, "ACharacter", "TeleportSucceeded", bIsATest); } - void ClearCrossLevelReferences() { NativeCall((DWORD64)this, "ACharacter", "ClearCrossLevelReferences"); } - bool IsBasedOnDynamicActor() { return NativeCall((DWORD64)this, "ACharacter", "IsBasedOnDynamicActor"); } - void TurnOff() { NativeCall((DWORD64)this, "ACharacter", "TurnOff"); } - void Restart() { NativeCall((DWORD64)this, "ACharacter", "Restart"); } - void PawnClientRestart() { NativeCall((DWORD64)this, "ACharacter", "PawnClientRestart"); } - void PossessedBy(AController* NewController) { NativeCall((DWORD64)this, "ACharacter", "PossessedBy", NewController); } - void UnPossessed() { NativeCall((DWORD64)this, "ACharacter", "UnPossessed"); } - void TornOff() { NativeCall((DWORD64)this, "ACharacter", "TornOff"); } - void BaseChange() { NativeCall((DWORD64)this, "ACharacter", "BaseChange"); } - void LaunchCharacter() { NativeCall((DWORD64)this, "ACharacter", "LaunchCharacter"); } - bool ShouldNotifyLanded(FHitResult* Hit) { return NativeCall((DWORD64)this, "ACharacter", "ShouldNotifyLanded", Hit); } - void Jump() { NativeCall((DWORD64)this, "ACharacter", "Jump"); } - void StopJumping() { NativeCall((DWORD64)this, "ACharacter", "StopJumping"); } - void CheckJumpInput(float DeltaTime) { NativeCall((DWORD64)this, "ACharacter", "CheckJumpInput", DeltaTime); } - void ClearJumpInput() { NativeCall((DWORD64)this, "ACharacter", "ClearJumpInput"); } - float GetJumpMaxHoldTime() { return NativeCall((DWORD64)this, "ACharacter", "GetJumpMaxHoldTime"); } - void PreNetReceive() { NativeCall((DWORD64)this, "ACharacter", "PreNetReceive"); } - void PostNetReceive() { NativeCall((DWORD64)this, "ACharacter", "PostNetReceive"); } - void OnRep_ReplicatedBasedMovement() { NativeCall((DWORD64)this, "ACharacter", "OnRep_ReplicatedBasedMovement"); } - void OnRep_ReplicatedMovement() { NativeCall((DWORD64)this, "ACharacter", "OnRep_ReplicatedMovement"); } - void OnRep_RootMotion() { NativeCall((DWORD64)this, "ACharacter", "OnRep_RootMotion"); } - void SimulatedRootMotionPositionFixup(float DeltaSeconds) { NativeCall((DWORD64)this, "ACharacter", "SimulatedRootMotionPositionFixup", DeltaSeconds); } - void UpdateSimulatedPosition(FVector* NewLocation, FRotator* NewRotation) { NativeCall((DWORD64)this, "ACharacter", "UpdateSimulatedPosition", NewLocation, NewRotation); } - void PostNetReceiveLocationAndRotation() { NativeCall((DWORD64)this, "ACharacter", "PostNetReceiveLocationAndRotation"); } - bool TeleportTo(FVector* DestLocation, FRotator* DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall((DWORD64)this, "ACharacter", "TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } - bool IsPlayingRootMotion() { return NativeCall((DWORD64)this, "ACharacter", "IsPlayingRootMotion"); } - //float PlayAnimMontage(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall((DWORD64)this, "ACharacter", "PlayAnimMontage", AnimMontage, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } - //void StopAnimMontage(UAnimMontage * AnimMontage) { NativeCall((DWORD64)this, "ACharacter", "StopAnimMontage", AnimMontage); } - //UAnimMontage * GetCurrentMontage() { return NativeCall((DWORD64)this, "ACharacter", "GetCurrentMontage"); } - void ClientCheatWalk_Implementation() { NativeCall((DWORD64)this, "ACharacter", "ClientCheatWalk_Implementation"); } - void ClientCheatFly_Implementation() { NativeCall((DWORD64)this, "ACharacter", "ClientCheatFly_Implementation"); } - void ClientCheatGhost_Implementation() { NativeCall((DWORD64)this, "ACharacter", "ClientCheatGhost_Implementation"); } - bool ShouldReplicateRotPitch() { return NativeCall((DWORD64)this, "ACharacter", "ShouldReplicateRotPitch"); } - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "ACharacter", "GetPrivateStaticClass"); } - void K2_OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall((DWORD64)this, "ACharacter", "K2_OnEndCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } - void K2_OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall((DWORD64)this, "ACharacter", "K2_OnStartCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } - void K2_UpdateCustomMovement(float DeltaTime) { NativeCall((DWORD64)this, "ACharacter", "K2_UpdateCustomMovement", DeltaTime); } - void OnJumped() { NativeCall((DWORD64)this, "ACharacter", "OnJumped"); } - void OnLanded(FHitResult* Hit) { NativeCall((DWORD64)this, "ACharacter", "OnLanded", Hit); } - void OnLaunched() { NativeCall((DWORD64)this, "ACharacter", "OnLaunched"); } - void OnWalkingOffLedge() { NativeCall((DWORD64)this, "ACharacter", "OnWalkingOffLedge"); } -}; - -struct APrimalCharacter : public ACharacter -{ - FVector GetOldLocationField() const { return GetNativeField(this, "APrimalCharacter", "OldLocation"); } - void SetOldLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "OldLocation", newValue); } - FRotator GetOldRotationField() const { return GetNativeField(this, "APrimalCharacter", "OldRotation"); } - void SetOldRotationField(FRotator newValue) { SetNativeField(this, "APrimalCharacter", "OldRotation", newValue); } - float GetEffectorInterpSpeedField() const { return GetNativeField(this, "APrimalCharacter", "EffectorInterpSpeed"); } - void SetEffectorInterpSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "EffectorInterpSpeed", newValue); } - float GetHalfLegLengthField() const { return GetNativeField(this, "APrimalCharacter", "HalfLegLength"); } - void SetHalfLegLengthField(float newValue) { SetNativeField(this, "APrimalCharacter", "HalfLegLength", newValue); } - float GetTwoLeggedVirtualPointDistFactorField() const { return GetNativeField(this, "APrimalCharacter", "TwoLeggedVirtualPointDistFactor"); } - void SetTwoLeggedVirtualPointDistFactorField(float newValue) { SetNativeField(this, "APrimalCharacter", "TwoLeggedVirtualPointDistFactor", newValue); } - float GetFullIKDistanceField() const { return GetNativeField(this, "APrimalCharacter", "FullIKDistance"); } - void SetFullIKDistanceField(float newValue) { SetNativeField(this, "APrimalCharacter", "FullIKDistance", newValue); } - float GetSimpleIkRateField() const { return GetNativeField(this, "APrimalCharacter", "SimpleIkRate"); } - void SetSimpleIkRateField(float newValue) { SetNativeField(this, "APrimalCharacter", "SimpleIkRate", newValue); } - FVector GetGroundCheckExtentField() const { return GetNativeField(this, "APrimalCharacter", "GroundCheckExtent"); } - void SetGroundCheckExtentField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "GroundCheckExtent", newValue); } - long double GetLastForceAimedCharactersTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastForceAimedCharactersTime"); } - void SetLastForceAimedCharactersTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastForceAimedCharactersTime", newValue); } - //TArray GetBuffsField() const { return GetNativeField>(this, "APrimalCharacter", "Buffs"); } - //void SetBuffsField(TArray newValue) { SetNativeField(this, "APrimalCharacter", "Buffs", newValue); } - FString GetTribeNameField() const { return GetNativeField(this, "APrimalCharacter", "TribeName"); } - void SetTribeNameField(FString newValue) { SetNativeField(this, "APrimalCharacter", "TribeName", newValue); } - float GetWaterSubmergedDepthThresholdField() const { return GetNativeField(this, "APrimalCharacter", "WaterSubmergedDepthThreshold"); } - void SetWaterSubmergedDepthThresholdField(float newValue) { SetNativeField(this, "APrimalCharacter", "WaterSubmergedDepthThreshold", newValue); } - float GetProneWaterSubmergedDepthThresholdField() const { return GetNativeField(this, "APrimalCharacter", "ProneWaterSubmergedDepthThreshold"); } - void SetProneWaterSubmergedDepthThresholdField(float newValue) { SetNativeField(this, "APrimalCharacter", "ProneWaterSubmergedDepthThreshold", newValue); } - TEnumAsByte GetSubmergedWaterMovementModeField() const { return GetNativeField>(this, "APrimalCharacter", "SubmergedWaterMovementMode"); } - void SetSubmergedWaterMovementModeField(TEnumAsByte newValue) { SetNativeField(this, "APrimalCharacter", "SubmergedWaterMovementMode", newValue); } - TEnumAsByte GetUnSubmergedWaterMovementModeField() const { return GetNativeField>(this, "APrimalCharacter", "UnSubmergedWaterMovementMode"); } - void SetUnSubmergedWaterMovementModeField(TEnumAsByte newValue) { SetNativeField(this, "APrimalCharacter", "UnSubmergedWaterMovementMode", newValue); } - TSubclassOf GetPoopItemClassField() const { return GetNativeField>(this, "APrimalCharacter", "PoopItemClass"); } - void SetPoopItemClassField(TSubclassOf newValue) { SetNativeField(this, "APrimalCharacter", "PoopItemClass", newValue); } - FName GetDragBoneNameField() const { return GetNativeField(this, "APrimalCharacter", "DragBoneName"); } - void SetDragBoneNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "DragBoneName", newValue); } - FName GetDragSocketNameField() const { return GetNativeField(this, "APrimalCharacter", "DragSocketName"); } - void SetDragSocketNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "DragSocketName", newValue); } - float GetMaxDragDistanceField() const { return GetNativeField(this, "APrimalCharacter", "MaxDragDistance"); } - void SetMaxDragDistanceField(float newValue) { SetNativeField(this, "APrimalCharacter", "MaxDragDistance", newValue); } - float GetMaxDragDistanceTimeoutField() const { return GetNativeField(this, "APrimalCharacter", "MaxDragDistanceTimeout"); } - void SetMaxDragDistanceTimeoutField(float newValue) { SetNativeField(this, "APrimalCharacter", "MaxDragDistanceTimeout", newValue); } - TArray GetBonesToIngoreWhileDraggedField() const { return GetNativeField>(this, "APrimalCharacter", "BonesToIngoreWhileDragged"); } - void SetBonesToIngoreWhileDraggedField(TArray newValue) { SetNativeField(this, "APrimalCharacter", "BonesToIngoreWhileDragged", newValue); } - float GetPreviewCameraMaxZoomMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "PreviewCameraMaxZoomMultiplier"); } - void SetPreviewCameraMaxZoomMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "PreviewCameraMaxZoomMultiplier", newValue); } - float GetPreviewCameraDefaultZoomMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "PreviewCameraDefaultZoomMultiplier"); } - void SetPreviewCameraDefaultZoomMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "PreviewCameraDefaultZoomMultiplier", newValue); } - float GetPreviewCameraDistanceScaleFactorField() const { return GetNativeField(this, "APrimalCharacter", "PreviewCameraDistanceScaleFactor"); } - void SetPreviewCameraDistanceScaleFactorField(float newValue) { SetNativeField(this, "APrimalCharacter", "PreviewCameraDistanceScaleFactor", newValue); } - APrimalCharacter* GetDraggedCharacterField() const { return GetNativeField(this, "APrimalCharacter", "DraggedCharacter"); } - void SetDraggedCharacterField(APrimalCharacter* newValue) { SetNativeField(this, "APrimalCharacter", "DraggedCharacter", newValue); } - APrimalCharacter* GetDraggingCharacterField() const { return GetNativeField(this, "APrimalCharacter", "DraggingCharacter"); } - void SetDraggingCharacterField(APrimalCharacter* newValue) { SetNativeField(this, "APrimalCharacter", "DraggingCharacter", newValue); } - FTransform GetLocalDraggedCharacterTransformField() const { return GetNativeField(this, "APrimalCharacter", "LocalDraggedCharacterTransform"); } - void SetLocalDraggedCharacterTransformField(FTransform newValue) { SetNativeField(this, "APrimalCharacter", "LocalDraggedCharacterTransform", newValue); } - long double GetStartDraggingTimeField() const { return GetNativeField(this, "APrimalCharacter", "StartDraggingTime"); } - void SetStartDraggingTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "StartDraggingTime", newValue); } - long double GetLastDragUpdateTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastDragUpdateTime"); } - void SetLastDragUpdateTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastDragUpdateTime", newValue); } - AActor* GetImmobilizationActorField() const { return GetNativeField(this, "APrimalCharacter", "ImmobilizationActor"); } - void SetImmobilizationActorField(AActor* newValue) { SetNativeField(this, "APrimalCharacter", "ImmobilizationActor", newValue); } - int GetCurrentFrameAnimPreventInputField() const { return GetNativeField(this, "APrimalCharacter", "CurrentFrameAnimPreventInput"); } - void SetCurrentFrameAnimPreventInputField(int newValue) { SetNativeField(this, "APrimalCharacter", "CurrentFrameAnimPreventInput", newValue); } - float GetBPTimerServerMinField() const { return GetNativeField(this, "APrimalCharacter", "BPTimerServerMin"); } - void SetBPTimerServerMinField(float newValue) { SetNativeField(this, "APrimalCharacter", "BPTimerServerMin", newValue); } - float GetBPTimerServerMaxField() const { return GetNativeField(this, "APrimalCharacter", "BPTimerServerMax"); } - void SetBPTimerServerMaxField(float newValue) { SetNativeField(this, "APrimalCharacter", "BPTimerServerMax", newValue); } - float GetBPTimerNonDedicatedMinField() const { return GetNativeField(this, "APrimalCharacter", "BPTimerNonDedicatedMin"); } - void SetBPTimerNonDedicatedMinField(float newValue) { SetNativeField(this, "APrimalCharacter", "BPTimerNonDedicatedMin", newValue); } - float GetBPTimerNonDedicatedMaxField() const { return GetNativeField(this, "APrimalCharacter", "BPTimerNonDedicatedMax"); } - void SetBPTimerNonDedicatedMaxField(float newValue) { SetNativeField(this, "APrimalCharacter", "BPTimerNonDedicatedMax", newValue); } - long double GetNextBPTimerServerField() const { return GetNativeField(this, "APrimalCharacter", "NextBPTimerServer"); } - void SetNextBPTimerServerField(long double newValue) { SetNativeField(this, "APrimalCharacter", "NextBPTimerServer", newValue); } - long double GetNextBPTimerNonDedicatedField() const { return GetNativeField(this, "APrimalCharacter", "NextBPTimerNonDedicated"); } - void SetNextBPTimerNonDedicatedField(long double newValue) { SetNativeField(this, "APrimalCharacter", "NextBPTimerNonDedicated", newValue); } - TArray> GetImmobilizationTrapsToIgnoreField() const { return GetNativeField>>(this, "APrimalCharacter", "ImmobilizationTrapsToIgnore"); } - void SetImmobilizationTrapsToIgnoreField(TArray> newValue) { SetNativeField(this, "APrimalCharacter", "ImmobilizationTrapsToIgnore", newValue); } - //TWeakObjectPtr GetBasedElevatorField() const { return GetNativeField>(this, "APrimalCharacter", "BasedElevator"); } - TWeakObjectPtr GetCarryingDinoField() const { return GetNativeField>(this, "APrimalCharacter", "CarryingDino"); } - FName GetDediOverrideCapsuleCollisionProfileNameField() const { return GetNativeField(this, "APrimalCharacter", "DediOverrideCapsuleCollisionProfileName"); } - void SetDediOverrideCapsuleCollisionProfileNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "DediOverrideCapsuleCollisionProfileName", newValue); } - FName GetDediOverrideMeshCollisionProfileNameField() const { return GetNativeField(this, "APrimalCharacter", "DediOverrideMeshCollisionProfileName"); } - void SetDediOverrideMeshCollisionProfileNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "DediOverrideMeshCollisionProfileName", newValue); } - FName GetSnaredFromSocketField() const { return GetNativeField(this, "APrimalCharacter", "SnaredFromSocket"); } - void SetSnaredFromSocketField(FName newValue) { SetNativeField(this, "APrimalCharacter", "SnaredFromSocket", newValue); } - float GetDamageNotifyTeamAggroMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroMultiplier"); } - void SetDamageNotifyTeamAggroMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroMultiplier", newValue); } - float GetDamageNotifyTeamAggroRangeField() const { return GetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroRange"); } - void SetDamageNotifyTeamAggroRangeField(float newValue) { SetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroRange", newValue); } - float GetDamageNotifyTeamAggroRangeFalloffField() const { return GetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroRangeFalloff"); } - void SetDamageNotifyTeamAggroRangeFalloffField(float newValue) { SetNativeField(this, "APrimalCharacter", "DamageNotifyTeamAggroRangeFalloff", newValue); } - float GetReplicatedCurrentHealthField() const { return GetNativeField(this, "APrimalCharacter", "ReplicatedCurrentHealth"); } - void SetReplicatedCurrentHealthField(float newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedCurrentHealth", newValue); } - float GetReplicatedMaxHealthField() const { return GetNativeField(this, "APrimalCharacter", "ReplicatedMaxHealth"); } - void SetReplicatedMaxHealthField(float newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedMaxHealth", newValue); } - float GetReplicatedCurrentTorporField() const { return GetNativeField(this, "APrimalCharacter", "ReplicatedCurrentTorpor"); } - void SetReplicatedCurrentTorporField(float newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedCurrentTorpor", newValue); } - float GetReplicatedMaxTorporField() const { return GetNativeField(this, "APrimalCharacter", "ReplicatedMaxTorpor"); } - void SetReplicatedMaxTorporField(float newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedMaxTorpor", newValue); } - FVector GetDragOffsetField() const { return GetNativeField(this, "APrimalCharacter", "DragOffset"); } - void SetDragOffsetField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "DragOffset", newValue); } - AShooterCharacter* GetLastGrapHookPullingOwnerField() const { return GetNativeField(this, "APrimalCharacter", "LastGrapHookPullingOwner"); } - void SetLastGrapHookPullingOwnerField(AShooterCharacter* newValue) { SetNativeField(this, "APrimalCharacter", "LastGrapHookPullingOwner", newValue); } - long double GetLastIkUpdateTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastIkUpdateTime"); } - void SetLastIkUpdateTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastIkUpdateTime", newValue); } - long double GetLastUpdatedAimOffsetsTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastUpdatedAimOffsetsTime"); } - void SetLastUpdatedAimOffsetsTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastUpdatedAimOffsetsTime", newValue); } - FVector GetMeshPreRagdollRelativeLocationField() const { return GetNativeField(this, "APrimalCharacter", "MeshPreRagdollRelativeLocation"); } - void SetMeshPreRagdollRelativeLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "MeshPreRagdollRelativeLocation", newValue); } - FRotator GetMeshPreRagdollRelativeRotationField() const { return GetNativeField(this, "APrimalCharacter", "MeshPreRagdollRelativeRotation"); } - void SetMeshPreRagdollRelativeRotationField(FRotator newValue) { SetNativeField(this, "APrimalCharacter", "MeshPreRagdollRelativeRotation", newValue); } - int GetDraggingBodyIndexField() const { return GetNativeField(this, "APrimalCharacter", "DraggingBodyIndex"); } - void SetDraggingBodyIndexField(int newValue) { SetNativeField(this, "APrimalCharacter", "DraggingBodyIndex", newValue); } - int GetDraggedBoneIndexField() const { return GetNativeField(this, "APrimalCharacter", "DraggedBoneIndex"); } - void SetDraggedBoneIndexField(int newValue) { SetNativeField(this, "APrimalCharacter", "DraggedBoneIndex", newValue); } - float GetRunningSpeedModifierField() const { return GetNativeField(this, "APrimalCharacter", "RunningSpeedModifier"); } - void SetRunningSpeedModifierField(float newValue) { SetNativeField(this, "APrimalCharacter", "RunningSpeedModifier", newValue); } - float GetLowHealthPercentageField() const { return GetNativeField(this, "APrimalCharacter", "LowHealthPercentage"); } - void SetLowHealthPercentageField(float newValue) { SetNativeField(this, "APrimalCharacter", "LowHealthPercentage", newValue); } - float GetBaseTurnRateField() const { return GetNativeField(this, "APrimalCharacter", "BaseTurnRate"); } - void SetBaseTurnRateField(float newValue) { SetNativeField(this, "APrimalCharacter", "BaseTurnRate", newValue); } - float GetBaseLookUpRateField() const { return GetNativeField(this, "APrimalCharacter", "BaseLookUpRate"); } - void SetBaseLookUpRateField(float newValue) { SetNativeField(this, "APrimalCharacter", "BaseLookUpRate", newValue); } - float GetMaxFallSpeedField() const { return GetNativeField(this, "APrimalCharacter", "MaxFallSpeed"); } - void SetMaxFallSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "MaxFallSpeed", newValue); } - float GetFallDamageMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "FallDamageMultiplier"); } - void SetFallDamageMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "FallDamageMultiplier", newValue); } - float GetCurrentCarriedYawField() const { return GetNativeField(this, "APrimalCharacter", "CurrentCarriedYaw"); } - void SetCurrentCarriedYawField(float newValue) { SetNativeField(this, "APrimalCharacter", "CurrentCarriedYaw", newValue); } - //APrimalStructureExplosiveTransGPS * GetCurrentTransponderField() const { return GetNativeField(this, "APrimalCharacter", "CurrentTransponder"); } - float GetTargetCarriedYawField() const { return GetNativeField(this, "APrimalCharacter", "TargetCarriedYaw"); } - void SetTargetCarriedYawField(float newValue) { SetNativeField(this, "APrimalCharacter", "TargetCarriedYaw", newValue); } - float GetServerTargetCarriedYawField() const { return GetNativeField(this, "APrimalCharacter", "ServerTargetCarriedYaw"); } - void SetServerTargetCarriedYawField(float newValue) { SetNativeField(this, "APrimalCharacter", "ServerTargetCarriedYaw", newValue); } - TWeakObjectPtr GetMountedDinoField() const { return GetNativeField>(this, "APrimalCharacter", "MountedDino"); } - float GetMountedDinoTimeField() const { return GetNativeField(this, "APrimalCharacter", "MountedDinoTime"); } - TWeakObjectPtr GetPreviousMountedDinoField() const { return GetNativeField>(this, "APrimalCharacter", "PreviousMountedDino"); } - FVector GetLastForceFallCheckBaseLocationField() const { return GetNativeField(this, "APrimalCharacter", "LastForceFallCheckBaseLocation"); } - void SetLastForceFallCheckBaseLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "LastForceFallCheckBaseLocation", newValue); } - FVector GetLastHitWallSweepCheckLocationField() const { return GetNativeField(this, "APrimalCharacter", "LastHitWallSweepCheckLocation"); } - void SetLastHitWallSweepCheckLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "LastHitWallSweepCheckLocation", newValue); } - long double GetLastTimeBasedMovementHadCurrentActorField() const { return GetNativeField(this, "APrimalCharacter", "LastTimeBasedMovementHadCurrentActor"); } - void SetLastTimeBasedMovementHadCurrentActorField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastTimeBasedMovementHadCurrentActor", newValue); } - float GetGrabWeightThresholdField() const { return GetNativeField(this, "APrimalCharacter", "GrabWeightThreshold"); } - void SetGrabWeightThresholdField(float newValue) { SetNativeField(this, "APrimalCharacter", "GrabWeightThreshold", newValue); } - float GetDragWeightField() const { return GetNativeField(this, "APrimalCharacter", "DragWeight"); } - void SetDragWeightField(float newValue) { SetNativeField(this, "APrimalCharacter", "DragWeight", newValue); } - FString GetDescriptiveNameField() const { return GetNativeField(this, "APrimalCharacter", "DescriptiveName"); } - void SetDescriptiveNameField(FString newValue) { SetNativeField(this, "APrimalCharacter", "DescriptiveName", newValue); } - FRotator GetReplicatedRootRotationField() const { return GetNativeField(this, "APrimalCharacter", "ReplicatedRootRotation"); } - void SetReplicatedRootRotationField(FRotator newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedRootRotation", newValue); } - TArray GetReplicatedBonesIndiciesField() const { return GetNativeField>(this, "APrimalCharacter", "ReplicatedBonesIndicies"); } - void SetReplicatedBonesIndiciesField(TArray newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedBonesIndicies", newValue); } - float GetKillXPBaseField() const { return GetNativeField(this, "APrimalCharacter", "KillXPBase"); } - void SetKillXPBaseField(float newValue) { SetNativeField(this, "APrimalCharacter", "KillXPBase", newValue); } - TArray GetReplicatedBonesField() const { return GetNativeField>(this, "APrimalCharacter", "ReplicatedBones"); } - void SetReplicatedBonesField(TArray newValue) { SetNativeField(this, "APrimalCharacter", "ReplicatedBones", newValue); } - float GetRagdollReplicationIntervalField() const { return GetNativeField(this, "APrimalCharacter", "RagdollReplicationInterval"); } - void SetRagdollReplicationIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "RagdollReplicationInterval", newValue); } - float GetClientRotationInterpSpeedField() const { return GetNativeField(this, "APrimalCharacter", "ClientRotationInterpSpeed"); } - void SetClientRotationInterpSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "ClientRotationInterpSpeed", newValue); } - float GetClientLocationInterpSpeedField() const { return GetNativeField(this, "APrimalCharacter", "ClientLocationInterpSpeed"); } - void SetClientLocationInterpSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "ClientLocationInterpSpeed", newValue); } - float GetMaxDragMovementSpeedField() const { return GetNativeField(this, "APrimalCharacter", "MaxDragMovementSpeed"); } - void SetMaxDragMovementSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "MaxDragMovementSpeed", newValue); } - FRotator GetCurrentAimRotField() const { return GetNativeField(this, "APrimalCharacter", "CurrentAimRot"); } - void SetCurrentAimRotField(FRotator newValue) { SetNativeField(this, "APrimalCharacter", "CurrentAimRot", newValue); } - FVector GetCurrentRootLocField() const { return GetNativeField(this, "APrimalCharacter", "CurrentRootLoc"); } - void SetCurrentRootLocField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "CurrentRootLoc", newValue); } - int GetLastYawSpeedWorldFrameCounterField() const { return GetNativeField(this, "APrimalCharacter", "LastYawSpeedWorldFrameCounter"); } - void SetLastYawSpeedWorldFrameCounterField(int newValue) { SetNativeField(this, "APrimalCharacter", "LastYawSpeedWorldFrameCounter", newValue); } - FName GetMeshPreRagdollCollisionProfileNameField() const { return GetNativeField(this, "APrimalCharacter", "MeshPreRagdollCollisionProfileName"); } - void SetMeshPreRagdollCollisionProfileNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "MeshPreRagdollCollisionProfileName", newValue); } - FName GetCapsulePreRagdollCollisionProfileNameField() const { return GetNativeField(this, "APrimalCharacter", "CapsulePreRagdollCollisionProfileName"); } - void SetCapsulePreRagdollCollisionProfileNameField(FName newValue) { SetNativeField(this, "APrimalCharacter", "CapsulePreRagdollCollisionProfileName", newValue); } - UPrimalCharacterStatusComponent* GetMyCharacterStatusComponentField() const { return GetNativeField(this, "APrimalCharacter", "MyCharacterStatusComponent"); } - void SetMyCharacterStatusComponentField(UPrimalCharacterStatusComponent* newValue) { SetNativeField(this, "APrimalCharacter", "MyCharacterStatusComponent", newValue); } - UPrimalInventoryComponent* GetMyInventoryComponentField() const { return GetNativeField(this, "APrimalCharacter", "MyInventoryComponent"); } - void SetMyInventoryComponentField(UPrimalInventoryComponent* newValue) { SetNativeField(this, "APrimalCharacter", "MyInventoryComponent", newValue); } - long double GetLastRunningTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastRunningTime"); } - void SetLastRunningTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastRunningTime", newValue); } - FVector GetTPVCameraOffsetField() const { return GetNativeField(this, "APrimalCharacter", "TPVCameraOffset"); } - void SetTPVCameraOffsetField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "TPVCameraOffset", newValue); } - FVector GetTPVCameraOffsetMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "TPVCameraOffsetMultiplier"); } - void SetTPVCameraOffsetMultiplierField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "TPVCameraOffsetMultiplier", newValue); } - FVector GetTPVCameraOrgOffsetField() const { return GetNativeField(this, "APrimalCharacter", "TPVCameraOrgOffset"); } - void SetTPVCameraOrgOffsetField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "TPVCameraOrgOffset", newValue); } - float GetLandedSoundMaxRangeField() const { return GetNativeField(this, "APrimalCharacter", "LandedSoundMaxRange"); } - void SetLandedSoundMaxRangeField(float newValue) { SetNativeField(this, "APrimalCharacter", "LandedSoundMaxRange", newValue); } - float GetFallingDamageHealthScaleBaseField() const { return GetNativeField(this, "APrimalCharacter", "FallingDamageHealthScaleBase"); } - void SetFallingDamageHealthScaleBaseField(float newValue) { SetNativeField(this, "APrimalCharacter", "FallingDamageHealthScaleBase", newValue); } - float GetFootstepsMaxRangeField() const { return GetNativeField(this, "APrimalCharacter", "FootstepsMaxRange"); } - void SetFootstepsMaxRangeField(float newValue) { SetNativeField(this, "APrimalCharacter", "FootstepsMaxRange", newValue); } - float GetMinTimeBetweenFootstepsField() const { return GetNativeField(this, "APrimalCharacter", "MinTimeBetweenFootsteps"); } - void SetMinTimeBetweenFootstepsField(float newValue) { SetNativeField(this, "APrimalCharacter", "MinTimeBetweenFootsteps", newValue); } - long double GetLastPlayedFootstepTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastPlayedFootstepTime"); } - void SetLastPlayedFootstepTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastPlayedFootstepTime", newValue); } - float GetMinTimeBetweenFootstepsRunningField() const { return GetNativeField(this, "APrimalCharacter", "MinTimeBetweenFootstepsRunning"); } - void SetMinTimeBetweenFootstepsRunningField(float newValue) { SetNativeField(this, "APrimalCharacter", "MinTimeBetweenFootstepsRunning", newValue); } - long double GetLastNetDidLandField() const { return GetNativeField(this, "APrimalCharacter", "LastNetDidLand"); } - int GetCachedNumberOfClientRagdollCorrectionAttemptsField() const { return GetNativeField(this, "APrimalCharacter", "CachedNumberOfClientRagdollCorrectionAttempts"); } - void SetCachedNumberOfClientRagdollCorrectionAttemptsField(int newValue) { SetNativeField(this, "APrimalCharacter", "CachedNumberOfClientRagdollCorrectionAttempts", newValue); } - int GetNumberOfClientRagdollCorrectionAttemptsField() const { return GetNativeField(this, "APrimalCharacter", "NumberOfClientRagdollCorrectionAttempts"); } - void SetNumberOfClientRagdollCorrectionAttemptsField(int newValue) { SetNativeField(this, "APrimalCharacter", "NumberOfClientRagdollCorrectionAttempts", newValue); } - float GetServerForceSleepRagdollIntervalField() const { return GetNativeField(this, "APrimalCharacter", "ServerForceSleepRagdollInterval"); } - void SetServerForceSleepRagdollIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "ServerForceSleepRagdollInterval", newValue); } - float GetClientForceSleepRagdollIntervalField() const { return GetNativeField(this, "APrimalCharacter", "ClientForceSleepRagdollInterval"); } - void SetClientForceSleepRagdollIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "ClientForceSleepRagdollInterval", newValue); } - float GetNonRelevantServerForceSleepRagdollIntervalField() const { return GetNativeField(this, "APrimalCharacter", "NonRelevantServerForceSleepRagdollInterval"); } - void SetNonRelevantServerForceSleepRagdollIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "NonRelevantServerForceSleepRagdollInterval", newValue); } - long double GetCorpseDestructionTimeField() const { return GetNativeField(this, "APrimalCharacter", "CorpseDestructionTime"); } - void SetCorpseDestructionTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "CorpseDestructionTime", newValue); } - float GetCorpseLifespanField() const { return GetNativeField(this, "APrimalCharacter", "CorpseLifespan"); } - void SetCorpseLifespanField(float newValue) { SetNativeField(this, "APrimalCharacter", "CorpseLifespan", newValue); } - float GetTPVStructurePlacingHeightMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "TPVStructurePlacingHeightMultiplier"); } - void SetTPVStructurePlacingHeightMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "TPVStructurePlacingHeightMultiplier", newValue); } - float GetCorpseFadeAwayTimeField() const { return GetNativeField(this, "APrimalCharacter", "CorpseFadeAwayTime"); } - void SetCorpseFadeAwayTimeField(float newValue) { SetNativeField(this, "APrimalCharacter", "CorpseFadeAwayTime", newValue); } - float GetRagdollDeathImpulseScalerField() const { return GetNativeField(this, "APrimalCharacter", "RagdollDeathImpulseScaler"); } - void SetRagdollDeathImpulseScalerField(float newValue) { SetNativeField(this, "APrimalCharacter", "RagdollDeathImpulseScaler", newValue); } - float GetBaseTargetingDesirabilityField() const { return GetNativeField(this, "APrimalCharacter", "BaseTargetingDesirability"); } - void SetBaseTargetingDesirabilityField(float newValue) { SetNativeField(this, "APrimalCharacter", "BaseTargetingDesirability", newValue); } - float GetDeadBaseTargetingDesirabilityField() const { return GetNativeField(this, "APrimalCharacter", "DeadBaseTargetingDesirability"); } - void SetDeadBaseTargetingDesirabilityField(float newValue) { SetNativeField(this, "APrimalCharacter", "DeadBaseTargetingDesirability", newValue); } - FRotator GetOrbitCamRotField() const { return GetNativeField(this, "APrimalCharacter", "OrbitCamRot"); } - void SetOrbitCamRotField(FRotator newValue) { SetNativeField(this, "APrimalCharacter", "OrbitCamRot", newValue); } - float GetOrbitCamZoomField() const { return GetNativeField(this, "APrimalCharacter", "OrbitCamZoom"); } - void SetOrbitCamZoomField(float newValue) { SetNativeField(this, "APrimalCharacter", "OrbitCamZoom", newValue); } - FVector GetLastSubmergedCheckLocField() const { return GetNativeField(this, "APrimalCharacter", "LastSubmergedCheckLoc"); } - void SetLastSubmergedCheckLocField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "LastSubmergedCheckLoc", newValue); } - long double GetLastTimeNotInFallingField() const { return GetNativeField(this, "APrimalCharacter", "LastTimeNotInFalling"); } - void SetLastTimeNotInFallingField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastTimeNotInFalling", newValue); } - float GetMaxCursorHUDDistanceField() const { return GetNativeField(this, "APrimalCharacter", "MaxCursorHUDDistance"); } - void SetMaxCursorHUDDistanceField(float newValue) { SetNativeField(this, "APrimalCharacter", "MaxCursorHUDDistance", newValue); } - float GetAddForwardVelocityOnJumpField() const { return GetNativeField(this, "APrimalCharacter", "AddForwardVelocityOnJump"); } - void SetAddForwardVelocityOnJumpField(float newValue) { SetNativeField(this, "APrimalCharacter", "AddForwardVelocityOnJump", newValue); } - FVector GetDeathActorTargetingOffsetField() const { return GetNativeField(this, "APrimalCharacter", "DeathActorTargetingOffset"); } - void SetDeathActorTargetingOffsetField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "DeathActorTargetingOffset", newValue); } - FName GetSocketOverrideTargetingLocationField() const { return GetNativeField(this, "APrimalCharacter", "SocketOverrideTargetingLocation"); } - void SetSocketOverrideTargetingLocationField(FName newValue) { SetNativeField(this, "APrimalCharacter", "SocketOverrideTargetingLocation", newValue); } - FDamageEvent* GetCurrentDamageEventField() const { return GetNativeField(this, "APrimalCharacter", "CurrentDamageEvent"); } - void SetCurrentDamageEventField(FDamageEvent* newValue) { SetNativeField(this, "APrimalCharacter", "CurrentDamageEvent", newValue); } - FVector GetLastApproximatePhysVolumeLocationField() const { return GetNativeField(this, "APrimalCharacter", "LastApproximatePhysVolumeLocation"); } - void SetLastApproximatePhysVolumeLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "LastApproximatePhysVolumeLocation", newValue); } - long double GetLastTimeSubmergedField() const { return GetNativeField(this, "APrimalCharacter", "LastTimeSubmerged"); } - void SetLastTimeSubmergedField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastTimeSubmerged", newValue); } - long double GetLastFootPhysicalSurfaceCheckTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastFootPhysicalSurfaceCheckTime"); } - void SetLastFootPhysicalSurfaceCheckTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastFootPhysicalSurfaceCheckTime", newValue); } - float GetFootPhysicalSurfaceCheckIntervalField() const { return GetNativeField(this, "APrimalCharacter", "FootPhysicalSurfaceCheckInterval"); } - void SetFootPhysicalSurfaceCheckIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "FootPhysicalSurfaceCheckInterval", newValue); } - TWeakObjectPtr GetLastHurtByNearbyPlayerField() const { return GetNativeField>(this, "APrimalCharacter", "LastHurtByNearbyPlayer"); } - float GetLastHurtByNearbyPlayerTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastHurtByNearbyPlayerTime"); } - TWeakObjectPtr GetLastAttackedNearbyPlayerField() const { return GetNativeField>(this, "APrimalCharacter", "LastAttackedNearbyPlayer"); } - void SetLastAttackedNearbyPlayerTimeField(float newValue) { SetNativeField(this, "APrimalCharacter", "LastAttackedNearbyPlayerTime", newValue); } - long double GetLastStartFallingRagdollTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastStartFallingRagdollTime"); } - void SetLastStartFallingRagdollTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastStartFallingRagdollTime", newValue); } - FVector GetRagdollLastFrameLinearVelocityField() const { return GetNativeField(this, "APrimalCharacter", "RagdollLastFrameLinearVelocity"); } - void SetRagdollLastFrameLinearVelocityField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "RagdollLastFrameLinearVelocity", newValue); } - float GetRagdollImpactDamageVelocityScaleField() const { return GetNativeField(this, "APrimalCharacter", "RagdollImpactDamageVelocityScale"); } - void SetRagdollImpactDamageVelocityScaleField(float newValue) { SetNativeField(this, "APrimalCharacter", "RagdollImpactDamageVelocityScale", newValue); } - float GetRagdollImpactDamageMinDecelerationSpeedField() const { return GetNativeField(this, "APrimalCharacter", "RagdollImpactDamageMinDecelerationSpeed"); } - void SetRagdollImpactDamageMinDecelerationSpeedField(float newValue) { SetNativeField(this, "APrimalCharacter", "RagdollImpactDamageMinDecelerationSpeed", newValue); } - float GetStartFallingImpactRagdollTimeIntervalField() const { return GetNativeField(this, "APrimalCharacter", "StartFallingImpactRagdollTimeInterval"); } - void SetStartFallingImpactRagdollTimeIntervalField(float newValue) { SetNativeField(this, "APrimalCharacter", "StartFallingImpactRagdollTimeInterval", newValue); } - FVector GetPreviousRagdollLocationField() const { return GetNativeField(this, "APrimalCharacter", "PreviousRagdollLocation"); } - void SetPreviousRagdollLocationField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "PreviousRagdollLocation", newValue); } - long double GetNextBlinkTimeField() const { return GetNativeField(this, "APrimalCharacter", "NextBlinkTime"); } - void SetNextBlinkTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "NextBlinkTime", newValue); } - long double GetBlinkTimerField() const { return GetNativeField(this, "APrimalCharacter", "BlinkTimer"); } - void SetBlinkTimerField(long double newValue) { SetNativeField(this, "APrimalCharacter", "BlinkTimer", newValue); } - long double GetLastInSwimmingSoundTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastInSwimmingSoundTime"); } - long double GetLastRelevantToPlayerTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastRelevantToPlayerTime"); } - void SetLastRelevantToPlayerTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastRelevantToPlayerTime", newValue); } - long double GetMeshStopForceUpdatingAtTimeField() const { return GetNativeField(this, "APrimalCharacter", "MeshStopForceUpdatingAtTime"); } - void SetMeshStopForceUpdatingAtTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "MeshStopForceUpdatingAtTime", newValue); } - long double GetLastWalkingTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastWalkingTime"); } - void SetLastWalkingTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastWalkingTime", newValue); } - long double GetLastSpecialDamageTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastSpecialDamageTime"); } - void SetLastSpecialDamageTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastSpecialDamageTime", newValue); } - float GetCorpseDraggedDecayRateField() const { return GetNativeField(this, "APrimalCharacter", "CorpseDraggedDecayRate"); } - void SetCorpseDraggedDecayRateField(float newValue) { SetNativeField(this, "APrimalCharacter", "CorpseDraggedDecayRate", newValue); } - float GetPoopAltItemChanceField() const { return GetNativeField(this, "APrimalCharacter", "PoopAltItemChance"); } - void SetPoopAltItemChanceField(float newValue) { SetNativeField(this, "APrimalCharacter", "PoopAltItemChance", newValue); } - TSubclassOf GetPoopAltItemClassField() const { return GetNativeField>(this, "APrimalCharacter", "PoopAltItemClass"); } - void SetPoopAltItemClassField(TSubclassOf newValue) { SetNativeField(this, "APrimalCharacter", "PoopAltItemClass", newValue); } - //TArray> GetDefaultBuffsField() const { return GetNativeField>>(this, "APrimalCharacter", "DefaultBuffs"); } - float GetRunningMaxDesiredRotDeltaField() const { return GetNativeField(this, "APrimalCharacter", "RunningMaxDesiredRotDelta"); } - void SetRunningMaxDesiredRotDeltaField(float newValue) { SetNativeField(this, "APrimalCharacter", "RunningMaxDesiredRotDelta", newValue); } - long double GetCorpseDestructionTimerField() const { return GetNativeField(this, "APrimalCharacter", "CorpseDestructionTimer"); } - void SetCorpseDestructionTimerField(long double newValue) { SetNativeField(this, "APrimalCharacter", "CorpseDestructionTimer", newValue); } - float GetOriginalCorpseLifespanField() const { return GetNativeField(this, "APrimalCharacter", "OriginalCorpseLifespan"); } - void SetOriginalCorpseLifespanField(float newValue) { SetNativeField(this, "APrimalCharacter", "OriginalCorpseLifespan", newValue); } - float GetCorpseHarvestFadeTimeField() const { return GetNativeField(this, "APrimalCharacter", "CorpseHarvestFadeTime"); } - void SetCorpseHarvestFadeTimeField(float newValue) { SetNativeField(this, "APrimalCharacter", "CorpseHarvestFadeTime", newValue); } - FVector GetCurrentLocalRootLocField() const { return GetNativeField(this, "APrimalCharacter", "CurrentLocalRootLoc"); } - void SetCurrentLocalRootLocField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "CurrentLocalRootLoc", newValue); } - float GetRootYawField() const { return GetNativeField(this, "APrimalCharacter", "RootYaw"); } - void SetRootYawField(float newValue) { SetNativeField(this, "APrimalCharacter", "RootYaw", newValue); } - long double GetLastTimeInSwimmingField() const { return GetNativeField(this, "APrimalCharacter", "LastTimeInSwimming"); } - void SetLastTimeInSwimmingField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastTimeInSwimming", newValue); } - long double GetLastListenRangePushTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastListenRangePushTime"); } - void SetLastListenRangePushTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastListenRangePushTime", newValue); } - float GetLastDamageAmountMaterialValueField() const { return GetNativeField(this, "APrimalCharacter", "LastDamageAmountMaterialValue"); } - void SetLastDamageAmountMaterialValueField(float newValue) { SetNativeField(this, "APrimalCharacter", "LastDamageAmountMaterialValue", newValue); } - float GetBuffedDamageMultField() const { return GetNativeField(this, "APrimalCharacter", "BuffedDamageMult"); } - void SetBuffedDamageMultField(float newValue) { SetNativeField(this, "APrimalCharacter", "BuffedDamageMult", newValue); } - float GetBuffedResistanceMultField() const { return GetNativeField(this, "APrimalCharacter", "BuffedResistanceMult"); } - float GetExtraMaxSpeedModifierField() const { return GetNativeField(this, "APrimalCharacter", "ExtraMaxSpeedModifier"); } - void SetExtraMaxSpeedModifierField(float newValue) { SetNativeField(this, "APrimalCharacter", "ExtraMaxSpeedModifier", newValue); } - float GetTamedDinoCallOutRangeField() const { return GetNativeField(this, "APrimalCharacter", "TamedDinoCallOutRange"); } - void SetTamedDinoCallOutRangeField(float newValue) { SetNativeField(this, "APrimalCharacter", "TamedDinoCallOutRange", newValue); } - long double GetLastBumpedDamageTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastBumpedDamageTime"); } - void SetLastBumpedDamageTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastBumpedDamageTime", newValue); } - FVector GetTargetPathfindingLocationOffsetField() const { return GetNativeField(this, "APrimalCharacter", "TargetPathfindingLocationOffset"); } - void SetTargetPathfindingLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalCharacter", "TargetPathfindingLocationOffset", newValue); } - long double GetLastTookDamageTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastTookDamageTime"); } - void SetLastTookDamageTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastTookDamageTime", newValue); } - float GetExtraReceiveDamageMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "ExtraReceiveDamageMultiplier"); } - void SetExtraReceiveDamageMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "ExtraReceiveDamageMultiplier", newValue); } - float GetExtraMeleeDamageMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "ExtraMeleeDamageMultiplier"); } - void SetExtraMeleeDamageMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "ExtraMeleeDamageMultiplier", newValue); } - float GetLastFallingZField() const { return GetNativeField(this, "APrimalCharacter", "LastFallingZ"); } - void SetLastFallingZField(float newValue) { SetNativeField(this, "APrimalCharacter", "LastFallingZ", newValue); } - int GetNumFallZFailsField() const { return GetNativeField(this, "APrimalCharacter", "NumFallZFails"); } - void SetNumFallZFailsField(int newValue) { SetNativeField(this, "APrimalCharacter", "NumFallZFails", newValue); } - TArray> GetCharactersGrappledToMeField() const { return GetNativeField>>(this, "APrimalCharacter", "CharactersGrappledToMe"); } - float GetDamageTheMeleeDamageCauserPercentField() const { return GetNativeField(this, "APrimalCharacter", "DamageTheMeleeDamageCauserPercent"); } - void SetDamageTheMeleeDamageCauserPercentField(float newValue) { SetNativeField(this, "APrimalCharacter", "DamageTheMeleeDamageCauserPercent", newValue); } - float GetDurabilityDegrateTheMeleeDamageCauserPercentField() const { return GetNativeField(this, "APrimalCharacter", "DurabilityDegrateTheMeleeDamageCauserPercent"); } - void SetDurabilityDegrateTheMeleeDamageCauserPercentField(float newValue) { SetNativeField(this, "APrimalCharacter", "DurabilityDegrateTheMeleeDamageCauserPercent", newValue); } - TSubclassOf GetDamageTheMeleeDamageCauserDamageTypeField() const { return GetNativeField>(this, "APrimalCharacter", "DamageTheMeleeDamageCauserDamageType"); } - void SetDamageTheMeleeDamageCauserDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalCharacter", "DamageTheMeleeDamageCauserDamageType", newValue); } - char GetTribeGroupInventoryRankField() const { return GetNativeField(this, "APrimalCharacter", "TribeGroupInventoryRank"); } - void SetTribeGroupInventoryRankField(char newValue) { SetNativeField(this, "APrimalCharacter", "TribeGroupInventoryRank", newValue); } - float GetCharacterDamageImpulseMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "CharacterDamageImpulseMultiplier"); } - void SetCharacterDamageImpulseMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "CharacterDamageImpulseMultiplier", newValue); } - long double GetForceCheckPushThroughWallsTimeField() const { return GetNativeField(this, "APrimalCharacter", "ForceCheckPushThroughWallsTime"); } - void SetForceCheckPushThroughWallsTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "ForceCheckPushThroughWallsTime", newValue); } - long double GetLastStoppedEatAnimationTimeField() const { return GetNativeField(this, "APrimalCharacter", "LastStoppedEatAnimationTime"); } - void SetLastStoppedEatAnimationTimeField(long double newValue) { SetNativeField(this, "APrimalCharacter", "LastStoppedEatAnimationTime", newValue); } - float GetClientRotationInterpSpeedMultiplierGroundField() const { return GetNativeField(this, "APrimalCharacter", "ClientRotationInterpSpeedMultiplierGround"); } - void SetClientRotationInterpSpeedMultiplierGroundField(float newValue) { SetNativeField(this, "APrimalCharacter", "ClientRotationInterpSpeedMultiplierGround", newValue); } - float GetGlideGravityScaleMultiplierField() const { return GetNativeField(this, "APrimalCharacter", "GlideGravityScaleMultiplier"); } - void SetGlideGravityScaleMultiplierField(float newValue) { SetNativeField(this, "APrimalCharacter", "GlideGravityScaleMultiplier", newValue); } - float GetGlideMaxCarriedWeightField() const { return GetNativeField(this, "APrimalCharacter", "GlideMaxCarriedWeight"); } - void SetGlideMaxCarriedWeightField(float newValue) { SetNativeField(this, "APrimalCharacter", "GlideMaxCarriedWeight", newValue); } - - // Functions - - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalCharacter", "GetPrivateStaticClass"); } - float BPGetAddForwardVelocityOnJump_Implementation() { return NativeCall((DWORD64)this, "APrimalCharacter", "BPGetAddForwardVelocityOnJump_Implementation"); } - bool CanJumpInternal_Implementation() { return NativeCall((DWORD64)this, "APrimalCharacter", "CanJumpInternal_Implementation"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "APrimalCharacter", "PreInitializeComponents"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APrimalCharacter", "PostInitializeComponents"); } - void Destroyed() { NativeCall((DWORD64)this, "APrimalCharacter", "Destroyed"); } - void BeginPlay() { NativeCall((DWORD64)this, "APrimalCharacter", "BeginPlay"); } - void FellOutOfWorld(UDamageType* dmgType) { NativeCall((DWORD64)this, "APrimalCharacter", "FellOutOfWorld", dmgType); } - void Suicide() { NativeCall((DWORD64)this, "APrimalCharacter", "Suicide"); } - bool IsDead() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsDead"); } - void AdjustDamage(float* Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalCharacter", "AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - //bool CanBeTargetedBy(ITargetableInterface * Attacker) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanBeTargetedBy", Attacker); } - bool IsValidForCombatMusic() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsValidForCombatMusic"); } - float TakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalCharacter", "TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - bool CanDie(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanDie", KillingDamage, DamageEvent, Killer, DamageCauser); } - bool Die(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalCharacter", "Die", KillingDamage, DamageEvent, Killer, DamageCauser); } - void DeathHarvestingDepleted() { NativeCall((DWORD64)this, "APrimalCharacter", "DeathHarvestingDepleted"); } - void PlayDyingPoint_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDyingPoint_Implementation"); } - void PlayDyingRadial_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDyingRadial_Implementation"); } - void SetDeath(bool bForceRagdoll) { NativeCall((DWORD64)this, "APrimalCharacter", "SetDeath", bForceRagdoll); } - bool CanIgnoreImmobilizationTrap(UClass* TrapClass, bool* bForceTrigger) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanIgnoreImmobilizationTrap", TrapClass, bForceTrigger); } - void Immobilize(bool bImmobilize, AActor* UsingActor, bool bImmobilizeFalling) { NativeCall((DWORD64)this, "APrimalCharacter", "Immobilize", bImmobilize, UsingActor, bImmobilizeFalling); } - float GetCorpseLifespan() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetCorpseLifespan"); } - void PlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - void PlayHitEffectGeneric_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayHitEffectGeneric_Implementation"); } - void PlayHitEffectRadial_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayHitEffectRadial_Implementation"); } - bool IsGameInputAllowed() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsGameInputAllowed"); } - void PlayHitEffect(float DamageTaken, FDamageEvent* DamageEvent, APawn* PawnInstigator, AActor* DamageCauser, bool bIsLocalPath) { NativeCall((DWORD64)this, "APrimalCharacter", "PlayHitEffect", DamageTaken, DamageEvent, PawnInstigator, DamageCauser, bIsLocalPath); } - void DoSetRagdollPhysics() { NativeCall((DWORD64)this, "APrimalCharacter", "DoSetRagdollPhysics"); } - void SetRagdollPhysics(bool bUseRagdollLocationOffset, bool bForceRecreateBones, bool bForLoading) { NativeCall((DWORD64)this, "APrimalCharacter", "SetRagdollPhysics", bUseRagdollLocationOffset, bForceRecreateBones, bForLoading); } - void CheckOnDinoPlatformSaddle() { NativeCall((DWORD64)this, "APrimalCharacter", "CheckOnDinoPlatformSaddle"); } - void ForceSleepRagdollEx() { NativeCall((DWORD64)this, "APrimalCharacter", "ForceSleepRagdollEx"); } - void ForceSleepRagdoll() { NativeCall((DWORD64)this, "APrimalCharacter", "ForceSleepRagdoll"); } - void ClearRagdollPhysics() { NativeCall((DWORD64)this, "APrimalCharacter", "ClearRagdollPhysics"); } - void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall((DWORD64)this, "APrimalCharacter", "SetSleeping", bSleeping, bUseRagdollLocationOffset); } - void ExecSetSleeping(bool bEnable) { NativeCall((DWORD64)this, "APrimalCharacter", "ExecSetSleeping", bEnable); } - void ChangeActorTeam(int NewTeam) { NativeCall((DWORD64)this, "APrimalCharacter", "ChangeActorTeam", NewTeam); } - void UpdateTribeName() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateTribeName"); } - void NetUpdateTribeName_Implementation(FString* NewTribeName) { NativeCall((DWORD64)this, "APrimalCharacter", "NetUpdateTribeName_Implementation", NewTribeName); } - float GetMaxCursorHUDDistance(AShooterPlayerController* PC) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetMaxCursorHUDDistance", PC); } - bool IsSubmerged(bool bDontCheckSwimming, bool bUseFullThreshold, bool bForceCheck) { return NativeCall((DWORD64)this, "APrimalCharacter", "IsSubmerged", bDontCheckSwimming, bUseFullThreshold, bForceCheck); } - float GetWaterSubmergedDepthThreshold() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetWaterSubmergedDepthThreshold"); } - //float PlayAnimMontage(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall((DWORD64)this, "APrimalCharacter", "PlayAnimMontage", AnimMontage, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } - //void StopAnimMontage(UAnimMontage * AnimMontage) { NativeCall((DWORD64)this, "APrimalCharacter", "StopAnimMontage", AnimMontage); } - //bool IsMontagePlaying(UAnimMontage * AnimMontage, float TimeFromEndToConsiderFinished) { return NativeCall((DWORD64)this, "APrimalCharacter", "IsMontagePlaying", AnimMontage, TimeFromEndToConsiderFinished); } - void StopAllAnimMontages(float BlendOutTime) { NativeCall((DWORD64)this, "APrimalCharacter", "StopAllAnimMontages", BlendOutTime); } - void TryGiveDefaultWeapon() { NativeCall((DWORD64)this, "APrimalCharacter", "TryGiveDefaultWeapon"); } - void TryPoop() { NativeCall((DWORD64)this, "APrimalCharacter", "TryPoop"); } - void OrbitCamToggle() { NativeCall((DWORD64)this, "APrimalCharacter", "OrbitCamToggle"); } - void OrbitCamOn() { NativeCall((DWORD64)this, "APrimalCharacter", "OrbitCamOn"); } - void OrbitCamOff() { NativeCall((DWORD64)this, "APrimalCharacter", "OrbitCamOff"); } - void ServerRequestDrag_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerRequestDrag_Implementation"); } - //void ServerDinoOrder_Implementation(APrimalDinoCharacter * aDino, EDinoTamedOrder::Type OrderType) { NativeCall((DWORD64)this, "APrimalCharacter", "ServerDinoOrder_Implementation", aDino, OrderType); } - void MoveForward(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "MoveForward", Val); } - void MoveRight(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "MoveRight", Val); } - void MoveUp(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "MoveUp", Val); } - void TurnInput(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "TurnInput", Val); } - void LookInput(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "LookInput", Val); } - void TurnAtRate(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "TurnAtRate", Val); } - void LookUpAtRate(float Val) { NativeCall((DWORD64)this, "APrimalCharacter", "LookUpAtRate", Val); } - bool IsInputAllowed() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsInputAllowed"); } - void OnStartRunning() { NativeCall((DWORD64)this, "APrimalCharacter", "OnStartRunning"); } - void OnStopRunning() { NativeCall((DWORD64)this, "APrimalCharacter", "OnStopRunning"); } - void OnRunToggle() { NativeCall((DWORD64)this, "APrimalCharacter", "OnRunToggle"); } - bool IsRunning() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsRunning"); } - bool IsMoving() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsMoving"); } - void UpdateStatusComponent(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateStatusComponent", DeltaSeconds); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalCharacter", "Tick", DeltaSeconds); } - void SetCharacterMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall((DWORD64)this, "APrimalCharacter", "SetCharacterMeshesMaterialScalarParamValue", ParamName, Value); } - void UpdateSwimmingState() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateSwimmingState"); } - FVector* GetRootBodyBoneLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetRootBodyBoneLocation", result); } - void ZoomIn() { NativeCall((DWORD64)this, "APrimalCharacter", "ZoomIn"); } - void ZoomOut() { NativeCall((DWORD64)this, "APrimalCharacter", "ZoomOut"); } - void OnStartJump() { NativeCall((DWORD64)this, "APrimalCharacter", "OnStartJump"); } - void PlayJumpAnim() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayJumpAnim"); } - void PlayLandedAnim() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayLandedAnim"); } - void OnJumped_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "OnJumped_Implementation"); } - void NetOnJumped_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "NetOnJumped_Implementation"); } - void OnStopJump() { NativeCall((DWORD64)this, "APrimalCharacter", "OnStopJump"); } - float GetRunningSpeedModifier(bool bIsForDefaultSpeed) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetRunningSpeedModifier", bIsForDefaultSpeed); } - float GetMaxHealth() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetMaxHealth"); } - bool AllowFirstPerson() { return NativeCall((DWORD64)this, "APrimalCharacter", "AllowFirstPerson"); } - //AActor * GetAimedActor(ECollisionChannel CollisionChannel, UActorComponent ** HitComponent, float MaxDistanceOverride, float CheckRadius, int * hitBodyIndex, FHitResult * outHitResult, bool bForceUseCameraLocation, bool bForceUpdateAimedActors) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetAimedActor", CollisionChannel, HitComponent, MaxDistanceOverride, CheckRadius, hitBodyIndex, outHitResult, bForceUseCameraLocation, bForceUpdateAimedActors); } - void OnPrimalCharacterSleeped() { NativeCall((DWORD64)this, "APrimalCharacter", "OnPrimalCharacterSleeped"); } - void OnPrimalCharacterUnsleeped() { NativeCall((DWORD64)this, "APrimalCharacter", "OnPrimalCharacterUnsleeped"); } - //float PlayAnimEx(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bReplicate, bool bReplicateToOwner, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall((DWORD64)this, "APrimalCharacter", "PlayAnimEx", AnimMontage, InPlayRate, StartSectionName, bReplicate, bReplicateToOwner, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } - //void StopAnimEx(UAnimMontage * AnimMontage, bool bReplicate, bool bReplicateToOwner, float BlendOutTime) { NativeCall((DWORD64)this, "APrimalCharacter", "StopAnimEx", AnimMontage, bReplicate, bReplicateToOwner, BlendOutTime); } - void SetRunning(bool bNewRunning) { NativeCall((DWORD64)this, "APrimalCharacter", "SetRunning", bNewRunning); } - void ServerSetRunning_Implementation(bool bNewRunning) { NativeCall((DWORD64)this, "APrimalCharacter", "ServerSetRunning_Implementation", bNewRunning); } - void UpdateRunSounds(bool bNewRunning) { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateRunSounds", bNewRunning); } - void ControllerLeavingGame(AShooterPlayerController* theController) { NativeCall((DWORD64)this, "APrimalCharacter", "ControllerLeavingGame", theController); } - float GetLowHealthPercentage() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetLowHealthPercentage"); } - bool IsAlive() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsAlive"); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetDescriptiveName", result); } - float GetHealthPercentage() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetHealthPercentage"); } - float GetHealth() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetHealth"); } - FVector* GetInterpolatedLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetInterpolatedLocation", result); } - FRotator* GetInterpolatedRotation(FRotator* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetInterpolatedRotation", result); } - float GetClientRotationInterpSpeed(FVector* RootLoc) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetClientRotationInterpSpeed", RootLoc); } - FRotator* GetAimOffsets(FRotator* result, float DeltaTime, FRotator* RootRotOffset, float* RootYawSpeed, float MaxYawAimClamp, FVector* RootLocOffset) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetAimOffsets", result, DeltaTime, RootRotOffset, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } - void ForceRefreshBones() { NativeCall((DWORD64)this, "APrimalCharacter", "ForceRefreshBones"); } - void StartForceSkelUpdate(float ForTime, bool bForceUpdateMesh, bool bServerOnly) { NativeCall((DWORD64)this, "APrimalCharacter", "StartForceSkelUpdate", ForTime, bForceUpdateMesh, bServerOnly); } - void EndForceSkelUpdate() { NativeCall((DWORD64)this, "APrimalCharacter", "EndForceSkelUpdate"); } - bool IsConscious() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsConscious"); } - void Stasis() { NativeCall((DWORD64)this, "APrimalCharacter", "Stasis"); } - void Unstasis() { NativeCall((DWORD64)this, "APrimalCharacter", "Unstasis"); } - UPrimalCharacterStatusComponent* GetCharacterStatusComponent() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetCharacterStatusComponent"); } - bool IsValidForStatusUpdate() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsValidForStatusUpdate"); } - float GetMaxSpeedModifier() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetMaxSpeedModifier"); } - float GetJumpZModifier() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetJumpZModifier"); } - bool CanBeBaseForCharacter(APawn* Pawn) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanBeBaseForCharacter", Pawn); } - float GetDefaultMovementSpeed() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetDefaultMovementSpeed"); } - void TakeFallingDamage(FHitResult* Hit) { NativeCall((DWORD64)this, "APrimalCharacter", "TakeFallingDamage", Hit); } - void OnLanded(FHitResult* Hit) { NativeCall((DWORD64)this, "APrimalCharacter", "OnLanded", Hit); } - void NetDidLand_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "NetDidLand_Implementation"); } - void DidLand() { NativeCall((DWORD64)this, "APrimalCharacter", "DidLand"); } - void FadeOutLoadingMusic() { NativeCall((DWORD64)this, "APrimalCharacter", "FadeOutLoadingMusic"); } - void LocalPossessedBy(APlayerController* ByController) { NativeCall((DWORD64)this, "APrimalCharacter", "LocalPossessedBy", ByController); } - void LocalUnpossessed_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "LocalUnpossessed_Implementation"); } - void PlayFootstep() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayFootstep"); } - bool ModifyInputAcceleration(FVector* InputAcceleration) { return NativeCall((DWORD64)this, "APrimalCharacter", "ModifyInputAcceleration", InputAcceleration); } - bool ShouldAttackStopMoveCollapsing() { return NativeCall((DWORD64)this, "APrimalCharacter", "ShouldAttackStopMoveCollapsing"); } - bool AnimationPreventsInput() { return NativeCall((DWORD64)this, "APrimalCharacter", "AnimationPreventsInput"); } - float SetHealth(float newHealth) { return NativeCall((DWORD64)this, "APrimalCharacter", "SetHealth", newHealth); } - bool IsOfTribe(int ID) { return NativeCall((DWORD64)this, "APrimalCharacter", "IsOfTribe", ID); } - void SetRagdollReplication(bool Enabled) { NativeCall((DWORD64)this, "APrimalCharacter", "SetRagdollReplication", Enabled); } - void ReplicateRagdoll() { NativeCall((DWORD64)this, "APrimalCharacter", "ReplicateRagdoll"); } - void InitRagdollRepConstraints() { NativeCall((DWORD64)this, "APrimalCharacter", "InitRagdollRepConstraints"); } - void TermRagdollRepConstraints() { NativeCall((DWORD64)this, "APrimalCharacter", "TermRagdollRepConstraints"); } - void ClientRagdollUpdate_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ClientRagdollUpdate_Implementation"); } - void SleepBodies() { NativeCall((DWORD64)this, "APrimalCharacter", "SleepBodies"); } - void UpdateRagdollReplicationOnClient() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateRagdollReplicationOnClient"); } - void ClientEndRagdollUpdate_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ClientEndRagdollUpdate_Implementation"); } - void OnRep_RagdollPositions() { NativeCall((DWORD64)this, "APrimalCharacter", "OnRep_RagdollPositions"); } - void InitRagdollReplication() { NativeCall((DWORD64)this, "APrimalCharacter", "InitRagdollReplication"); } - bool CanDragCharacter(APrimalCharacter* Character) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanDragCharacter", Character); } - bool CanBeDragged() { return NativeCall((DWORD64)this, "APrimalCharacter", "CanBeDragged"); } - bool IsInvincible() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsInvincible"); } - int GetNearestBoneIndexForDrag() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetNearestBoneIndexForDrag"); } - void TryDragCharacter() { NativeCall((DWORD64)this, "APrimalCharacter", "TryDragCharacter"); } - void UpdateDragging() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateDragging"); } - void OnBeginDrag_Implementation(APrimalCharacter* Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall((DWORD64)this, "APrimalCharacter", "OnBeginDrag_Implementation", Dragged, BoneIndex, bWithGrapHook); } - void OnEndDrag_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "OnEndDrag_Implementation"); } - void OnBeginDragged(APrimalCharacter* Dragger) { NativeCall((DWORD64)this, "APrimalCharacter", "OnBeginDragged", Dragger); } - void OnEndDragged(APrimalCharacter* Dragger) { NativeCall((DWORD64)this, "APrimalCharacter", "OnEndDragged", Dragger); } - float GetKillXP() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetKillXP"); } - void UpdateIK() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateIK"); } - bool IKFootTrace() { return NativeCall((DWORD64)this, "APrimalCharacter", "IKFootTrace"); } - void SetEnableIK(bool bEnable, bool bForceOnDedicated) { NativeCall((DWORD64)this, "APrimalCharacter", "SetEnableIK", bEnable, bForceOnDedicated); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "APrimalCharacter", "TryMultiUse", ForPC, UseIndex); } - void ClientMultiUse(APlayerController* ForPC, int UseIndex) { NativeCall((DWORD64)this, "APrimalCharacter", "ClientMultiUse", ForPC, UseIndex); } - void ForceTickPoseDelta() { NativeCall((DWORD64)this, "APrimalCharacter", "ForceTickPoseDelta"); } - void CheckJumpOutOfWater() { NativeCall((DWORD64)this, "APrimalCharacter", "CheckJumpOutOfWater"); } - bool IsTargetableDead() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsTargetableDead"); } - void Poop() { NativeCall((DWORD64)this, "APrimalCharacter", "Poop"); } - void EmitPoop() { NativeCall((DWORD64)this, "APrimalCharacter", "EmitPoop"); } - bool IsValidForStatusRecovery() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsValidForStatusRecovery"); } - bool GetGroundLocation(FVector* theGroundLoc, FVector* OffsetUp, FVector* OffsetDown) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetGroundLocation", theGroundLoc, OffsetUp, OffsetDown); } - void DeathHarvestingFadeOut_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "DeathHarvestingFadeOut_Implementation"); } - void ServerUploadCharacter(AShooterPlayerController* UploadedBy) { NativeCall((DWORD64)this, "APrimalCharacter", "ServerUploadCharacter", UploadedBy); } - FRotator* GetBaseAimRotation(FRotator* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetBaseAimRotation", result); } - void ApplyDamageMomentum(float DamageTaken, FDamageEvent* DamageEvent, APawn* PawnInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalCharacter", "ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } - void NetAddCharacterMovementImpulse_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "NetAddCharacterMovementImpulse_Implementation"); } - bool AllowSaving() { return NativeCall((DWORD64)this, "APrimalCharacter", "AllowSaving"); } - bool IsWatered() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsWatered"); } - FVector* GetTargetingLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetTargetingLocation", result); } - void CheckJumpInput(float DeltaTime) { NativeCall((DWORD64)this, "APrimalCharacter", "CheckJumpInput", DeltaTime); } - void ServerTryPoop_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerTryPoop_Implementation"); } - void ClientFailedPoop_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ClientFailedPoop_Implementation"); } - void ClientDidPoop_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "ClientDidPoop_Implementation"); } - void TryAccessInventory() { NativeCall((DWORD64)this, "APrimalCharacter", "TryAccessInventory"); } - bool IsRagdolled() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsRagdolled"); } - bool HasBuff(UClass* BuffClass) { return NativeCall((DWORD64)this, "APrimalCharacter", "HasBuff", BuffClass); } - //void AttachGPSTransponder(APrimalStructureExplosiveTransGPS * Transponder) { NativeCall((DWORD64)this, "APrimalCharacter", "AttachGPSTransponder", Transponder); } - void UpdateNetDynamicMusic() { NativeCall((DWORD64)this, "APrimalCharacter", "UpdateNetDynamicMusic"); } - //void NetPlaySoundOnCharacter_Implementation(USoundBase * SoundToPlay, bool bPlayOnOwner) { NativeCall((DWORD64)this, "APrimalCharacter", "NetPlaySoundOnCharacter_Implementation", SoundToPlay, bPlayOnOwner); } - float GetCorpseDecayRate() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetCorpseDecayRate"); } - void TagFriendlyStructures() { NativeCall((DWORD64)this, "APrimalCharacter", "TagFriendlyStructures"); } - void OnAttachedToCharacter() { NativeCall((DWORD64)this, "APrimalCharacter", "OnAttachedToCharacter"); } - void OnDetachedFromCharacter(APrimalCharacter* aCharacter) { NativeCall((DWORD64)this, "APrimalCharacter", "OnDetachedFromCharacter", aCharacter); } - void ClearMountedDino(bool fromMountedDino) { NativeCall((DWORD64)this, "APrimalCharacter", "ClearMountedDino", fromMountedDino); } - bool DinoMountOnMe(APrimalDinoCharacter* dinoCharacter) { return NativeCall((DWORD64)this, "APrimalCharacter", "DinoMountOnMe", dinoCharacter); } - bool CanMountOnMe(APrimalDinoCharacter* dinoCharacter) { return NativeCall((DWORD64)this, "APrimalCharacter", "CanMountOnMe", dinoCharacter); } - void OnRep_MountedDino() { NativeCall((DWORD64)this, "APrimalCharacter", "OnRep_MountedDino"); } - float GetDragWeight(APrimalCharacter* ForDragger) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetDragWeight", ForDragger); } - void UnPossessed() { NativeCall((DWORD64)this, "APrimalCharacter", "UnPossessed"); } - void TryCallAttackTarget() { NativeCall((DWORD64)this, "APrimalCharacter", "TryCallAttackTarget"); } - void TryCallMoveTo() { NativeCall((DWORD64)this, "APrimalCharacter", "TryCallMoveTo"); } - bool CanBePainted() { return NativeCall((DWORD64)this, "APrimalCharacter", "CanBePainted"); } - bool AllowColoringBy(APlayerController* ForPC, UObject* anItem) { return NativeCall((DWORD64)this, "APrimalCharacter", "AllowColoringBy", ForPC, anItem); } - void NetStopAllAnimMontage_Implementation() { NativeCall((DWORD64)this, "APrimalCharacter", "NetStopAllAnimMontage_Implementation"); } - void DeactivateBuffs(UClass* ForBuffClass, UPrimalItem* ForInstigatorItem) { NativeCall((DWORD64)this, "APrimalCharacter", "DeactivateBuffs", ForBuffClass, ForInstigatorItem); } - FVector* GetVelocity(FVector* result, bool bIsForRagdoll) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetVelocity", result, bIsForRagdoll); } - void TryCallStayOne() { NativeCall((DWORD64)this, "APrimalCharacter", "TryCallStayOne"); } - void TryCallFollowOne() { NativeCall((DWORD64)this, "APrimalCharacter", "TryCallFollowOne"); } - void TryCallFollowDistanceCycleOne() { NativeCall((DWORD64)this, "APrimalCharacter", "TryCallFollowDistanceCycleOne"); } - void OnRep_AttachmentReplication() { NativeCall((DWORD64)this, "APrimalCharacter", "OnRep_AttachmentReplication"); } - bool SimulatedPreventBasedPhysics() { return NativeCall((DWORD64)this, "APrimalCharacter", "SimulatedPreventBasedPhysics"); } - APrimalDinoCharacter* GetBasedOnDino() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetBasedOnDino"); } - FVector* GetTargetPathfindingLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalCharacter", "GetTargetPathfindingLocation", result); } - void ClientHandleNetDestroy() { NativeCall((DWORD64)this, "APrimalCharacter", "ClientHandleNetDestroy"); } - bool UseClearOnConsumeInput() { return NativeCall((DWORD64)this, "APrimalCharacter", "UseClearOnConsumeInput"); } - float GetDamageTorpidityIncreaseMultiplierScale() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetDamageTorpidityIncreaseMultiplierScale"); } - void NotifyBumpedByPawn(APrimalCharacter* ByPawn) { NativeCall((DWORD64)this, "APrimalCharacter", "NotifyBumpedByPawn", ByPawn); } - void NotifyBumpedPawn(APawn* BumpedPawn) { NativeCall((DWORD64)this, "APrimalCharacter", "NotifyBumpedPawn", BumpedPawn); } - void PossessedBy(AController* NewController) { NativeCall((DWORD64)this, "APrimalCharacter", "PossessedBy", NewController); } - void BPNetAddCharacterMovementImpulse() { NativeCall((DWORD64)this, "APrimalCharacter", "BPNetAddCharacterMovementImpulse"); } - float GetGravityZScale() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetGravityZScale"); } - void OnMovementModeChanged(EMovementMode PrevMovementMode, char PreviousCustomMode) { NativeCall((DWORD64)this, "APrimalCharacter", "OnMovementModeChanged", PrevMovementMode, PreviousCustomMode); } - void EnableBPTimerServer(bool bEnable) { NativeCall((DWORD64)this, "APrimalCharacter", "EnableBPTimerServer", bEnable); } - void EnableBPTimerNonDedicated(bool bEnable) { NativeCall((DWORD64)this, "APrimalCharacter", "EnableBPTimerNonDedicated", bEnable); } - void CheckRagdollPenetration() { NativeCall((DWORD64)this, "APrimalCharacter", "CheckRagdollPenetration"); } - void DownCallOne() { NativeCall((DWORD64)this, "APrimalCharacter", "DownCallOne"); } - UObject* GetUObjectInterfaceTargetableInterface() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetUObjectInterfaceTargetableInterface"); } - bool IsProneOrSitting() { return NativeCall((DWORD64)this, "APrimalCharacter", "IsProneOrSitting"); } - float GetBaseDragWeight() { return NativeCall((DWORD64)this, "APrimalCharacter", "GetBaseDragWeight"); } - float BPAdjustDamage() { return NativeCall((DWORD64)this, "APrimalCharacter", "BPAdjustDamage"); } - void BPNotifyLevelUp(int ExtraCharacterLevel) { NativeCall((DWORD64)this, "APrimalCharacter", "BPNotifyLevelUp", ExtraCharacterLevel); } - void LocalUnpossessed() { NativeCall((DWORD64)this, "APrimalCharacter", "LocalUnpossessed"); } - void NetUpdateTribeName(FString* NewTribeName) { NativeCall((DWORD64)this, "APrimalCharacter", "NetUpdateTribeName", NewTribeName); } - void OnBeginDrag(APrimalCharacter* Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall((DWORD64)this, "APrimalCharacter", "OnBeginDrag", Dragged, BoneIndex, bWithGrapHook); } - void OnEndDrag() { NativeCall((DWORD64)this, "APrimalCharacter", "OnEndDrag"); } - void PlayDyingGeneric() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDyingGeneric"); } - void PlayDyingPoint() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDyingPoint"); } - void PlayDyingRadial() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayDyingRadial"); } - void PlayHitEffectPoint() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayHitEffectPoint"); } - void PlayHitEffectRadial() { NativeCall((DWORD64)this, "APrimalCharacter", "PlayHitEffectRadial"); } - void ServerCallAggressive() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallAggressive"); } - void ServerCallFollow() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallFollow"); } - void ServerCallNeutral() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallNeutral"); } - void ServerCallPassive() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallPassive"); } - void ServerCallSetAggressive() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallSetAggressive"); } - void ServerCallStay() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerCallStay"); } - //void ServerDinoOrder(APrimalDinoCharacter * aDino, EDinoTamedOrder::Type OrderType) { NativeCall((DWORD64)this, "APrimalCharacter", "ServerDinoOrder", aDino, OrderType); } - void ServerGiveDefaultWeapon() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerGiveDefaultWeapon"); } - void ServerRequestDrag() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerRequestDrag"); } - void ServerTryPoop() { NativeCall((DWORD64)this, "APrimalCharacter", "ServerTryPoop"); } -}; - -struct AShooterCharacter : public APrimalCharacter -{ - //TArray GetClientTranspondersInfoField() const { return GetNativeField>(this, "AShooterCharacter", "ClientTranspondersInfo"); } - bool GetbWasProneField() const { return GetNativeField(this, "AShooterCharacter", "bWasProne"); } - void SetbWasProneField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bWasProne", newValue); } - bool GetbIsPreviewCharacterField() const { return GetNativeField(this, "AShooterCharacter", "bIsPreviewCharacter"); } - void SetbIsPreviewCharacterField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsPreviewCharacter", newValue); } - bool GetbIsVoiceTalkingField() const { return GetNativeField(this, "AShooterCharacter", "bIsVoiceTalking"); } - void SetbIsVoiceTalkingField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsVoiceTalking", newValue); } - long double GetLastStartedTalkingTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastStartedTalkingTime"); } - void SetLastStartedTalkingTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastStartedTalkingTime", newValue); } - float GetOriginalCollisionHeightField() const { return GetNativeField(this, "AShooterCharacter", "OriginalCollisionHeight"); } - void SetOriginalCollisionHeightField(float newValue) { SetNativeField(this, "AShooterCharacter", "OriginalCollisionHeight", newValue); } - float GetWalkBobMagnitudeField() const { return GetNativeField(this, "AShooterCharacter", "WalkBobMagnitude"); } - void SetWalkBobMagnitudeField(float newValue) { SetNativeField(this, "AShooterCharacter", "WalkBobMagnitude", newValue); } - float GetWalkBobInterpSpeedField() const { return GetNativeField(this, "AShooterCharacter", "WalkBobInterpSpeed"); } - void SetWalkBobInterpSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "WalkBobInterpSpeed", newValue); } - float GetTargetingTimeField() const { return GetNativeField(this, "AShooterCharacter", "TargetingTime"); } - void SetTargetingTimeField(float newValue) { SetNativeField(this, "AShooterCharacter", "TargetingTime", newValue); } - float GetBobMaxMovementSpeedField() const { return GetNativeField(this, "AShooterCharacter", "BobMaxMovementSpeed"); } - void SetBobMaxMovementSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "BobMaxMovementSpeed", newValue); } - float GetWeaponBobMaxMovementSpeedField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobMaxMovementSpeed"); } - void SetWeaponBobMaxMovementSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobMaxMovementSpeed", newValue); } - TSubclassOf GetDefaultWeaponField() const { return GetNativeField>(this, "AShooterCharacter", "DefaultWeapon"); } - TSubclassOf GetMapWeaponField() const { return GetNativeField>(this, "AShooterCharacter", "MapWeapon"); } - TSubclassOf GetGPSWeaponField() const { return GetNativeField>(this, "AShooterCharacter", "GPSWeapon"); } - TSubclassOf GetCompassWeaponField() const { return GetNativeField>(this, "AShooterCharacter", "CompassWeapon"); } - //TWeakObjectPtr GetClimbingLadderField() const { return GetNativeField>(this, "AShooterCharacter", "ClimbingLadder"); } - FString GetPlayerNameField() const { return GetNativeField(this, "AShooterCharacter", "PlayerName"); } - void SetPlayerNameField(FString newValue) { SetNativeField(this, "AShooterCharacter", "PlayerName", newValue); } - TWeakObjectPtr GetRidingDinoField() const { return GetNativeField>(this, "AShooterCharacter", "RidingDino"); } - TArray GetLowerBodyPartRootBonesField() const { return GetNativeField>(this, "AShooterCharacter", "LowerBodyPartRootBones"); } - void SetLowerBodyPartRootBonesField(TArray newValue) { SetNativeField(this, "AShooterCharacter", "LowerBodyPartRootBones", newValue); } - FRotator GetLastDinoAimRotationOffsetField() const { return GetNativeField(this, "AShooterCharacter", "LastDinoAimRotationOffset"); } - void SetLastDinoAimRotationOffsetField(FRotator newValue) { SetNativeField(this, "AShooterCharacter", "LastDinoAimRotationOffset", newValue); } - FRotator GetLastAimRotOffsetField() const { return GetNativeField(this, "AShooterCharacter", "LastAimRotOffset"); } - void SetLastAimRotOffsetField(FRotator newValue) { SetNativeField(this, "AShooterCharacter", "LastAimRotOffset", newValue); } - int Get_GrapHookCableObjectCountField() const { return GetNativeField(this, "AShooterCharacter", "_GrapHookCableObjectCount"); } - void Set_GrapHookCableObjectCountField(int newValue) { SetNativeField(this, "AShooterCharacter", "_GrapHookCableObjectCount", newValue); } - FVector GetGrapHookDefaultOffsetField() const { return GetNativeField(this, "AShooterCharacter", "GrapHookDefaultOffset"); } - void SetGrapHookDefaultOffsetField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "GrapHookDefaultOffset", newValue); } - float GetGrapHookCableWidthField() const { return GetNativeField(this, "AShooterCharacter", "GrapHookCableWidth"); } - void SetGrapHookCableWidthField(float newValue) { SetNativeField(this, "AShooterCharacter", "GrapHookCableWidth", newValue); } - float GetGrapHookPulledRopeDistanceField() const { return GetNativeField(this, "AShooterCharacter", "GrapHookPulledRopeDistance"); } - void SetGrapHookPulledRopeDistanceField(float newValue) { SetNativeField(this, "AShooterCharacter", "GrapHookPulledRopeDistance", newValue); } - float GetGrapHookSyncTimeField() const { return GetNativeField(this, "AShooterCharacter", "GrapHookSyncTime"); } - void SetGrapHookSyncTimeField(float newValue) { SetNativeField(this, "AShooterCharacter", "GrapHookSyncTime", newValue); } - bool GetbReleasingGrapHookField() const { return GetNativeField(this, "AShooterCharacter", "bReleasingGrapHook"); } - void SetbReleasingGrapHookField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bReleasingGrapHook", newValue); } - FString GetPlatformProfileNameField() const { return GetNativeField(this, "AShooterCharacter", "PlatformProfileName"); } - long double GetLastUncrouchTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastUncrouchTime"); } - void SetLastUncrouchTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastUncrouchTime", newValue); } - long double GetLastUnproneTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastUnproneTime"); } - void SetLastUnproneTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastUnproneTime", newValue); } - float GetCurrentWeaponBobSpeedField() const { return GetNativeField(this, "AShooterCharacter", "CurrentWeaponBobSpeed"); } - void SetCurrentWeaponBobSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "CurrentWeaponBobSpeed", newValue); } - float GetWalkBobOldSpeedField() const { return GetNativeField(this, "AShooterCharacter", "WalkBobOldSpeed"); } - void SetWalkBobOldSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "WalkBobOldSpeed", newValue); } - float GetAppliedBobField() const { return GetNativeField(this, "AShooterCharacter", "AppliedBob"); } - void SetAppliedBobField(float newValue) { SetNativeField(this, "AShooterCharacter", "AppliedBob", newValue); } - float GetBobTimeField() const { return GetNativeField(this, "AShooterCharacter", "BobTime"); } - void SetBobTimeField(float newValue) { SetNativeField(this, "AShooterCharacter", "BobTime", newValue); } - long double GetLastPressReloadTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastPressReloadTime"); } - void SetLastPressReloadTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastPressReloadTime", newValue); } - FName GetWeaponAttachPointField() const { return GetNativeField(this, "AShooterCharacter", "WeaponAttachPoint"); } - void SetWeaponAttachPointField(FName newValue) { SetNativeField(this, "AShooterCharacter", "WeaponAttachPoint", newValue); } - float GetTargetingSpeedModifierField() const { return GetNativeField(this, "AShooterCharacter", "TargetingSpeedModifier"); } - void SetTargetingSpeedModifierField(float newValue) { SetNativeField(this, "AShooterCharacter", "TargetingSpeedModifier", newValue); } - float GetWeaponBobTimeField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobTime"); } - void SetWeaponBobTimeField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobTime", newValue); } - float GetCurrentAimBlendingField() const { return GetNativeField(this, "AShooterCharacter", "CurrentAimBlending"); } - void SetCurrentAimBlendingField(float newValue) { SetNativeField(this, "AShooterCharacter", "CurrentAimBlending", newValue); } - bool GetbWasFirstPersonField() const { return GetNativeField(this, "AShooterCharacter", "bWasFirstPerson"); } - void SetbWasFirstPersonField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bWasFirstPerson", newValue); } - bool GetbWasOverrideHiddenShadowValueField() const { return GetNativeField(this, "AShooterCharacter", "bWasOverrideHiddenShadowValue"); } - void SetbWasOverrideHiddenShadowValueField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bWasOverrideHiddenShadowValue", newValue); } - bool GetbLastLocInterpProneField() const { return GetNativeField(this, "AShooterCharacter", "bLastLocInterpProne"); } - void SetbLastLocInterpProneField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bLastLocInterpProne", newValue); } - bool GetbLastLocInterpCrouchedField() const { return GetNativeField(this, "AShooterCharacter", "bLastLocInterpCrouched"); } - void SetbLastLocInterpCrouchedField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bLastLocInterpCrouched", newValue); } - long double GetInterpLastCrouchProneStateChangeTimeField() const { return GetNativeField(this, "AShooterCharacter", "InterpLastCrouchProneStateChangeTime"); } - void SetInterpLastCrouchProneStateChangeTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "InterpLastCrouchProneStateChangeTime", newValue); } - long double GetPressCrouchProneToggleTimeField() const { return GetNativeField(this, "AShooterCharacter", "PressCrouchProneToggleTime"); } - void SetPressCrouchProneToggleTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "PressCrouchProneToggleTime", newValue); } - float GetCraftingMovementSpeedModifierField() const { return GetNativeField(this, "AShooterCharacter", "CraftingMovementSpeedModifier"); } - void SetCraftingMovementSpeedModifierField(float newValue) { SetNativeField(this, "AShooterCharacter", "CraftingMovementSpeedModifier", newValue); } - FVector GetWeaponBobMagnitudesField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobMagnitudes"); } - void SetWeaponBobMagnitudesField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobMagnitudes", newValue); } - FVector GetWeaponBobPeriodsField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobPeriods"); } - void SetWeaponBobPeriodsField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobPeriods", newValue); } - FVector GetWeaponBobOffsetsField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobOffsets"); } - void SetWeaponBobOffsetsField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobOffsets", newValue); } - FVector GetWeaponBobMagnitudes_TargetingField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobMagnitudes_Targeting"); } - void SetWeaponBobMagnitudes_TargetingField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobMagnitudes_Targeting", newValue); } - FVector GetWeaponBobPeriods_TargetingField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobPeriods_Targeting"); } - void SetWeaponBobPeriods_TargetingField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobPeriods_Targeting", newValue); } - FVector GetWeaponBobOffsets_TargetingField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobOffsets_Targeting"); } - void SetWeaponBobOffsets_TargetingField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobOffsets_Targeting", newValue); } - float GetWeaponBobMinimumSpeedField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobMinimumSpeed"); } - void SetWeaponBobMinimumSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobMinimumSpeed", newValue); } - float GetWeaponBobSpeedBaseField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobSpeedBase"); } - void SetWeaponBobSpeedBaseField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobSpeedBase", newValue); } - float GetWeaponBobSpeedBaseFallingField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobSpeedBaseFalling"); } - void SetWeaponBobSpeedBaseFallingField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobSpeedBaseFalling", newValue); } - float GetWeaponBobTargetingBlendField() const { return GetNativeField(this, "AShooterCharacter", "WeaponBobTargetingBlend"); } - void SetWeaponBobTargetingBlendField(float newValue) { SetNativeField(this, "AShooterCharacter", "WeaponBobTargetingBlend", newValue); } - //TArray GetDefaultAttachmentInfosField() const { return GetNativeField>(this, "AShooterCharacter", "DefaultAttachmentInfos"); } - FItemNetID GetNextWeaponItemIDField() const { return GetNativeField(this, "AShooterCharacter", "NextWeaponItemID"); } - TSubclassOf GetNextInventoryWeaponField() const { return GetNativeField>(this, "AShooterCharacter", "NextInventoryWeapon"); } - void SetNextInventoryWeaponField(TSubclassOf newValue) { SetNativeField(this, "AShooterCharacter", "NextInventoryWeapon", newValue); } - FItemNetID GetPreMapWeaponItemNetIDField() const { return GetNativeField(this, "AShooterCharacter", "PreMapWeaponItemNetID"); } - void SetPreMapWeaponItemNetIDField(FItemNetID newValue) { SetNativeField(this, "AShooterCharacter", "PreMapWeaponItemNetID", newValue); } - float GetServerSeatedViewRotationYawField() const { return GetNativeField(this, "AShooterCharacter", "ServerSeatedViewRotationYaw"); } - void SetServerSeatedViewRotationYawField(float newValue) { SetNativeField(this, "AShooterCharacter", "ServerSeatedViewRotationYaw", newValue); } - float GetServerSeatedViewRotationPitchField() const { return GetNativeField(this, "AShooterCharacter", "ServerSeatedViewRotationPitch"); } - void SetServerSeatedViewRotationPitchField(float newValue) { SetNativeField(this, "AShooterCharacter", "ServerSeatedViewRotationPitch", newValue); } - AShooterWeapon* GetCurrentWeaponField() const { return GetNativeField(this, "AShooterCharacter", "CurrentWeapon"); } - void SetCurrentWeaponField(AShooterWeapon* newValue) { SetNativeField(this, "AShooterCharacter", "CurrentWeapon", newValue); } - unsigned __int64 GetLinkedPlayerDataIDField() const { return GetNativeField(this, "AShooterCharacter", "LinkedPlayerDataID"); } - void SetLinkedPlayerDataIDField(unsigned __int64 newValue) { SetNativeField(this, "AShooterCharacter", "LinkedPlayerDataID", newValue); } - long double GetLastTimeInFallingField() const { return GetNativeField(this, "AShooterCharacter", "LastTimeInFalling"); } - void SetLastTimeInFallingField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTimeInFalling", newValue); } - long double GetStartedRidingTimeField() const { return GetNativeField(this, "AShooterCharacter", "StartedRidingTime"); } - void SetStartedRidingTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "StartedRidingTime", newValue); } - long double GetTimeSinceLastControllerField() const { return GetNativeField(this, "AShooterCharacter", "TimeSinceLastController"); } - void SetTimeSinceLastControllerField(long double newValue) { SetNativeField(this, "AShooterCharacter", "TimeSinceLastController", newValue); } - TWeakObjectPtr GetLastControllerField() const { return GetNativeField>(this, "AShooterCharacter", "LastController"); } - long double GetLastRequestedTribeTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastRequestedTribeTime"); } - void SetLastRequestedTribeTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastRequestedTribeTime", newValue); } - unsigned __int64 GetLastRequestedTribeIDField() const { return GetNativeField(this, "AShooterCharacter", "LastRequestedTribeID"); } - void SetLastRequestedTribeIDField(unsigned __int64 newValue) { SetNativeField(this, "AShooterCharacter", "LastRequestedTribeID", newValue); } - FString GetLastRequestedTribeNameField() const { return GetNativeField(this, "AShooterCharacter", "LastRequestedTribeName"); } - void SetLastRequestedTribeNameField(FString newValue) { SetNativeField(this, "AShooterCharacter", "LastRequestedTribeName", newValue); } - TWeakObjectPtr GetLastRequestedTribePlayerCharacterField() const { return GetNativeField>(this, "AShooterCharacter", "LastRequestedTribePlayerCharacter"); } - float GetIndoorsHyperthermiaInsulationField() const { return GetNativeField(this, "AShooterCharacter", "IndoorsHyperthermiaInsulation"); } - void SetIndoorsHyperthermiaInsulationField(float newValue) { SetNativeField(this, "AShooterCharacter", "IndoorsHyperthermiaInsulation", newValue); } - float GetIndoorsHypothermiaInsulationField() const { return GetNativeField(this, "AShooterCharacter", "IndoorsHypothermiaInsulation"); } - void SetIndoorsHypothermiaInsulationField(float newValue) { SetNativeField(this, "AShooterCharacter", "IndoorsHypothermiaInsulation", newValue); } - float GetIndoorCheckIntervalField() const { return GetNativeField(this, "AShooterCharacter", "IndoorCheckInterval"); } - void SetIndoorCheckIntervalField(float newValue) { SetNativeField(this, "AShooterCharacter", "IndoorCheckInterval", newValue); } - long double GetLastIndoorCheckTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastIndoorCheckTime"); } - void SetLastIndoorCheckTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastIndoorCheckTime", newValue); } - FItemNetID GetPreRidingWeaponItemNetIDField() const { return GetNativeField(this, "AShooterCharacter", "PreRidingWeaponItemNetID"); } - void SetPreRidingWeaponItemNetIDField(FItemNetID newValue) { SetNativeField(this, "AShooterCharacter", "PreRidingWeaponItemNetID", newValue); } - FItemNetID GetPreInventoryWeaponItemNetIDField() const { return GetNativeField(this, "AShooterCharacter", "PreInventoryWeaponItemNetID"); } - void SetPreInventoryWeaponItemNetIDField(FItemNetID newValue) { SetNativeField(this, "AShooterCharacter", "PreInventoryWeaponItemNetID", newValue); } - //TArray GetOverrideAnimBlueprintsField() const { return GetNativeField>(this, "AShooterCharacter", "OverrideAnimBlueprints"); } - bool GetbPlayingShieldCoverAnimationField() const { return GetNativeField(this, "AShooterCharacter", "bPlayingShieldCoverAnimation"); } - void SetbPlayingShieldCoverAnimationField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bPlayingShieldCoverAnimation", newValue); } - bool GetbPlayingShieldCoverAnimationForCrouchField() const { return GetNativeField(this, "AShooterCharacter", "bPlayingShieldCoverAnimationForCrouch"); } - void SetbPlayingShieldCoverAnimationForCrouchField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bPlayingShieldCoverAnimationForCrouch", newValue); } - float GetEnemyPlayerMaxCursorHUDDistanceProneField() const { return GetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceProne"); } - void SetEnemyPlayerMaxCursorHUDDistanceProneField(float newValue) { SetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceProne", newValue); } - float GetEnemyPlayerMaxCursorHUDDistanceCrouchedField() const { return GetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceCrouched"); } - void SetEnemyPlayerMaxCursorHUDDistanceCrouchedField(float newValue) { SetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceCrouched", newValue); } - float GetEnemyPlayerMaxCursorHUDDistanceStandingField() const { return GetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceStanding"); } - void SetEnemyPlayerMaxCursorHUDDistanceStandingField(float newValue) { SetNativeField(this, "AShooterCharacter", "EnemyPlayerMaxCursorHUDDistanceStanding", newValue); } - //FSaddlePassengerSeatDefinition GetCurrentPassengerSeatDefinitionField() const { return GetNativeField(this, "AShooterCharacter", "CurrentPassengerSeatDefinition"); } - float GetPreviousRootYawSpeedField() const { return GetNativeField(this, "AShooterCharacter", "PreviousRootYawSpeed"); } - void SetPreviousRootYawSpeedField(float newValue) { SetNativeField(this, "AShooterCharacter", "PreviousRootYawSpeed", newValue); } - //FLinearColor[3] GetBodyColorsField() const { return GetNativeField(this, "AShooterCharacter", "BodyColors"); } - //void SetBodyColorsField(FLinearColor[3] newValue) { SetNativeField(this, "AShooterCharacter", "BodyColors", newValue); } - float GetLoggedOutTargetingDesirabilityField() const { return GetNativeField(this, "AShooterCharacter", "LoggedOutTargetingDesirability"); } - void SetLoggedOutTargetingDesirabilityField(float newValue) { SetNativeField(this, "AShooterCharacter", "LoggedOutTargetingDesirability", newValue); } - bool GetbIsRainWateredField() const { return GetNativeField(this, "AShooterCharacter", "bIsRainWatered"); } - void SetbIsRainWateredField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsRainWatered", newValue); } - long double GetLastAttackTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastAttackTime"); } - void SetLastAttackTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastAttackTime", newValue); } - bool GetbCacheRidingDinoWeaponField() const { return GetNativeField(this, "AShooterCharacter", "bCacheRidingDinoWeapon"); } - void SetbCacheRidingDinoWeaponField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bCacheRidingDinoWeapon", newValue); } - bool GetbWasLocallyControlledField() const { return GetNativeField(this, "AShooterCharacter", "bWasLocallyControlled"); } - void SetbWasLocallyControlledField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bWasLocallyControlled", newValue); } - unsigned int GetUniqueNetIdTypeHashField() const { return GetNativeField(this, "AShooterCharacter", "UniqueNetIdTypeHash"); } - void SetUniqueNetIdTypeHashField(unsigned int newValue) { SetNativeField(this, "AShooterCharacter", "UniqueNetIdTypeHash", newValue); } - long double GetLastUseHarvestTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastUseHarvestTime"); } - void SetLastUseHarvestTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastUseHarvestTime", newValue); } - long double GetStopRidingTimeField() const { return GetNativeField(this, "AShooterCharacter", "StopRidingTime"); } - void SetStopRidingTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "StopRidingTime", newValue); } - long double GetLocalLastViewingInventoryTimeField() const { return GetNativeField(this, "AShooterCharacter", "LocalLastViewingInventoryTime"); } - void SetLocalLastViewingInventoryTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LocalLastViewingInventoryTime", newValue); } - FVector GetLastStasisCastPositionField() const { return GetNativeField(this, "AShooterCharacter", "LastStasisCastPosition"); } - void SetLastStasisCastPositionField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "LastStasisCastPosition", newValue); } - bool GetbWasHostPlayerField() const { return GetNativeField(this, "AShooterCharacter", "bWasHostPlayer"); } - void SetbWasHostPlayerField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bWasHostPlayer", newValue); } - long double GetLastTimeHadControllerField() const { return GetNativeField(this, "AShooterCharacter", "LastTimeHadController"); } - void SetLastTimeHadControllerField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTimeHadController", newValue); } - long double GetLastTaggedTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastTaggedTime"); } - void SetLastTaggedTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTaggedTime", newValue); } - long double GetLastTaggedTimeExtraField() const { return GetNativeField(this, "AShooterCharacter", "LastTaggedTimeExtra"); } - void SetLastTaggedTimeExtraField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTaggedTimeExtra", newValue); } - long double GetLastTaggedTimeThirdField() const { return GetNativeField(this, "AShooterCharacter", "LastTaggedTimeThird"); } - void SetLastTaggedTimeThirdField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTaggedTimeThird", newValue); } - float GetExtraFloatVarField() const { return GetNativeField(this, "AShooterCharacter", "ExtraFloatVar"); } - void SetExtraFloatVarField(float newValue) { SetNativeField(this, "AShooterCharacter", "ExtraFloatVar", newValue); } - FVector GetExtraVectorVarField() const { return GetNativeField(this, "AShooterCharacter", "ExtraVectorVar"); } - void SetExtraVectorVarField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "ExtraVectorVar", newValue); } - FVector GetExtraExtraVectorVarField() const { return GetNativeField(this, "AShooterCharacter", "ExtraExtraVectorVar"); } - void SetExtraExtraVectorVarField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "ExtraExtraVectorVar", newValue); } - FName GetExtraNameVarField() const { return GetNativeField(this, "AShooterCharacter", "ExtraNameVar"); } - void SetExtraNameVarField(FName newValue) { SetNativeField(this, "AShooterCharacter", "ExtraNameVar", newValue); } - bool GetbIsOnSeatingStructureField() const { return GetNativeField(this, "AShooterCharacter", "bIsOnSeatingStructure"); } - void SetbIsOnSeatingStructureField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsOnSeatingStructure", newValue); } - bool GetbIsControllingBallistaField() const { return GetNativeField(this, "AShooterCharacter", "bIsControllingBallista"); } - void SetbIsControllingBallistaField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsControllingBallista", newValue); } - bool GetbUseBallistaAimOffsetField() const { return GetNativeField(this, "AShooterCharacter", "bUseBallistaAimOffset"); } - void SetbUseBallistaAimOffsetField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bUseBallistaAimOffset", newValue); } - float GetCurrentControlledBallistaYawField() const { return GetNativeField(this, "AShooterCharacter", "CurrentControlledBallistaYaw"); } - void SetCurrentControlledBallistaYawField(float newValue) { SetNativeField(this, "AShooterCharacter", "CurrentControlledBallistaYaw", newValue); } - bool GetbIsServerAdminField() const { return GetNativeField(this, "AShooterCharacter", "bIsServerAdmin"); } - void SetbIsServerAdminField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bIsServerAdmin", newValue); } - //TWeakObjectPtr GetSeatingStructureField() const { return GetNativeField>(this, "AShooterCharacter", "SeatingStructure"); } - long double GetNextPlayerUndergroundCheckField() const { return GetNativeField(this, "AShooterCharacter", "NextPlayerUndergroundCheck"); } - void SetNextPlayerUndergroundCheckField(long double newValue) { SetNativeField(this, "AShooterCharacter", "NextPlayerUndergroundCheck", newValue); } - int GetPlayerNumUnderGroundFailField() const { return GetNativeField(this, "AShooterCharacter", "PlayerNumUnderGroundFail"); } - void SetPlayerNumUnderGroundFailField(int newValue) { SetNativeField(this, "AShooterCharacter", "PlayerNumUnderGroundFail", newValue); } - float GetLastSweepCapsuleHeightField() const { return GetNativeField(this, "AShooterCharacter", "LastSweepCapsuleHeight"); } - void SetLastSweepCapsuleHeightField(float newValue) { SetNativeField(this, "AShooterCharacter", "LastSweepCapsuleHeight", newValue); } - float GetLastSweepCapsuleRadiusField() const { return GetNativeField(this, "AShooterCharacter", "LastSweepCapsuleRadius"); } - void SetLastSweepCapsuleRadiusField(float newValue) { SetNativeField(this, "AShooterCharacter", "LastSweepCapsuleRadius", newValue); } - float GetClientSeatedViewRotationPitchField() const { return GetNativeField(this, "AShooterCharacter", "ClientSeatedViewRotationPitch"); } - void SetClientSeatedViewRotationPitchField(float newValue) { SetNativeField(this, "AShooterCharacter", "ClientSeatedViewRotationPitch", newValue); } - float GetClientSeatedViewRotationYawField() const { return GetNativeField(this, "AShooterCharacter", "ClientSeatedViewRotationYaw"); } - void SetClientSeatedViewRotationYawField(float newValue) { SetNativeField(this, "AShooterCharacter", "ClientSeatedViewRotationYaw", newValue); } - long double GetLastReleaseSeatingStructureTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastReleaseSeatingStructureTime"); } - void SetLastReleaseSeatingStructureTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastReleaseSeatingStructureTime", newValue); } - char GetPlayerBadgeGroupField() const { return GetNativeField(this, "AShooterCharacter", "PlayerBadgeGroup"); } - void SetPlayerBadgeGroupField(char newValue) { SetNativeField(this, "AShooterCharacter", "PlayerBadgeGroup", newValue); } - bool GetbShouldInvertTurnInputField() const { return GetNativeField(this, "AShooterCharacter", "bShouldInvertTurnInput"); } - void SetbShouldInvertTurnInputField(bool newValue) { SetNativeField(this, "AShooterCharacter", "bShouldInvertTurnInput", newValue); } - int GetAllianceInviteRequestingTeamField() const { return GetNativeField(this, "AShooterCharacter", "AllianceInviteRequestingTeam"); } - void SetAllianceInviteRequestingTeamField(int newValue) { SetNativeField(this, "AShooterCharacter", "AllianceInviteRequestingTeam", newValue); } - unsigned int GetAllianceInviteIDField() const { return GetNativeField(this, "AShooterCharacter", "AllianceInviteID"); } - void SetAllianceInviteIDField(unsigned int newValue) { SetNativeField(this, "AShooterCharacter", "AllianceInviteID", newValue); } - FString GetAllianceInviteNameField() const { return GetNativeField(this, "AShooterCharacter", "AllianceInviteName"); } - void SetAllianceInviteNameField(FString newValue) { SetNativeField(this, "AShooterCharacter", "AllianceInviteName", newValue); } - long double GetAllianceInviteTimeField() const { return GetNativeField(this, "AShooterCharacter", "AllianceInviteTime"); } - void SetAllianceInviteTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "AllianceInviteTime", newValue); } - long double GetLastUpdatedAimActorsTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastUpdatedAimActorsTime"); } - void SetLastUpdatedAimActorsTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastUpdatedAimActorsTime", newValue); } - FVector GetUpdateHyperThermalInsulationPositionField() const { return GetNativeField(this, "AShooterCharacter", "UpdateHyperThermalInsulationPosition"); } - void SetUpdateHyperThermalInsulationPositionField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "UpdateHyperThermalInsulationPosition", newValue); } - FVector GetUpdateHypoThermalInsulationPositionField() const { return GetNativeField(this, "AShooterCharacter", "UpdateHypoThermalInsulationPosition"); } - void SetUpdateHypoThermalInsulationPositionField(FVector newValue) { SetNativeField(this, "AShooterCharacter", "UpdateHypoThermalInsulationPosition", newValue); } - long double GetNextUpdateHyperThermalInsulationTimeField() const { return GetNativeField(this, "AShooterCharacter", "NextUpdateHyperThermalInsulationTime"); } - void SetNextUpdateHyperThermalInsulationTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "NextUpdateHyperThermalInsulationTime", newValue); } - long double GetNextUpdateHypoThermalInsulationTimeField() const { return GetNativeField(this, "AShooterCharacter", "NextUpdateHypoThermalInsulationTime"); } - void SetNextUpdateHypoThermalInsulationTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "NextUpdateHypoThermalInsulationTime", newValue); } - float GetLastAdditionalHypoThermalInsulationField() const { return GetNativeField(this, "AShooterCharacter", "LastAdditionalHypoThermalInsulation"); } - void SetLastAdditionalHypoThermalInsulationField(float newValue) { SetNativeField(this, "AShooterCharacter", "LastAdditionalHypoThermalInsulation", newValue); } - float GetLastAdditionalHyperThermalInsulationField() const { return GetNativeField(this, "AShooterCharacter", "LastAdditionalHyperThermalInsulation"); } - void SetLastAdditionalHyperThermalInsulationField(float newValue) { SetNativeField(this, "AShooterCharacter", "LastAdditionalHyperThermalInsulation", newValue); } - float GetWaterLossRateMultiplierField() const { return GetNativeField(this, "AShooterCharacter", "WaterLossRateMultiplier"); } - void SetWaterLossRateMultiplierField(float newValue) { SetNativeField(this, "AShooterCharacter", "WaterLossRateMultiplier", newValue); } - long double GetLastTryAccessInventoryFailTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastTryAccessInventoryFailTime"); } - void SetLastTryAccessInventoryFailTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastTryAccessInventoryFailTime", newValue); } - long double GetLastEmotePlayTimeField() const { return GetNativeField(this, "AShooterCharacter", "LastEmotePlayTime"); } - void SetLastEmotePlayTimeField(long double newValue) { SetNativeField(this, "AShooterCharacter", "LastEmotePlayTime", newValue); } - - // Functions - - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "AShooterCharacter", "GetPrivateStaticClass"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AShooterCharacter", "PostInitializeComponents"); } - void AuthPostSpawnInit() { NativeCall((DWORD64)this, "AShooterCharacter", "AuthPostSpawnInit"); } - void Destroyed() { NativeCall((DWORD64)this, "AShooterCharacter", "Destroyed"); } - void OnRep_RawBoneModifiers() { NativeCall((DWORD64)this, "AShooterCharacter", "OnRep_RawBoneModifiers"); } - void UpdateTransponders() { NativeCall((DWORD64)this, "AShooterCharacter", "UpdateTransponders"); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterCharacter", "BeginPlay"); } - void DrawTranspondersInfo(AShooterHUD* HUD) { NativeCall((DWORD64)this, "AShooterCharacter", "DrawTranspondersInfo", HUD); } - void PlaySpawnAnim() { NativeCall((DWORD64)this, "AShooterCharacter", "PlaySpawnAnim"); } - void ClearSpawnAnim() { NativeCall((DWORD64)this, "AShooterCharacter", "ClearSpawnAnim"); } - void PlayJumpAnim() { NativeCall((DWORD64)this, "AShooterCharacter", "PlayJumpAnim"); } - void PlayLandedAnim() { NativeCall((DWORD64)this, "AShooterCharacter", "PlayLandedAnim"); } - void DedicatedServerBoneFixup() { NativeCall((DWORD64)this, "AShooterCharacter", "DedicatedServerBoneFixup"); } - void ControllerLeavingGame(AShooterPlayerController* theController) { NativeCall((DWORD64)this, "AShooterCharacter", "ControllerLeavingGame", theController); } - void ModifyFirstPersonCameraLocation(FVector* Loc, float DeltaTime) { NativeCall((DWORD64)this, "AShooterCharacter", "ModifyFirstPersonCameraLocation", Loc, DeltaTime); } - void PossessedBy(AController* InController) { NativeCall((DWORD64)this, "AShooterCharacter", "PossessedBy", InController); } - void LocalPossessedBy(APlayerController* ByController) { NativeCall((DWORD64)this, "AShooterCharacter", "LocalPossessedBy", ByController); } - void ServerDetachGrapHookCable_Implementation(bool bDoUpwardsJump, float UpwardsJumpYaw) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerDetachGrapHookCable_Implementation", bDoUpwardsJump, UpwardsJumpYaw); } - void ServerReleaseGrapHookCable_Implementation(bool bReleasing) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerReleaseGrapHookCable_Implementation", bReleasing); } - void DetachGrapHookCable_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "DetachGrapHookCable_Implementation"); } - void SyncGrapHookDistance_Implementation(float Distance) { NativeCall((DWORD64)this, "AShooterCharacter", "SyncGrapHookDistance_Implementation", Distance); } - void UpdateGrapHook(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterCharacter", "UpdateGrapHook", DeltaSeconds); } - void SetCarriedPitchYaw_Implementation(float NewCarriedPitch, float NewCarriedYaw) { NativeCall((DWORD64)this, "AShooterCharacter", "SetCarriedPitchYaw_Implementation", NewCarriedPitch, NewCarriedYaw); } - FRotator* GetAimOffsets(FRotator* result, float DeltaTime, FRotator* RootRotOffset, float* * RootYawSpeed, float MaxYawAimClamp, FVector* RootLocOffset) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetAimOffsets", result, DeltaTime, RootRotOffset, *RootYawSpeed, MaxYawAimClamp, RootLocOffset); } - void UpdatePawnMeshes(bool bForceThirdPerson, bool bForceFlush) { NativeCall((DWORD64)this, "AShooterCharacter", "UpdatePawnMeshes", bForceThirdPerson, bForceFlush); } - void OnCameraUpdate(FVector* CameraLocation, FRotator* CameraRotation) { NativeCall((DWORD64)this, "AShooterCharacter", "OnCameraUpdate", CameraLocation, CameraRotation); } - void GiveDefaultWeapon(bool bForceGiveDefaultWeapon) { NativeCall((DWORD64)this, "AShooterCharacter", "GiveDefaultWeapon", bForceGiveDefaultWeapon); } - void GiveMapWeapon() { NativeCall((DWORD64)this, "AShooterCharacter", "GiveMapWeapon"); } - void SwitchMap() { NativeCall((DWORD64)this, "AShooterCharacter", "SwitchMap"); } - void DelayGiveDefaultWeapon(float DelayTime) { NativeCall((DWORD64)this, "AShooterCharacter", "DelayGiveDefaultWeapon", DelayTime); } - void ServerSwitchMap_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSwitchMap_Implementation"); } - void ServerGiveDefaultWeapon_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerGiveDefaultWeapon_Implementation"); } - void GivePrimalItemWeapon(UPrimalItem* aPrimalItem) { NativeCall((DWORD64)this, "AShooterCharacter", "GivePrimalItemWeapon", aPrimalItem); } - void StartWeaponSwitch(UPrimalItem* aPrimalItem, bool bDontClearLastWeapon) { NativeCall((DWORD64)this, "AShooterCharacter", "StartWeaponSwitch", aPrimalItem, bDontClearLastWeapon); } - void FinishWeaponSwitch() { NativeCall((DWORD64)this, "AShooterCharacter", "FinishWeaponSwitch"); } - float GetMaxCursorHUDDistance(AShooterPlayerController* PC) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetMaxCursorHUDDistance", PC); } - void DrawFloatingHUD(AShooterHUD* HUD) { NativeCall((DWORD64)this, "AShooterCharacter", "DrawFloatingHUD", HUD); } - void DrawFloatingChatMessage(AShooterHUD* HUD, FString Message, long double receivedChatTime) { NativeCall((DWORD64)this, "AShooterCharacter", "DrawFloatingChatMessage", HUD, Message, receivedChatTime); } - void SetCurrentWeapon(AShooterWeapon* NewWeapon, AShooterWeapon* LastWeapon) { NativeCall((DWORD64)this, "AShooterCharacter", "SetCurrentWeapon", NewWeapon, LastWeapon); } - void ForceSleep() { NativeCall((DWORD64)this, "AShooterCharacter", "ForceSleep"); } - bool CanFire() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanFire"); } - void SetTargeting(bool bNewTargeting) { NativeCall((DWORD64)this, "AShooterCharacter", "SetTargeting", bNewTargeting); } - void ServerSetTargeting_Implementation(bool bNewTargeting) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSetTargeting_Implementation", bNewTargeting); } - void ZoomIn() { NativeCall((DWORD64)this, "AShooterCharacter", "ZoomIn"); } - void ZoomOut() { NativeCall((DWORD64)this, "AShooterCharacter", "ZoomOut"); } - bool CanProne() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanProne"); } - bool CanCrouch() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanCrouch"); } - void OnPressCrouch() { NativeCall((DWORD64)this, "AShooterCharacter", "OnPressCrouch"); } - void OnPressProne() { NativeCall((DWORD64)this, "AShooterCharacter", "OnPressProne"); } - void OnPressCrouchProneToggle() { NativeCall((DWORD64)this, "AShooterCharacter", "OnPressCrouchProneToggle"); } - void OnReleaseCrouchProneToggle() { NativeCall((DWORD64)this, "AShooterCharacter", "OnReleaseCrouchProneToggle"); } - void OnEndCrouch(float HalfHeightAdjust, float Scaled) { NativeCall((DWORD64)this, "AShooterCharacter", "OnEndCrouch", HalfHeightAdjust, Scaled); } - void OnStartCrouch(float HalfHeightAdjust, float Scaled) { NativeCall((DWORD64)this, "AShooterCharacter", "OnStartCrouch", HalfHeightAdjust, Scaled); } - void OnStartFire(bool bFromGamepadRight) { NativeCall((DWORD64)this, "AShooterCharacter", "OnStartFire", bFromGamepadRight); } - void OnStopFire(bool bFromGamepadRight) { NativeCall((DWORD64)this, "AShooterCharacter", "OnStopFire", bFromGamepadRight); } - void OnStartAltFire() { NativeCall((DWORD64)this, "AShooterCharacter", "OnStartAltFire"); } - void OnStopAltFire() { NativeCall((DWORD64)this, "AShooterCharacter", "OnStopAltFire"); } - void OnStartTargeting(bool bFromGamepadLeft) { NativeCall((DWORD64)this, "AShooterCharacter", "OnStartTargeting", bFromGamepadLeft); } - void OnStopTargeting(bool bFromGamepadLeft) { NativeCall((DWORD64)this, "AShooterCharacter", "OnStopTargeting", bFromGamepadLeft); } - void OnPressReload() { NativeCall((DWORD64)this, "AShooterCharacter", "OnPressReload"); } - void OnReload() { NativeCall((DWORD64)this, "AShooterCharacter", "OnReload"); } - bool IsRunning() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsRunning"); } - void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall((DWORD64)this, "AShooterCharacter", "SetSleeping", bSleeping, bUseRagdollLocationOffset); } - bool IsValidUnStasisCaster() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsValidUnStasisCaster"); } - void CheckAndHandleBasedPlayersBeingPushedThroughWalls() { NativeCall((DWORD64)this, "AShooterCharacter", "CheckAndHandleBasedPlayersBeingPushedThroughWalls"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterCharacter", "Tick", DeltaSeconds); } - void UpdateCarriedLocationAndRotation(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterCharacter", "UpdateCarriedLocationAndRotation", DeltaSeconds); } - float GetCarryingSocketYaw(bool RefreshBones) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetCarryingSocketYaw", RefreshBones); } - bool CanBeCarried() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanBeCarried"); } - bool IsTargeting() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsTargeting"); } - bool IsFirstPerson() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsFirstPerson"); } - bool AllowFirstPerson() { return NativeCall((DWORD64)this, "AShooterCharacter", "AllowFirstPerson"); } - void SetCameraMode(bool bFirstperson) { NativeCall((DWORD64)this, "AShooterCharacter", "SetCameraMode", bFirstperson); } - void PlaySpawnIntro() { NativeCall((DWORD64)this, "AShooterCharacter", "PlaySpawnIntro"); } - void FinishSpawnIntro() { NativeCall((DWORD64)this, "AShooterCharacter", "FinishSpawnIntro"); } - bool ValidToRestoreForPC(AShooterPlayerController* aPC) { return NativeCall((DWORD64)this, "AShooterCharacter", "ValidToRestoreForPC", aPC); } - AShooterCharacter* FindForPlayerController(AShooterPlayerController* aPC) { return NativeCall((DWORD64)this, "AShooterCharacter", "FindForPlayerController", aPC); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetDescriptiveName", result); } - FString* GetShortName(FString* result) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetShortName", result); } - UPrimalPlayerData* GetPlayerData() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetPlayerData"); } - void PlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "AShooterCharacter", "PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - bool IsUsingShield() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsUsingShield"); } - bool IsBlockingWithShield() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsBlockingWithShield"); } - bool GetBlockingShieldOffsets(FVector* OutBlockingShieldFPVTranslation, FRotator* OutBlockingShieldFPVRotation) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetBlockingShieldOffsets", OutBlockingShieldFPVTranslation, OutBlockingShieldFPVRotation); } - void ServerForceUpdatedAimedActors(float OverrideMaxDistance) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerForceUpdatedAimedActors", OverrideMaxDistance); } - void ServerSetBallistaNewRotation_Implementation(float Pitch, float Yaw) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSetBallistaNewRotation_Implementation", Pitch, Yaw); } - float GetMaxSpeedModifier() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetMaxSpeedModifier"); } - void SetRidingDino(APrimalDinoCharacter* aDino) { NativeCall((DWORD64)this, "AShooterCharacter", "SetRidingDino", aDino); } - void ClearRidingDino(bool bFromDino, int OverrideUnboardDirection) { NativeCall((DWORD64)this, "AShooterCharacter", "ClearRidingDino", bFromDino, OverrideUnboardDirection); } - void SetCarryingDino(APrimalDinoCharacter* aDino) { NativeCall((DWORD64)this, "AShooterCharacter", "SetCarryingDino", aDino); } - void ClearCarryingDino(bool bFromDino, bool bCancelAnyCarryBuffs) { NativeCall((DWORD64)this, "AShooterCharacter", "ClearCarryingDino", bFromDino, bCancelAnyCarryBuffs); } - void SetRidingDinoAsPassenger(APrimalDinoCharacter* aDino, FSaddlePassengerSeatDefinition* SeatDefinition) { NativeCall((DWORD64)this, "AShooterCharacter", "SetRidingDinoAsPassenger", aDino, SeatDefinition); } - void ClearRidingDinoAsPassenger(bool bFromDino) { NativeCall((DWORD64)this, "AShooterCharacter", "ClearRidingDinoAsPassenger", bFromDino); } - void ServerLaunchMountedDino_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerLaunchMountedDino_Implementation"); } - void ClientPlayHarvestAnim_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ClientPlayHarvestAnim_Implementation"); } - void LaunchMountedDino() { NativeCall((DWORD64)this, "AShooterCharacter", "LaunchMountedDino"); } - void OnPrimalCharacterSleeped() { NativeCall((DWORD64)this, "AShooterCharacter", "OnPrimalCharacterSleeped"); } - bool Die(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "AShooterCharacter", "Die", KillingDamage, DamageEvent, Killer, DamageCauser); } - bool CanJumpInternal_Implementation() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanJumpInternal_Implementation"); } - bool CanCrouchInternal() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanCrouchInternal"); } - bool CanProneInternal() { return NativeCall((DWORD64)this, "AShooterCharacter", "CanProneInternal"); } - bool IsCrafting() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsCrafting"); } - void RemoveAttachments() { NativeCall((DWORD64)this, "AShooterCharacter", "RemoveAttachments"); } - void NotifyEquippedItems() { NativeCall((DWORD64)this, "AShooterCharacter", "NotifyEquippedItems"); } - void RefreshDefaultAttachments(AActor* UseOtherActor) { NativeCall((DWORD64)this, "AShooterCharacter", "RefreshDefaultAttachments", UseOtherActor); } - void ClientMultiUse(APlayerController* ForPC, int UseIndex) { NativeCall((DWORD64)this, "AShooterCharacter", "ClientMultiUse", ForPC, UseIndex); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "AShooterCharacter", "TryMultiUse", ForPC, UseIndex); } - void RefreshTribeName() { NativeCall((DWORD64)this, "AShooterCharacter", "RefreshTribeName"); } - void ChangeActorTeam(int NewTeam) { NativeCall((DWORD64)this, "AShooterCharacter", "ChangeActorTeam", NewTeam); } - void ClientClearTribeRequest_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ClientClearTribeRequest_Implementation"); } - void ClientNotifyTribeRequest_Implementation(FString* RequestTribeName, AShooterCharacter* PlayerCharacter) { NativeCall((DWORD64)this, "AShooterCharacter", "ClientNotifyTribeRequest_Implementation", RequestTribeName, PlayerCharacter); } - void PlayDrinkingAnimation() { NativeCall((DWORD64)this, "AShooterCharacter", "PlayDrinkingAnimation"); } - float GetCharacterAdditionalHypothermiaInsulationValue() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetCharacterAdditionalHypothermiaInsulationValue"); } - bool CalcIsIndoors() { return NativeCall((DWORD64)this, "AShooterCharacter", "CalcIsIndoors"); } - float GetInsulationFromItem(FHitResult* HitOut, EPrimalItemStat::Type TypeInsulation) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetInsulationFromItem", HitOut, TypeInsulation); } - float GetCharacterAdditionalInsulationValueFromStructure(UWorld* theWorld, FVector* actorLoc, EPrimalItemStat::Type TypeInsulation) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetCharacterAdditionalInsulationValueFromStructure", theWorld, actorLoc, TypeInsulation); } - float GetCharacterAdditionalHyperthermiaInsulationValue() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetCharacterAdditionalHyperthermiaInsulationValue"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "AShooterCharacter", "PreInitializeComponents"); } - void OnMovementModeChanged(EMovementMode PrevMovementMode, char PreviousCustomMode) { NativeCall((DWORD64)this, "AShooterCharacter", "OnMovementModeChanged", PrevMovementMode, PreviousCustomMode); } - void OnBeginDrag_Implementation(APrimalCharacter* Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall((DWORD64)this, "AShooterCharacter", "OnBeginDrag_Implementation", Dragged, BoneIndex, bWithGrapHook); } - void OnEndDrag_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "OnEndDrag_Implementation"); } - bool IsSubmerged(bool bDontCheckSwimming, bool bUseHalfThreshold, bool bForceCheck, bool bFromVolumeChange) { return NativeCall((DWORD64)this, "AShooterCharacter", "IsSubmerged", bDontCheckSwimming, bUseHalfThreshold, bForceCheck, bFromVolumeChange); } - void UpdateSwimmingState() { NativeCall((DWORD64)this, "AShooterCharacter", "UpdateSwimmingState"); } - void SetCharacterMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall((DWORD64)this, "AShooterCharacter", "SetCharacterMeshesMaterialScalarParamValue", ParamName, Value); } - float GetRidingDinoAnimSpeedRatio() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetRidingDinoAnimSpeedRatio"); } - void ApplyBodyColors() { NativeCall((DWORD64)this, "AShooterCharacter", "ApplyBodyColors"); } - void ApplyBoneModifiers() { NativeCall((DWORD64)this, "AShooterCharacter", "ApplyBoneModifiers"); } - UAnimMontage* GetOverridenMontage(UAnimMontage* AnimMontage) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetOverridenMontage", AnimMontage); } - bool IsWatered() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsWatered"); } - void AdjustDamage(float* Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "AShooterCharacter", "AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - bool IsBlockedByShield(FHitResult* HitInfo, FVector* ShotDirection, bool bBlockAllPointDamage) { return NativeCall((DWORD64)this, "AShooterCharacter", "IsBlockedByShield", HitInfo, ShotDirection, bBlockAllPointDamage); } - void ClientNotifyLevelUp_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ClientNotifyLevelUp_Implementation"); } - void StartedFiringWeapon(bool bPrimaryFire) { NativeCall((DWORD64)this, "AShooterCharacter", "StartedFiringWeapon", bPrimaryFire); } - void OrbitCamOn() { NativeCall((DWORD64)this, "AShooterCharacter", "OrbitCamOn"); } - void OrbitCamToggle() { NativeCall((DWORD64)this, "AShooterCharacter", "OrbitCamToggle"); } - void SetRagdollPhysics(bool bUseRagdollLocationOffset, bool bForceRecreateBones, bool bForLoading) { NativeCall((DWORD64)this, "AShooterCharacter", "SetRagdollPhysics", bUseRagdollLocationOffset, bForceRecreateBones, bForLoading); } - bool IsPlayingUpperBodyCallAnimation_Implementation() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsPlayingUpperBodyCallAnimation_Implementation"); } - void ServerCallFollow_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallFollow_Implementation"); } - void ServerCallFollowOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallFollowOne_Implementation", ForDinoChar); } - void ServerCallStay_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallStay_Implementation"); } - void ServerCallStayOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallStayOne_Implementation", ForDinoChar); } - void ServerCallFollowDistanceCycleOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallFollowDistanceCycleOne_Implementation", ForDinoChar); } - void ServerCallAggressive_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallAggressive_Implementation"); } - void ServerCallNeutral_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallNeutral_Implementation"); } - void ServerCallPassive_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallPassive_Implementation"); } - void ServerCallSetAggressive_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallSetAggressive_Implementation"); } - void ServerCallAttackTarget_Implementation(AActor* TheTarget) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallAttackTarget_Implementation", TheTarget); } - void ClientOrderedMoveTo_Implementation(FVector MoveToLoc) { NativeCall((DWORD64)this, "AShooterCharacter", "ClientOrderedMoveTo_Implementation", MoveToLoc); } - void ClientOrderedAttackTarget_Implementation(AActor* attackTarget) { NativeCall((DWORD64)this, "AShooterCharacter", "ClientOrderedAttackTarget_Implementation", attackTarget); } - void ServerCallMoveTo_Implementation(FVector MoveToLoc) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCallMoveTo_Implementation", MoveToLoc); } - bool TryAccessInventory() { return NativeCall((DWORD64)this, "AShooterCharacter", "TryAccessInventory"); } - void PlayEmoteAnimation_Implementation(char EmoteIndex) { NativeCall((DWORD64)this, "AShooterCharacter", "PlayEmoteAnimation_Implementation", EmoteIndex); } - void OnVoiceTalkingStateChanged(bool talking) { NativeCall((DWORD64)this, "AShooterCharacter", "OnVoiceTalkingStateChanged", talking); } - void OnFailedJumped() { NativeCall((DWORD64)this, "AShooterCharacter", "OnFailedJumped"); } - float GetRecoilMultiplier() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetRecoilMultiplier"); } - void StasisingCharacter() { NativeCall((DWORD64)this, "AShooterCharacter", "StasisingCharacter"); } - bool UseAdditiveStandingAnim() { return NativeCall((DWORD64)this, "AShooterCharacter", "UseAdditiveStandingAnim"); } - bool GetAdditiveStandingAnimNonAdditive() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetAdditiveStandingAnimNonAdditive"); } - void ClosedInventoryUI() { NativeCall((DWORD64)this, "AShooterCharacter", "ClosedInventoryUI"); } - void ServerSetViewingInventory_Implementation(bool bIsViewing) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSetViewingInventory_Implementation", bIsViewing); } - void ServerCheckDrinkingWater_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerCheckDrinkingWater_Implementation"); } - void GameStateHandleEvent_Implementation(FName NameParam, FVector VecParam) { NativeCall((DWORD64)this, "AShooterCharacter", "GameStateHandleEvent_Implementation", NameParam, VecParam); } - APrimalDinoCharacter* GetRidingDino() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetRidingDino"); } - void AttachToLadder_Implementation(USceneComponent* Parent) { NativeCall((DWORD64)this, "AShooterCharacter", "AttachToLadder_Implementation", Parent); } - void DetachFromLadder_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "DetachFromLadder_Implementation"); } - bool IsOnSeatingStructure() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsOnSeatingStructure"); } - bool IsControllingBallistaTurret() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsControllingBallistaTurret"); } - void OnAttachedToSeatingStructure() { NativeCall((DWORD64)this, "AShooterCharacter", "OnAttachedToSeatingStructure"); } - void ServerPlayFireBallistaAnimation_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerPlayFireBallistaAnimation_Implementation"); } - void ServerStopFireBallista_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerStopFireBallista_Implementation"); } - void ServerToClientsPlayFireBallistaAnimation_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerToClientsPlayFireBallistaAnimation_Implementation"); } - void ServerSeatingStructureAction_Implementation(char ActionNumber) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSeatingStructureAction_Implementation", ActionNumber); } - void WasPushed(ACharacter* ByOtherCharacter) { NativeCall((DWORD64)this, "AShooterCharacter", "WasPushed", ByOtherCharacter); } - void NotifyBumpedPawn(APawn* BumpedPawn) { NativeCall((DWORD64)this, "AShooterCharacter", "NotifyBumpedPawn", BumpedPawn); } - void ClientNetEndClimbingLadder_Implementation() { NativeCall((DWORD64)this, "AShooterCharacter", "ClientNetEndClimbingLadder_Implementation"); } - void ServerNetEndClimbingLadder_Implementation(bool bIsClimbOver, FVector ClimbOverLoc) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerNetEndClimbingLadder_Implementation", bIsClimbOver, ClimbOverLoc); } - void RenamePlayer_Implementation(FString* NewName) { NativeCall((DWORD64)this, "AShooterCharacter", "RenamePlayer_Implementation", NewName); } - bool AllowDinoTargetingRange(FVector* AtLoc, float TargetingRange) { return NativeCall((DWORD64)this, "AShooterCharacter", "AllowDinoTargetingRange", AtLoc, TargetingRange); } - bool IsCarriedAsPassenger() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsCarriedAsPassenger"); } - FVector* GetPawnViewLocation(FVector* result, bool bAllTransforms) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetPawnViewLocation", result, bAllTransforms); } - FRotator* GetPassengerAttachedRotation(FRotator* result) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetPassengerAttachedRotation", result); } - bool CanDragCharacter(APrimalCharacter* Character) { return NativeCall((DWORD64)this, "AShooterCharacter", "CanDragCharacter", Character); } - void GiveDefaultWeaponTimer() { NativeCall((DWORD64)this, "AShooterCharacter", "GiveDefaultWeaponTimer"); } - bool IsCarryingSomething(bool bNotForRunning) { return NativeCall((DWORD64)this, "AShooterCharacter", "IsCarryingSomething", bNotForRunning); } - void ForceGiveDefaultWeapon() { NativeCall((DWORD64)this, "AShooterCharacter", "ForceGiveDefaultWeapon"); } - APrimalDinoCharacter* GetBasedOnDino() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetBasedOnDino"); } - void HideWeapon() { NativeCall((DWORD64)this, "AShooterCharacter", "HideWeapon"); } - void ShowWeapon() { NativeCall((DWORD64)this, "AShooterCharacter", "ShowWeapon"); } - void ServerStartSurfaceCameraForPassenger_Implementation(float yaw, float roll, float pitch, bool bShouldInvertInput) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerStartSurfaceCameraForPassenger_Implementation", yaw, roll, pitch, bShouldInvertInput); } - float ModifyAirControl(float AirControlIn) { return NativeCall((DWORD64)this, "AShooterCharacter", "ModifyAirControl", AirControlIn); } - FVector* GetLastSweepLocation(FVector* result) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetLastSweepLocation", result); } - void NetSetHeadHairPercent_Implementation(float thePercent, int newHeadHairIndex) { NativeCall((DWORD64)this, "AShooterCharacter", "NetSetHeadHairPercent_Implementation", thePercent, newHeadHairIndex); } - void NetSetFacialHairPercent_Implementation(float thePercent, int newFacialHairIndex) { NativeCall((DWORD64)this, "AShooterCharacter", "NetSetFacialHairPercent_Implementation", thePercent, newFacialHairIndex); } - void UpdateHair() { NativeCall((DWORD64)this, "AShooterCharacter", "UpdateHair"); } - void NetSetOverrideHeadHairColor_Implementation(FLinearColor HairColor) { NativeCall((DWORD64)this, "AShooterCharacter", "NetSetOverrideHeadHairColor_Implementation", HairColor); } - void NetSetOverrideFacialHairColor_Implementation(FLinearColor HairColor) { NativeCall((DWORD64)this, "AShooterCharacter", "NetSetOverrideFacialHairColor_Implementation", HairColor); } - void Unstasis() { NativeCall((DWORD64)this, "AShooterCharacter", "Unstasis"); } - void RegisterActorTickFunctions(bool bRegister, bool bSaveAndRestoreTickState) { NativeCall((DWORD64)this, "AShooterCharacter", "RegisterActorTickFunctions", bRegister, bSaveAndRestoreTickState); } - void OnRep_HatHidden() { NativeCall((DWORD64)this, "AShooterCharacter", "OnRep_HatHidden"); } - float GetHeadHairMorphTargetValue() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetHeadHairMorphTargetValue"); } - float GetFacialHairMorphTargetValue() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetFacialHairMorphTargetValue"); } - void TempDampenInputAcceleration() { NativeCall((DWORD64)this, "AShooterCharacter", "TempDampenInputAcceleration"); } - AShooterPlayerController* GetSpawnedForController() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetSpawnedForController"); } - void Poop() { NativeCall((DWORD64)this, "AShooterCharacter", "Poop"); } - AActor* StructurePlacementUseAlternateOriginActor() { return NativeCall((DWORD64)this, "AShooterCharacter", "StructurePlacementUseAlternateOriginActor"); } - USceneComponent* GetActorSoundAttachmentComponentOverride(USceneComponent* ForComponent) { return NativeCall((DWORD64)this, "AShooterCharacter", "GetActorSoundAttachmentComponentOverride", ForComponent); } - bool IsNearTopOfLadder() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsNearTopOfLadder"); } - bool AllowGrappling_Implementation() { return NativeCall((DWORD64)this, "AShooterCharacter", "AllowGrappling_Implementation"); } - unsigned int GetUniqueNetIdTypeHash() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetUniqueNetIdTypeHash"); } - bool IsSitting() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsSitting"); } - bool IsProneOrSitting() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsProneOrSitting"); } - UPrimalItem* GetShieldItem() { return NativeCall((DWORD64)this, "AShooterCharacter", "GetShieldItem"); } - void StaticRegisterNativesAShooterCharacter() { NativeCall((DWORD64)this, "AShooterCharacter", "StaticRegisterNativesAShooterCharacter"); } - void ClientNetEndClimbingLadder() { NativeCall((DWORD64)this, "AShooterCharacter", "ClientNetEndClimbingLadder"); } - void ClientNotifyTribeRequest(FString* RequestTribeName, AShooterCharacter* PlayerCharacter) { NativeCall((DWORD64)this, "AShooterCharacter", "ClientNotifyTribeRequest", RequestTribeName, PlayerCharacter); } - void DetachFromLadder() { NativeCall((DWORD64)this, "AShooterCharacter", "DetachFromLadder"); } - void DetachGrapHookCable() { NativeCall((DWORD64)this, "AShooterCharacter", "DetachGrapHookCable"); } - void GameStateHandleEvent(FName NameParam, FVector VecParam) { NativeCall((DWORD64)this, "AShooterCharacter", "GameStateHandleEvent", NameParam, VecParam); } - bool IsPlayingUpperBodyCallAnimation() { return NativeCall((DWORD64)this, "AShooterCharacter", "IsPlayingUpperBodyCallAnimation"); } - void RenamePlayer(FString* NewName) { NativeCall((DWORD64)this, "AShooterCharacter", "RenamePlayer", NewName); } - void ServerDetachGrapHookCable(bool bDoUpwardsJump, float UpwardsJumpYaw) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerDetachGrapHookCable", bDoUpwardsJump, UpwardsJumpYaw); } - void ServerLaunchMountedDino() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerLaunchMountedDino"); } - void ServerPlayFireBallistaAnimation() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerPlayFireBallistaAnimation"); } - void ServerSeatingStructureAction(char ActionNumber) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSeatingStructureAction", ActionNumber); } - void ServerSetBallistaNewRotation(float Pitch, float Yaw) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerSetBallistaNewRotation", Pitch, Yaw); } - void ServerStartSurfaceCameraForPassenger(float yaw, float pitch, float roll, bool bShouldInvertInput) { NativeCall((DWORD64)this, "AShooterCharacter", "ServerStartSurfaceCameraForPassenger", yaw, pitch, roll, bShouldInvertInput); } - void ServerStopFireBallista() { NativeCall((DWORD64)this, "AShooterCharacter", "ServerStopFireBallista"); } -}; - -// Other - -struct FPlayerDeathReason -{ - int PlayerID; - FString DeathReason; - long double DiedAtTime; -}; - -struct FUniqueNetIdRepl -{ - TSharedPtr UniqueNetId; -}; - -struct FPrimalPersistentCharacterStatsStruct -{ - unsigned __int16 GetCharacterStatusComponent_ExtraCharacterLevelField() const { return GetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CharacterStatusComponent_ExtraCharacterLevel"); } - void SetCharacterStatusComponent_ExtraCharacterLevelField(unsigned __int16 newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CharacterStatusComponent_ExtraCharacterLevel", newValue); } - float GetCharacterStatusComponent_ExperiencePointsField() const { return GetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CharacterStatusComponent_ExperiencePoints"); } - void SetCharacterStatusComponent_ExperiencePointsField(float newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CharacterStatusComponent_ExperiencePoints", newValue); } - int GetPlayerState_TotalEngramPointsField() const { return GetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "PlayerState_TotalEngramPoints"); } - void SetPlayerState_TotalEngramPointsField(int newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "PlayerState_TotalEngramPoints", newValue); } - TArray GetPerMapExplorerNoteUnlocksField() const { return GetNativeField>(this, "FPrimalPersistentCharacterStatsStruct", "PerMapExplorerNoteUnlocks"); } - void SetPerMapExplorerNoteUnlocksField(TArray newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "PerMapExplorerNoteUnlocks", newValue); } - TArray GetEmoteUnlocksField() const { return GetNativeField>(this, "FPrimalPersistentCharacterStatsStruct", "EmoteUnlocks"); } - void SetEmoteUnlocksField(TArray newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "EmoteUnlocks", newValue); } - TArray> GetPlayerState_EngramBlueprintsField() const { return GetNativeField>>(this, "FPrimalPersistentCharacterStatsStruct", "PlayerState_EngramBlueprints"); } - void SetPlayerState_EngramBlueprintsField(TArray> newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "PlayerState_EngramBlueprints", newValue); } - //FDinoOrderGroup[10] GetDinoOrderGroupsField() const { return GetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "DinoOrderGroups"); } - int GetCurrentlySelectedDinoOrderGroupField() const { return GetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CurrentlySelectedDinoOrderGroup"); } - void SetCurrentlySelectedDinoOrderGroupField(int newValue) { SetNativeField(this, "FPrimalPersistentCharacterStatsStruct", "CurrentlySelectedDinoOrderGroup", newValue); } - - // Functions - - bool IsPerMapExplorerNoteUnlocked(int ExplorerNoteIndex) { return NativeCall((DWORD64)this, "FPrimalPersistentCharacterStatsStruct", "IsPerMapExplorerNoteUnlocked", ExplorerNoteIndex); } - void ApplyToPrimalCharacter(APrimalCharacter* aChar, AShooterPlayerController* forPC, bool bIgnoreStats) { NativeCall((DWORD64)this, "FPrimalPersistentCharacterStatsStruct", "ApplyToPrimalCharacter", aChar, forPC, bIgnoreStats); } - void GiveEngramsToPlayerState(APrimalCharacter* aChar, AShooterPlayerController* forPC) { NativeCall((DWORD64)this, "FPrimalPersistentCharacterStatsStruct", "GiveEngramsToPlayerState", aChar, forPC); } -}; - -// Player Data - -struct __declspec(align(8)) FPrimalPlayerCharacterConfigStruct -{ - __int8 bIsFemale : 1; - FLinearColor BodyColors[3]; - FString PlayerCharacterName; - float RawBoneModifiers[22]; - int PlayerSpawnRegionIndex; -}; - -struct FPrimalPlayerDataStruct -{ - unsigned __int64 GetPlayerDataIDField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "PlayerDataID"); } - FUniqueNetIdRepl GetUniqueIDField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "UniqueID"); } - FString GetSavedNetworkAddressField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "SavedNetworkAddress"); } - FString GetPlayerNameField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "PlayerName"); } - void SetPlayerNameField(FString newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "PlayerName", newValue); } - unsigned int GetLocalPlayerIndexField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "LocalPlayerIndex"); } - void SetLocalPlayerIndexField(unsigned int newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "LocalPlayerIndex", newValue); } - FPrimalPlayerCharacterConfigStruct* GetMyPlayerCharacterConfigField() const { return GetNativePointerField(this, "FPrimalPlayerDataStruct", "MyPlayerCharacterConfig"); } - FPrimalPersistentCharacterStatsStruct* GetMyPersistentCharacterStatsField() const { return GetNativePointerField(this, "FPrimalPlayerDataStruct", "MyPersistentCharacterStats"); } - int GetTribeIDField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "TribeID"); } - void SetTribeIDField(int newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "TribeID", newValue); } - int GetPlayerDataVersionField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "PlayerDataVersion"); } - void SetPlayerDataVersionField(int newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "PlayerDataVersion", newValue); } - long double GetNextAllowedRespawnTimeField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "NextAllowedRespawnTime"); } - void SetNextAllowedRespawnTimeField(long double newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "NextAllowedRespawnTime", newValue); } - long double GetLastTimeDiedToEnemyTeamField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "LastTimeDiedToEnemyTeam"); } - void SetLastTimeDiedToEnemyTeamField(long double newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "LastTimeDiedToEnemyTeam", newValue); } - float GetAllowedRespawnIntervalField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "AllowedRespawnInterval"); } - void SetAllowedRespawnIntervalField(float newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "AllowedRespawnInterval", newValue); } - float GetNumOfDeathsField() const { return GetNativeField(this, "FPrimalPlayerDataStruct", "NumOfDeaths"); } - void SetNumOfDeathsField(float newValue) { SetNativeField(this, "FPrimalPlayerDataStruct", "NumOfDeaths", newValue); } -}; - -struct UPrimalPlayerData -{ - FPrimalPlayerDataStruct* GetMyDataField() const { return GetNativePointerField(this, "UPrimalPlayerData", "MyData"); } - //TArray GetMyPersistentBuffDatasField() const { return GetNativeField>(this, "UPrimalPlayerData", "MyPersistentBuffDatas"); } - bool GetbIsLocalPlayerField() const { return GetNativeField(this, "UPrimalPlayerData", "bIsLocalPlayer"); } - void SetbIsLocalPlayerField(bool newValue) { SetNativeField(this, "UPrimalPlayerData", "bIsLocalPlayer", newValue); } - float GetLastXPWritePercentField() const { return GetNativeField(this, "UPrimalPlayerData", "LastXPWritePercent"); } - void SetLastXPWritePercentField(float newValue) { SetNativeField(this, "UPrimalPlayerData", "LastXPWritePercent", newValue); } - - // Functions - - bool MatchesPlayer(AShooterPlayerState* aPlayerState, bool bCheckForExistingPlayer) { return NativeCall((DWORD64)this, "UPrimalPlayerData", "MatchesPlayer", aPlayerState, bCheckForExistingPlayer); } - void InitForPlayer(AShooterPlayerState* aPlayerState, bool bDontSaveData) { NativeCall((DWORD64)this, "UPrimalPlayerData", "InitForPlayer", aPlayerState, bDontSaveData); } - AShooterPlayerState* GetPlayerState(AShooterPlayerState* ignorePlayerState, bool bOnlyCheckExistingPlayers) { return NativeCall((DWORD64)this, "UPrimalPlayerData", "GetPlayerState", ignorePlayerState, bOnlyCheckExistingPlayers); } - UPrimalPlayerData* GetDataForID(unsigned __int64 PlayerDataID) { return NativeCall((DWORD64)this, "UPrimalPlayerData", "GetDataForID", PlayerDataID); } - void ApplyToPlayerState(AShooterPlayerState* aPlayerState) { NativeCall((DWORD64)this, "UPrimalPlayerData", "ApplyToPlayerState", aPlayerState); } - void GiveInitialItems(AShooterPlayerController* ForPC) { NativeCall((DWORD64)this, "UPrimalPlayerData", "GiveInitialItems", ForPC); } - FString* GetUniqueIdString(FString* result) { return NativeCall((DWORD64)this, "UPrimalPlayerData", "GetUniqueIdString", result); } - void SavePlayerData(UWorld* ForWorld) { NativeCall((DWORD64)this, "UPrimalPlayerData", "SavePlayerData", ForWorld); } - void ApplyToPlayerCharacter(AShooterCharacter* NewPawn) { NativeCall((DWORD64)this, "UPrimalPlayerData", "ApplyToPlayerCharacter", NewPawn); } - void RefreshPersistentBuffs() { NativeCall((DWORD64)this, "UPrimalPlayerData", "RefreshPersistentBuffs"); } - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "UPrimalPlayerData", "GetPrivateStaticClass"); } -}; - -struct UPrimalCharacterStatusComponent -{ - float* GetMaxStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "MaxStatusValues"); } - float* GetBaseLevelMaxStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "BaseLevelMaxStatusValues"); } - void SetBaseLevelMaxStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BaseLevelMaxStatusValues", newValue); } - char* GetNumberOfLevelUpPointsAppliedField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "NumberOfLevelUpPointsApplied"); } - void SetNumberOfLevelUpPointsAppliedField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "NumberOfLevelUpPointsApplied", newValue); } - char* GetNumberOfLevelUpPointsAppliedTamedField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "NumberOfLevelUpPointsAppliedTamed"); } - void SetNumberOfLevelUpPointsAppliedTamedField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "NumberOfLevelUpPointsAppliedTamed", newValue); } - float GetTamedIneffectivenessModifierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "TamedIneffectivenessModifier"); } - void SetTamedIneffectivenessModifierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TamedIneffectivenessModifier", newValue); } - float GetMovingStaminaRecoveryRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "MovingStaminaRecoveryRateMultiplier"); } - void SetMovingStaminaRecoveryRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MovingStaminaRecoveryRateMultiplier", newValue); } - float* GetRecoveryRateStatusValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "RecoveryRateStatusValue"); } - void SetRecoveryRateStatusValueField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "RecoveryRateStatusValue", newValue); } - float* GetTimeToRecoverAfterDepletionStatusValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "TimeToRecoverAfterDepletionStatusValue"); } - void SetTimeToRecoverAfterDepletionStatusValueField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TimeToRecoverAfterDepletionStatusValue", newValue); } - float* GetTimeToRecoverAfterDecreaseStatusValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "TimeToRecoverAfterDecreaseStatusValue"); } - void SetTimeToRecoverAfterDecreaseStatusValueField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TimeToRecoverAfterDecreaseStatusValue", newValue); } - float* GetAmountMaxGainedPerLevelUpValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "AmountMaxGainedPerLevelUpValue"); } - void SetAmountMaxGainedPerLevelUpValueField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "AmountMaxGainedPerLevelUpValue", newValue); } - float* GetAmountMaxGainedPerLevelUpValueTamedField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "AmountMaxGainedPerLevelUpValueTamed"); } - void SetAmountMaxGainedPerLevelUpValueTamedField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "AmountMaxGainedPerLevelUpValueTamed", newValue); } - char* GetMaxGainedPerLevelUpValueIsPercentField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "MaxGainedPerLevelUpValueIsPercent"); } - void SetMaxGainedPerLevelUpValueIsPercentField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MaxGainedPerLevelUpValueIsPercent", newValue); } - char* GetRecoveryRateIsPercentField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "RecoveryRateIsPercent"); } - void SetRecoveryRateIsPercentField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "RecoveryRateIsPercent", newValue); } - float* GetTamingMaxStatMultipliersField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "TamingMaxStatMultipliers"); } - void SetTamingMaxStatMultipliersField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TamingMaxStatMultipliers", newValue); } - float* GetTamingMaxStatAdditionsField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "TamingMaxStatAdditions"); } - void SetTamingMaxStatAdditionsField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TamingMaxStatAdditions", newValue); } - float* GetMaxLevelUpMultiplierField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "MaxLevelUpMultiplier"); } - void SetMaxLevelUpMultiplierField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MaxLevelUpMultiplier", newValue); } - float GetTamingIneffectivenessMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "TamingIneffectivenessMultiplier"); } - void SetTamingIneffectivenessMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TamingIneffectivenessMultiplier", newValue); } - float GetDinoRiderWeightMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DinoRiderWeightMultiplier"); } - void SetDinoRiderWeightMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DinoRiderWeightMultiplier", newValue); } - char* GetCanLevelUpValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "CanLevelUpValue"); } - void SetCanLevelUpValueField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CanLevelUpValue", newValue); } - char* GetDontUseValueField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "DontUseValue"); } - void SetDontUseValueField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DontUseValue", newValue); } - float GetExperienceAutomaticConsciousIncreaseSpeedField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExperienceAutomaticConsciousIncreaseSpeed"); } - void SetExperienceAutomaticConsciousIncreaseSpeedField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExperienceAutomaticConsciousIncreaseSpeed", newValue); } - float GetCheatMaxWeightField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CheatMaxWeight"); } - void SetCheatMaxWeightField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CheatMaxWeight", newValue); } - int GetCharacterStatusComponentPriorityField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CharacterStatusComponentPriority"); } - void SetCharacterStatusComponentPriorityField(int newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CharacterStatusComponentPriority", newValue); } - float GetSuffocationHealthPercentDecreaseSpeedField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SuffocationHealthPercentDecreaseSpeed"); } - void SetSuffocationHealthPercentDecreaseSpeedField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SuffocationHealthPercentDecreaseSpeed", newValue); } - float GetUnsubmergedOxygenIncreaseSpeedField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "UnsubmergedOxygenIncreaseSpeed"); } - void SetUnsubmergedOxygenIncreaseSpeedField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "UnsubmergedOxygenIncreaseSpeed", newValue); } - float GetSubmergedOxygenDecreaseSpeedField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SubmergedOxygenDecreaseSpeed"); } - void SetSubmergedOxygenDecreaseSpeedField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SubmergedOxygenDecreaseSpeed", newValue); } - float GetRunningStaminaConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "RunningStaminaConsumptionRate"); } - void SetRunningStaminaConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "RunningStaminaConsumptionRate", newValue); } - float GetWalkingStaminaConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WalkingStaminaConsumptionRate"); } - void SetWalkingStaminaConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WalkingStaminaConsumptionRate", newValue); } - float GetSwimmingOrFlyingStaminaConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SwimmingOrFlyingStaminaConsumptionRate"); } - void SetSwimmingOrFlyingStaminaConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SwimmingOrFlyingStaminaConsumptionRate", newValue); } - float GetJumpStaminaConsumptionField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "JumpStaminaConsumption"); } - void SetJumpStaminaConsumptionField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "JumpStaminaConsumption", newValue); } - float GetWindedSpeedModifierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WindedSpeedModifier"); } - void SetWindedSpeedModifierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WindedSpeedModifier", newValue); } - float GetWindedSpeedModifierSwimmingOrFlyingField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WindedSpeedModifierSwimmingOrFlying"); } - void SetWindedSpeedModifierSwimmingOrFlyingField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WindedSpeedModifierSwimmingOrFlying", newValue); } - float GetInjuredSpeedModifierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InjuredSpeedModifier"); } - void SetInjuredSpeedModifierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InjuredSpeedModifier", newValue); } - float GetHypothermicHealthDecreaseRateBaseField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermicHealthDecreaseRateBase"); } - void SetHypothermicHealthDecreaseRateBaseField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermicHealthDecreaseRateBase", newValue); } - float GetHypothermicHealthDecreaseRatePerDegreeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermicHealthDecreaseRatePerDegree"); } - void SetHypothermicHealthDecreaseRatePerDegreeField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermicHealthDecreaseRatePerDegree", newValue); } - float GetHyperthermicHealthDecreaseRateBaseField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermicHealthDecreaseRateBase"); } - void SetHyperthermicHealthDecreaseRateBaseField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermicHealthDecreaseRateBase", newValue); } - float GetHyperthermicHealthDecreaseRatePerDegreeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermicHealthDecreaseRatePerDegree"); } - void SetHyperthermicHealthDecreaseRatePerDegreeField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermicHealthDecreaseRatePerDegree", newValue); } - float GetXPEarnedPerStaminaConsumedField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "XPEarnedPerStaminaConsumed"); } - void SetXPEarnedPerStaminaConsumedField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "XPEarnedPerStaminaConsumed", newValue); } - float GetKillXPMultiplierPerCharacterLevelField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "KillXPMultiplierPerCharacterLevel"); } - void SetKillXPMultiplierPerCharacterLevelField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "KillXPMultiplierPerCharacterLevel", newValue); } - float GetShareXPWithTribeRangeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ShareXPWithTribeRange"); } - void SetShareXPWithTribeRangeField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ShareXPWithTribeRange", newValue); } - int GetBaseCharacterLevelField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BaseCharacterLevel"); } - void SetBaseCharacterLevelField(int newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BaseCharacterLevel", newValue); } - unsigned __int16 GetExtraCharacterLevelField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraCharacterLevel"); } - void SetExtraCharacterLevelField(unsigned __int16 newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraCharacterLevel", newValue); } - float GetExperiencePointsField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExperiencePoints"); } - void SetExperiencePointsField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExperiencePoints", newValue); } - float GetReplicatedExperiencePointsField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedExperiencePoints"); } - void SetReplicatedExperiencePointsField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedExperiencePoints", newValue); } - //TEnumAsByte GetLevelExperienceRampTypeField() const { return GetNativeField>(this, "UPrimalCharacterStatusComponent", "LevelExperienceRampType"); } - //void SetLevelExperienceRampTypeField(TEnumAsByte newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LevelExperienceRampType", newValue); } - float GetMaxExperiencePointsField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "MaxExperiencePoints"); } - void SetMaxExperiencePointsField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MaxExperiencePoints", newValue); } - float GetBaseFoodConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BaseFoodConsumptionRate"); } - void SetBaseFoodConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BaseFoodConsumptionRate", newValue); } - float GetBaseWaterConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BaseWaterConsumptionRate"); } - void SetBaseWaterConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BaseWaterConsumptionRate", newValue); } - float GetFortitudeTorpidityDecreaseMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "FortitudeTorpidityDecreaseMultiplier"); } - void SetFortitudeTorpidityDecreaseMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "FortitudeTorpidityDecreaseMultiplier", newValue); } - float GetFortitudeTorpidityIncreaseResistanceField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "FortitudeTorpidityIncreaseResistance"); } - void SetFortitudeTorpidityIncreaseResistanceField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "FortitudeTorpidityIncreaseResistance", newValue); } - float GetSubmergedWaterIncreaseRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SubmergedWaterIncreaseRate"); } - void SetSubmergedWaterIncreaseRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SubmergedWaterIncreaseRate", newValue); } - float GetCrouchedWaterFoodConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CrouchedWaterFoodConsumptionMultiplier"); } - void SetCrouchedWaterFoodConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CrouchedWaterFoodConsumptionMultiplier", newValue); } - float GetProneWaterFoodConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ProneWaterFoodConsumptionMultiplier"); } - void SetProneWaterFoodConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ProneWaterFoodConsumptionMultiplier", newValue); } - float GetStaminaRecoveryDecreaseFoodMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryDecreaseFoodMultiplier"); } - void SetStaminaRecoveryDecreaseFoodMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryDecreaseFoodMultiplier", newValue); } - float GetStaminaRecoveryDecreaseWaterMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryDecreaseWaterMultiplier"); } - void SetStaminaRecoveryDecreaseWaterMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryDecreaseWaterMultiplier", newValue); } - float GetHealthRecoveryDecreaseFoodMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HealthRecoveryDecreaseFoodMultiplier"); } - void SetHealthRecoveryDecreaseFoodMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HealthRecoveryDecreaseFoodMultiplier", newValue); } - float GetBabyDinoConsumingFoodRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BabyDinoConsumingFoodRateMultiplier"); } - void SetBabyDinoConsumingFoodRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BabyDinoConsumingFoodRateMultiplier", newValue); } - float GetDinoTamedAdultConsumingFoodRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DinoTamedAdultConsumingFoodRateMultiplier"); } - void SetDinoTamedAdultConsumingFoodRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DinoTamedAdultConsumingFoodRateMultiplier", newValue); } - float GetBabyGestationConsumingFoodRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BabyGestationConsumingFoodRateMultiplier"); } - void SetBabyGestationConsumingFoodRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BabyGestationConsumingFoodRateMultiplier", newValue); } - float GetBabyDinoStarvationHealthDecreaseRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BabyDinoStarvationHealthDecreaseRateMultiplier"); } - void SetBabyDinoStarvationHealthDecreaseRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BabyDinoStarvationHealthDecreaseRateMultiplier", newValue); } - float GetBabyMaxHealthPercentField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BabyMaxHealthPercent"); } - void SetBabyMaxHealthPercentField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BabyMaxHealthPercent", newValue); } - float GetCrouchedStaminaConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CrouchedStaminaConsumptionMultiplier"); } - void SetCrouchedStaminaConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CrouchedStaminaConsumptionMultiplier", newValue); } - float GetProneStaminaConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ProneStaminaConsumptionMultiplier"); } - void SetProneStaminaConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ProneStaminaConsumptionMultiplier", newValue); } - float GetStarvationHealthConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationHealthConsumptionRate"); } - void SetStarvationHealthConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationHealthConsumptionRate", newValue); } - float GetDehyrdationHealthConsumptionRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DehyrdationHealthConsumptionRate"); } - void SetDehyrdationHealthConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DehyrdationHealthConsumptionRate", newValue); } - float GetStaminaConsumptionDecreaseWaterMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaConsumptionDecreaseWaterMultiplier"); } - void SetStaminaConsumptionDecreaseWaterMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaConsumptionDecreaseWaterMultiplier", newValue); } - float GetStaminaConsumptionDecreaseFoodMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaConsumptionDecreaseFoodMultiplier"); } - void SetStaminaConsumptionDecreaseFoodMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaConsumptionDecreaseFoodMultiplier", newValue); } - float GetHypothermiaDecreaseFoodMultiplierBaseField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaDecreaseFoodMultiplierBase"); } - void SetHypothermiaDecreaseFoodMultiplierBaseField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaDecreaseFoodMultiplierBase", newValue); } - float GetHypothermiaDecreaseFoodMultiplierPerDegreeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaDecreaseFoodMultiplierPerDegree"); } - void SetHypothermiaDecreaseFoodMultiplierPerDegreeField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaDecreaseFoodMultiplierPerDegree", newValue); } - float GetHyperthermiaDecreaseWaterMultiplierBaseField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaDecreaseWaterMultiplierBase"); } - void SetHyperthermiaDecreaseWaterMultiplierBaseField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaDecreaseWaterMultiplierBase", newValue); } - float GetHyperthermiaDecreaseWaterMultiplierPerDegreeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaDecreaseWaterMultiplierPerDegree"); } - void SetHyperthermiaDecreaseWaterMultiplierPerDegreeField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaDecreaseWaterMultiplierPerDegree", newValue); } - float GetHyperthermiaTemperatureThresholdField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaTemperatureThreshold"); } - void SetHyperthermiaTemperatureThresholdField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperthermiaTemperatureThreshold", newValue); } - float GetHypothermiaTemperatureThresholdField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaTemperatureThreshold"); } - void SetHypothermiaTemperatureThresholdField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypothermiaTemperatureThreshold", newValue); } - float GetTorporExitPercentThresholdField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "TorporExitPercentThreshold"); } - void SetTorporExitPercentThresholdField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TorporExitPercentThreshold", newValue); } - float GetKnockedOutTorpidityRecoveryRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "KnockedOutTorpidityRecoveryRateMultiplier"); } - void SetKnockedOutTorpidityRecoveryRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "KnockedOutTorpidityRecoveryRateMultiplier", newValue); } - float GetDehydrationTorpidityMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DehydrationTorpidityMultiplier"); } - void SetDehydrationTorpidityMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DehydrationTorpidityMultiplier", newValue); } - float GetStarvationTorpidityMultuplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationTorpidityMultuplier"); } - void SetStarvationTorpidityMultuplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationTorpidityMultuplier", newValue); } - float GetStarvationTorpidityIncreaseRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationTorpidityIncreaseRate"); } - void SetStarvationTorpidityIncreaseRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StarvationTorpidityIncreaseRate", newValue); } - float GetDehyrdationTorpidityIncreaseRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DehyrdationTorpidityIncreaseRate"); } - void SetDehyrdationTorpidityIncreaseRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DehyrdationTorpidityIncreaseRate", newValue); } - float GetInjuredTorpidityIncreaseMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InjuredTorpidityIncreaseMultiplier"); } - void SetInjuredTorpidityIncreaseMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InjuredTorpidityIncreaseMultiplier", newValue); } - float GetWeightSpeedDecreasePowerField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WeightSpeedDecreasePower"); } - void SetWeightSpeedDecreasePowerField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WeightSpeedDecreasePower", newValue); } - float GetWeightJumpDecreasePowerField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WeightJumpDecreasePower"); } - void SetWeightJumpDecreasePowerField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WeightJumpDecreasePower", newValue); } - float GetPoopItemMinFoodConsumptionIntervalField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemMinFoodConsumptionInterval"); } - void SetPoopItemMinFoodConsumptionIntervalField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemMinFoodConsumptionInterval", newValue); } - float GetPoopItemMaxFoodConsumptionIntervalField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemMaxFoodConsumptionInterval"); } - void SetPoopItemMaxFoodConsumptionIntervalField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemMaxFoodConsumptionInterval", newValue); } - float GetTheMaxTorporIncreasePerBaseLevelField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "TheMaxTorporIncreasePerBaseLevel"); } - void SetTheMaxTorporIncreasePerBaseLevelField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "TheMaxTorporIncreasePerBaseLevel", newValue); } - float GetCurrentStatusValuesReplicationIntervalField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CurrentStatusValuesReplicationInterval"); } - void SetCurrentStatusValuesReplicationIntervalField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CurrentStatusValuesReplicationInterval", newValue); } - float GetInsulationHyperthermiaOffsetExponentField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHyperthermiaOffsetExponent"); } - void SetInsulationHyperthermiaOffsetExponentField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHyperthermiaOffsetExponent", newValue); } - float GetInsulationHyperthermiaOffsetScalerField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHyperthermiaOffsetScaler"); } - void SetInsulationHyperthermiaOffsetScalerField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHyperthermiaOffsetScaler", newValue); } - float GetInsulationHypothermiaOffsetExponentField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHypothermiaOffsetExponent"); } - void SetInsulationHypothermiaOffsetExponentField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHypothermiaOffsetExponent", newValue); } - float GetInsulationHypothermiaOffsetScalerField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHypothermiaOffsetScaler"); } - void SetInsulationHypothermiaOffsetScalerField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "InsulationHypothermiaOffsetScaler", newValue); } - float GetHypoCharacterInsulationValueField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HypoCharacterInsulationValue"); } - void SetHypoCharacterInsulationValueField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HypoCharacterInsulationValue", newValue); } - float GetHyperCharacterInsulationValueField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HyperCharacterInsulationValue"); } - void SetHyperCharacterInsulationValueField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HyperCharacterInsulationValue", newValue); } - float GetPoopItemFoodConsumptionCacheField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemFoodConsumptionCache"); } - void SetPoopItemFoodConsumptionCacheField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "PoopItemFoodConsumptionCache", newValue); } - float GetLastHypothermalCharacterInsulationValueField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "LastHypothermalCharacterInsulationValue"); } - void SetLastHypothermalCharacterInsulationValueField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastHypothermalCharacterInsulationValue", newValue); } - float GetLastHyperthermalCharacterInsulationValueField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "LastHyperthermalCharacterInsulationValue"); } - float GetGenericXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "GenericXPMultiplier"); } - void SetGenericXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "GenericXPMultiplier", newValue); } - float GetCraftEarnXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "CraftEarnXPMultiplier"); } - void SetCraftEarnXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CraftEarnXPMultiplier", newValue); } - float GetKillEarnXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "KillEarnXPMultiplier"); } - void SetKillEarnXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "KillEarnXPMultiplier", newValue); } - float GetGenericEarnXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "GenericEarnXPMultiplier"); } - void SetGenericEarnXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "GenericEarnXPMultiplier", newValue); } - float GetSpecialEarnXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SpecialEarnXPMultiplier"); } - void SetSpecialEarnXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SpecialEarnXPMultiplier", newValue); } - float GetHarvestEarnXPMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "HarvestEarnXPMultiplier"); } - void SetHarvestEarnXPMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "HarvestEarnXPMultiplier", newValue); } - float GetDefaultHyperthermicInsulationField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultHyperthermicInsulation"); } - void SetDefaultHyperthermicInsulationField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultHyperthermicInsulation", newValue); } - float GetDefaultHypothermicInsulationField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultHypothermicInsulation"); } - void SetDefaultHypothermicInsulationField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultHypothermicInsulation", newValue); } - float GetMaxTamingEffectivenessBaseLevelMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "MaxTamingEffectivenessBaseLevelMultiplier"); } - void SetMaxTamingEffectivenessBaseLevelMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MaxTamingEffectivenessBaseLevelMultiplier", newValue); } - float GetBabyUnstasisFoodConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "BabyUnstasisFoodConsumptionMultiplier"); } - void SetBabyUnstasisFoodConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "BabyUnstasisFoodConsumptionMultiplier", newValue); } - //TArray GetStatusValueModifiersField() const { return GetNativeField>(this, "UPrimalCharacterStatusComponent", "StatusValueModifiers"); } - //void SetStatusValueModifiersField(TArray newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StatusValueModifiers", newValue); } - TArray GetStatusValueModifierDescriptionIndicesField() const { return GetNativeField>(this, "UPrimalCharacterStatusComponent", "StatusValueModifierDescriptionIndices"); } - void SetStatusValueModifierDescriptionIndicesField(TArray newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StatusValueModifierDescriptionIndices", newValue); } - float* GetCurrentStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "CurrentStatusValues"); } - void SetCurrentStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CurrentStatusValues", newValue); } - float* GetAdditionalStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "AdditionalStatusValues"); } - void SetAdditionalStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "AdditionalStatusValues", newValue); } - float* GetReplicatedCurrentStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "ReplicatedCurrentStatusValues"); } - void SetReplicatedCurrentStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedCurrentStatusValues", newValue); } - float* GetReplicatedGlobalMaxStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "ReplicatedGlobalMaxStatusValues"); } - void SetReplicatedGlobalMaxStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedGlobalMaxStatusValues", newValue); } - float* GetReplicatedBaseLevelMaxStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "ReplicatedBaseLevelMaxStatusValues"); } - void SetReplicatedBaseLevelMaxStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedBaseLevelMaxStatusValues", newValue); } - float* GetReplicatedGlobalCurrentStatusValuesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "ReplicatedGlobalCurrentStatusValues"); } - void SetReplicatedGlobalCurrentStatusValuesField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ReplicatedGlobalCurrentStatusValues", newValue); } - char* GetCurrentStatusStatesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "CurrentStatusStates"); } - void SetCurrentStatusStatesField(char* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "CurrentStatusStates", newValue); } - long double* GetLastDecreasedStatusValuesTimesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "LastDecreasedStatusValuesTimes"); } - void SetLastDecreasedStatusValuesTimesField(long double* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastDecreasedStatusValuesTimes", newValue); } - long double* GetLastIncreasedStatusValuesTimesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "LastIncreasedStatusValuesTimes"); } - void SetLastIncreasedStatusValuesTimesField(long double* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastIncreasedStatusValuesTimes", newValue); } - long double* GetLastMaxedStatusValuesTimesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "LastMaxedStatusValuesTimes"); } - void SetLastMaxedStatusValuesTimesField(long double* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastMaxedStatusValuesTimes", newValue); } - long double* GetLastDepletedStatusValuesTimesField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "LastDepletedStatusValuesTimes"); } - void SetLastDepletedStatusValuesTimesField(long double* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastDepletedStatusValuesTimes", newValue); } - float GetStaminaRecoveryExtraResourceDecreaseMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryExtraResourceDecreaseMultiplier"); } - void SetStaminaRecoveryExtraResourceDecreaseMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "StaminaRecoveryExtraResourceDecreaseMultiplier", newValue); } - float GetDehydrationStaminaRecoveryRateField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DehydrationStaminaRecoveryRate"); } - void SetDehydrationStaminaRecoveryRateField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DehydrationStaminaRecoveryRate", newValue); } - float GetWaterConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WaterConsumptionMultiplier"); } - void SetWaterConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WaterConsumptionMultiplier", newValue); } - float GetFoodConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "FoodConsumptionMultiplier"); } - void SetFoodConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "FoodConsumptionMultiplier", newValue); } - float GetExtraOxygenSpeedStatMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraOxygenSpeedStatMultiplier"); } - void SetExtraOxygenSpeedStatMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraOxygenSpeedStatMultiplier", newValue); } - float GetExtraTamedHealthMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraTamedHealthMultiplier"); } - void SetExtraTamedHealthMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraTamedHealthMultiplier", newValue); } - float GetWakingTameFoodConsumptionRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WakingTameFoodConsumptionRateMultiplier"); } - void SetWakingTameFoodConsumptionRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WakingTameFoodConsumptionRateMultiplier", newValue); } - float GetSwimmingStaminaRecoveryRateMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "SwimmingStaminaRecoveryRateMultiplier"); } - void SetSwimmingStaminaRecoveryRateMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "SwimmingStaminaRecoveryRateMultiplier", newValue); } - float GetExtraWaterConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraWaterConsumptionMultiplier"); } - void SetExtraWaterConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraWaterConsumptionMultiplier", newValue); } - float GetExtraFoodConsumptionMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraFoodConsumptionMultiplier"); } - void SetExtraFoodConsumptionMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraFoodConsumptionMultiplier", newValue); } - float GetDefaultMaxOxygenField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultMaxOxygen"); } - void SetDefaultMaxOxygenField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DefaultMaxOxygen", newValue); } - long double GetLastReplicatedCurrentStatusValuesTimeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "LastReplicatedCurrentStatusValuesTime"); } - void SetLastReplicatedCurrentStatusValuesTimeField(long double newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastReplicatedCurrentStatusValuesTime", newValue); } - float GetOriginalMaxTorporField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "OriginalMaxTorpor"); } - void SetOriginalMaxTorporField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "OriginalMaxTorpor", newValue); } - float GetMountedDinoDinoWeightMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "MountedDinoDinoWeightMultiplier"); } - void SetMountedDinoDinoWeightMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "MountedDinoDinoWeightMultiplier", newValue); } - float GetExtraWildDinoDamageMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraWildDinoDamageMultiplier"); } - void SetExtraWildDinoDamageMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraWildDinoDamageMultiplier", newValue); } - float GetExtraTamedDinoDamageMultiplierField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraTamedDinoDamageMultiplier"); } - void SetExtraTamedDinoDamageMultiplierField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "ExtraTamedDinoDamageMultiplier", newValue); } - float GetWeightMultiplierForCarriedPassengersField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WeightMultiplierForCarriedPassengers"); } - void SetWeightMultiplierForCarriedPassengersField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WeightMultiplierForCarriedPassengers", newValue); } - float GetWeightMultiplierForPlatformPassengersInventoryField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "WeightMultiplierForPlatformPassengersInventory"); } - void SetWeightMultiplierForPlatformPassengersInventoryField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "WeightMultiplierForPlatformPassengersInventory", newValue); } - float* GetDinoMaxStatAddMultiplierImprintingField() const { return GetNativePointerField(this, "UPrimalCharacterStatusComponent", "DinoMaxStatAddMultiplierImprinting"); } - void SetDinoMaxStatAddMultiplierImprintingField(float* newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DinoMaxStatAddMultiplierImprinting", newValue); } - float GetDinoImprintingQualityField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "DinoImprintingQuality"); } - void SetDinoImprintingQualityField(float newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "DinoImprintingQuality", newValue); } - bool GetbInWeightLockField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "bInWeightLock"); } - void SetbInWeightLockField(bool newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "bInWeightLock", newValue); } - long double GetLastReplicatedXPTimeField() const { return GetNativeField(this, "UPrimalCharacterStatusComponent", "LastReplicatedXPTime"); } - void SetLastReplicatedXPTimeField(long double newValue) { SetNativeField(this, "UPrimalCharacterStatusComponent", "LastReplicatedXPTime", newValue); } - - // Functions - - void InitializeComponent() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "InitializeComponent"); } - float GetTotalStatusModifierDescriptionIndex(int StatusValueModifierDescriptionIndex) { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetTotalStatusModifierDescriptionIndex", StatusValueModifierDescriptionIndex); } - //void AddStatusValueModifier(EPrimalCharacterStatusValue::Type ValueType, float Amount, float Speed, bool bContinueOnUnchangedValue, bool bSetValue, int StatusValueModifierDescriptionIndex, bool bResetExistingModifierDescriptionIndex, float LimitExistingModifierDescriptionToMax, bool bSetAdditionalValue, bool StopAtValueNearMax, EPrimalCharacterStatusValue::Type bMakeUntameable, bool) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "AddStatusValueModifier", ValueType, Amount, Speed, bContinueOnUnchangedValue, bSetValue, StatusValueModifierDescriptionIndex, bResetExistingModifierDescriptionIndex, LimitExistingModifierDescriptionToMax, bSetAdditionalValue, StopAtValueNearMax, bMakeUntameable); } - void ApplyStatusValueModifiers(float DeltaTime) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "ApplyStatusValueModifiers", DeltaTime); } - void TickStatus(float DeltaTime, bool bForceStatusUpdate) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "TickStatus", DeltaTime, bForceStatusUpdate); } - void UpdateStatusValue(EPrimalCharacterStatusValue::Type valueType, float DeltaTime, bool bManualUpdate) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "UpdateStatusValue", valueType, DeltaTime, bManualUpdate); } - void UpdateWeightStat() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "UpdateWeightStat"); } - void AdjustStatusValueModification(EPrimalCharacterStatusValue::Type valueType, float* Amount, TSubclassOf DamageTypeClass) { NativeCall>((DWORD64)this, "UPrimalCharacterStatusComponent", "AdjustStatusValueModification", valueType, Amount, DamageTypeClass); } - float ModifyCurrentStatusValue(EPrimalCharacterStatusValue::Type valueType, float Amount, bool bPercentOfMax, bool bPercentOfCurrent, bool bManualModification, bool bSetValue, TSubclassOf DamageTypeClass, bool bDamageDontKill) { return NativeCall, bool>((DWORD64)this, "UPrimalCharacterStatusComponent", "ModifyCurrentStatusValue", valueType, Amount, bPercentOfMax, bPercentOfCurrent, bManualModification, bSetValue, DamageTypeClass, bDamageDontKill); } - void ChangedStatusState(EPrimalCharacterStatusState::Type valueType, bool bEnteredState) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "ChangedStatusState", valueType, bEnteredState); } - void CharacterUpdatedInventory(bool bEquippedOrUneqippedItem) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "CharacterUpdatedInventory", bEquippedOrUneqippedItem); } - void RefreshInsulation() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "RefreshInsulation"); } - void RescaleMaxStat(EPrimalCharacterStatusValue::Type LevelUpValueType, float TargetValue, bool bIsPercentOfTrueValue) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "RescaleMaxStat", LevelUpValueType, TargetValue, bIsPercentOfTrueValue); } - void RefreshTemperature() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "RefreshTemperature"); } - void UpdatedCurrentStatusValue(EPrimalCharacterStatusValue::Type valueType, float Amount, bool bManualModification, TSubclassOf DamageTypeClass, bool bDamageDontKill) { NativeCall, bool>((DWORD64)this, "UPrimalCharacterStatusComponent", "UpdatedCurrentStatusValue", valueType, Amount, bManualModification, DamageTypeClass, bDamageDontKill); } - float GetStatusValueRecoveryRate(EPrimalCharacterStatusValue::Type valueType) { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetStatusValueRecoveryRate", valueType); } - bool IsInStatusState(EPrimalCharacterStatusState::Type StateType) { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "IsInStatusState", StateType); } - void OnJumped() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "OnJumped"); } - float GetMeleeDamageModifier() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetMeleeDamageModifier"); } - float GetMovementSpeedModifier() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetMovementSpeedModifier"); } - float GetJumpZModifier() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetJumpZModifier"); } - void ServerSyncReplicatedValues() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "ServerSyncReplicatedValues"); } - bool CanLevelUp(EPrimalCharacterStatusValue::Type LevelUpValueType) { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "CanLevelUp", LevelUpValueType); } - void ServerApplyLevelUp(EPrimalCharacterStatusValue::Type LevelUpValueType, AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "ServerApplyLevelUp", LevelUpValueType, ByPC); } - void SetBaseLevel(int Level, bool bDontCurrentSetToMax) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "SetBaseLevel", Level, bDontCurrentSetToMax); } - void SetTameable(bool bTameable) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "SetTameable", bTameable); } - void SetTamed(float TameIneffectivenessModifier) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "SetTamed", TameIneffectivenessModifier); } - void ApplyTamingStatModifiers(float TameIneffectivenessModifier) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "ApplyTamingStatModifiers", TameIneffectivenessModifier); } - FString* GetStatusValueString(FString* result, EPrimalCharacterStatusValue::Type ValueType, bool bValueOnly) { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetStatusValueString", result, ValueType, bValueOnly); } - void AddExperience(float HowMuch, bool bShareWithTribe, EXPType::Type XPType) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "AddExperience", HowMuch, bShareWithTribe, XPType); } - int GetNumLevelUpsAvailable() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetNumLevelUpsAvailable"); } - float GetExperienceRequiredForNextLevelUp() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetExperienceRequiredForNextLevelUp"); } - float GetExperienceRequiredForPreviousLevelUp() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetExperienceRequiredForPreviousLevelUp"); } - bool IsAtMaxLevel() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "IsAtMaxLevel"); } - bool HasExperienceForLevelUp() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "HasExperienceForLevelUp"); } - float GetExperiencePercent() { return NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "GetExperiencePercent"); } - void NetSyncMaxStatusValues_Implementation(TArray* NetMaxStatusValues, TArray* NetBaseMaxStatusValues) { NativeCall *, TArray *>((DWORD64)this, "UPrimalCharacterStatusComponent", "NetSyncMaxStatusValues_Implementation", NetMaxStatusValues, NetBaseMaxStatusValues); } - void ClientSyncMaxStatusValues_Implementation(TArray* NetMaxStatusValues, TArray* NetBaseMaxStatusValues) { NativeCall *, TArray *>((DWORD64)this, "UPrimalCharacterStatusComponent", "ClientSyncMaxStatusValues_Implementation", NetMaxStatusValues, NetBaseMaxStatusValues); } - void SetMaxStatusValue(EPrimalCharacterStatusValue::Type StatType, float newValue) { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "SetMaxStatusValue", StatType, newValue); } - void RescaleAllStats() { NativeCall((DWORD64)this, "UPrimalCharacterStatusComponent", "RescaleAllStats"); } -}; - -// Dino - -struct APrimalDinoCharacter : APrimalCharacter -{ - TWeakObjectPtr GetForcedMasterTargetField() const { return GetNativeField>(this, "APrimalDinoCharacter", "ForcedMasterTarget"); } - void SetForcedMasterTargetField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "ForcedMasterTarget", newValue); } - FName GetMountCharacterSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "MountCharacterSocketName"); } - void SetMountCharacterSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "MountCharacterSocketName", newValue); } - TWeakObjectPtr GetMountCharacterField() const { return GetNativeField>(this, "APrimalDinoCharacter", "MountCharacter"); } - void SetMountCharacterField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "MountCharacter", newValue); } - //ECollisionChannel GetMeshOriginalCollisionChannelField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeshOriginalCollisionChannel"); } - float GetColorizationIntensityField() const { return GetNativeField(this, "APrimalDinoCharacter", "ColorizationIntensity"); } - void SetColorizationIntensityField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ColorizationIntensity", newValue); } - FVector GetRidingAttackExtraVelocityField() const { return GetNativeField(this, "APrimalDinoCharacter", "RidingAttackExtraVelocity"); } - void SetRidingAttackExtraVelocityField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RidingAttackExtraVelocity", newValue); } - float GetPaintConsumptionMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "PaintConsumptionMultiplier"); } - void SetPaintConsumptionMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PaintConsumptionMultiplier", newValue); } - float GetChargingBlockedStopTimeThresholdField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingBlockedStopTimeThreshold"); } - void SetChargingBlockedStopTimeThresholdField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingBlockedStopTimeThreshold", newValue); } - TArray GetMeleeSwingSocketsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "MeleeSwingSockets"); } - void SetMeleeSwingSocketsField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeSwingSockets", newValue); } - int GetMeleeDamageAmountField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeleeDamageAmount"); } - void SetMeleeDamageAmountField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeDamageAmount", newValue); } - float GetMeleeDamageImpulseField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeleeDamageImpulse"); } - void SetMeleeDamageImpulseField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeDamageImpulse", newValue); } - float GetMeleeSwingRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeleeSwingRadius"); } - void SetMeleeSwingRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeSwingRadius", newValue); } - //TArray GetAttackInfosField() const { return GetNativeField>(this, "APrimalDinoCharacter", "AttackInfos"); } - char GetCurrentAttackIndexField() const { return GetNativeField(this, "APrimalDinoCharacter", "CurrentAttackIndex"); } - void SetCurrentAttackIndexField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "CurrentAttackIndex", newValue); } - char GetLastAttackIndexField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAttackIndex"); } - void SetLastAttackIndexField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAttackIndex", newValue); } - TSubclassOf GetMeleeDamageTypeField() const { return GetNativeField>(this, "APrimalDinoCharacter", "MeleeDamageType"); } - void SetMeleeDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeDamageType", newValue); } - TSubclassOf GetStepActorDamageTypeOverrideField() const { return GetNativeField>(this, "APrimalDinoCharacter", "StepActorDamageTypeOverride"); } - void SetStepActorDamageTypeOverrideField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepActorDamageTypeOverride", newValue); } - float GetAttackOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackOffset"); } - void SetAttackOffsetField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackOffset", newValue); } - float GetFleeHealthPercentageField() const { return GetNativeField(this, "APrimalDinoCharacter", "FleeHealthPercentage"); } - void SetFleeHealthPercentageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FleeHealthPercentage", newValue); } - float GetBreakFleeHealthPercentageField() const { return GetNativeField(this, "APrimalDinoCharacter", "BreakFleeHealthPercentage"); } - void SetBreakFleeHealthPercentageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BreakFleeHealthPercentage", newValue); } - FString GetTamerStringField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamerString"); } - void SetTamerStringField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamerString", newValue); } - FString GetTamedNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedName"); } - void SetTamedNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedName", newValue); } - FVector2D GetOverlayTooltipPaddingField() const { return GetNativeField(this, "APrimalDinoCharacter", "OverlayTooltipPadding"); } - void SetOverlayTooltipPaddingField(FVector2D newValue) { SetNativeField(this, "APrimalDinoCharacter", "OverlayTooltipPadding", newValue); } - FVector2D GetOverlayTooltipScaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "OverlayTooltipScale"); } - void SetOverlayTooltipScaleField(FVector2D newValue) { SetNativeField(this, "APrimalDinoCharacter", "OverlayTooltipScale", newValue); } - FVector GetRiderFPVCameraOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderFPVCameraOffset"); } - void SetRiderFPVCameraOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderFPVCameraOffset", newValue); } - FVector GetLandingLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LandingLocation"); } - void SetLandingLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LandingLocation", newValue); } - long double GetStartLandingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "StartLandingTime"); } - void SetStartLandingTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "StartLandingTime", newValue); } - long double GetLastAxisStartPressTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAxisStartPressTime"); } - void SetLastAxisStartPressTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAxisStartPressTime", newValue); } - long double GetLastMoveForwardTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastMoveForwardTime"); } - void SetLastMoveForwardTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastMoveForwardTime", newValue); } - float GetLandingTraceMaxDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "LandingTraceMaxDistance"); } - void SetLandingTraceMaxDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LandingTraceMaxDistance", newValue); } - float GetFlyingWanderFixedDistanceAmountField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyingWanderFixedDistanceAmount"); } - void SetFlyingWanderFixedDistanceAmountField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyingWanderFixedDistanceAmount", newValue); } - float GetFlyingWanderRandomDistanceAmountField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyingWanderRandomDistanceAmount"); } - void SetFlyingWanderRandomDistanceAmountField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyingWanderRandomDistanceAmount", newValue); } - float GetAcceptableLandingRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "AcceptableLandingRadius"); } - void SetAcceptableLandingRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AcceptableLandingRadius", newValue); } - float GetMaxLandingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxLandingTime"); } - void SetMaxLandingTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxLandingTime", newValue); } - float* GetGenderSpeedMultipliersField() const { return GetNativePointerField(this, "APrimalDinoCharacter", "GenderSpeedMultipliers"); } - float GetChargeSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargeSpeedMultiplier"); } - void SetChargeSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargeSpeedMultiplier", newValue); } - float GetChargingStaminaPerSecondDrainField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingStaminaPerSecondDrain"); } - void SetChargingStaminaPerSecondDrainField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingStaminaPerSecondDrain", newValue); } - float GetChargingStopDotTresholdField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingStopDotTreshold"); } - void SetChargingStopDotTresholdField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingStopDotTreshold", newValue); } - FVector GetLastChargeLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastChargeLocation"); } - void SetLastChargeLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastChargeLocation", newValue); } - long double GetLastStartChargingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastStartChargingTime"); } - void SetLastStartChargingTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastStartChargingTime", newValue); } - TWeakObjectPtr GetRiderField() const { return GetNativeField>(this, "APrimalDinoCharacter", "Rider"); } - void SetRiderField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "Rider", newValue); } - TWeakObjectPtr GetPreviousRiderField() const { return GetNativeField>(this, "APrimalDinoCharacter", "PreviousRider"); } - void SetPreviousRiderField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "PreviousRider", newValue); } - TSubclassOf GetSaddleItemClassField() const { return GetNativeField>(this, "APrimalDinoCharacter", "SaddleItemClass"); } - void SetSaddleItemClassField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "SaddleItemClass", newValue); } - //TArray GetNoSaddlePassengerSeatsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "NoSaddlePassengerSeats"); } - TWeakObjectPtr GetCarriedCharacterField() const { return GetNativeField>(this, "APrimalDinoCharacter", "CarriedCharacter"); } - void SetCarriedCharacterField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "CarriedCharacter", newValue); } - TWeakObjectPtr GetPreviousCarriedCharacterField() const { return GetNativeField>(this, "APrimalDinoCharacter", "PreviousCarriedCharacter"); } - void SetPreviousCarriedCharacterField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "PreviousCarriedCharacter", newValue); } - TArray> GetPassengerPerSeatField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "PassengerPerSeat"); } - void SetPassengerPerSeatField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "PassengerPerSeat", newValue); } - TArray> GetPrevPassengerPerSeatField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "PrevPassengerPerSeat"); } - void SetPrevPassengerPerSeatField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "PrevPassengerPerSeat", newValue); } - long double GetLastClientCameraRotationServerUpdateField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastClientCameraRotationServerUpdate"); } - void SetLastClientCameraRotationServerUpdateField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastClientCameraRotationServerUpdate", newValue); } - //TWeakObjectPtr GetActiveStateField() const { return GetNativeField>(this, "APrimalDinoCharacter", "ActiveState"); } - //TWeakObjectPtr GetActiveWonderStateField() const { return GetNativeField>(this, "APrimalDinoCharacter", "ActiveWonderState"); } - int GetLastPlayedAttackAnimationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastPlayedAttackAnimation"); } - void SetLastPlayedAttackAnimationField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastPlayedAttackAnimation", newValue); } - char GetAttackIndexOfPlayedAnimationField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackIndexOfPlayedAnimation"); } - void SetAttackIndexOfPlayedAnimationField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackIndexOfPlayedAnimation", newValue); } - float GetOriginalCapsuleHalfHeightField() const { return GetNativeField(this, "APrimalDinoCharacter", "OriginalCapsuleHalfHeight"); } - void SetOriginalCapsuleHalfHeightField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "OriginalCapsuleHalfHeight", newValue); } - TArray GetLastSocketPositionsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "LastSocketPositions"); } - void SetLastSocketPositionsField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastSocketPositions", newValue); } - TArray> GetMeleeSwingHurtListField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "MeleeSwingHurtList"); } - void SetMeleeSwingHurtListField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeSwingHurtList", newValue); } - long double GetEndAttackTargetTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "EndAttackTargetTime"); } - void SetEndAttackTargetTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "EndAttackTargetTime", newValue); } - FVector GetRidingFirstPersonViewLocationOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "RidingFirstPersonViewLocationOffset"); } - void SetRidingFirstPersonViewLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RidingFirstPersonViewLocationOffset", newValue); } - float GetBabyChanceOfTwinsField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyChanceOfTwins"); } - void SetBabyChanceOfTwinsField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyChanceOfTwins", newValue); } - float GetBabyGestationSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyGestationSpeed"); } - void SetBabyGestationSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyGestationSpeed", newValue); } - float GetExtraBabyGestationSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ExtraBabyGestationSpeedMultiplier"); } - void SetExtraBabyGestationSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ExtraBabyGestationSpeedMultiplier", newValue); } - long double GetLastEggBoostedTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastEggBoostedTime"); } - void SetLastEggBoostedTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastEggBoostedTime", newValue); } - float GetWildPercentageChanceOfBabyField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildPercentageChanceOfBaby"); } - void SetWildPercentageChanceOfBabyField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildPercentageChanceOfBaby", newValue); } - float GetWildBabyAgeWeightField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildBabyAgeWeight"); } - void SetWildBabyAgeWeightField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildBabyAgeWeight", newValue); } - float GetBabyGestationProgressField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyGestationProgress"); } - void SetBabyGestationProgressField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyGestationProgress", newValue); } - float GetLastBabyAgeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastBabyAge"); } - void SetLastBabyAgeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastBabyAge", newValue); } - float GetLastBabyGestationProgressField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastBabyGestationProgress"); } - void SetLastBabyGestationProgressField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastBabyGestationProgress", newValue); } - float GetBabyChanceOfTripletsField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyChanceOfTriplets"); } - void SetBabyChanceOfTripletsField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyChanceOfTriplets", newValue); } - float GetBabyAgeField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyAge"); } - void SetBabyAgeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyAge", newValue); } - float GetMaxPercentOfCapsulHeightAllowedForIKField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxPercentOfCapsulHeightAllowedForIK"); } - void SetMaxPercentOfCapsulHeightAllowedForIKField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxPercentOfCapsulHeightAllowedForIK", newValue); } - float GetSlopeBiasForMaxCapsulePercentField() const { return GetNativeField(this, "APrimalDinoCharacter", "SlopeBiasForMaxCapsulePercent"); } - void SetSlopeBiasForMaxCapsulePercentField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SlopeBiasForMaxCapsulePercent", newValue); } - float GetAutoFadeOutAfterTameTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "AutoFadeOutAfterTameTime"); } - void SetAutoFadeOutAfterTameTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AutoFadeOutAfterTameTime", newValue); } - float GetFlyingForceRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyingForceRotationRateModifier"); } - void SetFlyingForceRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyingForceRotationRateModifier", newValue); } - TArray GetHideBoneNamesField() const { return GetNativeField>(this, "APrimalDinoCharacter", "HideBoneNames"); } - void SetHideBoneNamesField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "HideBoneNames", newValue); } - FString GetHideBonesStringField() const { return GetNativeField(this, "APrimalDinoCharacter", "HideBonesString"); } - void SetHideBonesStringField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "HideBonesString", newValue); } - FVector GetWaterSurfaceExtraJumpVectorField() const { return GetNativeField(this, "APrimalDinoCharacter", "WaterSurfaceExtraJumpVector"); } - void SetWaterSurfaceExtraJumpVectorField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "WaterSurfaceExtraJumpVector", newValue); } - FVector GetFlyerTakeOffAdditionalVelocityField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyerTakeOffAdditionalVelocity"); } - void SetFlyerTakeOffAdditionalVelocityField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyerTakeOffAdditionalVelocity", newValue); } - float GetOpenDoorDelayField() const { return GetNativeField(this, "APrimalDinoCharacter", "OpenDoorDelay"); } - void SetOpenDoorDelayField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "OpenDoorDelay", newValue); } - float GetTamedWanderHarvestIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestInterval"); } - void SetTamedWanderHarvestIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestInterval", newValue); } - float GetTamedWanderHarvestSearchRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestSearchRange"); } - void SetTamedWanderHarvestSearchRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestSearchRange", newValue); } - float GetTamedWanderHarvestCollectRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestCollectRadius"); } - void SetTamedWanderHarvestCollectRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestCollectRadius", newValue); } - FVector GetTamedWanderHarvestCollectOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestCollectOffset"); } - void SetTamedWanderHarvestCollectOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWanderHarvestCollectOffset", newValue); } - float GetRootLocSwimOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "RootLocSwimOffset"); } - void SetRootLocSwimOffsetField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RootLocSwimOffset", newValue); } - float GetPlayAnimBelowHealthPercentField() const { return GetNativeField(this, "APrimalDinoCharacter", "PlayAnimBelowHealthPercent"); } - void SetPlayAnimBelowHealthPercentField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PlayAnimBelowHealthPercent", newValue); } - float GetLeavePlayAnimBelowHealthPercentField() const { return GetNativeField(this, "APrimalDinoCharacter", "LeavePlayAnimBelowHealthPercent"); } - void SetLeavePlayAnimBelowHealthPercentField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LeavePlayAnimBelowHealthPercent", newValue); } - float GetPlatformSaddleMaxStructureBuildDistance2DField() const { return GetNativeField(this, "APrimalDinoCharacter", "PlatformSaddleMaxStructureBuildDistance2D"); } - void SetPlatformSaddleMaxStructureBuildDistance2DField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PlatformSaddleMaxStructureBuildDistance2D", newValue); } - //TSubclassOf GetLowHealthDinoSettingsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "LowHealthDinoSettings"); } - float GetSwimOffsetInterpSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "SwimOffsetInterpSpeed"); } - void SetSwimOffsetInterpSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SwimOffsetInterpSpeed", newValue); } - float GetCurrentRootLocSwimOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "CurrentRootLocSwimOffset"); } - void SetCurrentRootLocSwimOffsetField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CurrentRootLocSwimOffset", newValue); } - float GetAIRangeMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "AIRangeMultiplier"); } - void SetAIRangeMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AIRangeMultiplier", newValue); } - char* GetPreventColorizationRegionsField() const { return GetNativePointerField(this, "APrimalDinoCharacter", "PreventColorizationRegions"); } - float* GetColorSetIntensityMultipliersField() const { return GetNativePointerField(this, "APrimalDinoCharacter", "ColorSetIntensityMultipliers"); } - float GetMeleeAttackStaminaCostField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeleeAttackStaminaCost"); } - void SetMeleeAttackStaminaCostField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeAttackStaminaCost", newValue); } - TWeakObjectPtr GetTargetField() const { return GetNativeField>(this, "APrimalDinoCharacter", "Target"); } - void SetTargetField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "Target", newValue); } - TWeakObjectPtr GetTamedFollowTargetField() const { return GetNativeField>(this, "APrimalDinoCharacter", "TamedFollowTarget"); } - void SetTamedFollowTargetField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedFollowTarget", newValue); } - float GetPercentChanceFemaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "PercentChanceFemale"); } - void SetPercentChanceFemaleField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PercentChanceFemale", newValue); } - TArray> GetDeathGiveItemClassesField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "DeathGiveItemClasses"); } - void SetDeathGiveItemClassesField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemClasses", newValue); } - TArray GetDeathGiveItemChanceToBeBlueprintField() const { return GetNativeField>(this, "APrimalDinoCharacter", "DeathGiveItemChanceToBeBlueprint"); } - void SetDeathGiveItemChanceToBeBlueprintField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemChanceToBeBlueprint", newValue); } - float GetDeathGiveItemQualityMinField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemQualityMin"); } - void SetDeathGiveItemQualityMinField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemQualityMin", newValue); } - float GetDeathGiveItemQualityMaxField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemQualityMax"); } - void SetDeathGiveItemQualityMaxField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemQualityMax", newValue); } - float GetDeathGiveItemRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemRange"); } - void SetDeathGiveItemRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveItemRange", newValue); } - FString GetDeathGiveAchievementField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathGiveAchievement"); } - void SetDeathGiveAchievementField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGiveAchievement", newValue); } - FVector GetUnboardLocationOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "UnboardLocationOffset"); } - void SetUnboardLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "UnboardLocationOffset", newValue); } - float GetLastTimeWhileHeadingToGoalField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastTimeWhileHeadingToGoal"); } - void SetLastTimeWhileHeadingToGoalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastTimeWhileHeadingToGoal", newValue); } - float GetRidingNetUpdateFequencyField() const { return GetNativeField(this, "APrimalDinoCharacter", "RidingNetUpdateFequency"); } - void SetRidingNetUpdateFequencyField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RidingNetUpdateFequency", newValue); } - float GetRiderMaxSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderMaxSpeedModifier"); } - void SetRiderMaxSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderMaxSpeedModifier", newValue); } - float GetRiderMaxRunSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderMaxRunSpeedModifier"); } - void SetRiderMaxRunSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderMaxRunSpeedModifier", newValue); } - float GetRiderRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderRotationRateModifier"); } - void SetRiderRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderRotationRateModifier", newValue); } - float GetSwimmingRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "SwimmingRotationRateModifier"); } - void SetSwimmingRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SwimmingRotationRateModifier", newValue); } - float GetControlFacePitchInterpSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "ControlFacePitchInterpSpeed"); } - void SetControlFacePitchInterpSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ControlFacePitchInterpSpeed", newValue); } - float GetTamedWalkableFloorZField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWalkableFloorZ"); } - void SetTamedWalkableFloorZField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWalkableFloorZ", newValue); } - float GetCurrentMovementAnimRateField() const { return GetNativeField(this, "APrimalDinoCharacter", "CurrentMovementAnimRate"); } - void SetCurrentMovementAnimRateField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CurrentMovementAnimRate", newValue); } - int GetMinPlayerLevelForWakingTameField() const { return GetNativeField(this, "APrimalDinoCharacter", "MinPlayerLevelForWakingTame"); } - void SetMinPlayerLevelForWakingTameField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MinPlayerLevelForWakingTame", newValue); } - float GetForceNextAttackIndexField() const { return GetNativeField(this, "APrimalDinoCharacter", "ForceNextAttackIndex"); } - void SetForceNextAttackIndexField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ForceNextAttackIndex", newValue); } - TSubclassOf GetTamedInventoryComponentTemplateField() const { return GetNativeField>(this, "APrimalDinoCharacter", "TamedInventoryComponentTemplate"); } - void SetTamedInventoryComponentTemplateField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedInventoryComponentTemplate", newValue); } - float GetDeathInventoryChanceToUseField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathInventoryChanceToUse"); } - void SetDeathInventoryChanceToUseField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathInventoryChanceToUse", newValue); } - float GetWakingTameFeedIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameFeedInterval"); } - void SetWakingTameFeedIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameFeedInterval", newValue); } - long double GetLastWakingTameFedTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastWakingTameFedTime"); } - void SetLastWakingTameFedTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastWakingTameFedTime", newValue); } - float GetDeathInventoryQualityPerLevelMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathInventoryQualityPerLevelMultiplier"); } - void SetDeathInventoryQualityPerLevelMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathInventoryQualityPerLevelMultiplier", newValue); } - float GetRequiredTameAffinityField() const { return GetNativeField(this, "APrimalDinoCharacter", "RequiredTameAffinity"); } - void SetRequiredTameAffinityField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RequiredTameAffinity", newValue); } - float GetRequiredTameAffinityPerBaseLevelField() const { return GetNativeField(this, "APrimalDinoCharacter", "RequiredTameAffinityPerBaseLevel"); } - void SetRequiredTameAffinityPerBaseLevelField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RequiredTameAffinityPerBaseLevel", newValue); } - char GetTamedAITargetingRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedAITargetingRange"); } - void SetTamedAITargetingRangeField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedAITargetingRange", newValue); } - float GetCurrentTameAffinityField() const { return GetNativeField(this, "APrimalDinoCharacter", "CurrentTameAffinity"); } - void SetCurrentTameAffinityField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CurrentTameAffinity", newValue); } - float GetTameIneffectivenessModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "TameIneffectivenessModifier"); } - void SetTameIneffectivenessModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TameIneffectivenessModifier", newValue); } - float GetTameIneffectivenessByAffinityField() const { return GetNativeField(this, "APrimalDinoCharacter", "TameIneffectivenessByAffinity"); } - void SetTameIneffectivenessByAffinityField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TameIneffectivenessByAffinity", newValue); } - int GetLastFrameUseLowQualityAnimationTickField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastFrameUseLowQualityAnimationTick"); } - void SetLastFrameUseLowQualityAnimationTickField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastFrameUseLowQualityAnimationTick", newValue); } - //TArray GetSaddleStructuresField() const { return GetNativeField>(this, "APrimalDinoCharacter", "SaddleStructures"); } - int GetMaxSaddleStructuresHeightField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxSaddleStructuresHeight"); } - void SetMaxSaddleStructuresHeightField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxSaddleStructuresHeight", newValue); } - int GetSaddlePivotOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "SaddlePivotOffset"); } - void SetSaddlePivotOffsetField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "SaddlePivotOffset", newValue); } - int GetMaxSaddleStructuresNumField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxSaddleStructuresNum"); } - void SetMaxSaddleStructuresNumField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxSaddleStructuresNum", newValue); } - //TSubclassOf GetDinoSettingsClassField() const { return GetNativeField>(this, "APrimalDinoCharacter", "DinoSettingsClass"); } - float GetTamingFoodConsumeIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamingFoodConsumeInterval"); } - void SetTamingFoodConsumeIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamingFoodConsumeInterval", newValue); } - float GetDediForceAttackAnimTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "DediForceAttackAnimTime"); } - void SetDediForceAttackAnimTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DediForceAttackAnimTime", newValue); } - float GetDediForceStartAttackAfterAnimTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "DediForceStartAttackAfterAnimTime"); } - void SetDediForceStartAttackAfterAnimTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DediForceStartAttackAfterAnimTime", newValue); } - float GetWakingTameFoodIncreaseMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameFoodIncreaseMultiplier"); } - void SetWakingTameFoodIncreaseMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameFoodIncreaseMultiplier", newValue); } - int GetTamingTeamIDField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamingTeamID"); } - void SetTamingTeamIDField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamingTeamID", newValue); } - int GetOwningPlayerIDField() const { return GetNativeField(this, "APrimalDinoCharacter", "OwningPlayerID"); } - void SetOwningPlayerIDField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "OwningPlayerID", newValue); } - FString GetOwningPlayerNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "OwningPlayerName"); } - void SetOwningPlayerNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "OwningPlayerName", newValue); } - long double GetTamingLastFoodConsumptionTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamingLastFoodConsumptionTime"); } - void SetTamingLastFoodConsumptionTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamingLastFoodConsumptionTime", newValue); } - unsigned int GetDinoID1Field() const { return GetNativeField(this, "APrimalDinoCharacter", "DinoID1"); } - void SetDinoID1Field(unsigned int newValue) { SetNativeField(this, "APrimalDinoCharacter", "DinoID1", newValue); } - unsigned int GetDinoID2Field() const { return GetNativeField(this, "APrimalDinoCharacter", "DinoID2"); } - void SetDinoID2Field(unsigned int newValue) { SetNativeField(this, "APrimalDinoCharacter", "DinoID2", newValue); } - FRotator GetPreviousAimRotField() const { return GetNativeField(this, "APrimalDinoCharacter", "PreviousAimRot"); } - void SetPreviousAimRotField(FRotator newValue) { SetNativeField(this, "APrimalDinoCharacter", "PreviousAimRot", newValue); } - int GetTamedAggressionLevelField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedAggressionLevel"); } - void SetTamedAggressionLevelField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedAggressionLevel", newValue); } - float GetTamingIneffectivenessModifierIncreaseByDamagePercentField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamingIneffectivenessModifierIncreaseByDamagePercent"); } - void SetTamingIneffectivenessModifierIncreaseByDamagePercentField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamingIneffectivenessModifierIncreaseByDamagePercent", newValue); } - int GetNPCSpawnerExtraLevelOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "NPCSpawnerExtraLevelOffset"); } - void SetNPCSpawnerExtraLevelOffsetField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "NPCSpawnerExtraLevelOffset", newValue); } - float GetNPCSpawnerLevelMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "NPCSpawnerLevelMultiplier"); } - void SetNPCSpawnerLevelMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NPCSpawnerLevelMultiplier", newValue); } - float GetUntamedPoopTimeMinIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeMinInterval"); } - void SetUntamedPoopTimeMinIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeMinInterval", newValue); } - float GetUntamedPoopTimeMaxIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeMaxInterval"); } - void SetUntamedPoopTimeMaxIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeMaxInterval", newValue); } - float GetMeleeHarvestDamageMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "MeleeHarvestDamageMultiplier"); } - void SetMeleeHarvestDamageMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MeleeHarvestDamageMultiplier", newValue); } - float GetAllowRidingMaxDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "AllowRidingMaxDistance"); } - void SetAllowRidingMaxDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AllowRidingMaxDistance", newValue); } - float GetUntamedPoopTimeCacheField() const { return GetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeCache"); } - void SetUntamedPoopTimeCacheField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "UntamedPoopTimeCache", newValue); } - TSubclassOf GetBaseEggClassField() const { return GetNativeField>(this, "APrimalDinoCharacter", "BaseEggClass"); } - void SetBaseEggClassField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "BaseEggClass", newValue); } - TArray> GetEggItemsToSpawnField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "EggItemsToSpawn"); } - void SetEggItemsToSpawnField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggItemsToSpawn", newValue); } - TArray GetEggWeightsToSpawnField() const { return GetNativeField>(this, "APrimalDinoCharacter", "EggWeightsToSpawn"); } - void SetEggWeightsToSpawnField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggWeightsToSpawn", newValue); } - TArray> GetFertilizedEggItemsToSpawnField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "FertilizedEggItemsToSpawn"); } - void SetFertilizedEggItemsToSpawnField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "FertilizedEggItemsToSpawn", newValue); } - TArray GetFertilizedEggWeightsToSpawnField() const { return GetNativeField>(this, "APrimalDinoCharacter", "FertilizedEggWeightsToSpawn"); } - void SetFertilizedEggWeightsToSpawnField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "FertilizedEggWeightsToSpawn", newValue); } - float GetEggChanceToSpawnUnstasisField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggChanceToSpawnUnstasis"); } - void SetEggChanceToSpawnUnstasisField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggChanceToSpawnUnstasis", newValue); } - float GetEggIntervalBetweenUnstasisChancesField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggIntervalBetweenUnstasisChances"); } - void SetEggIntervalBetweenUnstasisChancesField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggIntervalBetweenUnstasisChances", newValue); } - float GetEggRangeMaximumNumberFromSameDinoTypeField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggRangeMaximumNumberFromSameDinoType"); } - void SetEggRangeMaximumNumberFromSameDinoTypeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggRangeMaximumNumberFromSameDinoType", newValue); } - int GetEggMaximumNumberFromSameDinoTypeField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggMaximumNumberFromSameDinoType"); } - void SetEggMaximumNumberFromSameDinoTypeField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggMaximumNumberFromSameDinoType", newValue); } - float GetEggRangeMaximumNumberField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggRangeMaximumNumber"); } - void SetEggRangeMaximumNumberField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggRangeMaximumNumber", newValue); } - int GetEggMaximumNumberField() const { return GetNativeField(this, "APrimalDinoCharacter", "EggMaximumNumber"); } - void SetEggMaximumNumberField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "EggMaximumNumber", newValue); } - float GetUntamedWalkingSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "UntamedWalkingSpeedModifier"); } - void SetUntamedWalkingSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "UntamedWalkingSpeedModifier", newValue); } - float GetTamedWalkingSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedWalkingSpeedModifier"); } - void SetTamedWalkingSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedWalkingSpeedModifier", newValue); } - float GetUntamedRunningSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "UntamedRunningSpeedModifier"); } - void SetUntamedRunningSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "UntamedRunningSpeedModifier", newValue); } - float GetTamedRunningSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedRunningSpeedModifier"); } - void SetTamedRunningSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedRunningSpeedModifier", newValue); } - //TSubclassOf GetRandomColorSetsMaleField() const { return GetNativeField>(this, "APrimalDinoCharacter", "RandomColorSetsMale"); } - //TSubclassOf GetRandomColorSetsFemaleField() const { return GetNativeField>(this, "APrimalDinoCharacter", "RandomColorSetsFemale"); } - FName GetTargetingTeamNameOverrideField() const { return GetNativeField(this, "APrimalDinoCharacter", "TargetingTeamNameOverride"); } - void SetTargetingTeamNameOverrideField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "TargetingTeamNameOverride", newValue); } - float GetExtraTamedSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ExtraTamedSpeedMultiplier"); } - void SetExtraTamedSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ExtraTamedSpeedMultiplier", newValue); } - float GetExtraUnTamedSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ExtraUnTamedSpeedMultiplier"); } - void SetExtraUnTamedSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ExtraUnTamedSpeedMultiplier", newValue); } - long double GetLastEggSpawnChanceTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastEggSpawnChanceTime"); } - void SetLastEggSpawnChanceTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastEggSpawnChanceTime", newValue); } - FName GetOriginalNPCVolumeNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "OriginalNPCVolumeName"); } - void SetOriginalNPCVolumeNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "OriginalNPCVolumeName", newValue); } - float GetOutsideOriginalNPCVolumeStasisDestroyIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "OutsideOriginalNPCVolumeStasisDestroyInterval"); } - void SetOutsideOriginalNPCVolumeStasisDestroyIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "OutsideOriginalNPCVolumeStasisDestroyInterval", newValue); } - float GetStasisedDestroyIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "StasisedDestroyInterval"); } - void SetStasisedDestroyIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StasisedDestroyInterval", newValue); } - float GetTamedAllowNamingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedAllowNamingTime"); } - void SetTamedAllowNamingTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedAllowNamingTime", newValue); } - float GetMovementSpeedScalingRotationRatePowerField() const { return GetNativeField(this, "APrimalDinoCharacter", "MovementSpeedScalingRotationRatePower"); } - void SetMovementSpeedScalingRotationRatePowerField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MovementSpeedScalingRotationRatePower", newValue); } - float GetAttackNoStaminaTorpidityMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackNoStaminaTorpidityMultiplier"); } - void SetAttackNoStaminaTorpidityMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackNoStaminaTorpidityMultiplier", newValue); } - float GetDecayDestructionPeriodField() const { return GetNativeField(this, "APrimalDinoCharacter", "DecayDestructionPeriod"); } - void SetDecayDestructionPeriodField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DecayDestructionPeriod", newValue); } - long double GetTamedAtTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedAtTime"); } - void SetTamedAtTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedAtTime", newValue); } - long double GetLastInAllyRangeTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastInAllyRangeTime"); } - void SetLastInAllyRangeTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastInAllyRangeTime", newValue); } - TArray GetLatchedOnStructuresField() const { return GetNativeField>(this, "APrimalDinoCharacter", "LatchedOnStructures"); } - void SetLatchedOnStructuresField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchedOnStructures", newValue); } - int GetOriginalTargetingTeamField() const { return GetNativeField(this, "APrimalDinoCharacter", "OriginalTargetingTeam"); } - void SetOriginalTargetingTeamField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "OriginalTargetingTeam", newValue); } - float GetPreviousRootYawSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "PreviousRootYawSpeed"); } - void SetPreviousRootYawSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PreviousRootYawSpeed", newValue); } - long double GetLastTimeFallingField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastTimeFalling"); } - void SetLastTimeFallingField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastTimeFalling", newValue); } - float GetTamedCorpseLifespanField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedCorpseLifespan"); } - void SetTamedCorpseLifespanField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedCorpseLifespan", newValue); } - float GetMateBoostDamageReceiveMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "MateBoostDamageReceiveMultiplier"); } - void SetMateBoostDamageReceiveMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MateBoostDamageReceiveMultiplier", newValue); } - float GetMateBoostDamageGiveMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "MateBoostDamageGiveMultiplier"); } - void SetMateBoostDamageGiveMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MateBoostDamageGiveMultiplier", newValue); } - float GetMateBoostRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "MateBoostRange"); } - void SetMateBoostRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MateBoostRange", newValue); } - FName GetDinoNameTagField() const { return GetNativeField(this, "APrimalDinoCharacter", "DinoNameTag"); } - void SetDinoNameTagField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "DinoNameTag", newValue); } - AShooterPlayerController* GetAttackMyTargetForPlayerControllerField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackMyTargetForPlayerController"); } - void SetAttackMyTargetForPlayerControllerField(AShooterPlayerController* newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackMyTargetForPlayerController", newValue); } - float GetRidingAttackExtraVelocityDelayField() const { return GetNativeField(this, "APrimalDinoCharacter", "RidingAttackExtraVelocityDelay"); } - void SetRidingAttackExtraVelocityDelayField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RidingAttackExtraVelocityDelay", newValue); } - float GetStepDamageRadialDamageIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageInterval"); } - void SetStepDamageRadialDamageIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageInterval", newValue); } - float GetStepDamageRadialDamageExtraRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageExtraRadius"); } - void SetStepDamageRadialDamageExtraRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageExtraRadius", newValue); } - float GetStepDamageRadialDamageAmountGeneralField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageAmountGeneral"); } - void SetStepDamageRadialDamageAmountGeneralField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageAmountGeneral", newValue); } - float GetStepDamageRadialDamageAmountHarvestableField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageAmountHarvestable"); } - void SetStepDamageRadialDamageAmountHarvestableField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageRadialDamageAmountHarvestable", newValue); } - long double GetLastRadialStepDamageTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastRadialStepDamageTime"); } - void SetLastRadialStepDamageTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastRadialStepDamageTime", newValue); } - TSubclassOf GetStepHarvestableDamageTypeField() const { return GetNativeField>(this, "APrimalDinoCharacter", "StepHarvestableDamageType"); } - void SetStepHarvestableDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepHarvestableDamageType", newValue); } - float GetStepDamageFootDamageIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageInterval"); } - void SetStepDamageFootDamageIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageInterval", newValue); } - float GetStepDamageFootDamageRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageRadius"); } - void SetStepDamageFootDamageRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageRadius", newValue); } - float GetStepDamageFootDamageAmountField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageAmount"); } - void SetStepDamageFootDamageAmountField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageAmount", newValue); } - TArray GetStepDamageFootDamageSocketsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "StepDamageFootDamageSockets"); } - void SetStepDamageFootDamageSocketsField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageSockets", newValue); } - float GetDurationBeforeMovingStuckPawnField() const { return GetNativeField(this, "APrimalDinoCharacter", "DurationBeforeMovingStuckPawn"); } - void SetDurationBeforeMovingStuckPawnField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DurationBeforeMovingStuckPawn", newValue); } - FVector GetLastCheckedLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastCheckedLocation"); } - void SetLastCheckedLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastCheckedLocation", newValue); } - long double GetLastValidNotStuckTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastValidNotStuckTime"); } - void SetLastValidNotStuckTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastValidNotStuckTime", newValue); } - float GetDefaultActivateAttackRangeOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "DefaultActivateAttackRangeOffset"); } - void SetDefaultActivateAttackRangeOffsetField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "DefaultActivateAttackRangeOffset", newValue); } - float GetCorpseTargetingMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "CorpseTargetingMultiplier"); } - void SetCorpseTargetingMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CorpseTargetingMultiplier", newValue); } - long double GetLastFootStepDamageTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastFootStepDamageTime"); } - void SetLastFootStepDamageTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastFootStepDamageTime", newValue); } - long double GetLastStartledTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastStartledTime"); } - void SetLastStartledTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastStartledTime", newValue); } - float GetCorpseLifespanNonRelevantField() const { return GetNativeField(this, "APrimalDinoCharacter", "CorpseLifespanNonRelevant"); } - void SetCorpseLifespanNonRelevantField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CorpseLifespanNonRelevant", newValue); } - float GetMinStaminaForRiderField() const { return GetNativeField(this, "APrimalDinoCharacter", "MinStaminaForRider"); } - void SetMinStaminaForRiderField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MinStaminaForRider", newValue); } - float GetLoseStaminaWithRiderRateField() const { return GetNativeField(this, "APrimalDinoCharacter", "LoseStaminaWithRiderRate"); } - void SetLoseStaminaWithRiderRateField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LoseStaminaWithRiderRate", newValue); } - float GetFollowingRunDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "FollowingRunDistance"); } - void SetFollowingRunDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FollowingRunDistance", newValue); } - float GetMaxDinoKillerTransferWeightPercentField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxDinoKillerTransferWeightPercent"); } - void SetMaxDinoKillerTransferWeightPercentField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxDinoKillerTransferWeightPercent", newValue); } - float GetNPCZoneVolumeCountWeightField() const { return GetNativeField(this, "APrimalDinoCharacter", "NPCZoneVolumeCountWeight"); } - void SetNPCZoneVolumeCountWeightField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NPCZoneVolumeCountWeight", newValue); } - FVector GetFloatingHUDTextWorldOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "FloatingHUDTextWorldOffset"); } - void SetFloatingHUDTextWorldOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "FloatingHUDTextWorldOffset", newValue); } - long double GetLastAttackedTargetTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAttackedTargetTime"); } - void SetLastAttackedTargetTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAttackedTargetTime", newValue); } - long double GetLastForcedLandingCheckTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastForcedLandingCheckTime"); } - void SetLastForcedLandingCheckTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastForcedLandingCheckTime", newValue); } - long double GetLastAllyTargetLookTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAllyTargetLookTime"); } - void SetLastAllyTargetLookTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAllyTargetLookTime", newValue); } - long double GetLastAttackedTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAttackedTime"); } - void SetLastAttackedTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAttackedTime", newValue); } - long double GetLastPlayerDinoOverlapRelevantTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastPlayerDinoOverlapRelevantTime"); } - void SetLastPlayerDinoOverlapRelevantTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastPlayerDinoOverlapRelevantTime", newValue); } - FRotator GetDinoAimRotationOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "DinoAimRotationOffset"); } - void SetDinoAimRotationOffsetField(FRotator newValue) { SetNativeField(this, "APrimalDinoCharacter", "DinoAimRotationOffset", newValue); } - long double GetLastDinoAllyLookInterpTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastDinoAllyLookInterpTime"); } - void SetLastDinoAllyLookInterpTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastDinoAllyLookInterpTime", newValue); } - FVector GetLastRiderOverlappedPositionField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastRiderOverlappedPosition"); } - void SetLastRiderOverlappedPositionField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastRiderOverlappedPosition", newValue); } - TWeakObjectPtr GetAutoDragByPawnField() const { return GetNativeField>(this, "APrimalDinoCharacter", "AutoDragByPawn"); } - long double GetNextRidingFlyerUndergroundCheckField() const { return GetNativeField(this, "APrimalDinoCharacter", "NextRidingFlyerUndergroundCheck"); } - void SetNextRidingFlyerUndergroundCheckField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "NextRidingFlyerUndergroundCheck", newValue); } - long double GetLastSetRiderTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastSetRiderTime"); } - void SetLastSetRiderTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastSetRiderTime", newValue); } - TSubclassOf GetRepairRequirementsItemField() const { return GetNativeField>(this, "APrimalDinoCharacter", "RepairRequirementsItem"); } - void SetRepairRequirementsItemField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "RepairRequirementsItem", newValue); } - float GetRepairAmountRemainingField() const { return GetNativeField(this, "APrimalDinoCharacter", "RepairAmountRemaining"); } - void SetRepairAmountRemainingField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RepairAmountRemaining", newValue); } - float GetRepairCheckIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "RepairCheckInterval"); } - void SetRepairCheckIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RepairCheckInterval", newValue); } - float GetRepairPercentPerIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "RepairPercentPerInterval"); } - void SetRepairPercentPerIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RepairPercentPerInterval", newValue); } - FVector GetRiderCheckTraceOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderCheckTraceOffset"); } - void SetRiderCheckTraceOffsetField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderCheckTraceOffset", newValue); } - FVector GetRiderEjectionImpulseField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderEjectionImpulse"); } - void SetRiderEjectionImpulseField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderEjectionImpulse", newValue); } - float GetWakingTameAffinityDecreaseFoodPercentageField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameAffinityDecreaseFoodPercentage"); } - void SetWakingTameAffinityDecreaseFoodPercentageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameAffinityDecreaseFoodPercentage", newValue); } - float GetWakingTameAllowFeedingFoodPercentageField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameAllowFeedingFoodPercentage"); } - void SetWakingTameAllowFeedingFoodPercentageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameAllowFeedingFoodPercentage", newValue); } - float GetWakingTameFoodAffinityMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameFoodAffinityMultiplier"); } - void SetWakingTameFoodAffinityMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameFoodAffinityMultiplier", newValue); } - float GetCheckForWildAmbientHarvestingIntervalMinField() const { return GetNativeField(this, "APrimalDinoCharacter", "CheckForWildAmbientHarvestingIntervalMin"); } - void SetCheckForWildAmbientHarvestingIntervalMinField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CheckForWildAmbientHarvestingIntervalMin", newValue); } - float GetCheckForWildAmbientHarvestingIntervalMaxField() const { return GetNativeField(this, "APrimalDinoCharacter", "CheckForWildAmbientHarvestingIntervalMax"); } - void SetCheckForWildAmbientHarvestingIntervalMaxField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CheckForWildAmbientHarvestingIntervalMax", newValue); } - float GetWildAmbientHarvestingTimerField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildAmbientHarvestingTimer"); } - void SetWildAmbientHarvestingTimerField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildAmbientHarvestingTimer", newValue); } - float GetWildAmbientHarvestingRadiusField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildAmbientHarvestingRadius"); } - void SetWildAmbientHarvestingRadiusField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildAmbientHarvestingRadius", newValue); } - int GetFlyerNumUnderGroundFailField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyerNumUnderGroundFail"); } - void SetFlyerNumUnderGroundFailField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyerNumUnderGroundFail", newValue); } - int GetAbsoluteBaseLevelField() const { return GetNativeField(this, "APrimalDinoCharacter", "AbsoluteBaseLevel"); } - void SetAbsoluteBaseLevelField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "AbsoluteBaseLevel", newValue); } - TSubclassOf GetTamedHarvestDamageTypeField() const { return GetNativeField>(this, "APrimalDinoCharacter", "TamedHarvestDamageType"); } - void SetTamedHarvestDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedHarvestDamageType", newValue); } - //FDinoSaddleStruct GetSaddleStructField() const { return GetNativeField(this, "APrimalDinoCharacter", "SaddleStruct"); } - TArray GetDraggedRagdollsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "DraggedRagdolls"); } - void SetDraggedRagdollsField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "DraggedRagdolls", newValue); } - FVector GetLastOverrodeRandomWanderLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastOverrodeRandomWanderLocation"); } - void SetLastOverrodeRandomWanderLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastOverrodeRandomWanderLocation", newValue); } - float GetChargeBumpDamageField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargeBumpDamage"); } - void SetChargeBumpDamageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargeBumpDamage", newValue); } - TSubclassOf GetChargeBumpDamageTypeField() const { return GetNativeField>(this, "APrimalDinoCharacter", "ChargeBumpDamageType"); } - void SetChargeBumpDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargeBumpDamageType", newValue); } - float GetChargeBumpImpulseField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargeBumpImpulse"); } - void SetChargeBumpImpulseField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargeBumpImpulse", newValue); } - float GetMinChargeIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "MinChargeInterval"); } - void SetMinChargeIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MinChargeInterval", newValue); } - float GetPlayerMountedLaunchFowardSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "PlayerMountedLaunchFowardSpeed"); } - void SetPlayerMountedLaunchFowardSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PlayerMountedLaunchFowardSpeed", newValue); } - float GetPlayerMountedLaunchUpSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "PlayerMountedLaunchUpSpeed"); } - void SetPlayerMountedLaunchUpSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "PlayerMountedLaunchUpSpeed", newValue); } - float GetAttackOnLaunchMaximumTargetDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackOnLaunchMaximumTargetDistance"); } - void SetAttackOnLaunchMaximumTargetDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackOnLaunchMaximumTargetDistance", newValue); } - float GetKeepFlightRemainingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "KeepFlightRemainingTime"); } - void SetKeepFlightRemainingTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "KeepFlightRemainingTime", newValue); } - float GetFlyingRunSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyingRunSpeedModifier"); } - void SetFlyingRunSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyingRunSpeedModifier", newValue); } - float GetChargingAnimDelayField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingAnimDelay"); } - void SetChargingAnimDelayField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingAnimDelay", newValue); } - FName GetRiderSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderSocketName"); } - void SetRiderSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderSocketName", newValue); } - float GetChargingActivationRequiresStaminaField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingActivationRequiresStamina"); } - void SetChargingActivationRequiresStaminaField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingActivationRequiresStamina", newValue); } - float GetChargingActivationConsumesStaminaField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingActivationConsumesStamina"); } - void SetChargingActivationConsumesStaminaField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingActivationConsumesStamina", newValue); } - float GetFlyerHardBreakingOverrideField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyerHardBreakingOverride"); } - void SetFlyerHardBreakingOverrideField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyerHardBreakingOverride", newValue); } - float GetBabyScaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyScale"); } - void SetBabyScaleField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyScale", newValue); } - float GetBabySpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabySpeedMultiplier"); } - void SetBabySpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabySpeedMultiplier", newValue); } - float GetBabyPitchMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyPitchMultiplier"); } - void SetBabyPitchMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyPitchMultiplier", newValue); } - float GetBabyVolumeMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyVolumeMultiplier"); } - void SetBabyVolumeMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyVolumeMultiplier", newValue); } - long double GetChargingStartBlockedTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "ChargingStartBlockedTime"); } - void SetChargingStartBlockedTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "ChargingStartBlockedTime", newValue); } - long double GetLastChargeEndTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastChargeEndTime"); } - void SetLastChargeEndTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastChargeEndTime", newValue); } - TArray GetSaddledStructuresField() const { return GetNativeField>(this, "APrimalDinoCharacter", "SaddledStructures"); } - void SetSaddledStructuresField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "SaddledStructures", newValue); } - long double GetLastTamedFlyerNearbyAllyCheckTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastTamedFlyerNearbyAllyCheckTime"); } - void SetLastTamedFlyerNearbyAllyCheckTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastTamedFlyerNearbyAllyCheckTime", newValue); } - long double GetLastUpdatedBabyAgeAtTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastUpdatedBabyAgeAtTime"); } - void SetLastUpdatedBabyAgeAtTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastUpdatedBabyAgeAtTime", newValue); } - long double GetLastUpdatedGestationAtTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastUpdatedGestationAtTime"); } - void SetLastUpdatedGestationAtTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastUpdatedGestationAtTime", newValue); } - long double GetLastUpdatedMatingAtTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastUpdatedMatingAtTime"); } - void SetLastUpdatedMatingAtTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastUpdatedMatingAtTime", newValue); } - float GetBabyAgeSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyAgeSpeed"); } - void SetBabyAgeSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyAgeSpeed", newValue); } - float GetExtraBabyAgeSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ExtraBabyAgeSpeedMultiplier"); } - void SetExtraBabyAgeSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ExtraBabyAgeSpeedMultiplier", newValue); } - float GetFemaleMinTimeBetweenMatingField() const { return GetNativeField(this, "APrimalDinoCharacter", "FemaleMinTimeBetweenMating"); } - void SetFemaleMinTimeBetweenMatingField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FemaleMinTimeBetweenMating", newValue); } - float GetFemaleMaxTimeBetweenMatingField() const { return GetNativeField(this, "APrimalDinoCharacter", "FemaleMaxTimeBetweenMating"); } - void SetFemaleMaxTimeBetweenMatingField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FemaleMaxTimeBetweenMating", newValue); } - float GetFemaleMatingRangeAdditionField() const { return GetNativeField(this, "APrimalDinoCharacter", "FemaleMatingRangeAddition"); } - void SetFemaleMatingRangeAdditionField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FemaleMatingRangeAddition", newValue); } - float GetFemaleMatingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "FemaleMatingTime"); } - void SetFemaleMatingTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FemaleMatingTime", newValue); } - long double GetNextAllowedMatingTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "NextAllowedMatingTime"); } - void SetNextAllowedMatingTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "NextAllowedMatingTime", newValue); } - float GetMatingProgressField() const { return GetNativeField(this, "APrimalDinoCharacter", "MatingProgress"); } - void SetMatingProgressField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "MatingProgress", newValue); } - long double GetLastMatingNotificationTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastMatingNotificationTime"); } - void SetLastMatingNotificationTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastMatingNotificationTime", newValue); } - APrimalDinoCharacter* GetMatingWithDinoField() const { return GetNativeField(this, "APrimalDinoCharacter", "MatingWithDino"); } - void SetMatingWithDinoField(APrimalDinoCharacter* newValue) { SetNativeField(this, "APrimalDinoCharacter", "MatingWithDino", newValue); } - float GetGestationEggTamedIneffectivenessModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "GestationEggTamedIneffectivenessModifier"); } - void SetGestationEggTamedIneffectivenessModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "GestationEggTamedIneffectivenessModifier", newValue); } - float GetNewFemaleMinTimeBetweenMatingField() const { return GetNativeField(this, "APrimalDinoCharacter", "NewFemaleMinTimeBetweenMating"); } - void SetNewFemaleMinTimeBetweenMatingField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NewFemaleMinTimeBetweenMating", newValue); } - float GetNewFemaleMaxTimeBetweenMatingField() const { return GetNativeField(this, "APrimalDinoCharacter", "NewFemaleMaxTimeBetweenMating"); } - void SetNewFemaleMaxTimeBetweenMatingField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NewFemaleMaxTimeBetweenMating", newValue); } - //TArray> GetDefaultTamedBuffsField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "DefaultTamedBuffs"); } - FVector GetInterpolatedVelocityField() const { return GetNativeField(this, "APrimalDinoCharacter", "InterpolatedVelocity"); } - void SetInterpolatedVelocityField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "InterpolatedVelocity", newValue); } - FVector GetOldInterpolatedLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "OldInterpolatedLocation"); } - void SetOldInterpolatedLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "OldInterpolatedLocation", newValue); } - float GetHyperThermiaInsulationField() const { return GetNativeField(this, "APrimalDinoCharacter", "HyperThermiaInsulation"); } - void SetHyperThermiaInsulationField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "HyperThermiaInsulation", newValue); } - float GetHypoThermiaInsulationField() const { return GetNativeField(this, "APrimalDinoCharacter", "HypoThermiaInsulation"); } - void SetHypoThermiaInsulationField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "HypoThermiaInsulation", newValue); } - float GetInsulationRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "InsulationRange"); } - void SetInsulationRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "InsulationRange", newValue); } - float GetGangOverlapRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "GangOverlapRange"); } - void SetGangOverlapRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "GangOverlapRange", newValue); } - float GetGangDamageResistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "GangDamageResistance"); } - void SetGangDamageResistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "GangDamageResistance", newValue); } - float GetGangDamageField() const { return GetNativeField(this, "APrimalDinoCharacter", "GangDamage"); } - void SetGangDamageField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "GangDamage", newValue); } - int GetMaxGangCountField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxGangCount"); } - void SetMaxGangCountField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxGangCount", newValue); } - int GetGangCountField() const { return GetNativeField(this, "APrimalDinoCharacter", "GangCount"); } - void SetGangCountField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "GangCount", newValue); } - long double GetLastGangCheckTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastGangCheckTime"); } - void SetLastGangCheckTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastGangCheckTime", newValue); } - FVector GetLastGangCheckPositionField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastGangCheckPosition"); } - void SetLastGangCheckPositionField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastGangCheckPosition", newValue); } - int GetLastRiderExitFrameCounterField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastRiderExitFrameCounter"); } - void SetLastRiderExitFrameCounterField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastRiderExitFrameCounter", newValue); } - float GetWildRandomScaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildRandomScale"); } - void SetWildRandomScaleField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildRandomScale", newValue); } - float GetHeldJumpSlowFallingGravityZScaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "HeldJumpSlowFallingGravityZScale"); } - void SetHeldJumpSlowFallingGravityZScaleField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "HeldJumpSlowFallingGravityZScale", newValue); } - float GetSlowFallingStaminaCostPerSecondField() const { return GetNativeField(this, "APrimalDinoCharacter", "SlowFallingStaminaCostPerSecond"); } - void SetSlowFallingStaminaCostPerSecondField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SlowFallingStaminaCostPerSecond", newValue); } - float GetNoRiderRotationModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "NoRiderRotationModifier"); } - void SetNoRiderRotationModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NoRiderRotationModifier", newValue); } - FName GetRiderFPVCameraUseSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderFPVCameraUseSocketName"); } - void SetRiderFPVCameraUseSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderFPVCameraUseSocketName", newValue); } - FName GetRiderLatchedFPVCameraUseSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderLatchedFPVCameraUseSocketName"); } - void SetRiderLatchedFPVCameraUseSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderLatchedFPVCameraUseSocketName", newValue); } - FName GetPassengerFPVCameraRootSocketField() const { return GetNativeField(this, "APrimalDinoCharacter", "PassengerFPVCameraRootSocket"); } - void SetPassengerFPVCameraRootSocketField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "PassengerFPVCameraRootSocket", newValue); } - TArray GetFPVRiderBoneNamesToHideField() const { return GetNativeField>(this, "APrimalDinoCharacter", "FPVRiderBoneNamesToHide"); } - void SetFPVRiderBoneNamesToHideField(TArray newValue) { SetNativeField(this, "APrimalDinoCharacter", "FPVRiderBoneNamesToHide", newValue); } - float GetExtraRunningSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "ExtraRunningSpeedModifier"); } - void SetExtraRunningSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ExtraRunningSpeedModifier", newValue); } - float GetScaleExtraRunningSpeedModifierMinField() const { return GetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierMin"); } - void SetScaleExtraRunningSpeedModifierMinField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierMin", newValue); } - float GetScaleExtraRunningSpeedModifierMaxField() const { return GetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierMax"); } - void SetScaleExtraRunningSpeedModifierMaxField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierMax", newValue); } - float GetScaleExtraRunningSpeedModifierSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierSpeed"); } - void SetScaleExtraRunningSpeedModifierSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ScaleExtraRunningSpeedModifierSpeed", newValue); } - float GetLastHigherScaleExtraRunningSpeedValueField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastHigherScaleExtraRunningSpeedValue"); } - void SetLastHigherScaleExtraRunningSpeedValueField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastHigherScaleExtraRunningSpeedValue", newValue); } - long double GetLastHigherScaleExtraRunningSpeedTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastHigherScaleExtraRunningSpeedTime"); } - void SetLastHigherScaleExtraRunningSpeedTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastHigherScaleExtraRunningSpeedTime", newValue); } - float GetRiderMovementSpeedScalingRotationRatePowerMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderMovementSpeedScalingRotationRatePowerMultiplier"); } - void SetRiderMovementSpeedScalingRotationRatePowerMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderMovementSpeedScalingRotationRatePowerMultiplier", newValue); } - int GetLoadDestroyWildDinosUnderVersionField() const { return GetNativeField(this, "APrimalDinoCharacter", "LoadDestroyWildDinosUnderVersion"); } - void SetLoadDestroyWildDinosUnderVersionField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LoadDestroyWildDinosUnderVersion", newValue); } - int GetSaveDestroyWildDinosUnderVersionField() const { return GetNativeField(this, "APrimalDinoCharacter", "SaveDestroyWildDinosUnderVersion"); } - void SetSaveDestroyWildDinosUnderVersionField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "SaveDestroyWildDinosUnderVersion", newValue); } - float GetAllowWaterSurfaceExtraJumpStaminaCostField() const { return GetNativeField(this, "APrimalDinoCharacter", "AllowWaterSurfaceExtraJumpStaminaCost"); } - void SetAllowWaterSurfaceExtraJumpStaminaCostField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AllowWaterSurfaceExtraJumpStaminaCost", newValue); } - TWeakObjectPtr GetRiderAttackTargetField() const { return GetNativeField>(this, "APrimalDinoCharacter", "RiderAttackTarget"); } - void SetRiderAttackTargetField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderAttackTarget", newValue); } - FVector GetRiderAttackLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderAttackLocation"); } - void SetRiderAttackLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderAttackLocation", newValue); } - char GetTribeGroupPetOrderingRankField() const { return GetNativeField(this, "APrimalDinoCharacter", "TribeGroupPetOrderingRank"); } - void SetTribeGroupPetOrderingRankField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "TribeGroupPetOrderingRank", newValue); } - char GetTribeGroupPetRidingRankField() const { return GetNativeField(this, "APrimalDinoCharacter", "TribeGroupPetRidingRank"); } - void SetTribeGroupPetRidingRankField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "TribeGroupPetRidingRank", newValue); } - char GetFollowStoppingDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "FollowStoppingDistance"); } - void SetFollowStoppingDistanceField(char newValue) { SetNativeField(this, "APrimalDinoCharacter", "FollowStoppingDistance", newValue); } - FString GetImprinterNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "ImprinterName"); } - void SetImprinterNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "ImprinterName", newValue); } - unsigned __int64 GetImprinterPlayerDataIDField() const { return GetNativeField(this, "APrimalDinoCharacter", "ImprinterPlayerDataID"); } - void SetImprinterPlayerDataIDField(unsigned __int64 newValue) { SetNativeField(this, "APrimalDinoCharacter", "ImprinterPlayerDataID", newValue); } - float GetBabyMinCuddleIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyMinCuddleInterval"); } - void SetBabyMinCuddleIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyMinCuddleInterval", newValue); } - float GetBabyMaxCuddleIntervalField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyMaxCuddleInterval"); } - void SetBabyMaxCuddleIntervalField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyMaxCuddleInterval", newValue); } - float GetBabyCuddleGracePeriodField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyCuddleGracePeriod"); } - void SetBabyCuddleGracePeriodField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleGracePeriod", newValue); } - float GetBabyCuddleLoseImpringQualityPerSecondField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyCuddleLoseImpringQualityPerSecond"); } - void SetBabyCuddleLoseImpringQualityPerSecondField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleLoseImpringQualityPerSecond", newValue); } - float GetBabyCuddleWalkDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyCuddleWalkDistance"); } - void SetBabyCuddleWalkDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleWalkDistance", newValue); } - FVector GetBabyCuddleWalkStartingLocationField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyCuddleWalkStartingLocation"); } - void SetBabyCuddleWalkStartingLocationField(FVector newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleWalkStartingLocation", newValue); } - long double GetBabyNextCuddleTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyNextCuddleTime"); } - void SetBabyNextCuddleTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyNextCuddleTime", newValue); } - //TEnumAsByte GetBabyCuddleTypeField() const { return GetNativeField>(this, "APrimalDinoCharacter", "BabyCuddleType"); } - //void SetBabyCuddleTypeField(TEnumAsByte newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleType", newValue); } - TSubclassOf GetBabyCuddleFoodField() const { return GetNativeField>(this, "APrimalDinoCharacter", "BabyCuddleFood"); } - void SetBabyCuddleFoodField(TSubclassOf newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyCuddleFood", newValue); } - TArray> GetMyBabyCuddleFoodTypesField() const { return GetNativeField>>(this, "APrimalDinoCharacter", "MyBabyCuddleFoodTypes"); } - void SetMyBabyCuddleFoodTypesField(TArray> newValue) { SetNativeField(this, "APrimalDinoCharacter", "MyBabyCuddleFoodTypes", newValue); } - float GetRiderMaxImprintingQualityDamageReductionField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderMaxImprintingQualityDamageReduction"); } - void SetRiderMaxImprintingQualityDamageReductionField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderMaxImprintingQualityDamageReduction", newValue); } - float GetRiderMaxImprintingQualityDamageMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "RiderMaxImprintingQualityDamageMultiplier"); } - void SetRiderMaxImprintingQualityDamageMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RiderMaxImprintingQualityDamageMultiplier", newValue); } - float GetBabyImprintingQualityTotalMaturationTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "BabyImprintingQualityTotalMaturationTime"); } - void SetBabyImprintingQualityTotalMaturationTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "BabyImprintingQualityTotalMaturationTime", newValue); } - float GetWakingTameMaxDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameMaxDistance"); } - void SetWakingTameMaxDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameMaxDistance", newValue); } - float GetTimeBetweenTamedWakingEatAnimationsField() const { return GetNativeField(this, "APrimalDinoCharacter", "TimeBetweenTamedWakingEatAnimations"); } - void SetTimeBetweenTamedWakingEatAnimationsField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TimeBetweenTamedWakingEatAnimations", newValue); } - long double GetLastEatAnimationTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastEatAnimationTime"); } - void SetLastEatAnimationTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastEatAnimationTime", newValue); } - float GetStepDamageFootDamageRunningMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageRunningMultiplier"); } - void SetStepDamageFootDamageRunningMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepDamageFootDamageRunningMultiplier", newValue); } - float GetStepRadialDamageOffsetField() const { return GetNativeField(this, "APrimalDinoCharacter", "StepRadialDamageOffset"); } - void SetStepRadialDamageOffsetField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "StepRadialDamageOffset", newValue); } - float GetForcePawnBigPushingForTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "ForcePawnBigPushingForTime"); } - void SetForcePawnBigPushingForTimeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "ForcePawnBigPushingForTime", newValue); } - float GetAIDinoForceActiveUntasisingRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "AIDinoForceActiveUntasisingRange"); } - void SetAIDinoForceActiveUntasisingRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AIDinoForceActiveUntasisingRange", newValue); } - float GetWildRunningRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildRunningRotationRateModifier"); } - void SetWildRunningRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildRunningRotationRateModifier", newValue); } - float GetTamedRunningRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedRunningRotationRateModifier"); } - void SetTamedRunningRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedRunningRotationRateModifier", newValue); } - float GetTamedSwimmingRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedSwimmingRotationRateModifier"); } - void SetTamedSwimmingRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedSwimmingRotationRateModifier", newValue); } - float GetWildSwimmingRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WildSwimmingRotationRateModifier"); } - void SetWildSwimmingRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WildSwimmingRotationRateModifier", newValue); } - float GetNoRiderFlyingRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "NoRiderFlyingRotationRateModifier"); } - void SetNoRiderFlyingRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "NoRiderFlyingRotationRateModifier", newValue); } - float GetAICombatRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "AICombatRotationRateModifier"); } - void SetAICombatRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AICombatRotationRateModifier", newValue); } - float GetWalkingRotationRateModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WalkingRotationRateModifier"); } - void SetWalkingRotationRateModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WalkingRotationRateModifier", newValue); } - float GetSetAttackTargetTraceDistanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "SetAttackTargetTraceDistance"); } - void SetSetAttackTargetTraceDistanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SetAttackTargetTraceDistance", newValue); } - float GetSetAttackTargetTraceWidthField() const { return GetNativeField(this, "APrimalDinoCharacter", "SetAttackTargetTraceWidth"); } - void SetSetAttackTargetTraceWidthField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SetAttackTargetTraceWidth", newValue); } - float GetWanderRadiusMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "WanderRadiusMultiplier"); } - void SetWanderRadiusMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "WanderRadiusMultiplier", newValue); } - long double GetRepeatPrimaryAttackLastSendTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "RepeatPrimaryAttackLastSendTime"); } - void SetRepeatPrimaryAttackLastSendTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "RepeatPrimaryAttackLastSendTime", newValue); } - long double GetNextTamedDinoCharacterStatusTickTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "NextTamedDinoCharacterStatusTickTime"); } - void SetNextTamedDinoCharacterStatusTickTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "NextTamedDinoCharacterStatusTickTime", newValue); } - long double GetLastTamedDinoCharacterStatusTickTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastTamedDinoCharacterStatusTickTime"); } - void SetLastTamedDinoCharacterStatusTickTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastTamedDinoCharacterStatusTickTime", newValue); } - float GetLimitRiderYawOnLatchedRangeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LimitRiderYawOnLatchedRange"); } - void SetLimitRiderYawOnLatchedRangeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LimitRiderYawOnLatchedRange", newValue); } - float GetLatchingDistanceLimitField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchingDistanceLimit"); } - void SetLatchingDistanceLimitField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchingDistanceLimit", newValue); } - float GetLatchingInitialYawField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchingInitialYaw"); } - void SetLatchingInitialYawField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchingInitialYaw", newValue); } - float GetLatchingInitialPitchField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchingInitialPitch"); } - void SetLatchingInitialPitchField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchingInitialPitch", newValue); } - float GetLatchingInterpolatedPitchField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchingInterpolatedPitch"); } - void SetLatchingInterpolatedPitchField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchingInterpolatedPitch", newValue); } - float GetLatchedFirstPersonViewAngleField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchedFirstPersonViewAngle"); } - void SetLatchedFirstPersonViewAngleField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchedFirstPersonViewAngle", newValue); } - float GetLatchingCameraInterpolationSpeedField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatchingCameraInterpolationSpeed"); } - void SetLatchingCameraInterpolationSpeedField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatchingCameraInterpolationSpeed", newValue); } - float GetTargetLatchingInitialYawField() const { return GetNativeField(this, "APrimalDinoCharacter", "TargetLatchingInitialYaw"); } - void SetTargetLatchingInitialYawField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "TargetLatchingInitialYaw", newValue); } - float GetCurrentStrafeMagnitudeField() const { return GetNativeField(this, "APrimalDinoCharacter", "CurrentStrafeMagnitude"); } - void SetCurrentStrafeMagnitudeField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "CurrentStrafeMagnitude", newValue); } - float GetGainStaminaWhenLatchedRateField() const { return GetNativeField(this, "APrimalDinoCharacter", "GainStaminaWhenLatchedRate"); } - void SetGainStaminaWhenLatchedRateField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "GainStaminaWhenLatchedRate", newValue); } - int GetLastFrameMoveRightField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastFrameMoveRight"); } - void SetLastFrameMoveRightField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastFrameMoveRight", newValue); } - int GetLastFrameMoveLeftField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastFrameMoveLeft"); } - void SetLastFrameMoveLeftField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastFrameMoveLeft", newValue); } - FRotator GetLastRiderMountedWeaponRotationField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastRiderMountedWeaponRotation"); } - void SetLastRiderMountedWeaponRotationField(FRotator newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastRiderMountedWeaponRotation", newValue); } - long double GetLastRiderMountedWeaponRotationSentTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastRiderMountedWeaponRotationSentTime"); } - void SetLastRiderMountedWeaponRotationSentTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastRiderMountedWeaponRotationSentTime", newValue); } - int GetDeathGivesDossierIndexField() const { return GetNativeField(this, "APrimalDinoCharacter", "DeathGivesDossierIndex"); } - void SetDeathGivesDossierIndexField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "DeathGivesDossierIndex", newValue); } - FName GetSaddleRiderMovementTraceThruSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "SaddleRiderMovementTraceThruSocketName"); } - void SetSaddleRiderMovementTraceThruSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "SaddleRiderMovementTraceThruSocketName", newValue); } - float GetSwimmingRunSpeedModifierField() const { return GetNativeField(this, "APrimalDinoCharacter", "SwimmingRunSpeedModifier"); } - void SetSwimmingRunSpeedModifierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "SwimmingRunSpeedModifier", newValue); } - long double GetDinoDownloadedAtTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "DinoDownloadedAtTime"); } - void SetDinoDownloadedAtTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "DinoDownloadedAtTime", newValue); } - FString GetUploadedFromServerNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "UploadedFromServerName"); } - void SetUploadedFromServerNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "UploadedFromServerName", newValue); } - FString GetLatestUploadedFromServerNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "LatestUploadedFromServerName"); } - void SetLatestUploadedFromServerNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "LatestUploadedFromServerName", newValue); } - FString GetPreviousUploadedFromServerNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "PreviousUploadedFromServerName"); } - void SetPreviousUploadedFromServerNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "PreviousUploadedFromServerName", newValue); } - FString GetTamedOnServerNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "TamedOnServerName"); } - void SetTamedOnServerNameField(FString newValue) { SetNativeField(this, "APrimalDinoCharacter", "TamedOnServerName", newValue); } - //TArray GetDinoAncestorsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "DinoAncestors"); } - //TArray GetDinoAncestorsMaleField() const { return GetNativeField>(this, "APrimalDinoCharacter", "DinoAncestorsMale"); } - //TArray GetNextBabyDinoAncestorsField() const { return GetNativeField>(this, "APrimalDinoCharacter", "NextBabyDinoAncestors"); } - //TArray GetNextBabyDinoAncestorsMaleField() const { return GetNativeField>(this, "APrimalDinoCharacter", "NextBabyDinoAncestorsMale"); } - int GetMaxAllowedRandomMutationsField() const { return GetNativeField(this, "APrimalDinoCharacter", "MaxAllowedRandomMutations"); } - void SetMaxAllowedRandomMutationsField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "MaxAllowedRandomMutations", newValue); } - int GetRandomMutationRollsField() const { return GetNativeField(this, "APrimalDinoCharacter", "RandomMutationRolls"); } - void SetRandomMutationRollsField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "RandomMutationRolls", newValue); } - float GetRandomMutationChanceField() const { return GetNativeField(this, "APrimalDinoCharacter", "RandomMutationChance"); } - void SetRandomMutationChanceField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RandomMutationChance", newValue); } - float GetRandomMutationGivePointsField() const { return GetNativeField(this, "APrimalDinoCharacter", "RandomMutationGivePoints"); } - void SetRandomMutationGivePointsField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "RandomMutationGivePoints", newValue); } - int GetRandomMutationsMaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "RandomMutationsMale"); } - void SetRandomMutationsMaleField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "RandomMutationsMale", newValue); } - int GetRandomMutationsFemaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "RandomMutationsFemale"); } - void SetRandomMutationsFemaleField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "RandomMutationsFemale", newValue); } - int GetGestationEggRandomMutationsFemaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "GestationEggRandomMutationsFemale"); } - void SetGestationEggRandomMutationsFemaleField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "GestationEggRandomMutationsFemale", newValue); } - int GetGestationEggRandomMutationsMaleField() const { return GetNativeField(this, "APrimalDinoCharacter", "GestationEggRandomMutationsMale"); } - void SetGestationEggRandomMutationsMaleField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "GestationEggRandomMutationsMale", newValue); } - FName GetWakingTameDistanceSocketNameField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameDistanceSocketName"); } - void SetWakingTameDistanceSocketNameField(FName newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameDistanceSocketName", newValue); } - int GetWakingTameConsumeEntireStackMaxQuantityField() const { return GetNativeField(this, "APrimalDinoCharacter", "WakingTameConsumeEntireStackMaxQuantity"); } - void SetWakingTameConsumeEntireStackMaxQuantityField(int newValue) { SetNativeField(this, "APrimalDinoCharacter", "WakingTameConsumeEntireStackMaxQuantity", newValue); } - float GetAttackPlayerDesirabilityMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "AttackPlayerDesirabilityMultiplier"); } - void SetAttackPlayerDesirabilityMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "AttackPlayerDesirabilityMultiplier", newValue); } - long double GetLastAutoHealingItemUseField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastAutoHealingItemUse"); } - void SetLastAutoHealingItemUseField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastAutoHealingItemUse", newValue); } - long double GetLastStartedCarryingCharacterTimeField() const { return GetNativeField(this, "APrimalDinoCharacter", "LastStartedCarryingCharacterTime"); } - void SetLastStartedCarryingCharacterTimeField(long double newValue) { SetNativeField(this, "APrimalDinoCharacter", "LastStartedCarryingCharacterTime", newValue); } - float GetFlyerAttachedExplosiveSpeedMultiplierField() const { return GetNativeField(this, "APrimalDinoCharacter", "FlyerAttachedExplosiveSpeedMultiplier"); } - void SetFlyerAttachedExplosiveSpeedMultiplierField(float newValue) { SetNativeField(this, "APrimalDinoCharacter", "FlyerAttachedExplosiveSpeedMultiplier", newValue); } - - // Functions - - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalDinoCharacter", "GetPrivateStaticClass"); } - void CheckAndHandleBasedPlayersBeingPushedThroughWalls() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "CheckAndHandleBasedPlayersBeingPushedThroughWalls"); } - void PlayHardEndChargingShake_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PlayHardEndChargingShake_Implementation"); } - //void SetForcedAggro(ITargetableInterface * Targetable, float AggroAmount, float ForcedAggroTime) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetForcedAggro", Targetable, AggroAmount, ForcedAggroTime); } - float GetAttackRangeOffset() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAttackRangeOffset"); } - void PlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - void AutoDrag() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AutoDrag"); } - bool CanRide(AShooterCharacter* byPawn, char* bOutHasSaddle, char* bOutCanRideOtherThanSaddle, bool bDontCheckDistance) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanRide", byPawn, bOutHasSaddle, bOutCanRideOtherThanSaddle, bDontCheckDistance); } - void Stasis() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "Stasis"); } - void Unstasis() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "Unstasis"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PostInitializeComponents"); } - void RegisterAllComponents() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RegisterAllComponents"); } - int GetRandomBaseLevel() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetRandomBaseLevel"); } - bool AllowZoneAutoKill() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowZoneAutoKill"); } - //void SetState(UPrimalAIState * State) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetState", State); } - void StopActiveState(bool bShouldResetAttackIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StopActiveState", bShouldResetAttackIndex); } - bool DoAttack(int AttackIndex, bool bSetCurrentAttack) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "DoAttack", AttackIndex, bSetCurrentAttack); } - void ApplyRidingAttackExtraVelocity() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ApplyRidingAttackExtraVelocity"); } - bool HasReachedDestination(FVector* Goal) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "HasReachedDestination", Goal); } - float TakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - bool CanAttack(int AttackIndex) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanAttack", AttackIndex); } - bool IsAttacking() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsAttacking"); } - void PlayAttackAnimationOfAnimationArray() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PlayAttackAnimationOfAnimationArray"); } - void PlayWeightedAttackAnimation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PlayWeightedAttackAnimation"); } - bool IsCurrentlyPlayingAttackAnimation() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsCurrentlyPlayingAttackAnimation"); } - //UPrimalAIState * GetActiveState() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetActiveState"); } - bool AddToMeleeSwingHurtList(AActor* AnActor) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddToMeleeSwingHurtList", AnActor); } - bool ShouldDealDamage(AActor* TestActor) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ShouldDealDamage", TestActor); } - void DealDamage(FHitResult* Impact, FVector* ShootDir, int DamageAmount, UClass* DamageType, float Impulse) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } - bool CanCarryCharacter(APrimalCharacter* CanCarryPawn) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanCarryCharacter", CanCarryPawn); } - bool CarryCharacter(APrimalCharacter* character, bool byPassCanCarryCheck) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CarryCharacter", character, byPassCanCarryCheck); } - void ClearCarriedCharacter(bool fromCarriedCharacter) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClearCarriedCharacter", fromCarriedCharacter); } - void ClearPassengers() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClearPassengers"); } - bool AddPassenger(AShooterCharacter* Character, char PassengerSeatIndex) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddPassenger", Character, PassengerSeatIndex); } - void RemovePassenger(AShooterCharacter* Character, bool bFromCharacter) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemovePassenger", Character, bFromCharacter); } - bool CheckLocalPassengers() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CheckLocalPassengers"); } - bool CanTakePassenger(AShooterCharacter* Character, char PassengerSeatIndex) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanTakePassenger", Character, PassengerSeatIndex); } - char GetNumPassengerSeats() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetNumPassengerSeats"); } - //FSaddlePassengerSeatDefinition * GetPassengerSeatDefinition(FSaddlePassengerSeatDefinition * result, char SeatIndex) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetPassengerSeatDefinition", result, SeatIndex); } - void OnRep_PassengerPerSeat() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnRep_PassengerPerSeat"); } - void ServerToggleCharging_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerToggleCharging_Implementation"); } - void StartCharging(bool bForce) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StartCharging", bForce); } - void PlayChargingAnim() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PlayChargingAnim"); } - void EndCharging(bool bForce) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "EndCharging", bForce); } - bool AllowHurtAnimation() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowHurtAnimation"); } - void SetRider(AShooterCharacter* aRider) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetRider", aRider); } - void OnRep_Rider() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnRep_Rider"); } - void OnRep_CarriedCharacter() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnRep_CarriedCharacter"); } - void ForceUpdateColorSets_Implementation(int ColorRegion, int ColorSet) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ForceUpdateColorSets_Implementation", ColorRegion, ColorSet); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetDescriptiveName", result); } - void ForceClearRider() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ForceClearRider"); } - void ClearRider(bool FromRider, bool bCancelForceLand, bool SpawnDinoDefaultController) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClearRider", FromRider, bCancelForceLand, SpawnDinoDefaultController); } - void ControllerLeavingGame(AShooterPlayerController* theController) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ControllerLeavingGame", theController); } - FString* GetEntryString(FString* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetEntryString", result); } - UObject* GetUObjectInterfaceDataListEntryInterface() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetUObjectInterfaceDataListEntryInterface"); } - FString* GetEntryDescription(FString* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetEntryDescription", result); } - bool CanOrder(APrimalCharacter* FromCharacter, bool bBuildingStructures) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanOrder", FromCharacter, bBuildingStructures); } - //bool TamedProcessOrder(APrimalCharacter * FromCharacter, EDinoTamedOrder::Type OrderType, bool bForce) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "TamedProcessOrder", FromCharacter, OrderType, bForce); } - void ServerSleepingTick() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerSleepingTick"); } - float GetAffinityIncreaseForFoodItem(UPrimalItem* foodItem) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAffinityIncreaseForFoodItem", foodItem); } - void ServerTamedTick() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerTamedTick"); } - UPrimalItem* GetBestInventoryFoodItem(float* FoodIncrease, bool bLookForAffinity, bool bFoodItemRequiresLivePlayerCharacter, UPrimalItem** foundFoodItem, bool bLookForWorstFood) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetBestInventoryFoodItem", FoodIncrease, bLookForAffinity, bFoodItemRequiresLivePlayerCharacter, foundFoodItem, bLookForWorstFood); } - AShooterCharacter* ConsumeInventoryFoodItem(UPrimalItem* foodItem, float* AffinityIncrease, bool bDontDecrementItem, float* FoodIncrease, float FoodAmountMultiplier, bool bConsumeEntireStack) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ConsumeInventoryFoodItem", foodItem, AffinityIncrease, bDontDecrementItem, FoodIncrease, FoodAmountMultiplier, bConsumeEntireStack); } - AShooterCharacter* FindFirstFoodItemPlayerCharacter() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "FindFirstFoodItemPlayerCharacter"); } - int GetFoodItemEffectivenessMultipliersIndex(UPrimalItem* foodItem) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetFoodItemEffectivenessMultipliersIndex", foodItem); } - UClass* * GetFirstAffinityFoodItemClass(UClass* * result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetFirstAffinityFoodItemClass", result); } - int GetExtraFoodItemEffectivenessMultipliersIndex(UPrimalItem* foodItem) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetExtraFoodItemEffectivenessMultipliersIndex", foodItem); } - void OnElevateDino(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnElevateDino", Val); } - void OnLowerDino(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnLowerDino", Val); } - void OnBrake(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnBrake", Val); } - void ServerRequestBraking_Implementation(bool bWantsToBrake) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerRequestBraking_Implementation", bWantsToBrake); } - void OnStartFire(bool bFromGamepadRight) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnStartFire", bFromGamepadRight); } - void OnStopFire(bool bFromGamepadRight) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnStopFire", bFromGamepadRight); } - void OnStartTargeting(bool bFromGamepadLeft) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnStartTargeting", bFromGamepadLeft); } - void OnControllerInitiatedAttack(int AttackIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnControllerInitiatedAttack", AttackIndex); } - void UpdateAttackTargets() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateAttackTargets"); } - void ServerUpdateAttackTargets_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerUpdateAttackTargets_Implementation"); } - void GetAttackTargets(AActor** attackActor, FVector* attackLoc) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAttackTargets", attackActor, attackLoc); } - void ServerRequestAttack_Implementation(int attackIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerRequestAttack_Implementation", attackIndex); } - void OnPrimalCharacterSleeped() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnPrimalCharacterSleeped"); } - void UnPossessed() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UnPossessed"); } - FRotator* ProcessRootRotAndLoc(FRotator* result, float DeltaTime, FVector* RootLocOffset, FRotator* RootRotOffset, float* RootYawSpeed, float MaxYawAimClamp, float CurrentAimBlending, FRotator* TargetAimRot, float* RootRot) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ProcessRootRotAndLoc", result, DeltaTime, RootLocOffset, RootRotOffset, RootYawSpeed, MaxYawAimClamp, CurrentAimBlending, TargetAimRot, RootRot); } - FRotator* GetAimOffsets(FRotator* result, float DeltaTime, FRotator* RootRotOffset, float* RootYawSpeed, float MaxYawAimClamp, FVector* RootLocOffset) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAimOffsets", result, DeltaTime, RootRotOffset, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } - FRotator* GetAimOffsetsTransform(FRotator* result, float DeltaTime, FTransform* RootRotOffsetTransform, float* RootYawSpeed, float MaxYawAimClamp, FVector* RootLocOffset) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAimOffsetsTransform", result, DeltaTime, RootRotOffsetTransform, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } - bool ModifyInputAcceleration(FVector* InputAcceleration) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ModifyInputAcceleration", InputAcceleration); } - float GetMaxSpeedModifier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetMaxSpeedModifier"); } - float GetSpeedModifier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetSpeedModifier"); } - float GetRotationRateModifier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetRotationRateModifier"); } - bool IsFleeing() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsFleeing"); } - void FaceRotation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FaceRotation"); } - void MoveForward(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "MoveForward", Val); } - void MoveRight(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "MoveRight", Val); } - void MoveUp(float Val) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "MoveUp", Val); } - void SetCurrentAttackIndex(char index) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetCurrentAttackIndex", index); } - char GetWiegthedAttack(float distance, float attackRangeOffset, AActor* OtherTarget) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetWiegthedAttack", distance, attackRangeOffset, OtherTarget); } - void FireProjectileLocal() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FireProjectileLocal"); } - void FireProjectile_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FireProjectile_Implementation"); } - void ServerToClientsPlayAttackAnimation_Implementation(char AttackinfoIndex, char AnimationIndex, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer, AActor* MyTarget) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerToClientsPlayAttackAnimation_Implementation", AttackinfoIndex, AnimationIndex, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer, MyTarget); } - void ServerRequestToggleFlight_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerRequestToggleFlight_Implementation"); } - void CalcCapsuleHalfHeight() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "CalcCapsuleHalfHeight"); } - void ClientStartLanding_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClientStartLanding_Implementation"); } - void StartLanding() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StartLanding"); } - void ServerInterruptLanding_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerInterruptLanding_Implementation"); } - void InterruptLanding() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "InterruptLanding"); } - void ClientInterruptLanding_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClientInterruptLanding_Implementation"); } - void ServerFinishedLanding_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerFinishedLanding_Implementation"); } - void FinishedLanding() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FinishedLanding"); } - void ClientShouldNotifyLanded_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClientShouldNotifyLanded_Implementation"); } - FVector* GetLandingLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetLandingLocation", result); } - void SetFlight(bool bFly, bool bCancelForceLand) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetFlight", bFly, bCancelForceLand); } - void KeepFlightTimer() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "KeepFlightTimer"); } - void DidLand() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DidLand"); } - void AddFlyerTakeOffImpulse() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddFlyerTakeOffImpulse"); } - void OnStartJump() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnStartJump"); } - void ServerRequestWaterSurfaceJump_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerRequestWaterSurfaceJump_Implementation"); } - bool IsUpdatingComponentTransforms(USceneComponent* InSceneComponent) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsUpdatingComponentTransforms", InSceneComponent); } - bool UseLowQualityMovementTick() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "UseLowQualityMovementTick"); } - bool UseLowQualityAnimationTick() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "UseLowQualityAnimationTick"); } - bool UseLowQualityBehaviorTreeTick() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "UseLowQualityBehaviorTreeTick"); } - bool CanTame(AShooterPlayerController* ForPC, bool bIgnoreMaxTamedDinos) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanTame", ForPC, bIgnoreMaxTamedDinos); } - void SetupTamed(bool bWasJustTamed) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetupTamed", bWasJustTamed); } - void TameDino(AShooterPlayerController* ForPC) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "TameDino", ForPC); } - void SetCharacterStatusTameable(bool bSetTameable, bool bCreateInventory, bool keepInventoryForWakingTame) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetCharacterStatusTameable", bSetTameable, bCreateInventory, keepInventoryForWakingTame); } - void OnPrimalCharacterUnsleeped() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnPrimalCharacterUnsleeped"); } - bool IsValidForStatusUpdate() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsValidForStatusUpdate"); } - AActor* GetOtherActorToIgnore() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetOtherActorToIgnore"); } - long double GetForceClaimTime() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetForceClaimTime"); } - void UnclaimDino(bool bDestroyAI) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UnclaimDino", bDestroyAI); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "TryMultiUse", ForPC, UseIndex); } - void ClientMultiUse(APlayerController* ForPC, int UseIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClientMultiUse", ForPC, UseIndex); } - void ChangeActorTeam(int NewTeam) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ChangeActorTeam", NewTeam); } - bool AllowNewEggAtLocation(FVector* AtLocation) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowNewEggAtLocation", AtLocation); } - void SpawnEgg() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SpawnEgg"); } - float GetRunningSpeedModifier(bool bIsForDefaultSpeed) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetRunningSpeedModifier", bIsForDefaultSpeed); } - void BeginPlay() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "BeginPlay"); } - void ForceRefreshTransform() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ForceRefreshTransform"); } - void AutoTame() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AutoTame"); } - void SetupColorization() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetupColorization"); } - void RefreshColorization() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RefreshColorization"); } - //bool CanTarget(ITargetableInterface * Victim) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanTarget", Victim); } - int GetOriginalTargetingTeam() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetOriginalTargetingTeam"); } - //float GetTargetingDesirability(ITargetableInterface * Attacker) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetTargetingDesirability", Attacker); } - bool ShouldReplicateRotPitch() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ShouldReplicateRotPitch"); } - void NetUpdateDinoNameStrings_Implementation(FString* NewTamerString, FString* NewTamedName) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NetUpdateDinoNameStrings_Implementation", NewTamerString, NewTamedName); } - void ProcessEditText(AShooterPlayerController* ForPC, FString* TextToUse, bool checkedBox) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ProcessEditText", ForPC, TextToUse, checkedBox); } - static APrimalDinoCharacter* FindDinoWithID(UWorld* aWorld, unsigned int DinoID1, unsigned int DinoID2) { return NativeCall(nullptr, "APrimalDinoCharacter", "FindDinoWithID", aWorld, DinoID1, DinoID2); } - void TargetingTeamChanged() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "TargetingTeamChanged"); } - void Destroyed() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "Destroyed"); } - bool IsNearFeed(AShooterPlayerState* ForPlayer) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsNearFeed", ForPlayer); } - void DeathHarvestingFadeOut_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DeathHarvestingFadeOut_Implementation"); } - void NotifyItemAdded(UPrimalItem* anItem, bool bEquipItem) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NotifyItemAdded", anItem, bEquipItem); } - FString* GetDinoDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetDinoDescriptiveName", result); } - void ServerGiveDefaultWeapon_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerGiveDefaultWeapon_Implementation"); } - void ServerCallFollow_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallFollow_Implementation"); } - void ServerCallFollowOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallFollowOne_Implementation", ForDinoChar); } - void ServerCallStay_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallStay_Implementation"); } - void ServerCallStayOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallStayOne_Implementation", ForDinoChar); } - void ServerCallFollowDistanceCycleOne_Implementation(APrimalDinoCharacter* ForDinoChar) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallFollowDistanceCycleOne_Implementation", ForDinoChar); } - void ServerCallAggressive_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallAggressive_Implementation"); } - void ServerCallSetAggressive_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallSetAggressive_Implementation"); } - void ServerCallNeutral_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallNeutral_Implementation"); } - void ServerCallPassive_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallPassive_Implementation"); } - void ServerCallAttackTarget_Implementation(AActor* TheTarget) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallAttackTarget_Implementation", TheTarget); } - void ServerCallMoveTo_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerCallMoveTo_Implementation"); } - void NotifyItemRemoved(UPrimalItem* anItem) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NotifyItemRemoved", anItem); } - float GetCorpseLifespan() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetCorpseLifespan"); } - void UpdateMateBoost() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateMateBoost"); } - void AdjustDamage(float* Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - void SpawnDefaultController() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SpawnDefaultController"); } - bool AllowFallDamage() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowFallDamage"); } - void ApplyDamageMomentum(float DamageTaken, FDamageEvent* DamageEvent, APawn* PawnInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } - void UpdateIK() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateIK"); } - bool IKFootTrace() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IKFootTrace"); } - void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetSleeping", bSleeping, bUseRagdollLocationOffset); } - bool Die(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "Die", KillingDamage, DamageEvent, Killer, DamageCauser); } - bool AllowPenetrationCheck(AActor* OtherActor) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowPenetrationCheck", OtherActor); } - void LoadedFromSaveGame() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "LoadedFromSaveGame"); } - float GetCorpseTargetingMultiplier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetCorpseTargetingMultiplier"); } - void UpdateStatusComponent(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateStatusComponent", DeltaSeconds); } - void TamedDinoUnstasisConsumeFood() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "TamedDinoUnstasisConsumeFood"); } - AActor* GetTamedFollowTarget() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetTamedFollowTarget"); } - void DinoKillerTransferItemsToInventory(UPrimalInventoryComponent* FromInventory) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DinoKillerTransferItemsToInventory", FromInventory); } - bool UsePlayerControlCollisionIK() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "UsePlayerControlCollisionIK"); } - bool AllowWalkableSlopeOverride() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowWalkableSlopeOverride"); } - float GetCarryingSocketYaw(bool RefreshBones) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetCarryingSocketYaw", RefreshBones); } - void GetRidingCarryingIgnoreList(TArray* IgnoreList) { NativeCall *>((DWORD64)this, "APrimalDinoCharacter", "GetRidingCarryingIgnoreList", IgnoreList); } - void SetCarryingDino(APrimalDinoCharacter* aDino) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetCarryingDino", aDino); } - void ClearCarryingDino(bool bFromDino) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClearCarryingDino", bFromDino); } - void UpdateCarriedLocationAndRotation(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateCarriedLocationAndRotation", DeltaSeconds); } - bool CanBeCarried() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanBeCarried"); } - void SetMountCharacter(APrimalCharacter* aCharacter) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetMountCharacter", aCharacter); } - void StartForceSkelUpdate(float ForTime, bool bForceUpdateMesh, bool bServerOnly) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StartForceSkelUpdate", ForTime, bForceUpdateMesh, bServerOnly); } - void ClearMountCharacter(bool bFromMountCharacter) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ClearMountCharacter", bFromMountCharacter); } - bool CanMount(APrimalCharacter* aCharacter) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanMount", aCharacter); } - APrimalDinoCharacter* SpawnDino() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "SpawnDino"); } - void InitDownloadedTamedDino(AShooterPlayerController* TamerController) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "InitDownloadedTamedDino", TamerController); } - void NetUpdateDinoOwnerData_Implementation(FString* NewOwningPlayerName, int NewOwningPlayerID) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NetUpdateDinoOwnerData_Implementation", NewOwningPlayerName, NewOwningPlayerID); } - bool RemoveInventoryAllowViewing(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemoveInventoryAllowViewing", ForPC); } - bool ForceAllowBackwardsMovement() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ForceAllowBackwardsMovement"); } - bool CanDragCharacter(APrimalCharacter* Character) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CanDragCharacter", Character); } - bool IsTaming() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsTaming"); } - void UpdateWakingTame(float DeltaTime) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateWakingTame", DeltaTime); } - void FedWakingTameDino_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FedWakingTameDino_Implementation"); } - void AddStructure() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddStructure"); } - void RemoveStructure(APrimalStructure* Structure) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemoveStructure", Structure); } - void OnRep_Saddle() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnRep_Saddle"); } - void ServerUploadCharacter(AShooterPlayerController* UploadedBy) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerUploadCharacter", UploadedBy); } - void EmitPoop() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "EmitPoop"); } - void CheckForWildAmbientHarvesting() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "CheckForWildAmbientHarvesting"); } - void OverrideRandomWanderLocation_Implementation(FVector* originalDestination, FVector* inVec) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OverrideRandomWanderLocation_Implementation", originalDestination, inVec); } - //bool AllowEquippingItemType(EPrimalEquipmentType::Type equipmentType) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowEquippingItemType", equipmentType); } - void OnPressReload() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnPressReload"); } - void OnPressCrouch() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnPressCrouch"); } - void NotifyBumpedPawn(APawn* BumpedPawn) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NotifyBumpedPawn", BumpedPawn); } - void NotifyBumpedStructure(AActor* BumpedStructure) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NotifyBumpedStructure", BumpedStructure); } - void StartRepair() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StartRepair"); } - void RepairCheckTimer() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RepairCheckTimer"); } - bool InitializeForReplicatedBasing() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "InitializeForReplicatedBasing"); } - void RemoveBasedPawn(AActor* anPawn) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemoveBasedPawn", anPawn); } - bool AllowMovementMode(EMovementMode NewMovementMode, char NewCustomMode) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowMovementMode", NewMovementMode, NewCustomMode); } - void OnRep_bBonesHidden() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OnRep_bBonesHidden"); } - void SetBabyAge(float TheAge) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "SetBabyAge", TheAge); } - void ApplyBoneModifiers(bool bForce) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ApplyBoneModifiers", bForce); } - void ApplyGestationBoneModifiers() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ApplyGestationBoneModifiers"); } - float GetAttachedSoundPitchMultiplier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAttachedSoundPitchMultiplier"); } - float GetAttachedSoundVolumeMultiplier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAttachedSoundVolumeMultiplier"); } - void Poop() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "Poop"); } - float GetBaseDragWeight() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetBaseDragWeight"); } - void ServerUpdateBabyAge() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerUpdateBabyAge"); } - void ServerUpdateGestation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerUpdateGestation"); } - float GetHealthPercentage() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetHealthPercentage"); } - void UpdateMating() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateMating"); } - void DoMate(APrimalDinoCharacter* WithMate) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DoMate", WithMate); } - //ADroppedItem * CreateCloneFertilizedEgg() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "CreateCloneFertilizedEgg"); } - FVector* GetInterpolatedLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetInterpolatedLocation", result); } - APrimalDinoCharacter* BPStaticCreateBabyDinoNoAncestors() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BPStaticCreateBabyDinoNoAncestors"); } - APrimalDinoCharacter* BPStaticCreateBabyDino() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BPStaticCreateBabyDino"); } - //APrimalDinoCharacter * StaticCreateBabyDino(UWorld * theWorld TSubclassOf EggDinoClassToSpawn, FVector * theGroundLoc, float actorRotationYaw, char * EggColorSetIndices, char * EggNumberOfLevelUpPointsApplied, float EggTamedIneffectivenessModifier, int NotifyTeamOverride, TArray * EggDinoAncestors, TArray * EggDinoAncestorsMale, int EggRandomMutationsFemale, int EggRandomMutationsMale) { return NativeCall, FVector *, float, char *, char *, float, int, TArray *, TArray *, int, int>((DWORD64)this, "APrimalDinoCharacter", "StaticCreateBabyDino", theWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, NotifyTeamOverride, EggDinoAncestors, EggDinoAncestorsMale, EggRandomMutationsFemale, EggRandomMutationsMale); } - void UpdateGang() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateGang"); } - float GetGravityZScale() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetGravityZScale"); } - bool ForceAllowAccelerationRotationWhenFalling() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ForceAllowAccelerationRotationWhenFalling"); } - bool ShouldDisableControllerDesiredRotation() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ShouldDisableControllerDesiredRotation"); } - bool AllowExtendedCraftingFunctionality() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowExtendedCraftingFunctionality"); } - void UpdateTribeGroupRanks_Implementation(char NewTribeGroupPetOrderingRank, char NewTribeGroupPetRidingRank) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateTribeGroupRanks_Implementation", NewTribeGroupPetOrderingRank, NewTribeGroupPetRidingRank); } - FVector* GetFloatingHUDLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetFloatingHUDLocation", result); } - void WasPushed(ACharacter* ByOtherCharacter) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "WasPushed", ByOtherCharacter); } - void UpdateImprintingDetails_Implementation(FString* NewImprinterName, unsigned __int64 NewImprinterPlayerDataID) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateImprintingDetails_Implementation", NewImprinterName, NewImprinterPlayerDataID); } - void UpdateImprintingQuality_Implementation(float NewImprintingQuality) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateImprintingQuality_Implementation", NewImprintingQuality); } - void IncrementImprintingQuality() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "IncrementImprintingQuality"); } - void AddedImprintingQuality_Implementation(float Amount) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddedImprintingQuality_Implementation", Amount); } - bool AllowWakingTame_Implementation(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowWakingTame_Implementation", ForPC); } - //float GetBaseTargetingDesire(ITargetableInterface * Attacker) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetBaseTargetingDesire", Attacker); } - void PostNetReceiveLocationAndRotation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "PostNetReceiveLocationAndRotation"); } - void ResetTakingOff() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ResetTakingOff"); } - void RemoveFromMeleeSwingHurtList(AActor* AnActor) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemoveFromMeleeSwingHurtList", AnActor); } - void FireMultipleProjectiles_Implementation(TArray* Locations, TArray* Directions, bool bScaleProjectileDamageByDinoDamage) { NativeCall *, TArray *, bool>((DWORD64)this, "APrimalDinoCharacter", "FireMultipleProjectiles_Implementation", Locations, Directions, bScaleProjectileDamageByDinoDamage); } - void CycleAttackWeightsForAttackAtIndex(int attackIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "CycleAttackWeightsForAttackAtIndex", attackIndex); } - void AddDinoReferenceInLatchingStructure(APrimalStructure* Structure) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "AddDinoReferenceInLatchingStructure", Structure); } - void RemoveDinoReferenceFromLatchingStructure() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RemoveDinoReferenceFromLatchingStructure"); } - void StartSurfaceCameraForPassengers(float yaw, float pitch, float roll) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "StartSurfaceCameraForPassengers", yaw, pitch, roll); } - TArray* GetPassengers(TArray* result) { return NativeCall *, TArray *>((DWORD64)this, "APrimalDinoCharacter", "GetPassengers", result); } - bool ShouldIgnoreMoveCombiningOverlap() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "ShouldIgnoreMoveCombiningOverlap"); } - bool AllowMountedWeaponry(bool bIgnoreCurrentWeapon, bool bWeaponForcesMountedWeaponry) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowMountedWeaponry", bIgnoreCurrentWeapon, bWeaponForcesMountedWeaponry); } - void ModifyDesiredRotation(FRotator* InDesiredRotation) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ModifyDesiredRotation", InDesiredRotation); } - void GiveDeathDossier() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "GiveDeathDossier"); } - void ServerSetRiderMountedWeaponRotation_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerSetRiderMountedWeaponRotation_Implementation"); } - void DoNeuter_Implementation() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "DoNeuter_Implementation"); } - bool OverrideForcePreventExitingWater() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "OverrideForcePreventExitingWater"); } - //APrimalStructureExplosive * GetAttachedExplosive() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetAttachedExplosive"); } - float GetXPMultiplier() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "GetXPMultiplier"); } - bool UseHighQualityMovement() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "UseHighQualityMovement"); } - bool AllowPushOthers() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowPushOthers"); } - bool IsVehicle() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "IsVehicle"); } - bool AllowWakingTame(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "AllowWakingTame", ForPC); } - float BlueprintGetAttackWeight(int AttackIndex, float inputWeight, float distance, float attackRangeOffset, AActor* OtherTarget) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BlueprintGetAttackWeight", AttackIndex, inputWeight, distance, attackRangeOffset, OtherTarget); } - bool BlueprintOverrideWantsToRun(bool bInputWantsToRun) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BlueprintOverrideWantsToRun", bInputWantsToRun); } - void BlueprintPlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "BlueprintPlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - bool BPCanTargetCorpse() { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BPCanTargetCorpse"); } - void BPDoHarvestAttack(int harvestIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "BPDoHarvestAttack", harvestIndex); } - bool BPHandleUseButtonPress(AShooterPlayerController* RiderController) { return NativeCall((DWORD64)this, "APrimalDinoCharacter", "BPHandleUseButtonPress", RiderController); } - void BPModifyHarvestingWeightsArray(TArray* resourceWeightsIn, TArray* resourceItems, TArray* resourceWeightsOut) { NativeCall *, TArray *, TArray *>((DWORD64)this, "APrimalDinoCharacter", "BPModifyHarvestingWeightsArray", resourceWeightsIn, resourceItems, resourceWeightsOut); } - void FireProjectile() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "FireProjectile"); } - void InterruptLatching() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "InterruptLatching"); } - void NetUpdateDinoNameStrings(FString* NewTamerString, FString* NewTamedName) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NetUpdateDinoNameStrings", NewTamerString, NewTamedName); } - void NetUpdateDinoOwnerData(FString* NewOwningPlayerName, int NewOwningPlayerID) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "NetUpdateDinoOwnerData", NewOwningPlayerName, NewOwningPlayerID); } - void OverrideRandomWanderLocation(FVector* originalDestination, FVector* inVec) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "OverrideRandomWanderLocation", originalDestination, inVec); } - void RidingTick() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "RidingTick"); } - void ServerClearRider() { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerClearRider"); } - void ServerRequestAttack(int attackIndex) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "ServerRequestAttack", attackIndex); } - void UpdateBabyCuddling(long double NewBabyNextCuddleTime, char NewBabyCuddleType, UClass* NewBabyCuddleFood) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateBabyCuddling", NewBabyNextCuddleTime, NewBabyCuddleType, NewBabyCuddleFood); } - void UpdateImprintingDetails(FString* NewImprinterName, unsigned __int64 NewImprinterPlayerDataID) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateImprintingDetails", NewImprinterName, NewImprinterPlayerDataID); } - void UpdateImprintingQuality(float NewImprintingQuality) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateImprintingQuality", NewImprintingQuality); } - void UpdateTribeGroupRanks(char NewTribeGroupPetOrderingRank, char NewTribeGroupPetRidingRank) { NativeCall((DWORD64)this, "APrimalDinoCharacter", "UpdateTribeGroupRanks", NewTribeGroupPetOrderingRank, NewTribeGroupPetRidingRank); } -}; - -// Weapon - -struct AShooterWeapon : AActor -{ - float GetEquipTimeField() const { return GetNativeField(this, "AShooterWeapon", "EquipTime"); } - void SetEquipTimeField(float newValue) { SetNativeField(this, "AShooterWeapon", "EquipTime", newValue); } - float GetItemDurabilityToConsumePerMeleeHitField() const { return GetNativeField(this, "AShooterWeapon", "ItemDurabilityToConsumePerMeleeHit"); } - void SetItemDurabilityToConsumePerMeleeHitField(float newValue) { SetNativeField(this, "AShooterWeapon", "ItemDurabilityToConsumePerMeleeHit", newValue); } - float GetAmmoIconsCountField() const { return GetNativeField(this, "AShooterWeapon", "AmmoIconsCount"); } - void SetAmmoIconsCountField(float newValue) { SetNativeField(this, "AShooterWeapon", "AmmoIconsCount", newValue); } - int GetPrimaryClipIconOffsetField() const { return GetNativeField(this, "AShooterWeapon", "PrimaryClipIconOffset"); } - void SetPrimaryClipIconOffsetField(int newValue) { SetNativeField(this, "AShooterWeapon", "PrimaryClipIconOffset", newValue); } - int GetSecondaryClipIconOffsetField() const { return GetNativeField(this, "AShooterWeapon", "SecondaryClipIconOffset"); } - void SetSecondaryClipIconOffsetField(int newValue) { SetNativeField(this, "AShooterWeapon", "SecondaryClipIconOffset", newValue); } - FVector2D GetTargetingInfoTooltipPaddingField() const { return GetNativeField(this, "AShooterWeapon", "TargetingInfoTooltipPadding"); } - void SetTargetingInfoTooltipPaddingField(FVector2D newValue) { SetNativeField(this, "AShooterWeapon", "TargetingInfoTooltipPadding", newValue); } - FVector2D GetTargetingInfoTooltipScaleField() const { return GetNativeField(this, "AShooterWeapon", "TargetingInfoTooltipScale"); } - void SetTargetingInfoTooltipScaleField(FVector2D newValue) { SetNativeField(this, "AShooterWeapon", "TargetingInfoTooltipScale", newValue); } - bool GetbDisableShooterOnElectricStormField() const { return GetNativeField(this, "AShooterWeapon", "bDisableShooterOnElectricStorm"); } - void SetbDisableShooterOnElectricStormField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bDisableShooterOnElectricStorm", newValue); } - FName GetOverrideAttachPointField() const { return GetNativeField(this, "AShooterWeapon", "OverrideAttachPoint"); } - void SetOverrideAttachPointField(FName newValue) { SetNativeField(this, "AShooterWeapon", "OverrideAttachPoint", newValue); } - FVector GetFPVRelativeLocationField() const { return GetNativeField(this, "AShooterWeapon", "FPVRelativeLocation"); } - void SetFPVRelativeLocationField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "FPVRelativeLocation", newValue); } - FRotator GetFPVRelativeRotationField() const { return GetNativeField(this, "AShooterWeapon", "FPVRelativeRotation"); } - void SetFPVRelativeRotationField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVRelativeRotation", newValue); } - FVector GetFPVRelativeLocation_TargetingField() const { return GetNativeField(this, "AShooterWeapon", "FPVRelativeLocation_Targeting"); } - void SetFPVRelativeLocation_TargetingField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "FPVRelativeLocation_Targeting", newValue); } - FRotator GetFPVRelativeRotation_TargetingField() const { return GetNativeField(this, "AShooterWeapon", "FPVRelativeRotation_Targeting"); } - void SetFPVRelativeRotation_TargetingField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVRelativeRotation_Targeting", newValue); } - float GetFPVEnterTargetingInterpSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVEnterTargetingInterpSpeed"); } - void SetFPVEnterTargetingInterpSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVEnterTargetingInterpSpeed", newValue); } - float GetFPVExitTargetingInterpSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVExitTargetingInterpSpeed"); } - void SetFPVExitTargetingInterpSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVExitTargetingInterpSpeed", newValue); } - FRotator GetFPVLookAtMaximumOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtMaximumOffset"); } - void SetFPVLookAtMaximumOffsetField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtMaximumOffset", newValue); } - FRotator GetFPVLookAtSpeedBaseField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtSpeedBase"); } - void SetFPVLookAtSpeedBaseField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtSpeedBase", newValue); } - FRotator GetFPVLookAtInterpSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtInterpSpeed"); } - void SetFPVLookAtInterpSpeedField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtInterpSpeed", newValue); } - FRotator GetFPVLookAtMaximumOffset_TargetingField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtMaximumOffset_Targeting"); } - void SetFPVLookAtMaximumOffset_TargetingField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtMaximumOffset_Targeting", newValue); } - FRotator GetFPVLookAtSpeedBase_TargetingField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtSpeedBase_Targeting"); } - void SetFPVLookAtSpeedBase_TargetingField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtSpeedBase_Targeting", newValue); } - FRotator GetFPVLookAtInterpSpeed_TargetingField() const { return GetNativeField(this, "AShooterWeapon", "FPVLookAtInterpSpeed_Targeting"); } - void SetFPVLookAtInterpSpeed_TargetingField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLookAtInterpSpeed_Targeting", newValue); } - bool GetbUseBlueprintAnimNotificationsField() const { return GetNativeField(this, "AShooterWeapon", "bUseBlueprintAnimNotifications"); } - void SetbUseBlueprintAnimNotificationsField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bUseBlueprintAnimNotifications", newValue); } - TArray GetMeleeSwingSocketsField() const { return GetNativeField>(this, "AShooterWeapon", "MeleeSwingSockets"); } - void SetMeleeSwingSocketsField(TArray newValue) { SetNativeField(this, "AShooterWeapon", "MeleeSwingSockets", newValue); } - float GetAllowMeleeTimeBeforeAnimationEndField() const { return GetNativeField(this, "AShooterWeapon", "AllowMeleeTimeBeforeAnimationEnd"); } - void SetAllowMeleeTimeBeforeAnimationEndField(float newValue) { SetNativeField(this, "AShooterWeapon", "AllowMeleeTimeBeforeAnimationEnd", newValue); } - UPrimalItem* GetAssociatedPrimalItemField() const { return GetNativeField(this, "AShooterWeapon", "AssociatedPrimalItem"); } - void SetAssociatedPrimalItemField(UPrimalItem* newValue) { SetNativeField(this, "AShooterWeapon", "AssociatedPrimalItem", newValue); } - bool GetbCanBeUsedAsEquipmentField() const { return GetNativeField(this, "AShooterWeapon", "bCanBeUsedAsEquipment"); } - void SetbCanBeUsedAsEquipmentField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bCanBeUsedAsEquipment", newValue); } - FItemNetInfo GetAssociatedItemNetInfoField() const { return GetNativeField(this, "AShooterWeapon", "AssociatedItemNetInfo"); } - void SetAssociatedItemNetInfoField(FItemNetInfo newValue) { SetNativeField(this, "AShooterWeapon", "AssociatedItemNetInfo", newValue); } - //FWeaponData GetWeaponConfigField() const { return GetNativeField(this, "AShooterWeapon", "WeaponConfig"); } - TSubclassOf GetWeaponAmmoItemTemplateField() const { return GetNativeField>(this, "AShooterWeapon", "WeaponAmmoItemTemplate"); } - void SetWeaponAmmoItemTemplateField(TSubclassOf newValue) { SetNativeField(this, "AShooterWeapon", "WeaponAmmoItemTemplate", newValue); } - long double GetNextAllowedMeleeTimeField() const { return GetNativeField(this, "AShooterWeapon", "NextAllowedMeleeTime"); } - void SetNextAllowedMeleeTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "NextAllowedMeleeTime", newValue); } - TArray GetLastSocketPositionsField() const { return GetNativeField>(this, "AShooterWeapon", "LastSocketPositions"); } - void SetLastSocketPositionsField(TArray newValue) { SetNativeField(this, "AShooterWeapon", "LastSocketPositions", newValue); } - TArray> GetMeleeSwingHurtListField() const { return GetNativeField>>(this, "AShooterWeapon", "MeleeSwingHurtList"); } - long double GetLastFPVRenderTimeField() const { return GetNativeField(this, "AShooterWeapon", "LastFPVRenderTime"); } - void SetLastFPVRenderTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "LastFPVRenderTime", newValue); } - FRotator GetLastCameraRotationField() const { return GetNativeField(this, "AShooterWeapon", "LastCameraRotation"); } - void SetLastCameraRotationField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "LastCameraRotation", newValue); } - FRotator GetFPVAdditionalLookRotOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVAdditionalLookRotOffset"); } - void SetFPVAdditionalLookRotOffsetField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVAdditionalLookRotOffset", newValue); } - FVector GetFPVLastLocOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVLastLocOffset"); } - void SetFPVLastLocOffsetField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "FPVLastLocOffset", newValue); } - FVector GetFPVLastVROffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVLastVROffset"); } - void SetFPVLastVROffsetField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "FPVLastVROffset", newValue); } - FVector GetFPVRelativeLocationOffscreenOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVRelativeLocationOffscreenOffset"); } - void SetFPVRelativeLocationOffscreenOffsetField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "FPVRelativeLocationOffscreenOffset", newValue); } - FRotator GetFPVLastRotOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVLastRotOffset"); } - void SetFPVLastRotOffsetField(FRotator newValue) { SetNativeField(this, "AShooterWeapon", "FPVLastRotOffset", newValue); } - AShooterCharacter* GetMyPawnField() const { return GetNativeField(this, "AShooterWeapon", "MyPawn"); } - void SetMyPawnField(AShooterCharacter* newValue) { SetNativeField(this, "AShooterWeapon", "MyPawn", newValue); } - FName GetMuzzleAttachPointField() const { return GetNativeField(this, "AShooterWeapon", "MuzzleAttachPoint"); } - void SetMuzzleAttachPointField(FName newValue) { SetNativeField(this, "AShooterWeapon", "MuzzleAttachPoint", newValue); } - int GetMeleeDamageAmountField() const { return GetNativeField(this, "AShooterWeapon", "MeleeDamageAmount"); } - void SetMeleeDamageAmountField(int newValue) { SetNativeField(this, "AShooterWeapon", "MeleeDamageAmount", newValue); } - float GetTheMeleeSwingRadiusField() const { return GetNativeField(this, "AShooterWeapon", "TheMeleeSwingRadius"); } - void SetTheMeleeSwingRadiusField(float newValue) { SetNativeField(this, "AShooterWeapon", "TheMeleeSwingRadius", newValue); } - float GetMeleeDamageImpulseField() const { return GetNativeField(this, "AShooterWeapon", "MeleeDamageImpulse"); } - void SetMeleeDamageImpulseField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeDamageImpulse", newValue); } - float GetFPVMoveOffscreenWhenTurningMaxMoveWeaponSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxMoveWeaponSpeed"); } - void SetFPVMoveOffscreenWhenTurningMaxMoveWeaponSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxMoveWeaponSpeed", newValue); } - float GetFPVMoveOffscreenWhenTurningMinMoveWeaponSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMinMoveWeaponSpeed"); } - void SetFPVMoveOffscreenWhenTurningMinMoveWeaponSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMinMoveWeaponSpeed", newValue); } - float GetFPVMoveOffscreenWhenTurningMinViewRotSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMinViewRotSpeed"); } - void SetFPVMoveOffscreenWhenTurningMinViewRotSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMinViewRotSpeed", newValue); } - float GetFPVMoveOffscreenWhenTurningMaxViewRotSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxViewRotSpeed"); } - void SetFPVMoveOffscreenWhenTurningMaxViewRotSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxViewRotSpeed", newValue); } - float GetFPVMoveOffscreenIdleRestoreIntervalField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenIdleRestoreInterval"); } - void SetFPVMoveOffscreenIdleRestoreIntervalField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenIdleRestoreInterval", newValue); } - float GetFPVMoveOffscreenIdleRestoreSpeedField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenIdleRestoreSpeed"); } - void SetFPVMoveOffscreenIdleRestoreSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenIdleRestoreSpeed", newValue); } - float GetFPVMoveOffscreenWhenTurningMaxOffsetField() const { return GetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxOffset"); } - void SetFPVMoveOffscreenWhenTurningMaxOffsetField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMoveOffscreenWhenTurningMaxOffset", newValue); } - long double GetFPVStoppedTurningTimeField() const { return GetNativeField(this, "AShooterWeapon", "FPVStoppedTurningTime"); } - void SetFPVStoppedTurningTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "FPVStoppedTurningTime", newValue); } - //EWeaponState::Type GetCurrentStateField() const { return GetNativeField(this, "AShooterWeapon", "CurrentState"); } - long double GetLastFireTimeField() const { return GetNativeField(this, "AShooterWeapon", "LastFireTime"); } - void SetLastFireTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "LastFireTime", newValue); } - int GetCurrentAmmoField() const { return GetNativeField(this, "AShooterWeapon", "CurrentAmmo"); } - void SetCurrentAmmoField(int newValue) { SetNativeField(this, "AShooterWeapon", "CurrentAmmo", newValue); } - int GetCurrentAmmoInClipField() const { return GetNativeField(this, "AShooterWeapon", "CurrentAmmoInClip"); } - void SetCurrentAmmoInClipField(int newValue) { SetNativeField(this, "AShooterWeapon", "CurrentAmmoInClip", newValue); } - bool GetbReplicateCurrentAmmoInClipToNonOwnersField() const { return GetNativeField(this, "AShooterWeapon", "bReplicateCurrentAmmoInClipToNonOwners"); } - void SetbReplicateCurrentAmmoInClipToNonOwnersField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bReplicateCurrentAmmoInClipToNonOwners", newValue); } - FName GetFPVAccessoryToggleComponentField() const { return GetNativeField(this, "AShooterWeapon", "FPVAccessoryToggleComponent"); } - void SetFPVAccessoryToggleComponentField(FName newValue) { SetNativeField(this, "AShooterWeapon", "FPVAccessoryToggleComponent", newValue); } - FName GetTPVAccessoryToggleComponentField() const { return GetNativeField(this, "AShooterWeapon", "TPVAccessoryToggleComponent"); } - void SetTPVAccessoryToggleComponentField(FName newValue) { SetNativeField(this, "AShooterWeapon", "TPVAccessoryToggleComponent", newValue); } - float GetTimeToAutoReloadField() const { return GetNativeField(this, "AShooterWeapon", "TimeToAutoReload"); } - void SetTimeToAutoReloadField(float newValue) { SetNativeField(this, "AShooterWeapon", "TimeToAutoReload", newValue); } - int GetFiredLastNoAmmoShotField() const { return GetNativeField(this, "AShooterWeapon", "FiredLastNoAmmoShot"); } - void SetFiredLastNoAmmoShotField(int newValue) { SetNativeField(this, "AShooterWeapon", "FiredLastNoAmmoShot", newValue); } - long double GetLastNotifyShotTimeField() const { return GetNativeField(this, "AShooterWeapon", "LastNotifyShotTime"); } - void SetLastNotifyShotTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "LastNotifyShotTime", newValue); } - TSubclassOf GetMeleeDamageTypeField() const { return GetNativeField>(this, "AShooterWeapon", "MeleeDamageType"); } - void SetMeleeDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "AShooterWeapon", "MeleeDamageType", newValue); } - FVector GetVRTargetingModelOffsetField() const { return GetNativeField(this, "AShooterWeapon", "VRTargetingModelOffset"); } - void SetVRTargetingModelOffsetField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "VRTargetingModelOffset", newValue); } - FVector GetVRTargetingAimOriginOffsetField() const { return GetNativeField(this, "AShooterWeapon", "VRTargetingAimOriginOffset"); } - void SetVRTargetingAimOriginOffsetField(FVector newValue) { SetNativeField(this, "AShooterWeapon", "VRTargetingAimOriginOffset", newValue); } - float GetScopeCrosshairSizeField() const { return GetNativeField(this, "AShooterWeapon", "ScopeCrosshairSize"); } - void SetScopeCrosshairSizeField(float newValue) { SetNativeField(this, "AShooterWeapon", "ScopeCrosshairSize", newValue); } - FName GetScopeCrosshairColorParameterField() const { return GetNativeField(this, "AShooterWeapon", "ScopeCrosshairColorParameter"); } - void SetScopeCrosshairColorParameterField(FName newValue) { SetNativeField(this, "AShooterWeapon", "ScopeCrosshairColorParameter", newValue); } - float GetMinItemDurabilityPercentageForShotField() const { return GetNativeField(this, "AShooterWeapon", "MinItemDurabilityPercentageForShot"); } - void SetMinItemDurabilityPercentageForShotField(float newValue) { SetNativeField(this, "AShooterWeapon", "MinItemDurabilityPercentageForShot", newValue); } - float GetOverrideTargetingFOVField() const { return GetNativeField(this, "AShooterWeapon", "OverrideTargetingFOV"); } - void SetOverrideTargetingFOVField(float newValue) { SetNativeField(this, "AShooterWeapon", "OverrideTargetingFOV", newValue); } - float GetTargetingDelayTimeField() const { return GetNativeField(this, "AShooterWeapon", "TargetingDelayTime"); } - void SetTargetingDelayTimeField(float newValue) { SetNativeField(this, "AShooterWeapon", "TargetingDelayTime", newValue); } - float GetTargetingFOVInterpSpeedField() const { return GetNativeField(this, "AShooterWeapon", "TargetingFOVInterpSpeed"); } - void SetTargetingFOVInterpSpeedField(float newValue) { SetNativeField(this, "AShooterWeapon", "TargetingFOVInterpSpeed", newValue); } - float GetAimDriftYawAngleField() const { return GetNativeField(this, "AShooterWeapon", "AimDriftYawAngle"); } - void SetAimDriftYawAngleField(float newValue) { SetNativeField(this, "AShooterWeapon", "AimDriftYawAngle", newValue); } - float GetAimDriftPitchAngleField() const { return GetNativeField(this, "AShooterWeapon", "AimDriftPitchAngle"); } - void SetAimDriftPitchAngleField(float newValue) { SetNativeField(this, "AShooterWeapon", "AimDriftPitchAngle", newValue); } - float GetAimDriftYawFrequencyField() const { return GetNativeField(this, "AShooterWeapon", "AimDriftYawFrequency"); } - void SetAimDriftYawFrequencyField(float newValue) { SetNativeField(this, "AShooterWeapon", "AimDriftYawFrequency", newValue); } - float GetAimDriftPitchFrequencyField() const { return GetNativeField(this, "AShooterWeapon", "AimDriftPitchFrequency"); } - void SetAimDriftPitchFrequencyField(float newValue) { SetNativeField(this, "AShooterWeapon", "AimDriftPitchFrequency", newValue); } - float GetMeleeHitRandomChanceToDestroyItemField() const { return GetNativeField(this, "AShooterWeapon", "MeleeHitRandomChanceToDestroyItem"); } - void SetMeleeHitRandomChanceToDestroyItemField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeHitRandomChanceToDestroyItem", newValue); } - float GetGlobalFireCameraShakeScaleField() const { return GetNativeField(this, "AShooterWeapon", "GlobalFireCameraShakeScale"); } - void SetGlobalFireCameraShakeScaleField(float newValue) { SetNativeField(this, "AShooterWeapon", "GlobalFireCameraShakeScale", newValue); } - float GetDurabilityCostToEquipField() const { return GetNativeField(this, "AShooterWeapon", "DurabilityCostToEquip"); } - void SetDurabilityCostToEquipField(float newValue) { SetNativeField(this, "AShooterWeapon", "DurabilityCostToEquip", newValue); } - float GetPassiveDurabilityCostPerIntervalField() const { return GetNativeField(this, "AShooterWeapon", "PassiveDurabilityCostPerInterval"); } - void SetPassiveDurabilityCostPerIntervalField(float newValue) { SetNativeField(this, "AShooterWeapon", "PassiveDurabilityCostPerInterval", newValue); } - float GetPassiveDurabilityCostIntervalField() const { return GetNativeField(this, "AShooterWeapon", "PassiveDurabilityCostInterval"); } - void SetPassiveDurabilityCostIntervalField(float newValue) { SetNativeField(this, "AShooterWeapon", "PassiveDurabilityCostInterval", newValue); } - float GetGlobalFireCameraShakeScaleTargetingField() const { return GetNativeField(this, "AShooterWeapon", "GlobalFireCameraShakeScaleTargeting"); } - void SetGlobalFireCameraShakeScaleTargetingField(float newValue) { SetNativeField(this, "AShooterWeapon", "GlobalFireCameraShakeScaleTargeting", newValue); } - float GetMeleeCameraShakeSpeedScaleField() const { return GetNativeField(this, "AShooterWeapon", "MeleeCameraShakeSpeedScale"); } - void SetMeleeCameraShakeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeCameraShakeSpeedScale", newValue); } - float GetReloadCameraShakeSpeedScaleField() const { return GetNativeField(this, "AShooterWeapon", "ReloadCameraShakeSpeedScale"); } - void SetReloadCameraShakeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterWeapon", "ReloadCameraShakeSpeedScale", newValue); } - float GetMeleeConsumesStaminaField() const { return GetNativeField(this, "AShooterWeapon", "MeleeConsumesStamina"); } - void SetMeleeConsumesStaminaField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeConsumesStamina", newValue); } - float GetHypoThermiaInsulationField() const { return GetNativeField(this, "AShooterWeapon", "HypoThermiaInsulation"); } - void SetHypoThermiaInsulationField(float newValue) { SetNativeField(this, "AShooterWeapon", "HypoThermiaInsulation", newValue); } - float GetHyperThermiaInsulationField() const { return GetNativeField(this, "AShooterWeapon", "HyperThermiaInsulation"); } - void SetHyperThermiaInsulationField(float newValue) { SetNativeField(this, "AShooterWeapon", "HyperThermiaInsulation", newValue); } - float GetInsulationRangeField() const { return GetNativeField(this, "AShooterWeapon", "InsulationRange"); } - void SetInsulationRangeField(float newValue) { SetNativeField(this, "AShooterWeapon", "InsulationRange", newValue); } - long double GetLastDurabilityConsumptionTimeField() const { return GetNativeField(this, "AShooterWeapon", "LastDurabilityConsumptionTime"); } - void SetLastDurabilityConsumptionTimeField(long double newValue) { SetNativeField(this, "AShooterWeapon", "LastDurabilityConsumptionTime", newValue); } - bool GetbLastMeleeHitField() const { return GetNativeField(this, "AShooterWeapon", "bLastMeleeHit"); } - void SetbLastMeleeHitField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bLastMeleeHit", newValue); } - bool GetbLastMeleeHitStationaryField() const { return GetNativeField(this, "AShooterWeapon", "bLastMeleeHitStationary"); } - void SetbLastMeleeHitStationaryField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bLastMeleeHitStationary", newValue); } - bool GetbClientAlreadyReloadedField() const { return GetNativeField(this, "AShooterWeapon", "bClientAlreadyReloaded"); } - void SetbClientAlreadyReloadedField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bClientAlreadyReloaded", newValue); } - float GetAutoReloadTimerField() const { return GetNativeField(this, "AShooterWeapon", "AutoReloadTimer"); } - void SetAutoReloadTimerField(float newValue) { SetNativeField(this, "AShooterWeapon", "AutoReloadTimer", newValue); } - bool GetbConsumedDurabilityForThisMeleeHitField() const { return GetNativeField(this, "AShooterWeapon", "bConsumedDurabilityForThisMeleeHit"); } - void SetbConsumedDurabilityForThisMeleeHitField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bConsumedDurabilityForThisMeleeHit", newValue); } - float GetFPVMeleeTraceFXRangeField() const { return GetNativeField(this, "AShooterWeapon", "FPVMeleeTraceFXRange"); } - void SetFPVMeleeTraceFXRangeField(float newValue) { SetNativeField(this, "AShooterWeapon", "FPVMeleeTraceFXRange", newValue); } - float GetMeleeAttackHarvetUsableComponentsRadiusField() const { return GetNativeField(this, "AShooterWeapon", "MeleeAttackHarvetUsableComponentsRadius"); } - void SetMeleeAttackHarvetUsableComponentsRadiusField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeAttackHarvetUsableComponentsRadius", newValue); } - float GetMeleeAttackUsableHarvestDamageMultiplierField() const { return GetNativeField(this, "AShooterWeapon", "MeleeAttackUsableHarvestDamageMultiplier"); } - void SetMeleeAttackUsableHarvestDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterWeapon", "MeleeAttackUsableHarvestDamageMultiplier", newValue); } - bool GetbPreventOpeningInventoryField() const { return GetNativeField(this, "AShooterWeapon", "bPreventOpeningInventory"); } - void SetbPreventOpeningInventoryField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bPreventOpeningInventory", newValue); } - bool GetbAllowUseOnSeatingStructureField() const { return GetNativeField(this, "AShooterWeapon", "bAllowUseOnSeatingStructure"); } - void SetbAllowUseOnSeatingStructureField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bAllowUseOnSeatingStructure", newValue); } - bool GetbOnlyUseOnSeatingStructureField() const { return GetNativeField(this, "AShooterWeapon", "bOnlyUseOnSeatingStructure"); } - void SetbOnlyUseOnSeatingStructureField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bOnlyUseOnSeatingStructure", newValue); } - bool GetbBPDoClientCheckCanFireField() const { return GetNativeField(this, "AShooterWeapon", "bBPDoClientCheckCanFire"); } - void SetbBPDoClientCheckCanFireField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bBPDoClientCheckCanFire", newValue); } - bool GetbRestrictTPVCameraYawField() const { return GetNativeField(this, "AShooterWeapon", "bRestrictTPVCameraYaw"); } - void SetbRestrictTPVCameraYawField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bRestrictTPVCameraYaw", newValue); } - float GetTPVCameraYawRangeField() const { return GetNativeField(this, "AShooterWeapon", "TPVCameraYawRange"); } - void SetTPVCameraYawRangeField(float newValue) { SetNativeField(this, "AShooterWeapon", "TPVCameraYawRange", newValue); } - bool GetbFoceSimulatedTickField() const { return GetNativeField(this, "AShooterWeapon", "bFoceSimulatedTick"); } - void SetbFoceSimulatedTickField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bFoceSimulatedTick", newValue); } - bool GetbWasLastFireFromGamePadField() const { return GetNativeField(this, "AShooterWeapon", "bWasLastFireFromGamePad"); } - void SetbWasLastFireFromGamePadField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bWasLastFireFromGamePad", newValue); } - bool GetbDisableWeaponCrosshairField() const { return GetNativeField(this, "AShooterWeapon", "bDisableWeaponCrosshair"); } - void SetbDisableWeaponCrosshairField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bDisableWeaponCrosshair", newValue); } - bool GetbBPOverrideAspectRatioField() const { return GetNativeField(this, "AShooterWeapon", "bBPOverrideAspectRatio"); } - void SetbBPOverrideAspectRatioField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bBPOverrideAspectRatio", newValue); } - bool GetbForceAllowMountedWeaponryField() const { return GetNativeField(this, "AShooterWeapon", "bForceAllowMountedWeaponry"); } - void SetbForceAllowMountedWeaponryField(bool newValue) { SetNativeField(this, "AShooterWeapon", "bForceAllowMountedWeaponry", newValue); } - - // Functions - - static UClass* StaticClass() { return NativeCall(nullptr, "AShooterWeapon", "StaticClass"); } - USceneComponent* FindComponentByName(FName ComponentName) { return NativeCall((DWORD64)this, "AShooterWeapon", "FindComponentByName", ComponentName); } - void ZoomOut() { NativeCall((DWORD64)this, "AShooterWeapon", "ZoomOut"); } - void ZoomIn() { NativeCall((DWORD64)this, "AShooterWeapon", "ZoomIn"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AShooterWeapon", "PostInitializeComponents"); } - void UpdateFirstPersonMeshes(bool bIsFirstPerson) { NativeCall((DWORD64)this, "AShooterWeapon", "UpdateFirstPersonMeshes", bIsFirstPerson); } - void Destroyed() { NativeCall((DWORD64)this, "AShooterWeapon", "Destroyed"); } - void OnEquip() { NativeCall((DWORD64)this, "AShooterWeapon", "OnEquip"); } - void OnEquipFinished() { NativeCall((DWORD64)this, "AShooterWeapon", "OnEquipFinished"); } - void StartUnequip_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "StartUnequip_Implementation"); } - void PlayUnequipAnimation() { NativeCall((DWORD64)this, "AShooterWeapon", "PlayUnequipAnimation"); } - void AttachMeshToPawn() { NativeCall((DWORD64)this, "AShooterWeapon", "AttachMeshToPawn"); } - void ApplyPrimalItemSettingsToWeapon(bool bShallowUpdate) { NativeCall((DWORD64)this, "AShooterWeapon", "ApplyPrimalItemSettingsToWeapon", bShallowUpdate); } - void DetachMeshFromPawn() { NativeCall((DWORD64)this, "AShooterWeapon", "DetachMeshFromPawn"); } - void StartFire(bool bFromGamepad) { NativeCall((DWORD64)this, "AShooterWeapon", "StartFire", bFromGamepad); } - void StopFire() { NativeCall((DWORD64)this, "AShooterWeapon", "StopFire"); } - void StartAltFire() { NativeCall((DWORD64)this, "AShooterWeapon", "StartAltFire"); } - void StartSecondaryAction() { NativeCall((DWORD64)this, "AShooterWeapon", "StartSecondaryAction"); } - void ToggleAccessory() { NativeCall((DWORD64)this, "AShooterWeapon", "ToggleAccessory"); } - void RefreshToggleAccessory() { NativeCall((DWORD64)this, "AShooterWeapon", "RefreshToggleAccessory"); } - bool CanMeleeAttack() { return NativeCall((DWORD64)this, "AShooterWeapon", "CanMeleeAttack"); } - void DoMeleeAttack() { NativeCall((DWORD64)this, "AShooterWeapon", "DoMeleeAttack"); } - void StopAltFire() { NativeCall((DWORD64)this, "AShooterWeapon", "StopAltFire"); } - void CheckForMeleeAttack() { NativeCall((DWORD64)this, "AShooterWeapon", "CheckForMeleeAttack"); } - void StopCheckForMeleeAttack() { NativeCall((DWORD64)this, "AShooterWeapon", "StopCheckForMeleeAttack"); } - bool CanRun() { return NativeCall((DWORD64)this, "AShooterWeapon", "CanRun"); } - void StartReload(bool bFromReplication) { NativeCall((DWORD64)this, "AShooterWeapon", "StartReload", bFromReplication); } - void ClearClientReload() { NativeCall((DWORD64)this, "AShooterWeapon", "ClearClientReload"); } - float PlayReloadAnimation() { return NativeCall((DWORD64)this, "AShooterWeapon", "PlayReloadAnimation"); } - void StopReloadAnimation() { NativeCall((DWORD64)this, "AShooterWeapon", "StopReloadAnimation"); } - void ServerStartFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStartFire_Implementation"); } - void ServerStopFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStopFire_Implementation"); } - void ServerStartAltFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStartAltFire_Implementation"); } - void ServerStopAltFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStopAltFire_Implementation"); } - void ServerStartSecondaryAction_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStartSecondaryAction_Implementation"); } - void ServerStopSecondaryAction_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStopSecondaryAction_Implementation"); } - void ServerToggleAccessory_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerToggleAccessory_Implementation"); } - void ServerStartReload_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStartReload_Implementation"); } - void ClientStartReload_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientStartReload_Implementation"); } - bool CanFire(bool bForceAllowSubmergedFiring) { return NativeCall((DWORD64)this, "AShooterWeapon", "CanFire", bForceAllowSubmergedFiring); } - bool AllowFiring() { return NativeCall((DWORD64)this, "AShooterWeapon", "AllowFiring"); } - bool CanReload() { return NativeCall((DWORD64)this, "AShooterWeapon", "CanReload"); } - void UseAmmo() { NativeCall((DWORD64)this, "AShooterWeapon", "UseAmmo"); } - void HandleFiring(bool bSentFromClient) { NativeCall((DWORD64)this, "AShooterWeapon", "HandleFiring", bSentFromClient); } - bool CanTarget() { return NativeCall((DWORD64)this, "AShooterWeapon", "CanTarget"); } - float GetConsumeDurabilityPerShot() { return NativeCall((DWORD64)this, "AShooterWeapon", "GetConsumeDurabilityPerShot"); } - void ReloadWeapon() { NativeCall((DWORD64)this, "AShooterWeapon", "ReloadWeapon"); } - void RefreshAmmoItemQuantity() { NativeCall((DWORD64)this, "AShooterWeapon", "RefreshAmmoItemQuantity"); } - void ConsumeAmmoItem(int Quantity) { NativeCall((DWORD64)this, "AShooterWeapon", "ConsumeAmmoItem", Quantity); } - //void SetWeaponState(EWeaponState::Type NewState) { NativeCall((DWORD64)this, "AShooterWeapon", "SetWeaponState", NewState); } - void DetermineWeaponState() { NativeCall((DWORD64)this, "AShooterWeapon", "DetermineWeaponState"); } - void SetAutoReload() { NativeCall((DWORD64)this, "AShooterWeapon", "SetAutoReload"); } - void OnBurstStarted() { NativeCall((DWORD64)this, "AShooterWeapon", "OnBurstStarted"); } - void OnBurstFinished() { NativeCall((DWORD64)this, "AShooterWeapon", "OnBurstFinished"); } - void ClientStopSimulatingWeaponFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientStopSimulatingWeaponFire_Implementation"); } - void ClientSimulateWeaponFire_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientSimulateWeaponFire_Implementation"); } - //UAudioComponent * PlayWeaponSound(USoundCue * Sound) { return NativeCall((DWORD64)this, "AShooterWeapon", "PlayWeaponSound", Sound); } - void ClientPlayShieldHitAnim_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientPlayShieldHitAnim_Implementation"); } - FVector* GetAdjustedAim(FVector* result) { return NativeCall((DWORD64)this, "AShooterWeapon", "GetAdjustedAim", result); } - FVector* GetCameraDamageStartLocation(FVector* result, FVector* AimDir) { return NativeCall((DWORD64)this, "AShooterWeapon", "GetCameraDamageStartLocation", result, AimDir); } - FVector* GetShootingCameraLocation(FVector* result) { return NativeCall((DWORD64)this, "AShooterWeapon", "GetShootingCameraLocation", result); } - FVector* GetMuzzleLocation(FVector* result) { return NativeCall((DWORD64)this, "AShooterWeapon", "GetMuzzleLocation", result); } - FHitResult* WeaponTrace(FHitResult* result, FVector* StartTrace, FVector* EndTrace) { return NativeCall((DWORD64)this, "AShooterWeapon", "WeaponTrace", result, StartTrace, EndTrace); } - void WeaponTraceHits(TArray* HitResults, FVector* StartTrace, FVector* EndTrace) { NativeCall *, FVector *, FVector *>((DWORD64)this, "AShooterWeapon", "WeaponTraceHits", HitResults, StartTrace, EndTrace); } - void SetOwningPawn(AShooterCharacter* NewOwner) { NativeCall((DWORD64)this, "AShooterWeapon", "SetOwningPawn", NewOwner); } - void OnCameraUpdate(FVector* CameraLocation, FRotator* CameraRotation, FVector* WeaponBob) { NativeCall((DWORD64)this, "AShooterWeapon", "OnCameraUpdate", CameraLocation, CameraRotation, WeaponBob); } - void SimulateWeaponFire() { NativeCall((DWORD64)this, "AShooterWeapon", "SimulateWeaponFire"); } - void StartMuzzleFX() { NativeCall((DWORD64)this, "AShooterWeapon", "StartMuzzleFX"); } - void StopMuzzleFX() { NativeCall((DWORD64)this, "AShooterWeapon", "StopMuzzleFX"); } - void PlayFireAnimation() { NativeCall((DWORD64)this, "AShooterWeapon", "PlayFireAnimation"); } - void StopSimulatingWeaponFire() { NativeCall((DWORD64)this, "AShooterWeapon", "StopSimulatingWeaponFire"); } - bool HasInfiniteAmmo() { return NativeCall((DWORD64)this, "AShooterWeapon", "HasInfiniteAmmo"); } - void StartMeleeSwing() { NativeCall((DWORD64)this, "AShooterWeapon", "StartMeleeSwing"); } - void EndMeleeSwing() { NativeCall((DWORD64)this, "AShooterWeapon", "EndMeleeSwing"); } - bool AddToMeleeSwingHurtList(AActor* AnActor) { return NativeCall((DWORD64)this, "AShooterWeapon", "AddToMeleeSwingHurtList", AnActor); } - bool ShouldDealDamage(AActor* TestActor) { return NativeCall((DWORD64)this, "AShooterWeapon", "ShouldDealDamage", TestActor); } - void DealDamage(FHitResult* Impact, FVector* ShootDir, int DamageAmount, UClass* DamageType, float Impulse) { NativeCall((DWORD64)this, "AShooterWeapon", "DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } - void TickMeleeSwing(float DeltaTime) { NativeCall((DWORD64)this, "AShooterWeapon", "TickMeleeSwing", DeltaTime); } - void ClientStartMuzzleFX_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientStartMuzzleFX_Implementation"); } - void CosumeMeleeHitDurability(float DurabilityConsumptionMultiplier) { NativeCall((DWORD64)this, "AShooterWeapon", "CosumeMeleeHitDurability", DurabilityConsumptionMultiplier); } - void PlayWeaponBreakAnimation_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "PlayWeaponBreakAnimation_Implementation"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterWeapon", "Tick", DeltaSeconds); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterWeapon", "BeginPlay"); } - void LocalPossessed() { NativeCall((DWORD64)this, "AShooterWeapon", "LocalPossessed"); } - bool IsLocallyOwned() { return NativeCall((DWORD64)this, "AShooterWeapon", "IsLocallyOwned"); } - void CheckItemAssocation() { NativeCall((DWORD64)this, "AShooterWeapon", "CheckItemAssocation"); } - void OnRep_CurrentAmmoInClip() { NativeCall((DWORD64)this, "AShooterWeapon", "OnRep_CurrentAmmoInClip"); } - void LoadedFromSaveGame() { NativeCall((DWORD64)this, "AShooterWeapon", "LoadedFromSaveGame"); } - void PlayUseHarvestAnimation_Implementation() { NativeCall((DWORD64)this, "AShooterWeapon", "PlayUseHarvestAnimation_Implementation"); } - void OwnerDied() { NativeCall((DWORD64)this, "AShooterWeapon", "OwnerDied"); } - void OnRep_NetLoopedWeaponFire() { NativeCall((DWORD64)this, "AShooterWeapon", "OnRep_NetLoopedWeaponFire"); } - void ClientSetClipAmmo_Implementation(int newClipAmmo, bool bOnlyUpdateItem) { NativeCall((DWORD64)this, "AShooterWeapon", "ClientSetClipAmmo_Implementation", newClipAmmo, bOnlyUpdateItem); } - void DoHandleFiring() { NativeCall((DWORD64)this, "AShooterWeapon", "DoHandleFiring"); } - bool IsFirstPersonMeshVisible() { return NativeCall((DWORD64)this, "AShooterWeapon", "IsFirstPersonMeshVisible"); } - void ServerSetColorizeRegion_Implementation(int theRegion, bool bValToUse) { NativeCall((DWORD64)this, "AShooterWeapon", "ServerSetColorizeRegion_Implementation", theRegion, bValToUse); } - void DoReregisterAllComponents() { NativeCall((DWORD64)this, "AShooterWeapon", "DoReregisterAllComponents"); } - void StaticRegisterNativesAShooterWeapon() { NativeCall((DWORD64)this, "AShooterWeapon", "StaticRegisterNativesAShooterWeapon"); } - bool BPConstrainAspectRatio(float* OutAspectRatio) { return NativeCall((DWORD64)this, "AShooterWeapon", "BPConstrainAspectRatio", OutAspectRatio); } - bool BPWeaponCanFire() { return NativeCall((DWORD64)this, "AShooterWeapon", "BPWeaponCanFire"); } - void ClientStartMuzzleFX() { NativeCall((DWORD64)this, "AShooterWeapon", "ClientStartMuzzleFX"); } - void PlayWeaponBreakAnimation() { NativeCall((DWORD64)this, "AShooterWeapon", "PlayWeaponBreakAnimation"); } - void ServerSetColorizeRegion(int theRegion, bool bValToUse) { NativeCall((DWORD64)this, "AShooterWeapon", "ServerSetColorizeRegion", theRegion, bValToUse); } - void ServerStartFire() { NativeCall((DWORD64)this, "AShooterWeapon", "ServerStartFire"); } - void StartUnequip() { NativeCall((DWORD64)this, "AShooterWeapon", "StartUnequip"); } -}; diff --git a/ArkApi/API/Ark.cpp b/ArkApi/API/Ark.cpp deleted file mode 100644 index 641853f..0000000 --- a/ArkApi/API/Ark.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "stdafx.h" -#include "Ark.h" -#include -#include "../ApiUtils.h" -#include "../Hooks.h" -#include "../Commands.h" - -namespace Ark -{ - UWorld* GetWorld() - { - return ApiUtils::GetWorld(); - } - - AShooterGameMode* GetGameMode() - { - return ApiUtils::GetGameMode(); - } - - void SetHook(const std::string& structure, const std::string& funcName, LPVOID pDetour, LPVOID* ppOriginal) - { - Hooks::SetHook(structure, funcName, pDetour, ppOriginal); - } - - void DisableHook(const std::string& structure, const std::string& funcName) - { - Hooks::DisableHook(structure, funcName); - } - - void AddChatCommand(const FString& command, const std::function& callback) - { - Commands::AddChatCommand(command, callback); - } - - void RemoveChatCommand(const FString& command) - { - Commands::RemoveChatCommand(command); - } - - void AddConsoleCommand(const FString& command, const std::function& callback) - { - Commands::AddConsoleCommand(command, callback); - } - - void AddRconCommand(const FString& command, const std::function& callback) - { - Commands::AddRconCommand(command, callback); - } - - void AddOnTickCallback(const std::function& callback) - { - Commands::AddOnTickCallback(callback); - } - - void AddOnTimerCallback(const std::function& callback) - { - Commands::AddOnTimerCallback(callback); - } -} diff --git a/ArkApi/API/Ark.h b/ArkApi/API/Ark.h deleted file mode 100644 index 2c6adcb..0000000 --- a/ArkApi/API/Ark.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "Base.h" -#include - -#define DECLARE_HOOK(name, returnType, ...) typedef returnType(__cdecl * name ## _Func)(__VA_ARGS__); \ -name ## _Func name ## _original; \ -returnType __cdecl Hook_ ## name(__VA_ARGS__) - -namespace Ark -{ - ARK_API UWorld* GetWorld(); - ARK_API AShooterGameMode* GetGameMode(); - - ARK_API void SetHook(const std::string& structure, const std::string& funcName, LPVOID pDetour, LPVOID* ppOriginal); - // Will disable all hooks placed on this function - ARK_API void DisableHook(const std::string& structure, const std::string& funcName); - - ARK_API void AddChatCommand(const FString& command, const std::function& callback); - ARK_API void RemoveChatCommand(const FString& command); - ARK_API void AddConsoleCommand(const FString& command, const std::function& callback); - ARK_API void AddRconCommand(const FString& command, const std::function& callback); - - ARK_API void AddOnTickCallback(const std::function& callback); - ARK_API void AddOnTimerCallback(const std::function& callback); -} diff --git a/ArkApi/API/Base.cpp b/ArkApi/API/Base.cpp deleted file mode 100644 index 81c60d0..0000000 --- a/ArkApi/API/Base.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "stdafx.h" -#include "Base.h" -#include "../Hooks.h" - -DWORD64 GetAddress(const void* base, const std::string& structure, const std::string& offset) -{ - return Hooks::GetAddress(base, structure, offset); -} - -DWORD64 GetAddress(LPVOID base, const std::string& structure, const std::string& offset) -{ - return Hooks::GetAddress(base, structure, offset); -} - -LPVOID GetAddress(const std::string& structure, const std::string& offset) -{ - return Hooks::GetAddress(structure, offset); -} diff --git a/ArkApi/API/Enums.h b/ArkApi/API/Enums.h deleted file mode 100644 index 28ae9e4..0000000 --- a/ArkApi/API/Enums.h +++ /dev/null @@ -1,246 +0,0 @@ -#pragma once - -#include "Base.h" - -namespace EPrimalEquipmentType -{ - enum Type - { - Hat = 0x0, - Shirt = 0x1, - Pants = 0x2, - Boots = 0x3, - Gloves = 0x4, - DinoSaddle = 0x5, - Trophy = 0x6, - Costume = 0x7, - Shield = 0x8, - MAX = 0x9 - }; -} - -namespace EPrimalItemStat -{ - enum Type - { - GenericQuality, - Armor, - MaxDurability, - WeaponDamagePercent, - WeaponClipAmmo, - HypothermalInsulation, - Weight, - HyperthermalInsulation, - MAX - }; -} - -namespace EPrimalCharacterStatusValue -{ - enum Type - { - Health, - Stamina, - Torpidity, - Oxygen, - Food, - Water, - Temperature, - Weight, - MeleeDamageMultiplier, - SpeedMultiplier, - TemperatureFortitude, - CraftingSpeedMultiplier, - MAX - }; -} - -namespace EPrimalCharacterStatusState -{ - enum Type - { - Dead, - Winded, - Starvation, - Dehydration, - Suffocation, - Encumbered, - Hypothermia, - Hyperthermia, - Injured, - KnockedOut, - Sleeping, - Cold, - Hot, - Crafting, - MAX - }; -} - -namespace EPrimalItemType -{ - enum Type - { - MiscConsumable, - Equipment, - Weapon, - Ammo, - Structure, - Resource, - Skin, - WeaponAttachment, - Artifact, - MAX - }; -} - -namespace EPrimalConsumableType -{ - enum Type - { - Food, - Water, - Medicine, - Other, - MAX - }; -} - -namespace EPrimalItemMessage -{ - enum Type - { - Broken, - Repaired, - MAX - }; -} - -enum ECollisionChannel -{ - ECC_WorldStatic = 0x0, - ECC_WorldDynamic = 0x1, - ECC_Visibility = 0x2, - ECC_PhysicsBody = 0x3, - ECC_Destructible = 0x4, - ECC_GameTraceChannel1 = 0x5, - ECC_GameTraceChannel2 = 0x6, - ECC_GameTraceChannel3 = 0x7, - ECC_GameTraceChannel4 = 0x8, - ECC_GameTraceChannel5 = 0x9, - ECC_GameTraceChannel6 = 0xA, - ECC_GameTraceChannel7 = 0xB, - ECC_GameTraceChannel8 = 0xC, - ECC_GameTraceChannel9 = 0xD, - ECC_GameTraceChannel10 = 0xE, - ECC_GameTraceChannel11 = 0xF, - ECC_GameTraceChannel12 = 0x10, - ECC_GameTraceChannel13 = 0x11, - ECC_GameTraceChannel14 = 0x12, - ECC_GameTraceChannel15 = 0x13, - ECC_GameTraceChannel16 = 0x14, - ECC_GameTraceChannel17 = 0x15, - ECC_GameTraceChannel18 = 0x16, - ECC_GameTraceChannel19 = 0x17, - ECC_GameTraceChannel20 = 0x18, - ECC_GameTraceChannel21 = 0x19, - ECC_GameTraceChannel22 = 0x1A, - ECC_GameTraceChannel23 = 0x1B, - ECC_GameTraceChannel24 = 0x1C, - ECC_GameTraceChannel25 = 0x1D, - ECC_GameTraceChannel26 = 0x1E, - ECC_GameTraceChannel27 = 0x1F, - ECC_OverlapAll_Deprecated = 0x20, - ECC_OverlapAllDynamic_Deprecated = 0x21, - ECC_OverlapAllStatic_Deprecated = 0x22, - ECC_MAX = 0x23, -}; - -namespace EXPType -{ - enum Type - { - XP_GENERIC, - XP_KILL, - XP_HARVEST, - XP_CRAFT, - XP_SPECIAL, - MAX - }; -} - -namespace ESearchCase -{ - enum Type - { - /** Case sensitive. Upper/lower casing must match for strings to be considered equal. */ - CaseSensitive, - - /** Ignore case. Upper/lower casing does not matter when making a comparison. */ - IgnoreCase, - }; -}; - -namespace ESearchDir -{ - enum Type - { - /** Search from the start, moving forward through the string. */ - FromStart, - - /** Search from the end, moving backward through the string. */ - FromEnd, - }; -} - -namespace EChatSendMode -{ - enum Type - { - GlobalChat, - GlobalTribeChat, - LocalChat, - AllianceChat, - MAX - }; -} - -namespace EChatType -{ - enum Type - { - GlobalChat, - ProximityChat, - RadioChat, - GlobalTribeChat, - AllianceChat, - MAX - }; -} - -namespace ETextComparisonLevel -{ - enum Type - { - Default, // Locale-specific Default - Primary, // Base - Secondary, // Accent - Tertiary, // Case - Quaternary, // Punctuation - Quinary // Identical - }; -} - -enum EFindName -{ - /** Find a name; return 0 if it doesn't exist. */ - FNAME_Find, - - /** Find a name or add it if it doesn't exist. */ - FNAME_Add, - - /** Finds a name and replaces it. Adds it if missing. This is only used by UHT and is generally not safe for threading. - * All this really is used for is correcting the case of names. In MT conditions you might get a half-changed name. - */ - FNAME_Replace_Not_Safe_For_Threading, -}; diff --git a/ArkApi/API/GameMode.h b/ArkApi/API/GameMode.h deleted file mode 100644 index 79a5743..0000000 --- a/ArkApi/API/GameMode.h +++ /dev/null @@ -1,945 +0,0 @@ -#pragma once - -#include "Base.h" - -class UWorld -{ -public: - TArray> GetActorsClassesAllowedToSaveField() const { return GetNativeField>>(this, "UWorld", "ActorsClassesAllowedToSave"); } - bool GetbIsIdleField() const { return GetNativeField(this, "UWorld", "bIsIdle"); } - void SetbIsIdleField(bool newValue) { SetNativeField(this, "UWorld", "bIsIdle", newValue); } - ULevel* GetPersistentLevelField() const { return GetNativeField(this, "UWorld", "PersistentLevel"); } - AGameState* GetGameStateField() const { return GetNativeField(this, "UWorld", "GameState"); } - TArray GetExtraReferencedObjectsField() const { return GetNativeField>(this, "UWorld", "ExtraReferencedObjects"); } - FString GetStreamingLevelsPrefixField() const { return GetNativeField(this, "UWorld", "StreamingLevelsPrefix"); } - void SetStreamingLevelsPrefixField(FString newValue) { SetNativeField(this, "UWorld", "StreamingLevelsPrefix", newValue); } - ULevel* GetCurrentLevelPendingVisibilityField() const { return GetNativeField(this, "UWorld", "CurrentLevelPendingVisibility"); } - void SetCurrentLevelPendingVisibilityField(ULevel* newValue) { SetNativeField(this, "UWorld", "CurrentLevelPendingVisibility", newValue); } - TArray GetViewLocationsRenderedLastFrameField() const { return GetNativeField>(this, "UWorld", "ViewLocationsRenderedLastFrame"); } - AGameMode* GetAuthorityGameModeField() const { return GetNativeField(this, "UWorld", "AuthorityGameMode"); } - TArray GetLevelsField() const { return GetNativeField>(this, "UWorld", "Levels"); } - TArray GetNetworkActorsField() const { return GetNativeField>(this, "UWorld", "NetworkActors"); } - ULevel* GetCurrentLevelField() const { return GetNativeField(this, "UWorld", "CurrentLevel"); } - int GetFrameCounterField() const { return GetNativeField(this, "UWorld", "FrameCounter"); } - void SetFrameCounterField(int newValue) { SetNativeField(this, "UWorld", "FrameCounter", newValue); } - bool GetGamePreviewField() const { return GetNativeField(this, "UWorld", "GamePreview"); } - void SetGamePreviewField(bool newValue) { SetNativeField(this, "UWorld", "GamePreview", newValue); } - TArray> GetControllerListField() const { return GetNativeField>>(this, "UWorld", "ControllerList"); } - TArray> GetPlayerControllerListField() const { return GetNativeField>>(this, "UWorld", "PlayerControllerList"); } - TArray> GetPawnListField() const { return GetNativeField>>(this, "UWorld", "PawnList"); } - bool GetbPostTickComponentUpdateField() const { return GetNativeField(this, "UWorld", "bPostTickComponentUpdate"); } - void SetbPostTickComponentUpdateField(bool newValue) { SetNativeField(this, "UWorld", "bPostTickComponentUpdate", newValue); } - int GetPlayerNumField() const { return GetNativeField(this, "UWorld", "PlayerNum"); } - void SetPlayerNumField(int newValue) { SetNativeField(this, "UWorld", "PlayerNum", newValue); } - float GetTimeSinceLastPendingKillPurgeField() const { return GetNativeField(this, "UWorld", "TimeSinceLastPendingKillPurge"); } - void SetTimeSinceLastPendingKillPurgeField(float newValue) { SetNativeField(this, "UWorld", "TimeSinceLastPendingKillPurge", newValue); } - bool GetFullPurgeTriggeredField() const { return GetNativeField(this, "UWorld", "FullPurgeTriggered"); } - void SetFullPurgeTriggeredField(bool newValue) { SetNativeField(this, "UWorld", "FullPurgeTriggered", newValue); } - bool GetbShouldDelayGarbageCollectField() const { return GetNativeField(this, "UWorld", "bShouldDelayGarbageCollect"); } - void SetbShouldDelayGarbageCollectField(bool newValue) { SetNativeField(this, "UWorld", "bShouldDelayGarbageCollect", newValue); } - bool GetbIsWorldInitializedField() const { return GetNativeField(this, "UWorld", "bIsWorldInitialized"); } - void SetbIsWorldInitializedField(bool newValue) { SetNativeField(this, "UWorld", "bIsWorldInitialized", newValue); } - int GetAllowLevelLoadOverrideField() const { return GetNativeField(this, "UWorld", "AllowLevelLoadOverride"); } - void SetAllowLevelLoadOverrideField(int newValue) { SetNativeField(this, "UWorld", "AllowLevelLoadOverride", newValue); } - int GetStreamingVolumeUpdateDelayField() const { return GetNativeField(this, "UWorld", "StreamingVolumeUpdateDelay"); } - void SetStreamingVolumeUpdateDelayField(int newValue) { SetNativeField(this, "UWorld", "StreamingVolumeUpdateDelay", newValue); } - bool GetbIsLevelStreamingFrozenField() const { return GetNativeField(this, "UWorld", "bIsLevelStreamingFrozen"); } - void SetbIsLevelStreamingFrozenField(bool newValue) { SetNativeField(this, "UWorld", "bIsLevelStreamingFrozen", newValue); } - bool GetbShouldForceUnloadStreamingLevelsField() const { return GetNativeField(this, "UWorld", "bShouldForceUnloadStreamingLevels"); } - void SetbShouldForceUnloadStreamingLevelsField(bool newValue) { SetNativeField(this, "UWorld", "bShouldForceUnloadStreamingLevels", newValue); } - bool GetbShouldForceVisibleStreamingLevelsField() const { return GetNativeField(this, "UWorld", "bShouldForceVisibleStreamingLevels"); } - void SetbShouldForceVisibleStreamingLevelsField(bool newValue) { SetNativeField(this, "UWorld", "bShouldForceVisibleStreamingLevels", newValue); } - bool GetbDoDelayedUpdateCullDistanceVolumesField() const { return GetNativeField(this, "UWorld", "bDoDelayedUpdateCullDistanceVolumes"); } - void SetbDoDelayedUpdateCullDistanceVolumesField(bool newValue) { SetNativeField(this, "UWorld", "bDoDelayedUpdateCullDistanceVolumes", newValue); } - bool GetbIsRunningConstructionScriptField() const { return GetNativeField(this, "UWorld", "bIsRunningConstructionScript"); } - void SetbIsRunningConstructionScriptField(bool newValue) { SetNativeField(this, "UWorld", "bIsRunningConstructionScript", newValue); } - bool GetbShouldSimulatePhysicsField() const { return GetNativeField(this, "UWorld", "bShouldSimulatePhysics"); } - void SetbShouldSimulatePhysicsField(bool newValue) { SetNativeField(this, "UWorld", "bShouldSimulatePhysics", newValue); } - FName GetDebugDrawTraceTagField() const { return GetNativeField(this, "UWorld", "DebugDrawTraceTag"); } - void SetDebugDrawTraceTagField(FName newValue) { SetNativeField(this, "UWorld", "DebugDrawTraceTag", newValue); } - long double GetLastTimeUnbuiltLightingWasEncounteredField() const { return GetNativeField(this, "UWorld", "LastTimeUnbuiltLightingWasEncountered"); } - void SetLastTimeUnbuiltLightingWasEncounteredField(long double newValue) { SetNativeField(this, "UWorld", "LastTimeUnbuiltLightingWasEncountered", newValue); } - long double GetTimeSecondsField() const { return GetNativeField(this, "UWorld", "TimeSeconds"); } - void SetTimeSecondsField(long double newValue) { SetNativeField(this, "UWorld", "TimeSeconds", newValue); } - long double GetLoadedAtTimeSecondsField() const { return GetNativeField(this, "UWorld", "LoadedAtTimeSeconds"); } - void SetLoadedAtTimeSecondsField(long double newValue) { SetNativeField(this, "UWorld", "LoadedAtTimeSeconds", newValue); } - long double GetRealTimeSecondsField() const { return GetNativeField(this, "UWorld", "RealTimeSeconds"); } - void SetRealTimeSecondsField(long double newValue) { SetNativeField(this, "UWorld", "RealTimeSeconds", newValue); } - long double GetAudioTimeSecondsField() const { return GetNativeField(this, "UWorld", "AudioTimeSeconds"); } - void SetAudioTimeSecondsField(long double newValue) { SetNativeField(this, "UWorld", "AudioTimeSeconds", newValue); } - float GetDeltaTimeSecondsField() const { return GetNativeField(this, "UWorld", "DeltaTimeSeconds"); } - void SetDeltaTimeSecondsField(float newValue) { SetNativeField(this, "UWorld", "DeltaTimeSeconds", newValue); } - float GetPauseDelayField() const { return GetNativeField(this, "UWorld", "PauseDelay"); } - void SetPauseDelayField(float newValue) { SetNativeField(this, "UWorld", "PauseDelay", newValue); } - bool GetbBlockAllOnNextLevelStreamingProcessField() const { return GetNativeField(this, "UWorld", "bBlockAllOnNextLevelStreamingProcess"); } - void SetbBlockAllOnNextLevelStreamingProcessField(bool newValue) { SetNativeField(this, "UWorld", "bBlockAllOnNextLevelStreamingProcess", newValue); } - FIntVector GetOriginLocationField() const { return GetNativeField(this, "UWorld", "OriginLocation"); } - void SetOriginLocationField(FIntVector newValue) { SetNativeField(this, "UWorld", "OriginLocation", newValue); } - FIntVector GetRequestedOriginLocationField() const { return GetNativeField(this, "UWorld", "RequestedOriginLocation"); } - void SetRequestedOriginLocationField(FIntVector newValue) { SetNativeField(this, "UWorld", "RequestedOriginLocation", newValue); } - bool GetbOriginOffsetThisFrameField() const { return GetNativeField(this, "UWorld", "bOriginOffsetThisFrame"); } - void SetbOriginOffsetThisFrameField(bool newValue) { SetNativeField(this, "UWorld", "bOriginOffsetThisFrame", newValue); } - bool GetbFlushingLevelStreamingField() const { return GetNativeField(this, "UWorld", "bFlushingLevelStreaming"); } - void SetbFlushingLevelStreamingField(bool newValue) { SetNativeField(this, "UWorld", "bFlushingLevelStreaming", newValue); } - long double GetForceBlockLoadTimeoutField() const { return GetNativeField(this, "UWorld", "ForceBlockLoadTimeout"); } - void SetForceBlockLoadTimeoutField(long double newValue) { SetNativeField(this, "UWorld", "ForceBlockLoadTimeout", newValue); } - FString GetNextURLField() const { return GetNativeField(this, "UWorld", "NextURL"); } - void SetNextURLField(FString newValue) { SetNativeField(this, "UWorld", "NextURL", newValue); } - float GetNextSwitchCountdownField() const { return GetNativeField(this, "UWorld", "NextSwitchCountdown"); } - void SetNextSwitchCountdownField(float newValue) { SetNativeField(this, "UWorld", "NextSwitchCountdown", newValue); } - FName GetCommittedPersistentLevelNameField() const { return GetNativeField(this, "UWorld", "CommittedPersistentLevelName"); } - void SetCommittedPersistentLevelNameField(FName newValue) { SetNativeField(this, "UWorld", "CommittedPersistentLevelName", newValue); } - FString GetCurrentDayTimeField() const { return GetNativeField(this, "UWorld", "CurrentDayTime"); } - void SetCurrentDayTimeField(FString newValue) { SetNativeField(this, "UWorld", "CurrentDayTime", newValue); } - - // Functions - - AActor* SpawnActor(UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters) { return NativeCall((DWORD64)this, "UWorld", "SpawnActor", Class, Location, Rotation, SpawnParameters); } - bool DestroyActor(AActor* ThisActor, bool bNetForce, bool bShouldModifyLevel) { return NativeCall((DWORD64)this, "UWorld", "DestroyActor", ThisActor, bNetForce, bShouldModifyLevel); } - bool FindTeleportSpot() { return NativeCall((DWORD64)this, "UWorld", "FindTeleportSpot"); } - bool EncroachingBlockingGeometry() { return NativeCall((DWORD64)this, "UWorld", "EncroachingBlockingGeometry"); } - bool IsPaused() { return NativeCall((DWORD64)this, "UWorld", "IsPaused"); } - void ProcessLevelStreamingVolumes(FVector* OverrideViewLocation) { NativeCall((DWORD64)this, "UWorld", "ProcessLevelStreamingVolumes", OverrideViewLocation); } - void CleanupActors() { NativeCall((DWORD64)this, "UWorld", "CleanupActors"); } - void UpdateAllReflectionCaptures() { NativeCall((DWORD64)this, "UWorld", "UpdateAllReflectionCaptures"); } - void FinishDestroy() { NativeCall((DWORD64)this, "UWorld", "FinishDestroy"); } - void PostLoad() { NativeCall((DWORD64)this, "UWorld", "PostLoad"); } - bool PreSaveRoot(const wchar_t* Filename, TArray* AdditionalPackagesToCook) { return NativeCall *>((DWORD64)this, "UWorld", "PreSaveRoot", Filename, AdditionalPackagesToCook); } - void PostSaveRoot(bool bCleanupIsRequired) { NativeCall((DWORD64)this, "UWorld", "PostSaveRoot", bCleanupIsRequired); } - void SetupParameterCollectionInstances() { NativeCall((DWORD64)this, "UWorld", "SetupParameterCollectionInstances"); } - void RemoveActor(AActor* Actor, bool bShouldModifyLevel) { NativeCall((DWORD64)this, "UWorld", "RemoveActor", Actor, bShouldModifyLevel); } - bool AllowAudioPlayback() { return NativeCall((DWORD64)this, "UWorld", "AllowAudioPlayback"); } - void ClearWorldComponents() { NativeCall((DWORD64)this, "UWorld", "ClearWorldComponents"); } - void UpdateWorldComponents(bool bRerunConstructionScripts, bool bCurrentLevelOnly) { NativeCall((DWORD64)this, "UWorld", "UpdateWorldComponents", bRerunConstructionScripts, bCurrentLevelOnly); } - void UpdateCullDistanceVolumes() { NativeCall((DWORD64)this, "UWorld", "UpdateCullDistanceVolumes"); } - void ModifyLevel(ULevel* Level) { NativeCall((DWORD64)this, "UWorld", "ModifyLevel", Level); } - void EnsureCollisionTreeIsBuilt() { NativeCall((DWORD64)this, "UWorld", "EnsureCollisionTreeIsBuilt"); } - void AddToWorld(ULevel* Level, FTransform* LevelTransform, bool bAlwaysConsiderTimeLimit) { NativeCall((DWORD64)this, "UWorld", "AddToWorld", Level, LevelTransform, bAlwaysConsiderTimeLimit); } - void RemoveFromWorld(ULevel* Level) { NativeCall((DWORD64)this, "UWorld", "RemoveFromWorld", Level); } - bool AreAlwaysLoadedLevelsLoaded() { return NativeCall((DWORD64)this, "UWorld", "AreAlwaysLoadedLevelsLoaded"); } - bool AllowLevelLoadRequests() { return NativeCall((DWORD64)this, "UWorld", "AllowLevelLoadRequests"); } - void CleanupWorld(bool bSessionEnded, bool bCleanupResources, UWorld* NewWorld) { NativeCall((DWORD64)this, "UWorld", "CleanupWorld", bSessionEnded, bCleanupResources, NewWorld); } - APlayerController* GetFirstPlayerController() { return NativeCall((DWORD64)this, "UWorld", "GetFirstPlayerController"); } - float GetDefaultGravityZ() { return NativeCall((DWORD64)this, "UWorld", "GetDefaultGravityZ"); } - FString* GetMapName(FString* result) { return NativeCall((DWORD64)this, "UWorld", "GetMapName", result); } - bool IsPreparingMapChange() { return NativeCall((DWORD64)this, "UWorld", "IsPreparingMapChange"); } - bool SetNewWorldOrigin() { return NativeCall((DWORD64)this, "UWorld", "SetNewWorldOrigin"); } - void NavigateTo() { NativeCall((DWORD64)this, "UWorld", "NavigateTo"); } - void SeamlessTravel() { NativeCall((DWORD64)this, "UWorld", "SeamlessTravel"); } - bool IsInSeamlessTravel() { return NativeCall((DWORD64)this, "UWorld", "IsInSeamlessTravel"); } - void UpdateConstraintActors() { NativeCall((DWORD64)this, "UWorld", "UpdateConstraintActors"); } - int GetActorCount() { return NativeCall((DWORD64)this, "UWorld", "GetActorCount"); } - int GetNetRelevantActorCount() { return NativeCall((DWORD64)this, "UWorld", "GetNetRelevantActorCount"); } - bool ContainsLevel(ULevel* InLevel) { return NativeCall((DWORD64)this, "UWorld", "ContainsLevel", InLevel); } - FString* GetLocalURL(FString* result) { return NativeCall((DWORD64)this, "UWorld", "GetLocalURL", result); } - FString* GetAddressURL(FString* result) { return NativeCall((DWORD64)this, "UWorld", "GetAddressURL", result); } - void ServerTravel(FString* FURL, bool bAbsolute, bool bShouldSkipGameNotify) { NativeCall((DWORD64)this, "UWorld", "ServerTravel", FURL, bAbsolute, bShouldSkipGameNotify); } - void StartAsyncTrace() { NativeCall((DWORD64)this, "UWorld", "StartAsyncTrace"); } - void FinishAsyncTrace() { NativeCall((DWORD64)this, "UWorld", "FinishAsyncTrace"); } - void SetupPhysicsTickFunctions(float DeltaSeconds) { NativeCall((DWORD64)this, "UWorld", "SetupPhysicsTickFunctions", DeltaSeconds); } - void FinishPhysicsSim() { NativeCall((DWORD64)this, "UWorld", "FinishPhysicsSim"); } -}; - -// Level - -struct ULevelBase -{ - //TTransArray GetActorsField() const { return GetNativeField>(this, "ULevelBase", "Actors"); } -}; - -struct ULevel : ULevelBase -{ -}; - -// Game Mode - -struct AGameMode -{ - FName GetMatchStateField() const { return GetNativeField(this, "AGameMode", "MatchState"); } - void SetMatchStateField(FName newValue) { SetNativeField(this, "AGameMode", "MatchState", newValue); } - FString GetOptionsStringField() const { return GetNativeField(this, "AGameMode", "OptionsString"); } - void SetOptionsStringField(FString newValue) { SetNativeField(this, "AGameMode", "OptionsString", newValue); } - TSubclassOf GetDefaultPawnClassField() const { return GetNativeField>(this, "AGameMode", "DefaultPawnClass"); } - void SetDefaultPawnClassField(TSubclassOf newValue) { SetNativeField(this, "AGameMode", "DefaultPawnClass", newValue); } - int GetNumSpectatorsField() const { return GetNativeField(this, "AGameMode", "NumSpectators"); } - void SetNumSpectatorsField(int newValue) { SetNativeField(this, "AGameMode", "NumSpectators", newValue); } - int GetNumPlayersField() const { return GetNativeField(this, "AGameMode", "NumPlayers"); } - void SetNumPlayersField(int newValue) { SetNativeField(this, "AGameMode", "NumPlayers", newValue); } - int GetNumBotsField() const { return GetNativeField(this, "AGameMode", "NumBots"); } - void SetNumBotsField(int newValue) { SetNativeField(this, "AGameMode", "NumBots", newValue); } - float GetMinRespawnDelayField() const { return GetNativeField(this, "AGameMode", "MinRespawnDelay"); } - void SetMinRespawnDelayField(float newValue) { SetNativeField(this, "AGameMode", "MinRespawnDelay", newValue); } - AGameSession* GetGameSessionField() const { return GetNativeField(this, "AGameMode", "GameSession"); } - void SetGameSessionField(AGameSession* newValue) { SetNativeField(this, "AGameMode", "GameSession", newValue); } - int GetNumTravellingPlayersField() const { return GetNativeField(this, "AGameMode", "NumTravellingPlayers"); } - void SetNumTravellingPlayersField(int newValue) { SetNativeField(this, "AGameMode", "NumTravellingPlayers", newValue); } - int GetCurrentIDField() const { return GetNativeField(this, "AGameMode", "CurrentID"); } - void SetCurrentIDField(int newValue) { SetNativeField(this, "AGameMode", "CurrentID", newValue); } - FString GetDefaultPlayerNameField() const { return GetNativeField(this, "AGameMode", "DefaultPlayerName"); } - void SetDefaultPlayerNameField(FString newValue) { SetNativeField(this, "AGameMode", "DefaultPlayerName", newValue); } - TArray GetPlayerStartsField() const { return GetNativeField>(this, "AGameMode", "PlayerStarts"); } - void SetPlayerStartsField(TArray newValue) { SetNativeField(this, "AGameMode", "PlayerStarts", newValue); } - TSubclassOf GetPlayerControllerClassField() const { return GetNativeField>(this, "AGameMode", "PlayerControllerClass"); } - void SetPlayerControllerClassField(TSubclassOf newValue) { SetNativeField(this, "AGameMode", "PlayerControllerClass", newValue); } - TSubclassOf GetPlayerStateClassField() const { return GetNativeField>(this, "AGameMode", "PlayerStateClass"); } - void SetPlayerStateClassField(TSubclassOf newValue) { SetNativeField(this, "AGameMode", "PlayerStateClass", newValue); } - TSubclassOf GetGameStateClassField() const { return GetNativeField>(this, "AGameMode", "GameStateClass"); } - void SetGameStateClassField(TSubclassOf newValue) { SetNativeField(this, "AGameMode", "GameStateClass", newValue); } - AGameState* GetGameStateField() const { return GetNativeField(this, "AGameMode", "GameState"); } - void SetGameStateField(AGameState* newValue) { SetNativeField(this, "AGameMode", "GameState", newValue); } - TArray GetInactivePlayerArrayField() const { return GetNativeField>(this, "AGameMode", "InactivePlayerArray"); } - void SetInactivePlayerArrayField(TArray newValue) { SetNativeField(this, "AGameMode", "InactivePlayerArray", newValue); } - float GetInactivePlayerStateLifeSpanField() const { return GetNativeField(this, "AGameMode", "InactivePlayerStateLifeSpan"); } - void SetInactivePlayerStateLifeSpanField(float newValue) { SetNativeField(this, "AGameMode", "InactivePlayerStateLifeSpan", newValue); } - - // Functions - - FString* GetNetworkNumber(FString* result) { return NativeCall((DWORD64)this, "AGameMode", "GetNetworkNumber", result); } - void SwapPlayerControllers(APlayerController* OldPC, APlayerController* NewPC) { NativeCall((DWORD64)this, "AGameMode", "SwapPlayerControllers", OldPC, NewPC); } - void ForceClearUnpauseDelegates(AActor* PauseActor) { NativeCall((DWORD64)this, "AGameMode", "ForceClearUnpauseDelegates", PauseActor); } - void InitGame(FString* MapName, FString* Options, FString* ErrorMessage) { NativeCall((DWORD64)this, "AGameMode", "InitGame", MapName, Options, ErrorMessage); } - void RestartGame() { NativeCall((DWORD64)this, "AGameMode", "RestartGame"); } - void ReturnToMainMenuHost() { NativeCall((DWORD64)this, "AGameMode", "ReturnToMainMenuHost"); } - void PostLogin(APlayerController* NewPlayer) { NativeCall((DWORD64)this, "AGameMode", "PostLogin", NewPlayer); } - bool ShouldStartInCinematicMode(bool* OutHidePlayer, bool* OutHideHUD, bool* OutDisableMovement, bool* OutDisableTurning) { return NativeCall((DWORD64)this, "AGameMode", "ShouldStartInCinematicMode", OutHidePlayer, OutHideHUD, OutDisableMovement, OutDisableTurning); } - void SetPlayerDefaults(APawn* PlayerPawn) { NativeCall((DWORD64)this, "AGameMode", "SetPlayerDefaults", PlayerPawn); } - void Logout(AController* Exiting) { NativeCall((DWORD64)this, "AGameMode", "Logout", Exiting); } - void InitGameState() { NativeCall((DWORD64)this, "AGameMode", "InitGameState"); } - AActor* FindPlayerStart(AController* Player, FString* IncomingName) { return NativeCall((DWORD64)this, "AGameMode", "FindPlayerStart", Player, IncomingName); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "AGameMode", "PreInitializeComponents"); } - void RestartPlayer(AController* NewPlayer) { NativeCall((DWORD64)this, "AGameMode", "RestartPlayer", NewPlayer); } - void StartPlay() { NativeCall((DWORD64)this, "AGameMode", "StartPlay"); } - void HandleMatchIsWaitingToStart() { NativeCall((DWORD64)this, "AGameMode", "HandleMatchIsWaitingToStart"); } - bool ReadyToStartMatch() { return NativeCall((DWORD64)this, "AGameMode", "ReadyToStartMatch"); } - void StartMatch() { NativeCall((DWORD64)this, "AGameMode", "StartMatch"); } - void HandleMatchHasStarted() { NativeCall((DWORD64)this, "AGameMode", "HandleMatchHasStarted"); } - void EndMatch() { NativeCall((DWORD64)this, "AGameMode", "EndMatch"); } - void HandleMatchHasEnded() { NativeCall((DWORD64)this, "AGameMode", "HandleMatchHasEnded"); } - void StartToLeaveMap() { NativeCall((DWORD64)this, "AGameMode", "StartToLeaveMap"); } - void AbortMatch() { NativeCall((DWORD64)this, "AGameMode", "AbortMatch"); } - bool HasMatchStarted() { return NativeCall((DWORD64)this, "AGameMode", "HasMatchStarted"); } - bool IsMatchInProgress() { return NativeCall((DWORD64)this, "AGameMode", "IsMatchInProgress"); } - bool HasMatchEnded() { return NativeCall((DWORD64)this, "AGameMode", "HasMatchEnded"); } - void SetMatchState(FName NewState) { NativeCall((DWORD64)this, "AGameMode", "SetMatchState", NewState); } - void ResetLevel() { NativeCall((DWORD64)this, "AGameMode", "ResetLevel"); } - void HandleSeamlessTravelPlayer(AController** C) { NativeCall((DWORD64)this, "AGameMode", "HandleSeamlessTravelPlayer", C); } - void SetSeamlessTravelViewTarget(APlayerController* PC) { NativeCall((DWORD64)this, "AGameMode", "SetSeamlessTravelViewTarget", PC); } - void ProcessServerTravel(FString* URL, bool bAbsolute) { NativeCall((DWORD64)this, "AGameMode", "ProcessServerTravel", URL, bAbsolute); } - void GetSeamlessTravelActorList(bool bToEntry, TArray* ActorList) { NativeCall *>((DWORD64)this, "AGameMode", "GetSeamlessTravelActorList", bToEntry, ActorList); } - void SetBandwidthLimit(float AsyncIOBandwidthLimit) { NativeCall((DWORD64)this, "AGameMode", "SetBandwidthLimit", AsyncIOBandwidthLimit); } - bool MustSpectate(APlayerController* NewPlayerController) { return NativeCall((DWORD64)this, "AGameMode", "MustSpectate", NewPlayerController); } - void RemovePlayerControllerFromPlayerCount(APlayerController* PC) { NativeCall((DWORD64)this, "AGameMode", "RemovePlayerControllerFromPlayerCount", PC); } - int GetNumPlayers() { return NativeCall((DWORD64)this, "AGameMode", "GetNumPlayers"); } - void ClearPause() { NativeCall((DWORD64)this, "AGameMode", "ClearPause"); } - bool GrabOption(FString* Options, FString* Result) { return NativeCall((DWORD64)this, "AGameMode", "GrabOption", Options, Result); } - void GetKeyValue(FString* Pair, FString* Key, FString* Value) { NativeCall((DWORD64)this, "AGameMode", "GetKeyValue", Pair, Key, Value); } - FString* ParseOption(FString* result, FString* Options, FString* InKey) { return NativeCall((DWORD64)this, "AGameMode", "ParseOption", result, Options, InKey); } - bool HasOption(FString* Options, FString* InKey) { return NativeCall((DWORD64)this, "AGameMode", "HasOption", Options, InKey); } - FString* GetDefaultGameClassPath(FString* result, FString* MapName, FString* Options, FString* Portal) { return NativeCall((DWORD64)this, "AGameMode", "GetDefaultGameClassPath", result, MapName, Options, Portal); } - TSubclassOf* GetGameSessionClass(TSubclassOf* result) { return NativeCall *, TSubclassOf *>((DWORD64)this, "AGameMode", "GetGameSessionClass", result); } - APlayerController* ProcessClientTravel() { return NativeCall((DWORD64)this, "AGameMode", "ProcessClientTravel"); } - APlayerController* SpawnPlayerController(FVector* SpawnLocation, FRotator* SpawnRotation) { return NativeCall((DWORD64)this, "AGameMode", "SpawnPlayerController", SpawnLocation, SpawnRotation); } - TSubclassOf* GetDefaultPawnClassForController_Implementation(TSubclassOf* result, AController* InController) { return NativeCall *, TSubclassOf *, AController *>((DWORD64)this, "AGameMode", "GetDefaultPawnClassForController_Implementation", result, InController); } - APawn* SpawnDefaultPawnFor(AController* NewPlayer, AActor* StartSpot) { return NativeCall((DWORD64)this, "AGameMode", "SpawnDefaultPawnFor", NewPlayer, StartSpot); } - void GenericPlayerInitialization(AController* C) { NativeCall((DWORD64)this, "AGameMode", "GenericPlayerInitialization", C); } - void StartNewPlayer(APlayerController* NewPlayer) { NativeCall((DWORD64)this, "AGameMode", "StartNewPlayer", NewPlayer); } - void ChangeName(AController* Other, FString* S, bool bNameChange) { NativeCall((DWORD64)this, "AGameMode", "ChangeName", Other, S, bNameChange); } - void SendPlayer(APlayerController* aPlayer, FString* FURL) { NativeCall((DWORD64)this, "AGameMode", "SendPlayer", aPlayer, FURL); } - void Broadcast(AActor* Sender, FString* Msg, FName Type) { NativeCall((DWORD64)this, "AGameMode", "Broadcast", Sender, Msg, Type); } - bool ShouldSpawnAtStartSpot_Implementation(AController* Player) { return NativeCall((DWORD64)this, "AGameMode", "ShouldSpawnAtStartSpot_Implementation", Player); } - void AddPlayerStart(APlayerStart* NewPlayerStart) { NativeCall((DWORD64)this, "AGameMode", "AddPlayerStart", NewPlayerStart); } - void RemovePlayerStart(APlayerStart* RemovedPlayerStart) { NativeCall((DWORD64)this, "AGameMode", "RemovePlayerStart", RemovedPlayerStart); } - AActor* ChoosePlayerStart_Implementation(AController* Player) { return NativeCall((DWORD64)this, "AGameMode", "ChoosePlayerStart_Implementation", Player); } - bool PlayerCanRestart(APlayerController* Player) { return NativeCall((DWORD64)this, "AGameMode", "PlayerCanRestart", Player); } - void UpdateGameplayMuteList(APlayerController* aPlayer) { NativeCall((DWORD64)this, "AGameMode", "UpdateGameplayMuteList", aPlayer); } - bool AllowCheats(APlayerController* P) { return NativeCall((DWORD64)this, "AGameMode", "AllowCheats", P); } - bool AllowPausing(APlayerController* PC) { return NativeCall((DWORD64)this, "AGameMode", "AllowPausing", PC); } - void AddInactivePlayer(APlayerState* PlayerState, APlayerController* PC) { NativeCall((DWORD64)this, "AGameMode", "AddInactivePlayer", PlayerState, PC); } - bool FindInactivePlayer(APlayerController* PC) { return NativeCall((DWORD64)this, "AGameMode", "FindInactivePlayer", PC); } - void OverridePlayerState(APlayerController* PC, APlayerState* OldPlayerState) { NativeCall((DWORD64)this, "AGameMode", "OverridePlayerState", PC, OldPlayerState); } - void PostSeamlessTravel() { NativeCall((DWORD64)this, "AGameMode", "PostSeamlessTravel"); } - AActor* ChoosePlayerStart(AController* Player) { return NativeCall((DWORD64)this, "AGameMode", "ChoosePlayerStart", Player); } -}; - -struct AShooterGameMode : AGameMode -{ - int GetLastRepopulationIndexToCheckField() const { return GetNativeField(this, "AShooterGameMode", "LastRepopulationIndexToCheck"); } - void SetLastRepopulationIndexToCheckField(int newValue) { SetNativeField(this, "AShooterGameMode", "LastRepopulationIndexToCheck", newValue); } - FString GetAlarmNotificationKeyField() const { return GetNativeField(this, "AShooterGameMode", "AlarmNotificationKey"); } - void SetAlarmNotificationKeyField(FString newValue) { SetNativeField(this, "AShooterGameMode", "AlarmNotificationKey", newValue); } - FString GetAlarmNotificationURLField() const { return GetNativeField(this, "AShooterGameMode", "AlarmNotificationURL"); } - void SetAlarmNotificationURLField(FString newValue) { SetNativeField(this, "AShooterGameMode", "AlarmNotificationURL", newValue); } - FString GetBanFileNameField() const { return GetNativeField(this, "AShooterGameMode", "BanFileName"); } - void SetBanFileNameField(FString newValue) { SetNativeField(this, "AShooterGameMode", "BanFileName", newValue); } - //TMap> GetBannedMapField() const { return GetNativeField>>(this, "AShooterGameMode", "BannedMap"); } - long double GetLastTimeCheckedForSaveBackupField() const { return GetNativeField(this, "AShooterGameMode", "LastTimeCheckedForSaveBackup"); } - void SetLastTimeCheckedForSaveBackupField(long double newValue) { SetNativeField(this, "AShooterGameMode", "LastTimeCheckedForSaveBackup", newValue); } - int GetLastDayOfYearBackedUpField() const { return GetNativeField(this, "AShooterGameMode", "LastDayOfYearBackedUp"); } - void SetLastDayOfYearBackedUpField(int newValue) { SetNativeField(this, "AShooterGameMode", "LastDayOfYearBackedUp", newValue); } - long double GetTimeLastStartedDoingRemoteBackupField() const { return GetNativeField(this, "AShooterGameMode", "TimeLastStartedDoingRemoteBackup"); } - void SetTimeLastStartedDoingRemoteBackupField(long double newValue) { SetNativeField(this, "AShooterGameMode", "TimeLastStartedDoingRemoteBackup", newValue); } - bool GetInitiatedArkTributeAvailabilityCheckField() const { return GetNativeField(this, "AShooterGameMode", "InitiatedArkTributeAvailabilityCheck"); } - void SetInitiatedArkTributeAvailabilityCheckField(bool newValue) { SetNativeField(this, "AShooterGameMode", "InitiatedArkTributeAvailabilityCheck", newValue); } - URCONServer* GetRCONSocketField() const { return GetNativeField(this, "AShooterGameMode", "RCONSocket"); } - void SetRCONSocketField(URCONServer* newValue) { SetNativeField(this, "AShooterGameMode", "RCONSocket", newValue); } - FString GetPlayersJoinNoCheckFilenameField() const { return GetNativeField(this, "AShooterGameMode", "PlayersJoinNoCheckFilename"); } - void SetPlayersJoinNoCheckFilenameField(FString newValue) { SetNativeField(this, "AShooterGameMode", "PlayersJoinNoCheckFilename", newValue); } - FString GetPlayersExclusiveCheckFilenameField() const { return GetNativeField(this, "AShooterGameMode", "PlayersExclusiveCheckFilename"); } - void SetPlayersExclusiveCheckFilenameField(FString newValue) { SetNativeField(this, "AShooterGameMode", "PlayersExclusiveCheckFilename", newValue); } - int GetTerrainGeneratorVersionField() const { return GetNativeField(this, "AShooterGameMode", "TerrainGeneratorVersion"); } - void SetTerrainGeneratorVersionField(int newValue) { SetNativeField(this, "AShooterGameMode", "TerrainGeneratorVersion", newValue); } - //TArray GetPlayersJoinNoCheckField() const { return GetNativeField>(this, "AShooterGameMode", "PlayersJoinNoCheck"); } - //TArray GetPlayersExclusiveListField() const { return GetNativeField>(this, "AShooterGameMode", "PlayersExclusiveList"); } - TArray GetUsedPlayerStartsField() const { return GetNativeField>(this, "AShooterGameMode", "UsedPlayerStarts"); } - void SetUsedPlayerStartsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "UsedPlayerStarts", newValue); } - void* GetGameBackupPipeReadField() const { return GetNativeField(this, "AShooterGameMode", "GameBackupPipeRead"); } - void SetGameBackupPipeReadField(void* newValue) { SetNativeField(this, "AShooterGameMode", "GameBackupPipeRead", newValue); } - void* GetGameBackupPipeWriteField() const { return GetNativeField(this, "AShooterGameMode", "GameBackupPipeWrite"); } - void SetGameBackupPipeWriteField(void* newValue) { SetNativeField(this, "AShooterGameMode", "GameBackupPipeWrite", newValue); } - //TSet, FDefaultSetAllocator> GetTribesIdsField() const { return GetNativeField, FDefaultSetAllocator>>(this, "AShooterGameMode", "TribesIds"); } - //TMap> GetPlayersIdsField() const { return GetNativeField>>(this, "AShooterGameMode", "PlayersIds"); } - FString GetLaunchOptionsField() const { return GetNativeField(this, "AShooterGameMode", "LaunchOptions"); } - void SetLaunchOptionsField(FString newValue) { SetNativeField(this, "AShooterGameMode", "LaunchOptions", newValue); } - TArray GetTribesDataField() const { return GetNativeField>(this, "AShooterGameMode", "TribesData"); } - void SetTribesDataField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "TribesData", newValue); } - FString GetPGMapNameField() const { return GetNativeField(this, "AShooterGameMode", "PGMapName"); } - void SetPGMapNameField(FString newValue) { SetNativeField(this, "AShooterGameMode", "PGMapName", newValue); } - FString GetPGTerrainPropertiesStringField() const { return GetNativeField(this, "AShooterGameMode", "PGTerrainPropertiesString"); } - void SetPGTerrainPropertiesStringField(FString newValue) { SetNativeField(this, "AShooterGameMode", "PGTerrainPropertiesString", newValue); } - //TMap> GetPGTerrainPropertiesField() const { return GetNativeField>>(this, "AShooterGameMode", "PGTerrainProperties"); } - bool GetbAutoCreateNewPlayerDataField() const { return GetNativeField(this, "AShooterGameMode", "bAutoCreateNewPlayerData"); } - void SetbAutoCreateNewPlayerDataField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAutoCreateNewPlayerData", newValue); } - bool GetbIsRestartingField() const { return GetNativeField(this, "AShooterGameMode", "bIsRestarting"); } - void SetbIsRestartingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bIsRestarting", newValue); } - bool GetbProximityVoiceChatField() const { return GetNativeField(this, "AShooterGameMode", "bProximityVoiceChat"); } - void SetbProximityVoiceChatField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bProximityVoiceChat", newValue); } - bool GetbProximityChatField() const { return GetNativeField(this, "AShooterGameMode", "bProximityChat"); } - void SetbProximityChatField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bProximityChat", newValue); } - bool GetbAutoRestoreBackupsField() const { return GetNativeField(this, "AShooterGameMode", "bAutoRestoreBackups"); } - void SetbAutoRestoreBackupsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAutoRestoreBackups", newValue); } - float GetDifficultyValueField() const { return GetNativeField(this, "AShooterGameMode", "DifficultyValue"); } - void SetDifficultyValueField(float newValue) { SetNativeField(this, "AShooterGameMode", "DifficultyValue", newValue); } - float GetDifficultyValueMinField() const { return GetNativeField(this, "AShooterGameMode", "DifficultyValueMin"); } - void SetDifficultyValueMinField(float newValue) { SetNativeField(this, "AShooterGameMode", "DifficultyValueMin", newValue); } - float GetDifficultyValueMaxField() const { return GetNativeField(this, "AShooterGameMode", "DifficultyValueMax"); } - void SetDifficultyValueMaxField(float newValue) { SetNativeField(this, "AShooterGameMode", "DifficultyValueMax", newValue); } - float GetProximityRadiusField() const { return GetNativeField(this, "AShooterGameMode", "ProximityRadius"); } - void SetProximityRadiusField(float newValue) { SetNativeField(this, "AShooterGameMode", "ProximityRadius", newValue); } - float GetProximityRadiusUnconsiousScaleField() const { return GetNativeField(this, "AShooterGameMode", "ProximityRadiusUnconsiousScale"); } - void SetProximityRadiusUnconsiousScaleField(float newValue) { SetNativeField(this, "AShooterGameMode", "ProximityRadiusUnconsiousScale", newValue); } - TSubclassOf GetCheatClassField() const { return GetNativeField>(this, "AShooterGameMode", "CheatClass"); } - void SetCheatClassField(TSubclassOf newValue) { SetNativeField(this, "AShooterGameMode", "CheatClass", newValue); } - bool GetbIsOfficialServerField() const { return GetNativeField(this, "AShooterGameMode", "bIsOfficialServer"); } - void SetbIsOfficialServerField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bIsOfficialServer", newValue); } - bool GetbServerAllowArkDownloadField() const { return GetNativeField(this, "AShooterGameMode", "bServerAllowArkDownload"); } - void SetbServerAllowArkDownloadField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerAllowArkDownload", newValue); } - bool GetbServerAllowThirdPersonPlayerField() const { return GetNativeField(this, "AShooterGameMode", "bServerAllowThirdPersonPlayer"); } - void SetbServerAllowThirdPersonPlayerField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerAllowThirdPersonPlayer", newValue); } - bool GetbUseExclusiveListField() const { return GetNativeField(this, "AShooterGameMode", "bUseExclusiveList"); } - void SetbUseExclusiveListField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bUseExclusiveList", newValue); } - bool GetbAlwaysNotifyPlayerLeftField() const { return GetNativeField(this, "AShooterGameMode", "bAlwaysNotifyPlayerLeft"); } - void SetbAlwaysNotifyPlayerLeftField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAlwaysNotifyPlayerLeft", newValue); } - bool GetbAlwaysNotifyPlayerJoinedField() const { return GetNativeField(this, "AShooterGameMode", "bAlwaysNotifyPlayerJoined"); } - void SetbAlwaysNotifyPlayerJoinedField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAlwaysNotifyPlayerJoined", newValue); } - bool GetbServerHardcoreField() const { return GetNativeField(this, "AShooterGameMode", "bServerHardcore"); } - void SetbServerHardcoreField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerHardcore", newValue); } - bool GetbServerPVEField() const { return GetNativeField(this, "AShooterGameMode", "bServerPVE"); } - void SetbServerPVEField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerPVE", newValue); } - bool GetbServerCrosshairField() const { return GetNativeField(this, "AShooterGameMode", "bServerCrosshair"); } - void SetbServerCrosshairField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerCrosshair", newValue); } - bool GetbServerForceNoHUDField() const { return GetNativeField(this, "AShooterGameMode", "bServerForceNoHUD"); } - void SetbServerForceNoHUDField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerForceNoHUD", newValue); } - bool GetbMapPlayerLocationField() const { return GetNativeField(this, "AShooterGameMode", "bMapPlayerLocation"); } - void SetbMapPlayerLocationField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bMapPlayerLocation", newValue); } - bool GetbAllowFlyerCarryPvEField() const { return GetNativeField(this, "AShooterGameMode", "bAllowFlyerCarryPvE"); } - void SetbAllowFlyerCarryPvEField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowFlyerCarryPvE", newValue); } - bool GetbDisableStructureDecayPvEField() const { return GetNativeField(this, "AShooterGameMode", "bDisableStructureDecayPvE"); } - void SetbDisableStructureDecayPvEField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableStructureDecayPvE", newValue); } - bool GetbDisableDinoDecayPvEField() const { return GetNativeField(this, "AShooterGameMode", "bDisableDinoDecayPvE"); } - void SetbDisableDinoDecayPvEField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableDinoDecayPvE", newValue); } - bool GetbEnablePvPGammaField() const { return GetNativeField(this, "AShooterGameMode", "bEnablePvPGamma"); } - void SetbEnablePvPGammaField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bEnablePvPGamma", newValue); } - bool GetbDisablePvEGammaField() const { return GetNativeField(this, "AShooterGameMode", "bDisablePvEGamma"); } - void SetbDisablePvEGammaField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisablePvEGamma", newValue); } - bool GetbClampResourceHarvestDamageField() const { return GetNativeField(this, "AShooterGameMode", "bClampResourceHarvestDamage"); } - void SetbClampResourceHarvestDamageField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bClampResourceHarvestDamage", newValue); } - bool GetbPreventStructurePaintingField() const { return GetNativeField(this, "AShooterGameMode", "bPreventStructurePainting"); } - void SetbPreventStructurePaintingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventStructurePainting", newValue); } - bool GetbAllowCaveBuildingPvEField() const { return GetNativeField(this, "AShooterGameMode", "bAllowCaveBuildingPvE"); } - void SetbAllowCaveBuildingPvEField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowCaveBuildingPvE", newValue); } - bool GetbAdminLoggingField() const { return GetNativeField(this, "AShooterGameMode", "bAdminLogging"); } - void SetbAdminLoggingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAdminLogging", newValue); } - bool GetbPvPStructureDecayField() const { return GetNativeField(this, "AShooterGameMode", "bPvPStructureDecay"); } - void SetbPvPStructureDecayField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvPStructureDecay", newValue); } - bool GetbAutoDestroyStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bAutoDestroyStructures"); } - void SetbAutoDestroyStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAutoDestroyStructures", newValue); } - bool GetbForceAllStructureLockingField() const { return GetNativeField(this, "AShooterGameMode", "bForceAllStructureLocking"); } - void SetbForceAllStructureLockingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bForceAllStructureLocking", newValue); } - bool GetbAllowDeprecatedStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bAllowDeprecatedStructures"); } - void SetbAllowDeprecatedStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowDeprecatedStructures", newValue); } - bool GetbPreventTribeAlliancesField() const { return GetNativeField(this, "AShooterGameMode", "bPreventTribeAlliances"); } - void SetbPreventTribeAlliancesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventTribeAlliances", newValue); } - bool GetbAllowHitMarkersField() const { return GetNativeField(this, "AShooterGameMode", "bAllowHitMarkers"); } - void SetbAllowHitMarkersField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowHitMarkers", newValue); } - bool GetbOnlyAutoDestroyCoreStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bOnlyAutoDestroyCoreStructures"); } - void SetbOnlyAutoDestroyCoreStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bOnlyAutoDestroyCoreStructures", newValue); } - bool GetbPreventMateBoostField() const { return GetNativeField(this, "AShooterGameMode", "bPreventMateBoost"); } - void SetbPreventMateBoostField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventMateBoost", newValue); } - bool GetbTribeLogDestroyedEnemyStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bTribeLogDestroyedEnemyStructures"); } - void SetbTribeLogDestroyedEnemyStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bTribeLogDestroyedEnemyStructures", newValue); } - bool GetbPvEAllowStructuresAtSupplyDropsField() const { return GetNativeField(this, "AShooterGameMode", "bPvEAllowStructuresAtSupplyDrops"); } - void SetbPvEAllowStructuresAtSupplyDropsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvEAllowStructuresAtSupplyDrops", newValue); } - int GetTheMaxStructuresInRangeField() const { return GetNativeField(this, "AShooterGameMode", "TheMaxStructuresInRange"); } - void SetTheMaxStructuresInRangeField(int newValue) { SetNativeField(this, "AShooterGameMode", "TheMaxStructuresInRange", newValue); } - int GetRCONPortField() const { return GetNativeField(this, "AShooterGameMode", "RCONPort"); } - void SetRCONPortField(int newValue) { SetNativeField(this, "AShooterGameMode", "RCONPort", newValue); } - float GetDayCycleSpeedScaleField() const { return GetNativeField(this, "AShooterGameMode", "DayCycleSpeedScale"); } - void SetDayCycleSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameMode", "DayCycleSpeedScale", newValue); } - float GetNightTimeSpeedScaleField() const { return GetNativeField(this, "AShooterGameMode", "NightTimeSpeedScale"); } - void SetNightTimeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameMode", "NightTimeSpeedScale", newValue); } - float GetDayTimeSpeedScaleField() const { return GetNativeField(this, "AShooterGameMode", "DayTimeSpeedScale"); } - void SetDayTimeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameMode", "DayTimeSpeedScale", newValue); } - float GetPvEStructureDecayPeriodMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PvEStructureDecayPeriodMultiplier"); } - void SetPvEStructureDecayPeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PvEStructureDecayPeriodMultiplier", newValue); } - float GetStructurePreventResourceRadiusMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "StructurePreventResourceRadiusMultiplier"); } - void SetStructurePreventResourceRadiusMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "StructurePreventResourceRadiusMultiplier", newValue); } - float GetPvEDinoDecayPeriodMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PvEDinoDecayPeriodMultiplier"); } - void SetPvEDinoDecayPeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PvEDinoDecayPeriodMultiplier", newValue); } - float GetResourcesRespawnPeriodMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "ResourcesRespawnPeriodMultiplier"); } - void SetResourcesRespawnPeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "ResourcesRespawnPeriodMultiplier", newValue); } - float GetMaxTamedDinosField() const { return GetNativeField(this, "AShooterGameMode", "MaxTamedDinos"); } - void SetMaxTamedDinosField(float newValue) { SetNativeField(this, "AShooterGameMode", "MaxTamedDinos", newValue); } - float GetListenServerTetherDistanceMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "ListenServerTetherDistanceMultiplier"); } - void SetListenServerTetherDistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "ListenServerTetherDistanceMultiplier", newValue); } - float GetPerPlatformMaxStructuresMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PerPlatformMaxStructuresMultiplier"); } - void SetPerPlatformMaxStructuresMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PerPlatformMaxStructuresMultiplier", newValue); } - float GetAutoDestroyOldStructuresMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "AutoDestroyOldStructuresMultiplier"); } - void SetAutoDestroyOldStructuresMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "AutoDestroyOldStructuresMultiplier", newValue); } - float GetRCONServerGameLogBufferField() const { return GetNativeField(this, "AShooterGameMode", "RCONServerGameLogBuffer"); } - void SetRCONServerGameLogBufferField(float newValue) { SetNativeField(this, "AShooterGameMode", "RCONServerGameLogBuffer", newValue); } - float GetKickIdlePlayersPeriodField() const { return GetNativeField(this, "AShooterGameMode", "KickIdlePlayersPeriod"); } - void SetKickIdlePlayersPeriodField(float newValue) { SetNativeField(this, "AShooterGameMode", "KickIdlePlayersPeriod", newValue); } - float GetMateBoostEffectMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "MateBoostEffectMultiplier"); } - void SetMateBoostEffectMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "MateBoostEffectMultiplier", newValue); } - float GetAutoSavePeriodMinutesField() const { return GetNativeField(this, "AShooterGameMode", "AutoSavePeriodMinutes"); } - void SetAutoSavePeriodMinutesField(float newValue) { SetNativeField(this, "AShooterGameMode", "AutoSavePeriodMinutes", newValue); } - float GetXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "XPMultiplier"); } - void SetXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "XPMultiplier", newValue); } - float GetKillXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "KillXPMultiplier"); } - void SetKillXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "KillXPMultiplier", newValue); } - float GetHarvestXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "HarvestXPMultiplier"); } - void SetHarvestXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "HarvestXPMultiplier", newValue); } - float GetCraftXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CraftXPMultiplier"); } - void SetCraftXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CraftXPMultiplier", newValue); } - float GetGenericXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "GenericXPMultiplier"); } - void SetGenericXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "GenericXPMultiplier", newValue); } - float GetSpecialXPMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "SpecialXPMultiplier"); } - void SetSpecialXPMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "SpecialXPMultiplier", newValue); } - float GetRandomAutoSaveSpreadField() const { return GetNativeField(this, "AShooterGameMode", "RandomAutoSaveSpread"); } - void SetRandomAutoSaveSpreadField(float newValue) { SetNativeField(this, "AShooterGameMode", "RandomAutoSaveSpread", newValue); } - FString GetSteamAPIKeyField() const { return GetNativeField(this, "AShooterGameMode", "SteamAPIKey"); } - void SetSteamAPIKeyField(FString newValue) { SetNativeField(this, "AShooterGameMode", "SteamAPIKey", newValue); } - FString GetLastServerNotificationMessageField() const { return GetNativeField(this, "AShooterGameMode", "LastServerNotificationMessage"); } - void SetLastServerNotificationMessageField(FString newValue) { SetNativeField(this, "AShooterGameMode", "LastServerNotificationMessage", newValue); } - long double GetLastServerNotificationRecievedAtField() const { return GetNativeField(this, "AShooterGameMode", "LastServerNotificationRecievedAt"); } - void SetLastServerNotificationRecievedAtField(long double newValue) { SetNativeField(this, "AShooterGameMode", "LastServerNotificationRecievedAt", newValue); } - long double GetLastExecSaveTimeField() const { return GetNativeField(this, "AShooterGameMode", "LastExecSaveTime"); } - void SetLastExecSaveTimeField(long double newValue) { SetNativeField(this, "AShooterGameMode", "LastExecSaveTime", newValue); } - long double GetLastTimeSavedWorldField() const { return GetNativeField(this, "AShooterGameMode", "LastTimeSavedWorld"); } - void SetLastTimeSavedWorldField(long double newValue) { SetNativeField(this, "AShooterGameMode", "LastTimeSavedWorld", newValue); } - FString GetLastClaimedGameCodeField() const { return GetNativeField(this, "AShooterGameMode", "LastClaimedGameCode"); } - void SetLastClaimedGameCodeField(FString newValue) { SetNativeField(this, "AShooterGameMode", "LastClaimedGameCode", newValue); } - TArray GetArkGameCodesField() const { return GetNativeField>(this, "AShooterGameMode", "ArkGameCodes"); } - void SetArkGameCodesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ArkGameCodes", newValue); } - bool GetbIsCurrentlyRequestingKeyField() const { return GetNativeField(this, "AShooterGameMode", "bIsCurrentlyRequestingKey"); } - void SetbIsCurrentlyRequestingKeyField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bIsCurrentlyRequestingKey", newValue); } - FString GetSaveDirectoryNameField() const { return GetNativeField(this, "AShooterGameMode", "SaveDirectoryName"); } - void SetSaveDirectoryNameField(FString newValue) { SetNativeField(this, "AShooterGameMode", "SaveDirectoryName", newValue); } - TArray GetPlayerDatasField() const { return GetNativeField>(this, "AShooterGameMode", "PlayerDatas"); } - void SetPlayerDatasField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "PlayerDatas", newValue); } - int GetNPCZoneManagerModField() const { return GetNativeField(this, "AShooterGameMode", "NPCZoneManagerMod"); } - void SetNPCZoneManagerModField(int newValue) { SetNativeField(this, "AShooterGameMode", "NPCZoneManagerMod", newValue); } - bool GetbPopulatingSpawnZonesField() const { return GetNativeField(this, "AShooterGameMode", "bPopulatingSpawnZones"); } - void SetbPopulatingSpawnZonesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPopulatingSpawnZones", newValue); } - bool GetbRestartedAPlayerField() const { return GetNativeField(this, "AShooterGameMode", "bRestartedAPlayer"); } - void SetbRestartedAPlayerField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bRestartedAPlayer", newValue); } - bool GetbForceRespawnDinosField() const { return GetNativeField(this, "AShooterGameMode", "bForceRespawnDinos"); } - void SetbForceRespawnDinosField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bForceRespawnDinos", newValue); } - bool GetbFirstSaveWorldField() const { return GetNativeField(this, "AShooterGameMode", "bFirstSaveWorld"); } - void SetbFirstSaveWorldField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bFirstSaveWorld", newValue); } - bool GetbAllowRaidDinoFeedingField() const { return GetNativeField(this, "AShooterGameMode", "bAllowRaidDinoFeeding"); } - void SetbAllowRaidDinoFeedingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowRaidDinoFeeding", newValue); } - FDateTime GetLastBackupTimeField() const { return GetNativeField(this, "AShooterGameMode", "LastBackupTime"); } - void SetLastBackupTimeField(FDateTime newValue) { SetNativeField(this, "AShooterGameMode", "LastBackupTime", newValue); } - FDateTime GetLastSaveWorldTimeField() const { return GetNativeField(this, "AShooterGameMode", "LastSaveWorldTime"); } - void SetLastSaveWorldTimeField(FDateTime newValue) { SetNativeField(this, "AShooterGameMode", "LastSaveWorldTime", newValue); } - float GetTamedDinoDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "TamedDinoDamageMultiplier"); } - void SetTamedDinoDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "TamedDinoDamageMultiplier", newValue); } - float GetDinoDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoDamageMultiplier"); } - void SetDinoDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoDamageMultiplier", newValue); } - float GetPlayerDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerDamageMultiplier"); } - void SetPlayerDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerDamageMultiplier", newValue); } - float GetStructureDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "StructureDamageMultiplier"); } - void SetStructureDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "StructureDamageMultiplier", newValue); } - float GetPlayerResistanceMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerResistanceMultiplier"); } - void SetPlayerResistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerResistanceMultiplier", newValue); } - float GetDinoResistanceMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoResistanceMultiplier"); } - void SetDinoResistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoResistanceMultiplier", newValue); } - float GetTamedDinoResistanceMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "TamedDinoResistanceMultiplier"); } - void SetTamedDinoResistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "TamedDinoResistanceMultiplier", newValue); } - float GetStructureResistanceMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "StructureResistanceMultiplier"); } - void SetStructureResistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "StructureResistanceMultiplier", newValue); } - bool GetbJoinInProgressGamesAsSpectatorField() const { return GetNativeField(this, "AShooterGameMode", "bJoinInProgressGamesAsSpectator"); } - void SetbJoinInProgressGamesAsSpectatorField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bJoinInProgressGamesAsSpectator", newValue); } - float GetTamingSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "TamingSpeedMultiplier"); } - void SetTamingSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "TamingSpeedMultiplier", newValue); } - float GetHarvestAmountMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "HarvestAmountMultiplier"); } - void SetHarvestAmountMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "HarvestAmountMultiplier", newValue); } - float GetHarvestHealthMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "HarvestHealthMultiplier"); } - void SetHarvestHealthMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "HarvestHealthMultiplier", newValue); } - float GetPlayerCharacterWaterDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerCharacterWaterDrainMultiplier"); } - void SetPlayerCharacterWaterDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerCharacterWaterDrainMultiplier", newValue); } - float GetPlayerCharacterFoodDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerCharacterFoodDrainMultiplier"); } - void SetPlayerCharacterFoodDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerCharacterFoodDrainMultiplier", newValue); } - float GetDinoCharacterFoodDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoCharacterFoodDrainMultiplier"); } - void SetDinoCharacterFoodDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoCharacterFoodDrainMultiplier", newValue); } - float GetRaidDinoCharacterFoodDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "RaidDinoCharacterFoodDrainMultiplier"); } - void SetRaidDinoCharacterFoodDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "RaidDinoCharacterFoodDrainMultiplier", newValue); } - float GetPlayerCharacterStaminaDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerCharacterStaminaDrainMultiplier"); } - void SetPlayerCharacterStaminaDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerCharacterStaminaDrainMultiplier", newValue); } - float GetDinoCharacterStaminaDrainMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoCharacterStaminaDrainMultiplier"); } - void SetDinoCharacterStaminaDrainMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoCharacterStaminaDrainMultiplier", newValue); } - float GetPlayerCharacterHealthRecoveryMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerCharacterHealthRecoveryMultiplier"); } - void SetPlayerCharacterHealthRecoveryMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerCharacterHealthRecoveryMultiplier", newValue); } - float GetDinoCharacterHealthRecoveryMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoCharacterHealthRecoveryMultiplier"); } - void SetDinoCharacterHealthRecoveryMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoCharacterHealthRecoveryMultiplier", newValue); } - float GetCarnivoreNaturalTargetingRangeMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CarnivoreNaturalTargetingRangeMultiplier"); } - void SetCarnivoreNaturalTargetingRangeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CarnivoreNaturalTargetingRangeMultiplier", newValue); } - float GetCarnivorePlayerAggroMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CarnivorePlayerAggroMultiplier"); } - void SetCarnivorePlayerAggroMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CarnivorePlayerAggroMultiplier", newValue); } - float GetHerbivoreNaturalTargetingRangeMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "HerbivoreNaturalTargetingRangeMultiplier"); } - void SetHerbivoreNaturalTargetingRangeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "HerbivoreNaturalTargetingRangeMultiplier", newValue); } - float GetHerbivorePlayerAggroMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "HerbivorePlayerAggroMultiplier"); } - void SetHerbivorePlayerAggroMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "HerbivorePlayerAggroMultiplier", newValue); } - bool GetAIForceTargetPlayersField() const { return GetNativeField(this, "AShooterGameMode", "AIForceTargetPlayers"); } - void SetAIForceTargetPlayersField(bool newValue) { SetNativeField(this, "AShooterGameMode", "AIForceTargetPlayers", newValue); } - bool GetAIForceOverlapCheckField() const { return GetNativeField(this, "AShooterGameMode", "AIForceOverlapCheck"); } - void SetAIForceOverlapCheckField(bool newValue) { SetNativeField(this, "AShooterGameMode", "AIForceOverlapCheck", newValue); } - float GetDinoCountMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoCountMultiplier"); } - void SetDinoCountMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoCountMultiplier", newValue); } - bool GetbDisableSaveLoadField() const { return GetNativeField(this, "AShooterGameMode", "bDisableSaveLoad"); } - void SetbDisableSaveLoadField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableSaveLoad", newValue); } - bool GetbDisableXPField() const { return GetNativeField(this, "AShooterGameMode", "bDisableXP"); } - void SetbDisableXPField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableXP", newValue); } - bool GetbDisableDynamicMusicField() const { return GetNativeField(this, "AShooterGameMode", "bDisableDynamicMusic"); } - void SetbDisableDynamicMusicField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableDynamicMusic", newValue); } - TArray GetPlayerDeathReasonsField() const { return GetNativeField>(this, "AShooterGameMode", "PlayerDeathReasons"); } - void SetPlayerDeathReasonsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "PlayerDeathReasons", newValue); } - - /*TArray GetLevelExperienceRampOverridesField() const { return GetNativeField>(this, "AShooterGameMode", "LevelExperienceRampOverrides"); } - void SetLevelExperienceRampOverridesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "LevelExperienceRampOverrides", newValue); } - TArray GetOverridePlayerLevelEngramPointsField() const { return GetNativeField>(this, "AShooterGameMode", "OverridePlayerLevelEngramPoints"); } - void SetOverridePlayerLevelEngramPointsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "OverridePlayerLevelEngramPoints", newValue); } - TArray GetExcludeItemIndicesField() const { return GetNativeField>(this, "AShooterGameMode", "ExcludeItemIndices"); } - void SetExcludeItemIndicesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ExcludeItemIndices", newValue); } - TArray GetOverrideEngramEntriesField() const { return GetNativeField>(this, "AShooterGameMode", "OverrideEngramEntries"); } - void SetOverrideEngramEntriesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "OverrideEngramEntries", newValue); } - TArray GetOverrideNamedEngramEntriesField() const { return GetNativeField>(this, "AShooterGameMode", "OverrideNamedEngramEntries"); } - void SetOverrideNamedEngramEntriesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "OverrideNamedEngramEntries", newValue); } - TArray GetPreventDinoTameClassNamesField() const { return GetNativeField>(this, "AShooterGameMode", "PreventDinoTameClassNames"); } - void SetPreventDinoTameClassNamesField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "PreventDinoTameClassNames", newValue); } - TArray GetDinoSpawnWeightMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "DinoSpawnWeightMultipliers"); } - void SetDinoSpawnWeightMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "DinoSpawnWeightMultipliers", newValue); } - TArray GetDinoClassResistanceMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "DinoClassResistanceMultipliers"); } - void SetDinoClassResistanceMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "DinoClassResistanceMultipliers", newValue); } - TArray GetTamedDinoClassResistanceMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "TamedDinoClassResistanceMultipliers"); } - void SetTamedDinoClassResistanceMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "TamedDinoClassResistanceMultipliers", newValue); } - TArray GetDinoClassDamageMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "DinoClassDamageMultipliers"); } - void SetDinoClassDamageMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "DinoClassDamageMultipliers", newValue); } - TArray GetTamedDinoClassDamageMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "TamedDinoClassDamageMultipliers"); } - void SetTamedDinoClassDamageMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "TamedDinoClassDamageMultipliers", newValue); } - TArray GetHarvestResourceItemAmountClassMultipliersField() const { return GetNativeField>(this, "AShooterGameMode", "HarvestResourceItemAmountClassMultipliers"); } - void SetHarvestResourceItemAmountClassMultipliersField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "HarvestResourceItemAmountClassMultipliers", newValue); } - TArray GetNPCReplacementsField() const { return GetNativeField>(this, "AShooterGameMode", "NPCReplacements"); } - void SetNPCReplacementsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "NPCReplacements", newValue); }*/ - float GetPvPZoneStructureDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PvPZoneStructureDamageMultiplier"); } - void SetPvPZoneStructureDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PvPZoneStructureDamageMultiplier", newValue); } - bool GetbOnlyAllowSpecifiedEngramsField() const { return GetNativeField(this, "AShooterGameMode", "bOnlyAllowSpecifiedEngrams"); } - void SetbOnlyAllowSpecifiedEngramsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bOnlyAllowSpecifiedEngrams", newValue); } - int GetOverrideMaxExperiencePointsPlayerField() const { return GetNativeField(this, "AShooterGameMode", "OverrideMaxExperiencePointsPlayer"); } - void SetOverrideMaxExperiencePointsPlayerField(int newValue) { SetNativeField(this, "AShooterGameMode", "OverrideMaxExperiencePointsPlayer", newValue); } - int GetOverrideMaxExperiencePointsDinoField() const { return GetNativeField(this, "AShooterGameMode", "OverrideMaxExperiencePointsDino"); } - void SetOverrideMaxExperiencePointsDinoField(int newValue) { SetNativeField(this, "AShooterGameMode", "OverrideMaxExperiencePointsDino", newValue); } - float GetGlobalSpoilingTimeMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "GlobalSpoilingTimeMultiplier"); } - void SetGlobalSpoilingTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "GlobalSpoilingTimeMultiplier", newValue); } - float GetGlobalItemDecompositionTimeMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "GlobalItemDecompositionTimeMultiplier"); } - void SetGlobalItemDecompositionTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "GlobalItemDecompositionTimeMultiplier", newValue); } - float GetGlobalCorpseDecompositionTimeMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "GlobalCorpseDecompositionTimeMultiplier"); } - void SetGlobalCorpseDecompositionTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "GlobalCorpseDecompositionTimeMultiplier", newValue); } - float GetMaxFallSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "MaxFallSpeedMultiplier"); } - void SetMaxFallSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "MaxFallSpeedMultiplier", newValue); } - bool GetbAutoPvETimerField() const { return GetNativeField(this, "AShooterGameMode", "bAutoPvETimer"); } - void SetbAutoPvETimerField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAutoPvETimer", newValue); } - bool GetbAutoPvEUseSystemTimeField() const { return GetNativeField(this, "AShooterGameMode", "bAutoPvEUseSystemTime"); } - void SetbAutoPvEUseSystemTimeField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAutoPvEUseSystemTime", newValue); } - bool GetbUsingStructureDestructionTagField() const { return GetNativeField(this, "AShooterGameMode", "bUsingStructureDestructionTag"); } - void SetbUsingStructureDestructionTagField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bUsingStructureDestructionTag", newValue); } - FName GetStructureDestructionTagField() const { return GetNativeField(this, "AShooterGameMode", "StructureDestructionTag"); } - void SetStructureDestructionTagField(FName newValue) { SetNativeField(this, "AShooterGameMode", "StructureDestructionTag", newValue); } - float GetAutoPvEStartTimeSecondsField() const { return GetNativeField(this, "AShooterGameMode", "AutoPvEStartTimeSeconds"); } - void SetAutoPvEStartTimeSecondsField(float newValue) { SetNativeField(this, "AShooterGameMode", "AutoPvEStartTimeSeconds", newValue); } - float GetAutoPvEStopTimeSecondsField() const { return GetNativeField(this, "AShooterGameMode", "AutoPvEStopTimeSeconds"); } - void SetAutoPvEStopTimeSecondsField(float newValue) { SetNativeField(this, "AShooterGameMode", "AutoPvEStopTimeSeconds", newValue); } - int GetTributeItemExpirationSecondsField() const { return GetNativeField(this, "AShooterGameMode", "TributeItemExpirationSeconds"); } - void SetTributeItemExpirationSecondsField(int newValue) { SetNativeField(this, "AShooterGameMode", "TributeItemExpirationSeconds", newValue); } - int GetTributeDinoExpirationSecondsField() const { return GetNativeField(this, "AShooterGameMode", "TributeDinoExpirationSeconds"); } - void SetTributeDinoExpirationSecondsField(int newValue) { SetNativeField(this, "AShooterGameMode", "TributeDinoExpirationSeconds", newValue); } - int GetTributeCharacterExpirationSecondsField() const { return GetNativeField(this, "AShooterGameMode", "TributeCharacterExpirationSeconds"); } - void SetTributeCharacterExpirationSecondsField(int newValue) { SetNativeField(this, "AShooterGameMode", "TributeCharacterExpirationSeconds", newValue); } - bool GetPreventDownloadSurvivorsField() const { return GetNativeField(this, "AShooterGameMode", "PreventDownloadSurvivors"); } - void SetPreventDownloadSurvivorsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "PreventDownloadSurvivors", newValue); } - bool GetPreventDownloadItemsField() const { return GetNativeField(this, "AShooterGameMode", "PreventDownloadItems"); } - void SetPreventDownloadItemsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "PreventDownloadItems", newValue); } - bool GetPreventDownloadDinosField() const { return GetNativeField(this, "AShooterGameMode", "PreventDownloadDinos"); } - void SetPreventDownloadDinosField(bool newValue) { SetNativeField(this, "AShooterGameMode", "PreventDownloadDinos", newValue); } - bool GetbPreventUploadSurvivorsField() const { return GetNativeField(this, "AShooterGameMode", "bPreventUploadSurvivors"); } - void SetbPreventUploadSurvivorsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventUploadSurvivors", newValue); } - bool GetbPreventUploadItemsField() const { return GetNativeField(this, "AShooterGameMode", "bPreventUploadItems"); } - void SetbPreventUploadItemsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventUploadItems", newValue); } - bool GetbPreventUploadDinosField() const { return GetNativeField(this, "AShooterGameMode", "bPreventUploadDinos"); } - void SetbPreventUploadDinosField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventUploadDinos", newValue); } - int GetMaxTributeItemsField() const { return GetNativeField(this, "AShooterGameMode", "MaxTributeItems"); } - void SetMaxTributeItemsField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxTributeItems", newValue); } - int GetMaxTributeDinosField() const { return GetNativeField(this, "AShooterGameMode", "MaxTributeDinos"); } - void SetMaxTributeDinosField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxTributeDinos", newValue); } - int GetMaxTributeCharactersField() const { return GetNativeField(this, "AShooterGameMode", "MaxTributeCharacters"); } - void SetMaxTributeCharactersField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxTributeCharacters", newValue); } - bool GetbIncreasePvPRespawnIntervalField() const { return GetNativeField(this, "AShooterGameMode", "bIncreasePvPRespawnInterval"); } - void SetbIncreasePvPRespawnIntervalField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bIncreasePvPRespawnInterval", newValue); } - float GetIncreasePvPRespawnIntervalCheckPeriodField() const { return GetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalCheckPeriod"); } - void SetIncreasePvPRespawnIntervalCheckPeriodField(float newValue) { SetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalCheckPeriod", newValue); } - float GetIncreasePvPRespawnIntervalMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalMultiplier"); } - void SetIncreasePvPRespawnIntervalMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalMultiplier", newValue); } - float GetIncreasePvPRespawnIntervalBaseAmountField() const { return GetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalBaseAmount"); } - void SetIncreasePvPRespawnIntervalBaseAmountField(float newValue) { SetNativeField(this, "AShooterGameMode", "IncreasePvPRespawnIntervalBaseAmount", newValue); } - float GetResourceNoReplenishRadiusStructuresField() const { return GetNativeField(this, "AShooterGameMode", "ResourceNoReplenishRadiusStructures"); } - void SetResourceNoReplenishRadiusStructuresField(float newValue) { SetNativeField(this, "AShooterGameMode", "ResourceNoReplenishRadiusStructures", newValue); } - float GetResourceNoReplenishRadiusPlayersField() const { return GetNativeField(this, "AShooterGameMode", "ResourceNoReplenishRadiusPlayers"); } - void SetResourceNoReplenishRadiusPlayersField(float newValue) { SetNativeField(this, "AShooterGameMode", "ResourceNoReplenishRadiusPlayers", newValue); } - float GetCropGrowthSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CropGrowthSpeedMultiplier"); } - void SetCropGrowthSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CropGrowthSpeedMultiplier", newValue); } - float GetLayEggIntervalMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "LayEggIntervalMultiplier"); } - void SetLayEggIntervalMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "LayEggIntervalMultiplier", newValue); } - float GetPoopIntervalMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PoopIntervalMultiplier"); } - void SetPoopIntervalMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PoopIntervalMultiplier", newValue); } - float GetCropDecaySpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CropDecaySpeedMultiplier"); } - void SetCropDecaySpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CropDecaySpeedMultiplier", newValue); } - bool GetbAllowChatFromDeadNonAdminsField() const { return GetNativeField(this, "AShooterGameMode", "bAllowChatFromDeadNonAdmins"); } - void SetbAllowChatFromDeadNonAdminsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowChatFromDeadNonAdmins", newValue); } - bool GetbAllowDisablingSpectatorField() const { return GetNativeField(this, "AShooterGameMode", "bAllowDisablingSpectator"); } - void SetbAllowDisablingSpectatorField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowDisablingSpectator", newValue); } - bool GetbPvEDisableFriendlyFireField() const { return GetNativeField(this, "AShooterGameMode", "bPvEDisableFriendlyFire"); } - void SetbPvEDisableFriendlyFireField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvEDisableFriendlyFire", newValue); } - bool GetbFlyerPlatformAllowUnalignedDinoBasingField() const { return GetNativeField(this, "AShooterGameMode", "bFlyerPlatformAllowUnalignedDinoBasing"); } - void SetbFlyerPlatformAllowUnalignedDinoBasingField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bFlyerPlatformAllowUnalignedDinoBasing", newValue); } - int GetMaxPerTribePlatformSaddleStructureLimitField() const { return GetNativeField(this, "AShooterGameMode", "MaxPerTribePlatformSaddleStructureLimit"); } - void SetMaxPerTribePlatformSaddleStructureLimitField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxPerTribePlatformSaddleStructureLimit", newValue); } - int GetMaxPlatformSaddleStructureLimitField() const { return GetNativeField(this, "AShooterGameMode", "MaxPlatformSaddleStructureLimit"); } - void SetMaxPlatformSaddleStructureLimitField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxPlatformSaddleStructureLimit", newValue); } - int GetMaxDinoBaseLevelField() const { return GetNativeField(this, "AShooterGameMode", "MaxDinoBaseLevel"); } - void SetMaxDinoBaseLevelField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxDinoBaseLevel", newValue); } - int GetMaxNumberOfPlayersInTribeField() const { return GetNativeField(this, "AShooterGameMode", "MaxNumberOfPlayersInTribe"); } - void SetMaxNumberOfPlayersInTribeField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxNumberOfPlayersInTribe", newValue); } - float GetMatingIntervalMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "MatingIntervalMultiplier"); } - void SetMatingIntervalMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "MatingIntervalMultiplier", newValue); } - float GetEggHatchSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "EggHatchSpeedMultiplier"); } - void SetEggHatchSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "EggHatchSpeedMultiplier", newValue); } - float GetBabyMatureSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyMatureSpeedMultiplier"); } - void SetBabyMatureSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyMatureSpeedMultiplier", newValue); } - float GetBabyFoodConsumptionSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyFoodConsumptionSpeedMultiplier"); } - void SetBabyFoodConsumptionSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyFoodConsumptionSpeedMultiplier", newValue); } - int GetCurrentPlatformSaddleStructuresField() const { return GetNativeField(this, "AShooterGameMode", "CurrentPlatformSaddleStructures"); } - void SetCurrentPlatformSaddleStructuresField(int newValue) { SetNativeField(this, "AShooterGameMode", "CurrentPlatformSaddleStructures", newValue); } - - /*float[12] GetPerLevelStatsMultiplier_PlayerField() const { return GetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_Player"); } - void SetPerLevelStatsMultiplier_PlayerField(float[12] newValue) { SetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_Player", newValue); } - float[12] GetPerLevelStatsMultiplier_DinoTamedField() const { return GetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed"); } - void SetPerLevelStatsMultiplier_DinoTamedField(float[12] newValue) { SetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed", newValue); } - float[12] GetPerLevelStatsMultiplier_DinoTamed_AddField() const { return GetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed_Add"); } - void SetPerLevelStatsMultiplier_DinoTamed_AddField(float[12] newValue) { SetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed_Add", newValue); } - float[12] GetPerLevelStatsMultiplier_DinoTamed_AffinityField() const { return GetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed_Affinity"); } - void SetPerLevelStatsMultiplier_DinoTamed_AffinityField(float[12] newValue) { SetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoTamed_Affinity", newValue); } - float[12] GetPerLevelStatsMultiplier_DinoWildField() const { return GetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoWild"); } - void SetPerLevelStatsMultiplier_DinoWildField(float[12] newValue) { SetNativeField(this, "AShooterGameMode", "PerLevelStatsMultiplier_DinoWild", newValue); }*/ - bool GetbCustomGameModeAllowSpectatorJoinAfterMatchStartField() const { return GetNativeField(this, "AShooterGameMode", "bCustomGameModeAllowSpectatorJoinAfterMatchStart"); } - void SetbCustomGameModeAllowSpectatorJoinAfterMatchStartField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bCustomGameModeAllowSpectatorJoinAfterMatchStart", newValue); } - bool GetbGameplayLogEnabledField() const { return GetNativeField(this, "AShooterGameMode", "bGameplayLogEnabled"); } - void SetbGameplayLogEnabledField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bGameplayLogEnabled", newValue); } - bool GetbServerGameLogEnabledField() const { return GetNativeField(this, "AShooterGameMode", "bServerGameLogEnabled"); } - void SetbServerGameLogEnabledField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerGameLogEnabled", newValue); } - TSubclassOf GetBonusSupplyCrateItemClassField() const { return GetNativeField>(this, "AShooterGameMode", "BonusSupplyCrateItemClass"); } - void SetBonusSupplyCrateItemClassField(TSubclassOf newValue) { SetNativeField(this, "AShooterGameMode", "BonusSupplyCrateItemClass", newValue); } - float GetBonusSupplyCrateItemGiveIntervalField() const { return GetNativeField(this, "AShooterGameMode", "BonusSupplyCrateItemGiveInterval"); } - void SetBonusSupplyCrateItemGiveIntervalField(float newValue) { SetNativeField(this, "AShooterGameMode", "BonusSupplyCrateItemGiveInterval", newValue); } - float GetStructureDamageRepairCooldownField() const { return GetNativeField(this, "AShooterGameMode", "StructureDamageRepairCooldown"); } - void SetStructureDamageRepairCooldownField(float newValue) { SetNativeField(this, "AShooterGameMode", "StructureDamageRepairCooldown", newValue); } - float GetCustomRecipeEffectivenessMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CustomRecipeEffectivenessMultiplier"); } - void SetCustomRecipeEffectivenessMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CustomRecipeEffectivenessMultiplier", newValue); } - float GetCustomRecipeSkillMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "CustomRecipeSkillMultiplier"); } - void SetCustomRecipeSkillMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "CustomRecipeSkillMultiplier", newValue); } - FString GetBonusSupplyCrateItemStringField() const { return GetNativeField(this, "AShooterGameMode", "BonusSupplyCrateItemString"); } - void SetBonusSupplyCrateItemStringField(FString newValue) { SetNativeField(this, "AShooterGameMode", "BonusSupplyCrateItemString", newValue); } - bool GetbPvEAllowTribeWarField() const { return GetNativeField(this, "AShooterGameMode", "bPvEAllowTribeWar"); } - void SetbPvEAllowTribeWarField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvEAllowTribeWar", newValue); } - bool GetbPvEAllowTribeWarCancelField() const { return GetNativeField(this, "AShooterGameMode", "bPvEAllowTribeWarCancel"); } - void SetbPvEAllowTribeWarCancelField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvEAllowTribeWarCancel", newValue); } - bool GetbAllowCustomRecipesField() const { return GetNativeField(this, "AShooterGameMode", "bAllowCustomRecipes"); } - void SetbAllowCustomRecipesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowCustomRecipes", newValue); } - bool GetbPassiveDefensesDamageRiderlessDinosField() const { return GetNativeField(this, "AShooterGameMode", "bPassiveDefensesDamageRiderlessDinos"); } - void SetbPassiveDefensesDamageRiderlessDinosField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPassiveDefensesDamageRiderlessDinos", newValue); } - long double GetLastBonusSupplyCrateItemGiveTimeField() const { return GetNativeField(this, "AShooterGameMode", "LastBonusSupplyCrateItemGiveTime"); } - void SetLastBonusSupplyCrateItemGiveTimeField(long double newValue) { SetNativeField(this, "AShooterGameMode", "LastBonusSupplyCrateItemGiveTime", newValue); } - bool GetbEnableDeathTeamSpectatorField() const { return GetNativeField(this, "AShooterGameMode", "bEnableDeathTeamSpectator"); } - void SetbEnableDeathTeamSpectatorField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bEnableDeathTeamSpectator", newValue); } - bool GetbTribeStoreCharacterConfigurationField() const { return GetNativeField(this, "AShooterGameMode", "bTribeStoreCharacterConfiguration"); } - void SetbTribeStoreCharacterConfigurationField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bTribeStoreCharacterConfiguration", newValue); } - //TMap, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0>> GetPvEActiveTribeWarsField() const { return GetNativeField, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0>>>(this, "AShooterGameMode", "PvEActiveTribeWars"); } - //TMap, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0>> GetTribeAlliesField() const { return GetNativeField, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0>>>(this, "AShooterGameMode", "TribeAllies"); } - int GetMaxTribeLogsField() const { return GetNativeField(this, "AShooterGameMode", "MaxTribeLogs"); } - void SetMaxTribeLogsField(int newValue) { SetNativeField(this, "AShooterGameMode", "MaxTribeLogs", newValue); } - TArray GetCachedGameLogField() const { return GetNativeField>(this, "AShooterGameMode", "CachedGameLog"); } - void SetCachedGameLogField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "CachedGameLog", newValue); } - bool GetbDisableFriendlyFireField() const { return GetNativeField(this, "AShooterGameMode", "bDisableFriendlyFire"); } - void SetbDisableFriendlyFireField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableFriendlyFire", newValue); } - bool GetbAllowInactiveTribesField() const { return GetNativeField(this, "AShooterGameMode", "bAllowInactiveTribes"); } - void SetbAllowInactiveTribesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowInactiveTribes", newValue); } - bool GetbForceMapPlayerLocationField() const { return GetNativeField(this, "AShooterGameMode", "bForceMapPlayerLocation"); } - void SetbForceMapPlayerLocationField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bForceMapPlayerLocation", newValue); } - float GetDinoHarvestingDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoHarvestingDamageMultiplier"); } - void SetDinoHarvestingDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoHarvestingDamageMultiplier", newValue); } - float GetPlayerHarvestingDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "PlayerHarvestingDamageMultiplier"); } - void SetPlayerHarvestingDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "PlayerHarvestingDamageMultiplier", newValue); } - float GetDinoTurretDamageMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "DinoTurretDamageMultiplier"); } - void SetDinoTurretDamageMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "DinoTurretDamageMultiplier", newValue); } - bool GetbDisableLootCratesField() const { return GetNativeField(this, "AShooterGameMode", "bDisableLootCrates"); } - void SetbDisableLootCratesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableLootCrates", newValue); } - float GetExtinctionEventTimeIntervalField() const { return GetNativeField(this, "AShooterGameMode", "ExtinctionEventTimeInterval"); } - void SetExtinctionEventTimeIntervalField(float newValue) { SetNativeField(this, "AShooterGameMode", "ExtinctionEventTimeInterval", newValue); } - bool GetbEnableExtraStructurePreventionVolumesField() const { return GetNativeField(this, "AShooterGameMode", "bEnableExtraStructurePreventionVolumes"); } - void SetbEnableExtraStructurePreventionVolumesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bEnableExtraStructurePreventionVolumes", newValue); } - unsigned int GetNextExtinctionEventUTCField() const { return GetNativeField(this, "AShooterGameMode", "NextExtinctionEventUTC"); } - void SetNextExtinctionEventUTCField(unsigned int newValue) { SetNativeField(this, "AShooterGameMode", "NextExtinctionEventUTC", newValue); } - bool GetbForceAllowCaveFlyersField() const { return GetNativeField(this, "AShooterGameMode", "bForceAllowCaveFlyers"); } - void SetbForceAllowCaveFlyersField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bForceAllowCaveFlyers", newValue); } - bool GetbDoExtinctionEventField() const { return GetNativeField(this, "AShooterGameMode", "bDoExtinctionEvent"); } - void SetbDoExtinctionEventField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDoExtinctionEvent", newValue); } - bool GetbPreventOfflinePvPField() const { return GetNativeField(this, "AShooterGameMode", "bPreventOfflinePvP"); } - void SetbPreventOfflinePvPField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventOfflinePvP", newValue); } - bool GetbPvPDinoDecayField() const { return GetNativeField(this, "AShooterGameMode", "bPvPDinoDecay"); } - void SetbPvPDinoDecayField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPvPDinoDecay", newValue); } - bool GetbOverideStructurePlatformPreventionField() const { return GetNativeField(this, "AShooterGameMode", "bOverideStructurePlatformPrevention"); } - void SetbOverideStructurePlatformPreventionField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bOverideStructurePlatformPrevention", newValue); } - bool GetbAllowAnyoneBabyImprintCuddleField() const { return GetNativeField(this, "AShooterGameMode", "bAllowAnyoneBabyImprintCuddle"); } - void SetbAllowAnyoneBabyImprintCuddleField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowAnyoneBabyImprintCuddle", newValue); } - bool GetbDisableImprintDinoBuffField() const { return GetNativeField(this, "AShooterGameMode", "bDisableImprintDinoBuff"); } - void SetbDisableImprintDinoBuffField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDisableImprintDinoBuff", newValue); } - bool GetbShowFloatingDamageTextField() const { return GetNativeField(this, "AShooterGameMode", "bShowFloatingDamageText"); } - void SetbShowFloatingDamageTextField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bShowFloatingDamageText", newValue); } - bool GetbOnlyDecayUnsnappedCoreStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bOnlyDecayUnsnappedCoreStructures"); } - void SetbOnlyDecayUnsnappedCoreStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bOnlyDecayUnsnappedCoreStructures", newValue); } - bool GetbFastDecayUnsnappedCoreStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bFastDecayUnsnappedCoreStructures"); } - void SetbFastDecayUnsnappedCoreStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bFastDecayUnsnappedCoreStructures", newValue); } - bool GetbDestroyUnconnectedWaterPipesField() const { return GetNativeField(this, "AShooterGameMode", "bDestroyUnconnectedWaterPipes"); } - void SetbDestroyUnconnectedWaterPipesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bDestroyUnconnectedWaterPipes", newValue); } - bool GetbAllowCrateSpawnsOnTopOfStructuresField() const { return GetNativeField(this, "AShooterGameMode", "bAllowCrateSpawnsOnTopOfStructures"); } - void SetbAllowCrateSpawnsOnTopOfStructuresField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bAllowCrateSpawnsOnTopOfStructures", newValue); } - float GetPreventOfflinePvPIntervalField() const { return GetNativeField(this, "AShooterGameMode", "PreventOfflinePvPInterval"); } - void SetPreventOfflinePvPIntervalField(float newValue) { SetNativeField(this, "AShooterGameMode", "PreventOfflinePvPInterval", newValue); } - - /*TArray GetOverrideItemCraftingCostsField() const { return GetNativeField>(this, "AShooterGameMode", "OverrideItemCraftingCosts"); } - void SetOverrideItemCraftingCostsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "OverrideItemCraftingCosts", newValue); } - TArray GetConfigOverrideItemCraftingCostsField() const { return GetNativeField>(this, "AShooterGameMode", "ConfigOverrideItemCraftingCosts"); } - void SetConfigOverrideItemCraftingCostsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ConfigOverrideItemCraftingCosts", newValue); } - TArray GetConfigOverrideSupplyCrateItemsField() const { return GetNativeField>(this, "AShooterGameMode", "ConfigOverrideSupplyCrateItems"); } - void SetConfigOverrideSupplyCrateItemsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ConfigOverrideSupplyCrateItems", newValue); } - TArray GetConfigOverrideNPCSpawnEntriesContainerField() const { return GetNativeField>(this, "AShooterGameMode", "ConfigOverrideNPCSpawnEntriesContainer"); } - void SetConfigOverrideNPCSpawnEntriesContainerField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ConfigOverrideNPCSpawnEntriesContainer", newValue); } - TArray GetConfigAddNPCSpawnEntriesContainerField() const { return GetNativeField>(this, "AShooterGameMode", "ConfigAddNPCSpawnEntriesContainer"); } - void SetConfigAddNPCSpawnEntriesContainerField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ConfigAddNPCSpawnEntriesContainer", newValue); } - TArray GetConfigSubtractNPCSpawnEntriesContainerField() const { return GetNativeField>(this, "AShooterGameMode", "ConfigSubtractNPCSpawnEntriesContainer"); } - void SetConfigSubtractNPCSpawnEntriesContainerField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "ConfigSubtractNPCSpawnEntriesContainer", newValue); } - float GetBabyImprintingStatScaleMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyImprintingStatScaleMultiplier"); }*/ - void SetBabyImprintingStatScaleMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyImprintingStatScaleMultiplier", newValue); } - float GetBabyCuddleIntervalMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyCuddleIntervalMultiplier"); } - void SetBabyCuddleIntervalMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyCuddleIntervalMultiplier", newValue); } - float GetBabyCuddleGracePeriodMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyCuddleGracePeriodMultiplier"); } - void SetBabyCuddleGracePeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyCuddleGracePeriodMultiplier", newValue); } - float GetBabyCuddleLoseImprintQualitySpeedMultiplierField() const { return GetNativeField(this, "AShooterGameMode", "BabyCuddleLoseImprintQualitySpeedMultiplier"); } - void SetBabyCuddleLoseImprintQualitySpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameMode", "BabyCuddleLoseImprintQualitySpeedMultiplier", newValue); } - bool GetbPreventDiseasesField() const { return GetNativeField(this, "AShooterGameMode", "bPreventDiseases"); } - void SetbPreventDiseasesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bPreventDiseases", newValue); } - bool GetbNonPermanentDiseasesField() const { return GetNativeField(this, "AShooterGameMode", "bNonPermanentDiseases"); } - void SetbNonPermanentDiseasesField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bNonPermanentDiseases", newValue); } - int GetSaveForceRespawnDinosVersionField() const { return GetNativeField(this, "AShooterGameMode", "SaveForceRespawnDinosVersion"); } - void SetSaveForceRespawnDinosVersionField(int newValue) { SetNativeField(this, "AShooterGameMode", "SaveForceRespawnDinosVersion", newValue); } - unsigned __int64 GetServerIDField() const { return GetNativeField(this, "AShooterGameMode", "ServerID"); } - void SetServerIDField(unsigned __int64 newValue) { SetNativeField(this, "AShooterGameMode", "ServerID", newValue); } - int GetLoadForceRespawnDinosVersionField() const { return GetNativeField(this, "AShooterGameMode", "LoadForceRespawnDinosVersion"); } - void SetLoadForceRespawnDinosVersionField(int newValue) { SetNativeField(this, "AShooterGameMode", "LoadForceRespawnDinosVersion", newValue); } - bool GetbIsLoadedServerField() const { return GetNativeField(this, "AShooterGameMode", "bIsLoadedServer"); } - void SetbIsLoadedServerField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bIsLoadedServer", newValue); } - TArray GetSupportedSpawnRegionsField() const { return GetNativeField>(this, "AShooterGameMode", "SupportedSpawnRegions"); } - void SetSupportedSpawnRegionsField(TArray newValue) { SetNativeField(this, "AShooterGameMode", "SupportedSpawnRegions", newValue); } - bool GetbServerUseDinoListField() const { return GetNativeField(this, "AShooterGameMode", "bServerUseDinoList"); } - void SetbServerUseDinoListField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bServerUseDinoList", newValue); } - float GetMaxAllowedRespawnIntervalField() const { return GetNativeField(this, "AShooterGameMode", "MaxAllowedRespawnInterval"); } - void SetMaxAllowedRespawnIntervalField(float newValue) { SetNativeField(this, "AShooterGameMode", "MaxAllowedRespawnInterval", newValue); } - bool GetbUseDinoLevelUpAnimationsField() const { return GetNativeField(this, "AShooterGameMode", "bUseDinoLevelUpAnimations"); } - void SetbUseDinoLevelUpAnimationsField(bool newValue) { SetNativeField(this, "AShooterGameMode", "bUseDinoLevelUpAnimations", newValue); } - float GetMinimumDinoReuploadIntervalField() const { return GetNativeField(this, "AShooterGameMode", "MinimumDinoReuploadInterval"); } - void SetMinimumDinoReuploadIntervalField(float newValue) { SetNativeField(this, "AShooterGameMode", "MinimumDinoReuploadInterval", newValue); } - int GetNPCCountField() const { return GetNativeField(this, "AShooterGameMode", "NPCCount"); } - void SetNPCCountField(int newValue) { SetNativeField(this, "AShooterGameMode", "NPCCount", newValue); } - int GetNPCActiveCountField() const { return GetNativeField(this, "AShooterGameMode", "NPCActiveCount"); } - void SetNPCActiveCountField(int newValue) { SetNativeField(this, "AShooterGameMode", "NPCActiveCount", newValue); } - int GetSaveGameCustomVersionField() const { return GetNativeField(this, "AShooterGameMode", "SaveGameCustomVersion"); } - void SetSaveGameCustomVersionField(int newValue) { SetNativeField(this, "AShooterGameMode", "SaveGameCustomVersion", newValue); } - float GetOverrideOfficialDifficultyField() const { return GetNativeField(this, "AShooterGameMode", "OverrideOfficialDifficulty"); } - void SetOverrideOfficialDifficultyField(float newValue) { SetNativeField(this, "AShooterGameMode", "OverrideOfficialDifficulty", newValue); } - - // Functions - - bool AllowAddXP(UPrimalCharacterStatusComponent* forComp) { return NativeCall((DWORD64)this, "AShooterGameMode", "AllowAddXP", forComp); } - void CheckArkTributeAvailability() { NativeCall((DWORD64)this, "AShooterGameMode", "CheckArkTributeAvailability"); } - void ArkTributeAvailabilityRequestComplete() { NativeCall((DWORD64)this, "AShooterGameMode", "ArkTributeAvailabilityRequestComplete"); } - void InitGame(FString* MapName, FString* Options, FString* ErrorMessage) { NativeCall((DWORD64)this, "AShooterGameMode", "InitGame", MapName, Options, ErrorMessage); } - void InitOptionBool() { NativeCall((DWORD64)this, "AShooterGameMode", "InitOptionBool"); } - void InitOptionString() { NativeCall((DWORD64)this, "AShooterGameMode", "InitOptionString"); } - void InitOptionFloat() { NativeCall((DWORD64)this, "AShooterGameMode", "InitOptionFloat"); } - void InitOptionInteger() { NativeCall((DWORD64)this, "AShooterGameMode", "InitOptionInteger"); } - bool GetBoolOption(FString* Options, FString* ParseString, bool CurrentValue) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetBoolOption", Options, ParseString, CurrentValue); } - float GetFloatOption(FString* Options, FString* ParseString, float CurrentValue) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetFloatOption", Options, ParseString, CurrentValue); } - int GetIntOption(FString* Options, FString* ParseString, int CurrentValue) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetIntOption", Options, ParseString, CurrentValue); } - void InitOptions() { NativeCall((DWORD64)this, "AShooterGameMode", "InitOptions"); } - float GetFloatOptionIni() { return NativeCall((DWORD64)this, "AShooterGameMode", "GetFloatOptionIni"); } - int GetIntOptionIni() { return NativeCall((DWORD64)this, "AShooterGameMode", "GetIntOptionIni"); } - FString* GetStringOption() { return NativeCall((DWORD64)this, "AShooterGameMode", "GetStringOption"); } - void SaveWorld() { NativeCall((DWORD64)this, "AShooterGameMode", "SaveWorld"); } - void ClearSavesAndRestart() { NativeCall((DWORD64)this, "AShooterGameMode", "ClearSavesAndRestart"); } - bool LoadWorld() { return NativeCall((DWORD64)this, "AShooterGameMode", "LoadWorld"); } - TSubclassOf* GetGameSessionClass(TSubclassOf* result) { return NativeCall *, TSubclassOf *>((DWORD64)this, "AShooterGameMode", "GetGameSessionClass", result); } - void HandleMatchHasStarted() { NativeCall((DWORD64)this, "AShooterGameMode", "HandleMatchHasStarted"); } - void HandleLeavingMap() { NativeCall((DWORD64)this, "AShooterGameMode", "HandleLeavingMap"); } - void PostLogin(APlayerController* NewPlayer) { NativeCall((DWORD64)this, "AShooterGameMode", "PostLogin", NewPlayer); } - TArray* GetWhiteListedMap(TArray* result) { return NativeCall *, TArray *>((DWORD64)this, "AShooterGameMode", "GetWhiteListedMap", result); } - void Killed(AController* Killer, AController* KilledPlayer, APawn* KilledPawn, UDamageType* DamageType) { NativeCall((DWORD64)this, "AShooterGameMode", "Killed", Killer, KilledPlayer, KilledPawn, DamageType); } - TSubclassOf* GetDefaultPawnClassForController_Implementation(TSubclassOf* result, AController* InController) { return NativeCall *, TSubclassOf *, AController *>((DWORD64)this, "AShooterGameMode", "GetDefaultPawnClassForController_Implementation", result, InController); } - AActor* ChoosePlayerStart_Implementation(AController* Player) { return NativeCall((DWORD64)this, "AShooterGameMode", "ChoosePlayerStart_Implementation", Player); } - bool IsSpawnpointPreferred(APlayerStart* SpawnPoint, AController* Player) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsSpawnpointPreferred", SpawnPoint, Player); } - bool IsFirstPlayerSpawn(APlayerController* NewPlayer) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsFirstPlayerSpawn", NewPlayer); } - UPrimalPlayerData* GetPlayerData(FString* PlayerDataID) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetPlayerData", PlayerDataID); } - void StartNewPlayer(APlayerController* NewPlayer) { NativeCall((DWORD64)this, "AShooterGameMode", "StartNewPlayer", NewPlayer); } - void StartNewShooterPlayer(APlayerController* NewPlayer, bool bForceCreateNewPlayerData, bool bIsFromLogin, FPrimalPlayerCharacterConfigStruct* charConfig, UPrimalPlayerData* ArkPlayerData) { NativeCall((DWORD64)this, "AShooterGameMode", "StartNewShooterPlayer", NewPlayer, bForceCreateNewPlayerData, bIsFromLogin, charConfig, ArkPlayerData); } - void HandleTransferCharacterDialogResult(bool bAccept, AShooterPlayerController* NewPlayer) { NativeCall((DWORD64)this, "AShooterGameMode", "HandleTransferCharacterDialogResult", bAccept, NewPlayer); } - void Logout(AController* Exiting) { NativeCall((DWORD64)this, "AShooterGameMode", "Logout", Exiting); } - FVector* GetTracedSpawnLocation(FVector* result, FVector* SpawnLoc, float CharHalfHeight) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetTracedSpawnLocation", result, SpawnLoc, CharHalfHeight); } - void SetMessageOfTheDay(FString* Message) { NativeCall((DWORD64)this, "AShooterGameMode", "SetMessageOfTheDay", Message); } - void ShowMessageOfTheDay() { NativeCall((DWORD64)this, "AShooterGameMode", "ShowMessageOfTheDay"); } - APawn* SpawnDefaultPawnFor(AController* NewPlayer, AActor* StartSpot) { return NativeCall((DWORD64)this, "AShooterGameMode", "SpawnDefaultPawnFor", NewPlayer, StartSpot); } - FPrimalPlayerCharacterConfigStruct* ValidateCharacterConfig(FPrimalPlayerCharacterConfigStruct* result, FPrimalPlayerCharacterConfigStruct* charConfig) { return NativeCall((DWORD64)this, "AShooterGameMode", "ValidateCharacterConfig", result, charConfig); } - FString* GenerateProfileFileName(FString* result, FUniqueNetIdRepl* UniqueId, FString* NetworkAddresss, FString* PlayerName) { return NativeCall((DWORD64)this, "AShooterGameMode", "GenerateProfileFileName", result, UniqueId, NetworkAddresss, PlayerName); } - UPrimalPlayerData* LoadPlayerData(AShooterPlayerState* PlayerState, bool bIsLoadingBackup) { return NativeCall((DWORD64)this, "AShooterGameMode", "LoadPlayerData", PlayerState, bIsLoadingBackup); } - void DeletePlayerData(AShooterPlayerState* PlayerState) { NativeCall((DWORD64)this, "AShooterGameMode", "DeletePlayerData", PlayerState); } - //TSharedPtr * SavePlayerData(TSharedPtr * result, UPrimalPlayerData * PlayerData) { return NativeCall *, TSharedPtr *, UPrimalPlayerData *>((DWORD64)this, "AShooterGameMode", "SavePlayerData", result, PlayerData); } - //TSharedPtr * SaveTribeData() { return NativeCall *>((DWORD64)this, "AShooterGameMode", "SaveTribeData"); } - bool GetOrLoadTribeData(int TribeID, FTribeData* LoadedTribeData) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetOrLoadTribeData", TribeID, LoadedTribeData); } - bool LoadTribeData(int TribeID, FTribeData* LoadedTribeData, bool bIsLoadingBackup, bool bDontCheckDirtyTribeWar) { return NativeCall((DWORD64)this, "AShooterGameMode", "LoadTribeData", TribeID, LoadedTribeData, bIsLoadingBackup, bDontCheckDirtyTribeWar); } - UPrimalPlayerData* GetPlayerDataFor(AShooterPlayerController* PC, bool* bCreatedNewPlayerData, bool bForceCreateNewPlayerData, FPrimalPlayerCharacterConfigStruct* charConfig, bool bAutoCreateNewData, bool bDontSaveNewData) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetPlayerDataFor", PC, bCreatedNewPlayerData, bForceCreateNewPlayerData, charConfig, bAutoCreateNewData, bDontSaveNewData); } - void CheckForRepopulation() { NativeCall((DWORD64)this, "AShooterGameMode", "CheckForRepopulation"); } - void ForceRepopulateFoliageAtPoint() { NativeCall((DWORD64)this, "AShooterGameMode", "ForceRepopulateFoliageAtPoint"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterGameMode", "Tick", DeltaSeconds); } - bool StartSaveBackup() { return NativeCall((DWORD64)this, "AShooterGameMode", "StartSaveBackup"); } - void SendDatadogMetricEvent(FString* Title, FString* Message) { NativeCall((DWORD64)this, "AShooterGameMode", "SendDatadogMetricEvent", Title, Message); } - void TickSaveBackup() { NativeCall((DWORD64)this, "AShooterGameMode", "TickSaveBackup"); } - unsigned __int64 AddNewTribe(AShooterPlayerState* PlayerOwner, FString* TribeName, FTribeGovernment* TribeGovernment) { return NativeCall((DWORD64)this, "AShooterGameMode", "AddNewTribe", PlayerOwner, TribeName, TribeGovernment); } - void RemoveTribe(unsigned __int64 TribeID) { NativeCall((DWORD64)this, "AShooterGameMode", "RemoveTribe", TribeID); } - void UpdateTribeData() { NativeCall((DWORD64)this, "AShooterGameMode", "UpdateTribeData"); } - void RemovePlayerFromTribe(unsigned __int64 TribeID, unsigned __int64 PlayerDataID, bool bDontUpdatePlayerState) { NativeCall((DWORD64)this, "AShooterGameMode", "RemovePlayerFromTribe", TribeID, PlayerDataID, bDontUpdatePlayerState); } - int GetTribeIDOfPlayerID(unsigned __int64 PlayerDataID) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetTribeIDOfPlayerID", PlayerDataID); } - FTribeData* GetTribeData(FTribeData* result, unsigned __int64 TribeID) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetTribeData", result, TribeID); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterGameMode", "BeginPlay"); } - void GetActorSaveGameTypes(TArray>* saveGameTypes) { NativeCall> *>((DWORD64)this, "AShooterGameMode", "GetActorSaveGameTypes", saveGameTypes); } - void SendServerDirectMessage() { NativeCall((DWORD64)this, "AShooterGameMode", "SendServerDirectMessage"); } - void SendServerChatMessage() { NativeCall((DWORD64)this, "AShooterGameMode", "SendServerChatMessage"); } - void SendServerNotification(FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, DWORD64 MessageIcon, DWORD64 SoundToPlay, int ReceiverTeamId, int ReceiverPlayerID, bool bDoBillboard) { NativeCall((DWORD64)this, "AShooterGameMode", "SendServerNotification", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay, ReceiverTeamId, ReceiverPlayerID, bDoBillboard); } - void RemovePlayerData(AShooterPlayerState* PlayerState) { NativeCall((DWORD64)this, "AShooterGameMode", "RemovePlayerData", PlayerState); } - void InitGameState() { NativeCall((DWORD64)this, "AShooterGameMode", "InitGameState"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "AShooterGameMode", "PreInitializeComponents"); } - void CheckIsOfficialServer() { NativeCall((DWORD64)this, "AShooterGameMode", "CheckIsOfficialServer"); } - void BeginUnloadingWorld() { NativeCall((DWORD64)this, "AShooterGameMode", "BeginUnloadingWorld"); } - void HttpServerNotificationRequestComplete() { NativeCall((DWORD64)this, "AShooterGameMode", "HttpServerNotificationRequestComplete"); } - void HttpGetDynamicConfigComplete() { NativeCall((DWORD64)this, "AShooterGameMode", "HttpGetDynamicConfigComplete"); } - void PostAlarmNotification(FUniqueNetId* SteamID, FString* Title, FString* Message) { NativeCall((DWORD64)this, "AShooterGameMode", "PostAlarmNotification", SteamID, Title, Message); } - void PostAlarmNotification() { NativeCall((DWORD64)this, "AShooterGameMode", "PostAlarmNotification"); } - void SavePlayersJoinNoCheckList() { NativeCall((DWORD64)this, "AShooterGameMode", "SavePlayersJoinNoCheckList"); } - void LoadPlayersJoinNoCheckList() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadPlayersJoinNoCheckList"); } - //bool IsPlayerAllowedToJoinNoCheck(FUniqueNetIdUInt64 * PlayerId) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsPlayerAllowedToJoinNoCheck", PlayerId); } - bool IsPlayerControllerAllowedToJoinNoCheck(AShooterPlayerController* ForPlayer) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsPlayerControllerAllowedToJoinNoCheck", ForPlayer); } - bool IsPlayerControllerAllowedToExclusiveJoin(AShooterPlayerController* ForPlayer) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsPlayerControllerAllowedToExclusiveJoin", ForPlayer); } - bool KickPlayer() { return NativeCall((DWORD64)this, "AShooterGameMode", "KickPlayer"); } - void KickPlayerController(APlayerController* thePC, FString* KickMessage) { NativeCall((DWORD64)this, "AShooterGameMode", "KickPlayerController", thePC, KickMessage); } - bool BanPlayer() { return NativeCall((DWORD64)this, "AShooterGameMode", "BanPlayer"); } - bool UnbanPlayer() { return NativeCall((DWORD64)this, "AShooterGameMode", "UnbanPlayer"); } - void SaveBannedList() { NativeCall((DWORD64)this, "AShooterGameMode", "SaveBannedList"); } - void LoadBannedList() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadBannedList"); } - FString* GeneratePGMapFolderName() { return NativeCall((DWORD64)this, "AShooterGameMode", "GeneratePGMapFolderName"); } - FString* GetMapName(FString* result) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetMapName", result); } - void UpdateSaveBackupFiles() { NativeCall((DWORD64)this, "AShooterGameMode", "UpdateSaveBackupFiles"); } - void LoadTribeIds() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadTribeIds"); } - void LoadPlayerDataIds() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadPlayerDataIds"); } - void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID) { NativeCall((DWORD64)this, "AShooterGameMode", "AddPlayerID", playerDataID, netUniqueID); } - unsigned __int64 GetSteamIDForPlayerID(int playerDataID) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetSteamIDForPlayerID", playerDataID); } - unsigned int GenerateTribeId() { return NativeCall((DWORD64)this, "AShooterGameMode", "GenerateTribeId"); } - unsigned int GeneratePlayerDataId(unsigned __int64 NetUniqueID) { return NativeCall((DWORD64)this, "AShooterGameMode", "GeneratePlayerDataId", NetUniqueID); } - float GetHarvestResourceItemAmountMultiplier(TSubclassOf HarvestItemClass) { return NativeCall>((DWORD64)this, "AShooterGameMode", "GetHarvestResourceItemAmountMultiplier", HarvestItemClass); } - float GetDinoDamageMultiplier(APrimalDinoCharacter* ForDino) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetDinoDamageMultiplier", ForDino); } - float GetDinoResistanceMultiplier(APrimalDinoCharacter* ForDino) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetDinoResistanceMultiplier", ForDino); } - bool IsEngramClassHidden(TSubclassOf ForItemClass) { return NativeCall>((DWORD64)this, "AShooterGameMode", "IsEngramClassHidden", ForItemClass); } - bool IsEngramClassGiveToPlayer(TSubclassOf ForItemClass) { return NativeCall>((DWORD64)this, "AShooterGameMode", "IsEngramClassGiveToPlayer", ForItemClass); } - void ListenServerClampPlayerLocations() { NativeCall((DWORD64)this, "AShooterGameMode", "ListenServerClampPlayerLocations"); } - FString* ValidateTribeName() { return NativeCall((DWORD64)this, "AShooterGameMode", "ValidateTribeName"); } - void AdjustDamage(AActor* Victim, float* Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "AShooterGameMode", "AdjustDamage", Victim, Damage, DamageEvent, EventInstigator, DamageCauser); } - void SetTimeOfDay(FString* timeString) { NativeCall((DWORD64)this, "AShooterGameMode", "SetTimeOfDay", timeString); } - void KickAllPlayersAndReload() { NativeCall((DWORD64)this, "AShooterGameMode", "KickAllPlayersAndReload"); } - bool PlayerCanRestart(APlayerController* Player) { return NativeCall((DWORD64)this, "AShooterGameMode", "PlayerCanRestart", Player); } - bool HandleNewPlayer_Implementation(AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) { return NativeCall((DWORD64)this, "AShooterGameMode", "HandleNewPlayer_Implementation", NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); } - bool IsPlayerAllowedToCheat(AShooterPlayerController* ForPlayer) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsPlayerAllowedToCheat", ForPlayer); } - void PrintToGameplayLog(FString* InString) { NativeCall((DWORD64)this, "AShooterGameMode", "PrintToGameplayLog", InString); } - void PrintToServerGameLog(FString* InString) { NativeCall((DWORD64)this, "AShooterGameMode", "PrintToServerGameLog", InString); } - void LoadedFromSaveGame() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadedFromSaveGame"); } - void RemoveInactivePlayersAndTribes() { NativeCall((DWORD64)this, "AShooterGameMode", "RemoveInactivePlayersAndTribes"); } - void DDoSDetected() { NativeCall((DWORD64)this, "AShooterGameMode", "DDoSDetected"); } - FString* GetSessionTimeString_Implementation(FString* result) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetSessionTimeString_Implementation", result); } - bool IsTribeWar(int TribeID1, int TribeID2) { return NativeCall((DWORD64)this, "AShooterGameMode", "IsTribeWar", TribeID1, TribeID2); } - void UpdateTribeWars() { NativeCall((DWORD64)this, "AShooterGameMode", "UpdateTribeWars"); } - void AddToTribeLog(int TribeId, FString* NewLog) { NativeCall((DWORD64)this, "AShooterGameMode", "AddToTribeLog", TribeId, NewLog); } - TArray* GetOverlappingDinoCharactersOfTeamAndClass(TArray* result, FVector* AtLocation, float OverlapRange, TSubclassOf DinoClass, int DinoTeam, bool bExactClassMatch, bool bIgnoreClass) { return NativeCall *, TArray *, FVector *, float, TSubclassOf, int, bool, bool>((DWORD64)this, "AShooterGameMode", "GetOverlappingDinoCharactersOfTeamAndClass", result, AtLocation, OverlapRange, DinoClass, DinoTeam, bExactClassMatch, bIgnoreClass); } - int CountOverlappingDinoCharactersOfTeamAndClass(FVector* AtLocation, float OverlapRange, TSubclassOf DinoClass, int DinoTeam, bool bExactClassMatch, bool bIgnoreClass) { return NativeCall, int, bool, bool>((DWORD64)this, "AShooterGameMode", "CountOverlappingDinoCharactersOfTeamAndClass", AtLocation, OverlapRange, DinoClass, DinoTeam, bExactClassMatch, bIgnoreClass); } - int ForceAddPlayerToTribe(AShooterPlayerState* ForPlayerState, FString* TribeName) { return NativeCall((DWORD64)this, "AShooterGameMode", "ForceAddPlayerToTribe", ForPlayerState, TribeName); } - int ForceCreateTribe(FString* TribeName, int TeamOverride) { return NativeCall((DWORD64)this, "AShooterGameMode", "ForceCreateTribe", TribeName, TeamOverride); } - int GetNumberOfLivePlayersOnTribe(FString* TribeName) { return NativeCall((DWORD64)this, "AShooterGameMode", "GetNumberOfLivePlayersOnTribe", TribeName); } - void UpdateTribeAllianceData(FTribeAlliance* TribeAllianceData, TArray* OldMembersArray, bool bIsAdd) { NativeCall *, bool>((DWORD64)this, "AShooterGameMode", "UpdateTribeAllianceData", TribeAllianceData, OldMembersArray, bIsAdd); } - bool AreTribesAllied(int TribeID1, int TribeID2) { return NativeCall((DWORD64)this, "AShooterGameMode", "AreTribesAllied", TribeID1, TribeID2); } - void AddTribeWar(int MyTribeID, int EnemyTeamID, int StartDayNum, int EndDayNumber, float WarStartTime, float WarEndTime, bool bForceApprove) { NativeCall((DWORD64)this, "AShooterGameMode", "AddTribeWar", MyTribeID, EnemyTeamID, StartDayNum, EndDayNumber, WarStartTime, WarEndTime, bForceApprove); } - void PostAlarmNotificationTribe() { NativeCall((DWORD64)this, "AShooterGameMode", "PostAlarmNotificationTribe"); } - void SpawnedPawnFor(AController* PC, APawn* SpawnedPawn) { NativeCall((DWORD64)this, "AShooterGameMode", "SpawnedPawnFor", PC, SpawnedPawn); } - void SaveTributePlayerDatas() { NativeCall((DWORD64)this, "AShooterGameMode", "SaveTributePlayerDatas"); } - void LoadTributePlayerDatas() { NativeCall((DWORD64)this, "AShooterGameMode", "LoadTributePlayerDatas"); } - void DownloadTransferredPlayer(AShooterPlayerController* NewPlayer) { NativeCall((DWORD64)this, "AShooterGameMode", "DownloadTransferredPlayer", NewPlayer); } - void CheckForDupedDinos() { NativeCall((DWORD64)this, "AShooterGameMode", "CheckForDupedDinos"); } - bool HandleNewPlayer(AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) { return NativeCall((DWORD64)this, "AShooterGameMode", "HandleNewPlayer", NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); } -}; - -struct ACustomGameMode : AShooterGameMode -{ -}; diff --git a/ArkApi/API/GameState.h b/ArkApi/API/GameState.h deleted file mode 100644 index d686b72..0000000 --- a/ArkApi/API/GameState.h +++ /dev/null @@ -1,354 +0,0 @@ -#pragma once - -#include "Base.h" - -struct AGameState -{ - TSubclassOf GetGameModeClassField() const { return GetNativeField>(this, "AGameState", "GameModeClass"); } - AGameMode* GetAuthorityGameModeField() const { return GetNativeField(this, "AGameState", "AuthorityGameMode"); } - //TSubclassOf GetSpectatorClassField() const { return GetNativeField>(this, "AGameState", "SpectatorClass"); } - FName GetMatchStateField() const { return GetNativeField(this, "AGameState", "MatchState"); } - void SetMatchStateField(FName newValue) { SetNativeField(this, "AGameState", "MatchState", newValue); } - FName GetPreviousMatchStateField() const { return GetNativeField(this, "AGameState", "PreviousMatchState"); } - void SetPreviousMatchStateField(FName newValue) { SetNativeField(this, "AGameState", "PreviousMatchState", newValue); } - int GetElapsedTimeField() const { return GetNativeField(this, "AGameState", "ElapsedTime"); } - void SetElapsedTimeField(int newValue) { SetNativeField(this, "AGameState", "ElapsedTime", newValue); } - TArray GetPlayerArrayField() const { return GetNativeField>(this, "AGameState", "PlayerArray"); } - TArray GetInactivePlayerArrayField() const { return GetNativeField>(this, "AGameState", "InactivePlayerArray"); } - - // Functions - - bool TeleportTo(FVector* DestLocation, FRotator* DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall((DWORD64)this, "AGameState", "TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "AGameState", "PostInitializeComponents"); } - void OnRep_GameModeClass() { NativeCall((DWORD64)this, "AGameState", "OnRep_GameModeClass"); } - void OnRep_SpectatorClass() { NativeCall((DWORD64)this, "AGameState", "OnRep_SpectatorClass"); } - void ReceivedGameModeClass() { NativeCall((DWORD64)this, "AGameState", "ReceivedGameModeClass"); } - void ReceivedSpectatorClass() { NativeCall((DWORD64)this, "AGameState", "ReceivedSpectatorClass"); } - void SeamlessTravelTransitionCheckpoint(bool bToTransitionMap) { NativeCall((DWORD64)this, "AGameState", "SeamlessTravelTransitionCheckpoint", bToTransitionMap); } - void AddPlayerState(APlayerState* PlayerState) { NativeCall((DWORD64)this, "AGameState", "AddPlayerState", PlayerState); } - void RemovePlayerState(APlayerState* PlayerState) { NativeCall((DWORD64)this, "AGameState", "RemovePlayerState", PlayerState); } - void HandleMatchIsWaitingToStart() { NativeCall((DWORD64)this, "AGameState", "HandleMatchIsWaitingToStart"); } - void HandleMatchHasStarted() { NativeCall((DWORD64)this, "AGameState", "HandleMatchHasStarted"); } - bool HasMatchStarted() { return NativeCall((DWORD64)this, "AGameState", "HasMatchStarted"); } - bool IsMatchInProgress() { return NativeCall((DWORD64)this, "AGameState", "IsMatchInProgress"); } - bool HasMatchEnded() { return NativeCall((DWORD64)this, "AGameState", "HasMatchEnded"); } - void OnRep_MatchState() { NativeCall((DWORD64)this, "AGameState", "OnRep_MatchState"); } - void NetSpawnActorAtLocation() { NativeCall((DWORD64)this, "AGameState", "NetSpawnActorAtLocation"); } -}; - -struct AShooterGameState : AGameState -{ - int GetNumNPCField() const { return GetNativeField(this, "AShooterGameState", "NumNPC"); } - void SetNumNPCField(int newValue) { SetNativeField(this, "AShooterGameState", "NumNPC", newValue); } - int GetNumActiveNPCField() const { return GetNativeField(this, "AShooterGameState", "NumActiveNPC"); } - void SetNumActiveNPCField(int newValue) { SetNativeField(this, "AShooterGameState", "NumActiveNPC", newValue); } - int GetNumDeadNPCField() const { return GetNativeField(this, "AShooterGameState", "NumDeadNPC"); } - void SetNumDeadNPCField(int newValue) { SetNativeField(this, "AShooterGameState", "NumDeadNPC", newValue); } - int GetNumPlayerActorsField() const { return GetNativeField(this, "AShooterGameState", "NumPlayerActors"); } - void SetNumPlayerActorsField(int newValue) { SetNativeField(this, "AShooterGameState", "NumPlayerActors", newValue); } - int GetNumPlayerConnectedField() const { return GetNativeField(this, "AShooterGameState", "NumPlayerConnected"); } - void SetNumPlayerConnectedField(int newValue) { SetNativeField(this, "AShooterGameState", "NumPlayerConnected", newValue); } - bool GetbServerUseLocalizedChatField() const { return GetNativeField(this, "AShooterGameState", "bServerUseLocalizedChat"); } - void SetbServerUseLocalizedChatField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerUseLocalizedChat", newValue); } - float GetLocalizedChatRadiusField() const { return GetNativeField(this, "AShooterGameState", "LocalizedChatRadius"); } - void SetLocalizedChatRadiusField(float newValue) { SetNativeField(this, "AShooterGameState", "LocalizedChatRadius", newValue); } - float GetLocalizedChatRadiusUnconsiousScaleField() const { return GetNativeField(this, "AShooterGameState", "LocalizedChatRadiusUnconsiousScale"); } - void SetLocalizedChatRadiusUnconsiousScaleField(float newValue) { SetNativeField(this, "AShooterGameState", "LocalizedChatRadiusUnconsiousScale", newValue); } - float GetServerFramerateField() const { return GetNativeField(this, "AShooterGameState", "ServerFramerate"); } - void SetServerFramerateField(float newValue) { SetNativeField(this, "AShooterGameState", "ServerFramerate", newValue); } - FString GetNewStructureDestructionTagField() const { return GetNativeField(this, "AShooterGameState", "NewStructureDestructionTag"); } - void SetNewStructureDestructionTagField(FString newValue) { SetNativeField(this, "AShooterGameState", "NewStructureDestructionTag", newValue); } - int GetDayNumberField() const { return GetNativeField(this, "AShooterGameState", "DayNumber"); } - void SetDayNumberField(int newValue) { SetNativeField(this, "AShooterGameState", "DayNumber", newValue); } - float GetDayTimeField() const { return GetNativeField(this, "AShooterGameState", "DayTime"); } - void SetDayTimeField(float newValue) { SetNativeField(this, "AShooterGameState", "DayTime", newValue); } - long double GetNetworkTimeField() const { return GetNativeField(this, "AShooterGameState", "NetworkTime"); } - void SetNetworkTimeField(long double newValue) { SetNativeField(this, "AShooterGameState", "NetworkTime", newValue); } - unsigned int GetTimeUTCField() const { return GetNativeField(this, "AShooterGameState", "TimeUTC"); } - void SetTimeUTCField(unsigned int newValue) { SetNativeField(this, "AShooterGameState", "TimeUTC", newValue); } - bool GetbIsOfficialServerField() const { return GetNativeField(this, "AShooterGameState", "bIsOfficialServer"); } - void SetbIsOfficialServerField(bool newValue) { SetNativeField(this, "AShooterGameState", "bIsOfficialServer", newValue); } - bool GetbIsArkTributeAvailableField() const { return GetNativeField(this, "AShooterGameState", "bIsArkTributeAvailable"); } - void SetbIsArkTributeAvailableField(bool newValue) { SetNativeField(this, "AShooterGameState", "bIsArkTributeAvailable", newValue); } - bool GetbIsArkDownloadsAllowedField() const { return GetNativeField(this, "AShooterGameState", "bIsArkDownloadsAllowed"); } - void SetbIsArkDownloadsAllowedField(bool newValue) { SetNativeField(this, "AShooterGameState", "bIsArkDownloadsAllowed", newValue); } - bool GetbAllowThirdPersonPlayerField() const { return GetNativeField(this, "AShooterGameState", "bAllowThirdPersonPlayer"); } - void SetbAllowThirdPersonPlayerField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowThirdPersonPlayer", newValue); } - bool GetbServerHardcoreField() const { return GetNativeField(this, "AShooterGameState", "bServerHardcore"); } - void SetbServerHardcoreField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerHardcore", newValue); } - bool GetbServerPVEField() const { return GetNativeField(this, "AShooterGameState", "bServerPVE"); } - void SetbServerPVEField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerPVE", newValue); } - bool GetbAutoPvEField() const { return GetNativeField(this, "AShooterGameState", "bAutoPvE"); } - void SetbAutoPvEField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAutoPvE", newValue); } - bool GetbServerCrosshairField() const { return GetNativeField(this, "AShooterGameState", "bServerCrosshair"); } - void SetbServerCrosshairField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerCrosshair", newValue); } - bool GetbServerForceNoHUDField() const { return GetNativeField(this, "AShooterGameState", "bServerForceNoHUD"); } - void SetbServerForceNoHUDField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerForceNoHUD", newValue); } - bool GetbFlyerPlatformAllowUnalignedDinoBasingField() const { return GetNativeField(this, "AShooterGameState", "bFlyerPlatformAllowUnalignedDinoBasing"); } - void SetbFlyerPlatformAllowUnalignedDinoBasingField(bool newValue) { SetNativeField(this, "AShooterGameState", "bFlyerPlatformAllowUnalignedDinoBasing", newValue); } - bool GetbMapPlayerLocationField() const { return GetNativeField(this, "AShooterGameState", "bMapPlayerLocation"); } - void SetbMapPlayerLocationField(bool newValue) { SetNativeField(this, "AShooterGameState", "bMapPlayerLocation", newValue); } - bool GetbPvEDisableFriendlyFireField() const { return GetNativeField(this, "AShooterGameState", "bPvEDisableFriendlyFire"); } - void SetbPvEDisableFriendlyFireField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvEDisableFriendlyFire", newValue); } - bool GetbPvEAllowTribeWarField() const { return GetNativeField(this, "AShooterGameState", "bPvEAllowTribeWar"); } - void SetbPvEAllowTribeWarField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvEAllowTribeWar", newValue); } - bool GetbPvEAllowTribeWarCancelField() const { return GetNativeField(this, "AShooterGameState", "bPvEAllowTribeWarCancel"); } - void SetbPvEAllowTribeWarCancelField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvEAllowTribeWarCancel", newValue); } - bool GetbEnablePvPGammaField() const { return GetNativeField(this, "AShooterGameState", "bEnablePvPGamma"); } - void SetbEnablePvPGammaField(bool newValue) { SetNativeField(this, "AShooterGameState", "bEnablePvPGamma", newValue); } - bool GetbDisablePvEGammaField() const { return GetNativeField(this, "AShooterGameState", "bDisablePvEGamma"); } - void SetbDisablePvEGammaField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDisablePvEGamma", newValue); } - int GetNumTamedDinosField() const { return GetNativeField(this, "AShooterGameState", "NumTamedDinos"); } - void SetNumTamedDinosField(int newValue) { SetNativeField(this, "AShooterGameState", "NumTamedDinos", newValue); } - int GetMaxStructuresInRangeField() const { return GetNativeField(this, "AShooterGameState", "MaxStructuresInRange"); } - void SetMaxStructuresInRangeField(int newValue) { SetNativeField(this, "AShooterGameState", "MaxStructuresInRange", newValue); } - float GetDayCycleSpeedScaleField() const { return GetNativeField(this, "AShooterGameState", "DayCycleSpeedScale"); } - void SetDayCycleSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameState", "DayCycleSpeedScale", newValue); } - float GetDayTimeSpeedScaleField() const { return GetNativeField(this, "AShooterGameState", "DayTimeSpeedScale"); } - void SetDayTimeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameState", "DayTimeSpeedScale", newValue); } - float GetNightTimeSpeedScaleField() const { return GetNativeField(this, "AShooterGameState", "NightTimeSpeedScale"); } - void SetNightTimeSpeedScaleField(float newValue) { SetNativeField(this, "AShooterGameState", "NightTimeSpeedScale", newValue); } - float GetPvEStructureDecayPeriodMultiplierField() const { return GetNativeField(this, "AShooterGameState", "PvEStructureDecayPeriodMultiplier"); } - void SetPvEStructureDecayPeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "PvEStructureDecayPeriodMultiplier", newValue); } - float GetPvEDinoDecayPeriodMultiplierField() const { return GetNativeField(this, "AShooterGameState", "PvEDinoDecayPeriodMultiplier"); } - void SetPvEDinoDecayPeriodMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "PvEDinoDecayPeriodMultiplier", newValue); } - float GetPerPlatformMaxStructuresMultiplierField() const { return GetNativeField(this, "AShooterGameState", "PerPlatformMaxStructuresMultiplier"); } - void SetPerPlatformMaxStructuresMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "PerPlatformMaxStructuresMultiplier", newValue); } - bool GetbDisableStructureDecayPvEField() const { return GetNativeField(this, "AShooterGameState", "bDisableStructureDecayPvE"); } - void SetbDisableStructureDecayPvEField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDisableStructureDecayPvE", newValue); } - bool GetbDisableDinoDecayPvEField() const { return GetNativeField(this, "AShooterGameState", "bDisableDinoDecayPvE"); } - void SetbDisableDinoDecayPvEField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDisableDinoDecayPvE", newValue); } - bool GetbAllowCaveBuildingPvEField() const { return GetNativeField(this, "AShooterGameState", "bAllowCaveBuildingPvE"); } - void SetbAllowCaveBuildingPvEField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowCaveBuildingPvE", newValue); } - bool GetbPreventDownloadSurvivorsField() const { return GetNativeField(this, "AShooterGameState", "bPreventDownloadSurvivors"); } - void SetbPreventDownloadSurvivorsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventDownloadSurvivors", newValue); } - bool GetbReachedPlatformStructureLimitField() const { return GetNativeField(this, "AShooterGameState", "bReachedPlatformStructureLimit"); } - void SetbReachedPlatformStructureLimitField(bool newValue) { SetNativeField(this, "AShooterGameState", "bReachedPlatformStructureLimit", newValue); } - bool GetbAdminLoggingField() const { return GetNativeField(this, "AShooterGameState", "bAdminLogging"); } - void SetbAdminLoggingField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAdminLogging", newValue); } - bool GetbPvPStructureDecayField() const { return GetNativeField(this, "AShooterGameState", "bPvPStructureDecay"); } - void SetbPvPStructureDecayField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvPStructureDecay", newValue); } - bool GetbPreventDownloadDinosField() const { return GetNativeField(this, "AShooterGameState", "bPreventDownloadDinos"); } - void SetbPreventDownloadDinosField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventDownloadDinos", newValue); } - bool GetbPreventDownloadItemsField() const { return GetNativeField(this, "AShooterGameState", "bPreventDownloadItems"); } - void SetbPreventDownloadItemsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventDownloadItems", newValue); } - bool GetbPreventUploadDinosField() const { return GetNativeField(this, "AShooterGameState", "bPreventUploadDinos"); } - void SetbPreventUploadDinosField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventUploadDinos", newValue); } - bool GetbPreventUploadItemsField() const { return GetNativeField(this, "AShooterGameState", "bPreventUploadItems"); } - void SetbPreventUploadItemsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventUploadItems", newValue); } - bool GetbPreventUploadSurvivorsField() const { return GetNativeField(this, "AShooterGameState", "bPreventUploadSurvivors"); } - void SetbPreventUploadSurvivorsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventUploadSurvivors", newValue); } - bool GetbPreventMateBoostField() const { return GetNativeField(this, "AShooterGameState", "bPreventMateBoost"); } - void SetbPreventMateBoostField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventMateBoost", newValue); } - bool GetbPreventStructurePaintingField() const { return GetNativeField(this, "AShooterGameState", "bPreventStructurePainting"); } - void SetbPreventStructurePaintingField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventStructurePainting", newValue); } - bool GetbAllowCharacterCreationField() const { return GetNativeField(this, "AShooterGameState", "bAllowCharacterCreation"); } - void SetbAllowCharacterCreationField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowCharacterCreation", newValue); } - bool GetbAllowSpawnPointSelectionField() const { return GetNativeField(this, "AShooterGameState", "bAllowSpawnPointSelection"); } - void SetbAllowSpawnPointSelectionField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowSpawnPointSelection", newValue); } - int GetMaxTamedDinosField() const { return GetNativeField(this, "AShooterGameState", "MaxTamedDinos"); } - void SetMaxTamedDinosField(int newValue) { SetNativeField(this, "AShooterGameState", "MaxTamedDinos", newValue); } - bool GetbDisableSpawnAnimationsField() const { return GetNativeField(this, "AShooterGameState", "bDisableSpawnAnimations"); } - void SetbDisableSpawnAnimationsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDisableSpawnAnimations", newValue); } - FString GetPlayerListStringField() const { return GetNativeField(this, "AShooterGameState", "PlayerListString"); } - void SetPlayerListStringField(FString newValue) { SetNativeField(this, "AShooterGameState", "PlayerListString", newValue); } - float GetGlobalSpoilingTimeMultiplierField() const { return GetNativeField(this, "AShooterGameState", "GlobalSpoilingTimeMultiplier"); } - void SetGlobalSpoilingTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "GlobalSpoilingTimeMultiplier", newValue); } - float GetGlobalItemDecompositionTimeMultiplierField() const { return GetNativeField(this, "AShooterGameState", "GlobalItemDecompositionTimeMultiplier"); } - void SetGlobalItemDecompositionTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "GlobalItemDecompositionTimeMultiplier", newValue); } - int GetMaxNumberOfPlayersInTribeField() const { return GetNativeField(this, "AShooterGameState", "MaxNumberOfPlayersInTribe"); } - void SetMaxNumberOfPlayersInTribeField(int newValue) { SetNativeField(this, "AShooterGameState", "MaxNumberOfPlayersInTribe", newValue); } - float GetGlobalCorpseDecompositionTimeMultiplierField() const { return GetNativeField(this, "AShooterGameState", "GlobalCorpseDecompositionTimeMultiplier"); } - void SetGlobalCorpseDecompositionTimeMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "GlobalCorpseDecompositionTimeMultiplier", newValue); } - float GetEggHatchSpeedMultiplierField() const { return GetNativeField(this, "AShooterGameState", "EggHatchSpeedMultiplier"); } - void SetEggHatchSpeedMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "EggHatchSpeedMultiplier", newValue); } - bool GetbAllowPaintingWithoutResourcesField() const { return GetNativeField(this, "AShooterGameState", "bAllowPaintingWithoutResources"); } - void SetbAllowPaintingWithoutResourcesField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowPaintingWithoutResources", newValue); } - bool GetbEnableExtraStructurePreventionVolumesField() const { return GetNativeField(this, "AShooterGameState", "bEnableExtraStructurePreventionVolumes"); } - void SetbEnableExtraStructurePreventionVolumesField(bool newValue) { SetNativeField(this, "AShooterGameState", "bEnableExtraStructurePreventionVolumes", newValue); } - //TArray GetOverrideItemCraftingCostsField() const { return GetNativeField>(this, "AShooterGameState", "OverrideItemCraftingCosts"); } - //void SetOverrideItemCraftingCostsField(TArray newValue) { SetNativeField(this, "AShooterGameState", "OverrideItemCraftingCosts", newValue); } - bool GetbPlayingDynamicMusicField() const { return GetNativeField(this, "AShooterGameState", "bPlayingDynamicMusic"); } - void SetbPlayingDynamicMusicField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPlayingDynamicMusic", newValue); } - float GetLastHadMusicTimeField() const { return GetNativeField(this, "AShooterGameState", "LastHadMusicTime"); } - void SetLastHadMusicTimeField(float newValue) { SetNativeField(this, "AShooterGameState", "LastHadMusicTime", newValue); } - //TArray GetLevelExperienceRampOverridesField() const { return GetNativeField>(this, "AShooterGameState", "LevelExperienceRampOverrides"); } - //void SetLevelExperienceRampOverridesField(TArray newValue) { SetNativeField(this, "AShooterGameState", "LevelExperienceRampOverrides", newValue); } - //TArray GetOverrideEngramEntriesField() const { return GetNativeField>(this, "AShooterGameState", "OverrideEngramEntries"); } - //void SetOverrideEngramEntriesField(TArray newValue) { SetNativeField(this, "AShooterGameState", "OverrideEngramEntries", newValue); } - TArray GetPreventDinoTameClassNamesField() const { return GetNativeField>(this, "AShooterGameState", "PreventDinoTameClassNames"); } - void SetPreventDinoTameClassNamesField(TArray newValue) { SetNativeField(this, "AShooterGameState", "PreventDinoTameClassNames", newValue); } - float GetListenServerTetherDistanceMultiplierField() const { return GetNativeField(this, "AShooterGameState", "ListenServerTetherDistanceMultiplier"); } - void SetListenServerTetherDistanceMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "ListenServerTetherDistanceMultiplier", newValue); } - FString GetPGMapNameField() const { return GetNativeField(this, "AShooterGameState", "PGMapName"); } - void SetPGMapNameField(FString newValue) { SetNativeField(this, "AShooterGameState", "PGMapName", newValue); } - TArray GetSupportedSpawnRegionsField() const { return GetNativeField>(this, "AShooterGameState", "SupportedSpawnRegions"); } - void SetSupportedSpawnRegionsField(TArray newValue) { SetNativeField(this, "AShooterGameState", "SupportedSpawnRegions", newValue); } - bool GetbEnableDeathTeamSpectatorField() const { return GetNativeField(this, "AShooterGameState", "bEnableDeathTeamSpectator"); } - void SetbEnableDeathTeamSpectatorField(bool newValue) { SetNativeField(this, "AShooterGameState", "bEnableDeathTeamSpectator", newValue); } - FVector GetPlayerFloatingHUDOffsetField() const { return GetNativeField(this, "AShooterGameState", "PlayerFloatingHUDOffset"); } - void SetPlayerFloatingHUDOffsetField(FVector newValue) { SetNativeField(this, "AShooterGameState", "PlayerFloatingHUDOffset", newValue); } - float GetPlayerFloatingHUDOffsetScreenYField() const { return GetNativeField(this, "AShooterGameState", "PlayerFloatingHUDOffsetScreenY"); } - void SetPlayerFloatingHUDOffsetScreenYField(float newValue) { SetNativeField(this, "AShooterGameState", "PlayerFloatingHUDOffsetScreenY", newValue); } - float GetStructureDamageRepairCooldownField() const { return GetNativeField(this, "AShooterGameState", "StructureDamageRepairCooldown"); } - void SetStructureDamageRepairCooldownField(float newValue) { SetNativeField(this, "AShooterGameState", "StructureDamageRepairCooldown", newValue); } - bool GetbForceAllStructureLockingField() const { return GetNativeField(this, "AShooterGameState", "bForceAllStructureLocking"); } - void SetbForceAllStructureLockingField(bool newValue) { SetNativeField(this, "AShooterGameState", "bForceAllStructureLocking", newValue); } - bool GetbAllowCustomRecipesField() const { return GetNativeField(this, "AShooterGameState", "bAllowCustomRecipes"); } - void SetbAllowCustomRecipesField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowCustomRecipes", newValue); } - bool GetbAllowRaidDinoFeedingField() const { return GetNativeField(this, "AShooterGameState", "bAllowRaidDinoFeeding"); } - void SetbAllowRaidDinoFeedingField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowRaidDinoFeeding", newValue); } - float GetCustomRecipeEffectivenessMultiplierField() const { return GetNativeField(this, "AShooterGameState", "CustomRecipeEffectivenessMultiplier"); } - void SetCustomRecipeEffectivenessMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "CustomRecipeEffectivenessMultiplier", newValue); } - float GetCustomRecipeSkillMultiplierField() const { return GetNativeField(this, "AShooterGameState", "CustomRecipeSkillMultiplier"); } - void SetCustomRecipeSkillMultiplierField(float newValue) { SetNativeField(this, "AShooterGameState", "CustomRecipeSkillMultiplier", newValue); } - FVector GetOverrideAreaMusicPositionField() const { return GetNativeField(this, "AShooterGameState", "OverrideAreaMusicPosition"); } - void SetOverrideAreaMusicPositionField(FVector newValue) { SetNativeField(this, "AShooterGameState", "OverrideAreaMusicPosition", newValue); } - float GetOverrideAreaMusicRangeField() const { return GetNativeField(this, "AShooterGameState", "OverrideAreaMusicRange"); } - void SetOverrideAreaMusicRangeField(float newValue) { SetNativeField(this, "AShooterGameState", "OverrideAreaMusicRange", newValue); } - bool GetbAllowUnclaimDinosField() const { return GetNativeField(this, "AShooterGameState", "bAllowUnclaimDinos"); } - void SetbAllowUnclaimDinosField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowUnclaimDinos", newValue); } - float GetFloatingHUDRangeField() const { return GetNativeField(this, "AShooterGameState", "FloatingHUDRange"); } - void SetFloatingHUDRangeField(float newValue) { SetNativeField(this, "AShooterGameState", "FloatingHUDRange", newValue); } - float GetFloatingChatRangeField() const { return GetNativeField(this, "AShooterGameState", "FloatingChatRange"); } - void SetFloatingChatRangeField(float newValue) { SetNativeField(this, "AShooterGameState", "FloatingChatRange", newValue); } - int GetExtinctionEventTimeIntervalField() const { return GetNativeField(this, "AShooterGameState", "ExtinctionEventTimeInterval"); } - void SetExtinctionEventTimeIntervalField(int newValue) { SetNativeField(this, "AShooterGameState", "ExtinctionEventTimeInterval", newValue); } - float GetExtinctionEventPercentField() const { return GetNativeField(this, "AShooterGameState", "ExtinctionEventPercent"); } - void SetExtinctionEventPercentField(float newValue) { SetNativeField(this, "AShooterGameState", "ExtinctionEventPercent", newValue); } - int GetExtinctionEventSecondsRemainingField() const { return GetNativeField(this, "AShooterGameState", "ExtinctionEventSecondsRemaining"); } - void SetExtinctionEventSecondsRemainingField(int newValue) { SetNativeField(this, "AShooterGameState", "ExtinctionEventSecondsRemaining", newValue); } - bool GetbDoExtinctionEventField() const { return GetNativeField(this, "AShooterGameState", "bDoExtinctionEvent"); } - void SetbDoExtinctionEventField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDoExtinctionEvent", newValue); } - bool GetbPreventOfflinePvPField() const { return GetNativeField(this, "AShooterGameState", "bPreventOfflinePvP"); } - void SetbPreventOfflinePvPField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventOfflinePvP", newValue); } - bool GetbPvPDinoDecayField() const { return GetNativeField(this, "AShooterGameState", "bPvPDinoDecay"); } - void SetbPvPDinoDecayField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvPDinoDecay", newValue); } - bool GetbOverideStructurePlatformPreventionField() const { return GetNativeField(this, "AShooterGameState", "bOverideStructurePlatformPrevention"); } - void SetbOverideStructurePlatformPreventionField(bool newValue) { SetNativeField(this, "AShooterGameState", "bOverideStructurePlatformPrevention", newValue); } - TArray GetPreventOfflinePvPLiveTeamsField() const { return GetNativeField>(this, "AShooterGameState", "PreventOfflinePvPLiveTeams"); } - void SetPreventOfflinePvPLiveTeamsField(TArray newValue) { SetNativeField(this, "AShooterGameState", "PreventOfflinePvPLiveTeams", newValue); } - TArray GetPreventOfflinePvPExpiringTeamsField() const { return GetNativeField>(this, "AShooterGameState", "PreventOfflinePvPExpiringTeams"); } - void SetPreventOfflinePvPExpiringTeamsField(TArray newValue) { SetNativeField(this, "AShooterGameState", "PreventOfflinePvPExpiringTeams", newValue); } - TArray GetPreventOfflinePvPExpiringTimesField() const { return GetNativeField>(this, "AShooterGameState", "PreventOfflinePvPExpiringTimes"); } - void SetPreventOfflinePvPExpiringTimesField(TArray newValue) { SetNativeField(this, "AShooterGameState", "PreventOfflinePvPExpiringTimes", newValue); } - //TMap> GetPreventOfflinePvPLiveTimesField() const { return GetNativeField>>(this, "AShooterGameState", "PreventOfflinePvPLiveTimes"); } - bool GetbAllowAnyoneBabyImprintCuddleField() const { return GetNativeField(this, "AShooterGameState", "bAllowAnyoneBabyImprintCuddle"); } - void SetbAllowAnyoneBabyImprintCuddleField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowAnyoneBabyImprintCuddle", newValue); } - bool GetbDisableImprintDinoBuffField() const { return GetNativeField(this, "AShooterGameState", "bDisableImprintDinoBuff"); } - void SetbDisableImprintDinoBuffField(bool newValue) { SetNativeField(this, "AShooterGameState", "bDisableImprintDinoBuff", newValue); } - bool GetbIsCustomMapField() const { return GetNativeField(this, "AShooterGameState", "bIsCustomMap"); } - void SetbIsCustomMapField(bool newValue) { SetNativeField(this, "AShooterGameState", "bIsCustomMap", newValue); } - FString GetClusterIdField() const { return GetNativeField(this, "AShooterGameState", "ClusterId"); } - FString GetServerSessionNameField() const { return GetNativeField(this, "AShooterGameState", "ServerSessionName"); } - void SetServerSessionNameField(FString newValue) { SetNativeField(this, "AShooterGameState", "ServerSessionName", newValue); } - bool GetbPreventTribeAlliancesField() const { return GetNativeField(this, "AShooterGameState", "bPreventTribeAlliances"); } - void SetbPreventTribeAlliancesField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPreventTribeAlliances", newValue); } - FString GetLoadForceRespawnDinosTagField() const { return GetNativeField(this, "AShooterGameState", "LoadForceRespawnDinosTag"); } - void SetLoadForceRespawnDinosTagField(FString newValue) { SetNativeField(this, "AShooterGameState", "LoadForceRespawnDinosTag", newValue); } - bool GetbOnlyDecayUnsnappedCoreStructuresField() const { return GetNativeField(this, "AShooterGameState", "bOnlyDecayUnsnappedCoreStructures"); } - void SetbOnlyDecayUnsnappedCoreStructuresField(bool newValue) { SetNativeField(this, "AShooterGameState", "bOnlyDecayUnsnappedCoreStructures", newValue); } - bool GetbFastDecayUnsnappedCoreStructuresField() const { return GetNativeField(this, "AShooterGameState", "bFastDecayUnsnappedCoreStructures"); } - void SetbFastDecayUnsnappedCoreStructuresField(bool newValue) { SetNativeField(this, "AShooterGameState", "bFastDecayUnsnappedCoreStructures", newValue); } - bool GetbServerUseDinoListField() const { return GetNativeField(this, "AShooterGameState", "bServerUseDinoList"); } - void SetbServerUseDinoListField(bool newValue) { SetNativeField(this, "AShooterGameState", "bServerUseDinoList", newValue); } - bool GetbPvEAllowStructuresAtSupplyDropsField() const { return GetNativeField(this, "AShooterGameState", "bPvEAllowStructuresAtSupplyDrops"); } - void SetbPvEAllowStructuresAtSupplyDropsField(bool newValue) { SetNativeField(this, "AShooterGameState", "bPvEAllowStructuresAtSupplyDrops", newValue); } - bool GetbAllowForceNetUpdateField() const { return GetNativeField(this, "AShooterGameState", "bAllowForceNetUpdate"); } - void SetbAllowForceNetUpdateField(bool newValue) { SetNativeField(this, "AShooterGameState", "bAllowForceNetUpdate", newValue); } - float GetMinimumDinoReuploadIntervalField() const { return GetNativeField(this, "AShooterGameState", "MinimumDinoReuploadInterval"); } - void SetMinimumDinoReuploadIntervalField(float newValue) { SetNativeField(this, "AShooterGameState", "MinimumDinoReuploadInterval", newValue); } - - // Functions - - TArray* BaseGetAllDinoCharactersOfTeam(TArray* result, int Team) { return NativeCall *, TArray *, int>((DWORD64)this, "AShooterGameState", "BaseGetAllDinoCharactersOfTeam", result, Team); } - //APrimalBuff * BaseSpawnBuffAndAttachToCharacter(UClass * Buff APrimalCharacter * PrimalCharacter, float ExperiencePoints) { return NativeCall((DWORD64)this, "AShooterGameState", "BaseSpawnBuffAndAttachToCharacter", Buff, PrimalCharacter, ExperiencePoints); } - void Destroyed() { NativeCall((DWORD64)this, "AShooterGameState", "Destroyed"); } - void OnRep_SupportedSpawnRegions() { NativeCall((DWORD64)this, "AShooterGameState", "OnRep_SupportedSpawnRegions"); } - void OnRep_ReplicateLocalizedChatRadius() { NativeCall((DWORD64)this, "AShooterGameState", "OnRep_ReplicateLocalizedChatRadius"); } - void UpdateDynamicMusic(float DeltaSeconds) { NativeCall((DWORD64)this, "AShooterGameState", "UpdateDynamicMusic", DeltaSeconds); } - void CreateCustomGameUI(AShooterPlayerController* SceneOwner) { NativeCall((DWORD64)this, "AShooterGameState", "CreateCustomGameUI", SceneOwner); } - void BeginPlay() { NativeCall((DWORD64)this, "AShooterGameState", "BeginPlay"); } - float GetMatineePlayRate(AActor* forMatineeActor) { return NativeCall((DWORD64)this, "AShooterGameState", "GetMatineePlayRate", forMatineeActor); } - void NotifyPlayerDied(AShooterCharacter* theShooterChar, AShooterPlayerController* prevController, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "AShooterGameState", "NotifyPlayerDied", theShooterChar, prevController, InstigatingPawn, DamageCauser); } - bool AllowDinoTame(APrimalDinoCharacter* DinoChar, AShooterPlayerController* ForPC) { return NativeCall((DWORD64)this, "AShooterGameState", "AllowDinoTame", DinoChar, ForPC); } - void InitializedGameState() { NativeCall((DWORD64)this, "AShooterGameState", "InitializedGameState"); } - bool IsTeamIDInvincible(int TargetingTeamID) { return NativeCall((DWORD64)this, "AShooterGameState", "IsTeamIDInvincible", TargetingTeamID); } - long double GetOfflineDamagePreventionTime(int TargetingTeamID) { return NativeCall((DWORD64)this, "AShooterGameState", "GetOfflineDamagePreventionTime", TargetingTeamID); } - void NetUpdateOfflinePvPLiveTeams_Implementation(TArray* NewPreventOfflinePvPLiveTeams) { NativeCall *>((DWORD64)this, "AShooterGameState", "NetUpdateOfflinePvPLiveTeams_Implementation", NewPreventOfflinePvPLiveTeams); } - void NetUpdateOfflinePvPExpiringTeams_Implementation(TArray* NewPreventOfflinePvPExpiringTeams, TArray* NewPreventOfflinePvPExpiringTimes) { NativeCall *, TArray *>((DWORD64)this, "AShooterGameState", "NetUpdateOfflinePvPExpiringTeams_Implementation", NewPreventOfflinePvPExpiringTeams, NewPreventOfflinePvPExpiringTimes); } - void UpdatePreventOfflinePvPStatus() { NativeCall((DWORD64)this, "AShooterGameState", "UpdatePreventOfflinePvPStatus"); } - void AddFloatingText() { NativeCall((DWORD64)this, "AShooterGameState", "AddFloatingText"); } - void AddFloatingDamageText() { NativeCall((DWORD64)this, "AShooterGameState", "AddFloatingDamageText"); } - void NetAddFloatingDamageText() { NativeCall((DWORD64)this, "AShooterGameState", "NetAddFloatingDamageText"); } - void NetAddFloatingText() { NativeCall((DWORD64)this, "AShooterGameState", "NetAddFloatingText"); } - FString* GetCleanServerSessionName(FString* result) { return NativeCall((DWORD64)this, "AShooterGameState", "GetCleanServerSessionName", result); } - void ForceNetUpdate(bool bDormantDontReplicateProperties) { NativeCall((DWORD64)this, "AShooterGameState", "ForceNetUpdate", bDormantDontReplicateProperties); } - void WorldCompositionRescan() { NativeCall((DWORD64)this, "AShooterGameState", "WorldCompositionRescan"); } - void HTTPGetRequest() { NativeCall((DWORD64)this, "AShooterGameState", "HTTPGetRequest"); } - void HTTPGetRequestCompleted() { NativeCall((DWORD64)this, "AShooterGameState", "HTTPGetRequestCompleted"); } - void HTTPPostRequest() { NativeCall((DWORD64)this, "AShooterGameState", "HTTPPostRequest"); } - void HTTPPostRequestCompleted() { NativeCall((DWORD64)this, "AShooterGameState", "HTTPPostRequestCompleted"); } - void StaticRegisterNativesAShooterGameState() { NativeCall((DWORD64)this, "AShooterGameState", "StaticRegisterNativesAShooterGameState"); } - void NetUpdateOfflinePvPExpiringTeams(TArray* NewPreventOfflinePvPExpiringTeams, TArray* NewPreventOfflinePvPExpiringTimes) { NativeCall *, TArray *>((DWORD64)this, "AShooterGameState", "NetUpdateOfflinePvPExpiringTeams", NewPreventOfflinePvPExpiringTeams, NewPreventOfflinePvPExpiringTimes); } - void NetUpdateOfflinePvPLiveTeams(TArray* NewPreventOfflinePvPLiveTeams) { NativeCall *>((DWORD64)this, "AShooterGameState", "NetUpdateOfflinePvPLiveTeams", NewPreventOfflinePvPLiveTeams); } -}; - -struct AGameSession -{ - int GetMaxSpectatorsField() const { return GetNativeField(this, "AGameSession", "MaxSpectators"); } - void SetMaxSpectatorsField(int newValue) { SetNativeField(this, "AGameSession", "MaxSpectators", newValue); } - int GetMaxPlayersField() const { return GetNativeField(this, "AGameSession", "MaxPlayers"); } - void SetMaxPlayersField(int newValue) { SetNativeField(this, "AGameSession", "MaxPlayers", newValue); } - char GetMaxSplitscreensPerConnectionField() const { return GetNativeField(this, "AGameSession", "MaxSplitscreensPerConnection"); } - void SetMaxSplitscreensPerConnectionField(char newValue) { SetNativeField(this, "AGameSession", "MaxSplitscreensPerConnection", newValue); } - bool GetbRequiresPushToTalkField() const { return GetNativeField(this, "AGameSession", "bRequiresPushToTalk"); } - void SetbRequiresPushToTalkField(bool newValue) { SetNativeField(this, "AGameSession", "bRequiresPushToTalk", newValue); } - FName GetSessionNameField() const { return GetNativeField(this, "AGameSession", "SessionName"); } - void SetSessionNameField(FName newValue) { SetNativeField(this, "AGameSession", "SessionName", newValue); } - - - // Functions - - bool RequiresPushToTalk() { return NativeCall((DWORD64)this, "AGameSession", "RequiresPushToTalk"); } - void InitOptions(FString* Options) { NativeCall((DWORD64)this, "AGameSession", "InitOptions", Options); } - bool ProcessAutoLogin() { return NativeCall((DWORD64)this, "AGameSession", "ProcessAutoLogin"); } - void OnLoginComplete(int LocalUserNum, bool bWasSuccessful, FUniqueNetId* UserId, FString* Error) { NativeCall((DWORD64)this, "AGameSession", "OnLoginComplete", LocalUserNum, bWasSuccessful, UserId, Error); } - FString* ApproveLogin(FString* result, FString* Options, FString* authToken) { return NativeCall((DWORD64)this, "AGameSession", "ApproveLogin", result, Options, authToken); } - void RegisterPlayer(APlayerController* NewPlayer, TSharedPtr* UniqueId, bool bWasFromInvite) { NativeCall *, bool>((DWORD64)this, "AGameSession", "RegisterPlayer", NewPlayer, UniqueId, bWasFromInvite); } - void UnregisterPlayer(APlayerController* ExitingPlayer) { NativeCall((DWORD64)this, "AGameSession", "UnregisterPlayer", ExitingPlayer); } - bool AtCapacity(bool bSpectator, FString* AuthToken) { return NativeCall((DWORD64)this, "AGameSession", "AtCapacity", bSpectator, AuthToken); } - void NotifyLogout(APlayerController* PC) { NativeCall((DWORD64)this, "AGameSession", "NotifyLogout", PC); } - bool KickPlayer(APlayerController* KickedPlayer, FText* KickReason) { return NativeCall((DWORD64)this, "AGameSession", "KickPlayer", KickedPlayer, KickReason); } - bool BanPlayer(APlayerController* BannedPlayer, FText* BanReason) { return NativeCall((DWORD64)this, "AGameSession", "BanPlayer", BannedPlayer, BanReason); } - void ReturnToMainMenuHost() { NativeCall((DWORD64)this, "AGameSession", "ReturnToMainMenuHost"); } - bool TravelToSession(int ControllerId, FName InSessionName) { return NativeCall((DWORD64)this, "AGameSession", "TravelToSession", ControllerId, InSessionName); } - void UpdateSessionJoinability(FName InSessionName, bool bPublicSearchable, bool bAllowInvites, bool bJoinViaPresence, bool bJoinViaPresenceFriendsOnly) { NativeCall((DWORD64)this, "AGameSession", "UpdateSessionJoinability", InSessionName, bPublicSearchable, bAllowInvites, bJoinViaPresence, bJoinViaPresenceFriendsOnly); } -}; - -struct AShooterGameSession : AGameSession -{ - bool GetbFoundSessionField() const { return GetNativeField(this, "AShooterGameSession", "bFoundSession"); } - void SetbFoundSessionField(bool newValue) { SetNativeField(this, "AShooterGameSession", "bFoundSession", newValue); } - - // Functions - - void OnStartOnlineGameComplete(FName SessionName, bool bWasSuccessful) { NativeCall((DWORD64)this, "AShooterGameSession", "OnStartOnlineGameComplete", SessionName, bWasSuccessful); } - void HandleMatchHasStarted() { NativeCall((DWORD64)this, "AShooterGameSession", "HandleMatchHasStarted"); } - void HandleMatchHasEnded() { NativeCall((DWORD64)this, "AShooterGameSession", "HandleMatchHasEnded"); } - void OnCreateSessionComplete(FName SessionName, bool bWasSuccessful) { NativeCall((DWORD64)this, "AShooterGameSession", "OnCreateSessionComplete", SessionName, bWasSuccessful); } - void OnDestroySessionComplete(FName SessionName, bool bWasSuccessful) { NativeCall((DWORD64)this, "AShooterGameSession", "OnDestroySessionComplete", SessionName, bWasSuccessful); } - void DelayedSessionDelete() { NativeCall((DWORD64)this, "AShooterGameSession", "DelayedSessionDelete"); } - void InitOptions(FString* Options) { NativeCall((DWORD64)this, "AShooterGameSession", "InitOptions", Options); } - void RegisterServer() { NativeCall((DWORD64)this, "AShooterGameSession", "RegisterServer"); } - void UpdatePublishedSession() { NativeCall((DWORD64)this, "AShooterGameSession", "UpdatePublishedSession"); } - FString* ApproveLogin(FString* result, FString* Options, FString* authToken) { return NativeCall((DWORD64)this, "AShooterGameSession", "ApproveLogin", result, Options, authToken); } - void OnCheckAuthTokenComplete(bool bWasSuccessful, FUniqueNetId* UserId) { NativeCall((DWORD64)this, "AShooterGameSession", "OnCheckAuthTokenComplete", bWasSuccessful, UserId); } - void OnNumConnectedPlayersChanged(int NewPlayersCount) { NativeCall((DWORD64)this, "AShooterGameSession", "OnNumConnectedPlayersChanged", NewPlayersCount); } - void Tick(float __formal) { NativeCall((DWORD64)this, "AShooterGameSession", "Tick", __formal); } - void OnFindSessionsComplete(bool bWasSuccessful) { NativeCall((DWORD64)this, "AShooterGameSession", "OnFindSessionsComplete", bWasSuccessful); } - void OnFoundSession() { NativeCall((DWORD64)this, "AShooterGameSession", "OnFoundSession"); } - void CancelFindSessions() { NativeCall((DWORD64)this, "AShooterGameSession", "CancelFindSessions"); } - bool TravelToSession(int ControllerId, FName SessionName) { return NativeCall((DWORD64)this, "AShooterGameSession", "TravelToSession", ControllerId, SessionName); } - void Restart() { NativeCall((DWORD64)this, "AShooterGameSession", "Restart"); } -}; diff --git a/ArkApi/API/Inventory.h b/ArkApi/API/Inventory.h deleted file mode 100644 index 6337cdb..0000000 --- a/ArkApi/API/Inventory.h +++ /dev/null @@ -1,1024 +0,0 @@ -#pragma once - -#include "Base.h" - -struct FItemNetID -{ - unsigned int ItemID1; - unsigned int ItemID2; -}; - -struct UPrimalInventoryComponent -{ - TArray> GetRemoteViewingInventoryPlayerControllersField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "RemoteViewingInventoryPlayerControllers"); } - void SetRemoteViewingInventoryPlayerControllersField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "RemoteViewingInventoryPlayerControllers", newValue); } - TArray GetInventoryItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "InventoryItems"); } - void SetInventoryItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "InventoryItems", newValue); } - TArray GetEquippedItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "EquippedItems"); } - void SetEquippedItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "EquippedItems", newValue); } - TArray GetItemSlotsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemSlots"); } - void SetItemSlotsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemSlots", newValue); } - TArray GetArkTributeItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ArkTributeItems"); } - void SetArkTributeItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ArkTributeItems", newValue); } - TArray GetAllDyeColorItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "AllDyeColorItems"); } - void SetAllDyeColorItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "AllDyeColorItems", newValue); } - TArray GetItemCraftQueueEntriesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemCraftQueueEntries"); } - void SetItemCraftQueueEntriesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemCraftQueueEntries", newValue); } - int GetOverrideInventoryDefaultTabField() const { return GetNativeField(this, "UPrimalInventoryComponent", "OverrideInventoryDefaultTab"); } - void SetOverrideInventoryDefaultTabField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "OverrideInventoryDefaultTab", newValue); } - __int32 Get_bf1acField() const { return GetNativeField<__int32>(this, "UPrimalInventoryComponent", "_bf1ac"); } - void Set_bf1acField(__int32 newValue) { SetNativeField(this, "UPrimalInventoryComponent", "_bf1ac", newValue); } - TArray> GetEquippableItemTypesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "EquippableItemTypes"); } - void SetEquippableItemTypesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "EquippableItemTypes", newValue); } - __int32 Get_bf1c0Field() const { return GetNativeField<__int32>(this, "UPrimalInventoryComponent", "_bf1c0"); } - void Set_bf1c0Field(__int32 newValue) { SetNativeField(this, "UPrimalInventoryComponent", "_bf1c0", newValue); } - float GetCraftingItemSpeedField() const { return GetNativeField(this, "UPrimalInventoryComponent", "CraftingItemSpeed"); } - void SetCraftingItemSpeedField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "CraftingItemSpeed", newValue); } - __int32 Get_bf1c8Field() const { return GetNativeField<__int32>(this, "UPrimalInventoryComponent", "_bf1c8"); } - void Set_bf1c8Field(__int32 newValue) { SetNativeField(this, "UPrimalInventoryComponent", "_bf1c8", newValue); } - TArray GetItemSpoilingTimeMultipliersField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemSpoilingTimeMultipliers"); } - void SetItemSpoilingTimeMultipliersField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemSpoilingTimeMultipliers", newValue); } - __int32 Get_bf1e0Field() const { return GetNativeField<__int32>(this, "UPrimalInventoryComponent", "_bf1e0"); } - void Set_bf1e0Field(__int32 newValue) { SetNativeField(this, "UPrimalInventoryComponent", "_bf1e0", newValue); } - int GetMaxInventoryItemsField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryItems"); } - void SetMaxInventoryItemsField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryItems", newValue); } - float GetMaxInventoryWeightField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryWeight"); } - void SetMaxInventoryWeightField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryWeight", newValue); } - char GetTribeGroupInventoryRankField() const { return GetNativeField(this, "UPrimalInventoryComponent", "TribeGroupInventoryRank"); } - void SetTribeGroupInventoryRankField(char newValue) { SetNativeField(this, "UPrimalInventoryComponent", "TribeGroupInventoryRank", newValue); } - int GetNumSlotsField() const { return GetNativeField(this, "UPrimalInventoryComponent", "NumSlots"); } - void SetNumSlotsField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "NumSlots", newValue); } - int GetMaxItemCraftQueueEntriesField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxItemCraftQueueEntries"); } - void SetMaxItemCraftQueueEntriesField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxItemCraftQueueEntries", newValue); } - FString GetRemoteInventoryDescriptionStringField() const { return GetNativeField(this, "UPrimalInventoryComponent", "RemoteInventoryDescriptionString"); } - void SetRemoteInventoryDescriptionStringField(FString newValue) { SetNativeField(this, "UPrimalInventoryComponent", "RemoteInventoryDescriptionString", newValue); } - TSubclassOf GetEngramRequirementClassOverrideField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "EngramRequirementClassOverride"); } - void SetEngramRequirementClassOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalInventoryComponent", "EngramRequirementClassOverride", newValue); } - TArray> GetRemoteAddItemOnlyAllowItemClassesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "RemoteAddItemOnlyAllowItemClasses"); } - void SetRemoteAddItemOnlyAllowItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "RemoteAddItemOnlyAllowItemClasses", newValue); } - TArray> GetRemoteAddItemPreventItemClassesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "RemoteAddItemPreventItemClasses"); } - void SetRemoteAddItemPreventItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "RemoteAddItemPreventItemClasses", newValue); } - TArray> GetDefaultInventoryItemsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultInventoryItems"); } - void SetDefaultInventoryItemsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItems", newValue); } - TArray> GetDefaultInventoryItems2Field() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultInventoryItems2"); } - void SetDefaultInventoryItems2Field(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItems2", newValue); } - TArray> GetDefaultInventoryItems3Field() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultInventoryItems3"); } - void SetDefaultInventoryItems3Field(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItems3", newValue); } - TArray> GetDefaultInventoryItems4Field() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultInventoryItems4"); } - void SetDefaultInventoryItems4Field(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItems4", newValue); } - TArray GetDefaultInventoryItemsRandomCustomStringsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultInventoryItemsRandomCustomStrings"); } - void SetDefaultInventoryItemsRandomCustomStringsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItemsRandomCustomStrings", newValue); } - TArray GetDefaultInventoryItemsRandomCustomStringsWeightsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultInventoryItemsRandomCustomStringsWeights"); } - void SetDefaultInventoryItemsRandomCustomStringsWeightsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryItemsRandomCustomStringsWeights", newValue); } - TArray> GetCheatInventoryItemsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "CheatInventoryItems"); } - void SetCheatInventoryItemsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "CheatInventoryItems", newValue); } - TArray> GetDefaultEquippedItemsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultEquippedItems"); } - void SetDefaultEquippedItemsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEquippedItems", newValue); } - TArray> GetDefaultEquippedItemSkinsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultEquippedItemSkins"); } - void SetDefaultEquippedItemSkinsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEquippedItemSkins", newValue); } - TArray> GetDefaultSlotItemsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "DefaultSlotItems"); } - void SetDefaultSlotItemsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultSlotItems", newValue); } - TArray GetItemSpawnActorClassOverridesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemSpawnActorClassOverrides"); } - void SetItemSpawnActorClassOverridesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemSpawnActorClassOverrides", newValue); } - TArray> GetOnlyAllowCraftingItemClassesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "OnlyAllowCraftingItemClasses"); } - void SetOnlyAllowCraftingItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "OnlyAllowCraftingItemClasses", newValue); } - TArray GetDefaultEngramsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultEngrams"); } - void SetDefaultEngramsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEngrams", newValue); } - TArray GetDefaultEngrams2Field() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultEngrams2"); } - void SetDefaultEngrams2Field(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEngrams2", newValue); } - TArray GetDefaultEngrams3Field() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultEngrams3"); } - void SetDefaultEngrams3Field(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEngrams3", newValue); } - TArray GetDefaultEngrams4Field() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultEngrams4"); } - void SetDefaultEngrams4Field(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultEngrams4", newValue); } - TArray GetDefaultInventoryQualitiesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DefaultInventoryQualities"); } - void SetDefaultInventoryQualitiesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultInventoryQualities", newValue); } - FString GetInventoryNameOverrideField() const { return GetNativeField(this, "UPrimalInventoryComponent", "InventoryNameOverride"); } - void SetInventoryNameOverrideField(FString newValue) { SetNativeField(this, "UPrimalInventoryComponent", "InventoryNameOverride", newValue); } - float GetMaxRemoteInventoryViewingDistanceField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxRemoteInventoryViewingDistance"); } - void SetMaxRemoteInventoryViewingDistanceField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxRemoteInventoryViewingDistance", newValue); } - float GetActiveInventoryRefreshIntervalField() const { return GetNativeField(this, "UPrimalInventoryComponent", "ActiveInventoryRefreshInterval"); } - void SetActiveInventoryRefreshIntervalField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ActiveInventoryRefreshInterval", newValue); } - int GetAbsoluteMaxInventoryItemsField() const { return GetNativeField(this, "UPrimalInventoryComponent", "AbsoluteMaxInventoryItems"); } - void SetAbsoluteMaxInventoryItemsField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "AbsoluteMaxInventoryItems", newValue); } - long double GetLastInventoryRefreshTimeField() const { return GetNativeField(this, "UPrimalInventoryComponent", "LastInventoryRefreshTime"); } - void SetLastInventoryRefreshTimeField(long double newValue) { SetNativeField(this, "UPrimalInventoryComponent", "LastInventoryRefreshTime", newValue); } - TSubclassOf GetDroppedItemTemplateOverrideField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DroppedItemTemplateOverride"); } - void SetDroppedItemTemplateOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DroppedItemTemplateOverride", newValue); } - TArray> GetForceAllowItemStackingsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "ForceAllowItemStackings"); } - void SetForceAllowItemStackingsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ForceAllowItemStackings", newValue); } - FRotator GetDropItemRotationOffsetField() const { return GetNativeField(this, "UPrimalInventoryComponent", "DropItemRotationOffset"); } - void SetDropItemRotationOffsetField(FRotator newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DropItemRotationOffset", newValue); } - TArray GetItemCraftingConsumptionReplenishmentsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemCraftingConsumptionReplenishments"); } - void SetItemCraftingConsumptionReplenishmentsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemCraftingConsumptionReplenishments", newValue); } - float GetMaxItemCooldownTimeClearField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxItemCooldownTimeClear"); } - void SetMaxItemCooldownTimeClearField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxItemCooldownTimeClear", newValue); } - TArray GetMaxItemTemplateQuantitiesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "MaxItemTemplateQuantities"); } - void SetMaxItemTemplateQuantitiesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxItemTemplateQuantities", newValue); } - USoundBase* GetItemCraftingSoundOverrideField() const { return GetNativeField(this, "UPrimalInventoryComponent", "ItemCraftingSoundOverride"); } - void SetItemCraftingSoundOverrideField(USoundBase* newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemCraftingSoundOverride", newValue); } - TArray GetWeaponAsEquipmentAttachmentInfosField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "WeaponAsEquipmentAttachmentInfos"); } - void SetWeaponAsEquipmentAttachmentInfosField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "WeaponAsEquipmentAttachmentInfos", newValue); } - TArray GetCraftingItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "CraftingItems"); } - void SetCraftingItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "CraftingItems", newValue); } - int GetDisplayDefaultItemInventoryCountField() const { return GetNativeField(this, "UPrimalInventoryComponent", "DisplayDefaultItemInventoryCount"); } - void SetDisplayDefaultItemInventoryCountField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DisplayDefaultItemInventoryCount", newValue); } - bool GetbHasBeenRegisteredField() const { return GetNativeField(this, "UPrimalInventoryComponent", "bHasBeenRegistered"); } - void SetbHasBeenRegisteredField(bool newValue) { SetNativeField(this, "UPrimalInventoryComponent", "bHasBeenRegistered", newValue); } - TArray> GetLastUsedItemClassesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "LastUsedItemClasses"); } - void SetLastUsedItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "LastUsedItemClasses", newValue); } - TArray GetLastUsedItemTimesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "LastUsedItemTimes"); } - void SetLastUsedItemTimesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "LastUsedItemTimes", newValue); } - int GetInvUpdatedFrameField() const { return GetNativeField(this, "UPrimalInventoryComponent", "InvUpdatedFrame"); } - void SetInvUpdatedFrameField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "InvUpdatedFrame", newValue); } - long double GetLastRefreshCheckItemTimeField() const { return GetNativeField(this, "UPrimalInventoryComponent", "LastRefreshCheckItemTime"); } - void SetLastRefreshCheckItemTimeField(long double newValue) { SetNativeField(this, "UPrimalInventoryComponent", "LastRefreshCheckItemTime", newValue); } - bool GetbLastPreventUseItemSpoilingTimeMultipliersField() const { return GetNativeField(this, "UPrimalInventoryComponent", "bLastPreventUseItemSpoilingTimeMultipliers"); } - void SetbLastPreventUseItemSpoilingTimeMultipliersField(bool newValue) { SetNativeField(this, "UPrimalInventoryComponent", "bLastPreventUseItemSpoilingTimeMultipliers", newValue); } - FItemNetID GetNextItemSpoilingIDField() const { return GetNativeField(this, "UPrimalInventoryComponent", "NextItemSpoilingID"); } - void SetNextItemSpoilingIDField(FItemNetID newValue) { SetNativeField(this, "UPrimalInventoryComponent", "NextItemSpoilingID", newValue); } - FItemNetID GetNextItemConsumptionIDField() const { return GetNativeField(this, "UPrimalInventoryComponent", "NextItemConsumptionID"); } - void SetNextItemConsumptionIDField(FItemNetID newValue) { SetNativeField(this, "UPrimalInventoryComponent", "NextItemConsumptionID", newValue); } - float GetMinItemSetsField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MinItemSets"); } - void SetMinItemSetsField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MinItemSets", newValue); } - float GetMaxItemSetsField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxItemSets"); } - void SetMaxItemSetsField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxItemSets", newValue); } - float GetNumItemSetsPowerField() const { return GetNativeField(this, "UPrimalInventoryComponent", "NumItemSetsPower"); } - void SetNumItemSetsPowerField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "NumItemSetsPower", newValue); } - __int32 Get_bf438Field() const { return GetNativeField<__int32>(this, "UPrimalInventoryComponent", "_bf438"); } - void Set_bf438Field(__int32 newValue) { SetNativeField(this, "UPrimalInventoryComponent", "_bf438", newValue); } - TArray GetItemSetsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemSets"); } - void SetItemSetsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemSets", newValue); } - TArray GetAdditionalItemSetsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "AdditionalItemSets"); } - void SetAdditionalItemSetsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "AdditionalItemSets", newValue); } - TSubclassOf GetItemSetsOverrideField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemSetsOverride"); } - void SetItemSetsOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemSetsOverride", newValue); } - TArray GetSetQuantityWeightsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "SetQuantityWeights"); } - void SetSetQuantityWeightsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "SetQuantityWeights", newValue); } - TArray GetSetQuantityValuesField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "SetQuantityValues"); } - void SetSetQuantityValuesField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "SetQuantityValues", newValue); } - USoundBase* GetItemRemovedBySoundField() const { return GetNativeField(this, "UPrimalInventoryComponent", "ItemRemovedBySound"); } - void SetItemRemovedBySoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemRemovedBySound", newValue); } - USoundBase* GetOpenInventorySoundField() const { return GetNativeField(this, "UPrimalInventoryComponent", "OpenInventorySound"); } - void SetOpenInventorySoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalInventoryComponent", "OpenInventorySound", newValue); } - USoundBase* GetCloseInventorySoundField() const { return GetNativeField(this, "UPrimalInventoryComponent", "CloseInventorySound"); } - void SetCloseInventorySoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalInventoryComponent", "CloseInventorySound", newValue); } - float GetMaxInventoryAccessDistanceField() const { return GetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryAccessDistance"); } - void SetMaxInventoryAccessDistanceField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "MaxInventoryAccessDistance", newValue); } - TArray GetServerCustomFolderField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ServerCustomFolder"); } - void SetServerCustomFolderField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ServerCustomFolder", newValue); } - TArray> GetForceAllowCraftingForInventoryComponentsField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "ForceAllowCraftingForInventoryComponents"); } - void SetForceAllowCraftingForInventoryComponentsField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ForceAllowCraftingForInventoryComponents", newValue); } - TArray GetItemClassWeightMultipliersField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "ItemClassWeightMultipliers"); } - void SetItemClassWeightMultipliersField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ItemClassWeightMultipliers", newValue); } - float GetGenerateItemSetsQualityMultiplierMinField() const { return GetNativeField(this, "UPrimalInventoryComponent", "GenerateItemSetsQualityMultiplierMin"); } - void SetGenerateItemSetsQualityMultiplierMinField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "GenerateItemSetsQualityMultiplierMin", newValue); } - float GetGenerateItemSetsQualityMultiplierMaxField() const { return GetNativeField(this, "UPrimalInventoryComponent", "GenerateItemSetsQualityMultiplierMax"); } - void SetGenerateItemSetsQualityMultiplierMaxField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "GenerateItemSetsQualityMultiplierMax", newValue); } - float GetDefaultCraftingRequirementsMultiplierField() const { return GetNativeField(this, "UPrimalInventoryComponent", "DefaultCraftingRequirementsMultiplier"); } - void SetDefaultCraftingRequirementsMultiplierField(float newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultCraftingRequirementsMultiplier", newValue); } - int GetDefaultCraftingQuantityMultiplierField() const { return GetNativeField(this, "UPrimalInventoryComponent", "DefaultCraftingQuantityMultiplier"); } - void SetDefaultCraftingQuantityMultiplierField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DefaultCraftingQuantityMultiplier", newValue); } - int GetSavedForceDefaultInventoryRefreshVersionField() const { return GetNativeField(this, "UPrimalInventoryComponent", "SavedForceDefaultInventoryRefreshVersion"); } - void SetSavedForceDefaultInventoryRefreshVersionField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "SavedForceDefaultInventoryRefreshVersion", newValue); } - int GetForceDefaultInventoryRefreshVersionField() const { return GetNativeField(this, "UPrimalInventoryComponent", "ForceDefaultInventoryRefreshVersion"); } - void SetForceDefaultInventoryRefreshVersionField(int newValue) { SetNativeField(this, "UPrimalInventoryComponent", "ForceDefaultInventoryRefreshVersion", newValue); } - TArray> GetTamedDinoForceConsiderFoodTypesField() const { return GetNativeField>>(this, "UPrimalInventoryComponent", "TamedDinoForceConsiderFoodTypes"); } - void SetTamedDinoForceConsiderFoodTypesField(TArray> newValue) { SetNativeField(this, "UPrimalInventoryComponent", "TamedDinoForceConsiderFoodTypes", newValue); } - TArray GetDinoAutoHealingItemsField() const { return GetNativeField>(this, "UPrimalInventoryComponent", "DinoAutoHealingItems"); } - void SetDinoAutoHealingItemsField(TArray newValue) { SetNativeField(this, "UPrimalInventoryComponent", "DinoAutoHealingItems", newValue); } - USoundBase* GetOverrideCraftingFinishedSoundField() const { return GetNativeField(this, "UPrimalInventoryComponent", "OverrideCraftingFinishedSound"); } - void SetOverrideCraftingFinishedSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalInventoryComponent", "OverrideCraftingFinishedSound", newValue); } - - // Functions - - static UClass* StaticClass() { return NativeCall(nullptr, "UPrimalInventoryComponent", "StaticClass"); } - void OnRegister() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "OnRegister"); } - bool AllowEquippingItemType(EPrimalEquipmentType::Type equipmentType) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AllowEquippingItemType", equipmentType); } - bool CanEquipItem(UPrimalItem* anItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "CanEquipItem", anItem); } - bool AllowAddInventoryItem(UPrimalItem* anItem, int* requestedQuantity, bool OnlyAddAll) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AllowAddInventoryItem", anItem, requestedQuantity, OnlyAddAll); } - UPrimalItem* AddItem(FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddItem", theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); } - bool IsLocalInventoryViewer() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsLocalInventoryViewer"); } - void NotifyItemAdded(UPrimalItem* theItem, bool bEquippedItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyItemAdded", theItem, bEquippedItem); } - void NotifyArkItemAdded() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyArkItemAdded"); } - void NotifyItemRemoved(UPrimalItem* theItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyItemRemoved", theItem); } - void RemoveItemSpoilingTimer(UPrimalItem* theItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoveItemSpoilingTimer", theItem); } - bool LoadAdditionalStructureEngrams() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "LoadAdditionalStructureEngrams"); } - bool RemoveItem(FItemNetID* itemID, bool bDoDrop, bool bSecondryAction, bool bForceRemoval, bool showHUDMessage) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoveItem", itemID, bDoDrop, bSecondryAction, bForceRemoval, showHUDMessage); } - bool ServerEquipItem(FItemNetID* itemID) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerEquipItem", itemID); } - void DropItem(FItemNetInfo* theInfo, bool bOverrideSpawnTransform, FVector* LocationOverride, FRotator* RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondryAction, bool bSetItemDropLocation) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "DropItem", theInfo, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondryAction, bSetItemDropLocation); } - static ADroppedItem* StaticDropNewItem(AActor* forActor, TSubclassOf AnItemClass, float ItemQuality, bool bForceNoBlueprint, int QuantityOverride, bool bForceBluepr, TSubclassOf TheDroppedTemplateOverride, FRotator* DroppedRotationOffset, bool bOverrideSpawnTransform, FVector* LocationOverride, FRotator* RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondaryAction, bool bSetItemDropLocation) { return NativeCall, float, bool, int, bool, TSubclassOf, FRotator *, bool, FVector *, FRotator *, bool, bool, bool, bool>(nullptr, "UPrimalInventoryComponent", "StaticDropNewItem", forActor, AnItemClass, ItemQuality, bForceNoBlueprint, QuantityOverride, bForceBluepr, TheDroppedTemplateOverride, DroppedRotationOffset, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondaryAction, bSetItemDropLocation); } - static ADroppedItem* StaticDropItem(AActor* forActor, FItemNetInfo* theInfo, TSubclassOf TheDroppedTemplateOverride, FRotator* DroppedRotationOffset, bool bOverrideSpawnTransform, FVector* LocationOverride, FRotator* RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondryAction, bool bSetItemDropLocation) { return NativeCall, FRotator *, bool, FVector *, FRotator *, bool, bool, bool, bool>(nullptr, "UPrimalInventoryComponent", "StaticDropItem", forActor, theInfo, TheDroppedTemplateOverride, DroppedRotationOffset, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondryAction, bSetItemDropLocation); } - AShooterPlayerController* GetOwnerController() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetOwnerController"); } - void InventoryViewersPlayLocalSound(USoundBase* aSound) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "InventoryViewersPlayLocalSound", aSound); } - void UpdateNetWeaponClipAmmo(UPrimalItem* anItem, int ammo) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "UpdateNetWeaponClipAmmo", anItem, ammo); } - void NotifyClientsItemStatus(UPrimalItem* anItem, bool bEquippedItem, bool bRemovedItem, bool bOnlyUpdateQuantity, bool bOnlyUpdateDurability, bool bOnlyNotifyItemSwap, UPrimalItem* anItem2, FItemNetID* InventoryInsertAfterItemID, bool bUsedItem, bool bNotifyCraftQueue, bool ShowHUDNotification) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyClientsItemStatus", anItem, bEquippedItem, bRemovedItem, bOnlyUpdateQuantity, bOnlyUpdateDurability, bOnlyNotifyItemSwap, anItem2, InventoryInsertAfterItemID, bUsedItem, bNotifyCraftQueue, ShowHUDNotification); } - void NotifyClientItemArkTributeStatusChanged(UPrimalItem* anItem, bool bRemoved, bool bFromLoad) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyClientItemArkTributeStatusChanged", anItem, bRemoved, bFromLoad); } - void ServerRequestItems(AShooterPlayerController* forPC, bool bEquippedItems, bool bIsFirstSpawn) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerRequestItems", forPC, bEquippedItems, bIsFirstSpawn); } - void ClientStartReceivingItems(bool bEquippedItems) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientStartReceivingItems", bEquippedItems); } - void ClientFinishReceivingItems(bool bEquippedItems) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientFinishReceivingItems", bEquippedItems); } - TArray* FindColorItem(TArray* result, FColor theColor, bool bEquippedItems) { return NativeCall *, TArray *, FColor, bool>((DWORD64)this, "UPrimalInventoryComponent", "FindColorItem", result, theColor, bEquippedItems); } - TArray* FindBrushColorItem(TArray* result, __int16 ArchIndex) { return NativeCall *, TArray *, __int16>((DWORD64)this, "UPrimalInventoryComponent", "FindBrushColorItem", result, ArchIndex); } - UPrimalItem* FindItem(FItemNetID* ItemID, bool bEquippedItems, bool bAllItems, int* itemIdx) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "FindItem", ItemID, bEquippedItems, bAllItems, itemIdx); } - void GiveInitialItems(bool SkipEngrams) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GiveInitialItems", SkipEngrams); } - void InitDefaultInventory() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "InitDefaultInventory"); } - void InitializeInventory() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "InitializeInventory"); } - void CheckRefreshDefaultInventoryItems() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "CheckRefreshDefaultInventoryItems"); } - void SetEquippedItemsOwnerNoSee(bool bNewOwnerNoSee, bool bForceHideFirstPerson) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SetEquippedItemsOwnerNoSee", bNewOwnerNoSee, bForceHideFirstPerson); } - bool RemoteInventoryAllowViewing(AShooterPlayerController* PC) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteInventoryAllowViewing", PC); } - bool RemoteInventoryAllowAddItems(AShooterPlayerController* PC, UPrimalItem* anItem, int* anItemQuantityOverride) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteInventoryAllowAddItems", PC, anItem, anItemQuantityOverride); } - bool RemoteInventoryAllowRemoveItems(AShooterPlayerController* PC, UPrimalItem* anItemToTransfer, int* requestedQuantity) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteInventoryAllowRemoveItems", PC, anItemToTransfer, requestedQuantity); } - bool RemoteInventoryAllowCraftingItems(AShooterPlayerController* PC, bool bIgnoreEnabled) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteInventoryAllowCraftingItems", PC, bIgnoreEnabled); } - bool RemoteInventoryAllowRepairingItems(AShooterPlayerController* PC, bool bIgnoreEnabled) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteInventoryAllowRepairingItems", PC, bIgnoreEnabled); } - void ServerViewRemoteInventory(AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerViewRemoteInventory", ByPC); } - void ServerCloseRemoteInventory(AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerCloseRemoteInventory", ByPC); } - void OnComponentDestroyed() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "OnComponentDestroyed"); } - void SwapCustomFolder(FString CFolder1, FString CFolder2, int DataListType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SwapCustomFolder", CFolder1, CFolder2, DataListType); } - bool AddToFolders(TArray* FoldersFound, UPrimalItem* anItem) { return NativeCall *, UPrimalItem *>((DWORD64)this, "UPrimalInventoryComponent", "AddToFolders", FoldersFound, anItem); } - FString* GetInventoryName(FString* result, bool bIsEquipped) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetInventoryName", result, bIsEquipped); } - int GetFirstUnoccupiedSlot(AShooterPlayerState* forPlayerState, UPrimalItem* forItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetFirstUnoccupiedSlot", forPlayerState, forItem); } - void ServerMakeRecipeItem_Implementation(APrimalStructureItemContainer* Container, FItemNetID NoteToConsume, TSubclassOf RecipeItemTemplate, FString* CustomName, FString* CustomDescription, TArray* CustomColors, TArray* CustomRequirements) { NativeCall, FString *, FString *, TArray *, TArray *>((DWORD64)this, "UPrimalInventoryComponent", "ServerMakeRecipeItem_Implementation", Container, NoteToConsume, RecipeItemTemplate, CustomName, CustomDescription, CustomColors, CustomRequirements); } - void ServerRemoveItemFromSlot_Implementation(FItemNetID ItemID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerRemoveItemFromSlot_Implementation", ItemID); } - void ServerAddItemToSlot_Implementation(FItemNetID ItemID, int SlotIndex) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerAddItemToSlot_Implementation", ItemID, SlotIndex); } - UPrimalItem* GetEquippedItemOfType(EPrimalEquipmentType::Type aType) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetEquippedItemOfType", aType); } - int IncrementItemTemplateQuantity(TSubclassOf ItemTemplate, int amount, bool bReplicateToClient, bool bIsBluepr, UPrimalItem** UseSpecificItem, UPrimalItem** IncrementedItem, bool bRequireExactClassMatch, bool bIsCraftingResourceConsumption, bool bIsFromUseConsumption, bool bIsArkTributeItem, bool ShowHUDNotification, bool bDontRecalcSpoilingTime) { return NativeCall, int, bool, bool, UPrimalItem **, UPrimalItem **, bool, bool, bool, bool, bool, bool>((DWORD64)this, "UPrimalInventoryComponent", "IncrementItemTemplateQuantity", ItemTemplate, amount, bReplicateToClient, bIsBluepr, UseSpecificItem, IncrementedItem, bRequireExactClassMatch, bIsCraftingResourceConsumption, bIsFromUseConsumption, bIsArkTributeItem, ShowHUDNotification, bDontRecalcSpoilingTime); } - bool IncrementArkTributeItemQuantity(UPrimalItem* NewItem, UPrimalItem** * IncrementedItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IncrementArkTributeItemQuantity", NewItem, *IncrementedItem); } - UPrimalItem* GetItemOfTemplate(TSubclassOf ItemTemplate, bool bOnlyInventoryItems, bool bOnlyEquippedItems, bool IgnoreItemsWithFullQuantity, bool bFavorSlotItems, bool bIsBlueprint, UPrimalItem* CheckCanStackWithItem, bool bRequiresExactClassMatch, int* CheckCanStackWithItemQuantityOverride, bool bIgnoreSlotItems, bool bOnlyArkTributeItems, bool bPreferEngram, bool bIsForCraftingConsumption) { return NativeCall, bool, bool, bool, bool, bool, UPrimalItem *, bool, int *, bool, bool, bool, bool>((DWORD64)this, "UPrimalInventoryComponent", "GetItemOfTemplate", ItemTemplate, bOnlyInventoryItems, bOnlyEquippedItems, IgnoreItemsWithFullQuantity, bFavorSlotItems, bIsBlueprint, CheckCanStackWithItem, bRequiresExactClassMatch, CheckCanStackWithItemQuantityOverride, bIgnoreSlotItems, bOnlyArkTributeItems, bPreferEngram, bIsForCraftingConsumption); } - int GetCraftQueueResourceCost(TSubclassOf ItemTemplate, UPrimalItem* IgnoreFirstItem) { return NativeCall, UPrimalItem *>((DWORD64)this, "UPrimalInventoryComponent", "GetCraftQueueResourceCost", ItemTemplate, IgnoreFirstItem); } - int GetItemTemplateQuantity(TSubclassOf ItemTemplate, UPrimalItem* IgnoreItem, bool bIgnoreBlueprints, bool bCheckValidForCrafting, bool bRequireExactClassMatch) { return NativeCall, UPrimalItem *, bool, bool, bool>((DWORD64)this, "UPrimalInventoryComponent", "GetItemTemplateQuantity", ItemTemplate, IgnoreItem, bIgnoreBlueprints, bCheckValidForCrafting, bRequireExactClassMatch); } - float GetTotalDurabilityOfTemplate(TSubclassOf ItemTemplate) { return NativeCall>((DWORD64)this, "UPrimalInventoryComponent", "GetTotalDurabilityOfTemplate", ItemTemplate); } - void LocalUseItemSlot(int slotIndex, bool bForceCraft) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "LocalUseItemSlot", slotIndex, bForceCraft); } - float GetTotalEquippedItemStat(EPrimalItemStat::Type statType) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetTotalEquippedItemStat", statType); } - float GetEquippedArmorRating(EPrimalEquipmentType::Type equipmentType) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetEquippedArmorRating", equipmentType); } - void ConsumeArmorDurability(float ConsumptionAmount, bool bAllArmorTypes, EPrimalEquipmentType::Type SpecificArmorType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ConsumeArmorDurability", ConsumptionAmount, bAllArmorTypes, SpecificArmorType); } - void ServerCraftItem(FItemNetID* itemID, AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerCraftItem", itemID, ByPC); } - void AddToCraftQueue(UPrimalItem* anItem, AShooterPlayerController* ByPC, bool bIsRepair) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddToCraftQueue", anItem, ByPC, bIsRepair); } - void ClearCraftQueue(bool bForceClearActiveCraftRepair) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClearCraftQueue", bForceClearActiveCraftRepair); } - void ServerRepairItem(FItemNetID* itemID, AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerRepairItem", itemID, ByPC); } - void ServerUseInventoryItem(FItemNetID* itemID, AShooterPlayerController* ByPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerUseInventoryItem", itemID, ByPC); } - void ServerUseItemWithItem(FItemNetID* itemID1, FItemNetID* itemID2, int AdditionalData) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerUseItemWithItem", itemID1, itemID2, AdditionalData); } - void SwapInventoryItems(FItemNetID* itemID1, FItemNetID* itemID2) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SwapInventoryItems", itemID1, itemID2); } - void AddItemCrafting(UPrimalItem* craftingItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddItemCrafting", craftingItem); } - void RemoveItemCrafting(UPrimalItem* craftingItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoveItemCrafting", craftingItem); } - void StopAllCraftingRepairing() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "StopAllCraftingRepairing"); } - void TickCraftQueue(float DeltaTime, AShooterGameState* theGameState) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "TickCraftQueue", DeltaTime, theGameState); } - float GetCraftingSpeed() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetCraftingSpeed"); } - AShooterHUD* GetLocalOwnerHUD() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetLocalOwnerHUD"); } - bool IsLocal() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsLocal"); } - void Unstasised() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "Unstasised"); } - void CheckForAutoCraftBlueprints() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "CheckForAutoCraftBlueprints"); } - bool IsCraftingAllowed(UPrimalItem* anItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsCraftingAllowed", anItem); } - void SetCraftingEnabled(bool bEnable) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SetCraftingEnabled", bEnable); } - float GetInventoryWeight() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetInventoryWeight"); } - void ServerSplitItemStack_Implementation(FItemNetID ItemID, int AmountToSplit) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerSplitItemStack_Implementation", ItemID, AmountToSplit); } - void ServerMergeItemStack_Implementation(FItemNetID ItemID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerMergeItemStack_Implementation", ItemID); } - void ServerForceMergeItemStack_Implementation(FItemNetID Item1ID, FItemNetID Item2ID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerForceMergeItemStack_Implementation", Item1ID, Item2ID); } - void RemoteDeleteCustomFolder(FString* CFolderName, int InventoryCompType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteDeleteCustomFolder", CFolderName, InventoryCompType); } - void RemoteAddItemToCustomFolder(FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteAddItemToCustomFolder", CFolderName, InventoryCompType, ItemId); } - void RemoteDeleteItemFromCustomFolder(AShooterPlayerController* PC, FString* CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoteDeleteItemFromCustomFolder", PC, CFolderName, InventoryCompType, ItemId); } - UPrimalItem* FindInventoryStackableItemCompareQuantity(TSubclassOf ItemClass, bool bFindLeastQuantity, UPrimalItem* StacksWithAndIgnoreItem) { return NativeCall, bool, UPrimalItem *>((DWORD64)this, "UPrimalInventoryComponent", "FindInventoryStackableItemCompareQuantity", ItemClass, bFindLeastQuantity, StacksWithAndIgnoreItem); } - UPrimalCharacterStatusComponent* GetCharacterStatusComponent() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetCharacterStatusComponent"); } - void ClientMultiUse(APlayerController* ForPC, int UseIndex, int hitBodyIndex) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientMultiUse", ForPC, UseIndex, hitBodyIndex); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex, int hitBodyIndex) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "TryMultiUse", ForPC, UseIndex, hitBodyIndex); } - void ActivePlayerInventoryTick(float DeltaTime) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ActivePlayerInventoryTick", DeltaTime); } - void InventoryRefresh() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "InventoryRefresh"); } - void RefreshItemSpoilingTimes() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RefreshItemSpoilingTimes"); } - void NotifyCraftingItemConsumption(TSubclassOf ItemTemplate, int amount) { NativeCall, int>((DWORD64)this, "UPrimalInventoryComponent", "NotifyCraftingItemConsumption", ItemTemplate, amount); } - float GetSpoilingTimeMultiplier(UPrimalItem* anItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetSpoilingTimeMultiplier", anItem); } - void UsedItem(UPrimalItem* anItem) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "UsedItem", anItem); } - void RegisterComponentTickFunctions(bool bRegister, bool bSaveAndRestoreComponentTickState) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RegisterComponentTickFunctions", bRegister, bSaveAndRestoreComponentTickState); } - void UpdatedCraftQueue() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "UpdatedCraftQueue"); } - void LoadedFromSaveGame() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "LoadedFromSaveGame"); } - void ClientItemMessageNotification_Implementation(FItemNetID ItemID, EPrimalItemMessage::Type ItemMessageType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientItemMessageNotification_Implementation", ItemID, ItemMessageType); } - bool IsOwnedByPlayer() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsOwnedByPlayer"); } - bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf OverrideInventoryDepositClass, APrimalStructureItemContainer* CopyStructureValues, APrimalStructureItemContainer** * DepositStructureResult, AActor* GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter) { return NativeCall, APrimalStructureItemContainer *, APrimalStructureItemContainer **, AActor *, FString, FString>((DWORD64)this, "UPrimalInventoryComponent", "DropInventoryDeposit", DestroyAtTime, bDoPreventSendingData, bIgnorEquippedItems, OverrideInventoryDepositClass, CopyStructureValues, *DepositStructureResult, GroundIgnoreActor, CurrentCustomFolderFilter, CurrentNameFilter); } - bool GetGroundLocation(FVector* theGroundLoc, FVector* OffsetUp, FVector* OffsetDown, APrimalStructure** LandedOnStructure, AActor* IgnoreActor, bool bCheckAnyStationary, UPrimitiveComponent** LandedOnComponent) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetGroundLocation", theGroundLoc, OffsetUp, OffsetDown, LandedOnStructure, IgnoreActor, bCheckAnyStationary, LandedOnComponent); } - AActor* CraftedBlueprintSpawnActor(TSubclassOf ForItemClass, TSubclassOf ActorClassToSpawn) { return NativeCall, TSubclassOf>((DWORD64)this, "UPrimalInventoryComponent", "CraftedBlueprintSpawnActor", ForItemClass, ActorClassToSpawn); } - bool GenerateCrateItems(float MinQualityMultiplier, float MaxQualityMultiplier, int NumPasses, float QuantityMultiplier, float SetPowerWeight, float MaxItemDifficultyClamp) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GenerateCrateItems", MinQualityMultiplier, MaxQualityMultiplier, NumPasses, QuantityMultiplier, SetPowerWeight, MaxItemDifficultyClamp); } - UPrimalItem* FindArkTributeItem(FItemNetID* ItemID) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "FindArkTributeItem", ItemID); } - void SetNextItemSpoilingID_Implementation(FItemNetID NextItemID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SetNextItemSpoilingID_Implementation", NextItemID); } - void SetNextItemConsumptionID_Implementation(FItemNetID NextItemID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "SetNextItemConsumptionID_Implementation", NextItemID); } - void CheckReplenishSlotIndex(int slotIndex, TSubclassOf ClassCheckOverride) { NativeCall>((DWORD64)this, "UPrimalInventoryComponent", "CheckReplenishSlotIndex", slotIndex, ClassCheckOverride); } - void OnArkTributeItemsRemoved(bool Success, TArray* RemovedItems, TArray* NotFoundItems, int FailureResponseCode, FString* FailureResponseMessage) { NativeCall *, TArray *, int, FString *>((DWORD64)this, "UPrimalInventoryComponent", "OnArkTributeItemsRemoved", Success, RemovedItems, NotFoundItems, FailureResponseCode, FailureResponseMessage); } - void ClientOnArkTributeItemsAdded_Implementation() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientOnArkTributeItemsAdded_Implementation"); } - void OnArkTributeItemsAdded(bool Success, TArray* AddedItems) { NativeCall *>((DWORD64)this, "UPrimalInventoryComponent", "OnArkTributeItemsAdded", Success, AddedItems); } - bool RemoveArkTributeItem(FItemNetID* itemID, unsigned int Quantity) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoveArkTributeItem", itemID, Quantity); } - bool ServerAddToArkTributeInventory(FItemNetID* itemID, TArray SteamItemUserIds, FItemNetInfo* AlternateItemInfo) { return NativeCall, FItemNetInfo *>((DWORD64)this, "UPrimalInventoryComponent", "ServerAddToArkTributeInventory", itemID, SteamItemUserIds, AlternateItemInfo); } - UPrimalItem* AddAfterRemovingFromArkTributeInventory(UPrimalItem* Item, FItemNetInfo* My) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddAfterRemovingFromArkTributeInventory", Item, My); } - bool ServerAddFromArkTributeInventory(FItemNetID* itemID, int Quantity) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerAddFromArkTributeInventory", itemID, Quantity); } - void RequestAddArkTributeItem(FItemNetInfo* theItemInfo, bool bFromLoad) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RequestAddArkTributeItem", theItemInfo, bFromLoad); } - void AddArkTributeItem(FItemNetInfo* theItemInfo, bool bFromLoad) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddArkTributeItem", theItemInfo, bFromLoad); } - void LoadArkTriuteItems(TArray* ItemInfos) { NativeCall *>((DWORD64)this, "UPrimalInventoryComponent", "LoadArkTriuteItems", ItemInfos); } - void NotifyItemQuantityUpdated(UPrimalItem* anItem, int amount) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "NotifyItemQuantityUpdated", anItem, amount); } - bool IsServerCustomFolder(int InventoryCompType) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsServerCustomFolder", InventoryCompType); } - void AddCustomFolder(FString CFolder, int InventoryCompType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddCustomFolder", CFolder, InventoryCompType); } - void RemoveCustomFolder(AShooterPlayerController* PC, FString FolderName, int InventoryCompType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "RemoveCustomFolder", PC, FolderName, InventoryCompType); } - TArray* GetCustomFolders(TArray* result, int InventoryCompType) { return NativeCall *, TArray *, int>((DWORD64)this, "UPrimalInventoryComponent", "GetCustomFolders", result, InventoryCompType); } - void DeleteItemFromCustomFolder(AShooterPlayerController* PC, FString CFolder, FItemNetID ItemId, int InventoryCompType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "DeleteItemFromCustomFolder", PC, CFolder, ItemId, InventoryCompType); } - bool OverrideBlueprintCraftingRequirement(TSubclassOf ItemTemplate, int ItemQuantity) { return NativeCall, int>((DWORD64)this, "UPrimalInventoryComponent", "OverrideBlueprintCraftingRequirement", ItemTemplate, ItemQuantity); } - bool AllowCraftingResourceConsumption(TSubclassOf ItemTemplate, int ItemQuantity) { return NativeCall, int>((DWORD64)this, "UPrimalInventoryComponent", "AllowCraftingResourceConsumption", ItemTemplate, ItemQuantity); } - float GetDamageTorpidityIncreaseMultiplierScale() { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetDamageTorpidityIncreaseMultiplierScale"); } - float GetItemWeightMultiplier(UPrimalItem* anItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "GetItemWeightMultiplier", anItem); } - void UpdateTribeGroupInventoryRank_Implementation(char NewRank) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "UpdateTribeGroupInventoryRank_Implementation", NewRank); } - float OverrideItemMinimumUseInterval(UPrimalItem* theItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "OverrideItemMinimumUseInterval", theItem); } - UPrimalItem* AddItemObject(UPrimalItem* anItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddItemObject", anItem); } - UPrimalItem* AddItemObjectEx(UPrimalItem* anItem, bool bEquipItem, bool AddToSlot, bool bDontStack, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "AddItemObjectEx", anItem, bEquipItem, AddToSlot, bDontStack, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer); } - UPrimalItem* BPFindItemWithID(int ItemID1, int ItemID2) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "BPFindItemWithID", ItemID1, ItemID2); } - bool BPRemoteInventoryAllowAddItems(AShooterPlayerController* PC) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "BPRemoteInventoryAllowAddItems", PC); } - bool IsValidCraftingResource(UPrimalItem* theItem) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "IsValidCraftingResource", theItem); } - void OnComponentCreated() { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "OnComponentCreated"); } - bool BPCustomRemoteInventoryAllowAddItems(AShooterPlayerController* PC, UPrimalItem* anItem, int anItemQuantityOverride) { return NativeCall((DWORD64)this, "UPrimalInventoryComponent", "BPCustomRemoteInventoryAllowAddItems", PC, anItem, anItemQuantityOverride); } - void BPRequestedInventoryItems(AShooterPlayerController* forPC) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "BPRequestedInventoryItems", forPC); } - void ClientItemMessageNotification(FItemNetID ItemID, EPrimalItemMessage::Type ItemMessageType) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ClientItemMessageNotification", ItemID, ItemMessageType); } - void ServerAddItemToSlot(FItemNetID ItemID, int SlotIndex) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerAddItemToSlot", ItemID, SlotIndex); } - void ServerForceMergeItemStack(FItemNetID Item1ID, FItemNetID Item2ID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerForceMergeItemStack", Item1ID, Item2ID); } - void ServerRemoveItemFromSlot(FItemNetID ItemID) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerRemoveItemFromSlot", ItemID); } - void ServerSplitItemStack(FItemNetID ItemID, int AmountToSplit) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "ServerSplitItemStack", ItemID, AmountToSplit); } - void UpdateTribeGroupInventoryRank(char NewRank) { NativeCall((DWORD64)this, "UPrimalInventoryComponent", "UpdateTribeGroupInventoryRank", NewRank); } -}; - -struct UPrimalItem : UObject -{ - float GetDinoAutoHealingThresholdPercentField() const { return GetNativeField(this, "UPrimalItem", "DinoAutoHealingThresholdPercent"); } - void SetDinoAutoHealingThresholdPercentField(float newValue) { SetNativeField(this, "UPrimalItem", "DinoAutoHealingThresholdPercent", newValue); } - float GetDinoAutoHealingUseTimeIntervalField() const { return GetNativeField(this, "UPrimalItem", "DinoAutoHealingUseTimeInterval"); } - void SetDinoAutoHealingUseTimeIntervalField(float newValue) { SetNativeField(this, "UPrimalItem", "DinoAutoHealingUseTimeInterval", newValue); } - int GetArkTributeVersionField() const { return GetNativeField(this, "UPrimalItem", "ArkTributeVersion"); } - void SetArkTributeVersionField(int newValue) { SetNativeField(this, "UPrimalItem", "ArkTributeVersion", newValue); } - TArray> GetEquipRequiresExplicitOwnerClassesField() const { return GetNativeField>>(this, "UPrimalItem", "EquipRequiresExplicitOwnerClasses"); } - void SetEquipRequiresExplicitOwnerClassesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "EquipRequiresExplicitOwnerClasses", newValue); } - TArray GetEquipRequiresExplicitOwnerTagsField() const { return GetNativeField>(this, "UPrimalItem", "EquipRequiresExplicitOwnerTags"); } - void SetEquipRequiresExplicitOwnerTagsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "EquipRequiresExplicitOwnerTags", newValue); } - unsigned int GetExpirationTimeUTCField() const { return GetNativeField(this, "UPrimalItem", "ExpirationTimeUTC"); } - void SetExpirationTimeUTCField(unsigned int newValue) { SetNativeField(this, "UPrimalItem", "ExpirationTimeUTC", newValue); } - int GetBlueprintAllowMaxCraftingsField() const { return GetNativeField(this, "UPrimalItem", "BlueprintAllowMaxCraftings"); } - void SetBlueprintAllowMaxCraftingsField(int newValue) { SetNativeField(this, "UPrimalItem", "BlueprintAllowMaxCraftings", newValue); } - FString GetAbstractItemCraftingDescriptionField() const { return GetNativeField(this, "UPrimalItem", "AbstractItemCraftingDescription"); } - void SetAbstractItemCraftingDescriptionField(FString newValue) { SetNativeField(this, "UPrimalItem", "AbstractItemCraftingDescription", newValue); } - TArray> GetItemSkinUseOnItemClassesField() const { return GetNativeField>>(this, "UPrimalItem", "ItemSkinUseOnItemClasses"); } - void SetItemSkinUseOnItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "ItemSkinUseOnItemClasses", newValue); } - USoundBase* GetItemBrokenSoundField() const { return GetNativeField(this, "UPrimalItem", "ItemBrokenSound"); } - void SetItemBrokenSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "ItemBrokenSound", newValue); } - USoundCue* GetUseItemSoundField() const { return GetNativeField(this, "UPrimalItem", "UseItemSound"); } - void SetUseItemSoundField(USoundCue* newValue) { SetNativeField(this, "UPrimalItem", "UseItemSound", newValue); } - USoundBase* GetEquipSoundField() const { return GetNativeField(this, "UPrimalItem", "EquipSound"); } - void SetEquipSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "EquipSound", newValue); } - USoundBase* GetUnEquipSoundField() const { return GetNativeField(this, "UPrimalItem", "UnEquipSound"); } - void SetUnEquipSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "UnEquipSound", newValue); } - USoundBase* GetUsedOnOtherItemSoundField() const { return GetNativeField(this, "UPrimalItem", "UsedOnOtherItemSound"); } - void SetUsedOnOtherItemSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "UsedOnOtherItemSound", newValue); } - USoundBase* GetRemovedFromOtherItemSoundField() const { return GetNativeField(this, "UPrimalItem", "RemovedFromOtherItemSound"); } - void SetRemovedFromOtherItemSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "RemovedFromOtherItemSound", newValue); } - float GetRandomChanceToBeBlueprintField() const { return GetNativeField(this, "UPrimalItem", "RandomChanceToBeBlueprint"); } - void SetRandomChanceToBeBlueprintField(float newValue) { SetNativeField(this, "UPrimalItem", "RandomChanceToBeBlueprint", newValue); } - TArray GetActorClassAttachmentInfosField() const { return GetNativeField>(this, "UPrimalItem", "ActorClassAttachmentInfos"); } - void SetActorClassAttachmentInfosField(TArray newValue) { SetNativeField(this, "UPrimalItem", "ActorClassAttachmentInfos", newValue); } - TArray* GetItemAttachmentInfosField() const { return GetNativeField *>(this, "UPrimalItem", "ItemAttachmentInfos"); } - void SetItemAttachmentInfosField(TArray* newValue) { SetNativeField(this, "UPrimalItem", "ItemAttachmentInfos", newValue); } - TArray GetDynamicItemAttachmentInfosField() const { return GetNativeField>(this, "UPrimalItem", "DynamicItemAttachmentInfos"); } - void SetDynamicItemAttachmentInfosField(TArray newValue) { SetNativeField(this, "UPrimalItem", "DynamicItemAttachmentInfos", newValue); } - TArray GetItemSkinAddItemAttachmentsField() const { return GetNativeField>(this, "UPrimalItem", "ItemSkinAddItemAttachments"); } - void SetItemSkinAddItemAttachmentsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "ItemSkinAddItemAttachments", newValue); } - TEnumAsByte GetMyItemTypeField() const { return GetNativeField>(this, "UPrimalItem", "MyItemType"); } - void SetMyItemTypeField(TEnumAsByte newValue) { SetNativeField(this, "UPrimalItem", "MyItemType", newValue); } - TEnumAsByte GetMyConsumableTypeField() const { return GetNativeField>(this, "UPrimalItem", "MyConsumableType"); } - void SetMyConsumableTypeField(TEnumAsByte newValue) { SetNativeField(this, "UPrimalItem", "MyConsumableType", newValue); } - TEnumAsByte GetMyEquipmentTypeField() const { return GetNativeField>(this, "UPrimalItem", "MyEquipmentType"); } - void SetMyEquipmentTypeField(TEnumAsByte newValue) { SetNativeField(this, "UPrimalItem", "MyEquipmentType", newValue); } - int GetExtraItemCategoryFlagsField() const { return GetNativeField(this, "UPrimalItem", "ExtraItemCategoryFlags"); } - void SetExtraItemCategoryFlagsField(int newValue) { SetNativeField(this, "UPrimalItem", "ExtraItemCategoryFlags", newValue); } - FVector GetBlockingShieldFPVTranslationField() const { return GetNativeField(this, "UPrimalItem", "BlockingShieldFPVTranslation"); } - void SetBlockingShieldFPVTranslationField(FVector newValue) { SetNativeField(this, "UPrimalItem", "BlockingShieldFPVTranslation", newValue); } - FRotator GetBlockingShieldFPVRotationField() const { return GetNativeField(this, "UPrimalItem", "BlockingShieldFPVRotation"); } - void SetBlockingShieldFPVRotationField(FRotator newValue) { SetNativeField(this, "UPrimalItem", "BlockingShieldFPVRotation", newValue); } - float GetShieldBlockDamagePercentageField() const { return GetNativeField(this, "UPrimalItem", "ShieldBlockDamagePercentage"); } - void SetShieldBlockDamagePercentageField(float newValue) { SetNativeField(this, "UPrimalItem", "ShieldBlockDamagePercentage", newValue); } - float GetShieldDamageToDurabilityRatioField() const { return GetNativeField(this, "UPrimalItem", "ShieldDamageToDurabilityRatio"); } - void SetShieldDamageToDurabilityRatioField(float newValue) { SetNativeField(this, "UPrimalItem", "ShieldDamageToDurabilityRatio", newValue); } - UAnimMontage* GetPlayAnimationOnUseField() const { return GetNativeField(this, "UPrimalItem", "PlayAnimationOnUse"); } - void SetPlayAnimationOnUseField(UAnimMontage* newValue) { SetNativeField(this, "UPrimalItem", "PlayAnimationOnUse", newValue); } - int GetCraftingMinLevelRequirementField() const { return GetNativeField(this, "UPrimalItem", "CraftingMinLevelRequirement"); } - void SetCraftingMinLevelRequirementField(int newValue) { SetNativeField(this, "UPrimalItem", "CraftingMinLevelRequirement", newValue); } - __int32 Get_bf15cField() const { return GetNativeField<__int32>(this, "UPrimalItem", "_bf15c"); } - void Set_bf15cField(__int32 newValue) { SetNativeField(this, "UPrimalItem", "_bf15c", newValue); } - float GetCraftingCooldownIntervalField() const { return GetNativeField(this, "UPrimalItem", "CraftingCooldownInterval"); } - void SetCraftingCooldownIntervalField(float newValue) { SetNativeField(this, "UPrimalItem", "CraftingCooldownInterval", newValue); } - TSubclassOf GetCraftingActorToSpawnField() const { return GetNativeField>(this, "UPrimalItem", "CraftingActorToSpawn"); } - void SetCraftingActorToSpawnField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "CraftingActorToSpawn", newValue); } - UTexture2D* GetBlueprintBackgroundOverrideTextureField() const { return GetNativeField(this, "UPrimalItem", "BlueprintBackgroundOverrideTexture"); } - void SetBlueprintBackgroundOverrideTextureField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "BlueprintBackgroundOverrideTexture", newValue); } - FString GetCraftItemButtonStringOverrideField() const { return GetNativeField(this, "UPrimalItem", "CraftItemButtonStringOverride"); } - void SetCraftItemButtonStringOverrideField(FString newValue) { SetNativeField(this, "UPrimalItem", "CraftItemButtonStringOverride", newValue); } - TSubclassOf GetUseSpawnActorClassField() const { return GetNativeField>(this, "UPrimalItem", "UseSpawnActorClass"); } - void SetUseSpawnActorClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "UseSpawnActorClass", newValue); } - FVector GetUseSpawnActorLocOffsetField() const { return GetNativeField(this, "UPrimalItem", "UseSpawnActorLocOffset"); } - void SetUseSpawnActorLocOffsetField(FVector newValue) { SetNativeField(this, "UPrimalItem", "UseSpawnActorLocOffset", newValue); } - int GetSlotIndexField() const { return GetNativeField(this, "UPrimalItem", "SlotIndex"); } - void SetSlotIndexField(int newValue) { SetNativeField(this, "UPrimalItem", "SlotIndex", newValue); } - FItemNetID GetItemIDField() const { return GetNativeField(this, "UPrimalItem", "ItemID"); } - void SetItemIDField(FItemNetID newValue) { SetNativeField(this, "UPrimalItem", "ItemID", newValue); } - int GetItemCustomDataField() const { return GetNativeField(this, "UPrimalItem", "ItemCustomData"); } - void SetItemCustomDataField(int newValue) { SetNativeField(this, "UPrimalItem", "ItemCustomData", newValue); } - TSubclassOf GetItemCustomClassField() const { return GetNativeField>(this, "UPrimalItem", "ItemCustomClass"); } - void SetItemCustomClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "ItemCustomClass", newValue); } - int GetItemSkinTemplateIndexField() const { return GetNativeField(this, "UPrimalItem", "ItemSkinTemplateIndex"); } - void SetItemSkinTemplateIndexField(int newValue) { SetNativeField(this, "UPrimalItem", "ItemSkinTemplateIndex", newValue); } - TSubclassOf GetItemSkinTemplateField() const { return GetNativeField>(this, "UPrimalItem", "ItemSkinTemplate"); } - void SetItemSkinTemplateField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "ItemSkinTemplate", newValue); } - float GetItemRatingField() const { return GetNativeField(this, "UPrimalItem", "ItemRating"); } - void SetItemRatingField(float newValue) { SetNativeField(this, "UPrimalItem", "ItemRating", newValue); } - unsigned __int16 GetCraftQueueField() const { return GetNativeField(this, "UPrimalItem", "CraftQueue"); } - void SetCraftQueueField(unsigned __int16 newValue) { SetNativeField(this, "UPrimalItem", "CraftQueue", newValue); } - float GetCraftingSkillField() const { return GetNativeField(this, "UPrimalItem", "CraftingSkill"); } - void SetCraftingSkillField(float newValue) { SetNativeField(this, "UPrimalItem", "CraftingSkill", newValue); } - FString GetCustomItemNameField() const { return GetNativeField(this, "UPrimalItem", "CustomItemName"); } - void SetCustomItemNameField(FString newValue) { SetNativeField(this, "UPrimalItem", "CustomItemName", newValue); } - FString GetCustomItemDescriptionField() const { return GetNativeField(this, "UPrimalItem", "CustomItemDescription"); } - void SetCustomItemDescriptionField(FString newValue) { SetNativeField(this, "UPrimalItem", "CustomItemDescription", newValue); } - TArray GetCustomColorsField() const { return GetNativeField>(this, "UPrimalItem", "CustomColors"); } - void SetCustomColorsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "CustomColors", newValue); } - TArray GetCustomResourceRequirementsField() const { return GetNativeField>(this, "UPrimalItem", "CustomResourceRequirements"); } - void SetCustomResourceRequirementsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "CustomResourceRequirements", newValue); } - long double GetNextCraftCompletionTimeField() const { return GetNativeField(this, "UPrimalItem", "NextCraftCompletionTime"); } - void SetNextCraftCompletionTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "NextCraftCompletionTime", newValue); } - TWeakObjectPtr GetOwnerInventoryField() const { return GetNativeField>(this, "UPrimalItem", "OwnerInventory"); } - void SetOwnerInventoryField(TWeakObjectPtr newValue) { SetNativeField(this, "UPrimalItem", "OwnerInventory", newValue); } - char GetItemQualityIndexField() const { return GetNativeField(this, "UPrimalItem", "ItemQualityIndex"); } - void SetItemQualityIndexField(char newValue) { SetNativeField(this, "UPrimalItem", "ItemQualityIndex", newValue); } - TSubclassOf GetSupportDragOntoItemClassField() const { return GetNativeField>(this, "UPrimalItem", "SupportDragOntoItemClass"); } - void SetSupportDragOntoItemClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "SupportDragOntoItemClass", newValue); } - TArray> GetSupportDragOntoItemClassesField() const { return GetNativeField>>(this, "UPrimalItem", "SupportDragOntoItemClasses"); } - void SetSupportDragOntoItemClassesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "SupportDragOntoItemClasses", newValue); } - TArray> GetSkinWeaponTemplatesField() const { return GetNativeField>>(this, "UPrimalItem", "SkinWeaponTemplates"); } - void SetSkinWeaponTemplatesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "SkinWeaponTemplates", newValue); } - TSubclassOf GetAmmoSupportDragOntoWeaponItemWeaponTemplateField() const { return GetNativeField>(this, "UPrimalItem", "AmmoSupportDragOntoWeaponItemWeaponTemplate"); } - void SetAmmoSupportDragOntoWeaponItemWeaponTemplateField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "AmmoSupportDragOntoWeaponItemWeaponTemplate", newValue); } - TArray> GetAmmoSupportDragOntoWeaponItemWeaponTemplatesField() const { return GetNativeField>>(this, "UPrimalItem", "AmmoSupportDragOntoWeaponItemWeaponTemplates"); } - void SetAmmoSupportDragOntoWeaponItemWeaponTemplatesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "AmmoSupportDragOntoWeaponItemWeaponTemplates", newValue); } - float GetIngredient_WeightIncreasePerQuantityField() const { return GetNativeField(this, "UPrimalItem", "Ingredient_WeightIncreasePerQuantity"); } - void SetIngredient_WeightIncreasePerQuantityField(float newValue) { SetNativeField(this, "UPrimalItem", "Ingredient_WeightIncreasePerQuantity", newValue); } - float GetIngredient_FoodIncreasePerQuantityField() const { return GetNativeField(this, "UPrimalItem", "Ingredient_FoodIncreasePerQuantity"); } - void SetIngredient_FoodIncreasePerQuantityField(float newValue) { SetNativeField(this, "UPrimalItem", "Ingredient_FoodIncreasePerQuantity", newValue); } - float GetIngredient_HealthIncreasePerQuantityField() const { return GetNativeField(this, "UPrimalItem", "Ingredient_HealthIncreasePerQuantity"); } - void SetIngredient_HealthIncreasePerQuantityField(float newValue) { SetNativeField(this, "UPrimalItem", "Ingredient_HealthIncreasePerQuantity", newValue); } - float GetIngredient_WaterIncreasePerQuantityField() const { return GetNativeField(this, "UPrimalItem", "Ingredient_WaterIncreasePerQuantity"); } - void SetIngredient_WaterIncreasePerQuantityField(float newValue) { SetNativeField(this, "UPrimalItem", "Ingredient_WaterIncreasePerQuantity", newValue); } - float GetIngredient_StaminaIncreasePerQuantityField() const { return GetNativeField(this, "UPrimalItem", "Ingredient_StaminaIncreasePerQuantity"); } - void SetIngredient_StaminaIncreasePerQuantityField(float newValue) { SetNativeField(this, "UPrimalItem", "Ingredient_StaminaIncreasePerQuantity", newValue); } - FString GetDescriptiveNameBaseField() const { return GetNativeField(this, "UPrimalItem", "DescriptiveNameBase"); } - void SetDescriptiveNameBaseField(FString newValue) { SetNativeField(this, "UPrimalItem", "DescriptiveNameBase", newValue); } - FString GetItemDescriptionField() const { return GetNativeField(this, "UPrimalItem", "ItemDescription"); } - void SetItemDescriptionField(FString newValue) { SetNativeField(this, "UPrimalItem", "ItemDescription", newValue); } - FString GetDurabilityStringShortField() const { return GetNativeField(this, "UPrimalItem", "DurabilityStringShort"); } - void SetDurabilityStringShortField(FString newValue) { SetNativeField(this, "UPrimalItem", "DurabilityStringShort", newValue); } - FString GetDurabilityStringField() const { return GetNativeField(this, "UPrimalItem", "DurabilityString"); } - void SetDurabilityStringField(FString newValue) { SetNativeField(this, "UPrimalItem", "DurabilityString", newValue); } - float GetDroppedItemLifeSpanOverrideField() const { return GetNativeField(this, "UPrimalItem", "DroppedItemLifeSpanOverride"); } - void SetDroppedItemLifeSpanOverrideField(float newValue) { SetNativeField(this, "UPrimalItem", "DroppedItemLifeSpanOverride", newValue); } - UMaterialInterface* GetDroppedMeshMaterialOverrideField() const { return GetNativeField(this, "UPrimalItem", "DroppedMeshMaterialOverride"); } - void SetDroppedMeshMaterialOverrideField(UMaterialInterface* newValue) { SetNativeField(this, "UPrimalItem", "DroppedMeshMaterialOverride", newValue); } - FVector GetDroppedMeshOverrideScale3DField() const { return GetNativeField(this, "UPrimalItem", "DroppedMeshOverrideScale3D"); } - void SetDroppedMeshOverrideScale3DField(FVector newValue) { SetNativeField(this, "UPrimalItem", "DroppedMeshOverrideScale3D", newValue); } - TSubclassOf GetSpoilingItemField() const { return GetNativeField>(this, "UPrimalItem", "SpoilingItem"); } - void SetSpoilingItemField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "SpoilingItem", newValue); } - TArray> GetUseRequiresOwnerActorClassesField() const { return GetNativeField>>(this, "UPrimalItem", "UseRequiresOwnerActorClasses"); } - void SetUseRequiresOwnerActorClassesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "UseRequiresOwnerActorClasses", newValue); } - TSubclassOf GetPreservingItemClassField() const { return GetNativeField>(this, "UPrimalItem", "PreservingItemClass"); } - void SetPreservingItemClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "PreservingItemClass", newValue); } - float GetPreservingItemSpoilingTimeMultiplierField() const { return GetNativeField(this, "UPrimalItem", "PreservingItemSpoilingTimeMultiplier"); } - void SetPreservingItemSpoilingTimeMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "PreservingItemSpoilingTimeMultiplier", newValue); } - float GetSpoilingTimeField() const { return GetNativeField(this, "UPrimalItem", "SpoilingTime"); } - void SetSpoilingTimeField(float newValue) { SetNativeField(this, "UPrimalItem", "SpoilingTime", newValue); } - int GetCraftingConsumesDurabilityField() const { return GetNativeField(this, "UPrimalItem", "CraftingConsumesDurability"); } - void SetCraftingConsumesDurabilityField(int newValue) { SetNativeField(this, "UPrimalItem", "CraftingConsumesDurability", newValue); } - float GetRepairResourceRequirementMultiplierField() const { return GetNativeField(this, "UPrimalItem", "RepairResourceRequirementMultiplier"); } - void SetRepairResourceRequirementMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "RepairResourceRequirementMultiplier", newValue); } - float GetBaseItemWeightField() const { return GetNativeField(this, "UPrimalItem", "BaseItemWeight"); } - void SetBaseItemWeightField(float newValue) { SetNativeField(this, "UPrimalItem", "BaseItemWeight", newValue); } - float GetDurabilityIncreaseMultiplierField() const { return GetNativeField(this, "UPrimalItem", "DurabilityIncreaseMultiplier"); } - void SetDurabilityIncreaseMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "DurabilityIncreaseMultiplier", newValue); } - float GetNewItemDurabilityOverrideField() const { return GetNativeField(this, "UPrimalItem", "NewItemDurabilityOverride"); } - void SetNewItemDurabilityOverrideField(float newValue) { SetNativeField(this, "UPrimalItem", "NewItemDurabilityOverride", newValue); } - float GetDurabilityDecreaseMultiplierField() const { return GetNativeField(this, "UPrimalItem", "DurabilityDecreaseMultiplier"); } - void SetDurabilityDecreaseMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "DurabilityDecreaseMultiplier", newValue); } - float GetUseDecreaseDurabilityField() const { return GetNativeField(this, "UPrimalItem", "UseDecreaseDurability"); } - void SetUseDecreaseDurabilityField(float newValue) { SetNativeField(this, "UPrimalItem", "UseDecreaseDurability", newValue); } - float GetAutoDurabilityDecreaseIntervalField() const { return GetNativeField(this, "UPrimalItem", "AutoDurabilityDecreaseInterval"); } - void SetAutoDurabilityDecreaseIntervalField(float newValue) { SetNativeField(this, "UPrimalItem", "AutoDurabilityDecreaseInterval", newValue); } - float GetAutoDecreaseMinDurabilityField() const { return GetNativeField(this, "UPrimalItem", "AutoDecreaseMinDurability"); } - void SetAutoDecreaseMinDurabilityField(float newValue) { SetNativeField(this, "UPrimalItem", "AutoDecreaseMinDurability", newValue); } - float GetAutoDecreaseDurabilityAmountPerIntervalField() const { return GetNativeField(this, "UPrimalItem", "AutoDecreaseDurabilityAmountPerInterval"); } - void SetAutoDecreaseDurabilityAmountPerIntervalField(float newValue) { SetNativeField(this, "UPrimalItem", "AutoDecreaseDurabilityAmountPerInterval", newValue); } - float GetUseDecreaseDurabilityMinField() const { return GetNativeField(this, "UPrimalItem", "UseDecreaseDurabilityMin"); } - void SetUseDecreaseDurabilityMinField(float newValue) { SetNativeField(this, "UPrimalItem", "UseDecreaseDurabilityMin", newValue); } - float GetUseMinDurabilityRequirementField() const { return GetNativeField(this, "UPrimalItem", "UseMinDurabilityRequirement"); } - void SetUseMinDurabilityRequirementField(float newValue) { SetNativeField(this, "UPrimalItem", "UseMinDurabilityRequirement", newValue); } - float GetResourceRarityField() const { return GetNativeField(this, "UPrimalItem", "ResourceRarity"); } - void SetResourceRarityField(float newValue) { SetNativeField(this, "UPrimalItem", "ResourceRarity", newValue); } - float GetBlueprintTimeToCraftField() const { return GetNativeField(this, "UPrimalItem", "BlueprintTimeToCraft"); } - void SetBlueprintTimeToCraftField(float newValue) { SetNativeField(this, "UPrimalItem", "BlueprintTimeToCraft", newValue); } - float GetMinBlueprintTimeToCraftField() const { return GetNativeField(this, "UPrimalItem", "MinBlueprintTimeToCraft"); } - void SetMinBlueprintTimeToCraftField(float newValue) { SetNativeField(this, "UPrimalItem", "MinBlueprintTimeToCraft", newValue); } - float GetBlueprintWeightField() const { return GetNativeField(this, "UPrimalItem", "BlueprintWeight"); } - void SetBlueprintWeightField(float newValue) { SetNativeField(this, "UPrimalItem", "BlueprintWeight", newValue); } - float GetMinimumUseIntervalField() const { return GetNativeField(this, "UPrimalItem", "MinimumUseInterval"); } - void SetMinimumUseIntervalField(float newValue) { SetNativeField(this, "UPrimalItem", "MinimumUseInterval", newValue); } - float GetTimeForFullRepairField() const { return GetNativeField(this, "UPrimalItem", "TimeForFullRepair"); } - void SetTimeForFullRepairField(float newValue) { SetNativeField(this, "UPrimalItem", "TimeForFullRepair", newValue); } - float GetBaseCraftingXPField() const { return GetNativeField(this, "UPrimalItem", "BaseCraftingXP"); } - void SetBaseCraftingXPField(float newValue) { SetNativeField(this, "UPrimalItem", "BaseCraftingXP", newValue); } - float GetBaseRepairingXPField() const { return GetNativeField(this, "UPrimalItem", "BaseRepairingXP"); } - void SetBaseRepairingXPField(float newValue) { SetNativeField(this, "UPrimalItem", "BaseRepairingXP", newValue); } - TArray GetBaseCraftingResourceRequirementsField() const { return GetNativeField>(this, "UPrimalItem", "BaseCraftingResourceRequirements"); } - void SetBaseCraftingResourceRequirementsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "BaseCraftingResourceRequirements", newValue); } - TArray GetOverrideRepairingRequirementsField() const { return GetNativeField>(this, "UPrimalItem", "OverrideRepairingRequirements"); } - void SetOverrideRepairingRequirementsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "OverrideRepairingRequirements", newValue); } - FItemStatInfo* GetItemStatInfosField() const { return GetNativeField(this, "UPrimalItem", "ItemStatInfos"); } - unsigned __int16* GetItemStatValuesField() const { return GetNativeField(this, "UPrimalItem", "ItemStatValues"); } - unsigned int GetWeaponClipAmmoField() const { return GetNativeField(this, "UPrimalItem", "WeaponClipAmmo"); } - void SetWeaponClipAmmoField(unsigned int newValue) { SetNativeField(this, "UPrimalItem", "WeaponClipAmmo", newValue); } - float GetWeaponFrequencyField() const { return GetNativeField(this, "UPrimalItem", "WeaponFrequency"); } - void SetWeaponFrequencyField(float newValue) { SetNativeField(this, "UPrimalItem", "WeaponFrequency", newValue); } - long double GetLastTimeToShowInfoField() const { return GetNativeField(this, "UPrimalItem", "LastTimeToShowInfo"); } - void SetLastTimeToShowInfoField(long double newValue) { SetNativeField(this, "UPrimalItem", "LastTimeToShowInfo", newValue); } - char GetItemVersionField() const { return GetNativeField(this, "UPrimalItem", "ItemVersion"); } - void SetItemVersionField(char newValue) { SetNativeField(this, "UPrimalItem", "ItemVersion", newValue); } - float GetItemDurabilityField() const { return GetNativeField(this, "UPrimalItem", "ItemDurability"); } - void SetItemDurabilityField(float newValue) { SetNativeField(this, "UPrimalItem", "ItemDurability", newValue); } - float GetMinItemDurabilityField() const { return GetNativeField(this, "UPrimalItem", "MinItemDurability"); } - void SetMinItemDurabilityField(float newValue) { SetNativeField(this, "UPrimalItem", "MinItemDurability", newValue); } - float GetSavedDurabilityField() const { return GetNativeField(this, "UPrimalItem", "SavedDurability"); } - void SetSavedDurabilityField(float newValue) { SetNativeField(this, "UPrimalItem", "SavedDurability", newValue); } - TSubclassOf GetWeaponTemplateField() const { return GetNativeField>(this, "UPrimalItem", "WeaponTemplate"); } - void SetWeaponTemplateField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "WeaponTemplate", newValue); } - UTexture2D* GetBrokenIconField() const { return GetNativeField(this, "UPrimalItem", "BrokenIcon"); } - void SetBrokenIconField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "BrokenIcon", newValue); } - UTexture2D* GetItemIconField() const { return GetNativeField(this, "UPrimalItem", "ItemIcon"); } - void SetItemIconField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "ItemIcon", newValue); } - UTexture2D* GetAlternateItemIconBelowDurabilityField() const { return GetNativeField(this, "UPrimalItem", "AlternateItemIconBelowDurability"); } - void SetAlternateItemIconBelowDurabilityField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "AlternateItemIconBelowDurability", newValue); } - float GetAlternateItemIconBelowDurabilityValueField() const { return GetNativeField(this, "UPrimalItem", "AlternateItemIconBelowDurabilityValue"); } - void SetAlternateItemIconBelowDurabilityValueField(float newValue) { SetNativeField(this, "UPrimalItem", "AlternateItemIconBelowDurabilityValue", newValue); } - UMaterialInterface* GetItemIconMaterialParentField() const { return GetNativeField(this, "UPrimalItem", "ItemIconMaterialParent"); } - void SetItemIconMaterialParentField(UMaterialInterface* newValue) { SetNativeField(this, "UPrimalItem", "ItemIconMaterialParent", newValue); } - __int16* GetItemColorIDField() const { return GetNativeField<__int16*>(this, "UPrimalItem", "ItemColorID"); } - __int16* GetPreSkinItemColorIDField() const { return GetNativeField<__int16*>(this, "UPrimalItem", "PreSkinItemColorID"); } - char* GetbUseItemColorField() const { return GetNativeField(this, "UPrimalItem", "bUseItemColor"); } - int GetItemQuantityField() const { return GetNativeField(this, "UPrimalItem", "ItemQuantity"); } - void SetItemQuantityField(int newValue) { SetNativeField(this, "UPrimalItem", "ItemQuantity", newValue); } - int GetMaxItemQuantityField() const { return GetNativeField(this, "UPrimalItem", "MaxItemQuantity"); } - void SetMaxItemQuantityField(int newValue) { SetNativeField(this, "UPrimalItem", "MaxItemQuantity", newValue); } - TArray GetSteamItemUserIDsField() const { return GetNativeField>(this, "UPrimalItem", "SteamItemUserIDs"); } - void SetSteamItemUserIDsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "SteamItemUserIDs", newValue); } - TSubclassOf GetStructureToBuildField() const { return GetNativeField>(this, "UPrimalItem", "StructureToBuild"); } - void SetStructureToBuildField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "StructureToBuild", newValue); } - TSubclassOf GetGiveItemWhenUsedField() const { return GetNativeField>(this, "UPrimalItem", "GiveItemWhenUsed"); } - void SetGiveItemWhenUsedField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "GiveItemWhenUsed", newValue); } - TArray> GetCraftingRequiresInventoryComponentField() const { return GetNativeField>>(this, "UPrimalItem", "CraftingRequiresInventoryComponent"); } - void SetCraftingRequiresInventoryComponentField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "CraftingRequiresInventoryComponent", newValue); } - TSubclassOf GetDroppedItemTemplateOverrideField() const { return GetNativeField>(this, "UPrimalItem", "DroppedItemTemplateOverride"); } - void SetDroppedItemTemplateOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "DroppedItemTemplateOverride", newValue); } - TSubclassOf GetDroppedItemTemplateForSecondryActionField() const { return GetNativeField>(this, "UPrimalItem", "DroppedItemTemplateForSecondryAction"); } - void SetDroppedItemTemplateForSecondryActionField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "DroppedItemTemplateForSecondryAction", newValue); } - TSubclassOf GetBuffToGiveOwnerCharacterField() const { return GetNativeField>(this, "UPrimalItem", "BuffToGiveOwnerCharacter"); } - void SetBuffToGiveOwnerCharacterField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "BuffToGiveOwnerCharacter", newValue); } - FRotator GetPreviewCameraRotationField() const { return GetNativeField(this, "UPrimalItem", "PreviewCameraRotation"); } - void SetPreviewCameraRotationField(FRotator newValue) { SetNativeField(this, "UPrimalItem", "PreviewCameraRotation", newValue); } - FVector GetPreviewCameraPivotOffsetField() const { return GetNativeField(this, "UPrimalItem", "PreviewCameraPivotOffset"); } - void SetPreviewCameraPivotOffsetField(FVector newValue) { SetNativeField(this, "UPrimalItem", "PreviewCameraPivotOffset", newValue); } - float GetPreviewCameraDistanceScaleFactorField() const { return GetNativeField(this, "UPrimalItem", "PreviewCameraDistanceScaleFactor"); } - void SetPreviewCameraDistanceScaleFactorField(float newValue) { SetNativeField(this, "UPrimalItem", "PreviewCameraDistanceScaleFactor", newValue); } - float GetPreviewCameraDefaultZoomMultiplierField() const { return GetNativeField(this, "UPrimalItem", "PreviewCameraDefaultZoomMultiplier"); } - void SetPreviewCameraDefaultZoomMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "PreviewCameraDefaultZoomMultiplier", newValue); } - float GetPreviewCameraMaxZoomMultiplierField() const { return GetNativeField(this, "UPrimalItem", "PreviewCameraMaxZoomMultiplier"); } - void SetPreviewCameraMaxZoomMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "PreviewCameraMaxZoomMultiplier", newValue); } - FName GetPlayerMeshTextureMaskParamNameField() const { return GetNativeField(this, "UPrimalItem", "PlayerMeshTextureMaskParamName"); } - void SetPlayerMeshTextureMaskParamNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "PlayerMeshTextureMaskParamName", newValue); } - UTexture2D* GetPlayerMeshTextureMaskField() const { return GetNativeField(this, "UPrimalItem", "PlayerMeshTextureMask"); } - void SetPlayerMeshTextureMaskField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "PlayerMeshTextureMask", newValue); } - UTexture2D* GetPlayerMeshNoItemDefaultTextureMaskField() const { return GetNativeField(this, "UPrimalItem", "PlayerMeshNoItemDefaultTextureMask"); } - void SetPlayerMeshNoItemDefaultTextureMaskField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "PlayerMeshNoItemDefaultTextureMask", newValue); } - int GetPlayerMeshTextureMaskMaterialIndexField() const { return GetNativeField(this, "UPrimalItem", "PlayerMeshTextureMaskMaterialIndex"); } - void SetPlayerMeshTextureMaskMaterialIndexField(int newValue) { SetNativeField(this, "UPrimalItem", "PlayerMeshTextureMaskMaterialIndex", newValue); } - FName GetFPVHandsMeshTextureMaskParamNameField() const { return GetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMaskParamName"); } - void SetFPVHandsMeshTextureMaskParamNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMaskParamName", newValue); } - UTexture2D* GetFPVHandsMeshTextureMaskField() const { return GetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMask"); } - void SetFPVHandsMeshTextureMaskField(UTexture2D* newValue) { SetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMask", newValue); } - int GetFPVHandsMeshTextureMaskMaterialIndexField() const { return GetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMaskMaterialIndex"); } - void SetFPVHandsMeshTextureMaskMaterialIndexField(int newValue) { SetNativeField(this, "UPrimalItem", "FPVHandsMeshTextureMaskMaterialIndex", newValue); } - UPrimalItem* GetWeaponAmmoOverrideItemCDOField() const { return GetNativeField(this, "UPrimalItem", "WeaponAmmoOverrideItemCDO"); } - void SetWeaponAmmoOverrideItemCDOField(UPrimalItem* newValue) { SetNativeField(this, "UPrimalItem", "WeaponAmmoOverrideItemCDO", newValue); } - long double GetCreationTimeField() const { return GetNativeField(this, "UPrimalItem", "CreationTime"); } - void SetCreationTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "CreationTime", newValue); } - long double GetLastAutoDurabilityDecreaseTimeField() const { return GetNativeField(this, "UPrimalItem", "LastAutoDurabilityDecreaseTime"); } - void SetLastAutoDurabilityDecreaseTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "LastAutoDurabilityDecreaseTime", newValue); } - long double GetLastUseTimeField() const { return GetNativeField(this, "UPrimalItem", "LastUseTime"); } - void SetLastUseTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "LastUseTime", newValue); } - long double GetLastLocalUseTimeField() const { return GetNativeField(this, "UPrimalItem", "LastLocalUseTime"); } - void SetLastLocalUseTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "LastLocalUseTime", newValue); } - int GetTempSlotIndexField() const { return GetNativeField(this, "UPrimalItem", "TempSlotIndex"); } - void SetTempSlotIndexField(int newValue) { SetNativeField(this, "UPrimalItem", "TempSlotIndex", newValue); } - TWeakObjectPtr GetAssociatedWeaponField() const { return GetNativeField>(this, "UPrimalItem", "AssociatedWeapon"); } - void SetAssociatedWeaponField(TWeakObjectPtr newValue) { SetNativeField(this, "UPrimalItem", "AssociatedWeapon", newValue); } - UPrimalItem* GetMyItemSkinField() const { return GetNativeField(this, "UPrimalItem", "MyItemSkin"); } - void SetMyItemSkinField(UPrimalItem* newValue) { SetNativeField(this, "UPrimalItem", "MyItemSkin", newValue); } - TWeakObjectPtr GetLastOwnerPlayerField() const { return GetNativeField>(this, "UPrimalItem", "LastOwnerPlayer"); } - void SetLastOwnerPlayerField(TWeakObjectPtr newValue) { SetNativeField(this, "UPrimalItem", "LastOwnerPlayer", newValue); } - float GetCropGrowingFertilizerConsumptionRateField() const { return GetNativeField(this, "UPrimalItem", "CropGrowingFertilizerConsumptionRate"); } - void SetCropGrowingFertilizerConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalItem", "CropGrowingFertilizerConsumptionRate", newValue); } - float GetCropMaxFruitFertilizerConsumptionRateField() const { return GetNativeField(this, "UPrimalItem", "CropMaxFruitFertilizerConsumptionRate"); } - void SetCropMaxFruitFertilizerConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalItem", "CropMaxFruitFertilizerConsumptionRate", newValue); } - float GetCropGrowingWaterConsumptionRateField() const { return GetNativeField(this, "UPrimalItem", "CropGrowingWaterConsumptionRate"); } - void SetCropGrowingWaterConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalItem", "CropGrowingWaterConsumptionRate", newValue); } - float GetCropMaxFruitWaterConsumptionRateField() const { return GetNativeField(this, "UPrimalItem", "CropMaxFruitWaterConsumptionRate"); } - void SetCropMaxFruitWaterConsumptionRateField(float newValue) { SetNativeField(this, "UPrimalItem", "CropMaxFruitWaterConsumptionRate", newValue); } - int GetCropMaxFruitsField() const { return GetNativeField(this, "UPrimalItem", "CropMaxFruits"); } - void SetCropMaxFruitsField(int newValue) { SetNativeField(this, "UPrimalItem", "CropMaxFruits", newValue); } - float GetCropNoFertilizerOrWaterCacheReductionRateField() const { return GetNativeField(this, "UPrimalItem", "CropNoFertilizerOrWaterCacheReductionRate"); } - void SetCropNoFertilizerOrWaterCacheReductionRateField(float newValue) { SetNativeField(this, "UPrimalItem", "CropNoFertilizerOrWaterCacheReductionRate", newValue); } - float GetFertilizerEffectivenessMultiplierField() const { return GetNativeField(this, "UPrimalItem", "FertilizerEffectivenessMultiplier"); } - void SetFertilizerEffectivenessMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "FertilizerEffectivenessMultiplier", newValue); } - float GetEggAlertDinosAggroAmountField() const { return GetNativeField(this, "UPrimalItem", "EggAlertDinosAggroAmount"); } - void SetEggAlertDinosAggroAmountField(float newValue) { SetNativeField(this, "UPrimalItem", "EggAlertDinosAggroAmount", newValue); } - float GetEggAlertDinosAggroRadiusField() const { return GetNativeField(this, "UPrimalItem", "EggAlertDinosAggroRadius"); } - void SetEggAlertDinosAggroRadiusField(float newValue) { SetNativeField(this, "UPrimalItem", "EggAlertDinosAggroRadius", newValue); } - TArray GetEggAlertDinosAggroTagsField() const { return GetNativeField>(this, "UPrimalItem", "EggAlertDinosAggroTags"); } - void SetEggAlertDinosAggroTagsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "EggAlertDinosAggroTags", newValue); } - float GetEggAlertDinosForcedAggroTimeField() const { return GetNativeField(this, "UPrimalItem", "EggAlertDinosForcedAggroTime"); } - void SetEggAlertDinosForcedAggroTimeField(float newValue) { SetNativeField(this, "UPrimalItem", "EggAlertDinosForcedAggroTime", newValue); } - float GetEggMaximumDistanceFromOriginalDropToAlertDinosField() const { return GetNativeField(this, "UPrimalItem", "EggMaximumDistanceFromOriginalDropToAlertDinos"); } - void SetEggMaximumDistanceFromOriginalDropToAlertDinosField(float newValue) { SetNativeField(this, "UPrimalItem", "EggMaximumDistanceFromOriginalDropToAlertDinos", newValue); } - TSubclassOf GetBrokenGiveItemClassField() const { return GetNativeField>(this, "UPrimalItem", "BrokenGiveItemClass"); } - void SetBrokenGiveItemClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "BrokenGiveItemClass", newValue); } - float GetClearColorDurabilityThresholdField() const { return GetNativeField(this, "UPrimalItem", "ClearColorDurabilityThreshold"); } - void SetClearColorDurabilityThresholdField(float newValue) { SetNativeField(this, "UPrimalItem", "ClearColorDurabilityThreshold", newValue); } - TSubclassOf GetItemClassToUseAsInitialCustomDataField() const { return GetNativeField>(this, "UPrimalItem", "ItemClassToUseAsInitialCustomData"); } - void SetItemClassToUseAsInitialCustomDataField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "ItemClassToUseAsInitialCustomData", newValue); } - FVector GetOriginalItemDropLocationField() const { return GetNativeField(this, "UPrimalItem", "OriginalItemDropLocation"); } - void SetOriginalItemDropLocationField(FVector newValue) { SetNativeField(this, "UPrimalItem", "OriginalItemDropLocation", newValue); } - FLinearColor GetDurabilityBarColorForegroundField() const { return GetNativeField(this, "UPrimalItem", "DurabilityBarColorForeground"); } - void SetDurabilityBarColorForegroundField(FLinearColor newValue) { SetNativeField(this, "UPrimalItem", "DurabilityBarColorForeground", newValue); } - FLinearColor GetDurabilityBarColorBackgroundField() const { return GetNativeField(this, "UPrimalItem", "DurabilityBarColorBackground"); } - void SetDurabilityBarColorBackgroundField(FLinearColor newValue) { SetNativeField(this, "UPrimalItem", "DurabilityBarColorBackground", newValue); } - TSubclassOf GetOverrideCooldownTimeItemClassField() const { return GetNativeField>(this, "UPrimalItem", "OverrideCooldownTimeItemClass"); } - void SetOverrideCooldownTimeItemClassField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "OverrideCooldownTimeItemClass", newValue); } - float GetMinDurabilityForCraftingResourceField() const { return GetNativeField(this, "UPrimalItem", "MinDurabilityForCraftingResource"); } - void SetMinDurabilityForCraftingResourceField(float newValue) { SetNativeField(this, "UPrimalItem", "MinDurabilityForCraftingResource", newValue); } - float GetResourceRequirementIncreaseRatingPowerField() const { return GetNativeField(this, "UPrimalItem", "ResourceRequirementIncreaseRatingPower"); } - void SetResourceRequirementIncreaseRatingPowerField(float newValue) { SetNativeField(this, "UPrimalItem", "ResourceRequirementIncreaseRatingPower", newValue); } - float GetResourceRequirementRatingScaleField() const { return GetNativeField(this, "UPrimalItem", "ResourceRequirementRatingScale"); } - void SetResourceRequirementRatingScaleField(float newValue) { SetNativeField(this, "UPrimalItem", "ResourceRequirementRatingScale", newValue); } - float GetResourceRequirementRatingIncreasePercentageField() const { return GetNativeField(this, "UPrimalItem", "ResourceRequirementRatingIncreasePercentage"); } - void SetResourceRequirementRatingIncreasePercentageField(float newValue) { SetNativeField(this, "UPrimalItem", "ResourceRequirementRatingIncreasePercentage", newValue); } - long double GetNextSpoilingTimeField() const { return GetNativeField(this, "UPrimalItem", "NextSpoilingTime"); } - void SetNextSpoilingTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "NextSpoilingTime", newValue); } - long double GetLastSpoilingTimeField() const { return GetNativeField(this, "UPrimalItem", "LastSpoilingTime"); } - void SetLastSpoilingTimeField(long double newValue) { SetNativeField(this, "UPrimalItem", "LastSpoilingTime", newValue); } - TArray GetDefaultFolderPathsField() const { return GetNativeField>(this, "UPrimalItem", "DefaultFolderPaths"); } - void SetDefaultFolderPathsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "DefaultFolderPaths", newValue); } - FString GetItemRatingStringField() const { return GetNativeField(this, "UPrimalItem", "ItemRatingString"); } - void SetItemRatingStringField(FString newValue) { SetNativeField(this, "UPrimalItem", "ItemRatingString", newValue); } - FName GetDefaultWeaponMeshNameField() const { return GetNativeField(this, "UPrimalItem", "DefaultWeaponMeshName"); } - void SetDefaultWeaponMeshNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "DefaultWeaponMeshName", newValue); } - int GetLastCalculatedTotalAmmoInvUpdatedFrameField() const { return GetNativeField(this, "UPrimalItem", "LastCalculatedTotalAmmoInvUpdatedFrame"); } - void SetLastCalculatedTotalAmmoInvUpdatedFrameField(int newValue) { SetNativeField(this, "UPrimalItem", "LastCalculatedTotalAmmoInvUpdatedFrame", newValue); } - int GetWeaponTotalAmmoField() const { return GetNativeField(this, "UPrimalItem", "WeaponTotalAmmo"); } - void SetWeaponTotalAmmoField(int newValue) { SetNativeField(this, "UPrimalItem", "WeaponTotalAmmo", newValue); } - TSubclassOf GetEngramRequirementItemClassOverrideField() const { return GetNativeField>(this, "UPrimalItem", "EngramRequirementItemClassOverride"); } - void SetEngramRequirementItemClassOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "EngramRequirementItemClassOverride", newValue); } - TArray GetCraftingResourceRequirementsField() const { return GetNativeField>(this, "UPrimalItem", "CraftingResourceRequirements"); } - void SetCraftingResourceRequirementsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "CraftingResourceRequirements", newValue); } - USoundBase* GetExtraThrowItemSoundField() const { return GetNativeField(this, "UPrimalItem", "ExtraThrowItemSound"); } - void SetExtraThrowItemSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "ExtraThrowItemSound", newValue); } - FVector GetSpawnOnWaterEncroachmentBoxExtentField() const { return GetNativeField(this, "UPrimalItem", "SpawnOnWaterEncroachmentBoxExtent"); } - void SetSpawnOnWaterEncroachmentBoxExtentField(FVector newValue) { SetNativeField(this, "UPrimalItem", "SpawnOnWaterEncroachmentBoxExtent", newValue); } - TArray> GetOnlyUsableOnSpecificClassesField() const { return GetNativeField>>(this, "UPrimalItem", "OnlyUsableOnSpecificClasses"); } - void SetOnlyUsableOnSpecificClassesField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "OnlyUsableOnSpecificClasses", newValue); } - TArray GetSaddlePassengerSeatsField() const { return GetNativeField>(this, "UPrimalItem", "SaddlePassengerSeats"); } - void SetSaddlePassengerSeatsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "SaddlePassengerSeats", newValue); } - FName GetSaddleOverrideRiderSocketNameField() const { return GetNativeField(this, "UPrimalItem", "SaddleOverrideRiderSocketName"); } - void SetSaddleOverrideRiderSocketNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "SaddleOverrideRiderSocketName", newValue); } - TSubclassOf GetEggDinoClassToSpawnField() const { return GetNativeField>(this, "UPrimalItem", "EggDinoClassToSpawn"); } - void SetEggDinoClassToSpawnField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "EggDinoClassToSpawn", newValue); } - char* GetEggNumberOfLevelUpPointsAppliedField() const { return GetNativeField(this, "UPrimalItem", "EggNumberOfLevelUpPointsApplied"); } - float GetEggTamedIneffectivenessModifierField() const { return GetNativeField(this, "UPrimalItem", "EggTamedIneffectivenessModifier"); } - void SetEggTamedIneffectivenessModifierField(float newValue) { SetNativeField(this, "UPrimalItem", "EggTamedIneffectivenessModifier", newValue); } - char* GetEggColorSetIndicesField() const { return GetNativeField(this, "UPrimalItem", "EggColorSetIndices"); } - float GetEggLoseDurabilityPerSecondField() const { return GetNativeField(this, "UPrimalItem", "EggLoseDurabilityPerSecond"); } - void SetEggLoseDurabilityPerSecondField(float newValue) { SetNativeField(this, "UPrimalItem", "EggLoseDurabilityPerSecond", newValue); } - float GetExtraEggLoseDurabilityPerSecondMultiplierField() const { return GetNativeField(this, "UPrimalItem", "ExtraEggLoseDurabilityPerSecondMultiplier"); } - void SetExtraEggLoseDurabilityPerSecondMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "ExtraEggLoseDurabilityPerSecondMultiplier", newValue); } - float GetEggMinTemperatureField() const { return GetNativeField(this, "UPrimalItem", "EggMinTemperature"); } - void SetEggMinTemperatureField(float newValue) { SetNativeField(this, "UPrimalItem", "EggMinTemperature", newValue); } - float GetEggMaxTemperatureField() const { return GetNativeField(this, "UPrimalItem", "EggMaxTemperature"); } - void SetEggMaxTemperatureField(float newValue) { SetNativeField(this, "UPrimalItem", "EggMaxTemperature", newValue); } - float GetEggDroppedInvalidTempLoseItemRatingSpeedField() const { return GetNativeField(this, "UPrimalItem", "EggDroppedInvalidTempLoseItemRatingSpeed"); } - void SetEggDroppedInvalidTempLoseItemRatingSpeedField(float newValue) { SetNativeField(this, "UPrimalItem", "EggDroppedInvalidTempLoseItemRatingSpeed", newValue); } - USoundBase* GetShieldHitSoundField() const { return GetNativeField(this, "UPrimalItem", "ShieldHitSound"); } - void SetShieldHitSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "ShieldHitSound", newValue); } - float GetRecipeCraftingSkillScaleField() const { return GetNativeField(this, "UPrimalItem", "RecipeCraftingSkillScale"); } - void SetRecipeCraftingSkillScaleField(float newValue) { SetNativeField(this, "UPrimalItem", "RecipeCraftingSkillScale", newValue); } - int GetCustomItemIDField() const { return GetNativeField(this, "UPrimalItem", "CustomItemID"); } - void SetCustomItemIDField(int newValue) { SetNativeField(this, "UPrimalItem", "CustomItemID", newValue); } - float GetAddDinoTargetingRangeField() const { return GetNativeField(this, "UPrimalItem", "AddDinoTargetingRange"); } - void SetAddDinoTargetingRangeField(float newValue) { SetNativeField(this, "UPrimalItem", "AddDinoTargetingRange", newValue); } - float GetDamageTorpidityArmorRatingField() const { return GetNativeField(this, "UPrimalItem", "DamageTorpidityArmorRating"); } - void SetDamageTorpidityArmorRatingField(float newValue) { SetNativeField(this, "UPrimalItem", "DamageTorpidityArmorRating", newValue); } - FName GetUseParticleEffectSocketNameField() const { return GetNativeField(this, "UPrimalItem", "UseParticleEffectSocketName"); } - void SetUseParticleEffectSocketNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "UseParticleEffectSocketName", newValue); } - float GetUseGiveDinoTameAffinityPercentField() const { return GetNativeField(this, "UPrimalItem", "UseGiveDinoTameAffinityPercent"); } - void SetUseGiveDinoTameAffinityPercentField(float newValue) { SetNativeField(this, "UPrimalItem", "UseGiveDinoTameAffinityPercent", newValue); } - TArray> GetCraftingAdditionalItemsToGiveField() const { return GetNativeField>>(this, "UPrimalItem", "CraftingAdditionalItemsToGive"); } - void SetCraftingAdditionalItemsToGiveField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "CraftingAdditionalItemsToGive", newValue); } - int GetLastValidItemVersionField() const { return GetNativeField(this, "UPrimalItem", "LastValidItemVersion"); } - void SetLastValidItemVersionField(int newValue) { SetNativeField(this, "UPrimalItem", "LastValidItemVersion", newValue); } - float GetGlobalTameAffinityMultiplierField() const { return GetNativeField(this, "UPrimalItem", "GlobalTameAffinityMultiplier"); } - void SetGlobalTameAffinityMultiplierField(float newValue) { SetNativeField(this, "UPrimalItem", "GlobalTameAffinityMultiplier", newValue); } - int GetCraftingGiveItemCountField() const { return GetNativeField(this, "UPrimalItem", "CraftingGiveItemCount"); } - void SetCraftingGiveItemCountField(int newValue) { SetNativeField(this, "UPrimalItem", "CraftingGiveItemCount", newValue); } - int GetCraftingGivesItemQuantityOverrideField() const { return GetNativeField(this, "UPrimalItem", "CraftingGivesItemQuantityOverride"); } - void SetCraftingGivesItemQuantityOverrideField(int newValue) { SetNativeField(this, "UPrimalItem", "CraftingGivesItemQuantityOverride", newValue); } - USoundBase* GetUseItemOnItemSoundField() const { return GetNativeField(this, "UPrimalItem", "UseItemOnItemSound"); } - void SetUseItemOnItemSoundField(USoundBase* newValue) { SetNativeField(this, "UPrimalItem", "UseItemOnItemSound", newValue); } - FName GetUseUnlocksEmoteNameField() const { return GetNativeField(this, "UPrimalItem", "UseUnlocksEmoteName"); } - void SetUseUnlocksEmoteNameField(FName newValue) { SetNativeField(this, "UPrimalItem", "UseUnlocksEmoteName", newValue); } - long double GetClusterSpoilingTimeUTCField() const { return GetNativeField(this, "UPrimalItem", "ClusterSpoilingTimeUTC"); } - void SetClusterSpoilingTimeUTCField(long double newValue) { SetNativeField(this, "UPrimalItem", "ClusterSpoilingTimeUTC", newValue); } - TArray GetEggDinoAncestorsField() const { return GetNativeField>(this, "UPrimalItem", "EggDinoAncestors"); } - void SetEggDinoAncestorsField(TArray newValue) { SetNativeField(this, "UPrimalItem", "EggDinoAncestors", newValue); } - TArray GetEggDinoAncestorsMaleField() const { return GetNativeField>(this, "UPrimalItem", "EggDinoAncestorsMale"); } - void SetEggDinoAncestorsMaleField(TArray newValue) { SetNativeField(this, "UPrimalItem", "EggDinoAncestorsMale", newValue); } - int GetEggRandomMutationsFemaleField() const { return GetNativeField(this, "UPrimalItem", "EggRandomMutationsFemale"); } - void SetEggRandomMutationsFemaleField(int newValue) { SetNativeField(this, "UPrimalItem", "EggRandomMutationsFemale", newValue); } - int GetEggRandomMutationsMaleField() const { return GetNativeField(this, "UPrimalItem", "EggRandomMutationsMale"); } - void SetEggRandomMutationsMaleField(int newValue) { SetNativeField(this, "UPrimalItem", "EggRandomMutationsMale", newValue); } - TArray> GetEquippingRequiresEngramsField() const { return GetNativeField>>(this, "UPrimalItem", "EquippingRequiresEngrams"); } - void SetEquippingRequiresEngramsField(TArray> newValue) { SetNativeField(this, "UPrimalItem", "EquippingRequiresEngrams", newValue); } - FString GetOverrideUseStringField() const { return GetNativeField(this, "UPrimalItem", "OverrideUseString"); } - void SetOverrideUseStringField(FString newValue) { SetNativeField(this, "UPrimalItem", "OverrideUseString", newValue); } - TSubclassOf GetSendToClientClassOverrideField() const { return GetNativeField>(this, "UPrimalItem", "SendToClientClassOverride"); } - void SetSendToClientClassOverrideField(TSubclassOf newValue) { SetNativeField(this, "UPrimalItem", "SendToClientClassOverride", newValue); } - FString GetCrafterCharacterNameField() const { return GetNativeField(this, "UPrimalItem", "CrafterCharacterName"); } - void SetCrafterCharacterNameField(FString newValue) { SetNativeField(this, "UPrimalItem", "CrafterCharacterName", newValue); } - FString GetCrafterTribeNameField() const { return GetNativeField(this, "UPrimalItem", "CrafterTribeName"); } - void SetCrafterTribeNameField(FString newValue) { SetNativeField(this, "UPrimalItem", "CrafterTribeName", newValue); } - float GetCraftedSkillBonusField() const { return GetNativeField(this, "UPrimalItem", "CraftedSkillBonus"); } - void SetCraftedSkillBonusField(float newValue) { SetNativeField(this, "UPrimalItem", "CraftedSkillBonus", newValue); } - float GetCraftingSkillQualityMultiplierMinField() const { return GetNativeField(this, "UPrimalItem", "CraftingSkillQualityMultiplierMin"); } - void SetCraftingSkillQualityMultiplierMinField(float newValue) { SetNativeField(this, "UPrimalItem", "CraftingSkillQualityMultiplierMin", newValue); } - float GetCraftingSkillQualityMultiplierMaxField() const { return GetNativeField(this, "UPrimalItem", "CraftingSkillQualityMultiplierMax"); } - void SetCraftingSkillQualityMultiplierMaxField(float newValue) { SetNativeField(this, "UPrimalItem", "CraftingSkillQualityMultiplierMax", newValue); } - - // Functions - - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "UPrimalItem", "GetPrivateStaticClass"); } - FItemNetInfo* GetItemNetInfo(FItemNetInfo* result, bool bIsForSendingToClient) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemNetInfo", result, bIsForSendingToClient); } - void InitFromNetInfo(FItemNetInfo* theInfo) { NativeCall((DWORD64)this, "UPrimalItem", "InitFromNetInfo", theInfo); } - void AddItemDurability(float durabilityToAdd) { NativeCall((DWORD64)this, "UPrimalItem", "AddItemDurability", durabilityToAdd); } - void InitNewItem(float ItemQuality, UPrimalInventoryComponent* toInventory, float MaxItemDifficultyClamp) { NativeCall((DWORD64)this, "UPrimalItem", "InitNewItem", ItemQuality, toInventory, MaxItemDifficultyClamp); } - bool AllowEquipItem(UPrimalInventoryComponent* toInventory) { return NativeCall((DWORD64)this, "UPrimalItem", "AllowEquipItem", toInventory); } - bool AllowInventoryItem(UPrimalInventoryComponent* toInventory) { return NativeCall((DWORD64)this, "UPrimalItem", "AllowInventoryItem", toInventory); } - void AddToInventory(UPrimalInventoryComponent* toInventory, bool bEquipItem, bool AddToSlotItems, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bIgnoreAbsoluteMaxInventory) { NativeCall((DWORD64)this, "UPrimalItem", "AddToInventory", toInventory, bEquipItem, AddToSlotItems, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bIgnoreAbsoluteMaxInventory); } - bool RemoveItemFromArkTributeInventory() { return NativeCall((DWORD64)this, "UPrimalItem", "RemoveItemFromArkTributeInventory"); } - bool RemoveItemFromInventory(bool bForceRemoval, bool showHUDMessage) { return NativeCall((DWORD64)this, "UPrimalItem", "RemoveItemFromInventory", bForceRemoval, showHUDMessage); } - float GetSpoilingTime() { return NativeCall((DWORD64)this, "UPrimalItem", "GetSpoilingTime"); } - static UPrimalItem* AddNewItem(TSubclassOf ItemArchetype, UPrimalInventoryComponent* GiveToInventory, bool bEquipItem, bool bDontStack, float ItemQuality, bool bForceNoBlueprint, int quantityOverride, bool bForceBluepr, float MaxItemDifficultyClamp, bool CreateOnClient, TSubclassOf ApplyItemSkin) { return NativeCall, UPrimalInventoryComponent *, bool, bool, float, bool, int, bool, float, bool, TSubclassOf>(nullptr, "UPrimalItem", "AddNewItem", ItemArchetype, GiveToInventory, bEquipItem, bDontStack, ItemQuality, bForceNoBlueprint, quantityOverride, bForceBluepr, MaxItemDifficultyClamp, CreateOnClient, ApplyItemSkin); } - UPrimalItem* CreateItemFromNetInfo(FItemNetInfo* newItemInfo) { return NativeCall((DWORD64)this, "UPrimalItem", "CreateItemFromNetInfo", newItemInfo); } - FString* GetItemName(FString* result, bool bIncludeQuantity, bool bShortName) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemName", result, bIncludeQuantity, bShortName); } - FLinearColor* GetItemQualityColor(FLinearColor* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemQualityColor", result); } - FString* GetItemDescription(FString* result, bool bGetLongDescription) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemDescription", result, bGetLongDescription); } - void EquippedItem() { NativeCall((DWORD64)this, "UPrimalItem", "EquippedItem"); } - void UnequippedItem() { NativeCall((DWORD64)this, "UPrimalItem", "UnequippedItem"); } - void UpdatedItem() { NativeCall((DWORD64)this, "UPrimalItem", "UpdatedItem"); } - void AddAttachments(AActor* UseOtherActor, bool bDontRemoveBeforeAttaching, USkeletalMeshComponent* Saddle, bool bRefreshDefaultAttachments) { NativeCall((DWORD64)this, "UPrimalItem", "AddAttachments", UseOtherActor, bDontRemoveBeforeAttaching, Saddle, bRefreshDefaultAttachments); } - void SetFirstPersonMasterPoseComponent(USkeletalMeshComponent* NewMasterPoseComponent) { NativeCall((DWORD64)this, "UPrimalItem", "SetFirstPersonMasterPoseComponent", NewMasterPoseComponent); } - void SetOwnerNoSee(bool bNoSee, bool bForceHideFirstPerson) { NativeCall((DWORD64)this, "UPrimalItem", "SetOwnerNoSee", bNoSee, bForceHideFirstPerson); } - void RemoveAttachments(AActor* UseOtherActor, bool bRefreshDefaultAttachments) { NativeCall((DWORD64)this, "UPrimalItem", "RemoveAttachments", UseOtherActor, bRefreshDefaultAttachments); } - UActorComponent* GetAttachedComponent(int attachmentIndex, AActor* UseOtherActor) { return NativeCall((DWORD64)this, "UPrimalItem", "GetAttachedComponent", attachmentIndex, UseOtherActor); } - UActorComponent* GetComponentToAttach(int attachmentIndex, AActor* UseOtherActor) { return NativeCall((DWORD64)this, "UPrimalItem", "GetComponentToAttach", attachmentIndex, UseOtherActor); } - AActor* GetOwnerActor() { return NativeCall((DWORD64)this, "UPrimalItem", "GetOwnerActor"); } - UTexture2D* GetEntryIcon(UObject* AssociatedDataObject, bool bIsEnabled) { return NativeCall((DWORD64)this, "UPrimalItem", "GetEntryIcon", AssociatedDataObject, bIsEnabled); } - FString* GetEntryString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetEntryString", result); } - float GetItemWeight(bool bJustOneQuantity, bool bForceNotBlueprintWeight) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemWeight", bJustOneQuantity, bForceNotBlueprintWeight); } - void AddToSlot(int theSlotIndex, bool bForce) { NativeCall((DWORD64)this, "UPrimalItem", "AddToSlot", theSlotIndex, bForce); } - void RemoveFromSlot(bool bForce) { NativeCall((DWORD64)this, "UPrimalItem", "RemoveFromSlot", bForce); } - bool AllowSlotting(UPrimalInventoryComponent* toInventory, bool bForce) { return NativeCall((DWORD64)this, "UPrimalItem", "AllowSlotting", toInventory, bForce); } - bool IsBroken() { return NativeCall((DWORD64)this, "UPrimalItem", "IsBroken"); } - int GetExplicitEntryIndexType() { return NativeCall((DWORD64)this, "UPrimalItem", "GetExplicitEntryIndexType"); } - float GetUseItemAddCharacterStatusValue(EPrimalCharacterStatusValue::Type valueType) { return NativeCall((DWORD64)this, "UPrimalItem", "GetUseItemAddCharacterStatusValue", valueType); } - void Use(bool bOverridePlayerInput) { NativeCall((DWORD64)this, "UPrimalItem", "Use", bOverridePlayerInput); } - float GetRemainingCooldownTime() { return NativeCall((DWORD64)this, "UPrimalItem", "GetRemainingCooldownTime"); } - bool CanSpawnOverWater(AActor* ownerActor, FTransform* SpawnTransform) { return NativeCall((DWORD64)this, "UPrimalItem", "CanSpawnOverWater", ownerActor, SpawnTransform); } - bool IsCooldownReadyForUse() { return NativeCall((DWORD64)this, "UPrimalItem", "IsCooldownReadyForUse"); } - bool CanUse(bool bIgnoreCooldown) { return NativeCall((DWORD64)this, "UPrimalItem", "CanUse", bIgnoreCooldown); } - void LocalUse(AShooterPlayerController* ForPC) { NativeCall((DWORD64)this, "UPrimalItem", "LocalUse", ForPC); } - void UnequipWeapon(bool bDelayedUnequip) { NativeCall((DWORD64)this, "UPrimalItem", "UnequipWeapon", bDelayedUnequip); } - FString* GetEntryDescription(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetEntryDescription", result); } - void AddedToInventory() { NativeCall((DWORD64)this, "UPrimalItem", "AddedToInventory"); } - void InitializeItem(bool bForceReinit, UWorld* OptionalInitWorld) { NativeCall((DWORD64)this, "UPrimalItem", "InitializeItem", bForceReinit, OptionalInitWorld); } - void InitItemIcon() { NativeCall((DWORD64)this, "UPrimalItem", "InitItemIcon"); } - FLinearColor* GetColorForItemColorID(FLinearColor* result, int SetNum, int ID) { return NativeCall((DWORD64)this, "UPrimalItem", "GetColorForItemColorID", result, SetNum, ID); } - static FLinearColor* StaticGetColorForItemColorID(FLinearColor* result, int ID) { return NativeCall(nullptr, "UPrimalItem", "StaticGetColorForItemColorID", result, ID); } - UMaterialInterface* GetEntryIconMaterial(UObject* AssociatedDataObject, bool bIsEnabled) { return NativeCall((DWORD64)this, "UPrimalItem", "GetEntryIconMaterial", AssociatedDataObject, bIsEnabled); } - int GetItemQuantity() { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemQuantity"); } - float GetMiscInfoFontScale() { return NativeCall((DWORD64)this, "UPrimalItem", "GetMiscInfoFontScale"); } - FString* GetMiscInfoString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetMiscInfoString", result); } - int IncrementItemQuantity(int amount, bool bReplicateToClient, bool bDontUpdateWeight, bool bIsFromUseConsumption, bool bIsArkTributeItem, bool bIsFromCraftingConsumption) { return NativeCall((DWORD64)this, "UPrimalItem", "IncrementItemQuantity", amount, bReplicateToClient, bDontUpdateWeight, bIsFromUseConsumption, bIsArkTributeItem, bIsFromCraftingConsumption); } - FString* GetItemTypeString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemTypeString", result); } - FString* GetItemSubtypeString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemSubtypeString", result); } - FString* GetItemStatsString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemStatsString", result); } - bool MeetBlueprintCraftingRequirements(UPrimalInventoryComponent* compareInventoryComp, int CraftAmountOverride, AShooterPlayerController* ForPlayer, bool bIsForCraftQueueAddition, bool bTestFullQueue) { return NativeCall((DWORD64)this, "UPrimalItem", "MeetBlueprintCraftingRequirements", compareInventoryComp, CraftAmountOverride, ForPlayer, bIsForCraftQueueAddition, bTestFullQueue); } - bool TestMeetsCraftingRequirementsPercent(UPrimalInventoryComponent* invComp, float Percent) { return NativeCall((DWORD64)this, "UPrimalItem", "TestMeetsCraftingRequirementsPercent", invComp, Percent); } - void ConsumeCraftingRequirementsPercent(UPrimalInventoryComponent* invComp, float Percent) { NativeCall((DWORD64)this, "UPrimalItem", "ConsumeCraftingRequirementsPercent", invComp, Percent); } - FString* GetCraftingRequirementsString(FString* result, UPrimalInventoryComponent* compareInventoryComp) { return NativeCall((DWORD64)this, "UPrimalItem", "GetCraftingRequirementsString", result, compareInventoryComp); } - bool MeetRepairingRequirements(UPrimalInventoryComponent* compareInventoryComp, bool bIsForCraftQueueAddition) { return NativeCall((DWORD64)this, "UPrimalItem", "MeetRepairingRequirements", compareInventoryComp, bIsForCraftQueueAddition); } - FString* GetRepairingRequirementsString(FString* result, UPrimalInventoryComponent* compareInventoryComp, bool bUseBaseRequeriments, float OverrideRepairPercent) { return NativeCall((DWORD64)this, "UPrimalItem", "GetRepairingRequirementsString", result, compareInventoryComp, bUseBaseRequeriments, OverrideRepairPercent); } - float GetItemStatModifier(EPrimalItemStat::Type statType) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemStatModifier", statType); } - FString* GetItemStatString(FString* result, EPrimalItemStat::Type statType) { return NativeCall((DWORD64)this, "UPrimalItem", "GetItemStatString", result, statType); } - bool UsesDurability() { return NativeCall((DWORD64)this, "UPrimalItem", "UsesDurability"); } - bool CanRepair(bool bIgnoreInventoryRequirement) { return NativeCall((DWORD64)this, "UPrimalItem", "CanRepair", bIgnoreInventoryRequirement); } - bool CanRepairInInventory(UPrimalInventoryComponent* invComp) { return NativeCall((DWORD64)this, "UPrimalItem", "CanRepairInInventory", invComp); } - float GetDurabilityPercentage() { return NativeCall((DWORD64)this, "UPrimalItem", "GetDurabilityPercentage"); } - void CraftBlueprint() { NativeCall((DWORD64)this, "UPrimalItem", "CraftBlueprint"); } - bool CanFullyCraft() { return NativeCall((DWORD64)this, "UPrimalItem", "CanFullyCraft"); } - void StopCraftingRepairing(bool bCheckIfCraftingOrRepairing) { NativeCall((DWORD64)this, "UPrimalItem", "StopCraftingRepairing", bCheckIfCraftingOrRepairing); } - UPrimalItem* FinishCraftingBlueprint() { return NativeCall((DWORD64)this, "UPrimalItem", "FinishCraftingBlueprint"); } - float GetTimeToCraftBlueprint() { return NativeCall((DWORD64)this, "UPrimalItem", "GetTimeToCraftBlueprint"); } - float GetTimeForFullRepair() { return NativeCall((DWORD64)this, "UPrimalItem", "GetTimeForFullRepair"); } - void GenerateItemID(FItemNetID* TheItemID) { NativeCall((DWORD64)this, "UPrimalItem", "GenerateItemID", TheItemID); } - void TickCraftingItem(float DeltaTime, AShooterGameState* theGameState) { NativeCall((DWORD64)this, "UPrimalItem", "TickCraftingItem", DeltaTime, theGameState); } - float GetCraftingPercent() { return NativeCall((DWORD64)this, "UPrimalItem", "GetCraftingPercent"); } - float GetRepairingPercent() { return NativeCall((DWORD64)this, "UPrimalItem", "GetRepairingPercent"); } - void SetQuantity(int NewQuantity, bool ShowHUDNotification) { NativeCall((DWORD64)this, "UPrimalItem", "SetQuantity", NewQuantity, ShowHUDNotification); } - void RepairItem() { NativeCall((DWORD64)this, "UPrimalItem", "RepairItem"); } - void FinishRepairing() { NativeCall((DWORD64)this, "UPrimalItem", "FinishRepairing"); } - void Used(UPrimalItem* DestinationItem, int AdditionalData) { NativeCall((DWORD64)this, "UPrimalItem", "Used", DestinationItem, AdditionalData); } - void RemoveWeaponAccessory() { NativeCall((DWORD64)this, "UPrimalItem", "RemoveWeaponAccessory"); } - void ServerRemoveItemSkin() { NativeCall((DWORD64)this, "UPrimalItem", "ServerRemoveItemSkin"); } - void ServerRemoveItemSkinOnly() { NativeCall((DWORD64)this, "UPrimalItem", "ServerRemoveItemSkinOnly"); } - void ServerRemoveWeaponAccessoryOnly() { NativeCall((DWORD64)this, "UPrimalItem", "ServerRemoveWeaponAccessoryOnly"); } - void RemoveClipAmmo(bool bDontUpdateItem) { NativeCall((DWORD64)this, "UPrimalItem", "RemoveClipAmmo", bDontUpdateItem); } - bool CanStackWithItem(UPrimalItem* otherItem, int* QuantityOverride) { return NativeCall((DWORD64)this, "UPrimalItem", "CanStackWithItem", otherItem, QuantityOverride); } - bool CheckAutoCraftBlueprint() { return NativeCall((DWORD64)this, "UPrimalItem", "CheckAutoCraftBlueprint"); } - bool CanCraft() { return NativeCall((DWORD64)this, "UPrimalItem", "CanCraft"); } - bool CanCraftInInventory(UPrimalInventoryComponent* invComp) { return NativeCall((DWORD64)this, "UPrimalItem", "CanCraftInInventory", invComp); } - FString* GetCraftRepairInvReqString(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetCraftRepairInvReqString", result); } - bool AllowUseInInventory(bool bIsRemoteInventory, AShooterPlayerController* ByPC, bool DontCheckActor) { return NativeCall((DWORD64)this, "UPrimalItem", "AllowUseInInventory", bIsRemoteInventory, ByPC, DontCheckActor); } - bool CanBeArkTributeItem() { return NativeCall((DWORD64)this, "UPrimalItem", "CanBeArkTributeItem"); } - void SetEngramBlueprint() { NativeCall((DWORD64)this, "UPrimalItem", "SetEngramBlueprint"); } - bool CanSpoil() { return NativeCall((DWORD64)this, "UPrimalItem", "CanSpoil"); } - void RecalcSpoilingTime(long double TimeSeconds, float SpoilPercent, UPrimalInventoryComponent* forComp) { NativeCall((DWORD64)this, "UPrimalItem", "RecalcSpoilingTime", TimeSeconds, SpoilPercent, forComp); } - void InventoryRefreshCheckItem() { NativeCall((DWORD64)this, "UPrimalItem", "InventoryRefreshCheckItem"); } - bool IsValidForCrafting() { return NativeCall((DWORD64)this, "UPrimalItem", "IsValidForCrafting"); } - bool IsOwnerInWater() { return NativeCall((DWORD64)this, "UPrimalItem", "IsOwnerInWater"); } - bool AllowRemoteAddToInventory(UPrimalInventoryComponent* invComp) { return NativeCall((DWORD64)this, "UPrimalItem", "AllowRemoteAddToInventory", invComp); } - bool CanDrop() { return NativeCall((DWORD64)this, "UPrimalItem", "CanDrop"); } - void PickupAlertDinos(AActor* groundItem) { NativeCall((DWORD64)this, "UPrimalItem", "PickupAlertDinos", groundItem); } - void GetItemAttachmentInfos(AActor* OwnerActor) { NativeCall((DWORD64)this, "UPrimalItem", "GetItemAttachmentInfos", OwnerActor); } - void SetAttachedMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall((DWORD64)this, "UPrimalItem", "SetAttachedMeshesMaterialScalarParamValue", ParamName, Value); } - bool CanUseWithItemSource(UPrimalItem* DestinationItem) { return NativeCall((DWORD64)this, "UPrimalItem", "CanUseWithItemSource", DestinationItem); } - bool CanUseWithItemDestination(UPrimalItem* SourceItem) { return NativeCall((DWORD64)this, "UPrimalItem", "CanUseWithItemDestination", SourceItem); } - bool UseItemOntoItem(UPrimalItem* DestinationItem, int AdditionalData) { return NativeCall((DWORD64)this, "UPrimalItem", "UseItemOntoItem", DestinationItem, AdditionalData); } - void LocalUseItemOntoItem(AShooterPlayerController* ForPC, UPrimalItem* DestinationItem) { NativeCall((DWORD64)this, "UPrimalItem", "LocalUseItemOntoItem", ForPC, DestinationItem); } - FString* GetPrimaryColorName(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "GetPrimaryColorName", result); } - bool ProcessEditText(AShooterPlayerController* ForPC, FString* TextToUse, bool __formal) { return NativeCall((DWORD64)this, "UPrimalItem", "ProcessEditText", ForPC, TextToUse, __formal); } - void NotifyEditText(AShooterPlayerController* PC) { NativeCall((DWORD64)this, "UPrimalItem", "NotifyEditText", PC); } - void AddToArkTributeInvenroty(UPrimalInventoryComponent* toInventory, bool bFromLoad) { NativeCall((DWORD64)this, "UPrimalItem", "AddToArkTributeInvenroty", toInventory, bFromLoad); } - int GetMaximumAdditionalCrafting(UPrimalInventoryComponent* forComp, AShooterPlayerController* PC) { return NativeCall((DWORD64)this, "UPrimalItem", "GetMaximumAdditionalCrafting", forComp, PC); } - float GetWeaponTemplateMeleeDamageAmount() { return NativeCall((DWORD64)this, "UPrimalItem", "GetWeaponTemplateMeleeDamageAmount"); } - float GetWeaponTemplateDurabilityToConsumePerMeleeHit() { return NativeCall((DWORD64)this, "UPrimalItem", "GetWeaponTemplateDurabilityToConsumePerMeleeHit"); } - TSubclassOf* GetWeaponTemplateMeleeDamageType(TSubclassOf* result) { return NativeCall *, TSubclassOf *>((DWORD64)this, "UPrimalItem", "GetWeaponTemplateMeleeDamageType", result); } - TSubclassOf* GetWeaponTemplateHarvestDamageType(TSubclassOf* result) { return NativeCall *, TSubclassOf *>((DWORD64)this, "UPrimalItem", "GetWeaponTemplateHarvestDamageType", result); } - float GetWeaponTemplateHarvestDamageMultiplier() { return NativeCall((DWORD64)this, "UPrimalItem", "GetWeaponTemplateHarvestDamageMultiplier"); } - void CalcRecipeStats() { NativeCall((DWORD64)this, "UPrimalItem", "CalcRecipeStats"); } - bool IsUsableConsumable() { return NativeCall((DWORD64)this, "UPrimalItem", "IsUsableConsumable"); } - bool CanEquipWeapon() { return NativeCall((DWORD64)this, "UPrimalItem", "CanEquipWeapon"); } - void Crafted_Implementation(bool bWasCraftedFromEngram) { NativeCall((DWORD64)this, "UPrimalItem", "Crafted_Implementation", bWasCraftedFromEngram); } - UMaterialInterface* GetHUDIconMaterial() { return NativeCall((DWORD64)this, "UPrimalItem", "GetHUDIconMaterial"); } - void StaticRegisterNativesUPrimalItem() { NativeCall((DWORD64)this, "UPrimalItem", "StaticRegisterNativesUPrimalItem"); } - FString* BPAllowCrafting(FString* result, AShooterPlayerController* ForPC) { return NativeCall((DWORD64)this, "UPrimalItem", "BPAllowCrafting", result, ForPC); } - bool BPAllowRemoteAddToInventory(UPrimalInventoryComponent* invComp) { return NativeCall((DWORD64)this, "UPrimalItem", "BPAllowRemoteAddToInventory", invComp); } - bool BPCanAddToInventory(UPrimalInventoryComponent* toInventory) { return NativeCall((DWORD64)this, "UPrimalItem", "BPCanAddToInventory", toInventory); } - FString* BPGetCustomInventoryWidgetText(FString* result) { return NativeCall((DWORD64)this, "UPrimalItem", "BPGetCustomInventoryWidgetText", result); } - FString* BPGetItemDescription(FString* result, FString* InDescription, bool bGetLongDescription) { return NativeCall((DWORD64)this, "UPrimalItem", "BPGetItemDescription", result, InDescription, bGetLongDescription); } -}; - -struct FItemNetInfo -{ - TSubclassOf GetItemArchetypeField() const { return GetNativeField>(this, "FItemNetInfo", "ItemArchetype"); } - void SetItemArchetypeField(TSubclassOf newValue) { SetNativeField(this, "FItemNetInfo", "ItemArchetype", newValue); } - FItemNetID GetItemIDField() const { return GetNativeField(this, "FItemNetInfo", "ItemID"); } - void SetItemIDField(FItemNetID newValue) { SetNativeField(this, "FItemNetInfo", "ItemID", newValue); } - unsigned int GetExpirationTimeUTCField() const { return GetNativeField(this, "FItemNetInfo", "ExpirationTimeUTC"); } - void SetExpirationTimeUTCField(unsigned int newValue) { SetNativeField(this, "FItemNetInfo", "ExpirationTimeUTC", newValue); } - unsigned __int64 GetOwnerPlayerDataIdField() const { return GetNativeField(this, "FItemNetInfo", "OwnerPlayerDataId"); } - void SetOwnerPlayerDataIdField(unsigned __int64 newValue) { SetNativeField(this, "FItemNetInfo", "OwnerPlayerDataId", newValue); } - int GetSlotIndexField() const { return GetNativeField(this, "FItemNetInfo", "SlotIndex"); } - void SetSlotIndexField(int newValue) { SetNativeField(this, "FItemNetInfo", "SlotIndex", newValue); } - unsigned int GetWeaponClipAmmoField() const { return GetNativeField(this, "FItemNetInfo", "WeaponClipAmmo"); } - void SetWeaponClipAmmoField(unsigned int newValue) { SetNativeField(this, "FItemNetInfo", "WeaponClipAmmo", newValue); } - long double GetCreationTimeField() const { return GetNativeField(this, "FItemNetInfo", "CreationTime"); } - void SetCreationTimeField(long double newValue) { SetNativeField(this, "FItemNetInfo", "CreationTime", newValue); } - float GetItemDurabilityField() const { return GetNativeField(this, "FItemNetInfo", "ItemDurability"); } - void SetItemDurabilityField(float newValue) { SetNativeField(this, "FItemNetInfo", "ItemDurability", newValue); } - float GetItemRatingField() const { return GetNativeField(this, "FItemNetInfo", "ItemRating"); } - void SetItemRatingField(float newValue) { SetNativeField(this, "FItemNetInfo", "ItemRating", newValue); } - char GetItemQualityIndexField() const { return GetNativeField(this, "FItemNetInfo", "ItemQualityIndex"); } - void SetItemQualityIndexField(char newValue) { SetNativeField(this, "FItemNetInfo", "ItemQualityIndex", newValue); } - unsigned int GetItemQuantityField() const { return GetNativeField(this, "FItemNetInfo", "ItemQuantity"); } - void SetItemQuantityField(unsigned int newValue) { SetNativeField(this, "FItemNetInfo", "ItemQuantity", newValue); } - unsigned __int16 GetCraftQueueField() const { return GetNativeField(this, "FItemNetInfo", "CraftQueue"); } - void SetCraftQueueField(unsigned __int16 newValue) { SetNativeField(this, "FItemNetInfo", "CraftQueue", newValue); } - long double GetNextCraftCompletionTimeField() const { return GetNativeField(this, "FItemNetInfo", "NextCraftCompletionTime"); } - void SetNextCraftCompletionTimeField(long double newValue) { SetNativeField(this, "FItemNetInfo", "NextCraftCompletionTime", newValue); } - unsigned __int16* GetItemStatValuesField() const { return GetNativeField(this, "FItemNetInfo", "ItemStatValues"); } - __int16* GetItemColorIDField() const { return GetNativeField<__int16*>(this, "FItemNetInfo", "ItemColorID"); } - TSubclassOf GetItemCustomClassField() const { return GetNativeField>(this, "FItemNetInfo", "ItemCustomClass"); } - void SetItemCustomClassField(TSubclassOf newValue) { SetNativeField(this, "FItemNetInfo", "ItemCustomClass", newValue); } - TSubclassOf GetItemSkinTemplateField() const { return GetNativeField>(this, "FItemNetInfo", "ItemSkinTemplate"); } - void SetItemSkinTemplateField(TSubclassOf newValue) { SetNativeField(this, "FItemNetInfo", "ItemSkinTemplate", newValue); } - float GetCraftingSkillField() const { return GetNativeField(this, "FItemNetInfo", "CraftingSkill"); } - void SetCraftingSkillField(float newValue) { SetNativeField(this, "FItemNetInfo", "CraftingSkill", newValue); } - FString GetCustomItemNameField() const { return GetNativeField(this, "FItemNetInfo", "CustomItemName"); } - void SetCustomItemNameField(FString newValue) { SetNativeField(this, "FItemNetInfo", "CustomItemName", newValue); } - FString GetCustomItemDescriptionField() const { return GetNativeField(this, "FItemNetInfo", "CustomItemDescription"); } - void SetCustomItemDescriptionField(FString newValue) { SetNativeField(this, "FItemNetInfo", "CustomItemDescription", newValue); } - TArray GetCustomItemColorsField() const { return GetNativeField>(this, "FItemNetInfo", "CustomItemColors"); } - void SetCustomItemColorsField(TArray newValue) { SetNativeField(this, "FItemNetInfo", "CustomItemColors", newValue); } - TArray GetCustomResourceRequirementsField() const { return GetNativeField>(this, "FItemNetInfo", "CustomResourceRequirements"); } - void SetCustomResourceRequirementsField(TArray newValue) { SetNativeField(this, "FItemNetInfo", "CustomResourceRequirements", newValue); } - long double GetNextSpoilingTimeField() const { return GetNativeField(this, "FItemNetInfo", "NextSpoilingTime"); } - void SetNextSpoilingTimeField(long double newValue) { SetNativeField(this, "FItemNetInfo", "NextSpoilingTime", newValue); } - long double GetLastSpoilingTimeField() const { return GetNativeField(this, "FItemNetInfo", "LastSpoilingTime"); } - void SetLastSpoilingTimeField(long double newValue) { SetNativeField(this, "FItemNetInfo", "LastSpoilingTime", newValue); } - TWeakObjectPtr GetLastOwnerPlayerField() const { return GetNativeField>(this, "FItemNetInfo", "LastOwnerPlayer"); } - void SetLastOwnerPlayerField(TWeakObjectPtr newValue) { SetNativeField(this, "FItemNetInfo", "LastOwnerPlayer", newValue); } - long double GetLastAutoDurabilityDecreaseTimeField() const { return GetNativeField(this, "FItemNetInfo", "LastAutoDurabilityDecreaseTime"); } - void SetLastAutoDurabilityDecreaseTimeField(long double newValue) { SetNativeField(this, "FItemNetInfo", "LastAutoDurabilityDecreaseTime", newValue); } - FVector GetOriginalItemDropLocationField() const { return GetNativeField(this, "FItemNetInfo", "OriginalItemDropLocation"); } - void SetOriginalItemDropLocationField(FVector newValue) { SetNativeField(this, "FItemNetInfo", "OriginalItemDropLocation", newValue); } - __int16* GetPreSkinItemColorIDField() const { return GetNativeField<__int16*>(this, "FItemNetInfo", "PreSkinItemColorID"); } - char* GetEggNumberOfLevelUpPointsAppliedField() const { return GetNativeField(this, "FItemNetInfo", "EggNumberOfLevelUpPointsApplied"); } - float GetEggTamedIneffectivenessModifierField() const { return GetNativeField(this, "FItemNetInfo", "EggTamedIneffectivenessModifier"); } - void SetEggTamedIneffectivenessModifierField(float newValue) { SetNativeField(this, "FItemNetInfo", "EggTamedIneffectivenessModifier", newValue); } - char* GetEggColorSetIndicesField() const { return GetNativeField(this, "FItemNetInfo", "EggColorSetIndices"); } - char GetItemVersionField() const { return GetNativeField(this, "FItemNetInfo", "ItemVersion"); } - void SetItemVersionField(char newValue) { SetNativeField(this, "FItemNetInfo", "ItemVersion", newValue); } - int GetCustomItemIDField() const { return GetNativeField(this, "FItemNetInfo", "CustomItemID"); } - void SetCustomItemIDField(int newValue) { SetNativeField(this, "FItemNetInfo", "CustomItemID", newValue); } - TArray GetSteamUserItemIDField() const { return GetNativeField>(this, "FItemNetInfo", "SteamUserItemID"); } - void SetSteamUserItemIDField(TArray newValue) { SetNativeField(this, "FItemNetInfo", "SteamUserItemID", newValue); } - long double GetClusterSpoilingTimeUTCField() const { return GetNativeField(this, "FItemNetInfo", "ClusterSpoilingTimeUTC"); } - void SetClusterSpoilingTimeUTCField(long double newValue) { SetNativeField(this, "FItemNetInfo", "ClusterSpoilingTimeUTC", newValue); } - TArray GetEggDinoAncestorsField() const { return GetNativeField>(this, "FItemNetInfo", "EggDinoAncestors"); } - void SetEggDinoAncestorsField(TArray newValue) { SetNativeField(this, "FItemNetInfo", "EggDinoAncestors", newValue); } - TArray GetEggDinoAncestorsMaleField() const { return GetNativeField>(this, "FItemNetInfo", "EggDinoAncestorsMale"); } - void SetEggDinoAncestorsMaleField(TArray newValue) { SetNativeField(this, "FItemNetInfo", "EggDinoAncestorsMale", newValue); } - int GetEggRandomMutationsFemaleField() const { return GetNativeField(this, "FItemNetInfo", "EggRandomMutationsFemale"); } - void SetEggRandomMutationsFemaleField(int newValue) { SetNativeField(this, "FItemNetInfo", "EggRandomMutationsFemale", newValue); } - int GetEggRandomMutationsMaleField() const { return GetNativeField(this, "FItemNetInfo", "EggRandomMutationsMale"); } - void SetEggRandomMutationsMaleField(int newValue) { SetNativeField(this, "FItemNetInfo", "EggRandomMutationsMale", newValue); } - char GetItemProfileVersionField() const { return GetNativeField(this, "FItemNetInfo", "ItemProfileVersion"); } - void SetItemProfileVersionField(char newValue) { SetNativeField(this, "FItemNetInfo", "ItemProfileVersion", newValue); } - FString GetCrafterCharacterNameField() const { return GetNativeField(this, "FItemNetInfo", "CrafterCharacterName"); } - void SetCrafterCharacterNameField(FString newValue) { SetNativeField(this, "FItemNetInfo", "CrafterCharacterName", newValue); } - FString GetCrafterTribeNameField() const { return GetNativeField(this, "FItemNetInfo", "CrafterTribeName"); } - void SetCrafterTribeNameField(FString newValue) { SetNativeField(this, "FItemNetInfo", "CrafterTribeName", newValue); } - float GetCraftedSkillBonusField() const { return GetNativeField(this, "FItemNetInfo", "CraftedSkillBonus"); } - void SetCraftedSkillBonusField(float newValue) { SetNativeField(this, "FItemNetInfo", "CraftedSkillBonus", newValue); } -}; - -struct ADroppedItem -{ -}; - -struct FItemCraftQueueEntry -{ -}; - -struct FItemSpawnActorClassOverride -{ -}; - -struct FItemStatInfo -{ - int GetDefaultModifierValueField() const { return GetNativeField(this, "FItemStatInfo", "DefaultModifierValue"); } - void SetDefaultModifierValueField(int newValue) { SetNativeField(this, "FItemStatInfo", "DefaultModifierValue", newValue); } - int GetRandomizerRangeOverrideField() const { return GetNativeField(this, "FItemStatInfo", "RandomizerRangeOverride"); } - void SetRandomizerRangeOverrideField(int newValue) { SetNativeField(this, "FItemStatInfo", "RandomizerRangeOverride", newValue); } - float GetRandomizerRangeMultiplierField() const { return GetNativeField(this, "FItemStatInfo", "RandomizerRangeMultiplier"); } - void SetRandomizerRangeMultiplierField(float newValue) { SetNativeField(this, "FItemStatInfo", "RandomizerRangeMultiplier", newValue); } - float GetTheRandomizerPowerField() const { return GetNativeField(this, "FItemStatInfo", "TheRandomizerPower"); } - void SetTheRandomizerPowerField(float newValue) { SetNativeField(this, "FItemStatInfo", "TheRandomizerPower", newValue); } - float GetStateModifierScaleField() const { return GetNativeField(this, "FItemStatInfo", "StateModifierScale"); } - void SetStateModifierScaleField(float newValue) { SetNativeField(this, "FItemStatInfo", "StateModifierScale", newValue); } - float GetInitialValueConstantField() const { return GetNativeField(this, "FItemStatInfo", "InitialValueConstant"); } - void SetInitialValueConstantField(float newValue) { SetNativeField(this, "FItemStatInfo", "InitialValueConstant", newValue); } - float GetRatingValueMultiplierField() const { return GetNativeField(this, "FItemStatInfo", "RatingValueMultiplier"); } - void SetRatingValueMultiplierField(float newValue) { SetNativeField(this, "FItemStatInfo", "RatingValueMultiplier", newValue); } - float GetAbsoluteMaxValueField() const { return GetNativeField(this, "FItemStatInfo", "AbsoluteMaxValue"); } - void SetAbsoluteMaxValueField(float newValue) { SetNativeField(this, "FItemStatInfo", "AbsoluteMaxValue", newValue); } - - // Functions - - float GetItemStatModifier(unsigned __int16 ItemStatValue) { return NativeCall((DWORD64)this, "FItemStatInfo", "GetItemStatModifier", ItemStatValue); } -}; diff --git a/ArkApi/API/Other.h b/ArkApi/API/Other.h deleted file mode 100644 index 8d19b2e..0000000 --- a/ArkApi/API/Other.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once - -#include "Base.h" - -struct FDamageEvent -{ - float GetImpulseField() const { return GetNativeField(this, "FDamageEvent", "Impulse"); } - void SetImpulseField(float newValue) { SetNativeField(this, "FDamageEvent", "Impulse", newValue); } - float GetOriginalDamageField() const { return GetNativeField(this, "FDamageEvent", "OriginalDamage"); } - void SetOriginalDamageField(float newValue) { SetNativeField(this, "FDamageEvent", "OriginalDamage", newValue); } - int GetInstanceBodyIndexField() const { return GetNativeField(this, "FDamageEvent", "InstanceBodyIndex"); } - void SetInstanceBodyIndexField(int newValue) { SetNativeField(this, "FDamageEvent", "InstanceBodyIndex", newValue); } - TSubclassOf GetDamageTypeClassField() const { return GetNativeField>(this, "FDamageEvent", "DamageTypeClass"); } - void SetDamageTypeClassField(TSubclassOf newValue) { SetNativeField(this, "FDamageEvent", "DamageTypeClass", newValue); } - - // Functions - - void GetBestHitInfo(AActor* HitActor, AActor* HitInstigator, FHitResult* OutHitInfo, FVector* OutImpulseDir) { NativeCall((DWORD64)this, "FDamageEvent", "GetBestHitInfo", HitActor, HitInstigator, OutHitInfo, OutImpulseDir); } -}; - -struct FHitResult -{ - float GetTimeField() const { return GetNativeField(this, "FHitResult", "Time"); } - void SetTimeField(float newValue) { SetNativeField(this, "FHitResult", "Time", newValue); } - //FVector_NetQuantize GetLocationField() const { return GetNativeField(this, "FHitResult", "Location"); } - //void SetLocationField(FVector_NetQuantize newValue) { SetNativeField(this, "FHitResult", "Location", newValue); } - //FVector_NetQuantizeNormal GetNormalField() const { return GetNativeField(this, "FHitResult", "Normal"); } - //void SetNormalField(FVector_NetQuantizeNormal newValue) { SetNativeField(this, "FHitResult", "Normal", newValue); } - //FVector_NetQuantize GetImpactPointField() const { return GetNativeField(this, "FHitResult", "ImpactPoint"); } - //void SetImpactPointField(FVector_NetQuantize newValue) { SetNativeField(this, "FHitResult", "ImpactPoint", newValue); } - //FVector_NetQuantizeNormal GetImpactNormalField() const { return GetNativeField(this, "FHitResult", "ImpactNormal"); } - //void SetImpactNormalField(FVector_NetQuantizeNormal newValue) { SetNativeField(this, "FHitResult", "ImpactNormal", newValue); } - //FVector_NetQuantize GetTraceStartField() const { return GetNativeField(this, "FHitResult", "TraceStart"); } - //void SetTraceStartField(FVector_NetQuantize newValue) { SetNativeField(this, "FHitResult", "TraceStart", newValue); } - //FVector_NetQuantize GetTraceEndField() const { return GetNativeField(this, "FHitResult", "TraceEnd"); } - //void SetTraceEndField(FVector_NetQuantize newValue) { SetNativeField(this, "FHitResult", "TraceEnd", newValue); } - float GetPenetrationDepthField() const { return GetNativeField(this, "FHitResult", "PenetrationDepth"); } - void SetPenetrationDepthField(float newValue) { SetNativeField(this, "FHitResult", "PenetrationDepth", newValue); } - int GetItemField() const { return GetNativeField(this, "FHitResult", "Item"); } - void SetItemField(int newValue) { SetNativeField(this, "FHitResult", "Item", newValue); } - //TWeakObjectPtr GetPhysMaterialField() const { return GetNativeField>(this, "FHitResult", "PhysMaterial"); } - TWeakObjectPtr GetActorField() const { return GetNativeField>(this, "FHitResult", "Actor"); } - //TWeakObjectPtr GetComponentField() const { return GetNativeField>(this, "FHitResult", "Component"); } - //void SetBodyInstanceField(FBodyInstance * newValue) { SetNativeField(this, "FHitResult", "BodyInstance", newValue); } - FName GetBoneNameField() const { return GetNativeField(this, "FHitResult", "BoneName"); } - void SetBoneNameField(FName newValue) { SetNativeField(this, "FHitResult", "BoneName", newValue); } - int GetFaceIndexField() const { return GetNativeField(this, "FHitResult", "FaceIndex"); } - void SetFaceIndexField(int newValue) { SetNativeField(this, "FHitResult", "FaceIndex", newValue); } - - // Functions - - AActor* GetActor() { return NativeCall((DWORD64)this, "FHitResult", "GetActor"); } -}; - -struct RCONClientConnection -{ - //FSocket * GetSocketField() const { return GetNativeField(this, "RCONClientConnection", "Socket"); } - UShooterCheatManager* GetCheatManagerField() const { return GetNativeField(this, "RCONClientConnection", "CheatManager"); } - bool GetIsAuthenticatedField() const { return GetNativeField(this, "RCONClientConnection", "IsAuthenticated"); } - void SetIsAuthenticatedField(bool newValue) { SetNativeField(this, "RCONClientConnection", "IsAuthenticated", newValue); } - bool GetIsClosedField() const { return GetNativeField(this, "RCONClientConnection", "IsClosed"); } - void SetIsClosedField(bool newValue) { SetNativeField(this, "RCONClientConnection", "IsClosed", newValue); } - TArray GetDataBufferField() const { return GetNativeField>(this, "RCONClientConnection", "DataBuffer"); } - void SetDataBufferField(TArray newValue) { SetNativeField(this, "RCONClientConnection", "DataBuffer", newValue); } - unsigned int GetCurrentPacketSizeField() const { return GetNativeField(this, "RCONClientConnection", "CurrentPacketSize"); } - void SetCurrentPacketSizeField(unsigned int newValue) { SetNativeField(this, "RCONClientConnection", "CurrentPacketSize", newValue); } - long double GetLastReceiveTimeField() const { return GetNativeField(this, "RCONClientConnection", "LastReceiveTime"); } - void SetLastReceiveTimeField(long double newValue) { SetNativeField(this, "RCONClientConnection", "LastReceiveTime", newValue); } - long double GetLastSendKeepAliveTimeField() const { return GetNativeField(this, "RCONClientConnection", "LastSendKeepAliveTime"); } - void SetLastSendKeepAliveTimeField(long double newValue) { SetNativeField(this, "RCONClientConnection", "LastSendKeepAliveTime", newValue); } - FString GetServerPasswordField() const { return GetNativeField(this, "RCONClientConnection", "ServerPassword"); } - void SetServerPasswordField(FString newValue) { SetNativeField(this, "RCONClientConnection", "ServerPassword", newValue); } - - // Functions - - void ProcessRCONPacket(RCONPacket* Packet, UWorld* InWorld) { NativeCall((DWORD64)this, "RCONClientConnection", "ProcessRCONPacket", Packet, InWorld); } - void SendMessageW(int Id, int Type, FString* OutGoingMessage) { NativeCall((DWORD64)this, "RCONClientConnection", "SendMessageW", Id, Type, OutGoingMessage); } - void Close() { NativeCall((DWORD64)this, "RCONClientConnection", "Close"); } -}; - -struct RCONPacket -{ - int Length; - int Id; - int Type; - FString Body; -}; - -struct UGameplayStatics -{ - static APlayerController* GetPlayerController(UObject* WorldContextObject, int PlayerIndex) { return NativeCall(nullptr, "UGameplayStatics", "GetPlayerController", WorldContextObject, PlayerIndex); } - static void SetGlobalTimeDilation(UObject* WorldContextObject, float TimeDilation) { NativeCall(nullptr, "UGameplayStatics", "SetGlobalTimeDilation", WorldContextObject, TimeDilation); } - static bool SetGamePaused(UObject* WorldContextObject, bool bPaused) { return NativeCall(nullptr, "UGameplayStatics", "SetGamePaused", WorldContextObject, bPaused); } - static AActor* BeginSpawningActorFromClass(UObject* WorldContextObject, TSubclassOf ActorClass, FTransform* SpawnTransform, bool bNoCollisionFail) { return NativeCall, FTransform *, bool>(nullptr, "UGameplayStatics", "BeginSpawningActorFromClass", WorldContextObject, ActorClass, SpawnTransform, bNoCollisionFail); } - static void GetActorArrayBounds(TArray* Actors, bool bOnlyCollidingComponents, FVector* Center, FVector* BoxExtent) { NativeCall *, bool, FVector *, FVector *>(nullptr, "UGameplayStatics", "GetActorArrayBounds", Actors, bOnlyCollidingComponents, Center, BoxExtent); } - static void GetAccurateRealTime(UObject* WorldContextObject, int* Seconds, float* PartialSeconds) { NativeCall(nullptr, "UGameplayStatics", "GetAccurateRealTime", WorldContextObject, Seconds, PartialSeconds); } - static void GetAllActorsOfClass(UWorld* WorldContextObject, UClass* ActorClass, TArray* OutActors) { NativeCall *>(nullptr, "UGameplayStatics", "GetAllActorsOfClass", WorldContextObject, ActorClass, OutActors); } -}; - -struct FItemMultiplier -{ -}; - -struct APrimalBuff -{ -}; - -struct FDinoAncestorsEntry -{ -}; - -struct FCraftingResourceRequirement -{ -}; \ No newline at end of file diff --git a/ArkApi/API/PrimalStructure.h b/ArkApi/API/PrimalStructure.h deleted file mode 100644 index b6fdde0..0000000 --- a/ArkApi/API/PrimalStructure.h +++ /dev/null @@ -1,525 +0,0 @@ -#pragma once - -#include "Base.h" - -struct APrimalTargetableActor : AActor -{ - //TArray GetDamageTypeAdjustersField() const { return GetNativeField>(this, "APrimalTargetableActor", "DamageTypeAdjusters"); } - float GetLowHealthPercentageField() const { return GetNativeField(this, "APrimalTargetableActor", "LowHealthPercentage"); } - void SetLowHealthPercentageField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LowHealthPercentage", newValue); } - TSubclassOf GetDestructionActorTemplateField() const { return GetNativeField>(this, "APrimalTargetableActor", "DestructionActorTemplate"); } - void SetDestructionActorTemplateField(TSubclassOf newValue) { SetNativeField(this, "APrimalTargetableActor", "DestructionActorTemplate", newValue); } - float GetLifeSpanAfterDeathField() const { return GetNativeField(this, "APrimalTargetableActor", "LifeSpanAfterDeath"); } - void SetLifeSpanAfterDeathField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LifeSpanAfterDeath", newValue); } - float GetPassiveDamageHealthReplicationPercentIntervalField() const { return GetNativeField(this, "APrimalTargetableActor", "PassiveDamageHealthReplicationPercentInterval"); } - void SetPassiveDamageHealthReplicationPercentIntervalField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "PassiveDamageHealthReplicationPercentInterval", newValue); } - float GetDamageNotifyTeamAggroMultiplierField() const { return GetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroMultiplier"); } - void SetDamageNotifyTeamAggroMultiplierField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroMultiplier", newValue); } - float GetDamageNotifyTeamAggroRangeField() const { return GetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroRange"); } - void SetDamageNotifyTeamAggroRangeField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroRange", newValue); } - float GetDamageNotifyTeamAggroRangeFalloffField() const { return GetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroRangeFalloff"); } - void SetDamageNotifyTeamAggroRangeFalloffField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "DamageNotifyTeamAggroRangeFalloff", newValue); } - FVector GetDestructibleMeshLocationOffsetField() const { return GetNativeField(this, "APrimalTargetableActor", "DestructibleMeshLocationOffset"); } - void SetDestructibleMeshLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalTargetableActor", "DestructibleMeshLocationOffset", newValue); } - FVector GetDestructibleMeshScaleOverrideField() const { return GetNativeField(this, "APrimalTargetableActor", "DestructibleMeshScaleOverride"); } - void SetDestructibleMeshScaleOverrideField(FVector newValue) { SetNativeField(this, "APrimalTargetableActor", "DestructibleMeshScaleOverride", newValue); } - FRotator GetDestructibleMeshRotationOffsetField() const { return GetNativeField(this, "APrimalTargetableActor", "DestructibleMeshRotationOffset"); } - void SetDestructibleMeshRotationOffsetField(FRotator newValue) { SetNativeField(this, "APrimalTargetableActor", "DestructibleMeshRotationOffset", newValue); } - FString GetDescriptiveNameField() const { return GetNativeField(this, "APrimalTargetableActor", "DescriptiveName"); } - float GetReplicatedHealthField() const { return GetNativeField(this, "APrimalTargetableActor", "ReplicatedHealth"); } - void SetReplicatedHealthField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "ReplicatedHealth", newValue); } - float GetHealthField() const { return GetNativeField(this, "APrimalTargetableActor", "Health"); } - void SetHealthField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "Health", newValue); } - float GetMaxHealthField() const { return GetNativeField(this, "APrimalTargetableActor", "MaxHealth"); } - void SetMaxHealthField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "MaxHealth", newValue); } - float GetDestructibleMeshDeathImpulseScaleField() const { return GetNativeField(this, "APrimalTargetableActor", "DestructibleMeshDeathImpulseScale"); } - void SetDestructibleMeshDeathImpulseScaleField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "DestructibleMeshDeathImpulseScale", newValue); } - //TArray GetBoneDamageAdjustersField() const { return GetNativeField>(this, "APrimalTargetableActor", "BoneDamageAdjusters"); } - float GetLastReplicatedHealthValueField() const { return GetNativeField(this, "APrimalTargetableActor", "LastReplicatedHealthValue"); } - void SetLastReplicatedHealthValueField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LastReplicatedHealthValue", newValue); } - //TSubclassOf GetStructureSettingsClassField() const { return GetNativeField>(this, "APrimalTargetableActor", "StructureSettingsClass"); } - //UPrimalStructureSettings * GetMyStructureSettingsCDOField() const { return GetNativeField(this, "APrimalTargetableActor", "MyStructureSettingsCDO"); } - float GetLastHealthBeforeTakeDamageField() const { return GetNativeField(this, "APrimalTargetableActor", "LastHealthBeforeTakeDamage"); } - void SetLastHealthBeforeTakeDamageField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LastHealthBeforeTakeDamage", newValue); } - long double GetNextAllowRepairTimeField() const { return GetNativeField(this, "APrimalTargetableActor", "NextAllowRepairTime"); } - void SetNextAllowRepairTimeField(long double newValue) { SetNativeField(this, "APrimalTargetableActor", "NextAllowRepairTime", newValue); } - float GetLastPreBlueprintAdjustmentActualDamageField() const { return GetNativeField(this, "APrimalTargetableActor", "LastPreBlueprintAdjustmentActualDamage"); } - void SetLastPreBlueprintAdjustmentActualDamageField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LastPreBlueprintAdjustmentActualDamage", newValue); } - float GetLastReplicatedHealthField() const { return GetNativeField(this, "APrimalTargetableActor", "LastReplicatedHealth"); } - void SetLastReplicatedHealthField(float newValue) { SetNativeField(this, "APrimalTargetableActor", "LastReplicatedHealth", newValue); } - - // Functions - - static UField* StaticClass() { return NativeCall(nullptr, "APrimalTargetableActor", "StaticClass"); } - UObject* GetUObjectInterfaceTargetableInterface() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetUObjectInterfaceTargetableInterface"); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PostInitializeComponents"); } - void Destroyed() { NativeCall((DWORD64)this, "APrimalTargetableActor", "Destroyed"); } - void BeginPlay() { NativeCall((DWORD64)this, "APrimalTargetableActor", "BeginPlay"); } - void FellOutOfWorld(UDamageType* dmgType) { NativeCall((DWORD64)this, "APrimalTargetableActor", "FellOutOfWorld", dmgType); } - bool IsDead() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "IsDead"); } - void AdjustDamage(float* Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalTargetableActor", "AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - float TakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalTargetableActor", "TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - bool Die(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalTargetableActor", "Die", KillingDamage, DamageEvent, Killer, DamageCauser); } - void PlayDyingGeneric_Implementation() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayDyingGeneric_Implementation"); } - void PlayDyingRadial_Implementation() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayDyingRadial_Implementation"); } - void GetDestructionEffectTransform(FVector* OutLocation, FRotator* OutRotation) { NativeCall((DWORD64)this, "APrimalTargetableActor", "GetDestructionEffectTransform", OutLocation, OutRotation); } - void PlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - void PlayHitEffectPoint_Implementation() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayHitEffectPoint_Implementation"); } - void PlayHitEffectRadial_Implementation() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayHitEffectRadial_Implementation"); } - void PlayHitEffect(float DamageTaken, FDamageEvent* DamageEvent, APawn* PawnInstigator, AActor* DamageCauser, bool bIsLocalPath) { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayHitEffect", DamageTaken, DamageEvent, PawnInstigator, DamageCauser, bIsLocalPath); } - float GetMaxHealth() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetMaxHealth"); } - float GetLowHealthPercentage() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetLowHealthPercentage"); } - bool IsAlive() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "IsAlive"); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetDescriptiveName", result); } - float GetHealth() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetHealth"); } - float GetHealthPercentage() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetHealthPercentage"); } - float SetHealth(float newHealth) { return NativeCall((DWORD64)this, "APrimalTargetableActor", "SetHealth", newHealth); } - void SetMaxHealth(float newMaxHealth) { NativeCall((DWORD64)this, "APrimalTargetableActor", "SetMaxHealth", newMaxHealth); } - bool IsOfTribe(int ID) { return NativeCall((DWORD64)this, "APrimalTargetableActor", "IsOfTribe", ID); } - void NetUpdatedHealth_Implementation(int NewHealth) { NativeCall((DWORD64)this, "APrimalTargetableActor", "NetUpdatedHealth_Implementation", NewHealth); } - bool IsTargetableDead() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "IsTargetableDead"); } - //EShooterPhysMaterialType::Type GetTargetableDamageFXDefaultPhysMaterial() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "GetTargetableDamageFXDefaultPhysMaterial"); } - void Suicide() { NativeCall((DWORD64)this, "APrimalTargetableActor", "Suicide"); } - void UpdatedHealth(bool bDoReplication) { NativeCall((DWORD64)this, "APrimalTargetableActor", "UpdatedHealth", bDoReplication); } - bool AllowRadialDamageWithoutVisiblityTrace() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "AllowRadialDamageWithoutVisiblityTrace"); } - bool IsInvincible() { return NativeCall((DWORD64)this, "APrimalTargetableActor", "IsInvincible"); } - void PlayHitEffectGeneric() { NativeCall((DWORD64)this, "APrimalTargetableActor", "PlayHitEffectGeneric"); } -}; - -struct APrimalStructure : APrimalTargetableActor -{ - FVector2D GetOverlayTooltipPaddingField() const { return GetNativeField(this, "APrimalStructure", "OverlayTooltipPadding"); } - void SetOverlayTooltipPaddingField(FVector2D newValue) { SetNativeField(this, "APrimalStructure", "OverlayTooltipPadding", newValue); } - FVector2D GetOverlayTooltipScaleField() const { return GetNativeField(this, "APrimalStructure", "OverlayTooltipScale"); } - void SetOverlayTooltipScaleField(FVector2D newValue) { SetNativeField(this, "APrimalStructure", "OverlayTooltipScale", newValue); } - TSubclassOf GetConsumesPrimalItemField() const { return GetNativeField>(this, "APrimalStructure", "ConsumesPrimalItem"); } - void SetConsumesPrimalItemField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "ConsumesPrimalItem", newValue); } - float GetScaleFactorField() const { return GetNativeField(this, "APrimalStructure", "ScaleFactor"); } - void SetScaleFactorField(float newValue) { SetNativeField(this, "APrimalStructure", "ScaleFactor", newValue); } - int GetStructureSnapTypeFlagsField() const { return GetNativeField(this, "APrimalStructure", "StructureSnapTypeFlags"); } - void SetStructureSnapTypeFlagsField(int newValue) { SetNativeField(this, "APrimalStructure", "StructureSnapTypeFlags", newValue); } - //TArray GetSnapPointsField() const { return GetNativeField>(this, "APrimalStructure", "SnapPoints"); } - //void SetSnapPointsField(TArray newValue) { SetNativeField(this, "APrimalStructure", "SnapPoints", newValue); } - FVector GetPlacementHitLocOffsetField() const { return GetNativeField(this, "APrimalStructure", "PlacementHitLocOffset"); } - void SetPlacementHitLocOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "PlacementHitLocOffset", newValue); } - FVector GetPlacementEncroachmentCheckOffsetField() const { return GetNativeField(this, "APrimalStructure", "PlacementEncroachmentCheckOffset"); } - void SetPlacementEncroachmentCheckOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "PlacementEncroachmentCheckOffset", newValue); } - FVector GetPlacementEncroachmentBoxExtentField() const { return GetNativeField(this, "APrimalStructure", "PlacementEncroachmentBoxExtent"); } - void SetPlacementEncroachmentBoxExtentField(FVector newValue) { SetNativeField(this, "APrimalStructure", "PlacementEncroachmentBoxExtent", newValue); } - FVector GetPlacementTraceScaleField() const { return GetNativeField(this, "APrimalStructure", "PlacementTraceScale"); } - void SetPlacementTraceScaleField(FVector newValue) { SetNativeField(this, "APrimalStructure", "PlacementTraceScale", newValue); } - FVector GetSnapAlternatePlacementTraceScaleField() const { return GetNativeField(this, "APrimalStructure", "SnapAlternatePlacementTraceScale"); } - void SetSnapAlternatePlacementTraceScaleField(FVector newValue) { SetNativeField(this, "APrimalStructure", "SnapAlternatePlacementTraceScale", newValue); } - FRotator GetPlacementRotOffsetField() const { return GetNativeField(this, "APrimalStructure", "PlacementRotOffset"); } - void SetPlacementRotOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "PlacementRotOffset", newValue); } - FRotator GetPlacementTraceRotOffsetField() const { return GetNativeField(this, "APrimalStructure", "PlacementTraceRotOffset"); } - void SetPlacementTraceRotOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "PlacementTraceRotOffset", newValue); } - FRotator GetSnappingRotationOffsetField() const { return GetNativeField(this, "APrimalStructure", "SnappingRotationOffset"); } - void SetSnappingRotationOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "SnappingRotationOffset", newValue); } - float GetRepairAmountRemainingField() const { return GetNativeField(this, "APrimalStructure", "RepairAmountRemaining"); } - void SetRepairAmountRemainingField(float newValue) { SetNativeField(this, "APrimalStructure", "RepairAmountRemaining", newValue); } - float GetRepairCheckIntervalField() const { return GetNativeField(this, "APrimalStructure", "RepairCheckInterval"); } - void SetRepairCheckIntervalField(float newValue) { SetNativeField(this, "APrimalStructure", "RepairCheckInterval", newValue); } - float GetPlacementFloorCheckZExtentUpField() const { return GetNativeField(this, "APrimalStructure", "PlacementFloorCheckZExtentUp"); } - void SetPlacementFloorCheckZExtentUpField(float newValue) { SetNativeField(this, "APrimalStructure", "PlacementFloorCheckZExtentUp", newValue); } - float GetRepairPercentPerIntervalField() const { return GetNativeField(this, "APrimalStructure", "RepairPercentPerInterval"); } - void SetRepairPercentPerIntervalField(float newValue) { SetNativeField(this, "APrimalStructure", "RepairPercentPerInterval", newValue); } - float GetDecayDestructionPeriodField() const { return GetNativeField(this, "APrimalStructure", "DecayDestructionPeriod"); } - void SetDecayDestructionPeriodField(float newValue) { SetNativeField(this, "APrimalStructure", "DecayDestructionPeriod", newValue); } - TArray> GetPreventPlacingOnFloorClassesField() const { return GetNativeField>>(this, "APrimalStructure", "PreventPlacingOnFloorClasses"); } - void SetPreventPlacingOnFloorClassesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "PreventPlacingOnFloorClasses", newValue); } - TArray> GetAllowPlacingOnFloorClassesField() const { return GetNativeField>>(this, "APrimalStructure", "AllowPlacingOnFloorClasses"); } - void SetAllowPlacingOnFloorClassesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "AllowPlacingOnFloorClasses", newValue); } - int GetTraceIgnoreStructuresWithTypeFlagsField() const { return GetNativeField(this, "APrimalStructure", "TraceIgnoreStructuresWithTypeFlags"); } - void SetTraceIgnoreStructuresWithTypeFlagsField(int newValue) { SetNativeField(this, "APrimalStructure", "TraceIgnoreStructuresWithTypeFlags", newValue); } - int GetbTraceCheckOnlyUseStructuresWithTypeFlagsField() const { return GetNativeField(this, "APrimalStructure", "bTraceCheckOnlyUseStructuresWithTypeFlags"); } - void SetbTraceCheckOnlyUseStructuresWithTypeFlagsField(int newValue) { SetNativeField(this, "APrimalStructure", "bTraceCheckOnlyUseStructuresWithTypeFlags", newValue); } - FVector GetWaterVolumeCheckPointOffsetField() const { return GetNativeField(this, "APrimalStructure", "WaterVolumeCheckPointOffset"); } - void SetWaterVolumeCheckPointOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "WaterVolumeCheckPointOffset", newValue); } - float GetWaterPlacementMinimumWaterHeightField() const { return GetNativeField(this, "APrimalStructure", "WaterPlacementMinimumWaterHeight"); } - void SetWaterPlacementMinimumWaterHeightField(float newValue) { SetNativeField(this, "APrimalStructure", "WaterPlacementMinimumWaterHeight", newValue); } - float GetPlacementMaxZDeltaField() const { return GetNativeField(this, "APrimalStructure", "PlacementMaxZDelta"); } - void SetPlacementMaxZDeltaField(float newValue) { SetNativeField(this, "APrimalStructure", "PlacementMaxZDelta", newValue); } - float GetPlacementChooseRotationMaxRangeOverrideField() const { return GetNativeField(this, "APrimalStructure", "PlacementChooseRotationMaxRangeOverride"); } - void SetPlacementChooseRotationMaxRangeOverrideField(float newValue) { SetNativeField(this, "APrimalStructure", "PlacementChooseRotationMaxRangeOverride", newValue); } - float GetPlacementMaxRangeField() const { return GetNativeField(this, "APrimalStructure", "PlacementMaxRange"); } - void SetPlacementMaxRangeField(float newValue) { SetNativeField(this, "APrimalStructure", "PlacementMaxRange", newValue); } - float GetMaxSnapLocRangeField() const { return GetNativeField(this, "APrimalStructure", "MaxSnapLocRange"); } - void SetMaxSnapLocRangeField(float newValue) { SetNativeField(this, "APrimalStructure", "MaxSnapLocRange", newValue); } - float GetSnapOverlapCheckRadiusField() const { return GetNativeField(this, "APrimalStructure", "SnapOverlapCheckRadius"); } - void SetSnapOverlapCheckRadiusField(float newValue) { SetNativeField(this, "APrimalStructure", "SnapOverlapCheckRadius", newValue); } - float GetMaximumFoundationSupport2DBuildDistanceField() const { return GetNativeField(this, "APrimalStructure", "MaximumFoundationSupport2DBuildDistance"); } - void SetMaximumFoundationSupport2DBuildDistanceField(float newValue) { SetNativeField(this, "APrimalStructure", "MaximumFoundationSupport2DBuildDistance", newValue); } - float GetPlacementFloorCheckZExtentField() const { return GetNativeField(this, "APrimalStructure", "PlacementFloorCheckZExtent"); } - void SetPlacementFloorCheckZExtentField(float newValue) { SetNativeField(this, "APrimalStructure", "PlacementFloorCheckZExtent", newValue); } - float GetLastHealthPercentageField() const { return GetNativeField(this, "APrimalStructure", "LastHealthPercentage"); } - void SetLastHealthPercentageField(float newValue) { SetNativeField(this, "APrimalStructure", "LastHealthPercentage", newValue); } - FRotator GetTakeGroundNormalRotationOffsetField() const { return GetNativeField(this, "APrimalStructure", "TakeGroundNormalRotationOffset"); } - void SetTakeGroundNormalRotationOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "TakeGroundNormalRotationOffset", newValue); } - float GetDemolishGiveItemCraftingResourcePercentageField() const { return GetNativeField(this, "APrimalStructure", "DemolishGiveItemCraftingResourcePercentage"); } - void SetDemolishGiveItemCraftingResourcePercentageField(float newValue) { SetNativeField(this, "APrimalStructure", "DemolishGiveItemCraftingResourcePercentage", newValue); } - TSubclassOf GetAllowReplacementByStructureClassTypeField() const { return GetNativeField>(this, "APrimalStructure", "AllowReplacementByStructureClassType"); } - void SetAllowReplacementByStructureClassTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "AllowReplacementByStructureClassType", newValue); } - TSubclassOf GetPreventReplacementOfStructureClassTypeField() const { return GetNativeField>(this, "APrimalStructure", "PreventReplacementOfStructureClassType"); } - void SetPreventReplacementOfStructureClassTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "PreventReplacementOfStructureClassType", newValue); } - float GetMaximumHeightAboveWorldGroundField() const { return GetNativeField(this, "APrimalStructure", "MaximumHeightAboveWorldGround"); } - void SetMaximumHeightAboveWorldGroundField(float newValue) { SetNativeField(this, "APrimalStructure", "MaximumHeightAboveWorldGround", newValue); } - FRotator GetPreviewCameraRotationField() const { return GetNativeField(this, "APrimalStructure", "PreviewCameraRotation"); } - void SetPreviewCameraRotationField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "PreviewCameraRotation", newValue); } - FVector GetPreviewCameraPivotOffsetField() const { return GetNativeField(this, "APrimalStructure", "PreviewCameraPivotOffset"); } - void SetPreviewCameraPivotOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "PreviewCameraPivotOffset", newValue); } - float GetPreviewCameraDistanceScaleFactorField() const { return GetNativeField(this, "APrimalStructure", "PreviewCameraDistanceScaleFactor"); } - void SetPreviewCameraDistanceScaleFactorField(float newValue) { SetNativeField(this, "APrimalStructure", "PreviewCameraDistanceScaleFactor", newValue); } - float GetPreviewCameraDefaultZoomMultiplierField() const { return GetNativeField(this, "APrimalStructure", "PreviewCameraDefaultZoomMultiplier"); } - void SetPreviewCameraDefaultZoomMultiplierField(float newValue) { SetNativeField(this, "APrimalStructure", "PreviewCameraDefaultZoomMultiplier", newValue); } - float GetPreviewCameraMaxZoomMultiplierField() const { return GetNativeField(this, "APrimalStructure", "PreviewCameraMaxZoomMultiplier"); } - void SetPreviewCameraMaxZoomMultiplierField(float newValue) { SetNativeField(this, "APrimalStructure", "PreviewCameraMaxZoomMultiplier", newValue); } - float GetReturnDamageAmountField() const { return GetNativeField(this, "APrimalStructure", "ReturnDamageAmount"); } - void SetReturnDamageAmountField(float newValue) { SetNativeField(this, "APrimalStructure", "ReturnDamageAmount", newValue); } - int GetStructureRangeTypeFlagField() const { return GetNativeField(this, "APrimalStructure", "StructureRangeTypeFlag"); } - void SetStructureRangeTypeFlagField(int newValue) { SetNativeField(this, "APrimalStructure", "StructureRangeTypeFlag", newValue); } - int GetLimitMaxStructuresInRangeTypeFlagField() const { return GetNativeField(this, "APrimalStructure", "LimitMaxStructuresInRangeTypeFlag"); } - void SetLimitMaxStructuresInRangeTypeFlagField(int newValue) { SetNativeField(this, "APrimalStructure", "LimitMaxStructuresInRangeTypeFlag", newValue); } - float GetReturnDamageImpulseField() const { return GetNativeField(this, "APrimalStructure", "ReturnDamageImpulse"); } - void SetReturnDamageImpulseField(float newValue) { SetNativeField(this, "APrimalStructure", "ReturnDamageImpulse", newValue); } - TSubclassOf GetReturnDamageTypeField() const { return GetNativeField>(this, "APrimalStructure", "ReturnDamageType"); } - void SetReturnDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "ReturnDamageType", newValue); } - TArray> GetReturnDamageExcludeIncomingTypesField() const { return GetNativeField>>(this, "APrimalStructure", "ReturnDamageExcludeIncomingTypes"); } - void SetReturnDamageExcludeIncomingTypesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "ReturnDamageExcludeIncomingTypes", newValue); } - TArray> GetReturnDamageOnlyForIncomingTypesField() const { return GetNativeField>>(this, "APrimalStructure", "ReturnDamageOnlyForIncomingTypes"); } - void SetReturnDamageOnlyForIncomingTypesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "ReturnDamageOnlyForIncomingTypes", newValue); } - int GetOwningPlayerIDField() const { return GetNativeField(this, "APrimalStructure", "OwningPlayerID"); } - void SetOwningPlayerIDField(int newValue) { SetNativeField(this, "APrimalStructure", "OwningPlayerID", newValue); } - FString GetOwningPlayerNameField() const { return GetNativeField(this, "APrimalStructure", "OwningPlayerName"); } - void SetOwningPlayerNameField(FString newValue) { SetNativeField(this, "APrimalStructure", "OwningPlayerName", newValue); } - long double GetLastInAllyRangeTimeField() const { return GetNativeField(this, "APrimalStructure", "LastInAllyRangeTime"); } - void SetLastInAllyRangeTimeField(long double newValue) { SetNativeField(this, "APrimalStructure", "LastInAllyRangeTime", newValue); } - float GetDecayDestructionPeriodMultiplierField() const { return GetNativeField(this, "APrimalStructure", "DecayDestructionPeriodMultiplier"); } - void SetDecayDestructionPeriodMultiplierField(float newValue) { SetNativeField(this, "APrimalStructure", "DecayDestructionPeriodMultiplier", newValue); } - TWeakObjectPtr GetSaddleDinoField() const { return GetNativeField>(this, "APrimalStructure", "SaddleDino"); } - TArray GetLatchedDinosField() const { return GetNativeField>(this, "APrimalStructure", "LatchedDinos"); } - FName GetPreviewMaterialColorParamNameField() const { return GetNativeField(this, "APrimalStructure", "PreviewMaterialColorParamName"); } - void SetPreviewMaterialColorParamNameField(FName newValue) { SetNativeField(this, "APrimalStructure", "PreviewMaterialColorParamName", newValue); } - TArray GetPlacementTraceDirectionsField() const { return GetNativeField>(this, "APrimalStructure", "PlacementTraceDirections"); } - void SetPlacementTraceDirectionsField(TArray newValue) { SetNativeField(this, "APrimalStructure", "PlacementTraceDirections", newValue); } - TArray GetLinkedStructuresField() const { return GetNativeField>(this, "APrimalStructure", "LinkedStructures"); } - TArray GetLinkedStructuresIDField() const { return GetNativeField>(this, "APrimalStructure", "LinkedStructuresID"); } - TArray GetStructuresPlacedOnFloorField() const { return GetNativeField>(this, "APrimalStructure", "StructuresPlacedOnFloor"); } - void SetStructuresPlacedOnFloorField(TArray newValue) { SetNativeField(this, "APrimalStructure", "StructuresPlacedOnFloor", newValue); } - TArray> GetSnapToStructureTypesToExcludeField() const { return GetNativeField>>(this, "APrimalStructure", "SnapToStructureTypesToExclude"); } - TArray> GetSnapFromStructureTypesToExcludeField() const { return GetNativeField>>(this, "APrimalStructure", "SnapFromStructureTypesToExclude"); } - void SetSnapFromStructureTypesToExcludeField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "SnapFromStructureTypesToExclude", newValue); } - APrimalStructure* GetPlacedOnFloorStructureField() const { return GetNativeField(this, "APrimalStructure", "PlacedOnFloorStructure"); } - void SetPlacedOnFloorStructureField(APrimalStructure* newValue) { SetNativeField(this, "APrimalStructure", "PlacedOnFloorStructure", newValue); } - APrimalStructure* GetPrimarySnappedStructureChildField() const { return GetNativeField(this, "APrimalStructure", "PrimarySnappedStructureChild"); } - void SetPrimarySnappedStructureChildField(APrimalStructure* newValue) { SetNativeField(this, "APrimalStructure", "PrimarySnappedStructureChild", newValue); } - APrimalStructure* GetPrimarySnappedStructureParentField() const { return GetNativeField(this, "APrimalStructure", "PrimarySnappedStructureParent"); } - void SetPrimarySnappedStructureParentField(APrimalStructure* newValue) { SetNativeField(this, "APrimalStructure", "PrimarySnappedStructureParent", newValue); } - FString GetOwnerNameField() const { return GetNativeField(this, "APrimalStructure", "OwnerName"); } - void SetOwnerNameField(FString newValue) { SetNativeField(this, "APrimalStructure", "OwnerName", newValue); } - //__int16[6] GetStructureColorsField() const { return GetNativeField<__int16[6]>(this, "APrimalStructure", "StructureColors"); } - APawn* GetAttachedToField() const { return GetNativeField(this, "APrimalStructure", "AttachedTo"); } - void SetAttachedToField(APawn* newValue) { SetNativeField(this, "APrimalStructure", "AttachedTo", newValue); } - //APrimalStructureExplosiveTransGPS * GetAttachedTransponderField() const { return GetNativeField(this, "APrimalStructure", "AttachedTransponder"); } - unsigned int GetStructureIDField() const { return GetNativeField(this, "APrimalStructure", "StructureID"); } - unsigned int GetAttachedToDinoID1Field() const { return GetNativeField(this, "APrimalStructure", "AttachedToDinoID1"); } - void SetAttachedToDinoID1Field(unsigned int newValue) { SetNativeField(this, "APrimalStructure", "AttachedToDinoID1", newValue); } - TArray> GetOnlyAllowStructureClassesToAttachField() const { return GetNativeField>>(this, "APrimalStructure", "OnlyAllowStructureClassesToAttach"); } - void SetOnlyAllowStructureClassesToAttachField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "OnlyAllowStructureClassesToAttach", newValue); } - TArray> GetOnlyAllowStructureClassesFromAttachField() const { return GetNativeField>>(this, "APrimalStructure", "OnlyAllowStructureClassesFromAttach"); } - void SetOnlyAllowStructureClassesFromAttachField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "OnlyAllowStructureClassesFromAttach", newValue); } - unsigned int GetTaggedIndexField() const { return GetNativeField(this, "APrimalStructure", "TaggedIndex"); } - void SetTaggedIndexField(unsigned int newValue) { SetNativeField(this, "APrimalStructure", "TaggedIndex", newValue); } - unsigned int GetProcessTreeTagField() const { return GetNativeField(this, "APrimalStructure", "ProcessTreeTag"); } - void SetProcessTreeTagField(unsigned int newValue) { SetNativeField(this, "APrimalStructure", "ProcessTreeTag", newValue); } - long double GetLastStructureStasisTimeField() const { return GetNativeField(this, "APrimalStructure", "LastStructureStasisTime"); } - void SetLastStructureStasisTimeField(long double newValue) { SetNativeField(this, "APrimalStructure", "LastStructureStasisTime", newValue); } - long double GetLastColorizationTimeField() const { return GetNativeField(this, "APrimalStructure", "LastColorizationTime"); } - void SetLastColorizationTimeField(long double newValue) { SetNativeField(this, "APrimalStructure", "LastColorizationTime", newValue); } - FVector GetSpawnEmitterLocationOffsetField() const { return GetNativeField(this, "APrimalStructure", "SpawnEmitterLocationOffset"); } - void SetSpawnEmitterLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "SpawnEmitterLocationOffset", newValue); } - FRotator GetSpawnEmitterRotationOffsetField() const { return GetNativeField(this, "APrimalStructure", "SpawnEmitterRotationOffset"); } - void SetSpawnEmitterRotationOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructure", "SpawnEmitterRotationOffset", newValue); } - TSubclassOf GetPickupGivesItemField() const { return GetNativeField>(this, "APrimalStructure", "PickupGivesItem"); } - void SetPickupGivesItemField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "PickupGivesItem", newValue); } - float GetExcludeInStructuresRadiusField() const { return GetNativeField(this, "APrimalStructure", "ExcludeInStructuresRadius"); } - void SetExcludeInStructuresRadiusField(float newValue) { SetNativeField(this, "APrimalStructure", "ExcludeInStructuresRadius", newValue); } - TArray> GetExcludeInStructuresRadiusClassesField() const { return GetNativeField>>(this, "APrimalStructure", "ExcludeInStructuresRadiusClasses"); } - void SetExcludeInStructuresRadiusClassesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "ExcludeInStructuresRadiusClasses", newValue); } - float GetLastFadeOpacityField() const { return GetNativeField(this, "APrimalStructure", "LastFadeOpacity"); } - void SetLastFadeOpacityField(float newValue) { SetNativeField(this, "APrimalStructure", "LastFadeOpacity", newValue); } - bool GetbClientAddedToStructuresArrayField() const { return GetNativeField(this, "APrimalStructure", "bClientAddedToStructuresArray"); } - void SetbClientAddedToStructuresArrayField(bool newValue) { SetNativeField(this, "APrimalStructure", "bClientAddedToStructuresArray", newValue); } - long double GetLastFailedPinTimeField() const { return GetNativeField(this, "APrimalStructure", "LastFailedPinTime"); } - void SetLastFailedPinTimeField(long double newValue) { SetNativeField(this, "APrimalStructure", "LastFailedPinTime", newValue); } - //UStructurePaintingComponent * GetPaintingComponentField() const { return GetNativeField(this, "APrimalStructure", "PaintingComponent"); } - TArray GetPreventBuildStructureReasonStringOverridesField() const { return GetNativeField>(this, "APrimalStructure", "PreventBuildStructureReasonStringOverrides"); } - void SetPreventBuildStructureReasonStringOverridesField(TArray newValue) { SetNativeField(this, "APrimalStructure", "PreventBuildStructureReasonStringOverrides", newValue); } - FVector GetFloatingHudLocTextOffsetField() const { return GetNativeField(this, "APrimalStructure", "FloatingHudLocTextOffset"); } - void SetFloatingHudLocTextOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "FloatingHudLocTextOffset", newValue); } - float GetLastBumpedDamageTimeField() const { return GetNativeField(this, "APrimalStructure", "LastBumpedDamageTime"); } - void SetLastBumpedDamageTimeField(float newValue) { SetNativeField(this, "APrimalStructure", "LastBumpedDamageTime", newValue); } - int GetForceLimitStructuresInRangeField() const { return GetNativeField(this, "APrimalStructure", "ForceLimitStructuresInRange"); } - void SetForceLimitStructuresInRangeField(int newValue) { SetNativeField(this, "APrimalStructure", "ForceLimitStructuresInRange", newValue); } - float GetForcePreventPlacingInOfflineRaidStructuresRadiusField() const { return GetNativeField(this, "APrimalStructure", "ForcePreventPlacingInOfflineRaidStructuresRadius"); } - void SetForcePreventPlacingInOfflineRaidStructuresRadiusField(float newValue) { SetNativeField(this, "APrimalStructure", "ForcePreventPlacingInOfflineRaidStructuresRadius", newValue); } - FName GetAttachToStaticMeshSocketNameBaseField() const { return GetNativeField(this, "APrimalStructure", "AttachToStaticMeshSocketNameBase"); } - void SetAttachToStaticMeshSocketNameBaseField(FName newValue) { SetNativeField(this, "APrimalStructure", "AttachToStaticMeshSocketNameBase", newValue); } - TSubclassOf GetItemsUseAlternateActorClassAttachmentField() const { return GetNativeField>(this, "APrimalStructure", "ItemsUseAlternateActorClassAttachment"); } - void SetItemsUseAlternateActorClassAttachmentField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "ItemsUseAlternateActorClassAttachment", newValue); } - float GetUnstasisAutoDestroyAfterTimeField() const { return GetNativeField(this, "APrimalStructure", "UnstasisAutoDestroyAfterTime"); } - void SetUnstasisAutoDestroyAfterTimeField(float newValue) { SetNativeField(this, "APrimalStructure", "UnstasisAutoDestroyAfterTime", newValue); } - char GetTribeGroupStructureRankField() const { return GetNativeField(this, "APrimalStructure", "TribeGroupStructureRank"); } - void SetTribeGroupStructureRankField(char newValue) { SetNativeField(this, "APrimalStructure", "TribeGroupStructureRank", newValue); } - char GetTribeRankHUDYOffsetField() const { return GetNativeField(this, "APrimalStructure", "TribeRankHUDYOffset"); } - void SetTribeRankHUDYOffsetField(char newValue) { SetNativeField(this, "APrimalStructure", "TribeRankHUDYOffset", newValue); } - TArray> GetPreventSaddleDinoClassesField() const { return GetNativeField>>(this, "APrimalStructure", "PreventSaddleDinoClasses"); } - void SetPreventSaddleDinoClassesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "PreventSaddleDinoClasses", newValue); } - TArray> GetAllowSaddleDinoClassesField() const { return GetNativeField>>(this, "APrimalStructure", "AllowSaddleDinoClasses"); } - void SetAllowSaddleDinoClassesField(TArray> newValue) { SetNativeField(this, "APrimalStructure", "AllowSaddleDinoClasses", newValue); } - FName GetPlaceOnWallUseStaticMeshTagField() const { return GetNativeField(this, "APrimalStructure", "PlaceOnWallUseStaticMeshTag"); } - void SetPlaceOnWallUseStaticMeshTagField(FName newValue) { SetNativeField(this, "APrimalStructure", "PlaceOnWallUseStaticMeshTag", newValue); } - TSubclassOf GetSnapStructureClassField() const { return GetNativeField>(this, "APrimalStructure", "SnapStructureClass"); } - void SetSnapStructureClassField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructure", "SnapStructureClass", newValue); } - float GetDemolishActivationTimeField() const { return GetNativeField(this, "APrimalStructure", "DemolishActivationTime"); } - void SetDemolishActivationTimeField(float newValue) { SetNativeField(this, "APrimalStructure", "DemolishActivationTime", newValue); } - FVector GetGroundEncroachmentCheckLocationOffsetField() const { return GetNativeField(this, "APrimalStructure", "GroundEncroachmentCheckLocationOffset"); } - void SetGroundEncroachmentCheckLocationOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructure", "GroundEncroachmentCheckLocationOffset", newValue); } - int GetStructureMinAllowedVersionField() const { return GetNativeField(this, "APrimalStructure", "StructureMinAllowedVersion"); } - void SetStructureMinAllowedVersionField(int newValue) { SetNativeField(this, "APrimalStructure", "StructureMinAllowedVersion", newValue); } - int GetSavedStructureMinAllowedVersionField() const { return GetNativeField(this, "APrimalStructure", "SavedStructureMinAllowedVersion"); } - void SetSavedStructureMinAllowedVersionField(int newValue) { SetNativeField(this, "APrimalStructure", "SavedStructureMinAllowedVersion", newValue); } - - // Functions - - static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalStructure", "GetPrivateStaticClass"); } - int GetHitPawnCollisionGroup() { return NativeCall((DWORD64)this, "APrimalStructure", "GetHitPawnCollisionGroup"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "APrimalStructure", "PreInitializeComponents"); } - void BeginPlay() { NativeCall((DWORD64)this, "APrimalStructure", "BeginPlay"); } - void SetLinkedIDs() { NativeCall((DWORD64)this, "APrimalStructure", "SetLinkedIDs"); } - void ApplyLinkedIDs(bool bRelinkParents) { NativeCall((DWORD64)this, "APrimalStructure", "ApplyLinkedIDs", bRelinkParents); } - static APrimalStructure* GetFromID(UWorld* World, unsigned int TheStructureID) { return NativeCall(nullptr, "APrimalStructure", "GetFromID", World, TheStructureID); } - void OnRep_AttachmentReplication() { NativeCall((DWORD64)this, "APrimalStructure", "OnRep_AttachmentReplication"); } - void SetDinoSaddleAttachment() { NativeCall((DWORD64)this, "APrimalStructure", "SetDinoSaddleAttachment"); } - void PostSpawnInitialize() { NativeCall((DWORD64)this, "APrimalStructure", "PostSpawnInitialize"); } - void LoadedFromSaveGame() { NativeCall((DWORD64)this, "APrimalStructure", "LoadedFromSaveGame"); } - void SetStructureCollisionChannels() { NativeCall((DWORD64)this, "APrimalStructure", "SetStructureCollisionChannels"); } - void ApplyScale(bool bOnlyInitPhysics) { NativeCall((DWORD64)this, "APrimalStructure", "ApplyScale", bOnlyInitPhysics); } - void PostSpawnInitialize(FVector* SpawnLocation, FRotator* SpawnRotation, AActor* InOwner, APawn* InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction, bool bDeferBeginPlay) { NativeCall((DWORD64)this, "APrimalStructure", "PostSpawnInitialize", SpawnLocation, SpawnRotation, InOwner, InInstigator, bRemoteOwned, bNoFail, bDeferConstruction, bDeferBeginPlay); } - bool UseDynamicMobility() { return NativeCall((DWORD64)this, "APrimalStructure", "UseDynamicMobility"); } - void SetStaticMobility() { NativeCall((DWORD64)this, "APrimalStructure", "SetStaticMobility"); } - void PrepareAsPlacementPreview() { NativeCall((DWORD64)this, "APrimalStructure", "PrepareAsPlacementPreview"); } - int IsAllowedToBuild() { return NativeCall((DWORD64)this, "APrimalStructure", "IsAllowedToBuild"); } - bool IsPointNearSupplyCrateSpawn() { return NativeCall((DWORD64)this, "APrimalStructure", "IsPointNearSupplyCrateSpawn"); } - void NetUpdateOriginalOwnerNameAndID_Implementation(int NewOriginalOwnerID, FString* NewOriginalOwnerName) { NativeCall((DWORD64)this, "APrimalStructure", "NetUpdateOriginalOwnerNameAndID_Implementation", NewOriginalOwnerID, NewOriginalOwnerName); } - void NonPlayerFinalStructurePlacement(int PlacementTargetingTeam, int PlacementOwningPlayerID, FString* PlacementOwningPlayerName, APrimalStructure* ForcePrimaryParent) { NativeCall((DWORD64)this, "APrimalStructure", "NonPlayerFinalStructurePlacement", PlacementTargetingTeam, PlacementOwningPlayerID, PlacementOwningPlayerName, ForcePrimaryParent); } - bool FinalStructurePlacement() { return NativeCall((DWORD64)this, "APrimalStructure", "FinalStructurePlacement"); } - FVector* GetSnapPointLocation() { return NativeCall((DWORD64)this, "APrimalStructure", "GetSnapPointLocation"); } - bool GetSnapToLocation(FVector* AtLoc, FRotator* AtRotation, FPlacementData* OutPlacementData, APrimalStructure** OutParentStructure, int* OutSnapToIndex, APlayerController* PC, bool bFinalPlacement, int SnapPointCycle) { return NativeCall((DWORD64)this, "APrimalStructure", "GetSnapToLocation", AtLoc, AtRotation, OutPlacementData, OutParentStructure, OutSnapToIndex, PC, bFinalPlacement, SnapPointCycle); } - void GetSnapToParentStructures() { NativeCall((DWORD64)this, "APrimalStructure", "GetSnapToParentStructures"); } - bool GetPlacingGroundLocation(AActor** OutHitActor, FPlacementData* OutPlacementData, APlayerController* PC, bool bFinalPlacement, int SnapPointCycle) { return NativeCall((DWORD64)this, "APrimalStructure", "GetPlacingGroundLocation", OutHitActor, OutPlacementData, PC, bFinalPlacement, SnapPointCycle); } - bool ClampBuildLocation() { return NativeCall((DWORD64)this, "APrimalStructure", "ClampBuildLocation"); } - bool CheckNotEncroaching() { return NativeCall((DWORD64)this, "APrimalStructure", "CheckNotEncroaching"); } - APrimalStructure* GetNearbyFoundation(FPlacementData* PlacementData, APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "GetNearbyFoundation", PlacementData, ForPC); } - void NetSpawnCoreStructureDeathActor_Implementation() { NativeCall((DWORD64)this, "APrimalStructure", "NetSpawnCoreStructureDeathActor_Implementation"); } - float TakeDamage(float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalStructure", "TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } - bool Die(float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return NativeCall((DWORD64)this, "APrimalStructure", "Die", KillingDamage, DamageEvent, Killer, DamageCauser); } - void PlayDying(float KillingDamage, FDamageEvent* DamageEvent, APawn* InstigatingPawn, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalStructure", "PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } - //void FindFoundations(APrimalStructure * StartingStructure TArray * Foundations) { NativeCall *>((DWORD64)this, "APrimalStructure", "FindFoundations", StartingStructure, Foundations); } - //void CullAgainstFoundations(APrimalStructure ** StartingStructure TArray * Foundations) { NativeCall *>((DWORD64)this, "APrimalStructure", "CullAgainstFoundations", StartingStructure, Foundations); } - void FlagReachable(TArray* Foundations) { NativeCall *>((DWORD64)this, "APrimalStructure", "FlagReachable", Foundations); } - void FlagReachable(APrimalStructure* StartingStructure) { NativeCall((DWORD64)this, "APrimalStructure", "FlagReachable", StartingStructure); } - //void CleanUpTree(APrimalStructure * StartingStructure AController * InstigatorController, AActor * DamageCauser) { NativeCall((DWORD64)this, "APrimalStructure", "CleanUpTree", StartingStructure, InstigatorController, DamageCauser); } - void RemoveLinkedStructure(APrimalStructure* Structure, AController* InstigatorController, AActor* DamageCauser) { NativeCall((DWORD64)this, "APrimalStructure", "RemoveLinkedStructure", Structure, InstigatorController, DamageCauser); } - void RefreshStructureColors() { NativeCall((DWORD64)this, "APrimalStructure", "RefreshStructureColors"); } - FLinearColor* GetStructureColorForID(FLinearColor* result, int SetNum, int ID) { return NativeCall((DWORD64)this, "APrimalStructure", "GetStructureColorForID", result, SetNum, ID); } - bool Internal_IsInSnapChain(APrimalStructure* theStructure) { return NativeCall((DWORD64)this, "APrimalStructure", "Internal_IsInSnapChain", theStructure); } - void GetAllLinkedStructures(TArray* OutLinkedStructures) { NativeCall *>((DWORD64)this, "APrimalStructure", "GetAllLinkedStructures", OutLinkedStructures); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "APrimalStructure", "TryMultiUse", ForPC, UseIndex); } - void Demolish(APlayerController* ForPC) { NativeCall((DWORD64)this, "APrimalStructure", "Demolish", ForPC); } - bool DoAnyTribePermissionsRestrict(AShooterPlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "DoAnyTribePermissionsRestrict", ForPC); } - void ChangeActorTeam(int NewTeam) { NativeCall((DWORD64)this, "APrimalStructure", "ChangeActorTeam", NewTeam); } - void NetUpdateTeamAndOwnerName_Implementation(int NewTeam, FString* NewOwnerName) { NativeCall((DWORD64)this, "APrimalStructure", "NetUpdateTeamAndOwnerName_Implementation", NewTeam, NewOwnerName); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalStructure", "GetDescriptiveName", result); } - void UpdatedHealth(bool bDoReplication) { NativeCall((DWORD64)this, "APrimalStructure", "UpdatedHealth", bDoReplication); } - void StartRepair() { NativeCall((DWORD64)this, "APrimalStructure", "StartRepair"); } - void RepairCheckTimer() { NativeCall((DWORD64)this, "APrimalStructure", "RepairCheckTimer"); } - void Stasis() { NativeCall((DWORD64)this, "APrimalStructure", "Stasis"); } - void Destroyed() { NativeCall((DWORD64)this, "APrimalStructure", "Destroyed"); } - void Unstasis() { NativeCall((DWORD64)this, "APrimalStructure", "Unstasis"); } - //void GetNearbyStructuresOfClass(UWorld * World TSubclassOf StructureClass, FVector * Location, float Range, TArray * Structures) { NativeCall, FVector *, float, TArray *>((DWORD64)this, "APrimalStructure", "GetNearbyStructuresOfClass", World, StructureClass, Location, Range, Structures); } - void ClientUpdateLinkedStructures_Implementation(TArray* NewLinkedStructures) { NativeCall *>((DWORD64)this, "APrimalStructure", "ClientUpdateLinkedStructures_Implementation", NewLinkedStructures); } - bool AllowColoringBy(APlayerController* ForPC, UObject* anItem) { return NativeCall((DWORD64)this, "APrimalStructure", "AllowColoringBy", ForPC, anItem); } - void ServerRequestUseItemWithActor(APlayerController* ForPC, UObject* anItem, int AdditionalData) { NativeCall((DWORD64)this, "APrimalStructure", "ServerRequestUseItemWithActor", ForPC, anItem, AdditionalData); } - void ApplyColorToRegions(__int16 CustomColorID, bool* ApplyToRegions) { NativeCall((DWORD64)this, "APrimalStructure", "ApplyColorToRegions", CustomColorID, ApplyToRegions); } - bool IsNetRelevantFor(APlayerController* RealViewer, AActor* Viewer, FVector* SrcLocation) { return NativeCall((DWORD64)this, "APrimalStructure", "IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } - void NetDoSpawnEffects_Implementation() { NativeCall((DWORD64)this, "APrimalStructure", "NetDoSpawnEffects_Implementation"); } - void FadeInEffectTick() { NativeCall((DWORD64)this, "APrimalStructure", "FadeInEffectTick"); } - float AddAggroOnBump(APrimalDinoCharacter* BumpedBy) { return NativeCall((DWORD64)this, "APrimalStructure", "AddAggroOnBump", BumpedBy); } - int GetNumStructuresInRange() { return NativeCall((DWORD64)this, "APrimalStructure", "GetNumStructuresInRange"); } - int GetNumStructuresInRangeStructureTypeFlag() { return NativeCall((DWORD64)this, "APrimalStructure", "GetNumStructuresInRangeStructureTypeFlag"); } - bool AllowPickupForItem(AShooterPlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "AllowPickupForItem", ForPC); } - bool AllowSnappingWith(APrimalStructure* OtherStructure, APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "AllowSnappingWith", OtherStructure, ForPC); } - bool AllowStructureAccess(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "AllowStructureAccess", ForPC); } - bool IsPointObstructedByWorldGeometry() { return NativeCall((DWORD64)this, "APrimalStructure", "IsPointObstructedByWorldGeometry"); } - bool CanBePainted() { return NativeCall((DWORD64)this, "APrimalStructure", "CanBePainted"); } - //UPaintingTexture * GetPaintingTexture() { return NativeCall((DWORD64)this, "APrimalStructure", "GetPaintingTexture"); } - APrimalStructureDoor* GetLinkedDoor() { return NativeCall((DWORD64)this, "APrimalStructure", "GetLinkedDoor"); } - FString* GetEntryString(FString* result) { return NativeCall((DWORD64)this, "APrimalStructure", "GetEntryString", result); } - UObject* GetUObjectInterfaceDataListEntryInterface() { return NativeCall((DWORD64)this, "APrimalStructure", "GetUObjectInterfaceDataListEntryInterface"); } - FString* GetEntryDescription(FString* result) { return NativeCall((DWORD64)this, "APrimalStructure", "GetEntryDescription", result); } - //bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall((DWORD64)this, "APrimalStructure", "PreventCharacterBasing", OtherActor, BasedOnComponent); } - void ClearCustomColors_Implementation() { NativeCall((DWORD64)this, "APrimalStructure", "ClearCustomColors_Implementation"); } - bool PreventPlacingOnFloorClass(TSubclassOf FloorClass) { return NativeCall>((DWORD64)this, "APrimalStructure", "PreventPlacingOnFloorClass", FloorClass); } - void UpdateTribeGroupStructureRank_Implementation(char NewRank) { NativeCall((DWORD64)this, "APrimalStructure", "UpdateTribeGroupStructureRank_Implementation", NewRank); } - bool AllowPlacingOnSaddleParentClass(APrimalDinoCharacter* theDino, bool bForcePrevent) { return NativeCall((DWORD64)this, "APrimalStructure", "AllowPlacingOnSaddleParentClass", theDino, bForcePrevent); } - bool GetAttachedToStaticMeshTransform() { return NativeCall((DWORD64)this, "APrimalStructure", "GetAttachedToStaticMeshTransform"); } - APrimalStructure* GetClosestStructureToPoint() { return NativeCall((DWORD64)this, "APrimalStructure", "GetClosestStructureToPoint"); } - float GetStructureDemolishTime() { return NativeCall((DWORD64)this, "APrimalStructure", "GetStructureDemolishTime"); } - bool CanAutoDemolish() { return NativeCall((DWORD64)this, "APrimalStructure", "CanAutoDemolish"); } - void DelayedDisableSnapParent() { NativeCall((DWORD64)this, "APrimalStructure", "DelayedDisableSnapParent"); } - void SetEnabledPrimarySnappedStructureParent_Implementation(bool bEnabled) { NativeCall((DWORD64)this, "APrimalStructure", "SetEnabledPrimarySnappedStructureParent_Implementation", bEnabled); } - bool AllowCreateDynamicMaterials() { return NativeCall((DWORD64)this, "APrimalStructure", "AllowCreateDynamicMaterials"); } - void CreateDynamicMaterials() { NativeCall((DWORD64)this, "APrimalStructure", "CreateDynamicMaterials"); } - bool BPAllowSnappingWith(APrimalStructure* OtherStructure, APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructure", "BPAllowSnappingWith", OtherStructure, ForPC); } - int BPIsAllowedToBuild(FPlacementData* OutPlacementData, int CurrentAllowedReason) { return NativeCall((DWORD64)this, "APrimalStructure", "BPIsAllowedToBuild", OutPlacementData, CurrentAllowedReason); } - FString* BPOverrideCantBuildReasonString(FString* result, int CantBuildReason) { return NativeCall((DWORD64)this, "APrimalStructure", "BPOverrideCantBuildReasonString", result, CantBuildReason); } - bool BPPreventPlacingOnFloorStructure(FPlacementData* theOutPlacementData, APrimalStructure* FloorStructure) { return NativeCall((DWORD64)this, "APrimalStructure", "BPPreventPlacingOnFloorStructure", theOutPlacementData, FloorStructure); } - bool BPPreventUsingAsFloorForStructure(FPlacementData* theOutPlacementData, APrimalStructure* StructureToPlaceOnMe) { return NativeCall((DWORD64)this, "APrimalStructure", "BPPreventUsingAsFloorForStructure", theOutPlacementData, StructureToPlaceOnMe); } - void BPRefreshedStructureColors() { NativeCall((DWORD64)this, "APrimalStructure", "BPRefreshedStructureColors"); } - void ClientUpdateLinkedStructures(TArray* NewLinkedStructures) { NativeCall *>((DWORD64)this, "APrimalStructure", "ClientUpdateLinkedStructures", NewLinkedStructures); } - void NetDoSpawnEffects() { NativeCall((DWORD64)this, "APrimalStructure", "NetDoSpawnEffects"); } - void NetUpdateOriginalOwnerNameAndID(int NewOriginalOwnerID, FString* NewOriginalOwnerName) { NativeCall((DWORD64)this, "APrimalStructure", "NetUpdateOriginalOwnerNameAndID", NewOriginalOwnerID, NewOriginalOwnerName); } - void NetUpdateTeamAndOwnerName(int NewTeam, FString* NewOwnerName) { NativeCall((DWORD64)this, "APrimalStructure", "NetUpdateTeamAndOwnerName", NewTeam, NewOwnerName); } -}; - -struct APrimalStructureDoor : APrimalStructure -{ - float GetRotationSpeedField() const { return GetNativeField(this, "APrimalStructureDoor", "RotationSpeed"); } - void SetRotationSpeedField(float newValue) { SetNativeField(this, "APrimalStructureDoor", "RotationSpeed", newValue); } - unsigned int GetCurrentPinCodeField() const { return GetNativeField(this, "APrimalStructureDoor", "CurrentPinCode"); } - void SetCurrentPinCodeField(unsigned int newValue) { SetNativeField(this, "APrimalStructureDoor", "CurrentPinCode", newValue); } - char GetDoorOpenStateField() const { return GetNativeField(this, "APrimalStructureDoor", "DoorOpenState"); } - void SetDoorOpenStateField(char newValue) { SetNativeField(this, "APrimalStructureDoor", "DoorOpenState", newValue); } - char GetClientPrevDoorOpenStateField() const { return GetNativeField(this, "APrimalStructureDoor", "ClientPrevDoorOpenState"); } - void SetClientPrevDoorOpenStateField(char newValue) { SetNativeField(this, "APrimalStructureDoor", "ClientPrevDoorOpenState", newValue); } - long double GetLastLockStateChangeTimeField() const { return GetNativeField(this, "APrimalStructureDoor", "LastLockStateChangeTime"); } - void SetLastLockStateChangeTimeField(long double newValue) { SetNativeField(this, "APrimalStructureDoor", "LastLockStateChangeTime", newValue); } - FRotator GetSecondDoorDefaultRotField() const { return GetNativeField(this, "APrimalStructureDoor", "SecondDoorDefaultRot"); } - void SetSecondDoorDefaultRotField(FRotator newValue) { SetNativeField(this, "APrimalStructureDoor", "SecondDoorDefaultRot", newValue); } - float GetCurrentDoorAngleField() const { return GetNativeField(this, "APrimalStructureDoor", "CurrentDoorAngle"); } - void SetCurrentDoorAngleField(float newValue) { SetNativeField(this, "APrimalStructureDoor", "CurrentDoorAngle", newValue); } - char GetDelayedDoorStateField() const { return GetNativeField(this, "APrimalStructureDoor", "DelayedDoorState"); } - void SetDelayedDoorStateField(char newValue) { SetNativeField(this, "APrimalStructureDoor", "DelayedDoorState", newValue); } - - // Functions - - void BeginPlay() { NativeCall((DWORD64)this, "APrimalStructureDoor", "BeginPlay"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalStructureDoor", "Tick", DeltaSeconds); } - void GotoDoorState(char DoorState) { NativeCall((DWORD64)this, "APrimalStructureDoor", "GotoDoorState", DoorState); } - void DelayedGotoDoorState(char DoorState, float DelayTime) { NativeCall((DWORD64)this, "APrimalStructureDoor", "DelayedGotoDoorState", DoorState, DelayTime); } - void DelayedGotoDoorStateTimer() { NativeCall((DWORD64)this, "APrimalStructureDoor", "DelayedGotoDoorStateTimer"); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "TryMultiUse", ForPC, UseIndex); } - bool CanOpen(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "CanOpen", ForPC); } - FString* GetDescriptiveName(FString* result) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "GetDescriptiveName", result); } - bool ApplyPinCode(AShooterPlayerController* ForPC, int appledPinCode, bool bIsSetting) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "ApplyPinCode", ForPC, appledPinCode, bIsSetting); } - void SetStaticMobility() { NativeCall((DWORD64)this, "APrimalStructureDoor", "SetStaticMobility"); } - void NetGotoDoorState_Implementation(char DoorState) { NativeCall((DWORD64)this, "APrimalStructureDoor", "NetGotoDoorState_Implementation", DoorState); } - void PostInitializeComponents() { NativeCall((DWORD64)this, "APrimalStructureDoor", "PostInitializeComponents"); } - bool AllowStructureAccess(APlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "AllowStructureAccess", ForPC); } - //bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "PreventCharacterBasing", OtherActor, BasedOnComponent); } - bool AllowPickupForItem(AShooterPlayerController* ForPC) { return NativeCall((DWORD64)this, "APrimalStructureDoor", "AllowPickupForItem", ForPC); } - void StaticRegisterNativesAPrimalStructureDoor() { NativeCall((DWORD64)this, "APrimalStructureDoor", "StaticRegisterNativesAPrimalStructureDoor"); } -}; - -struct APrimalStructureTurret -{ - TWeakObjectPtr GetTargetField() const { return GetNativeField>(this, "APrimalStructureTurret", "Target"); } - void SetTargetField(TWeakObjectPtr newValue) { SetNativeField(this, "APrimalStructureTurret", "Target", newValue); } - TSubclassOf GetAmmoItemTemplateField() const { return GetNativeField>(this, "APrimalStructureTurret", "AmmoItemTemplate"); } - void SetAmmoItemTemplateField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructureTurret", "AmmoItemTemplate", newValue); } - float GetFireIntervalField() const { return GetNativeField(this, "APrimalStructureTurret", "FireInterval"); } - void SetFireIntervalField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "FireInterval", newValue); } - long double GetLastFireTimeField() const { return GetNativeField(this, "APrimalStructureTurret", "LastFireTime"); } - void SetLastFireTimeField(long double newValue) { SetNativeField(this, "APrimalStructureTurret", "LastFireTime", newValue); } - float GetMaxFireYawDeltaField() const { return GetNativeField(this, "APrimalStructureTurret", "MaxFireYawDelta"); } - void SetMaxFireYawDeltaField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "MaxFireYawDelta", newValue); } - float GetMaxFirePitchDeltaField() const { return GetNativeField(this, "APrimalStructureTurret", "MaxFirePitchDelta"); } - void SetMaxFirePitchDeltaField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "MaxFirePitchDelta", newValue); } - FVector GetTargetingLocOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "TargetingLocOffset"); } - void SetTargetingLocOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructureTurret", "TargetingLocOffset", newValue); } - float GetTargetingRotationInterpSpeedField() const { return GetNativeField(this, "APrimalStructureTurret", "TargetingRotationInterpSpeed"); } - void SetTargetingRotationInterpSpeedField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "TargetingRotationInterpSpeed", newValue); } - FVector GetTargetingTraceOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "TargetingTraceOffset"); } - void SetTargetingTraceOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructureTurret", "TargetingTraceOffset", newValue); } - TSubclassOf GetFireDamageTypeField() const { return GetNativeField>(this, "APrimalStructureTurret", "FireDamageType"); } - void SetFireDamageTypeField(TSubclassOf newValue) { SetNativeField(this, "APrimalStructureTurret", "FireDamageType", newValue); } - float GetFireDamageAmountField() const { return GetNativeField(this, "APrimalStructureTurret", "FireDamageAmount"); } - void SetFireDamageAmountField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "FireDamageAmount", newValue); } - float GetFireDamageImpulseField() const { return GetNativeField(this, "APrimalStructureTurret", "FireDamageImpulse"); } - void SetFireDamageImpulseField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "FireDamageImpulse", newValue); } - FRotator GetTurretAimRotOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "TurretAimRotOffset"); } - void SetTurretAimRotOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructureTurret", "TurretAimRotOffset", newValue); } - FVector GetAimTargetLocOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "AimTargetLocOffset"); } - void SetAimTargetLocOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructureTurret", "AimTargetLocOffset", newValue); } - FVector GetPlayerProneTargetOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "PlayerProneTargetOffset"); } - void SetPlayerProneTargetOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructureTurret", "PlayerProneTargetOffset", newValue); } - float GetAimSpreadField() const { return GetNativeField(this, "APrimalStructureTurret", "AimSpread"); } - void SetAimSpreadField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "AimSpread", newValue); } - char GetRangeSettingField() const { return GetNativeField(this, "APrimalStructureTurret", "RangeSetting"); } - void SetRangeSettingField(char newValue) { SetNativeField(this, "APrimalStructureTurret", "RangeSetting", newValue); } - char GetAISettingField() const { return GetNativeField(this, "APrimalStructureTurret", "AISetting"); } - void SetAISettingField(char newValue) { SetNativeField(this, "APrimalStructureTurret", "AISetting", newValue); } - char GetWarningSettingField() const { return GetNativeField(this, "APrimalStructureTurret", "WarningSetting"); } - void SetWarningSettingField(char newValue) { SetNativeField(this, "APrimalStructureTurret", "WarningSetting", newValue); } - int GetNumBulletsField() const { return GetNativeField(this, "APrimalStructureTurret", "NumBullets"); } - void SetNumBulletsField(int newValue) { SetNativeField(this, "APrimalStructureTurret", "NumBullets", newValue); } - float GetWarningExpirationTimeField() const { return GetNativeField(this, "APrimalStructureTurret", "WarningExpirationTime"); } - void SetWarningExpirationTimeField(float newValue) { SetNativeField(this, "APrimalStructureTurret", "WarningExpirationTime", newValue); } - USkeletalMeshComponent* GetMySkeletalMeshCompField() const { return GetNativeField(this, "APrimalStructureTurret", "MySkeletalMeshComp"); } - void SetMySkeletalMeshCompField(USkeletalMeshComponent* newValue) { SetNativeField(this, "APrimalStructureTurret", "MySkeletalMeshComp", newValue); } - bool GetbWarnedField() const { return GetNativeField(this, "APrimalStructureTurret", "bWarned"); } - void SetbWarnedField(bool newValue) { SetNativeField(this, "APrimalStructureTurret", "bWarned", newValue); } - FRotator GetDefaultTurretAimRotOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "DefaultTurretAimRotOffset"); } - void SetDefaultTurretAimRotOffsetField(FRotator newValue) { SetNativeField(this, "APrimalStructureTurret", "DefaultTurretAimRotOffset", newValue); } - FVector GetMuzzleLocOffsetField() const { return GetNativeField(this, "APrimalStructureTurret", "MuzzleLocOffset"); } - void SetMuzzleLocOffsetField(FVector newValue) { SetNativeField(this, "APrimalStructureTurret", "MuzzleLocOffset", newValue); } - long double GetLastWarningTimeField() const { return GetNativeField(this, "APrimalStructureTurret", "LastWarningTime"); } - void SetLastWarningTimeField(long double newValue) { SetNativeField(this, "APrimalStructureTurret", "LastWarningTime", newValue); } - - // Functions - - void BeginPlay() { NativeCall((DWORD64)this, "APrimalStructureTurret", "BeginPlay"); } - AActor* FindTarget() { return NativeCall((DWORD64)this, "APrimalStructureTurret", "FindTarget"); } - void SetTarget(AActor* aTarget) { NativeCall((DWORD64)this, "APrimalStructureTurret", "SetTarget", aTarget); } - void DoFire(int RandomSeed) { NativeCall((DWORD64)this, "APrimalStructureTurret", "DoFire", RandomSeed); } - void DoFireProjectile(FVector Origin, FVector ShootDir) { NativeCall((DWORD64)this, "APrimalStructureTurret", "DoFireProjectile", Origin, ShootDir); } - void SpawnImpactEffects(FHitResult* Impact, FVector* ShootDir) { NativeCall((DWORD64)this, "APrimalStructureTurret", "SpawnImpactEffects", Impact, ShootDir); } - void SpawnTrailEffect(FVector* EndPoint) { NativeCall((DWORD64)this, "APrimalStructureTurret", "SpawnTrailEffect", EndPoint); } - bool ShouldDealDamage(AActor* TestActor) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "ShouldDealDamage", TestActor); } - void DealDamage(FHitResult* Impact, FVector* ShootDir, int DamageAmount, TSubclassOf DamageType, float Impulse) { NativeCall, float>((DWORD64)this, "APrimalStructureTurret", "DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } - void StartWarning() { NativeCall((DWORD64)this, "APrimalStructureTurret", "StartWarning"); } - void FinishWarning() { NativeCall((DWORD64)this, "APrimalStructureTurret", "FinishWarning"); } - void Tick(float DeltaSeconds) { NativeCall((DWORD64)this, "APrimalStructureTurret", "Tick", DeltaSeconds); } - void DrawHUD(AShooterHUD* HUD) { NativeCall((DWORD64)this, "APrimalStructureTurret", "DrawHUD", HUD); } - bool IsValidToFire() { return NativeCall((DWORD64)this, "APrimalStructureTurret", "IsValidToFire"); } - FRotator* GetMuzzleRotation(FRotator* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetMuzzleRotation", result); } - FVector* GetMuzzleLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetMuzzleLocation", result); } - FVector* GetAttackingFromLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetAttackingFromLocation", result); } - FVector* GetAimPivotLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetAimPivotLocation", result); } - FName* GetMuzzleFlashSocketName(FName* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetMuzzleFlashSocketName", result); } - bool TryMultiUse(APlayerController* ForPC, int UseIndex) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "TryMultiUse", ForPC, UseIndex); } - void ClientMultiUse(APlayerController* ForPC, int UseIndex) { NativeCall((DWORD64)this, "APrimalStructureTurret", "ClientMultiUse", ForPC, UseIndex); } - void NotifyItemRemoved(UPrimalItem* anItem) { NativeCall((DWORD64)this, "APrimalStructureTurret", "NotifyItemRemoved", anItem); } - void UpdateNumBullets() { NativeCall((DWORD64)this, "APrimalStructureTurret", "UpdateNumBullets"); } - void PreInitializeComponents() { NativeCall((DWORD64)this, "APrimalStructureTurret", "PreInitializeComponents"); } - void Stasis() { NativeCall((DWORD64)this, "APrimalStructureTurret", "Stasis"); } - void Unstasis() { NativeCall((DWORD64)this, "APrimalStructureTurret", "Unstasis"); } - void UpdatedTargeting() { NativeCall((DWORD64)this, "APrimalStructureTurret", "UpdatedTargeting"); } - FVector* GetTargetAimAtLocation(FVector* result) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetTargetAimAtLocation", result); } - FVector* GetTargetFireAtLocation(FVector* result, APrimalCharacter* ForTarget) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetTargetFireAtLocation", result, ForTarget); } - bool CanFire() { return NativeCall((DWORD64)this, "APrimalStructureTurret", "CanFire"); } - FName* GetTargetAltAimSocket(FName* result, APrimalCharacter* ForTarget) { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetTargetAltAimSocket", result, ForTarget); } - USkeletalMeshComponent* GetSkeletalMeshComponent() { return NativeCall((DWORD64)this, "APrimalStructureTurret", "GetSkeletalMeshComponent"); } - void StaticRegisterNativesAPrimalStructureTurret() { NativeCall((DWORD64)this, "APrimalStructureTurret", "StaticRegisterNativesAPrimalStructureTurret"); } -}; diff --git a/ArkApi/API/Tribe.h b/ArkApi/API/Tribe.h deleted file mode 100644 index 1ed3c08..0000000 --- a/ArkApi/API/Tribe.h +++ /dev/null @@ -1,129 +0,0 @@ -#pragma once - -#include "Base.h" - -struct FTribeData -{ - FString GetTribeNameField() const { return GetNativeField(this, "FTribeData", "TribeName"); } - void SetTribeNameField(FString newValue) { SetNativeField(this, "FTribeData", "TribeName", newValue); } - unsigned int GetOwnerPlayerDataIDField() const { return GetNativeField(this, "FTribeData", "OwnerPlayerDataID"); } - void SetOwnerPlayerDataIDField(unsigned int newValue) { SetNativeField(this, "FTribeData", "OwnerPlayerDataID", newValue); } - int GetTribeIDField() const { return GetNativeField(this, "FTribeData", "TribeID"); } - void SetTribeIDField(int newValue) { SetNativeField(this, "FTribeData", "TribeID", newValue); } - TArray GetMembersPlayerNameField() const { return GetNativeField>(this, "FTribeData", "MembersPlayerName"); } - TArray GetMembersPlayerDataIDField() const { return GetNativeField>(this, "FTribeData", "MembersPlayerDataID"); } - TArray GetMembersRankGroupsField() const { return GetNativeField>(this, "FTribeData", "MembersRankGroups"); } - void SetMembersRankGroupsField(TArray newValue) { SetNativeField(this, "FTribeData", "MembersRankGroups", newValue); } - TArray GetTribeAdminsField() const { return GetNativeField>(this, "FTribeData", "TribeAdmins"); } - void SetTribeAdminsField(TArray newValue) { SetNativeField(this, "FTribeData", "TribeAdmins", newValue); } - TArray GetTribeAlliancesField() const { return GetNativeField>(this, "FTribeData", "TribeAlliances"); } - void SetTribeAlliancesField(TArray newValue) { SetNativeField(this, "FTribeData", "TribeAlliances", newValue); } - bool GetbSetGovernmentField() const { return GetNativeField(this, "FTribeData", "bSetGovernment"); } - void SetbSetGovernmentField(bool newValue) { SetNativeField(this, "FTribeData", "bSetGovernment", newValue); } - FTribeGovernment* GetTribeGovernmentField() const { return GetNativePointerField(this, "FTribeData", "TribeGovernment"); } - TArray GetMembersConfigsField() const { return GetNativeField>(this, "FTribeData", "MembersConfigs"); } - TArray GetTribeWarsField() const { return GetNativeField>(this, "FTribeData", "TribeWars"); } - TArray GetTribeLogField() const { return GetNativeField>(this, "FTribeData", "TribeLog"); } - void SetTribeLogField(TArray newValue) { SetNativeField(this, "FTribeData", "TribeLog", newValue); } - int GetLogIndexField() const { return GetNativeField(this, "FTribeData", "LogIndex"); } - void SetLogIndexField(int newValue) { SetNativeField(this, "FTribeData", "LogIndex", newValue); } - TArray GetTribeRankGroupsField() const { return GetNativeField>(this, "FTribeData", "TribeRankGroups"); } - - // Functions - - bool IsTribeWarActive(int TribeID, UWorld * ForWorld, bool bIncludeUnstarted) { return NativeCall((DWORD64)this, "FTribeData", "IsTribeWarActive", TribeID, ForWorld, bIncludeUnstarted); } - bool HasTribeWarRequest(int TribeID, UWorld * ForWorld) { return NativeCall((DWORD64)this, "FTribeData", "HasTribeWarRequest", TribeID, ForWorld); } - void RefreshTribeWars(UWorld * ForWorld) { NativeCall((DWORD64)this, "FTribeData", "RefreshTribeWars", ForWorld); } - FTribeAlliance * FindTribeAlliance(unsigned int AllianceID) { return NativeCall((DWORD64)this, "FTribeData", "FindTribeAlliance", AllianceID); } - bool IsTribeAlliedWith(unsigned int OtherTribeID) { return NativeCall((DWORD64)this, "FTribeData", "IsTribeAlliedWith", OtherTribeID); } - bool GetTribeRankGroupForPlayer(unsigned int PlayerDataID, FTribeRankGroup * outRankGroup) { return NativeCall((DWORD64)this, "FTribeData", "GetTribeRankGroupForPlayer", PlayerDataID, outRankGroup); } - int GetBestRankGroupForRank(int Rank) { return NativeCall((DWORD64)this, "FTribeData", "GetBestRankGroupForRank", Rank); } - int GetDefaultRankGroupIndex() { return NativeCall((DWORD64)this, "FTribeData", "GetDefaultRankGroupIndex"); } -}; - -struct FTribeWar -{ - int GetEnemyTribeIDField() const { return GetNativeField(this, "FTribeWar", "EnemyTribeID"); } - void SetEnemyTribeIDField(int newValue) { SetNativeField(this, "FTribeWar", "EnemyTribeID", newValue); } - int GetStartDayNumberField() const { return GetNativeField(this, "FTribeWar", "StartDayNumber"); } - void SetStartDayNumberField(int newValue) { SetNativeField(this, "FTribeWar", "StartDayNumber", newValue); } - int GetEndDayNumberField() const { return GetNativeField(this, "FTribeWar", "EndDayNumber"); } - void SetEndDayNumberField(int newValue) { SetNativeField(this, "FTribeWar", "EndDayNumber", newValue); } - float GetStartDayTimeField() const { return GetNativeField(this, "FTribeWar", "StartDayTime"); } - void SetStartDayTimeField(float newValue) { SetNativeField(this, "FTribeWar", "StartDayTime", newValue); } - float GetEndDayTimeField() const { return GetNativeField(this, "FTribeWar", "EndDayTime"); } - void SetEndDayTimeField(float newValue) { SetNativeField(this, "FTribeWar", "EndDayTime", newValue); } - bool GetbIsApprovedField() const { return GetNativeField(this, "FTribeWar", "bIsApproved"); } - void SetbIsApprovedField(bool newValue) { SetNativeField(this, "FTribeWar", "bIsApproved", newValue); } - int GetInitiatingTribeIDField() const { return GetNativeField(this, "FTribeWar", "InitiatingTribeID"); } - void SetInitiatingTribeIDField(int newValue) { SetNativeField(this, "FTribeWar", "InitiatingTribeID", newValue); } - FString GetEnemyTribeNameField() const { return GetNativeField(this, "FTribeWar", "EnemyTribeName"); } - void SetEnemyTribeNameField(FString newValue) { SetNativeField(this, "FTribeWar", "EnemyTribeName", newValue); } - - // Functions - - bool CanBeRejected(UWorld * ForWorld) { return NativeCall((DWORD64)this, "FTribeWar", "CanBeRejected", ForWorld); } - bool IsCurrentlyActive(UWorld * ForWorld) { return NativeCall((DWORD64)this, "FTribeWar", "IsCurrentlyActive", ForWorld); } - bool IsTribeWarOn(UWorld * ForWorld) { return NativeCall((DWORD64)this, "FTribeWar", "IsTribeWarOn", ForWorld); } - FString * GetDescriptiveString(FString * result, UWorld * ForWorld) { return NativeCall((DWORD64)this, "FTribeWar", "GetDescriptiveString", result, ForWorld); } - FString * GetWarTimeString(FString * result, int DayNumber, float DayTime) { return NativeCall((DWORD64)this, "FTribeWar", "GetWarTimeString", result, DayNumber, DayTime); } -}; - -struct FTribeRankGroup -{ - FString GetRankGroupNameField() const { return GetNativeField(this, "FTribeRankGroup", "RankGroupName"); } - void SetRankGroupNameField(FString newValue) { SetNativeField(this, "FTribeRankGroup", "RankGroupName", newValue); } - char GetRankGroupRankField() const { return GetNativeField(this, "FTribeRankGroup", "RankGroupRank"); } - void SetRankGroupRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "RankGroupRank", newValue); } - char GetInventoryRankField() const { return GetNativeField(this, "FTribeRankGroup", "InventoryRank"); } - void SetInventoryRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "InventoryRank", newValue); } - char GetStructureActivationRankField() const { return GetNativeField(this, "FTribeRankGroup", "StructureActivationRank"); } - void SetStructureActivationRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "StructureActivationRank", newValue); } - char GetNewStructureActivationRankField() const { return GetNativeField(this, "FTribeRankGroup", "NewStructureActivationRank"); } - void SetNewStructureActivationRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "NewStructureActivationRank", newValue); } - char GetNewStructureInventoryRankField() const { return GetNativeField(this, "FTribeRankGroup", "NewStructureInventoryRank"); } - void SetNewStructureInventoryRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "NewStructureInventoryRank", newValue); } - char GetPetOrderRankField() const { return GetNativeField(this, "FTribeRankGroup", "PetOrderRank"); } - void SetPetOrderRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "PetOrderRank", newValue); } - char GetPetRidingRankField() const { return GetNativeField(this, "FTribeRankGroup", "PetRidingRank"); } - void SetPetRidingRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "PetRidingRank", newValue); } - char GetInviteToGroupRankField() const { return GetNativeField(this, "FTribeRankGroup", "InviteToGroupRank"); } - void SetInviteToGroupRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "InviteToGroupRank", newValue); } - char GetMaxPromotionGroupRankField() const { return GetNativeField(this, "FTribeRankGroup", "MaxPromotionGroupRank"); } - void SetMaxPromotionGroupRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "MaxPromotionGroupRank", newValue); } - char GetMaxDemotionGroupRankField() const { return GetNativeField(this, "FTribeRankGroup", "MaxDemotionGroupRank"); } - void SetMaxDemotionGroupRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "MaxDemotionGroupRank", newValue); } - char GetMaxBanishmentGroupRankField() const { return GetNativeField(this, "FTribeRankGroup", "MaxBanishmentGroupRank"); } - void SetMaxBanishmentGroupRankField(char newValue) { SetNativeField(this, "FTribeRankGroup", "MaxBanishmentGroupRank", newValue); } - char GetNumInvitesRemainingField() const { return GetNativeField(this, "FTribeRankGroup", "NumInvitesRemaining"); } - void SetNumInvitesRemainingField(char newValue) { SetNativeField(this, "FTribeRankGroup", "NumInvitesRemaining", newValue); } - - // Functions - - void ValidateSettings() { NativeCall((DWORD64)this, "FTribeRankGroup", "ValidateSettings"); } -}; - -struct FTribeAlliance -{ - FString GetAllianceNameField() const { return GetNativeField(this, "FTribeAlliance", "AllianceName"); } - void SetAllianceNameField(FString newValue) { SetNativeField(this, "FTribeAlliance", "AllianceName", newValue); } - unsigned int GetAllianceIDField() const { return GetNativeField(this, "FTribeAlliance", "AllianceID"); } - void SetAllianceIDField(unsigned int newValue) { SetNativeField(this, "FTribeAlliance", "AllianceID", newValue); } - TArray GetMembersTribeNameField() const { return GetNativeField>(this, "FTribeAlliance", "MembersTribeName"); } - TArray GetMembersTribeIDField() const { return GetNativeField>(this, "FTribeAlliance", "MembersTribeID"); } - TArray GetAdminsTribeIDField() const { return GetNativeField>(this, "FTribeAlliance", "AdminsTribeID"); } -}; - -struct FTribeGovernment -{ - int GetTribeGovern_PINCodeField() const { return GetNativeField(this, "FTribeGovernment", "TribeGovern_PINCode"); } - void SetTribeGovern_PINCodeField(int newValue) { SetNativeField(this, "FTribeGovernment", "TribeGovern_PINCode", newValue); } - int GetTribeGovern_DinoOwnershipField() const { return GetNativeField(this, "FTribeGovernment", "TribeGovern_DinoOwnership"); } - void SetTribeGovern_DinoOwnershipField(int newValue) { SetNativeField(this, "FTribeGovernment", "TribeGovern_DinoOwnership", newValue); } - int GetTribeGovern_StructureOwnershipField() const { return GetNativeField(this, "FTribeGovernment", "TribeGovern_StructureOwnership"); } - void SetTribeGovern_StructureOwnershipField(int newValue) { SetNativeField(this, "FTribeGovernment", "TribeGovern_StructureOwnership", newValue); } - int GetTribeGovern_DinoTamingField() const { return GetNativeField(this, "FTribeGovernment", "TribeGovern_DinoTaming"); } - void SetTribeGovern_DinoTamingField(int newValue) { SetNativeField(this, "FTribeGovernment", "TribeGovern_DinoTaming", newValue); } - int GetTribeGovern_DinoUnclaimAdminOnlyField() const { return GetNativeField(this, "FTribeGovernment", "TribeGovern_DinoUnclaimAdminOnly"); } - void SetTribeGovern_DinoUnclaimAdminOnlyField(int newValue) { SetNativeField(this, "FTribeGovernment", "TribeGovern_DinoUnclaimAdminOnly", newValue); } -}; \ No newline at end of file diff --git a/ArkApi/API/UE.h b/ArkApi/API/UE.h deleted file mode 100644 index 8e6313e..0000000 --- a/ArkApi/API/UE.h +++ /dev/null @@ -1,720 +0,0 @@ -#pragma once - -#include "Base.h" -#include -#include - -template -RT NativeCall(DWORD64 _this, const std::string& structure, const std::string& funcName) -{ - return static_cast(GetAddress(structure, funcName))(_this); -} - -template -RT NativeCall(DWORD64 _this, const std::string& structure, const std::string& funcName, Args&&... args) -{ - return static_cast(GetAddress(structure, funcName))(_this, std::forward(args)...); -} - -template -RT NativeCall(std::nullptr_t, const std::string& structure, const std::string& funcName, Args&&... args) -{ - return static_cast(GetAddress(structure, funcName))(std::forward(args)...); -} - -template -RT GetNativeField(const void* _this, const std::string& structure, const std::string& fieldName) -{ - return *reinterpret_cast(GetAddress(_this, structure, fieldName)); -} - -template -RT GetNativePointerField(const void* _this, const std::string& structure, const std::string& fieldName) -{ - return reinterpret_cast(GetAddress(_this, structure, fieldName)); -} - -template -void SetNativeField(LPVOID _this, const std::string& structure, const std::string& fieldName, T newValue) -{ - *reinterpret_cast(GetAddress(_this, structure, fieldName)) = newValue; -} - -// Base types - -#pragma warning (push) -#pragma warning (disable: 4267) - -template -struct TArray -{ -protected: - T* Data; - uint32_t Count; - uint32_t Max; - -public: - TArray() - { - Data = nullptr; - Count = Max = 0; - }; - - uint32_t Num() const - { - return this->Count; - }; - - T& operator()(int i) - { - return this->Data[i]; - }; - - const T& operator()(int i) const - { - return this->Data[i]; - }; - - T& operator [](int i) - { - return this->Data[i]; - } - - T operator [](int i) const - { - return this->Data[i]; - } - - bool Add(T InputData) - { - T* tmp = reinterpret_cast(realloc(Data, sizeof(T) * (Count + 1))); - if (tmp == nullptr) - return false; - - Data = tmp; - - Data[Count++] = InputData; - Max = Count; - - return true; - }; - - FORCEINLINE bool IsValidIndex(uint32_t Index) const - { - return Index >= 0 && Index < Count; - } - - void Clear() - { - free(Data); - Count = Max = 0; - }; -}; - -struct FString : TArray -{ - FString() - { - } - - FString(wchar_t* Other) - { - this->Max = this->Count = *Other ? (wcslen(Other) + 1) : 0; - - if (this->Count) - this->Data = Other; - } - - FString(std::wstring& Other) - { - this->Max = this->Count = Other.size() > 0 ? (Other.size() + 1) : 0; - - if (this->Count) - this->Data = &Other[0]; - } - - ~FString() - { - } - - FString operator =(wchar_t* Other) - { - if (this->Data != Other) - { - this->Max = this->Count = *Other ? (wcslen(Other) + 1) : 0; - - if (this->Count) - this->Data = Other; - } - - return *this; - } - - bool operator ==(const FString& rhs) const - { - return this->Data == rhs.Data; - } - - std::string ToString() const - { - if (!Data) - return ""; - - auto length = std::wcslen(Data); - std::string str(length, '\0'); - std::use_facet>(std::locale()).narrow(Data, Data + length, '?', &str[0]); - - return str; - } - - FORCEINLINE const TCHAR* operator*() const - { - return Num() ? this->Data : TEXT(""); - } - - static FORCEINLINE FString FromInt(int Num) - { - FString Ret; - Ret.AppendInt(Num); - return Ret; - } - - bool Split(FString* InS, FString* LeftS, FString* RightS, ESearchCase::Type SearchCase, ESearchDir::Type SearchDir) const { return NativeCall((DWORD64)this, "FString", "Split", InS, LeftS, RightS, SearchCase, SearchDir); } - void TrimToNullTerminator() const { NativeCall((DWORD64)this, "FString", "TrimToNullTerminator"); } - int Find(const wchar_t* SubStr, ESearchCase::Type SearchCase, ESearchDir::Type SearchDir, int StartPosition) const { return NativeCall((DWORD64)this, "FString", "Find", SubStr, SearchCase, SearchDir, StartPosition); } - FString* ToUpper(FString* result) const { return NativeCall((DWORD64)this, "FString", "ToUpper", result); } - FString* ToLower(FString* result) const { return NativeCall((DWORD64)this, "FString", "ToLower", result); } - bool StartsWith(const FString& InPrefix, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "StartsWith", InPrefix, SearchCase); } - bool EndsWith(FString* InSuffix, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "EndsWith", InSuffix, SearchCase); } - bool RemoveFromEnd(FString* InSuffix, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "RemoveFromEnd", InSuffix, SearchCase); } - FString* Trim(FString* result) const { return NativeCall((DWORD64)this, "FString", "Trim", result); } - FString* TrimTrailing(FString* result) const { return NativeCall((DWORD64)this, "FString", "TrimTrailing", result); } - FString* TrimQuotes(FString* result, bool* bQuotesRemoved) const { return NativeCall((DWORD64)this, "FString", "TrimQuotes", result, bQuotesRemoved); } - static FString* FormatAsNumber(FString* result, int InNumber) { return NativeCall(nullptr, "FString", "FormatAsNumber", result, InNumber); } - void AppendInt(int InNum) const { NativeCall((DWORD64)this, "FString", "AppendInt", InNum); } - static FString* FromBlob(FString* result, const char* SrcBuffer, const unsigned int SrcSize) { return NativeCall(nullptr, "FString", "FromBlob", result, SrcBuffer, SrcSize); } - static bool ToBlob(FString* Source, char* DestBuffer, const unsigned int DestSize) { return NativeCall(nullptr, "FString", "ToBlob", Source, DestBuffer, DestSize); } - static FString* Chr(FString* result, wchar_t Ch) { return NativeCall(nullptr, "FString", "Chr", result, Ch); } - FString* LeftPad(FString* result, int ChCount) const { return NativeCall((DWORD64)this, "FString", "LeftPad", result, ChCount); } - FString* RightPad(FString* result, int ChCount) const { return NativeCall((DWORD64)this, "FString", "RightPad", result, ChCount); } - bool IsNumeric() const { return NativeCall((DWORD64)this, "FString", "IsNumeric"); } - int ParseIntoArray(TArray* InArray, const wchar_t* pchDelim, bool InCullEmpty) const { return NativeCall *, const wchar_t *, bool>((DWORD64)this, "FString", "ParseIntoArray", InArray, pchDelim, InCullEmpty); } - bool MatchesWildcard(FString* InWildcard, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "MatchesWildcard", InWildcard, SearchCase); } - FString* Replace(FString* result, const wchar_t* From, const wchar_t* To, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "Replace", result, From, To, SearchCase); } - int ReplaceInline(const wchar_t* SearchText, const wchar_t* ReplacementText, ESearchCase::Type SearchCase) const { return NativeCall((DWORD64)this, "FString", "ReplaceInline", SearchText, ReplacementText, SearchCase); } - FString* ReplaceQuotesWithEscapedQuotes(FString* result) const { return NativeCall((DWORD64)this, "FString", "ReplaceQuotesWithEscapedQuotes", result); } - FString* ReplaceEscapedCharWithChar(FString* result, TArray* Chars) const { return NativeCall *>((DWORD64)this, "FString", "ReplaceEscapedCharWithChar", result, Chars); } - FString* Append(const wchar_t* Text, int Count) const { return NativeCall((DWORD64)this, "FString", "Append", Text, Count); } -}; - -#pragma warning (pop) - -struct FVector -{ - float X; - float Y; - float Z; - - FORCEINLINE FString ToString() const - { - wchar_t buffer[256]; - swprintf_s(buffer, TEXT("X=%3.3f Y=%3.3f Z=%3.3f"), X, Y, Z); - - return FString(buffer); - } -}; - -struct FRotator -{ - float Pitch; - float Yaw; - float Roll; -}; - -struct FVector2D -{ - float X; - float Y; -}; - -struct FName -{ - int ComparisonIndex; - unsigned int Number; - - // Functions - - FName() : ComparisonIndex(0), Number(0) - { - } - - //static TStaticIndirectArrayThreadSafeRead * GetNames() { return NativeCall *>(nullptr, "FName", "GetNames"); } - static FString* NameToDisplayString(FString* result, FString* InDisplayName, const bool bIsBool) { return NativeCall(nullptr, "FName", "NameToDisplayString", result, InDisplayName, bIsBool); } - FName(const wchar_t* Name, EFindName FindType, bool __formal) { NativeCall((DWORD64)this, "FName", "FName", Name, FindType, __formal); } - bool operator==(const wchar_t* Other) { return NativeCall((DWORD64)this, "FName", "operator==", Other); } - int Compare(FName* Other) { return NativeCall((DWORD64)this, "FName", "Compare", Other); } - void Init(const wchar_t* InName, int InNumber, EFindName FindType, bool bSplitName, int HardcodeIndex) { NativeCall((DWORD64)this, "FName", "Init", InName, InNumber, FindType, bSplitName, HardcodeIndex); } - void ToString(FString* Out) { NativeCall((DWORD64)this, "FName", "ToString", Out); } - void AppendString(FString* Out) { NativeCall((DWORD64)this, "FName", "AppendString", Out); } - static bool SplitNameWithCheck(const wchar_t* OldName, wchar_t* NewName, int NewNameLen, int* NewNumber) { return NativeCall(nullptr, "FName", "SplitNameWithCheck", OldName, NewName, NewNameLen, NewNumber); } - bool IsValidXName() { return NativeCall((DWORD64)this, "FName", "IsValidXName"); } - void Init(const char* InName, int InNumber, EFindName FindType, bool bSplitName, int HardcodeIndex) { NativeCall((DWORD64)this, "FName", "Init", InName, InNumber, FindType, bSplitName, HardcodeIndex); } -}; - -struct FTransform -{ - __m128 Rotation; - __m128 Translation; - __m128 Scale3D; -}; - -template -class TEnumAsByte -{ -public: - TEnumAsByte(TEnum _value) - : value(static_cast(_value)) - { - } - - explicit TEnumAsByte(int32_t _value) - : value(static_cast(_value)) - { - } - - explicit TEnumAsByte(uint8_t _value) - : value(_value) - { - } - - operator TEnum() const - { - return static_cast(value); - } - - TEnum GetValue() const - { - return static_cast(value); - } - -private: - uint8_t value; -}; - -struct FBoxSphereBounds -{ -}; - -struct FGuid -{ - uint32_t A; - uint32_t B; - uint32_t C; - uint32_t D; -}; - -struct UFunction -{ -}; - -struct FBox -{ -}; - -struct FLinearColor -{ - float R, - G, - B, - A; -}; - -template -struct TSharedPtr -{ - ObjectType* Object; - short int SharedReferenceCount; - - FORCEINLINE ObjectType& operator*() const - { - return *Object; - } - - FORCEINLINE ObjectType* operator->() const - { - return Object; - } -}; - -struct __declspec(align(8)) FTextHistory -{ - void* vfptr; - int Revision; -}; - -struct FText -{ - TSharedPtr History; - int Flags; - TSharedPtr DisplayString; - - // Functions - - FText* GetEmpty() { return NativeCall((DWORD64)this, "FText", "GetEmpty"); } - int CompareTo(FText* Other, ETextComparisonLevel::Type ComparisonLevel) { return NativeCall((DWORD64)this, "FText", "CompareTo", Other, ComparisonLevel); } - static FText* TrimPreceding(FText* result, FText* InText) { return NativeCall(nullptr, "FText", "TrimPreceding", result, InText); } - static FText* TrimTrailing(FText* result, FText* InText) { return NativeCall(nullptr, "FText", "TrimTrailing", result, InText); } - static FText* TrimPrecedingAndTrailing(FText* result, FText* InText) { return NativeCall(nullptr, "FText", "TrimPrecedingAndTrailing", result, InText); } - static bool FindText(FString* Namespace, FString* Key, FText* OutText, FString*const SourceString) { return NativeCall(nullptr, "FText", "FindText", Namespace, Key, OutText, SourceString); } - FText* CreateChronologicalText() { return NativeCall((DWORD64)this, "FText", "CreateChronologicalText"); } - static FText* FromName(FText* result, FName* Val) { return NativeCall(nullptr, "FText", "FromName", result, Val); } - static FText* FromString() { return NativeCall(nullptr, "FText", "FromString"); } - FString* ToString() { return NativeCall((DWORD64)this, "FText", "ToString"); } - bool ShouldGatherForLocalization() { return NativeCall((DWORD64)this, "FText", "ShouldGatherForLocalization"); } - TSharedPtr* GetSourceString(TSharedPtr* result) { return NativeCall *, TSharedPtr *>((DWORD64)this, "FText", "GetSourceString", result); } -}; - -struct FColor -{ - union - { - struct - { - unsigned __int8 B, G, R, A; - }; - - unsigned __int32 AlignmentDummy; - }; -}; - -struct FIntVector -{ -}; - -struct FDateTime -{ -}; - -template -struct TWeakObjectPtr -{ - int ObjectIndex; - int ObjectSerialNumber; - - FORCEINLINE T& operator*() const - { - return *Get(); - } - - FORCEINLINE T* operator->() const - { - return Get(); - } - - T* Get(bool bEvenIfPendingKill = false) const { return NativeCall((DWORD64)this, "FWeakObjectPtr", "Get", bEvenIfPendingKill); } -}; - -template -struct TSubclassOf -{ - UClass* uClass; -}; - -struct FUniqueNetId -{ -public: - unsigned __int64 GetUniqueNetIdField() const { return GetNativeField(this, "FUniqueNetIdSteam", "UniqueNetId"); } - - // Functions - - int GetSize() { return NativeCall((DWORD64)this, "FUniqueNetIdSteam", "GetSize"); } - FString* ToString(FString* result) { return NativeCall((DWORD64)this, "FUniqueNetIdSteam", "ToString", result); } - bool IsValid() { return NativeCall((DWORD64)this, "FUniqueNetIdSteam", "IsValid"); } - FString* ToDebugString(FString* result) { return NativeCall((DWORD64)this, "FUniqueNetIdSteam", "ToDebugString", result); } -}; - -struct UObjectBase -{ -public: - int GetInternalIndexField() const { return GetNativeField(this, "UObjectBase", "InternalIndex"); } - UClass* GetClassField() const { return GetNativeField(this, "UObjectBase", "Class"); } - FName GetNameField() const { return GetNativeField(this, "UObjectBase", "Name"); } - UObject* GetOuterField() const { return GetNativeField(this, "UObjectBase", "Outer"); } -}; - -struct UObjectBaseUtility : public UObjectBase -{ -public: - int GetLinkerUE4Version() { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetLinkerUE4Version"); } - int GetLinkerLicenseeUE4Version() { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetLinkerLicenseeUE4Version"); } - FString* GetPathName(FString* result, UObject* StopOuter) { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetPathName", result, StopOuter); } - void GetPathName(UObject* StopOuter, FString* ResultString) { NativeCall((DWORD64)this, "UObjectBaseUtility", "GetPathName", StopOuter, ResultString); } - FString* GetFullName(FString* result, UObject* StopOuter) { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetFullName", result, StopOuter); } - void MarkPackageDirty() { NativeCall((DWORD64)this, "UObjectBaseUtility", "MarkPackageDirty"); } - bool IsIn(UObject* SomeOuter) { return NativeCall((DWORD64)this, "UObjectBaseUtility", "IsIn", SomeOuter); } - bool IsA(UClass* SomeBase) { return NativeCall((DWORD64)this, "UObjectBaseUtility", "IsA", SomeBase); } - void* GetInterfaceAddress(UClass* InterfaceClass) { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetInterfaceAddress", InterfaceClass); } - bool IsDefaultSubobject() { return NativeCall((DWORD64)this, "UObjectBaseUtility", "IsDefaultSubobject"); } - int GetLinkerIndex() { return NativeCall((DWORD64)this, "UObjectBaseUtility", "GetLinkerIndex"); } -}; - -struct UObject : UObjectBaseUtility -{ - static UClass* StaticClass() { return NativeCall(nullptr, "UObject", "StaticClass"); } - void ExecuteUbergraph(int EntryPoint) { NativeCall((DWORD64)this, "UObject", "ExecuteUbergraph", EntryPoint); } - bool AreAllOuterObjectsValid() { return NativeCall((DWORD64)this, "UObject", "AreAllOuterObjectsValid"); } - FName* GetExporterName(FName* result) { return NativeCall((DWORD64)this, "UObject", "GetExporterName", result); } - FString* GetDetailedInfoInternal(FString* result) { return NativeCall((DWORD64)this, "UObject", "GetDetailedInfoInternal", result); } - UObject* GetArchetype() { return NativeCall((DWORD64)this, "UObject", "GetArchetype"); } - bool IsBasedOnArchetype(UObject*const SomeObject) { return NativeCall((DWORD64)this, "UObject", "IsBasedOnArchetype", SomeObject); } - bool IsInBlueprint() { return NativeCall((DWORD64)this, "UObject", "IsInBlueprint"); } - bool Rename(const wchar_t* InName, UObject* NewOuter, unsigned int Flags) { return NativeCall((DWORD64)this, "UObject", "Rename", InName, NewOuter, Flags); } - void LoadLocalized(UObject* LocBase, bool bLoadHierachecally) { NativeCall((DWORD64)this, "UObject", "LoadLocalized", LocBase, bLoadHierachecally); } - void BeginDestroy() { NativeCall((DWORD64)this, "UObject", "BeginDestroy"); } - void FinishDestroy() { NativeCall((DWORD64)this, "UObject", "FinishDestroy"); } - FString* GetDetailedInfo(FString* result) { return NativeCall((DWORD64)this, "UObject", "GetDetailedInfo", result); } - void ConditionalPostLoad() { NativeCall((DWORD64)this, "UObject", "ConditionalPostLoad"); } - bool Modify(bool bAlwaysMarkDirty) { return NativeCall((DWORD64)this, "UObject", "Modify", bAlwaysMarkDirty); } - bool IsSelected() { return NativeCall((DWORD64)this, "UObject", "IsSelected"); } - bool CheckDefaultSubobjectsInternal() { return NativeCall((DWORD64)this, "UObject", "CheckDefaultSubobjectsInternal"); } - bool IsAsset() { return NativeCall((DWORD64)this, "UObject", "IsAsset"); } - bool IsSafeForRootSet() { return NativeCall((DWORD64)this, "UObject", "IsSafeForRootSet"); } - void ConditionalShutdownAfterError() { NativeCall((DWORD64)this, "UObject", "ConditionalShutdownAfterError"); } - bool IsNameStableForNetworking() { return NativeCall((DWORD64)this, "UObject", "IsNameStableForNetworking"); } - bool IsFullNameStableForNetworking() { return NativeCall((DWORD64)this, "UObject", "IsFullNameStableForNetworking"); } - bool IsSupportedForNetworking() { return NativeCall((DWORD64)this, "UObject", "IsSupportedForNetworking"); } - //void CallFunction(FFrame * Stack, void *const Result, UFunction * Function) { NativeCall((DWORD64)this, "UObject", "CallFunction", Stack, Result, Function); } - //bool CallFunctionByNameWithArguments(const wchar_t * Str, FOutputDevice * Ar, UObject * Executor, bool bForceCallWithNonExec) { return NativeCall((DWORD64)this, "UObject", "CallFunctionByNameWithArguments", Str, Ar, Executor, bForceCallWithNonExec); } - UFunction* FindFunctionChecked(FName InName) { return NativeCall((DWORD64)this, "UObject", "FindFunctionChecked", InName); } - void ProcessEvent(UFunction* Function, void* Parms) { NativeCall((DWORD64)this, "UObject", "ProcessEvent", Function, Parms); } -}; - -struct UField : UObject -{ - UField* GetNextField() const { return GetNativeField(this, "UField", "Next"); } - - // Functions - - UClass* GetOwnerClass() { return NativeCall((DWORD64)this, "UField", "GetOwnerClass"); } - UStruct* GetOwnerStruct() { return NativeCall((DWORD64)this, "UField", "GetOwnerStruct"); } - void PostLoad() { NativeCall((DWORD64)this, "UField", "PostLoad"); } - void AddCppProperty(UProperty* Property) { NativeCall((DWORD64)this, "UField", "AddCppProperty", Property); } -}; - -struct UStruct : UField -{ - UStruct* GetSuperStructField() const { return GetNativeField(this, "UStruct", "SuperStruct"); } - UField* GetChildrenField() const { return GetNativeField(this, "UStruct", "Children"); } - int GetPropertiesSizeField() const { return GetNativeField(this, "UStruct", "PropertiesSize"); } - TArray GetScriptField() const { return GetNativeField>(this, "UStruct", "Script"); } - int GetMinAlignmentField() const { return GetNativeField(this, "UStruct", "MinAlignment"); } - void SetMinAlignmentField(int newValue) { SetNativeField(this, "UStruct", "MinAlignment", newValue); } - UProperty* GetPropertyLinkField() const { return GetNativeField(this, "UStruct", "PropertyLink"); } - UProperty* GetRefLinkField() const { return GetNativeField(this, "UStruct", "RefLink"); } - UProperty* GetDestructorLinkField() const { return GetNativeField(this, "UStruct", "DestructorLink"); } - UProperty* GetPostConstructLinkField() const { return GetNativeField(this, "UStruct", "PostConstructLink"); } - TArray GetScriptObjectReferencesField() const { return GetNativeField>(this, "UStruct", "ScriptObjectReferences"); } - - // Functions - - bool IsChildOf(UStruct* SomeBase) { return NativeCall((DWORD64)this, "UStruct", "IsChildOf", SomeBase); } - static UField* StaticClass() { return NativeCall(nullptr, "UStruct", "StaticClass"); } - void LinkChild(UProperty* Property) { NativeCall((DWORD64)this, "UStruct", "LinkChild", Property); } - const wchar_t* GetPrefixCPP() { return NativeCall((DWORD64)this, "UStruct", "GetPrefixCPP"); } - void StaticLink(bool bRelinkExistingProperties) { NativeCall((DWORD64)this, "UStruct", "StaticLink", bRelinkExistingProperties); } - void FinishDestroy() { NativeCall((DWORD64)this, "UStruct", "FinishDestroy"); } - void SetSuperStruct(UStruct* NewSuperStruct) { NativeCall((DWORD64)this, "UStruct", "SetSuperStruct", NewSuperStruct); } -}; - -struct UClass : UStruct -{ -public: - unsigned int GetClassFlagsField() const { return GetNativeField(this, "UClass", "ClassFlags"); } - unsigned __int64 GetClassCastFlagsField() const { return GetNativeField(this, "UClass", "ClassCastFlags"); } - int GetClassUniqueField() const { return GetNativeField(this, "UClass", "ClassUnique"); } - UClass* GetClassWithinField() const { return GetNativeField(this, "UClass", "ClassWithin"); } - UObject* GetClassGeneratedByField() const { return GetNativeField(this, "UClass", "ClassGeneratedBy"); } - bool GetbIsGameClassField() const { return GetNativeField(this, "UClass", "bIsGameClass"); } - FName GetClassConfigNameField() const { return GetNativeField(this, "UClass", "ClassConfigName"); } - void SetClassConfigNameField(FName newValue) { SetNativeField(this, "UClass", "ClassConfigName", newValue); } - UObject* GetClassDefaultObjectField() const { return GetNativeField(this, "UClass", "ClassDefaultObject"); } - bool GetbCookedField() const { return GetNativeField(this, "UClass", "bCooked"); } - - // Functions - - UObject* GetDefaultObject(bool bCreateIfNeeded) { return NativeCall((DWORD64)this, "UClass", "GetDefaultObject", bCreateIfNeeded); } - void PostInitProperties() { NativeCall((DWORD64)this, "UClass", "PostInitProperties"); } - UObject* GetDefaultSubobjectByName(FName ToFind) { return NativeCall((DWORD64)this, "UClass", "GetDefaultSubobjectByName", ToFind); } - UObject* CreateDefaultObject() { return NativeCall((DWORD64)this, "UClass", "CreateDefaultObject"); } - FName* GetDefaultObjectName(FName* result) { return NativeCall((DWORD64)this, "UClass", "GetDefaultObjectName", result); } - void DeferredRegister(UClass* UClassStaticClass, const wchar_t* PackageName, const wchar_t* Name) { NativeCall((DWORD64)this, "UClass", "DeferredRegister", UClassStaticClass, PackageName, Name); } - bool Rename(const wchar_t* InName, UObject* NewOuter, unsigned int Flags) { return NativeCall((DWORD64)this, "UClass", "Rename", InName, NewOuter, Flags); } - void Bind() { NativeCall((DWORD64)this, "UClass", "Bind"); } - const wchar_t* GetPrefixCPP() { return NativeCall((DWORD64)this, "UClass", "GetPrefixCPP"); } - FString* GetDescription(FString* result) { return NativeCall((DWORD64)this, "UClass", "GetDescription", result); } - void FinishDestroy() { NativeCall((DWORD64)this, "UClass", "FinishDestroy"); } - void PostLoad() { NativeCall((DWORD64)this, "UClass", "PostLoad"); } - bool ImplementsInterface(UClass* SomeInterface) { return NativeCall((DWORD64)this, "UClass", "ImplementsInterface", SomeInterface); } - void PurgeClass(bool bRecompilingOnLoad) { NativeCall((DWORD64)this, "UClass", "PurgeClass", bRecompilingOnLoad); } - bool HasProperty(UProperty* InProperty) { return NativeCall((DWORD64)this, "UClass", "HasProperty", InProperty); } - FString* GetConfigName(FString* result) { return NativeCall((DWORD64)this, "UClass", "GetConfigName", result); } - unsigned int EmitStructArrayBegin(int Offset, FName* DebugName, int Stride) { return NativeCall((DWORD64)this, "UClass", "EmitStructArrayBegin", Offset, DebugName, Stride); } - void AssembleReferenceTokenStream() { NativeCall((DWORD64)this, "UClass", "AssembleReferenceTokenStream"); } -}; - -struct UBlueprintCore : UObject -{ - TSubclassOf GetSkeletonGeneratedClassField() const { return GetNativeField>(this, "UBlueprintCore", "SkeletonGeneratedClass"); } - TSubclassOf GetGeneratedClassField() const { return GetNativeField>(this, "UBlueprintCore", "GeneratedClass"); } - bool GetbLegacyNeedToPurgeSkelRefsField() const { return GetNativeField(this, "UBlueprintCore", "bLegacyNeedToPurgeSkelRefs"); } - bool GetbLegacyGeneratedClassIsAuthoritativeField() const { return GetNativeField(this, "UBlueprintCore", "bLegacyGeneratedClassIsAuthoritative"); } - FGuid GetBlueprintGuidField() const { return GetNativeField(this, "UBlueprintCore", "BlueprintGuid"); } -}; - -struct UBlueprint : UBlueprintCore -{ - TSubclassOf GetParentClassField() const { return GetNativeField>(this, "UBlueprint", "ParentClass"); } - TEnumAsByte GetBlueprintTypeField() const { return GetNativeField>(this, "UBlueprint", "BlueprintType"); } - int GetBlueprintSystemVersionField() const { return GetNativeField(this, "UBlueprint", "BlueprintSystemVersion"); } - - // Functions - - FString* GetDesc(FString* result) { return NativeCall((DWORD64)this, "UBlueprint", "GetDesc", result); } - bool NeedsLoadForClient() { return NativeCall((DWORD64)this, "UBlueprint", "NeedsLoadForClient"); } - bool NeedsLoadForServer() { return NativeCall((DWORD64)this, "UBlueprint", "NeedsLoadForServer"); } -}; - -struct UProperty : UField -{ - int GetArrayDimField() const { return GetNativeField(this, "UProperty", "ArrayDim"); } - void SetArrayDimField(int newValue) { SetNativeField(this, "UProperty", "ArrayDim", newValue); } - int GetElementSizeField() const { return GetNativeField(this, "UProperty", "ElementSize"); } - void SetElementSizeField(int newValue) { SetNativeField(this, "UProperty", "ElementSize", newValue); } - unsigned __int64 GetPropertyFlagsField() const { return GetNativeField(this, "UProperty", "PropertyFlags"); } - void SetPropertyFlagsField(unsigned __int64 newValue) { SetNativeField(this, "UProperty", "PropertyFlags", newValue); } - unsigned __int16 GetRepIndexField() const { return GetNativeField(this, "UProperty", "RepIndex"); } - void SetRepIndexField(unsigned __int16 newValue) { SetNativeField(this, "UProperty", "RepIndex", newValue); } - FName GetRepNotifyFuncField() const { return GetNativeField(this, "UProperty", "RepNotifyFunc"); } - void SetRepNotifyFuncField(FName newValue) { SetNativeField(this, "UProperty", "RepNotifyFunc", newValue); } - int GetOffset_InternalField() const { return GetNativeField(this, "UProperty", "Offset_Internal"); } - void SetOffset_InternalField(int newValue) { SetNativeField(this, "UProperty", "Offset_Internal", newValue); } - UProperty* GetPropertyLinkNextField() const { return GetNativeField(this, "UProperty", "PropertyLinkNext"); } - UProperty* GetNextRefField() const { return GetNativeField(this, "UProperty", "NextRef"); } - UProperty* GetDestructorLinkNextField() const { return GetNativeField(this, "UProperty", "DestructorLinkNext"); } - UProperty* GetPostConstructLinkNextField() const { return GetNativeField(this, "UProperty", "PostConstructLinkNext"); } - - // Functions - - bool Identical(const void* A, const void* B, unsigned int PortFlags) { return NativeCall((DWORD64)this, "UProperty", "Identical", A, B, PortFlags); } - void ExportTextItem(FString* ValueStr, const void* PropertyValue, const void* DefaultValue, UObject* Parent, int PortFlags, UObject* ExportRootScope) { NativeCall((DWORD64)this, "UProperty", "ExportTextItem", ValueStr, PropertyValue, DefaultValue, Parent, PortFlags, ExportRootScope); } - void CopySingleValueFromScriptVM(void* Dest, const void* Src) { NativeCall((DWORD64)this, "UProperty", "CopySingleValueFromScriptVM", Dest, Src); } - void CopyCompleteValueFromScriptVM(void* Dest, const void* Src) { NativeCall((DWORD64)this, "UProperty", "CopyCompleteValueFromScriptVM", Dest, Src); } - FString* GetCPPType(FString* result, FString* ExtendedTypeText, unsigned int CPPExportFlags) { return NativeCall((DWORD64)this, "UProperty", "GetCPPType", result, ExtendedTypeText, CPPExportFlags); } - bool Identical_InContainer(const void* A, const void* B, int ArrayIndex, unsigned int PortFlags) { return NativeCall((DWORD64)this, "UProperty", "Identical_InContainer", A, B, ArrayIndex, PortFlags); } - bool ShouldDuplicateValue() { return NativeCall((DWORD64)this, "UProperty", "ShouldDuplicateValue"); } - FString* GetCPPMacroType(FString* result, FString* ExtendedTypeText) { return NativeCall((DWORD64)this, "UProperty", "GetCPPMacroType", result, ExtendedTypeText); } - bool ExportText_Direct(FString* ValueStr, const void* Data, const void* Delta, UObject* Parent, int PortFlags, UObject* ExportRootScope) { return NativeCall((DWORD64)this, "UProperty", "ExportText_Direct", ValueStr, Data, Delta, Parent, PortFlags, ExportRootScope); } - bool IsLocalized() { return NativeCall((DWORD64)this, "UProperty", "IsLocalized"); } - bool ShouldPort(unsigned int PortFlags) { return NativeCall((DWORD64)this, "UProperty", "ShouldPort", PortFlags); } - FName* GetID(FName* result) { return NativeCall((DWORD64)this, "UProperty", "GetID", result); } - bool SameType(UProperty* Other) { return NativeCall((DWORD64)this, "UProperty", "SameType", Other); } -}; - -struct UNumericProperty : UProperty -{ - __int64 GetSignedIntPropertyValue(void const* Data) { return NativeCall<__int64, void const *>((DWORD64)this, "UNumericProperty", "GetSignedIntPropertyValue", Data); } -}; - -struct Globals -{ - static UObject* StaticLoadObject(UClass* ObjectClass, UObject* InOuter, const wchar_t* InName, const wchar_t* Filename, unsigned int LoadFlags, DWORD64 Sandbox, bool bAllowObjectReconciliation) { return NativeCall(nullptr, "Global", "StaticLoadObject", ObjectClass, InOuter, InName, Filename, LoadFlags, Sandbox, bAllowObjectReconciliation); } -}; - -struct FAssetData -{ - FName ObjectPath; - FName PackageName; - FName PackagePath; - FName GroupNames; - FName AssetName; - FName AssetClass; - char unk[50];// TMap > TagsAndValues; - TArray ChunkIDs; - - // Functions - - bool IsUAsset() { return NativeCall((DWORD64)this, "FAssetData", "IsUAsset"); } - void PrintAssetData() { NativeCall((DWORD64)this, "FAssetData", "PrintAssetData"); } - UObject* GetAsset() { return NativeCall((DWORD64)this, "FAssetData", "GetAsset"); } -}; - -struct IModuleInterface -{ -}; - -struct IAssetRegistryInterface : IModuleInterface -{ -}; - -struct FAssetRegistryModule : IAssetRegistryInterface -{ - FAssetRegistry* Get() { return NativeCall((DWORD64)this, "FAssetRegistryModule", "Get"); } -}; - -struct FModuleManager -{ - static FModuleManager* Get() { return NativeCall(nullptr, "FModuleManager", "Get"); } - void FindModules(const wchar_t* WildcardWithoutExtension, TArray* OutModules) { NativeCall *>((DWORD64)this, "FModuleManager", "FindModules", WildcardWithoutExtension, OutModules); } - bool IsModuleLoaded(FName InModuleName) { return NativeCall((DWORD64)this, "FModuleManager", "IsModuleLoaded", InModuleName); } - bool IsModuleUpToDate(FName InModuleName) { return NativeCall((DWORD64)this, "FModuleManager", "IsModuleUpToDate", InModuleName); } - void AddModule(FName InModuleName) { NativeCall((DWORD64)this, "FModuleManager", "AddModule", InModuleName); } - TSharedPtr* LoadModule(TSharedPtr* result, FName InModuleName, const bool bWasReloaded) { return NativeCall *, TSharedPtr *, FName, const bool>((DWORD64)this, "FModuleManager", "LoadModule", result, InModuleName, bWasReloaded); } - bool UnloadModule(FName InModuleName, bool bIsShutdown) { return NativeCall((DWORD64)this, "FModuleManager", "UnloadModule", InModuleName, bIsShutdown); } - void UnloadModulesAtShutdown() { NativeCall((DWORD64)this, "FModuleManager", "UnloadModulesAtShutdown"); } - TSharedPtr* GetModule(TSharedPtr* result, FName InModuleName) { return NativeCall *, TSharedPtr *, FName>((DWORD64)this, "FModuleManager", "GetModule", result, InModuleName); } - static FString* GetCleanModuleFilename(FString* result, FName ModuleName, bool bGameModule) { return NativeCall(nullptr, "FModuleManager", "GetCleanModuleFilename", result, ModuleName, bGameModule); } - static void GetModuleFilenameFormat(bool bGameModule, FString* OutPrefix, FString* OutSuffix) { NativeCall(nullptr, "FModuleManager", "GetModuleFilenameFormat", bGameModule, OutPrefix, OutSuffix); } - //void FindModulePaths(const wchar_t * NamePattern, TMap > * OutModulePaths) { NativeCall > *>((DWORD64)this, "FModuleManager", "FindModulePaths", NamePattern, OutModulePaths); } - //void FindModulePathsInDirectory(FString * InDirectoryName, bool bIsGameDirectory, const wchar_t * NamePattern, TMap > * OutModulePaths) { NativeCall > *>((DWORD64)this, "FModuleManager", "FindModulePathsInDirectory", InDirectoryName, bIsGameDirectory, NamePattern, OutModulePaths); } - void AddBinariesDirectory(const wchar_t* InDirectory, bool bIsGameDirectory) { NativeCall((DWORD64)this, "FModuleManager", "AddBinariesDirectory", InDirectory, bIsGameDirectory); } -}; - -struct FAssetRegistry -{ - void SearchAllAssets(bool bSynchronousSearch) { NativeCall((DWORD64)this, "FAssetRegistry", "SearchAllAssets", bSynchronousSearch); } - bool GetAssetsByPackageName(FName PackageName, TArray* OutAssetData) { return NativeCall *>((DWORD64)this, "FAssetRegistry", "GetAssetsByPackageName", PackageName, OutAssetData); } - bool GetAssetsByPath(FName PackagePath, TArray* OutAssetData, bool bRecursive) { return NativeCall *, bool>((DWORD64)this, "FAssetRegistry", "GetAssetsByPath", PackagePath, OutAssetData, bRecursive); } - bool GetAssetsByClass(FName ClassName, TArray* OutAssetData, bool bSearchSubClasses) { return NativeCall *, bool>((DWORD64)this, "FAssetRegistry", "GetAssetsByClass", ClassName, OutAssetData, bSearchSubClasses); } - FAssetData* GetAssetByObjectPath(FAssetData* result, FName ObjectPath) { return NativeCall((DWORD64)this, "FAssetRegistry", "GetAssetByObjectPath", result, ObjectPath); } - bool GetAllAssets(TArray* OutAssetData) { return NativeCall *>((DWORD64)this, "FAssetRegistry", "GetAllAssets", OutAssetData); } - bool GetDependencies(FName PackageName, TArray* OutDependencies) { return NativeCall *>((DWORD64)this, "FAssetRegistry", "GetDependencies", PackageName, OutDependencies); } - bool GetReferencers(FName PackageName, TArray* OutReferencers) { return NativeCall *>((DWORD64)this, "FAssetRegistry", "GetReferencers", PackageName, OutReferencers); } - bool GetAncestorClassNames(FName ClassName, TArray* OutAncestorClassNames) { return NativeCall *>((DWORD64)this, "FAssetRegistry", "GetAncestorClassNames", ClassName, OutAncestorClassNames); } - void GetAllCachedPaths(TArray* OutPathList) { NativeCall *>((DWORD64)this, "FAssetRegistry", "GetAllCachedPaths", OutPathList); } - void GetSubPaths(FString* InBasePath, TArray* OutPathList, bool bInRecurse) { NativeCall *, bool>((DWORD64)this, "FAssetRegistry", "GetSubPaths", InBasePath, OutPathList, bInRecurse); } - void PrioritizeAssetInstall(FAssetData* AssetData) { NativeCall((DWORD64)this, "FAssetRegistry", "PrioritizeAssetInstall", AssetData); } - bool AddPath(FString* PathToAdd) { return NativeCall((DWORD64)this, "FAssetRegistry", "AddPath", PathToAdd); } - bool RemovePath(FString* PathToRemove) { return NativeCall((DWORD64)this, "FAssetRegistry", "RemovePath", PathToRemove); } - void ScanPathsSynchronous(TArray* InPaths, bool bForceRescan) { NativeCall *, bool>((DWORD64)this, "FAssetRegistry", "ScanPathsSynchronous", InPaths, bForceRescan); } - void PrioritizeSearchPath(FString* PathToPrioritize) { NativeCall((DWORD64)this, "FAssetRegistry", "PrioritizeSearchPath", PathToPrioritize); } - void AssetCreated(UObject* NewAsset) { NativeCall((DWORD64)this, "FAssetRegistry", "AssetCreated", NewAsset); } - void AssetDeleted(UObject* DeletedAsset) { NativeCall((DWORD64)this, "FAssetRegistry", "AssetDeleted", DeletedAsset); } - void AssetRenamed(UObject* RenamedAsset, FString* OldObjectPath) { NativeCall((DWORD64)this, "FAssetRegistry", "AssetRenamed", RenamedAsset, OldObjectPath); } - bool IsLoadingAssets() { return NativeCall((DWORD64)this, "FAssetRegistry", "IsLoadingAssets"); } - void Tick(float DeltaTime) { NativeCall((DWORD64)this, "FAssetRegistry", "Tick", DeltaTime); } - bool IsUsingWorldAssets() { return NativeCall((DWORD64)this, "FAssetRegistry", "IsUsingWorldAssets"); } - void ScanPathsSynchronous_Internal(TArray* InPaths, bool bForceRescan, bool bUseCache) { NativeCall *, bool, bool>((DWORD64)this, "FAssetRegistry", "ScanPathsSynchronous_Internal", InPaths, bForceRescan, bUseCache); } - void PathDataGathered(const long double TickStartTime, TArray* PathResults) { NativeCall *>((DWORD64)this, "FAssetRegistry", "PathDataGathered", TickStartTime, PathResults); } - bool RemoveDependsNode(FName PackageName) { return NativeCall((DWORD64)this, "FAssetRegistry", "RemoveDependsNode", PackageName); } - bool RemoveAssetPath(FString* PathToRemove, bool bEvenIfAssetsStillExist) { return NativeCall((DWORD64)this, "FAssetRegistry", "RemoveAssetPath", PathToRemove, bEvenIfAssetsStillExist); } - FString* ExportTextPathToObjectName(FString* result, FString* InExportTextPath) { return NativeCall((DWORD64)this, "FAssetRegistry", "ExportTextPathToObjectName", result, InExportTextPath); } - void AddAssetData(FAssetData* AssetData) { NativeCall((DWORD64)this, "FAssetRegistry", "AddAssetData", AssetData); } - bool RemoveAssetData(FAssetData* AssetData) { return NativeCall((DWORD64)this, "FAssetRegistry", "RemoveAssetData", AssetData); } - void OnContentPathMounted(FString* InAssetPath, FString* FileSystemPath) { NativeCall((DWORD64)this, "FAssetRegistry", "OnContentPathMounted", InAssetPath, FileSystemPath); } - void OnContentPathDismounted(FString* InAssetPath, FString* FileSystemPath) { NativeCall((DWORD64)this, "FAssetRegistry", "OnContentPathDismounted", InAssetPath, FileSystemPath); } -}; - -struct UTexture2D -{ - static UClass* StaticClass() { return NativeCall(nullptr, "UTexture2D", "StaticClass"); } -}; diff --git a/ArkApi/ApiUtils.cpp b/ArkApi/ApiUtils.cpp deleted file mode 100644 index 95dafa5..0000000 --- a/ArkApi/ApiUtils.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "stdafx.h" -#include "ApiUtils.h" -#include "API/Base.h" - -namespace ApiUtils -{ - namespace - { - // Game objects - - UWorld* uWorld; - AShooterGameMode* aShooterGameMode; - } - - // UWorld - - void SetWorld(UWorld* aUworld) - { - uWorld = aUworld; - } - - UWorld* GetWorld() - { - return uWorld; - } - - // AShooterGameMode - - void SetGameMode(AShooterGameMode* _aShooterGameMode) - { - aShooterGameMode = _aShooterGameMode; - } - - AShooterGameMode* GetGameMode() - { - return aShooterGameMode; - } -} diff --git a/ArkApi/ApiUtils.h b/ArkApi/ApiUtils.h deleted file mode 100644 index fd30f35..0000000 --- a/ArkApi/ApiUtils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef H_ApiUtils -#define H_ApiUtils - -#include "API/Base.h" - -namespace ApiUtils -{ - // Set and Get UWorld - - void SetWorld(UWorld* aUworld); - UWorld* GetWorld(); - - // Set and Get AShooterGameMode - - void SetGameMode(AShooterGameMode* aShooterGameMode); - AShooterGameMode* GetGameMode(); -} - -#endif diff --git a/ArkApi/ArkApi.cpp b/ArkApi/ArkApi.cpp deleted file mode 100644 index 295ca76..0000000 --- a/ArkApi/ArkApi.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "stdafx.h" -#include "MinHook.h" -#include "JsonUtils.h" -#include "Hooks.h" -#include "UpdateManager.h" - -#include - -#pragma comment(lib, "libMinHook-x64-v140-md.lib") - -namespace fs = std::experimental::filesystem; - -void LoadAllPlugins(); - -void Init() -{ - if (MH_Initialize() != MH_OK) - { - std::cerr << "Can't initialize MinHook\n"; - throw std::runtime_error("Can't initialize MinHook"); - } - - UpdateManager::Update(); - JsonUtils::Init(); - Hooks::Init(); - - LoadAllPlugins(); -} - -void LoadAllPlugins() -{ - std::string dirPath = JsonUtils::GetCurrentDir(); - - for (auto& dirName : fs::directory_iterator(dirPath + "/BeyondApi/Plugins")) - { - auto path = dirName.path(); - auto fileName = path.filename(); - - std::string fullFileName = path.generic_string() + "/" + fileName.generic_string() + ".dll"; - - if (fs::exists(fullFileName)) - { - HINSTANCE hInstDll = LoadLibraryA(fullFileName.c_str()); - if (!hInstDll) - { - std::cerr << "Failed to load plugin - " << fileName << std::endl << "Error code: " << GetLastError() << std::endl; - continue; - } - - std::cout << "Loaded plugin - " << fileName << std::endl; - } - } - - std::cout << std::endl << "Loaded all plugins" << std::endl; -} - -BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hModule); - Init(); - break; - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} diff --git a/ArkApi/ArkApi.vcxproj b/ArkApi/ArkApi.vcxproj deleted file mode 100644 index 3d87bc4..0000000 --- a/ArkApi/ArkApi.vcxproj +++ /dev/null @@ -1,185 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {4E607BF7-3883-4BB7-9922-4FDED2B99A47} - Win32Proj - ArkApi - 10.0.15063.0 - - - - DynamicLibrary - true - v141 - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - - - DynamicLibrary - true - v141 - Unicode - - - DynamicLibrary - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - D:\Projects;$(LibraryPath) - - - - Use - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;ARKAPI_EXPORTS;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - Use - Level3 - Disabled - _DEBUG;_WINDOWS;_USRDLL;ARKAPI_EXPORTS;%(PreprocessorDefinitions) - true - - - Windows - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;ARKAPI_EXPORTS;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - - - Level3 - Use - MaxSpeed - true - true - NDEBUG;_WINDOWS;_USRDLL;ARKAPI_EXPORTS;ARK_EXPORTS;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - \ No newline at end of file diff --git a/ArkApi/ArkApi.vcxproj.filters b/ArkApi/ArkApi.vcxproj.filters deleted file mode 100644 index f8e60e5..0000000 --- a/ArkApi/ArkApi.vcxproj.filters +++ /dev/null @@ -1,108 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {cac0ae8a-4dbb-4bdd-ae74-bd2b763b1751} - - - - - Headers - - - Headers - - - Headers - - - Headers - - - Headers - - - Headers - - - Headers - - - Headers - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - Headers\API - - - - - Source - - - Source - - - Source - - - Source - - - Source - - - Source - - - Source - - - Headers\API - - - Headers\API - - - \ No newline at end of file diff --git a/ArkApi/ArkApi.vcxproj.user b/ArkApi/ArkApi.vcxproj.user deleted file mode 100644 index abe8dd8..0000000 --- a/ArkApi/ArkApi.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ArkApi/Commands.cpp b/ArkApi/Commands.cpp deleted file mode 100644 index ec3468b..0000000 --- a/ArkApi/Commands.cpp +++ /dev/null @@ -1,142 +0,0 @@ -#include "stdafx.h" -#include "Commands.h" -#include "API/Base.h" -#include -#include - -namespace Commands -{ - namespace - { - // Commands containers - - std::vector chatCommands; - std::vector consoleCommands; - std::vector rconCommands; - std::vector> onTickCallbacks; - std::vector> onTimerCallbacks; - } - - // Add commands - - void AddChatCommand(const FString& command, const std::function& callback) - { - ChatCommand* chatCommand = new ChatCommand(command, callback); - chatCommands.push_back(chatCommand); - } - - void RemoveChatCommand(const FString& command) - { - auto& v = chatCommands; - - std::vector::const_iterator iter = std::find_if(v.begin(), v.end(), [command](const ChatCommand* data) -> bool { return data->command == command; }); - - if (iter != v.end()) - { - v.erase(remove(v.begin(), v.end(), *iter), v.end()); - - delete *iter; - } - } - - void AddConsoleCommand(const FString& command, const std::function& callback) - { - ConsoleCommand* consoleCommand = new ConsoleCommand(command, callback); - consoleCommands.push_back(consoleCommand); - } - - void AddRconCommand(const FString& command, const std::function& callback) - { - RconCommand* rconCommand = new RconCommand(command, callback); - rconCommands.push_back(rconCommand); - } - - void AddOnTickCallback(const std::function& callback) - { - onTickCallbacks.push_back(callback); - } - - void AddOnTimerCallback(const std::function& callback) - { - onTimerCallbacks.push_back(callback); - } - - // Callbacks - - bool CheckChatCommands(AShooterPlayerController* _AShooterPlayerController, FString* Message, EChatSendMode::Type Mode) - { - bool result = false; - - TArray Parsed; - Message->ParseIntoArray(&Parsed, L" ", true); - - if (!Parsed.IsValidIndex(0)) - return false; - - FString chatCommand = Parsed[0]; - - for (const auto& command : chatCommands) - { - if (chatCommand.EndsWith(&command->command, ESearchCase::IgnoreCase)) - { - command->callback(_AShooterPlayerController, Message, Mode); - - result = true; - } - } - - return result; - } - - bool CheckConsoleCommands(APlayerController* _APlayerController, FString* Cmd, bool bWriteToLog) - { - bool result = false; - - for (const auto& command : consoleCommands) - { - if (Cmd->StartsWith(command->command, ESearchCase::IgnoreCase)) - { - command->callback(_APlayerController, Cmd, bWriteToLog); - - result = true; - } - } - - return result; - } - - bool CheckRconCommands(RCONClientConnection* rconClientConnection, RCONPacket* rconPacket, UWorld* uWorld) - { - bool result = false; - - FString commandName = rconPacket->Body; - - for (const auto& command : rconCommands) - { - if (commandName.StartsWith(command->command, ESearchCase::IgnoreCase)) - { - command->callback(rconClientConnection, rconPacket, uWorld); - - result = true; - } - } - - return result; - } - - void CheckOnTickCallbacks(float DeltaSeconds) - { - for (const auto& callback : onTickCallbacks) - { - callback(DeltaSeconds); - } - } - - void CheckOnTimerCallbacks() - { - for (const auto& callback : onTimerCallbacks) - { - callback(); - } - } -} diff --git a/ArkApi/Commands.h b/ArkApi/Commands.h deleted file mode 100644 index 711058b..0000000 --- a/ArkApi/Commands.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef H_Commands -#define H_Commands - -#include "API/Base.h" - -namespace Commands -{ - // Command structures - - struct ChatCommand - { - ChatCommand(const FString& command, const std::function& callback) - : command(command), - callback(callback) - { - } - - FString command; - std::function callback; - }; - - struct ConsoleCommand - { - ConsoleCommand(const FString& command, const std::function& callback) - : command(command), - callback(callback) - { - } - - FString command; - std::function callback; - }; - - struct RconCommand - { - RconCommand(const FString& command, const std::function& callback) - : command(command), - callback(callback) - { - } - - FString command; - std::function callback; - }; - - // Add commands - - void AddChatCommand(const FString& command, const std::function& callback); - void RemoveChatCommand(const FString& command); - void AddConsoleCommand(const FString& command, const std::function& callback); - void AddRconCommand(const FString& command, const std::function& callback); - void AddOnTickCallback(const std::function& callback); - void AddOnTimerCallback(const std::function& callback); - - // Check callbacks - - bool CheckChatCommands(AShooterPlayerController* _AShooterPlayerController, FString* Message, EChatSendMode::Type Mode); - bool CheckConsoleCommands(APlayerController* _APlayerController, FString* Cmd, bool bWriteToLog); - bool CheckRconCommands(RCONClientConnection* rconClientConnection, RCONPacket* rconPacket, UWorld* uWorld); - void CheckOnTickCallbacks(float DeltaSeconds); - void CheckOnTimerCallbacks(); -} - -#endif diff --git a/ArkApi/Hooks.cpp b/ArkApi/Hooks.cpp deleted file mode 100644 index ef42b0d..0000000 --- a/ArkApi/Hooks.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include "stdafx.h" -#include "Hooks.h" -#include "MinHook.h" -#include "ApiUtils.h" -#include "JsonUtils.h" -#include "Commands.h" - -namespace Hooks -{ - namespace - { - // Hooks declaration - DECLARE_HOOK(UWorld_InitWorld, void, UWorld*, DWORD64); - DECLARE_HOOK(UWorld_Tick, void, DWORD64, DWORD64, float); - DECLARE_HOOK(AShooterGameMode_InitGame, void, AShooterGameMode*, FString*, FString*, FString*); - DECLARE_HOOK(AShooterPlayerController_ServerSendChatMessage_Impl, void, AShooterPlayerController*, FString*, EChatSendMode::Type); - DECLARE_HOOK(APlayerController_ConsoleCommand, FString*, APlayerController*, FString*, FString*, bool); - DECLARE_HOOK(RCONClientConnection_ProcessRCONPacket, void, RCONClientConnection*, RCONPacket*, UWorld*); - DECLARE_HOOK(AGameState_DefaultTimer, void, AGameState*); - - // Module base address - DWORD64 dwModuleBase; - - // Hooks - std::vector allHooks; - - void InitBaseAddress() - { - dwModuleBase = reinterpret_cast(GetModuleHandle(nullptr)); - - PIMAGE_DOS_HEADER pDOSHeader = reinterpret_cast(dwModuleBase); - PIMAGE_NT_HEADERS pNTHeaders = reinterpret_cast(dwModuleBase + pDOSHeader->e_lfanew); - - dwModuleBase += pNTHeaders->OptionalHeader.BaseOfCode; - } - - void InitHooks() - { - SetHook("UWorld", "InitWorld", &Hook_UWorld_InitWorld, reinterpret_cast(&UWorld_InitWorld_original)); - SetHook("UWorld", "Tick", &Hook_UWorld_Tick, reinterpret_cast(&UWorld_Tick_original)); - SetHook("AShooterGameMode", "InitGame", &Hook_AShooterGameMode_InitGame, reinterpret_cast(&AShooterGameMode_InitGame_original)); - SetHook("AShooterPlayerController", "ServerSendChatMessage_Implementation", &Hook_AShooterPlayerController_ServerSendChatMessage_Impl, reinterpret_cast(&AShooterPlayerController_ServerSendChatMessage_Impl_original)); - SetHook("APlayerController", "ConsoleCommand", &Hook_APlayerController_ConsoleCommand, reinterpret_cast(&APlayerController_ConsoleCommand_original)); - SetHook("RCONClientConnection", "ProcessRCONPacket", &Hook_RCONClientConnection_ProcessRCONPacket, reinterpret_cast(&RCONClientConnection_ProcessRCONPacket_original)); - SetHook("AGameState", "DefaultTimer", &Hook_AGameState_DefaultTimer, reinterpret_cast(&AGameState_DefaultTimer_original)); - } - - // Hooks - - void _cdecl Hook_UWorld_InitWorld(UWorld* world, DWORD64 IVS) - { - std::cout << "[API] UWorld::InitWorld was called" << std::endl; - - ApiUtils::SetWorld(world); - - UWorld_InitWorld_original(world, IVS); - } - - void _cdecl Hook_UWorld_Tick(DWORD64 world, DWORD64 TickType, float DeltaSeconds) - { - Commands::CheckOnTickCallbacks(DeltaSeconds); - - UWorld_Tick_original(world, TickType, DeltaSeconds); - } - - void _cdecl Hook_AShooterGameMode_InitGame(AShooterGameMode* _AShooterGameMode, FString* MapName, FString* Options, FString* ErrorMessage) - { - ApiUtils::SetGameMode(_AShooterGameMode); - - AShooterGameMode_InitGame_original(_AShooterGameMode, MapName, Options, ErrorMessage); - } - - void _cdecl Hook_AShooterPlayerController_ServerSendChatMessage_Impl(AShooterPlayerController* _AShooterPlayerController, FString* Message, EChatSendMode::Type Mode) - { - if (Commands::CheckChatCommands(_AShooterPlayerController, Message, Mode)) - return; - - AShooterPlayerController_ServerSendChatMessage_Impl_original(_AShooterPlayerController, Message, Mode); - } - - FString* _cdecl Hook_APlayerController_ConsoleCommand(APlayerController* _APlayerController, FString* result, FString* Cmd, bool bWriteToLog) - { - Commands::CheckConsoleCommands(_APlayerController, Cmd, bWriteToLog); - - return APlayerController_ConsoleCommand_original(_APlayerController, result, Cmd, bWriteToLog); - } - - void _cdecl Hook_RCONClientConnection_ProcessRCONPacket(RCONClientConnection* _this, RCONPacket* Packet, UWorld* InWorld) - { - Commands::CheckRconCommands(_this, Packet, InWorld); - - RCONClientConnection_ProcessRCONPacket_original(_this, Packet, InWorld); - } - - void _cdecl Hook_AGameState_DefaultTimer(AGameState* _this) - { - Commands::CheckOnTimerCallbacks(); - - AGameState_DefaultTimer_original(_this); - } - } - - void Init() - { - InitBaseAddress(); - InitHooks(); - } - - void SetHook(const std::string& structure, const std::string& funcName, LPVOID pDetour, LPVOID* ppOriginal) - { - auto json = JsonUtils::GetJson(); - - DWORD64 offset = json["structures"][structure].value(funcName, 0); - if (!offset) - { - std::cerr << funcName << " does not exist in " << structure << std::endl; - return; - } - - LPVOID pTarget = reinterpret_cast(dwModuleBase + offset); - - std::vector::iterator iter = std::find_if(allHooks.begin(), allHooks.end(), [pTarget](Hook data) -> bool { return data.pTarget == pTarget; }); - if (iter == allHooks.end()) - { - allHooks.push_back({pTarget , pDetour}); - } - else - { - pTarget = iter->pDetour; - - iter->pDetour = pDetour; - } - - if (MH_CreateHook(pTarget, pDetour, ppOriginal) != MH_OK) - { - std::cerr << "Failed to create hook for " << structure << "::" << funcName << std::endl; - return; - } - - if (MH_EnableHook(pTarget) != MH_OK) - { - std::cerr << "Failed to enable hook for " << structure << "::" << funcName << std::endl; - } - } - - // Will disable all hooks placed on this function - void DisableHook(const std::string& structure, const std::string& funcName) - { - auto json = JsonUtils::GetJson(); - - DWORD64 offset = json["structures"][structure].value(funcName, 0); - if (!offset) - { - std::cerr << funcName << " does not exist in " << structure << std::endl; - return; - } - - LPVOID pTarget = reinterpret_cast(dwModuleBase + offset); - - if (MH_RemoveHook(pTarget) != MH_OK) - { - std::cerr << "Failed to disable hook for " << structure << "::" << funcName << std::endl; - } - } - - // Address helpers - - DWORD64 GetAddress(const void* base, const std::string& structure, const std::string& offset) - { - auto json = JsonUtils::GetJson(); - return reinterpret_cast(base) + static_cast(json["structures"][structure][offset]); - } - - DWORD64 GetAddress(LPVOID base, const std::string& structure, const std::string& offset) - { - auto json = JsonUtils::GetJson(); - return reinterpret_cast(base) + static_cast(json["structures"][structure][offset]); - } - - LPVOID GetAddress(const std::string& structure, const std::string& offset) - { - auto json = JsonUtils::GetJson(); - return reinterpret_cast(dwModuleBase + static_cast(json["structures"][structure][offset])); - } -} diff --git a/ArkApi/Hooks.h b/ArkApi/Hooks.h deleted file mode 100644 index 8aa3d5f..0000000 --- a/ArkApi/Hooks.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef H_Hooks -#define H_Hooks - -#include "API/Ark.h" - -namespace Hooks -{ - struct Hook - { - LPVOID pTarget; - LPVOID pDetour; - }; - - // Init - void Init(); - - // Hook - void SetHook(const std::string& structure, const std::string& funcName, LPVOID pDetour, LPVOID* ppOriginal); - void DisableHook(const std::string& structure, const std::string& funcName); - - // Address helpers - DWORD64 GetAddress(const void* base, const std::string& structure, const std::string& offset); - DWORD64 GetAddress(LPVOID base, const std::string& structure, const std::string& offset); - LPVOID GetAddress(const std::string& structure, const std::string& offset); -} - -#endif diff --git a/ArkApi/JsonUtils.cpp b/ArkApi/JsonUtils.cpp deleted file mode 100644 index fee5d96..0000000 --- a/ArkApi/JsonUtils.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "stdafx.h" -#include "JsonUtils.h" -#include - -namespace JsonUtils -{ - namespace - { - nlohmann::json json; - } - - void Init() - { - std::string dirPath = GetCurrentDir(); - - std::string fullPath = dirPath + "/dump.json"; - std::ifstream file(fullPath); - if (!file.is_open()) - { - std::cerr << "Could not open file dump.json\n"; - throw std::runtime_error("Could not open file dump.json"); - } - - file >> json; - file.close(); - } - - std::string GetCurrentDir() - { - char buffer[MAX_PATH]; - GetModuleFileNameA(nullptr, buffer, MAX_PATH); - std::string::size_type pos = std::string(buffer).find_last_of("\\/"); - - return std::string(buffer).substr(0, pos); - } - - const nlohmann::json& GetJson() - { - return json; - } -} diff --git a/ArkApi/JsonUtils.h b/ArkApi/JsonUtils.h deleted file mode 100644 index 064e7ae..0000000 --- a/ArkApi/JsonUtils.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef H_JsonUtils -#define H_JsonUtils - -#include "json.hpp" - -namespace JsonUtils -{ - void Init(); - std::string GetCurrentDir(); - const nlohmann::json& GetJson(); -} - -#endif diff --git a/ArkApi/UpdateManager.cpp b/ArkApi/UpdateManager.cpp deleted file mode 100644 index ee7d9c4..0000000 --- a/ArkApi/UpdateManager.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "stdafx.h" -#include "UpdateManager.h" -#include "JsonUtils.h" - -namespace UpdateManager -{ - void Update() - { - std::string dirPath = JsonUtils::GetCurrentDir(); - - Startup(dirPath + "/PDBReader.exe"); - } - - void Startup(const std::string& lpApplicationName) - { - STARTUPINFOA si; - PROCESS_INFORMATION pi; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - ZeroMemory(&pi, sizeof(pi)); - - CreateProcessA(lpApplicationName.c_str(), nullptr, nullptr, nullptr, false, 0, nullptr, nullptr, &si, &pi); - - WaitForSingleObject(pi.hProcess, INFINITE); - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } -} diff --git a/ArkApi/UpdateManager.h b/ArkApi/UpdateManager.h deleted file mode 100644 index fccc02e..0000000 --- a/ArkApi/UpdateManager.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef H_UManager -#define H_UManager - -#include - -namespace UpdateManager -{ - void Update(); - void Startup(const std::string& lpApplicationName); -} - -#endif \ No newline at end of file diff --git a/ArkApi/json.hpp b/ArkApi/json.hpp deleted file mode 100644 index b660b2d..0000000 --- a/ArkApi/json.hpp +++ /dev/null @@ -1,14584 +0,0 @@ -/* -__ _____ _____ _____ -__| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 2.1.1 -|_____|_____|_____|_|___| https://github.com/nlohmann/json - -Licensed under the MIT License . -Copyright (c) 2013-2017 Niels Lohmann . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#ifndef NLOHMANN_JSON_HPP -#define NLOHMANN_JSON_HPP - -#include // all_of, copy, fill, find, for_each, none_of, remove, reverse, transform -#include // array -#include // assert -#include // and, not, or -#include // lconv, localeconv -#include // isfinite, labs, ldexp, signbit -#include // nullptr_t, ptrdiff_t, size_t -#include // int64_t, uint64_t -#include // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull -#include // memcpy, strlen -#include // forward_list -#include // function, hash, less -#include // initializer_list -#include // hex -#include // istream, ostream -#include // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator -#include // numeric_limits -#include // locale -#include // map -#include // addressof, allocator, allocator_traits, unique_ptr -#include // accumulate -#include // stringstream -#include // getline, stoi, string, to_string -#include // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type -#include // declval, forward, make_pair, move, pair, swap -#include // vector - -// exclude unsupported compilers -#if defined(__clang__) -#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 -#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" -#endif -#elif defined(__GNUC__) -#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 -#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" -#endif -#endif - -// disable float-equal warnings on GCC/clang -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - -// disable documentation warnings on clang -#if defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdocumentation" -#endif - -// allow for portable deprecation warnings -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) -#define JSON_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) -#define JSON_DEPRECATED __declspec(deprecated) -#else -#define JSON_DEPRECATED -#endif - -// allow to disable exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) -#define JSON_THROW(exception) throw exception -#define JSON_TRY try -#define JSON_CATCH(exception) catch(exception) -#else -#define JSON_THROW(exception) std::abort() -#define JSON_TRY if(true) -#define JSON_CATCH(exception) if(false) -#endif - -// manual branch prediction -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) -#define JSON_LIKELY(x) __builtin_expect(!!(x), 1) -#define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) -#else -#define JSON_LIKELY(x) x -#define JSON_UNLIKELY(x) x -#endif - -/*! -@brief namespace for Niels Lohmann -@see https://github.com/nlohmann -@since version 1.0.0 -*/ -namespace nlohmann -{ - - /*! - @brief unnamed namespace with internal helper functions - - This namespace collects some functions that could not be defined inside the - @ref basic_json class. - - @since version 2.1.0 - */ - namespace detail - { - //////////////// - // exceptions // - //////////////// - - /*! - @brief general exception of the @ref basic_json class - - Extension of std::exception objects with a member @a id for exception ids. - - @note To have nothrow-copy-constructible exceptions, we internally use - std::runtime_error which can cope with arbitrary-length error messages. - Intermediate strings are built with static functions and then passed to - the actual constructor. - - @since version 3.0.0 - */ - class exception : public std::exception - { - public: - /// returns the explanatory string - virtual const char* what() const noexcept override - { - return m.what(); - } - - /// the id of the exception - const int id; - - protected: - exception(int id_, const char* what_arg) - : id(id_), m(what_arg) - {} - - static std::string name(const std::string& ename, int id) - { - return "[json.exception." + ename + "." + std::to_string(id) + "] "; - } - - private: - /// an exception object as storage for error messages - std::runtime_error m; - }; - - /*! - @brief exception indicating a parse error - - This excpetion is thrown by the library when a parse error occurs. Parse - errors can occur during the deserialization of JSON text as well as when - using JSON Patch. - - Member @a byte holds the byte index of the last read character in the input - file. - - @note For an input with n bytes, 1 is the index of the first character - and n+1 is the index of the terminating null byte or the end of - file. This also holds true when reading a byte vector (CBOR or - MessagePack). - - Exceptions have ids 1xx. - - name / id | example massage | description - ------------------------------ | --------------- | ------------------------- - json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. - json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. - json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. - json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. - json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. - json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number wihtout a leading `0`. - json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. - json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. - json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. - json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. - json.exception.parse_error.111 | parse error: bad input stream | Parsing CBOR or MessagePack from an input stream where the [`badbit` or `failbit`](http://en.cppreference.com/w/cpp/io/ios_base/iostate) is set. - json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xf8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. - json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. - - @since version 3.0.0 - */ - class parse_error : public exception - { - public: - /*! - @brief create a parse error exception - @param[in] id the id of the exception - @param[in] byte_ the byte index where the error occured (or 0 if - the position cannot be determined) - @param[in] what_arg the explanatory string - @return parse_error object - */ - static parse_error create(int id, size_t byte_, const std::string& what_arg) - { - std::string w = exception::name("parse_error", id) + "parse error" + - (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + - ": " + what_arg; - return parse_error(id, byte_, w.c_str()); - } - - /*! - @brief byte index of the parse error - - The byte index of the last read character in the input file. - - @note For an input with n bytes, 1 is the index of the first character - and n+1 is the index of the terminating null byte or the end of - file. This also holds true when reading a byte vector (CBOR or - MessagePack). - */ - const size_t byte; - - private: - parse_error(int id_, size_t byte_, const char* what_arg) - : exception(id_, what_arg), byte(byte_) - {} - }; - - /*! - @brief exception indicating errors with iterators - - Exceptions have ids 2xx. - - name / id | example massage | description - ----------------------------------- | --------------- | ------------------------- - json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. - json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. - json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. - json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. - json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. - json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. - json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. - json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. - json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. - json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. - json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. - json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. - json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compated, because JSON objects are unordered. - json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). - - @since version 3.0.0 - */ - class invalid_iterator : public exception - { - public: - static invalid_iterator create(int id, const std::string& what_arg) - { - std::string w = exception::name("invalid_iterator", id) + what_arg; - return invalid_iterator(id, w.c_str()); - } - - private: - invalid_iterator(int id_, const char* what_arg) - : exception(id_, what_arg) - {} - }; - - /*! - @brief exception indicating executing a member function with a wrong type - - Exceptions have ids 3xx. - - name / id | example message | description - ----------------------------- | --------------- | ------------------------- - json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. - json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. - json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t&. - json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. - json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. - json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. - json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. - json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. - json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. - json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. - json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. - json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. - json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. - json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. - - @since version 3.0.0 - */ - class type_error : public exception - { - public: - static type_error create(int id, const std::string& what_arg) - { - std::string w = exception::name("type_error", id) + what_arg; - return type_error(id, w.c_str()); - } - - private: - type_error(int id_, const char* what_arg) - : exception(id_, what_arg) - {} - }; - - /*! - @brief exception indicating access out of the defined range - - Exceptions have ids 4xx. - - name / id | example message | description - ------------------------------- | --------------- | ------------------------- - json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. - json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. - json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. - json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. - json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. - json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. - - @since version 3.0.0 - */ - class out_of_range : public exception - { - public: - static out_of_range create(int id, const std::string& what_arg) - { - std::string w = exception::name("out_of_range", id) + what_arg; - return out_of_range(id, w.c_str()); - } - - private: - out_of_range(int id_, const char* what_arg) - : exception(id_, what_arg) - {} - }; - - /*! - @brief exception indicating other errors - - Exceptions have ids 5xx. - - name / id | example message | description - ------------------------------ | --------------- | ------------------------- - json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. - json.exception.other_error.502 | invalid object size for conversion | Some conversions to user-defined types impose constraints on the object size (e.g. std::pair) - - @since version 3.0.0 - */ - class other_error : public exception - { - public: - static other_error create(int id, const std::string& what_arg) - { - std::string w = exception::name("other_error", id) + what_arg; - return other_error(id, w.c_str()); - } - - private: - other_error(int id_, const char* what_arg) - : exception(id_, what_arg) - {} - }; - - - - /////////////////////////// - // JSON type enumeration // - /////////////////////////// - - /*! - @brief the JSON type enumeration - - This enumeration collects the different JSON types. It is internally used to - distinguish the stored values, and the functions @ref basic_json::is_null(), - @ref basic_json::is_object(), @ref basic_json::is_array(), - @ref basic_json::is_string(), @ref basic_json::is_boolean(), - @ref basic_json::is_number() (with @ref basic_json::is_number_integer(), - @ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), - @ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and - @ref basic_json::is_structured() rely on it. - - @note There are three enumeration entries (number_integer, number_unsigned, and - number_float), because the library distinguishes these three types for numbers: - @ref basic_json::number_unsigned_t is used for unsigned integers, - @ref basic_json::number_integer_t is used for signed integers, and - @ref basic_json::number_float_t is used for floating-point numbers or to - approximate integers which do not fit in the limits of their respective type. - - @sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON - value with the default value for a given type - - @since version 1.0.0 - */ - enum class value_t : uint8_t - { - null, ///< null value - object, ///< object (unordered set of name/value pairs) - array, ///< array (ordered collection of values) - string, ///< string value - boolean, ///< boolean value - number_integer, ///< number value (signed integer) - number_unsigned, ///< number value (unsigned integer) - number_float, ///< number value (floating-point) - discarded ///< discarded by the the parser callback function - }; - - /*! - @brief comparison operator for JSON types - - Returns an ordering that is similar to Python: - - order: null < boolean < number < object < array < string - - furthermore, each type is not smaller than itself - - @since version 1.0.0 - */ - inline bool operator<(const value_t lhs, const value_t rhs) noexcept - { - static constexpr std::array order = { { - 0, // null - 3, // object - 4, // array - 5, // string - 1, // boolean - 2, // integer - 2, // unsigned - 2, // float - } - }; - - // discarded values are not comparable - if (lhs == value_t::discarded or rhs == value_t::discarded) - { - return false; - } - - return order[static_cast(lhs)] < - order[static_cast(rhs)]; - } - - - ///////////// - // helpers // - ///////////// - - // alias templates to reduce boilerplate - template - using enable_if_t = typename std::enable_if::type; - - template - using uncvref_t = typename std::remove_cv::type>::type; - - // implementation of C++14 index_sequence and affiliates - // source: https://stackoverflow.com/a/32223343 - template - struct index_sequence - { - using type = index_sequence; - using value_type = std::size_t; - static constexpr std::size_t size() noexcept - { - return sizeof...(Ints); - } - }; - - template - struct merge_and_renumber; - - template - struct merge_and_renumber, index_sequence> - : index_sequence < I1..., (sizeof...(I1)+I2)... > - { }; - - template - struct make_index_sequence - : merge_and_renumber < typename make_index_sequence < N / 2 >::type, - typename make_index_sequence < N - N / 2 >::type > - { }; - - template<> struct make_index_sequence<0> : index_sequence<> { }; - template<> struct make_index_sequence<1> : index_sequence<0> { }; - - template - using index_sequence_for = make_index_sequence; - - /* - Implementation of two C++17 constructs: conjunction, negation. This is needed - to avoid evaluating all the traits in a condition - - For example: not std::is_same::value and has_value_type::value - will not compile when T = void (on MSVC at least). Whereas - conjunction>, has_value_type>::value will - stop evaluating if negation<...>::value == false - - Please note that those constructs must be used with caution, since symbols can - become very long quickly (which can slow down compilation and cause MSVC - internal compiler errors). Only use it when you have to (see example ahead). - */ - template struct conjunction : std::true_type {}; - template struct conjunction : B1 {}; - template - struct conjunction : std::conditional, B1>::type {}; - - template struct negation : std::integral_constant < bool, !B::value > {}; - - // dispatch utility (taken from ranges-v3) - template struct priority_tag : priority_tag < N - 1 > {}; - template<> struct priority_tag<0> {}; - - - ////////////////// - // constructors // - ////////////////// - - template struct external_constructor; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept - { - j.m_type = value_t::boolean; - j.m_value = b; - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) - { - j.m_type = value_t::string; - j.m_value = s; - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept - { - j.m_type = value_t::number_float; - j.m_value = val; - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept - { - j.m_type = value_t::number_unsigned; - j.m_value = val; - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept - { - j.m_type = value_t::number_integer; - j.m_value = val; - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) - { - j.m_type = value_t::array; - j.m_value = arr; - j.assert_invariant(); - } - - template::value, - int> = 0> - static void construct(BasicJsonType& j, const CompatibleArrayType& arr) - { - using std::begin; - using std::end; - j.m_type = value_t::array; - j.m_value.array = j.template create(begin(arr), end(arr)); - j.assert_invariant(); - } - - template - static void construct(BasicJsonType& j, const std::vector& arr) - { - j.m_type = value_t::array; - j.m_value = value_t::array; - j.m_value.array->reserve(arr.size()); - for (bool x : arr) - { - j.m_value.array->push_back(x); - } - j.assert_invariant(); - } - }; - - template<> - struct external_constructor - { - template - static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) - { - j.m_type = value_t::object; - j.m_value = obj; - j.assert_invariant(); - } - - template::value, - int> = 0> - static void construct(BasicJsonType& j, const CompatibleObjectType& obj) - { - using std::begin; - using std::end; - - j.m_type = value_t::object; - j.m_value.object = j.template create(begin(obj), end(obj)); - j.assert_invariant(); - } - }; - - - //////////////////////// - // has_/is_ functions // - //////////////////////// - - /*! - @brief Helper to determine whether there's a key_type for T. - - This helper is used to tell associative containers apart from other containers - such as sequence containers. For instance, `std::map` passes the test as it - contains a `mapped_type`, whereas `std::vector` fails the test. - - @sa http://stackoverflow.com/a/7728728/266378 - @since version 1.0.0, overworked in version 2.0.6 - */ -#define NLOHMANN_JSON_HAS_HELPER(type) \ - template struct has_##type { \ - private: \ - template \ - static int detect(U &&); \ - static void detect(...); \ - public: \ - static constexpr bool value = \ - std::is_integral()))>::value; \ - } - - NLOHMANN_JSON_HAS_HELPER(mapped_type); - NLOHMANN_JSON_HAS_HELPER(key_type); - NLOHMANN_JSON_HAS_HELPER(value_type); - NLOHMANN_JSON_HAS_HELPER(iterator); - -#undef NLOHMANN_JSON_HAS_HELPER - - - template - struct is_compatible_object_type_impl : std::false_type {}; - - template - struct is_compatible_object_type_impl - { - static constexpr auto value = - std::is_constructible::value and - std::is_constructible::value; - }; - - template - struct is_compatible_object_type - { - static auto constexpr value = is_compatible_object_type_impl < - conjunction>, - has_mapped_type, - has_key_type>::value, - typename BasicJsonType::object_t, CompatibleObjectType >::value; - }; - - template - struct is_basic_json_nested_type - { - static auto constexpr value = std::is_same::value or - std::is_same::value or - std::is_same::value or - std::is_same::value or - std::is_same::value; - }; - - template - struct is_compatible_array_type - { - static auto constexpr value = - conjunction>, - negation>, - negation>, - negation>, - has_value_type, - has_iterator>::value; - }; - - template - struct is_compatible_integer_type_impl : std::false_type {}; - - template - struct is_compatible_integer_type_impl - { - // is there an assert somewhere on overflows? - using RealLimits = std::numeric_limits; - using CompatibleLimits = std::numeric_limits; - - static constexpr auto value = - std::is_constructible::value and - CompatibleLimits::is_integer and - RealLimits::is_signed == CompatibleLimits::is_signed; - }; - - template - struct is_compatible_integer_type - { - static constexpr auto value = - is_compatible_integer_type_impl < - std::is_integral::value and - not std::is_same::value, - RealIntegerType, CompatibleNumberIntegerType > ::value; - }; - - - // trait checking if JSONSerializer::from_json(json const&, udt&) exists - template - struct has_from_json - { - private: - // also check the return type of from_json - template::from_json( - std::declval(), std::declval()))>::value>> - static int detect(U&&); - static void detect(...); - - public: - static constexpr bool value = std::is_integral>()))>::value; - }; - - // This trait checks if JSONSerializer::from_json(json const&) exists - // this overload is used for non-default-constructible user-defined-types - template - struct has_non_default_from_json - { - private: - template < - typename U, - typename = enable_if_t::from_json(std::declval()))>::value >> - static int detect(U&&); - static void detect(...); - - public: - static constexpr bool value = std::is_integral>()))>::value; - }; - - // This trait checks if BasicJsonType::json_serializer::to_json exists - template - struct has_to_json - { - private: - template::to_json( - std::declval(), std::declval()))> - static int detect(U&&); - static void detect(...); - - public: - static constexpr bool value = std::is_integral>()))>::value; - }; - - - ///////////// - // to_json // - ///////////// - - template::value, int> = 0> - void to_json(BasicJsonType& j, T b) noexcept - { - external_constructor::construct(j, b); - } - - template::value, int> = 0> - void to_json(BasicJsonType& j, const CompatibleString& s) - { - external_constructor::construct(j, s); - } - - template::value, int> = 0> - void to_json(BasicJsonType& j, FloatType val) noexcept - { - external_constructor::construct(j, static_cast(val)); - } - - template < - typename BasicJsonType, typename CompatibleNumberUnsignedType, - enable_if_t::value, int> = 0 > - void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept - { - external_constructor::construct(j, static_cast(val)); - } - - template < - typename BasicJsonType, typename CompatibleNumberIntegerType, - enable_if_t::value, int> = 0 > - void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept - { - external_constructor::construct(j, static_cast(val)); - } - - template::value, int> = 0> - void to_json(BasicJsonType& j, EnumType e) noexcept - { - using underlying_type = typename std::underlying_type::type; - external_constructor::construct(j, static_cast(e)); - } - - template - void to_json(BasicJsonType& j, const std::vector& e) - { - external_constructor::construct(j, e); - } - - template < - typename BasicJsonType, typename CompatibleArrayType, - enable_if_t < - is_compatible_array_type::value or - std::is_same::value, - int > = 0 > - void to_json(BasicJsonType& j, const CompatibleArrayType& arr) - { - external_constructor::construct(j, arr); - } - - template < - typename BasicJsonType, typename CompatibleObjectType, - enable_if_t::value, - int> = 0 > - void to_json(BasicJsonType& j, const CompatibleObjectType& arr) - { - external_constructor::construct(j, arr); - } - - template ::value, - int> = 0> - void to_json(BasicJsonType& j, T(&arr)[N]) - { - external_constructor::construct(j, arr); - } - - template - void to_json(BasicJsonType& j, const std::pair& p) - { - j = { p.first, p.second }; - } - - template - void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence) - { - j = { std::get(t)... }; - } - - template - void to_json(BasicJsonType& j, const std::tuple& t) - { - to_json_tuple_impl(j, t, index_sequence_for {}); - } - - /////////////// - // from_json // - /////////////// - - // overloads for basic_json template parameters - template::value and - not std::is_same::value, - int> = 0> - void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) - { - switch (static_cast(j)) - { - case value_t::number_unsigned: - { - val = static_cast( - *j.template get_ptr()); - break; - } - case value_t::number_integer: - { - val = static_cast( - *j.template get_ptr()); - break; - } - case value_t::number_float: - { - val = static_cast( - *j.template get_ptr()); - break; - } - default: - { - JSON_THROW(type_error::create(302, "type must be number, but is " + j.type_name())); - } - } - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) - { - if (not j.is_boolean()) - { - JSON_THROW(type_error::create(302, "type must be boolean, but is " + j.type_name())); - } - b = *j.template get_ptr(); - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) - { - if (not j.is_string()) - { - JSON_THROW(type_error::create(302, "type must be string, but is " + j.type_name())); - } - s = *j.template get_ptr(); - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) - { - get_arithmetic_value(j, val); - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) - { - get_arithmetic_value(j, val); - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) - { - get_arithmetic_value(j, val); - } - - template::value, int> = 0> - void from_json(const BasicJsonType& j, EnumType& e) - { - typename std::underlying_type::type val; - get_arithmetic_value(j, val); - e = static_cast(val); - } - - template - void from_json(const BasicJsonType& j, typename BasicJsonType::array_t& arr) - { - if (not j.is_array()) - { - JSON_THROW(type_error::create(302, "type must be array, but is " + j.type_name())); - } - arr = *j.template get_ptr(); - } - - // forward_list doesn't have an insert method - template::value, int> = 0> - void from_json(const BasicJsonType& j, std::forward_list& l) - { - if (not j.is_array()) - { - JSON_THROW(type_error::create(302, "type must be array, but is " + j.type_name())); - } - - for (auto it = j.rbegin(), end = j.rend(); it != end; ++it) - { - l.push_front(it->template get()); - } - } - - template - void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0>) - { - using std::begin; - using std::end; - - std::transform(j.begin(), j.end(), - std::inserter(arr, end(arr)), [](const BasicJsonType & i) - { - // get() returns *this, this won't call a from_json - // method when value_type is BasicJsonType - return i.template get(); - }); - } - - template - auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1>) - -> decltype( - arr.reserve(std::declval()), - void()) - { - using std::begin; - using std::end; - - arr.reserve(j.size()); - std::transform(j.begin(), j.end(), - std::inserter(arr, end(arr)), [](const BasicJsonType & i) - { - // get() returns *this, this won't call a from_json - // method when value_type is BasicJsonType - return i.template get(); - }); - } - - template - void from_json_array_impl(const BasicJsonType& j, std::array& arr, priority_tag<2>) - { - for (std::size_t i = 0; i < N; ++i) - { - arr[i] = j.at(i).template get(); - } - } - - template::value and - std::is_convertible::value and - not std::is_same::value, int> = 0> - void from_json(const BasicJsonType& j, CompatibleArrayType& arr) - { - if (not j.is_array()) - { - JSON_THROW(type_error::create(302, "type must be array, but is " + j.type_name())); - } - - from_json_array_impl(j, arr, priority_tag<2> {}); - } - - template::value, int> = 0> - void from_json(const BasicJsonType& j, CompatibleObjectType& obj) - { - if (not j.is_object()) - { - JSON_THROW(type_error::create(302, "type must be object, but is " + j.type_name())); - } - - auto inner_object = j.template get_ptr(); - using std::begin; - using std::end; - using value_type = typename CompatibleObjectType::value_type; - std::transform( - inner_object->begin(), inner_object->end(), - std::inserter(obj, obj.begin()), - [](typename BasicJsonType::object_t::value_type const & p) - { - return value_type( - p.first, - p.second - .template get()); - }); - } - - // overload for arithmetic types, not chosen for basic_json template arguments - // (BooleanType, etc..); note: Is it really necessary to provide explicit - // overloads for boolean_t etc. in case of a custom BooleanType which is not - // an arithmetic type? - template::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value and - not std::is_same::value, - int> = 0> - void from_json(const BasicJsonType& j, ArithmeticType& val) - { - switch (static_cast(j)) - { - case value_t::number_unsigned: - { - val = static_cast(*j.template get_ptr()); - break; - } - case value_t::number_integer: - { - val = static_cast(*j.template get_ptr()); - break; - } - case value_t::number_float: - { - val = static_cast(*j.template get_ptr()); - break; - } - case value_t::boolean: - { - val = static_cast(*j.template get_ptr()); - break; - } - default: - { - JSON_THROW(type_error::create(302, "type must be number, but is " + j.type_name())); - } - } - } - - template - void from_json(const BasicJsonType& j, std::pair& p) - { - p = { j.at(0), j.at(1) }; - } - - template - void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence) - { - t = std::make_tuple(j.at(Idx)...); - } - - template - void from_json(const BasicJsonType& j, std::tuple& t) - { - from_json_tuple_impl(j, t, index_sequence_for {}); - } - - struct to_json_fn - { - private: - template - auto call(BasicJsonType& j, T&& val, priority_tag<1>) const noexcept(noexcept(to_json(j, std::forward(val)))) - -> decltype(to_json(j, std::forward(val)), void()) - { - return to_json(j, std::forward(val)); - } - - template - void call(BasicJsonType&, T&&, priority_tag<0>) const noexcept - { - static_assert(sizeof(BasicJsonType) == 0, - "could not find to_json() method in T's namespace"); - } - - public: - template - void operator()(BasicJsonType& j, T&& val) const - noexcept(noexcept(std::declval().call(j, std::forward(val), priority_tag<1> {}))) - { - return call(j, std::forward(val), priority_tag<1> {}); - } - }; - - struct from_json_fn - { - private: - template - auto call(const BasicJsonType& j, T& val, priority_tag<1>) const - noexcept(noexcept(from_json(j, val))) - -> decltype(from_json(j, val), void()) - { - return from_json(j, val); - } - - template - void call(const BasicJsonType&, T&, priority_tag<0>) const noexcept - { - static_assert(sizeof(BasicJsonType) == 0, - "could not find from_json() method in T's namespace"); - } - - public: - template - void operator()(const BasicJsonType& j, T& val) const - noexcept(noexcept(std::declval().call(j, val, priority_tag<1> {}))) - { - return call(j, val, priority_tag<1> {}); - } - }; - - // taken from ranges-v3 - template - struct static_const - { - static constexpr T value{}; - }; - - template - constexpr T static_const::value; - } // namespace detail - - - /// namespace to hold default `to_json` / `from_json` functions - namespace - { - constexpr const auto& to_json = detail::static_const::value; - constexpr const auto& from_json = detail::static_const::value; - } - - - /*! - @brief default JSONSerializer template argument - - This serializer ignores the template arguments and uses ADL - ([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl)) - for serialization. - */ - template - struct adl_serializer - { - /*! - @brief convert a JSON value to any value type - - This function is usually called by the `get()` function of the - @ref basic_json class (either explicit or via conversion operators). - - @param[in] j JSON value to read from - @param[in,out] val value to write to - */ - template - static void from_json(BasicJsonType&& j, ValueType& val) noexcept( - noexcept(::nlohmann::from_json(std::forward(j), val))) - { - ::nlohmann::from_json(std::forward(j), val); - } - - /*! - @brief convert any value type to a JSON value - - This function is usually called by the constructors of the @ref basic_json - class. - - @param[in,out] j JSON value to write to - @param[in] val value to read from - */ - template - static void to_json(BasicJsonType& j, ValueType&& val) noexcept( - noexcept(::nlohmann::to_json(j, std::forward(val)))) - { - ::nlohmann::to_json(j, std::forward(val)); - } - }; - - - /*! - @brief a class to store JSON values - - @tparam ObjectType type for JSON objects (`std::map` by default; will be used - in @ref object_t) - @tparam ArrayType type for JSON arrays (`std::vector` by default; will be used - in @ref array_t) - @tparam StringType type for JSON strings and object keys (`std::string` by - default; will be used in @ref string_t) - @tparam BooleanType type for JSON booleans (`bool` by default; will be used - in @ref boolean_t) - @tparam NumberIntegerType type for JSON integer numbers (`int64_t` by - default; will be used in @ref number_integer_t) - @tparam NumberUnsignedType type for JSON unsigned integer numbers (@c - `uint64_t` by default; will be used in @ref number_unsigned_t) - @tparam NumberFloatType type for JSON floating-point numbers (`double` by - default; will be used in @ref number_float_t) - @tparam AllocatorType type of the allocator to use (`std::allocator` by - default) - @tparam JSONSerializer the serializer to resolve internal calls to `to_json()` - and `from_json()` (@ref adl_serializer by default) - - @requirement The class satisfies the following concept requirements: - - Basic - - [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible): - JSON values can be default constructed. The result will be a JSON null - value. - - [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible): - A JSON value can be constructed from an rvalue argument. - - [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible): - A JSON value can be copy-constructed from an lvalue expression. - - [MoveAssignable](http://en.cppreference.com/w/cpp/concept/MoveAssignable): - A JSON value van be assigned from an rvalue argument. - - [CopyAssignable](http://en.cppreference.com/w/cpp/concept/CopyAssignable): - A JSON value can be copy-assigned from an lvalue expression. - - [Destructible](http://en.cppreference.com/w/cpp/concept/Destructible): - JSON values can be destructed. - - Layout - - [StandardLayoutType](http://en.cppreference.com/w/cpp/concept/StandardLayoutType): - JSON values have - [standard layout](http://en.cppreference.com/w/cpp/language/data_members#Standard_layout): - All non-static data members are private and standard layout types, the - class has no virtual functions or (virtual) base classes. - - Library-wide - - [EqualityComparable](http://en.cppreference.com/w/cpp/concept/EqualityComparable): - JSON values can be compared with `==`, see @ref - operator==(const_reference,const_reference). - - [LessThanComparable](http://en.cppreference.com/w/cpp/concept/LessThanComparable): - JSON values can be compared with `<`, see @ref - operator<(const_reference,const_reference). - - [Swappable](http://en.cppreference.com/w/cpp/concept/Swappable): - Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of - other compatible types, using unqualified function call @ref swap(). - - [NullablePointer](http://en.cppreference.com/w/cpp/concept/NullablePointer): - JSON values can be compared against `std::nullptr_t` objects which are used - to model the `null` value. - - Container - - [Container](http://en.cppreference.com/w/cpp/concept/Container): - JSON values can be used like STL containers and provide iterator access. - - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer); - JSON values can be used like STL containers and provide reverse iterator - access. - - @invariant The member variables @a m_value and @a m_type have the following - relationship: - - If `m_type == value_t::object`, then `m_value.object != nullptr`. - - If `m_type == value_t::array`, then `m_value.array != nullptr`. - - If `m_type == value_t::string`, then `m_value.string != nullptr`. - The invariants are checked by member function assert_invariant(). - - @internal - @note ObjectType trick from http://stackoverflow.com/a/9860911 - @endinternal - - @see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange - Format](http://rfc7159.net/rfc7159) - - @since version 1.0.0 - - @nosubgrouping - */ - template < - template class ObjectType = std::map, - template class ArrayType = std::vector, - class StringType = std::string, - class BooleanType = bool, - class NumberIntegerType = std::int64_t, - class NumberUnsignedType = std::uint64_t, - class NumberFloatType = double, - template class AllocatorType = std::allocator, - template class JSONSerializer = adl_serializer - > - class basic_json - { - private: - template friend struct detail::external_constructor; - /// workaround type for MSVC - using basic_json_t = basic_json; - - public: - using value_t = detail::value_t; - // forward declarations - template class iter_impl; - template class json_reverse_iterator; - class json_pointer; - template - using json_serializer = JSONSerializer; - - - //////////////// - // exceptions // - //////////////// - - /// @name exceptions - /// Classes to implement user-defined exceptions. - /// @{ - - /// @copydoc detail::exception - using exception = detail::exception; - /// @copydoc detail::parse_error - using parse_error = detail::parse_error; - /// @copydoc detail::invalid_iterator - using invalid_iterator = detail::invalid_iterator; - /// @copydoc detail::type_error - using type_error = detail::type_error; - /// @copydoc detail::out_of_range - using out_of_range = detail::out_of_range; - /// @copydoc detail::other_error - using other_error = detail::other_error; - - /// @} - - - ///////////////////// - // container types // - ///////////////////// - - /// @name container types - /// The canonic container types to use @ref basic_json like any other STL - /// container. - /// @{ - - /// the type of elements in a basic_json container - using value_type = basic_json; - - /// the type of an element reference - using reference = value_type&; - /// the type of an element const reference - using const_reference = const value_type&; - - /// a type to represent differences between iterators - using difference_type = std::ptrdiff_t; - /// a type to represent container sizes - using size_type = std::size_t; - - /// the allocator type - using allocator_type = AllocatorType; - - /// the type of an element pointer - using pointer = typename std::allocator_traits::pointer; - /// the type of an element const pointer - using const_pointer = typename std::allocator_traits::const_pointer; - - /// an iterator for a basic_json container - using iterator = iter_impl; - /// a const iterator for a basic_json container - using const_iterator = iter_impl; - /// a reverse iterator for a basic_json container - using reverse_iterator = json_reverse_iterator; - /// a const reverse iterator for a basic_json container - using const_reverse_iterator = json_reverse_iterator; - - /// @} - - - /*! - @brief returns the allocator associated with the container - */ - static allocator_type get_allocator() - { - return allocator_type(); - } - - /*! - @brief returns version information on the library - - This function returns a JSON object with information about the library, - including the version number and information on the platform and compiler. - - @return JSON object holding version information - key | description - ----------- | --------------- - `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). - `copyright` | The copyright line for the library as string. - `name` | The name of the library as string. - `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. - `url` | The URL of the project as string. - `version` | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string). - - @liveexample{The following code shows an example output of the `meta()` - function.,meta} - - @complexity Constant. - - @since 2.1.0 - */ - static basic_json meta() - { - basic_json result; - - result["copyright"] = "(C) 2013-2017 Niels Lohmann"; - result["name"] = "JSON for Modern C++"; - result["url"] = "https://github.com/nlohmann/json"; - result["version"] = - { - { "string", "2.1.1" },{ "major", 2 },{ "minor", 1 },{ "patch", 1 } - }; - -#ifdef _WIN32 - result["platform"] = "win32"; -#elif defined __linux__ - result["platform"] = "linux"; -#elif defined __APPLE__ - result["platform"] = "apple"; -#elif defined __unix__ - result["platform"] = "unix"; -#else - result["platform"] = "unknown"; -#endif - -#if defined(__clang__) - result["compiler"] = { { "family", "clang" },{ "version", __clang_version__ } }; -#elif defined(__ICC) || defined(__INTEL_COMPILER) - result["compiler"] = { { "family", "icc" },{ "version", __INTEL_COMPILER } }; -#elif defined(__GNUC__) || defined(__GNUG__) - result["compiler"] = { { "family", "gcc" },{ "version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__) } }; -#elif defined(__HP_cc) || defined(__HP_aCC) - result["compiler"] = "hp" -#elif defined(__IBMCPP__) - result["compiler"] = { { "family", "ilecpp" },{ "version", __IBMCPP__ } }; -#elif defined(_MSC_VER) - result["compiler"] = { { "family", "msvc" },{ "version", _MSC_VER } }; -#elif defined(__PGI) - result["compiler"] = { { "family", "pgcpp" },{ "version", __PGI } }; -#elif defined(__SUNPRO_CC) - result["compiler"] = { { "family", "sunpro" },{ "version", __SUNPRO_CC } }; -#else - result["compiler"] = { { "family", "unknown" },{ "version", "unknown" } }; -#endif - -#ifdef __cplusplus - result["compiler"]["c++"] = std::to_string(__cplusplus); -#else - result["compiler"]["c++"] = "unknown"; -#endif - return result; - } - - - /////////////////////////// - // JSON value data types // - /////////////////////////// - - /// @name JSON value data types - /// The data types to store a JSON value. These types are derived from - /// the template arguments passed to class @ref basic_json. - /// @{ - - /*! - @brief a type for an object - - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: - > An object is an unordered collection of zero or more name/value pairs, - > where a name is a string and a value is a string, number, boolean, null, - > object, or array. - - To store objects in C++, a type is defined by the template parameters - described below. - - @tparam ObjectType the container to store objects (e.g., `std::map` or - `std::unordered_map`) - @tparam StringType the type of the keys or names (e.g., `std::string`). - The comparison function `std::less` is used to order elements - inside the container. - @tparam AllocatorType the allocator to use for objects (e.g., - `std::allocator`) - - #### Default type - - With the default values for @a ObjectType (`std::map`), @a StringType - (`std::string`), and @a AllocatorType (`std::allocator`), the default - value for @a object_t is: - - @code {.cpp} - std::map< - std::string, // key_type - basic_json, // value_type - std::less, // key_compare - std::allocator> // allocator_type - > - @endcode - - #### Behavior - - The choice of @a object_t influences the behavior of the JSON class. With - the default type, objects have the following behavior: - - - When all names are unique, objects will be interoperable in the sense - that all software implementations receiving that object will agree on - the name-value mappings. - - When the names within an object are not unique, later stored name/value - pairs overwrite previously stored name/value pairs, leaving the used - names unique. For instance, `{"key": 1}` and `{"key": 2, "key": 1}` will - be treated as equal and both stored as `{"key": 1}`. - - Internally, name/value pairs are stored in lexicographical order of the - names. Objects will also be serialized (see @ref dump) in this order. - For instance, `{"b": 1, "a": 2}` and `{"a": 2, "b": 1}` will be stored - and serialized as `{"a": 2, "b": 1}`. - - When comparing objects, the order of the name/value pairs is irrelevant. - This makes objects interoperable in the sense that they will not be - affected by these differences. For instance, `{"b": 1, "a": 2}` and - `{"a": 2, "b": 1}` will be treated as equal. - - #### Limits - - [RFC 7159](http://rfc7159.net/rfc7159) specifies: - > An implementation may set limits on the maximum depth of nesting. - - In this class, the object's limit of nesting is not constraint explicitly. - However, a maximum depth of nesting may be introduced by the compiler or - runtime environment. A theoretical limit can be queried by calling the - @ref max_size function of a JSON object. - - #### Storage - - Objects are stored as pointers in a @ref basic_json type. That is, for any - access to object values, a pointer of type `object_t*` must be - dereferenced. - - @sa @ref array_t -- type for an array value - - @since version 1.0.0 - - @note The order name/value pairs are added to the object is *not* - preserved by the library. Therefore, iterating an object may return - name/value pairs in a different order than they were originally stored. In - fact, keys will be traversed in alphabetical order as `std::map` with - `std::less` is used by default. Please note this behavior conforms to [RFC - 7159](http://rfc7159.net/rfc7159), because any order implements the - specified "unordered" nature of JSON objects. - */ - using object_t = ObjectType, - AllocatorType>>; - - /*! - @brief a type for an array - - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: - > An array is an ordered sequence of zero or more values. - - To store objects in C++, a type is defined by the template parameters - explained below. - - @tparam ArrayType container type to store arrays (e.g., `std::vector` or - `std::list`) - @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`) - - #### Default type - - With the default values for @a ArrayType (`std::vector`) and @a - AllocatorType (`std::allocator`), the default value for @a array_t is: - - @code {.cpp} - std::vector< - basic_json, // value_type - std::allocator // allocator_type - > - @endcode - - #### Limits - - [RFC 7159](http://rfc7159.net/rfc7159) specifies: - > An implementation may set limits on the maximum depth of nesting. - - In this class, the array's limit of nesting is not constraint explicitly. - However, a maximum depth of nesting may be introduced by the compiler or - runtime environment. A theoretical limit can be queried by calling the - @ref max_size function of a JSON array. - - #### Storage - - Arrays are stored as pointers in a @ref basic_json type. That is, for any - access to array values, a pointer of type `array_t*` must be dereferenced. - - @sa @ref object_t -- type for an object value - - @since version 1.0.0 - */ - using array_t = ArrayType>; - - /*! - @brief a type for a string - - [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: - > A string is a sequence of zero or more Unicode characters. - - To store objects in C++, a type is defined by the template parameter - described below. Unicode values are split by the JSON class into - byte-sized characters during deserialization. - - @tparam StringType the container to store strings (e.g., `std::string`). - Note this container is used for keys/names in objects, see @ref object_t. - - #### Default type - - With the default values for @a StringType (`std::string`), the default - value for @a string_t is: - - @code {.cpp} - std::string - @endcode - - #### Encoding - - Strings are stored in UTF-8 encoding. Therefore, functions like - `std::string::size()` or `std::string::length()` return the number of - bytes in the string rather than the number of characters or glyphs. - - #### String comparison - - [RFC 7159](http://rfc7159.net/rfc7159) states: - > Software implementations are typically required to test names of object - > members for equality. Implementations that transform the textual - > representation into sequences of Unicode code units and then perform the - > comparison numerically, code unit by code unit, are interoperable in the - > sense that implementations will agree in all cases on equality or - > inequality of two strings. For example, implementations that compare - > strings with escaped characters unconverted may incorrectly find that - > `"a\\b"` and `"a\u005Cb"` are not equal. - - This implementation is interoperable as it does compare strings code unit - by code unit. - - #### Storage - - String values are stored as pointers in a @ref basic_json type. That is, - for any access to string values, a pointer of type `string_t*` must be - dereferenced. - - @since version 1.0.0 - */ - using string_t = StringType; - - /*! - @brief a type for a boolean - - [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a - type which differentiates the two literals `true` and `false`. - - To store objects in C++, a type is defined by the template parameter @a - BooleanType which chooses the type to use. - - #### Default type - - With the default values for @a BooleanType (`bool`), the default value for - @a boolean_t is: - - @code {.cpp} - bool - @endcode - - #### Storage - - Boolean values are stored directly inside a @ref basic_json type. - - @since version 1.0.0 - */ - using boolean_t = BooleanType; - - /*! - @brief a type for a number (integer) - - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: - > The representation of numbers is similar to that used in most - > programming languages. A number is represented in base 10 using decimal - > digits. It contains an integer component that may be prefixed with an - > optional minus sign, which may be followed by a fraction part and/or an - > exponent part. Leading zeros are not allowed. (...) Numeric values that - > cannot be represented in the grammar below (such as Infinity and NaN) - > are not permitted. - - This description includes both integer and floating-point numbers. - However, C++ allows more precise storage if it is known whether the number - is a signed integer, an unsigned integer or a floating-point number. - Therefore, three different types, @ref number_integer_t, @ref - number_unsigned_t and @ref number_float_t are used. - - To store integer numbers in C++, a type is defined by the template - parameter @a NumberIntegerType which chooses the type to use. - - #### Default type - - With the default values for @a NumberIntegerType (`int64_t`), the default - value for @a number_integer_t is: - - @code {.cpp} - int64_t - @endcode - - #### Default behavior - - - The restrictions about leading zeros is not enforced in C++. Instead, - leading zeros in integer literals lead to an interpretation as octal - number. Internally, the value will be stored as decimal number. For - instance, the C++ integer literal `010` will be serialized to `8`. - During deserialization, leading zeros yield an error. - - Not-a-number (NaN) values will be serialized to `null`. - - #### Limits - - [RFC 7159](http://rfc7159.net/rfc7159) specifies: - > An implementation may set limits on the range and precision of numbers. - - When the default type is used, the maximal integer number that can be - stored is `9223372036854775807` (INT64_MAX) and the minimal integer number - that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers - that are out of range will yield over/underflow when used in a - constructor. During deserialization, too large or small integer numbers - will be automatically be stored as @ref number_unsigned_t or @ref - number_float_t. - - [RFC 7159](http://rfc7159.net/rfc7159) further states: - > Note that when such software is used, numbers that are integers and are - > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense - > that implementations will agree exactly on their numeric values. - - As this range is a subrange of the exactly supported range [INT64_MIN, - INT64_MAX], this class's integer type is interoperable. - - #### Storage - - Integer number values are stored directly inside a @ref basic_json type. - - @sa @ref number_float_t -- type for number values (floating-point) - - @sa @ref number_unsigned_t -- type for number values (unsigned integer) - - @since version 1.0.0 - */ - using number_integer_t = NumberIntegerType; - - /*! - @brief a type for a number (unsigned) - - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: - > The representation of numbers is similar to that used in most - > programming languages. A number is represented in base 10 using decimal - > digits. It contains an integer component that may be prefixed with an - > optional minus sign, which may be followed by a fraction part and/or an - > exponent part. Leading zeros are not allowed. (...) Numeric values that - > cannot be represented in the grammar below (such as Infinity and NaN) - > are not permitted. - - This description includes both integer and floating-point numbers. - However, C++ allows more precise storage if it is known whether the number - is a signed integer, an unsigned integer or a floating-point number. - Therefore, three different types, @ref number_integer_t, @ref - number_unsigned_t and @ref number_float_t are used. - - To store unsigned integer numbers in C++, a type is defined by the - template parameter @a NumberUnsignedType which chooses the type to use. - - #### Default type - - With the default values for @a NumberUnsignedType (`uint64_t`), the - default value for @a number_unsigned_t is: - - @code {.cpp} - uint64_t - @endcode - - #### Default behavior - - - The restrictions about leading zeros is not enforced in C++. Instead, - leading zeros in integer literals lead to an interpretation as octal - number. Internally, the value will be stored as decimal number. For - instance, the C++ integer literal `010` will be serialized to `8`. - During deserialization, leading zeros yield an error. - - Not-a-number (NaN) values will be serialized to `null`. - - #### Limits - - [RFC 7159](http://rfc7159.net/rfc7159) specifies: - > An implementation may set limits on the range and precision of numbers. - - When the default type is used, the maximal integer number that can be - stored is `18446744073709551615` (UINT64_MAX) and the minimal integer - number that can be stored is `0`. Integer numbers that are out of range - will yield over/underflow when used in a constructor. During - deserialization, too large or small integer numbers will be automatically - be stored as @ref number_integer_t or @ref number_float_t. - - [RFC 7159](http://rfc7159.net/rfc7159) further states: - > Note that when such software is used, numbers that are integers and are - > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense - > that implementations will agree exactly on their numeric values. - - As this range is a subrange (when considered in conjunction with the - number_integer_t type) of the exactly supported range [0, UINT64_MAX], - this class's integer type is interoperable. - - #### Storage - - Integer number values are stored directly inside a @ref basic_json type. - - @sa @ref number_float_t -- type for number values (floating-point) - @sa @ref number_integer_t -- type for number values (integer) - - @since version 2.0.0 - */ - using number_unsigned_t = NumberUnsignedType; - - /*! - @brief a type for a number (floating-point) - - [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: - > The representation of numbers is similar to that used in most - > programming languages. A number is represented in base 10 using decimal - > digits. It contains an integer component that may be prefixed with an - > optional minus sign, which may be followed by a fraction part and/or an - > exponent part. Leading zeros are not allowed. (...) Numeric values that - > cannot be represented in the grammar below (such as Infinity and NaN) - > are not permitted. - - This description includes both integer and floating-point numbers. - However, C++ allows more precise storage if it is known whether the number - is a signed integer, an unsigned integer or a floating-point number. - Therefore, three different types, @ref number_integer_t, @ref - number_unsigned_t and @ref number_float_t are used. - - To store floating-point numbers in C++, a type is defined by the template - parameter @a NumberFloatType which chooses the type to use. - - #### Default type - - With the default values for @a NumberFloatType (`double`), the default - value for @a number_float_t is: - - @code {.cpp} - double - @endcode - - #### Default behavior - - - The restrictions about leading zeros is not enforced in C++. Instead, - leading zeros in floating-point literals will be ignored. Internally, - the value will be stored as decimal number. For instance, the C++ - floating-point literal `01.2` will be serialized to `1.2`. During - deserialization, leading zeros yield an error. - - Not-a-number (NaN) values will be serialized to `null`. - - #### Limits - - [RFC 7159](http://rfc7159.net/rfc7159) states: - > This specification allows implementations to set limits on the range and - > precision of numbers accepted. Since software that implements IEEE - > 754-2008 binary64 (double precision) numbers is generally available and - > widely used, good interoperability can be achieved by implementations - > that expect no more precision or range than these provide, in the sense - > that implementations will approximate JSON numbers within the expected - > precision. - - This implementation does exactly follow this approach, as it uses double - precision floating-point numbers. Note values smaller than - `-1.79769313486232e+308` and values greater than `1.79769313486232e+308` - will be stored as NaN internally and be serialized to `null`. - - #### Storage - - Floating-point number values are stored directly inside a @ref basic_json - type. - - @sa @ref number_integer_t -- type for number values (integer) - - @sa @ref number_unsigned_t -- type for number values (unsigned integer) - - @since version 1.0.0 - */ - using number_float_t = NumberFloatType; - - /// @} - - private: - - /// helper for exception-safe object creation - template - static T* create(Args&& ... args) - { - AllocatorType alloc; - auto deleter = [&](T * object) - { - alloc.deallocate(object, 1); - }; - std::unique_ptr object(alloc.allocate(1), deleter); - alloc.construct(object.get(), std::forward(args)...); - assert(object != nullptr); - return object.release(); - } - - //////////////////////// - // JSON value storage // - //////////////////////// - - /*! - @brief a JSON value - - The actual storage for a JSON value of the @ref basic_json class. This - union combines the different storage types for the JSON value types - defined in @ref value_t. - - JSON type | value_t type | used type - --------- | --------------- | ------------------------ - object | object | pointer to @ref object_t - array | array | pointer to @ref array_t - string | string | pointer to @ref string_t - boolean | boolean | @ref boolean_t - number | number_integer | @ref number_integer_t - number | number_unsigned | @ref number_unsigned_t - number | number_float | @ref number_float_t - null | null | *no value is stored* - - @note Variable-length types (objects, arrays, and strings) are stored as - pointers. The size of the union should not exceed 64 bits if the default - value types are used. - - @since version 1.0.0 - */ - union json_value - { - /// object (stored with pointer to save storage) - object_t* object; - /// array (stored with pointer to save storage) - array_t* array; - /// string (stored with pointer to save storage) - string_t* string; - /// boolean - boolean_t boolean; - /// number (integer) - number_integer_t number_integer; - /// number (unsigned integer) - number_unsigned_t number_unsigned; - /// number (floating-point) - number_float_t number_float; - - /// default constructor (for null values) - json_value() = default; - /// constructor for booleans - json_value(boolean_t v) noexcept : boolean(v) {} - /// constructor for numbers (integer) - json_value(number_integer_t v) noexcept : number_integer(v) {} - /// constructor for numbers (unsigned) - json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} - /// constructor for numbers (floating-point) - json_value(number_float_t v) noexcept : number_float(v) {} - /// constructor for empty values of a given type - json_value(value_t t) - { - switch (t) - { - case value_t::object: - { - object = create(); - break; - } - - case value_t::array: - { - array = create(); - break; - } - - case value_t::string: - { - string = create(""); - break; - } - - case value_t::boolean: - { - boolean = boolean_t(false); - break; - } - - case value_t::number_integer: - { - number_integer = number_integer_t(0); - break; - } - - case value_t::number_unsigned: - { - number_unsigned = number_unsigned_t(0); - break; - } - - case value_t::number_float: - { - number_float = number_float_t(0.0); - break; - } - - case value_t::null: - { - break; - } - - default: - { - if (JSON_UNLIKELY(t == value_t::null)) - { - JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 2.1.1")); // LCOV_EXCL_LINE - } - break; - } - } - } - - /// constructor for strings - json_value(const string_t& value) - { - string = create(value); - } - - /// constructor for objects - json_value(const object_t& value) - { - object = create(value); - } - - /// constructor for arrays - json_value(const array_t& value) - { - array = create(value); - } - }; - - /*! - @brief checks the class invariants - - This function asserts the class invariants. It needs to be called at the - end of every constructor to make sure that created objects respect the - invariant. Furthermore, it has to be called each time the type of a JSON - value is changed, because the invariant expresses a relationship between - @a m_type and @a m_value. - */ - void assert_invariant() const - { - assert(m_type != value_t::object or m_value.object != nullptr); - assert(m_type != value_t::array or m_value.array != nullptr); - assert(m_type != value_t::string or m_value.string != nullptr); - } - - public: - ////////////////////////// - // JSON parser callback // - ////////////////////////// - - /*! - @brief JSON callback events - - This enumeration lists the parser events that can trigger calling a - callback function of type @ref parser_callback_t during parsing. - - @image html callback_events.png "Example when certain parse events are triggered" - - @since version 1.0.0 - */ - enum class parse_event_t : uint8_t - { - /// the parser read `{` and started to process a JSON object - object_start, - /// the parser read `}` and finished processing a JSON object - object_end, - /// the parser read `[` and started to process a JSON array - array_start, - /// the parser read `]` and finished processing a JSON array - array_end, - /// the parser read a key of a value in an object - key, - /// the parser finished reading a JSON value - value - }; - - /*! - @brief per-element parser callback type - - With a parser callback function, the result of parsing a JSON text can be - influenced. When passed to @ref parse(std::istream&, const - parser_callback_t) or @ref parse(const CharT, const parser_callback_t), - it is called on certain events (passed as @ref parse_event_t via parameter - @a event) with a set recursion depth @a depth and context JSON value - @a parsed. The return value of the callback function is a boolean - indicating whether the element that emitted the callback shall be kept or - not. - - We distinguish six scenarios (determined by the event type) in which the - callback function can be called. The following table describes the values - of the parameters @a depth, @a event, and @a parsed. - - parameter @a event | description | parameter @a depth | parameter @a parsed - ------------------ | ----------- | ------------------ | ------------------- - parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded - parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key - parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object - parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded - parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array - parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value - - @image html callback_events.png "Example when certain parse events are triggered" - - Discarding a value (i.e., returning `false`) has different effects - depending on the context in which function was called: - - - Discarded values in structured types are skipped. That is, the parser - will behave as if the discarded value was never read. - - In case a value outside a structured type is skipped, it is replaced - with `null`. This case happens if the top-level element is skipped. - - @param[in] depth the depth of the recursion during parsing - - @param[in] event an event of type parse_event_t indicating the context in - the callback function has been called - - @param[in,out] parsed the current intermediate parse result; note that - writing to this value has no effect for parse_event_t::key events - - @return Whether the JSON value which called the function during parsing - should be kept (`true`) or not (`false`). In the latter case, it is either - skipped completely or replaced by an empty discarded object. - - @sa @ref parse(std::istream&, parser_callback_t) or - @ref parse(const CharT, const parser_callback_t) for examples - - @since version 1.0.0 - */ - using parser_callback_t = std::function; - - - ////////////////// - // constructors // - ////////////////// - - /// @name constructors and destructors - /// Constructors of class @ref basic_json, copy/move constructor, copy - /// assignment, static functions creating objects, and the destructor. - /// @{ - - /*! - @brief create an empty value with a given type - - Create an empty JSON value with a given type. The value will be default - initialized with an empty value which depends on the type: - - Value type | initial value - ----------- | ------------- - null | `null` - boolean | `false` - string | `""` - number | `0` - object | `{}` - array | `[]` - - @param[in] value_type the type of the value to create - - @complexity Constant. - - @liveexample{The following code shows the constructor for different @ref - value_t values,basic_json__value_t} - - @since version 1.0.0 - */ - basic_json(const value_t value_type) - : m_type(value_type), m_value(value_type) - { - assert_invariant(); - } - - /*! - @brief create a null object - - Create a `null` JSON value. It either takes a null pointer as parameter - (explicitly creating `null`) or no parameter (implicitly creating `null`). - The passed null pointer itself is not read -- it is only used to choose - the right constructor. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this constructor never throws - exceptions. - - @liveexample{The following code shows the constructor with and without a - null pointer parameter.,basic_json__nullptr_t} - - @since version 1.0.0 - */ - basic_json(std::nullptr_t = nullptr) noexcept - : basic_json(value_t::null) - { - assert_invariant(); - } - - /*! - @brief create a JSON value - - This is a "catch all" constructor for all compatible JSON types; that is, - types for which a `to_json()` method exsits. The constructor forwards the - parameter @a val to that method (to `json_serializer::to_json` method - with `U = uncvref_t`, to be exact). - - Template type @a CompatibleType includes, but is not limited to, the - following types: - - **arrays**: @ref array_t and all kinds of compatible containers such as - `std::vector`, `std::deque`, `std::list`, `std::forward_list`, - `std::array`, `std::set`, `std::unordered_set`, `std::multiset`, and - `unordered_multiset` with a `value_type` from which a @ref basic_json - value can be constructed. - - **objects**: @ref object_t and all kinds of compatible associative - containers such as `std::map`, `std::unordered_map`, `std::multimap`, - and `std::unordered_multimap` with a `key_type` compatible to - @ref string_t and a `value_type` from which a @ref basic_json value can - be constructed. - - **strings**: @ref string_t, string literals, and all compatible string - containers can be used. - - **numbers**: @ref number_integer_t, @ref number_unsigned_t, - @ref number_float_t, and all convertible number types such as `int`, - `size_t`, `int64_t`, `float` or `double` can be used. - - **boolean**: @ref boolean_t / `bool` can be used. - - See the examples below. - - @tparam CompatibleType a type such that: - - @a CompatibleType is not derived from `std::istream`, - - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move - constructors), - - @a CompatibleType is not a @ref basic_json nested type (e.g., - @ref json_pointer, @ref iterator, etc ...) - - @ref @ref json_serializer has a - `to_json(basic_json_t&, CompatibleType&&)` method - - @tparam U = `uncvref_t` - - @param[in] val the value to be forwarded - - @complexity Usually linear in the size of the passed @a val, also - depending on the implementation of the called `to_json()` - method. - - @throw what `json_serializer::to_json()` throws - - @liveexample{The following code shows the constructor with several - compatible types.,basic_json__CompatibleType} - - @since version 2.1.0 - */ - template, - detail::enable_if_t::value and - not std::is_same::value and - not detail::is_basic_json_nested_type< - basic_json_t, U>::value and - detail::has_to_json::value, - int> = 0> - basic_json(CompatibleType && val) noexcept(noexcept(JSONSerializer::to_json( - std::declval(), std::forward(val)))) - { - JSONSerializer::to_json(*this, std::forward(val)); - assert_invariant(); - } - - /*! - @brief create a container (array or object) from an initializer list - - Creates a JSON value of type array or object from the passed initializer - list @a init. In case @a type_deduction is `true` (default), the type of - the JSON value to be created is deducted from the initializer list @a init - according to the following rules: - - 1. If the list is empty, an empty JSON object value `{}` is created. - 2. If the list consists of pairs whose first element is a string, a JSON - object value is created where the first elements of the pairs are - treated as keys and the second elements are as values. - 3. In all other cases, an array is created. - - The rules aim to create the best fit between a C++ initializer list and - JSON values. The rationale is as follows: - - 1. The empty initializer list is written as `{}` which is exactly an empty - JSON object. - 2. C++ has now way of describing mapped types other than to list a list of - pairs. As JSON requires that keys must be of type string, rule 2 is the - weakest constraint one can pose on initializer lists to interpret them - as an object. - 3. In all other cases, the initializer list could not be interpreted as - JSON object type, so interpreting it as JSON array type is safe. - - With the rules described above, the following JSON values cannot be - expressed by an initializer list: - - - the empty array (`[]`): use @ref array(std::initializer_list) - with an empty initializer list in this case - - arrays whose elements satisfy rule 2: use @ref - array(std::initializer_list) with the same initializer list - in this case - - @note When used without parentheses around an empty initializer list, @ref - basic_json() is called instead of this function, yielding the JSON null - value. - - @param[in] init initializer list with JSON values - - @param[in] type_deduction internal parameter; when set to `true`, the type - of the JSON value is deducted from the initializer list @a init; when set - to `false`, the type provided via @a manual_type is forced. This mode is - used by the functions @ref array(std::initializer_list) and - @ref object(std::initializer_list). - - @param[in] manual_type internal parameter; when @a type_deduction is set - to `false`, the created JSON value will use the provided type (only @ref - value_t::array and @ref value_t::object are valid); when @a type_deduction - is set to `true`, this parameter has no effect - - @throw type_error.301 if @a type_deduction is `false`, @a manual_type is - `value_t::object`, but @a init contains an element which is not a pair - whose first element is a string. In this case, the constructor could not - create an object. If @a type_deduction would have be `true`, an array - would have been created. See @ref object(std::initializer_list) - for an example. - - @complexity Linear in the size of the initializer list @a init. - - @liveexample{The example below shows how JSON values are created from - initializer lists.,basic_json__list_init_t} - - @sa @ref array(std::initializer_list) -- create a JSON array - value from an initializer list - @sa @ref object(std::initializer_list) -- create a JSON object - value from an initializer list - - @since version 1.0.0 - */ - basic_json(std::initializer_list init, - bool type_deduction = true, - value_t manual_type = value_t::array) - { - // check if each element is an array with two elements whose first - // element is a string - bool is_an_object = std::all_of(init.begin(), init.end(), - [](const basic_json & element) - { - return element.is_array() and element.size() == 2 and element[0].is_string(); - }); - - // adjust type if type deduction is not wanted - if (not type_deduction) - { - // if array is wanted, do not create an object though possible - if (manual_type == value_t::array) - { - is_an_object = false; - } - - // if object is wanted but impossible, throw an exception - if (manual_type == value_t::object and not is_an_object) - { - JSON_THROW(type_error::create(301, "cannot create object from initializer list")); - } - } - - if (is_an_object) - { - // the initializer list is a list of pairs -> create object - m_type = value_t::object; - m_value = value_t::object; - - std::for_each(init.begin(), init.end(), [this](const basic_json & element) - { - m_value.object->emplace(*(element[0].m_value.string), element[1]); - }); - } - else - { - // the initializer list describes an array -> create array - m_type = value_t::array; - m_value.array = create(init); - } - - assert_invariant(); - } - - /*! - @brief explicitly create an array from an initializer list - - Creates a JSON array value from a given initializer list. That is, given a - list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the - initializer list is empty, the empty array `[]` is created. - - @note This function is only needed to express two edge cases that cannot - be realized with the initializer list constructor (@ref - basic_json(std::initializer_list, bool, value_t)). These cases - are: - 1. creating an array whose elements are all pairs whose first element is a - string -- in this case, the initializer list constructor would create an - object, taking the first elements as keys - 2. creating an empty array -- passing the empty initializer list to the - initializer list constructor yields an empty object - - @param[in] init initializer list with JSON values to create an array from - (optional) - - @return JSON array value - - @complexity Linear in the size of @a init. - - @liveexample{The following code shows an example for the `array` - function.,array} - - @sa @ref basic_json(std::initializer_list, bool, value_t) -- - create a JSON value from an initializer list - @sa @ref object(std::initializer_list) -- create a JSON object - value from an initializer list - - @since version 1.0.0 - */ - static basic_json array(std::initializer_list init = - std::initializer_list()) - { - return basic_json(init, false, value_t::array); - } - - /*! - @brief explicitly create an object from an initializer list - - Creates a JSON object value from a given initializer list. The initializer - lists elements must be pairs, and their first elements must be strings. If - the initializer list is empty, the empty object `{}` is created. - - @note This function is only added for symmetry reasons. In contrast to the - related function @ref array(std::initializer_list), there are - no cases which can only be expressed by this function. That is, any - initializer list @a init can also be passed to the initializer list - constructor @ref basic_json(std::initializer_list, bool, value_t). - - @param[in] init initializer list to create an object from (optional) - - @return JSON object value - - @throw type_error.301 if @a init is not a list of pairs whose first - elements are strings. In this case, no object can be created. When such a - value is passed to @ref basic_json(std::initializer_list, bool, value_t), - an array would have been created from the passed initializer list @a init. - See example below. - - @complexity Linear in the size of @a init. - - @liveexample{The following code shows an example for the `object` - function.,object} - - @sa @ref basic_json(std::initializer_list, bool, value_t) -- - create a JSON value from an initializer list - @sa @ref array(std::initializer_list) -- create a JSON array - value from an initializer list - - @since version 1.0.0 - */ - static basic_json object(std::initializer_list init = - std::initializer_list()) - { - return basic_json(init, false, value_t::object); - } - - /*! - @brief construct an array with count copies of given value - - Constructs a JSON array value by creating @a cnt copies of a passed value. - In case @a cnt is `0`, an empty array is created. As postcondition, - `std::distance(begin(),end()) == cnt` holds. - - @param[in] cnt the number of JSON copies of @a val to create - @param[in] val the JSON value to copy - - @complexity Linear in @a cnt. - - @liveexample{The following code shows examples for the @ref - basic_json(size_type\, const basic_json&) - constructor.,basic_json__size_type_basic_json} - - @since version 1.0.0 - */ - basic_json(size_type cnt, const basic_json& val) - : m_type(value_t::array) - { - m_value.array = create(cnt, val); - assert_invariant(); - } - - /*! - @brief construct a JSON container given an iterator range - - Constructs the JSON value with the contents of the range `[first, last)`. - The semantics depends on the different types a JSON value can have: - - In case of primitive types (number, boolean, or string), @a first must - be `begin()` and @a last must be `end()`. In this case, the value is - copied. Otherwise, invalid_iterator.204 is thrown. - - In case of structured types (array, object), the constructor behaves as - similar versions for `std::vector`. - - In case of a null type, invalid_iterator.206 is thrown. - - @tparam InputIT an input iterator type (@ref iterator or @ref - const_iterator) - - @param[in] first begin of the range to copy from (included) - @param[in] last end of the range to copy from (excluded) - - @pre Iterators @a first and @a last must be initialized. **This - precondition is enforced with an assertion.** - - @pre Range `[first, last)` is valid. Usually, this precondition cannot be - checked efficiently. Only certain edge cases are detected; see the - description of the exceptions below. - - @throw invalid_iterator.201 if iterators @a first and @a last are not - compatible (i.e., do not belong to the same JSON value). In this case, - the range `[first, last)` is undefined. - @throw invalid_iterator.204 if iterators @a first and @a last belong to a - primitive type (number, boolean, or string), but @a first does not point - to the first element any more. In this case, the range `[first, last)` is - undefined. See example code below. - @throw invalid_iterator.206 if iterators @a first and @a last belong to a - null value. In this case, the range `[first, last)` is undefined. - - @complexity Linear in distance between @a first and @a last. - - @liveexample{The example below shows several ways to create JSON values by - specifying a subrange with iterators.,basic_json__InputIt_InputIt} - - @since version 1.0.0 - */ - template::value or - std::is_same::value, int>::type = 0> - basic_json(InputIT first, InputIT last) - { - assert(first.m_object != nullptr); - assert(last.m_object != nullptr); - - // make sure iterator fits the current value - if (first.m_object != last.m_object) - { - JSON_THROW(invalid_iterator::create(201, "iterators are not compatible")); - } - - // copy type from first iterator - m_type = first.m_object->m_type; - - // check if iterator range is complete for primitive values - switch (m_type) - { - case value_t::boolean: - case value_t::number_float: - case value_t::number_integer: - case value_t::number_unsigned: - case value_t::string: - { - if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end()) - { - JSON_THROW(invalid_iterator::create(204, "iterators out of range")); - } - break; - } - - default: - { - break; - } - } - - switch (m_type) - { - case value_t::number_integer: - { - m_value.number_integer = first.m_object->m_value.number_integer; - break; - } - - case value_t::number_unsigned: - { - m_value.number_unsigned = first.m_object->m_value.number_unsigned; - break; - } - - case value_t::number_float: - { - m_value.number_float = first.m_object->m_value.number_float; - break; - } - - case value_t::boolean: - { - m_value.boolean = first.m_object->m_value.boolean; - break; - } - - case value_t::string: - { - m_value = *first.m_object->m_value.string; - break; - } - - case value_t::object: - { - m_value.object = create(first.m_it.object_iterator, - last.m_it.object_iterator); - break; - } - - case value_t::array: - { - m_value.array = create(first.m_it.array_iterator, - last.m_it.array_iterator); - break; - } - - default: - { - JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + - first.m_object->type_name())); - } - } - - assert_invariant(); - } - - - /////////////////////////////////////// - // other constructors and destructor // - /////////////////////////////////////// - - /*! - @brief copy constructor - - Creates a copy of a given JSON value. - - @param[in] other the JSON value to copy - - @complexity Linear in the size of @a other. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is linear. - - As postcondition, it holds: `other == basic_json(other)`. - - @liveexample{The following code shows an example for the copy - constructor.,basic_json__basic_json} - - @since version 1.0.0 - */ - basic_json(const basic_json& other) - : m_type(other.m_type) - { - // check of passed value is valid - other.assert_invariant(); - - switch (m_type) - { - case value_t::object: - { - m_value = *other.m_value.object; - break; - } - - case value_t::array: - { - m_value = *other.m_value.array; - break; - } - - case value_t::string: - { - m_value = *other.m_value.string; - break; - } - - case value_t::boolean: - { - m_value = other.m_value.boolean; - break; - } - - case value_t::number_integer: - { - m_value = other.m_value.number_integer; - break; - } - - case value_t::number_unsigned: - { - m_value = other.m_value.number_unsigned; - break; - } - - case value_t::number_float: - { - m_value = other.m_value.number_float; - break; - } - - default: - { - break; - } - } - - assert_invariant(); - } - - /*! - @brief move constructor - - Move constructor. Constructs a JSON value with the contents of the given - value @a other using move semantics. It "steals" the resources from @a - other and leaves it as JSON null value. - - @param[in,out] other value to move to this object - - @post @a other is a JSON null value - - @complexity Constant. - - @liveexample{The code below shows the move constructor explicitly called - via std::move.,basic_json__moveconstructor} - - @since version 1.0.0 - */ - basic_json(basic_json&& other) noexcept - : m_type(std::move(other.m_type)), - m_value(std::move(other.m_value)) - { - // check that passed value is valid - other.assert_invariant(); - - // invalidate payload - other.m_type = value_t::null; - other.m_value = {}; - - assert_invariant(); - } - - /*! - @brief copy assignment - - Copy assignment operator. Copies a JSON value via the "copy and swap" - strategy: It is expressed in terms of the copy constructor, destructor, - and the swap() member function. - - @param[in] other value to copy from - - @complexity Linear. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is linear. - - @liveexample{The code below shows and example for the copy assignment. It - creates a copy of value `a` which is then swapped with `b`. Finally\, the - copy of `a` (which is the null value after the swap) is - destroyed.,basic_json__copyassignment} - - @since version 1.0.0 - */ - reference& operator=(basic_json other) noexcept ( - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value and - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value - ) - { - // check that passed value is valid - other.assert_invariant(); - - using std::swap; - swap(m_type, other.m_type); - swap(m_value, other.m_value); - - assert_invariant(); - return *this; - } - - /*! - @brief destructor - - Destroys the JSON value and frees all allocated memory. - - @complexity Linear. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is linear. - - All stored elements are destroyed and all memory is freed. - - @since version 1.0.0 - */ - ~basic_json() - { - assert_invariant(); - - switch (m_type) - { - case value_t::object: - { - AllocatorType alloc; - alloc.destroy(m_value.object); - alloc.deallocate(m_value.object, 1); - break; - } - - case value_t::array: - { - AllocatorType alloc; - alloc.destroy(m_value.array); - alloc.deallocate(m_value.array, 1); - break; - } - - case value_t::string: - { - AllocatorType alloc; - alloc.destroy(m_value.string); - alloc.deallocate(m_value.string, 1); - break; - } - - default: - { - // all other types need no specific destructor - break; - } - } - } - - /// @} - - public: - /////////////////////// - // object inspection // - /////////////////////// - - /// @name object inspection - /// Functions to inspect the type of a JSON value. - /// @{ - - /*! - @brief serialization - - Serialization function for JSON values. The function tries to mimic - Python's `json.dumps()` function, and currently supports its @a indent - parameter. - - @param[in] indent If indent is nonnegative, then array elements and object - members will be pretty-printed with that indent level. An indent level of - `0` will only insert newlines. `-1` (the default) selects the most compact - representation. - @param[in] indent_char The character to use for indentation of @a indent is - greate than `0`. The default is ` ` (space). - - @return string containing the serialization of the JSON value - - @complexity Linear. - - @liveexample{The following example shows the effect of different @a indent - parameters to the result of the serialization.,dump} - - @see https://docs.python.org/2/library/json.html#json.dump - - @since version 1.0.0; indentaction character added in version 3.0.0 - */ - string_t dump(const int indent = -1, const char indent_char = ' ') const - { - string_t result; - serializer s(output_adapter::create(result), indent_char); - - if (indent >= 0) - { - s.dump(*this, true, static_cast(indent)); - } - else - { - s.dump(*this, false, 0); - } - - return result; - } - - /*! - @brief return the type of the JSON value (explicit) - - Return the type of the JSON value as a value from the @ref value_t - enumeration. - - @return the type of the JSON value - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `type()` for all JSON - types.,type} - - @since version 1.0.0 - */ - constexpr value_t type() const noexcept - { - return m_type; - } - - /*! - @brief return whether type is primitive - - This function returns true iff the JSON type is primitive (string, number, - boolean, or null). - - @return `true` if type is primitive (string, number, boolean, or null), - `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_primitive()` for all JSON - types.,is_primitive} - - @sa @ref is_structured() -- returns whether JSON value is structured - @sa @ref is_null() -- returns whether JSON value is `null` - @sa @ref is_string() -- returns whether JSON value is a string - @sa @ref is_boolean() -- returns whether JSON value is a boolean - @sa @ref is_number() -- returns whether JSON value is a number - - @since version 1.0.0 - */ - constexpr bool is_primitive() const noexcept - { - return is_null() or is_string() or is_boolean() or is_number(); - } - - /*! - @brief return whether type is structured - - This function returns true iff the JSON type is structured (array or - object). - - @return `true` if type is structured (array or object), `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_structured()` for all JSON - types.,is_structured} - - @sa @ref is_primitive() -- returns whether value is primitive - @sa @ref is_array() -- returns whether value is an array - @sa @ref is_object() -- returns whether value is an object - - @since version 1.0.0 - */ - constexpr bool is_structured() const noexcept - { - return is_array() or is_object(); - } - - /*! - @brief return whether value is null - - This function returns true iff the JSON value is null. - - @return `true` if type is null, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_null()` for all JSON - types.,is_null} - - @since version 1.0.0 - */ - constexpr bool is_null() const noexcept - { - return m_type == value_t::null; - } - - /*! - @brief return whether value is a boolean - - This function returns true iff the JSON value is a boolean. - - @return `true` if type is boolean, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_boolean()` for all JSON - types.,is_boolean} - - @since version 1.0.0 - */ - constexpr bool is_boolean() const noexcept - { - return m_type == value_t::boolean; - } - - /*! - @brief return whether value is a number - - This function returns true iff the JSON value is a number. This includes - both integer and floating-point values. - - @return `true` if type is number (regardless whether integer, unsigned - integer or floating-type), `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_number()` for all JSON - types.,is_number} - - @sa @ref is_number_integer() -- check if value is an integer or unsigned - integer number - @sa @ref is_number_unsigned() -- check if value is an unsigned integer - number - @sa @ref is_number_float() -- check if value is a floating-point number - - @since version 1.0.0 - */ - constexpr bool is_number() const noexcept - { - return is_number_integer() or is_number_float(); - } - - /*! - @brief return whether value is an integer number - - This function returns true iff the JSON value is an integer or unsigned - integer number. This excludes floating-point values. - - @return `true` if type is an integer or unsigned integer number, `false` - otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_number_integer()` for all - JSON types.,is_number_integer} - - @sa @ref is_number() -- check if value is a number - @sa @ref is_number_unsigned() -- check if value is an unsigned integer - number - @sa @ref is_number_float() -- check if value is a floating-point number - - @since version 1.0.0 - */ - constexpr bool is_number_integer() const noexcept - { - return m_type == value_t::number_integer or m_type == value_t::number_unsigned; - } - - /*! - @brief return whether value is an unsigned integer number - - This function returns true iff the JSON value is an unsigned integer - number. This excludes floating-point and (signed) integer values. - - @return `true` if type is an unsigned integer number, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_number_unsigned()` for all - JSON types.,is_number_unsigned} - - @sa @ref is_number() -- check if value is a number - @sa @ref is_number_integer() -- check if value is an integer or unsigned - integer number - @sa @ref is_number_float() -- check if value is a floating-point number - - @since version 2.0.0 - */ - constexpr bool is_number_unsigned() const noexcept - { - return m_type == value_t::number_unsigned; - } - - /*! - @brief return whether value is a floating-point number - - This function returns true iff the JSON value is a floating-point number. - This excludes integer and unsigned integer values. - - @return `true` if type is a floating-point number, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_number_float()` for all - JSON types.,is_number_float} - - @sa @ref is_number() -- check if value is number - @sa @ref is_number_integer() -- check if value is an integer number - @sa @ref is_number_unsigned() -- check if value is an unsigned integer - number - - @since version 1.0.0 - */ - constexpr bool is_number_float() const noexcept - { - return m_type == value_t::number_float; - } - - /*! - @brief return whether value is an object - - This function returns true iff the JSON value is an object. - - @return `true` if type is object, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_object()` for all JSON - types.,is_object} - - @since version 1.0.0 - */ - constexpr bool is_object() const noexcept - { - return m_type == value_t::object; - } - - /*! - @brief return whether value is an array - - This function returns true iff the JSON value is an array. - - @return `true` if type is array, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_array()` for all JSON - types.,is_array} - - @since version 1.0.0 - */ - constexpr bool is_array() const noexcept - { - return m_type == value_t::array; - } - - /*! - @brief return whether value is a string - - This function returns true iff the JSON value is a string. - - @return `true` if type is string, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_string()` for all JSON - types.,is_string} - - @since version 1.0.0 - */ - constexpr bool is_string() const noexcept - { - return m_type == value_t::string; - } - - /*! - @brief return whether value is discarded - - This function returns true iff the JSON value was discarded during parsing - with a callback function (see @ref parser_callback_t). - - @note This function will always be `false` for JSON values after parsing. - That is, discarded values can only occur during parsing, but will be - removed when inside a structured value or replaced by null in other cases. - - @return `true` if type is discarded, `false` otherwise. - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies `is_discarded()` for all JSON - types.,is_discarded} - - @since version 1.0.0 - */ - constexpr bool is_discarded() const noexcept - { - return m_type == value_t::discarded; - } - - /*! - @brief return the type of the JSON value (implicit) - - Implicitly return the type of the JSON value as a value from the @ref - value_t enumeration. - - @return the type of the JSON value - - @complexity Constant. - - @exceptionsafety No-throw guarantee: this member function never throws - exceptions. - - @liveexample{The following code exemplifies the @ref value_t operator for - all JSON types.,operator__value_t} - - @since version 1.0.0 - */ - constexpr operator value_t() const noexcept - { - return m_type; - } - - /// @} - - private: - ////////////////// - // value access // - ////////////////// - - /// get a boolean (explicit) - boolean_t get_impl(boolean_t* /*unused*/) const - { - if (is_boolean()) - { - return m_value.boolean; - } - - JSON_THROW(type_error::create(302, "type must be boolean, but is " + type_name())); - } - - /// get a pointer to the value (object) - object_t* get_impl_ptr(object_t* /*unused*/) noexcept - { - return is_object() ? m_value.object : nullptr; - } - - /// get a pointer to the value (object) - constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept - { - return is_object() ? m_value.object : nullptr; - } - - /// get a pointer to the value (array) - array_t* get_impl_ptr(array_t* /*unused*/) noexcept - { - return is_array() ? m_value.array : nullptr; - } - - /// get a pointer to the value (array) - constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept - { - return is_array() ? m_value.array : nullptr; - } - - /// get a pointer to the value (string) - string_t* get_impl_ptr(string_t* /*unused*/) noexcept - { - return is_string() ? m_value.string : nullptr; - } - - /// get a pointer to the value (string) - constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept - { - return is_string() ? m_value.string : nullptr; - } - - /// get a pointer to the value (boolean) - boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept - { - return is_boolean() ? &m_value.boolean : nullptr; - } - - /// get a pointer to the value (boolean) - constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept - { - return is_boolean() ? &m_value.boolean : nullptr; - } - - /// get a pointer to the value (integer number) - number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept - { - return is_number_integer() ? &m_value.number_integer : nullptr; - } - - /// get a pointer to the value (integer number) - constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept - { - return is_number_integer() ? &m_value.number_integer : nullptr; - } - - /// get a pointer to the value (unsigned number) - number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept - { - return is_number_unsigned() ? &m_value.number_unsigned : nullptr; - } - - /// get a pointer to the value (unsigned number) - constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept - { - return is_number_unsigned() ? &m_value.number_unsigned : nullptr; - } - - /// get a pointer to the value (floating-point number) - number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept - { - return is_number_float() ? &m_value.number_float : nullptr; - } - - /// get a pointer to the value (floating-point number) - constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept - { - return is_number_float() ? &m_value.number_float : nullptr; - } - - /*! - @brief helper function to implement get_ref() - - This funcion helps to implement get_ref() without code duplication for - const and non-const overloads - - @tparam ThisType will be deduced as `basic_json` or `const basic_json` - - @throw type_error.303 if ReferenceType does not match underlying value - type of the current JSON - */ - template - static ReferenceType get_ref_impl(ThisType& obj) - { - // helper type - using PointerType = typename std::add_pointer::type; - - // delegate the call to get_ptr<>() - auto ptr = obj.template get_ptr(); - - if (ptr != nullptr) - { - return *ptr; - } - - JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + obj.type_name())); - } - - public: - /// @name value access - /// Direct access to the stored value of a JSON value. - /// @{ - - /*! - @brief get special-case overload - - This overloads avoids a lot of template boilerplate, it can be seen as the - identity method - - @tparam BasicJsonType == @ref basic_json - - @return a copy of *this - - @complexity Constant. - - @since version 2.1.0 - */ - template < - typename BasicJsonType, - detail::enable_if_t::type, - basic_json_t>::value, - int> = 0 > - basic_json get() const - { - return *this; - } - - /*! - @brief get a value (explicit) - - Explicit type conversion between the JSON value and a compatible value - which is [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) - and [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). - The value is converted by calling the @ref json_serializer - `from_json()` method. - - The function is equivalent to executing - @code {.cpp} - ValueType ret; - JSONSerializer::from_json(*this, ret); - return ret; - @endcode - - This overloads is chosen if: - - @a ValueType is not @ref basic_json, - - @ref json_serializer has a `from_json()` method of the form - `void from_json(const basic_json&, ValueType&)`, and - - @ref json_serializer does not have a `from_json()` method of - the form `ValueType from_json(const basic_json&)` - - @tparam ValueTypeCV the provided value type - @tparam ValueType the returned value type - - @return copy of the JSON value, converted to @a ValueType - - @throw what @ref json_serializer `from_json()` method throws - - @liveexample{The example below shows several conversions from JSON values - to other types. There a few things to note: (1) Floating-point numbers can - be converted to integers\, (2) A JSON array can be converted to a standard - `std::vector`\, (3) A JSON object can be converted to C++ - associative containers such as `std::unordered_map`.,get__ValueType_const} - - @since version 2.1.0 - */ - template < - typename ValueTypeCV, - typename ValueType = detail::uncvref_t, - detail::enable_if_t < - not std::is_same::value and - detail::has_from_json::value and - not detail::has_non_default_from_json::value, - int > = 0 > - ValueType get() const noexcept(noexcept( - JSONSerializer::from_json(std::declval(), std::declval()))) - { - // we cannot static_assert on ValueTypeCV being non-const, because - // there is support for get(), which is why we - // still need the uncvref - static_assert(not std::is_reference::value, - "get() cannot be used with reference types, you might want to use get_ref()"); - static_assert(std::is_default_constructible::value, - "types must be DefaultConstructible when used with get()"); - - ValueType ret; - JSONSerializer::from_json(*this, ret); - return ret; - } - - /*! - @brief get a value (explicit); special case - - Explicit type conversion between the JSON value and a compatible value - which is **not** [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) - and **not** [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). - The value is converted by calling the @ref json_serializer - `from_json()` method. - - The function is equivalent to executing - @code {.cpp} - return JSONSerializer::from_json(*this); - @endcode - - This overloads is chosen if: - - @a ValueType is not @ref basic_json and - - @ref json_serializer has a `from_json()` method of the form - `ValueType from_json(const basic_json&)` - - @note If @ref json_serializer has both overloads of - `from_json()`, this one is chosen. - - @tparam ValueTypeCV the provided value type - @tparam ValueType the returned value type - - @return copy of the JSON value, converted to @a ValueType - - @throw what @ref json_serializer `from_json()` method throws - - @since version 2.1.0 - */ - template < - typename ValueTypeCV, - typename ValueType = detail::uncvref_t, - detail::enable_if_t::value and - detail::has_non_default_from_json::value, int> = 0 > - ValueType get() const noexcept(noexcept( - JSONSerializer::from_json(std::declval()))) - { - static_assert(not std::is_reference::value, - "get() cannot be used with reference types, you might want to use get_ref()"); - return JSONSerializer::from_json(*this); - } - - /*! - @brief get a pointer value (explicit) - - Explicit pointer access to the internally stored JSON value. No copies are - made. - - @warning The pointer becomes invalid if the underlying JSON object - changes. - - @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref - object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, - @ref number_unsigned_t, or @ref number_float_t. - - @return pointer to the internally stored JSON value if the requested - pointer type @a PointerType fits to the JSON value; `nullptr` otherwise - - @complexity Constant. - - @liveexample{The example below shows how pointers to internal values of a - JSON value can be requested. Note that no type conversions are made and a - `nullptr` is returned if the value and the requested pointer type does not - match.,get__PointerType} - - @sa @ref get_ptr() for explicit pointer-member access - - @since version 1.0.0 - */ - template::value, int>::type = 0> - PointerType get() noexcept - { - // delegate the call to get_ptr - return get_ptr(); - } - - /*! - @brief get a pointer value (explicit) - @copydoc get() - */ - template::value, int>::type = 0> - constexpr const PointerType get() const noexcept - { - // delegate the call to get_ptr - return get_ptr(); - } - - /*! - @brief get a pointer value (implicit) - - Implicit pointer access to the internally stored JSON value. No copies are - made. - - @warning Writing data to the pointee of the result yields an undefined - state. - - @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref - object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, - @ref number_unsigned_t, or @ref number_float_t. Enforced by a static - assertion. - - @return pointer to the internally stored JSON value if the requested - pointer type @a PointerType fits to the JSON value; `nullptr` otherwise - - @complexity Constant. - - @liveexample{The example below shows how pointers to internal values of a - JSON value can be requested. Note that no type conversions are made and a - `nullptr` is returned if the value and the requested pointer type does not - match.,get_ptr} - - @since version 1.0.0 - */ - template::value, int>::type = 0> - PointerType get_ptr() noexcept - { - // get the type of the PointerType (remove pointer and const) - using pointee_t = typename std::remove_const::type>::type>::type; - // make sure the type matches the allowed types - static_assert( - std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - , "incompatible pointer type"); - - // delegate the call to get_impl_ptr<>() - return get_impl_ptr(static_cast(nullptr)); - } - - /*! - @brief get a pointer value (implicit) - @copydoc get_ptr() - */ - template::value and - std::is_const::type>::value, int>::type = 0> - constexpr const PointerType get_ptr() const noexcept - { - // get the type of the PointerType (remove pointer and const) - using pointee_t = typename std::remove_const::type>::type>::type; - // make sure the type matches the allowed types - static_assert( - std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - or std::is_same::value - , "incompatible pointer type"); - - // delegate the call to get_impl_ptr<>() const - return get_impl_ptr(static_cast(nullptr)); - } - - /*! - @brief get a reference value (implicit) - - Implicit reference access to the internally stored JSON value. No copies - are made. - - @warning Writing data to the referee of the result yields an undefined - state. - - @tparam ReferenceType reference type; must be a reference to @ref array_t, - @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or - @ref number_float_t. Enforced by static assertion. - - @return reference to the internally stored JSON value if the requested - reference type @a ReferenceType fits to the JSON value; throws - type_error.303 otherwise - - @throw type_error.303 in case passed type @a ReferenceType is incompatible - with the stored JSON value; see example below - - @complexity Constant. - - @liveexample{The example shows several calls to `get_ref()`.,get_ref} - - @since version 1.1.0 - */ - template::value, int>::type = 0> - ReferenceType get_ref() - { - // delegate call to get_ref_impl - return get_ref_impl(*this); - } - - /*! - @brief get a reference value (implicit) - @copydoc get_ref() - */ - template::value and - std::is_const::type>::value, int>::type = 0> - ReferenceType get_ref() const - { - // delegate call to get_ref_impl - return get_ref_impl(*this); - } - - /*! - @brief get a value (implicit) - - Implicit type conversion between the JSON value and a compatible value. - The call is realized by calling @ref get() const. - - @tparam ValueType non-pointer type compatible to the JSON value, for - instance `int` for JSON integer numbers, `bool` for JSON booleans, or - `std::vector` types for JSON arrays. The character type of @ref string_t - as well as an initializer list of this type is excluded to avoid - ambiguities as these types implicitly convert to `std::string`. - - @return copy of the JSON value, converted to type @a ValueType - - @throw type_error.302 in case passed type @a ValueType is incompatible - to the JSON value type (e.g., the JSON value is of type boolean, but a - string is requested); see example below - - @complexity Linear in the size of the JSON value. - - @liveexample{The example below shows several conversions from JSON values - to other types. There a few things to note: (1) Floating-point numbers can - be converted to integers\, (2) A JSON array can be converted to a standard - `std::vector`\, (3) A JSON object can be converted to C++ - associative containers such as `std::unordered_map`.,operator__ValueType} - - @since version 1.0.0 - */ - template < typename ValueType, typename std::enable_if < - not std::is_pointer::value and - not std::is_same::value -#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 - and not std::is_same>::value -#endif -#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER >1900 && defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - and not std::is_same::value -#endif - , int >::type = 0 > - operator ValueType() const - { - // delegate the call to get<>() const - return get(); - } - - /// @} - - - //////////////////// - // element access // - //////////////////// - - /// @name element access - /// Access to the JSON value. - /// @{ - - /*! - @brief access specified array element with bounds checking - - Returns a reference to the element at specified location @a idx, with - bounds checking. - - @param[in] idx index of the element to access - - @return reference to the element at index @a idx - - @throw type_error.304 if the JSON value is not an array; in this case, - calling `at` with an index makes no sense. See example below. - @throw out_of_range.401 if the index @a idx is out of range of the array; - that is, `idx >= size()`. See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Constant. - - @since version 1.0.0 - - @liveexample{The example below shows how array elements can be read and - written using `at()`. It also demonstrates the different exceptions that - can be thrown.,at__size_type} - */ - reference at(size_type idx) - { - // at only works for arrays - if (is_array()) - { - JSON_TRY - { - return m_value.array->at(idx); - } - JSON_CATCH(std::out_of_range&) - { - // create better exception explanation - JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); - } - } - else - { - JSON_THROW(type_error::create(304, "cannot use at() with " + type_name())); - } - } - - /*! - @brief access specified array element with bounds checking - - Returns a const reference to the element at specified location @a idx, - with bounds checking. - - @param[in] idx index of the element to access - - @return const reference to the element at index @a idx - - @throw type_error.304 if the JSON value is not an array; in this case, - calling `at` with an index makes no sense. See example below. - @throw out_of_range.401 if the index @a idx is out of range of the array; - that is, `idx >= size()`. See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Constant. - - @since version 1.0.0 - - @liveexample{The example below shows how array elements can be read using - `at()`. It also demonstrates the different exceptions that can be thrown., - at__size_type_const} - */ - const_reference at(size_type idx) const - { - // at only works for arrays - if (is_array()) - { - JSON_TRY - { - return m_value.array->at(idx); - } - JSON_CATCH(std::out_of_range&) - { - // create better exception explanation - JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); - } - } - else - { - JSON_THROW(type_error::create(304, "cannot use at() with " + type_name())); - } - } - - /*! - @brief access specified object element with bounds checking - - Returns a reference to the element at with specified key @a key, with - bounds checking. - - @param[in] key key of the element to access - - @return reference to the element at key @a key - - @throw type_error.304 if the JSON value is not an object; in this case, - calling `at` with a key makes no sense. See example below. - @throw out_of_range.403 if the key @a key is is not stored in the object; - that is, `find(key) == end()`. See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Logarithmic in the size of the container. - - @sa @ref operator[](const typename object_t::key_type&) for unchecked - access by reference - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - - @liveexample{The example below shows how object elements can be read and - written using `at()`. It also demonstrates the different exceptions that - can be thrown.,at__object_t_key_type} - */ - reference at(const typename object_t::key_type& key) - { - // at only works for objects - if (is_object()) - { - JSON_TRY - { - return m_value.object->at(key); - } - JSON_CATCH(std::out_of_range&) - { - // create better exception explanation - JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); - } - } - else - { - JSON_THROW(type_error::create(304, "cannot use at() with " + type_name())); - } - } - - /*! - @brief access specified object element with bounds checking - - Returns a const reference to the element at with specified key @a key, - with bounds checking. - - @param[in] key key of the element to access - - @return const reference to the element at key @a key - - @throw type_error.304 if the JSON value is not an object; in this case, - calling `at` with a key makes no sense. See example below. - @throw out_of_range.403 if the key @a key is is not stored in the object; - that is, `find(key) == end()`. See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Logarithmic in the size of the container. - - @sa @ref operator[](const typename object_t::key_type&) for unchecked - access by reference - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - - @liveexample{The example below shows how object elements can be read using - `at()`. It also demonstrates the different exceptions that can be thrown., - at__object_t_key_type_const} - */ - const_reference at(const typename object_t::key_type& key) const - { - // at only works for objects - if (is_object()) - { - JSON_TRY - { - return m_value.object->at(key); - } - JSON_CATCH(std::out_of_range&) - { - // create better exception explanation - JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); - } - } - else - { - JSON_THROW(type_error::create(304, "cannot use at() with " + type_name())); - } - } - - /*! - @brief access specified array element - - Returns a reference to the element at specified location @a idx. - - @note If @a idx is beyond the range of the array (i.e., `idx >= size()`), - then the array is silently filled up with `null` values to make `idx` a - valid reference to the last stored element. - - @param[in] idx index of the element to access - - @return reference to the element at index @a idx - - @throw type_error.305 if the JSON value is not an array or null; in that - cases, using the [] operator with an index makes no sense. - - @complexity Constant if @a idx is in the range of the array. Otherwise - linear in `idx - size()`. - - @liveexample{The example below shows how array elements can be read and - written using `[]` operator. Note the addition of `null` - values.,operatorarray__size_type} - - @since version 1.0.0 - */ - reference operator[](size_type idx) - { - // implicitly convert null value to an empty array - if (is_null()) - { - m_type = value_t::array; - m_value.array = create(); - assert_invariant(); - } - - // operator[] only works for arrays - if (is_array()) - { - // fill up array with null values if given idx is outside range - if (idx >= m_value.array->size()) - { - m_value.array->insert(m_value.array->end(), - idx - m_value.array->size() + 1, - basic_json()); - } - - return m_value.array->operator[](idx); - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief access specified array element - - Returns a const reference to the element at specified location @a idx. - - @param[in] idx index of the element to access - - @return const reference to the element at index @a idx - - @throw type_error.305 if the JSON value is not an array; in that cases, - using the [] operator with an index makes no sense. - - @complexity Constant. - - @liveexample{The example below shows how array elements can be read using - the `[]` operator.,operatorarray__size_type_const} - - @since version 1.0.0 - */ - const_reference operator[](size_type idx) const - { - // const operator[] only works for arrays - if (is_array()) - { - return m_value.array->operator[](idx); - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief access specified object element - - Returns a reference to the element at with specified key @a key. - - @note If @a key is not found in the object, then it is silently added to - the object and filled with a `null` value to make `key` a valid reference. - In case the value was `null` before, it is converted to an object. - - @param[in] key key of the element to access - - @return reference to the element at key @a key - - @throw type_error.305 if the JSON value is not an object or null; in that - cases, using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read and - written using the `[]` operator.,operatorarray__key_type} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - */ - reference operator[](const typename object_t::key_type& key) - { - // implicitly convert null value to an empty object - if (is_null()) - { - m_type = value_t::object; - m_value.object = create(); - assert_invariant(); - } - - // operator[] only works for objects - if (is_object()) - { - return m_value.object->operator[](key); - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief read-only access specified object element - - Returns a const reference to the element at with specified key @a key. No - bounds checking is performed. - - @warning If the element with key @a key does not exist, the behavior is - undefined. - - @param[in] key key of the element to access - - @return const reference to the element at key @a key - - @pre The element with key @a key must exist. **This precondition is - enforced with an assertion.** - - @throw type_error.305 if the JSON value is not an object; in that cases, - using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read using - the `[]` operator.,operatorarray__key_type_const} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - */ - const_reference operator[](const typename object_t::key_type& key) const - { - // const operator[] only works for objects - if (is_object()) - { - assert(m_value.object->find(key) != m_value.object->end()); - return m_value.object->find(key)->second; - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief access specified object element - - Returns a reference to the element at with specified key @a key. - - @note If @a key is not found in the object, then it is silently added to - the object and filled with a `null` value to make `key` a valid reference. - In case the value was `null` before, it is converted to an object. - - @param[in] key key of the element to access - - @return reference to the element at key @a key - - @throw type_error.305 if the JSON value is not an object or null; in that - cases, using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read and - written using the `[]` operator.,operatorarray__key_type} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - */ - template - reference operator[](T * (&key)[n]) - { - return operator[](static_cast(key)); - } - - /*! - @brief read-only access specified object element - - Returns a const reference to the element at with specified key @a key. No - bounds checking is performed. - - @warning If the element with key @a key does not exist, the behavior is - undefined. - - @note This function is required for compatibility reasons with Clang. - - @param[in] key key of the element to access - - @return const reference to the element at key @a key - - @throw type_error.305 if the JSON value is not an object; in that cases, - using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read using - the `[]` operator.,operatorarray__key_type_const} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.0.0 - */ - template - const_reference operator[](T * (&key)[n]) const - { - return operator[](static_cast(key)); - } - - /*! - @brief access specified object element - - Returns a reference to the element at with specified key @a key. - - @note If @a key is not found in the object, then it is silently added to - the object and filled with a `null` value to make `key` a valid reference. - In case the value was `null` before, it is converted to an object. - - @param[in] key key of the element to access - - @return reference to the element at key @a key - - @throw type_error.305 if the JSON value is not an object or null; in that - cases, using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read and - written using the `[]` operator.,operatorarray__key_type} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.1.0 - */ - template - reference operator[](T* key) - { - // implicitly convert null to object - if (is_null()) - { - m_type = value_t::object; - m_value = value_t::object; - assert_invariant(); - } - - // at only works for objects - if (is_object()) - { - return m_value.object->operator[](key); - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief read-only access specified object element - - Returns a const reference to the element at with specified key @a key. No - bounds checking is performed. - - @warning If the element with key @a key does not exist, the behavior is - undefined. - - @param[in] key key of the element to access - - @return const reference to the element at key @a key - - @pre The element with key @a key must exist. **This precondition is - enforced with an assertion.** - - @throw type_error.305 if the JSON value is not an object; in that cases, - using the [] operator with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be read using - the `[]` operator.,operatorarray__key_type_const} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref value() for access by value with a default value - - @since version 1.1.0 - */ - template - const_reference operator[](T* key) const - { - // at only works for objects - if (is_object()) - { - assert(m_value.object->find(key) != m_value.object->end()); - return m_value.object->find(key)->second; - } - - JSON_THROW(type_error::create(305, "cannot use operator[] with " + type_name())); - } - - /*! - @brief access specified object element with default value - - Returns either a copy of an object's element at the specified key @a key - or a given default value if no element with key @a key exists. - - The function is basically equivalent to executing - @code {.cpp} - try { - return at(key); - } catch(out_of_range) { - return default_value; - } - @endcode - - @note Unlike @ref at(const typename object_t::key_type&), this function - does not throw if the given key @a key was not found. - - @note Unlike @ref operator[](const typename object_t::key_type& key), this - function does not implicitly add an element to the position defined by @a - key. This function is furthermore also applicable to const objects. - - @param[in] key key of the element to access - @param[in] default_value the value to return if @a key is not found - - @tparam ValueType type compatible to JSON values, for instance `int` for - JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for - JSON arrays. Note the type of the expected value at @a key and the default - value @a default_value must be compatible. - - @return copy of the element at key @a key or @a default_value if @a key - is not found - - @throw type_error.306 if the JSON value is not an objec; in that cases, - using `value()` with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be queried - with a default value.,basic_json__value} - - @sa @ref at(const typename object_t::key_type&) for access by reference - with range checking - @sa @ref operator[](const typename object_t::key_type&) for unchecked - access by reference - - @since version 1.0.0 - */ - template::value, int>::type = 0> - ValueType value(const typename object_t::key_type& key, ValueType default_value) const - { - // at only works for objects - if (is_object()) - { - // if key is found, return value and given default value otherwise - const auto it = find(key); - if (it != end()) - { - return *it; - } - - return default_value; - } - else - { - JSON_THROW(type_error::create(306, "cannot use value() with " + type_name())); - } - } - - /*! - @brief overload for a default value of type const char* - @copydoc basic_json::value(const typename object_t::key_type&, ValueType) const - */ - string_t value(const typename object_t::key_type& key, const char* default_value) const - { - return value(key, string_t(default_value)); - } - - /*! - @brief access specified object element via JSON Pointer with default value - - Returns either a copy of an object's element at the specified key @a key - or a given default value if no element with key @a key exists. - - The function is basically equivalent to executing - @code {.cpp} - try { - return at(ptr); - } catch(out_of_range) { - return default_value; - } - @endcode - - @note Unlike @ref at(const json_pointer&), this function does not throw - if the given key @a key was not found. - - @param[in] ptr a JSON pointer to the element to access - @param[in] default_value the value to return if @a ptr found no value - - @tparam ValueType type compatible to JSON values, for instance `int` for - JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for - JSON arrays. Note the type of the expected value at @a key and the default - value @a default_value must be compatible. - - @return copy of the element at key @a key or @a default_value if @a key - is not found - - @throw type_error.306 if the JSON value is not an objec; in that cases, - using `value()` with a key makes no sense. - - @complexity Logarithmic in the size of the container. - - @liveexample{The example below shows how object elements can be queried - with a default value.,basic_json__value_ptr} - - @sa @ref operator[](const json_pointer&) for unchecked access by reference - - @since version 2.0.2 - */ - template::value, int>::type = 0> - ValueType value(const json_pointer& ptr, ValueType default_value) const - { - // at only works for objects - if (is_object()) - { - // if pointer resolves a value, return it or use default value - JSON_TRY - { - return ptr.get_checked(this); - } - JSON_CATCH(out_of_range&) - { - return default_value; - } - } - - JSON_THROW(type_error::create(306, "cannot use value() with " + type_name())); - } - - /*! - @brief overload for a default value of type const char* - @copydoc basic_json::value(const json_pointer&, ValueType) const - */ - string_t value(const json_pointer& ptr, const char* default_value) const - { - return value(ptr, string_t(default_value)); - } - - /*! - @brief access the first element - - Returns a reference to the first element in the container. For a JSON - container `c`, the expression `c.front()` is equivalent to `*c.begin()`. - - @return In case of a structured type (array or object), a reference to the - first element is returned. In case of number, string, or boolean values, a - reference to the value is returned. - - @complexity Constant. - - @pre The JSON value must not be `null` (would throw `std::out_of_range`) - or an empty array or object (undefined behavior, **guarded by - assertions**). - @post The JSON value remains unchanged. - - @throw invalid_iterator.214 when called on `null` value - - @liveexample{The following code shows an example for `front()`.,front} - - @sa @ref back() -- access the last element - - @since version 1.0.0 - */ - reference front() - { - return *begin(); - } - - /*! - @copydoc basic_json::front() - */ - const_reference front() const - { - return *cbegin(); - } - - /*! - @brief access the last element - - Returns a reference to the last element in the container. For a JSON - container `c`, the expression `c.back()` is equivalent to - @code {.cpp} - auto tmp = c.end(); - --tmp; - return *tmp; - @endcode - - @return In case of a structured type (array or object), a reference to the - last element is returned. In case of number, string, or boolean values, a - reference to the value is returned. - - @complexity Constant. - - @pre The JSON value must not be `null` (would throw `std::out_of_range`) - or an empty array or object (undefined behavior, **guarded by - assertions**). - @post The JSON value remains unchanged. - - @throw invalid_iterator.214 when called on a `null` value. See example - below. - - @liveexample{The following code shows an example for `back()`.,back} - - @sa @ref front() -- access the first element - - @since version 1.0.0 - */ - reference back() - { - auto tmp = end(); - --tmp; - return *tmp; - } - - /*! - @copydoc basic_json::back() - */ - const_reference back() const - { - auto tmp = cend(); - --tmp; - return *tmp; - } - - /*! - @brief remove element given an iterator - - Removes the element specified by iterator @a pos. The iterator @a pos must - be valid and dereferenceable. Thus the `end()` iterator (which is valid, - but is not dereferenceable) cannot be used as a value for @a pos. - - If called on a primitive type other than `null`, the resulting JSON value - will be `null`. - - @param[in] pos iterator to the element to remove - @return Iterator following the last removed element. If the iterator @a - pos refers to the last element, the `end()` iterator is returned. - - @tparam IteratorType an @ref iterator or @ref const_iterator - - @post Invalidates iterators and references at or after the point of the - erase, including the `end()` iterator. - - @throw type_error.307 if called on a `null` value; example: `"cannot use - erase() with null"` - @throw invalid_iterator.202 if called on an iterator which does not belong - to the current JSON value; example: `"iterator does not fit current - value"` - @throw invalid_iterator.205 if called on a primitive type with invalid - iterator (i.e., any iterator which is not `begin()`); example: `"iterator - out of range"` - - @complexity The complexity depends on the type: - - objects: amortized constant - - arrays: linear in distance between @a pos and the end of the container - - strings: linear in the length of the string - - other types: constant - - @liveexample{The example shows the result of `erase()` for different JSON - types.,erase__IteratorType} - - @sa @ref erase(IteratorType, IteratorType) -- removes the elements in - the given range - @sa @ref erase(const typename object_t::key_type&) -- removes the element - from an object at the given key - @sa @ref erase(const size_type) -- removes the element from an array at - the given index - - @since version 1.0.0 - */ - template::value or - std::is_same::value, int>::type - = 0> - IteratorType erase(IteratorType pos) - { - // make sure iterator fits the current value - if (this != pos.m_object) - { - JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); - } - - IteratorType result = end(); - - switch (m_type) - { - case value_t::boolean: - case value_t::number_float: - case value_t::number_integer: - case value_t::number_unsigned: - case value_t::string: - { - if (not pos.m_it.primitive_iterator.is_begin()) - { - JSON_THROW(invalid_iterator::create(205, "iterator out of range")); - } - - if (is_string()) - { - AllocatorType alloc; - alloc.destroy(m_value.string); - alloc.deallocate(m_value.string, 1); - m_value.string = nullptr; - } - - m_type = value_t::null; - assert_invariant(); - break; - } - - case value_t::object: - { - result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); - break; - } - - case value_t::array: - { - result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); - break; - } - - default: - { - JSON_THROW(type_error::create(307, "cannot use erase() with " + type_name())); - } - } - - return result; - } - - /*! - @brief remove elements given an iterator range - - Removes the element specified by the range `[first; last)`. The iterator - @a first does not need to be dereferenceable if `first == last`: erasing - an empty range is a no-op. - - If called on a primitive type other than `null`, the resulting JSON value - will be `null`. - - @param[in] first iterator to the beginning of the range to remove - @param[in] last iterator past the end of the range to remove - @return Iterator following the last removed element. If the iterator @a - second refers to the last element, the `end()` iterator is returned. - - @tparam IteratorType an @ref iterator or @ref const_iterator - - @post Invalidates iterators and references at or after the point of the - erase, including the `end()` iterator. - - @throw type_error.307 if called on a `null` value; example: `"cannot use - erase() with null"` - @throw invalid_iterator.203 if called on iterators which does not belong - to the current JSON value; example: `"iterators do not fit current value"` - @throw invalid_iterator.204 if called on a primitive type with invalid - iterators (i.e., if `first != begin()` and `last != end()`); example: - `"iterators out of range"` - - @complexity The complexity depends on the type: - - objects: `log(size()) + std::distance(first, last)` - - arrays: linear in the distance between @a first and @a last, plus linear - in the distance between @a last and end of the container - - strings: linear in the length of the string - - other types: constant - - @liveexample{The example shows the result of `erase()` for different JSON - types.,erase__IteratorType_IteratorType} - - @sa @ref erase(IteratorType) -- removes the element at a given position - @sa @ref erase(const typename object_t::key_type&) -- removes the element - from an object at the given key - @sa @ref erase(const size_type) -- removes the element from an array at - the given index - - @since version 1.0.0 - */ - template::value or - std::is_same::value, int>::type - = 0> - IteratorType erase(IteratorType first, IteratorType last) - { - // make sure iterator fits the current value - if (this != first.m_object or this != last.m_object) - { - JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value")); - } - - IteratorType result = end(); - - switch (m_type) - { - case value_t::boolean: - case value_t::number_float: - case value_t::number_integer: - case value_t::number_unsigned: - case value_t::string: - { - if (not first.m_it.primitive_iterator.is_begin() or not last.m_it.primitive_iterator.is_end()) - { - JSON_THROW(invalid_iterator::create(204, "iterators out of range")); - } - - if (is_string()) - { - AllocatorType alloc; - alloc.destroy(m_value.string); - alloc.deallocate(m_value.string, 1); - m_value.string = nullptr; - } - - m_type = value_t::null; - assert_invariant(); - break; - } - - case value_t::object: - { - result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, - last.m_it.object_iterator); - break; - } - - case value_t::array: - { - result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, - last.m_it.array_iterator); - break; - } - - default: - { - JSON_THROW(type_error::create(307, "cannot use erase() with " + type_name())); - } - } - - return result; - } - - /*! - @brief remove element from a JSON object given a key - - Removes elements from a JSON object with the key value @a key. - - @param[in] key value of the elements to remove - - @return Number of elements removed. If @a ObjectType is the default - `std::map` type, the return value will always be `0` (@a key was not - found) or `1` (@a key was found). - - @post References and iterators to the erased elements are invalidated. - Other references and iterators are not affected. - - @throw type_error.307 when called on a type other than JSON object; - example: `"cannot use erase() with null"` - - @complexity `log(size()) + count(key)` - - @liveexample{The example shows the effect of `erase()`.,erase__key_type} - - @sa @ref erase(IteratorType) -- removes the element at a given position - @sa @ref erase(IteratorType, IteratorType) -- removes the elements in - the given range - @sa @ref erase(const size_type) -- removes the element from an array at - the given index - - @since version 1.0.0 - */ - size_type erase(const typename object_t::key_type& key) - { - // this erase only works for objects - if (is_object()) - { - return m_value.object->erase(key); - } - - JSON_THROW(type_error::create(307, "cannot use erase() with " + type_name())); - } - - /*! - @brief remove element from a JSON array given an index - - Removes element from a JSON array at the index @a idx. - - @param[in] idx index of the element to remove - - @throw type_error.307 when called on a type other than JSON object; - example: `"cannot use erase() with null"` - @throw out_of_range.401 when `idx >= size()`; example: `"array index 17 - is out of range"` - - @complexity Linear in distance between @a idx and the end of the container. - - @liveexample{The example shows the effect of `erase()`.,erase__size_type} - - @sa @ref erase(IteratorType) -- removes the element at a given position - @sa @ref erase(IteratorType, IteratorType) -- removes the elements in - the given range - @sa @ref erase(const typename object_t::key_type&) -- removes the element - from an object at the given key - - @since version 1.0.0 - */ - void erase(const size_type idx) - { - // this erase only works for arrays - if (is_array()) - { - if (idx >= size()) - { - JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); - } - - m_value.array->erase(m_value.array->begin() + static_cast(idx)); - } - else - { - JSON_THROW(type_error::create(307, "cannot use erase() with " + type_name())); - } - } - - /// @} - - - //////////// - // lookup // - //////////// - - /// @name lookup - /// @{ - - /*! - @brief find an element in a JSON object - - Finds an element in a JSON object with key equivalent to @a key. If the - element is not found or the JSON value is not an object, end() is - returned. - - @note This method always returns @ref end() when executed on a JSON type - that is not an object. - - @param[in] key key value of the element to search for - - @return Iterator to an element with key equivalent to @a key. If no such - element is found or the JSON value is not an object, past-the-end (see - @ref end()) iterator is returned. - - @complexity Logarithmic in the size of the JSON object. - - @liveexample{The example shows how `find()` is used.,find__key_type} - - @since version 1.0.0 - */ - iterator find(typename object_t::key_type key) - { - auto result = end(); - - if (is_object()) - { - result.m_it.object_iterator = m_value.object->find(key); - } - - return result; - } - - /*! - @brief find an element in a JSON object - @copydoc find(typename object_t::key_type) - */ - const_iterator find(typename object_t::key_type key) const - { - auto result = cend(); - - if (is_object()) - { - result.m_it.object_iterator = m_value.object->find(key); - } - - return result; - } - - /*! - @brief returns the number of occurrences of a key in a JSON object - - Returns the number of elements with key @a key. If ObjectType is the - default `std::map` type, the return value will always be `0` (@a key was - not found) or `1` (@a key was found). - - @note This method always returns `0` when executed on a JSON type that is - not an object. - - @param[in] key key value of the element to count - - @return Number of elements with key @a key. If the JSON value is not an - object, the return value will be `0`. - - @complexity Logarithmic in the size of the JSON object. - - @liveexample{The example shows how `count()` is used.,count} - - @since version 1.0.0 - */ - size_type count(typename object_t::key_type key) const - { - // return 0 for all nonobject types - return is_object() ? m_value.object->count(key) : 0; - } - - /// @} - - - /////////////// - // iterators // - /////////////// - - /// @name iterators - /// @{ - - /*! - @brief returns an iterator to the first element - - Returns an iterator to the first element. - - @image html range-begin-end.svg "Illustration from cppreference.com" - - @return iterator to the first element - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - @liveexample{The following code shows an example for `begin()`.,begin} - - @sa @ref cbegin() -- returns a const iterator to the beginning - @sa @ref end() -- returns an iterator to the end - @sa @ref cend() -- returns a const iterator to the end - - @since version 1.0.0 - */ - iterator begin() noexcept - { - iterator result(this); - result.set_begin(); - return result; - } - - /*! - @copydoc basic_json::cbegin() - */ - const_iterator begin() const noexcept - { - return cbegin(); - } - - /*! - @brief returns a const iterator to the first element - - Returns a const iterator to the first element. - - @image html range-begin-end.svg "Illustration from cppreference.com" - - @return const iterator to the first element - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - Has the semantics of `const_cast(*this).begin()`. - - @liveexample{The following code shows an example for `cbegin()`.,cbegin} - - @sa @ref begin() -- returns an iterator to the beginning - @sa @ref end() -- returns an iterator to the end - @sa @ref cend() -- returns a const iterator to the end - - @since version 1.0.0 - */ - const_iterator cbegin() const noexcept - { - const_iterator result(this); - result.set_begin(); - return result; - } - - /*! - @brief returns an iterator to one past the last element - - Returns an iterator to one past the last element. - - @image html range-begin-end.svg "Illustration from cppreference.com" - - @return iterator one past the last element - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - @liveexample{The following code shows an example for `end()`.,end} - - @sa @ref cend() -- returns a const iterator to the end - @sa @ref begin() -- returns an iterator to the beginning - @sa @ref cbegin() -- returns a const iterator to the beginning - - @since version 1.0.0 - */ - iterator end() noexcept - { - iterator result(this); - result.set_end(); - return result; - } - - /*! - @copydoc basic_json::cend() - */ - const_iterator end() const noexcept - { - return cend(); - } - - /*! - @brief returns a const iterator to one past the last element - - Returns a const iterator to one past the last element. - - @image html range-begin-end.svg "Illustration from cppreference.com" - - @return const iterator one past the last element - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - Has the semantics of `const_cast(*this).end()`. - - @liveexample{The following code shows an example for `cend()`.,cend} - - @sa @ref end() -- returns an iterator to the end - @sa @ref begin() -- returns an iterator to the beginning - @sa @ref cbegin() -- returns a const iterator to the beginning - - @since version 1.0.0 - */ - const_iterator cend() const noexcept - { - const_iterator result(this); - result.set_end(); - return result; - } - - /*! - @brief returns an iterator to the reverse-beginning - - Returns an iterator to the reverse-beginning; that is, the last element. - - @image html range-rbegin-rend.svg "Illustration from cppreference.com" - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) - requirements: - - The complexity is constant. - - Has the semantics of `reverse_iterator(end())`. - - @liveexample{The following code shows an example for `rbegin()`.,rbegin} - - @sa @ref crbegin() -- returns a const reverse iterator to the beginning - @sa @ref rend() -- returns a reverse iterator to the end - @sa @ref crend() -- returns a const reverse iterator to the end - - @since version 1.0.0 - */ - reverse_iterator rbegin() noexcept - { - return reverse_iterator(end()); - } - - /*! - @copydoc basic_json::crbegin() - */ - const_reverse_iterator rbegin() const noexcept - { - return crbegin(); - } - - /*! - @brief returns an iterator to the reverse-end - - Returns an iterator to the reverse-end; that is, one before the first - element. - - @image html range-rbegin-rend.svg "Illustration from cppreference.com" - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) - requirements: - - The complexity is constant. - - Has the semantics of `reverse_iterator(begin())`. - - @liveexample{The following code shows an example for `rend()`.,rend} - - @sa @ref crend() -- returns a const reverse iterator to the end - @sa @ref rbegin() -- returns a reverse iterator to the beginning - @sa @ref crbegin() -- returns a const reverse iterator to the beginning - - @since version 1.0.0 - */ - reverse_iterator rend() noexcept - { - return reverse_iterator(begin()); - } - - /*! - @copydoc basic_json::crend() - */ - const_reverse_iterator rend() const noexcept - { - return crend(); - } - - /*! - @brief returns a const reverse iterator to the last element - - Returns a const iterator to the reverse-beginning; that is, the last - element. - - @image html range-rbegin-rend.svg "Illustration from cppreference.com" - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) - requirements: - - The complexity is constant. - - Has the semantics of `const_cast(*this).rbegin()`. - - @liveexample{The following code shows an example for `crbegin()`.,crbegin} - - @sa @ref rbegin() -- returns a reverse iterator to the beginning - @sa @ref rend() -- returns a reverse iterator to the end - @sa @ref crend() -- returns a const reverse iterator to the end - - @since version 1.0.0 - */ - const_reverse_iterator crbegin() const noexcept - { - return const_reverse_iterator(cend()); - } - - /*! - @brief returns a const reverse iterator to one before the first - - Returns a const reverse iterator to the reverse-end; that is, one before - the first element. - - @image html range-rbegin-rend.svg "Illustration from cppreference.com" - - @complexity Constant. - - @requirement This function helps `basic_json` satisfying the - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) - requirements: - - The complexity is constant. - - Has the semantics of `const_cast(*this).rend()`. - - @liveexample{The following code shows an example for `crend()`.,crend} - - @sa @ref rend() -- returns a reverse iterator to the end - @sa @ref rbegin() -- returns a reverse iterator to the beginning - @sa @ref crbegin() -- returns a const reverse iterator to the beginning - - @since version 1.0.0 - */ - const_reverse_iterator crend() const noexcept - { - return const_reverse_iterator(cbegin()); - } - - private: - // forward declaration - template class iteration_proxy; - - public: - /*! - @brief wrapper to access iterator member functions in range-based for - - This function allows to access @ref iterator::key() and @ref - iterator::value() during range-based for loops. In these loops, a - reference to the JSON values is returned, so there is no access to the - underlying iterator. - - @liveexample{The following code shows how the wrapper is used,iterator_wrapper} - - @note The name of this function is not yet final and may change in the - future. - */ - static iteration_proxy iterator_wrapper(reference cont) - { - return iteration_proxy(cont); - } - - /*! - @copydoc iterator_wrapper(reference) - */ - static iteration_proxy iterator_wrapper(const_reference cont) - { - return iteration_proxy(cont); - } - - /// @} - - - ////////////// - // capacity // - ////////////// - - /// @name capacity - /// @{ - - /*! - @brief checks whether the container is empty - - Checks if a JSON value has no elements. - - @return The return value depends on the different types and is - defined as follows: - Value type | return value - ----------- | ------------- - null | `true` - boolean | `false` - string | `false` - number | `false` - object | result of function `object_t::empty()` - array | result of function `array_t::empty()` - - @note This function does not return whether a string stored as JSON value - is empty - it returns whether the JSON container itself is empty which is - false in the case of a string. - - @complexity Constant, as long as @ref array_t and @ref object_t satisfy - the Container concept; that is, their `empty()` functions have constant - complexity. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - Has the semantics of `begin() == end()`. - - @liveexample{The following code uses `empty()` to check if a JSON - object contains any elements.,empty} - - @sa @ref size() -- returns the number of elements - - @since version 1.0.0 - */ - bool empty() const noexcept - { - switch (m_type) - { - case value_t::null: - { - // null values are empty - return true; - } - - case value_t::array: - { - // delegate call to array_t::empty() - return m_value.array->empty(); - } - - case value_t::object: - { - // delegate call to object_t::empty() - return m_value.object->empty(); - } - - default: - { - // all other types are nonempty - return false; - } - } - } - - /*! - @brief returns the number of elements - - Returns the number of elements in a JSON value. - - @return The return value depends on the different types and is - defined as follows: - Value type | return value - ----------- | ------------- - null | `0` - boolean | `1` - string | `1` - number | `1` - object | result of function object_t::size() - array | result of function array_t::size() - - @note This function does not return the length of a string stored as JSON - value - it returns the number of elements in the JSON value which is 1 in - the case of a string. - - @complexity Constant, as long as @ref array_t and @ref object_t satisfy - the Container concept; that is, their size() functions have constant - complexity. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - Has the semantics of `std::distance(begin(), end())`. - - @liveexample{The following code calls `size()` on the different value - types.,size} - - @sa @ref empty() -- checks whether the container is empty - @sa @ref max_size() -- returns the maximal number of elements - - @since version 1.0.0 - */ - size_type size() const noexcept - { - switch (m_type) - { - case value_t::null: - { - // null values are empty - return 0; - } - - case value_t::array: - { - // delegate call to array_t::size() - return m_value.array->size(); - } - - case value_t::object: - { - // delegate call to object_t::size() - return m_value.object->size(); - } - - default: - { - // all other types have size 1 - return 1; - } - } - } - - /*! - @brief returns the maximum possible number of elements - - Returns the maximum number of elements a JSON value is able to hold due to - system or library implementation limitations, i.e. `std::distance(begin(), - end())` for the JSON value. - - @return The return value depends on the different types and is - defined as follows: - Value type | return value - ----------- | ------------- - null | `0` (same as `size()`) - boolean | `1` (same as `size()`) - string | `1` (same as `size()`) - number | `1` (same as `size()`) - object | result of function `object_t::max_size()` - array | result of function `array_t::max_size()` - - @complexity Constant, as long as @ref array_t and @ref object_t satisfy - the Container concept; that is, their `max_size()` functions have constant - complexity. - - @requirement This function helps `basic_json` satisfying the - [Container](http://en.cppreference.com/w/cpp/concept/Container) - requirements: - - The complexity is constant. - - Has the semantics of returning `b.size()` where `b` is the largest - possible JSON value. - - @liveexample{The following code calls `max_size()` on the different value - types. Note the output is implementation specific.,max_size} - - @sa @ref size() -- returns the number of elements - - @since version 1.0.0 - */ - size_type max_size() const noexcept - { - switch (m_type) - { - case value_t::array: - { - // delegate call to array_t::max_size() - return m_value.array->max_size(); - } - - case value_t::object: - { - // delegate call to object_t::max_size() - return m_value.object->max_size(); - } - - default: - { - // all other types have max_size() == size() - return size(); - } - } - } - - /// @} - - - /////////////// - // modifiers // - /////////////// - - /// @name modifiers - /// @{ - - /*! - @brief clears the contents - - Clears the content of a JSON value and resets it to the default value as - if @ref basic_json(value_t) would have been called: - - Value type | initial value - ----------- | ------------- - null | `null` - boolean | `false` - string | `""` - number | `0` - object | `{}` - array | `[]` - - @complexity Linear in the size of the JSON value. - - @liveexample{The example below shows the effect of `clear()` to different - JSON types.,clear} - - @since version 1.0.0 - */ - void clear() noexcept - { - switch (m_type) - { - case value_t::number_integer: - { - m_value.number_integer = 0; - break; - } - - case value_t::number_unsigned: - { - m_value.number_unsigned = 0; - break; - } - - case value_t::number_float: - { - m_value.number_float = 0.0; - break; - } - - case value_t::boolean: - { - m_value.boolean = false; - break; - } - - case value_t::string: - { - m_value.string->clear(); - break; - } - - case value_t::array: - { - m_value.array->clear(); - break; - } - - case value_t::object: - { - m_value.object->clear(); - break; - } - - default: - { - break; - } - } - } - - /*! - @brief add an object to an array - - Appends the given element @a val to the end of the JSON value. If the - function is called on a JSON null value, an empty array is created before - appending @a val. - - @param[in] val the value to add to the JSON array - - @throw type_error.308 when called on a type other than JSON array or - null; example: `"cannot use push_back() with number"` - - @complexity Amortized constant. - - @liveexample{The example shows how `push_back()` and `+=` can be used to - add elements to a JSON array. Note how the `null` value was silently - converted to a JSON array.,push_back} - - @since version 1.0.0 - */ - void push_back(basic_json&& val) - { - // push_back only works for null objects or arrays - if (not(is_null() or is_array())) - { - JSON_THROW(type_error::create(308, "cannot use push_back() with " + type_name())); - } - - // transform null object into an array - if (is_null()) - { - m_type = value_t::array; - m_value = value_t::array; - assert_invariant(); - } - - // add element to array (move semantics) - m_value.array->push_back(std::move(val)); - // invalidate object - val.m_type = value_t::null; - } - - /*! - @brief add an object to an array - @copydoc push_back(basic_json&&) - */ - reference operator+=(basic_json&& val) - { - push_back(std::move(val)); - return *this; - } - - /*! - @brief add an object to an array - @copydoc push_back(basic_json&&) - */ - void push_back(const basic_json& val) - { - // push_back only works for null objects or arrays - if (not(is_null() or is_array())) - { - JSON_THROW(type_error::create(308, "cannot use push_back() with " + type_name())); - } - - // transform null object into an array - if (is_null()) - { - m_type = value_t::array; - m_value = value_t::array; - assert_invariant(); - } - - // add element to array - m_value.array->push_back(val); - } - - /*! - @brief add an object to an array - @copydoc push_back(basic_json&&) - */ - reference operator+=(const basic_json& val) - { - push_back(val); - return *this; - } - - /*! - @brief add an object to an object - - Inserts the given element @a val to the JSON object. If the function is - called on a JSON null value, an empty object is created before inserting - @a val. - - @param[in] val the value to add to the JSON object - - @throw type_error.308 when called on a type other than JSON object or - null; example: `"cannot use push_back() with number"` - - @complexity Logarithmic in the size of the container, O(log(`size()`)). - - @liveexample{The example shows how `push_back()` and `+=` can be used to - add elements to a JSON object. Note how the `null` value was silently - converted to a JSON object.,push_back__object_t__value} - - @since version 1.0.0 - */ - void push_back(const typename object_t::value_type& val) - { - // push_back only works for null objects or objects - if (not(is_null() or is_object())) - { - JSON_THROW(type_error::create(308, "cannot use push_back() with " + type_name())); - } - - // transform null object into an object - if (is_null()) - { - m_type = value_t::object; - m_value = value_t::object; - assert_invariant(); - } - - // add element to array - m_value.object->insert(val); - } - - /*! - @brief add an object to an object - @copydoc push_back(const typename object_t::value_type&) - */ - reference operator+=(const typename object_t::value_type& val) - { - push_back(val); - return *this; - } - - /*! - @brief add an object to an object - - This function allows to use `push_back` with an initializer list. In case - - 1. the current value is an object, - 2. the initializer list @a init contains only two elements, and - 3. the first element of @a init is a string, - - @a init is converted into an object element and added using - @ref push_back(const typename object_t::value_type&). Otherwise, @a init - is converted to a JSON value and added using @ref push_back(basic_json&&). - - @param[in] init an initializer list - - @complexity Linear in the size of the initializer list @a init. - - @note This function is required to resolve an ambiguous overload error, - because pairs like `{"key", "value"}` can be both interpreted as - `object_t::value_type` or `std::initializer_list`, see - https://github.com/nlohmann/json/issues/235 for more information. - - @liveexample{The example shows how initializer lists are treated as - objects when possible.,push_back__initializer_list} - */ - void push_back(std::initializer_list init) - { - if (is_object() and init.size() == 2 and init.begin()->is_string()) - { - const string_t key = *init.begin(); - push_back(typename object_t::value_type(key, *(init.begin() + 1))); - } - else - { - push_back(basic_json(init)); - } - } - - /*! - @brief add an object to an object - @copydoc push_back(std::initializer_list) - */ - reference operator+=(std::initializer_list init) - { - push_back(init); - return *this; - } - - /*! - @brief add an object to an array - - Creates a JSON value from the passed parameters @a args to the end of the - JSON value. If the function is called on a JSON null value, an empty array - is created before appending the value created from @a args. - - @param[in] args arguments to forward to a constructor of @ref basic_json - @tparam Args compatible types to create a @ref basic_json object - - @throw type_error.311 when called on a type other than JSON array or - null; example: `"cannot use emplace_back() with number"` - - @complexity Amortized constant. - - @liveexample{The example shows how `push_back()` can be used to add - elements to a JSON array. Note how the `null` value was silently converted - to a JSON array.,emplace_back} - - @since version 2.0.8 - */ - template - void emplace_back(Args&& ... args) - { - // emplace_back only works for null objects or arrays - if (not(is_null() or is_array())) - { - JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + type_name())); - } - - // transform null object into an array - if (is_null()) - { - m_type = value_t::array; - m_value = value_t::array; - assert_invariant(); - } - - // add element to array (perfect forwarding) - m_value.array->emplace_back(std::forward(args)...); - } - - /*! - @brief add an object to an object if key does not exist - - Inserts a new element into a JSON object constructed in-place with the - given @a args if there is no element with the key in the container. If the - function is called on a JSON null value, an empty object is created before - appending the value created from @a args. - - @param[in] args arguments to forward to a constructor of @ref basic_json - @tparam Args compatible types to create a @ref basic_json object - - @return a pair consisting of an iterator to the inserted element, or the - already-existing element if no insertion happened, and a bool - denoting whether the insertion took place. - - @throw type_error.311 when called on a type other than JSON object or - null; example: `"cannot use emplace() with number"` - - @complexity Logarithmic in the size of the container, O(log(`size()`)). - - @liveexample{The example shows how `emplace()` can be used to add elements - to a JSON object. Note how the `null` value was silently converted to a - JSON object. Further note how no value is added if there was already one - value stored with the same key.,emplace} - - @since version 2.0.8 - */ - template - std::pair emplace(Args&& ... args) - { - // emplace only works for null objects or arrays - if (not(is_null() or is_object())) - { - JSON_THROW(type_error::create(311, "cannot use emplace() with " + type_name())); - } - - // transform null object into an object - if (is_null()) - { - m_type = value_t::object; - m_value = value_t::object; - assert_invariant(); - } - - // add element to array (perfect forwarding) - auto res = m_value.object->emplace(std::forward(args)...); - // create result iterator and set iterator to the result of emplace - auto it = begin(); - it.m_it.object_iterator = res.first; - - // return pair of iterator and boolean - return { it, res.second }; - } - - /*! - @brief inserts element - - Inserts element @a val before iterator @a pos. - - @param[in] pos iterator before which the content will be inserted; may be - the end() iterator - @param[in] val element to insert - @return iterator pointing to the inserted @a val. - - @throw type_error.309 if called on JSON values other than arrays; - example: `"cannot use insert() with string"` - @throw invalid_iterator.202 if @a pos is not an iterator of *this; - example: `"iterator does not fit current value"` - - @complexity Constant plus linear in the distance between @a pos and end of - the container. - - @liveexample{The example shows how `insert()` is used.,insert} - - @since version 1.0.0 - */ - iterator insert(const_iterator pos, const basic_json& val) - { - // insert only works for arrays - if (is_array()) - { - // check if iterator pos fits to this JSON value - if (pos.m_object != this) - { - JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); - } - - // insert to array and return iterator - iterator result(this); - result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val); - return result; - } - - JSON_THROW(type_error::create(309, "cannot use insert() with " + type_name())); - } - - /*! - @brief inserts element - @copydoc insert(const_iterator, const basic_json&) - */ - iterator insert(const_iterator pos, basic_json&& val) - { - return insert(pos, val); - } - - /*! - @brief inserts elements - - Inserts @a cnt copies of @a val before iterator @a pos. - - @param[in] pos iterator before which the content will be inserted; may be - the end() iterator - @param[in] cnt number of copies of @a val to insert - @param[in] val element to insert - @return iterator pointing to the first element inserted, or @a pos if - `cnt==0` - - @throw type_error.309 if called on JSON values other than arrays; example: - `"cannot use insert() with string"` - @throw invalid_iterator.202 if @a pos is not an iterator of *this; - example: `"iterator does not fit current value"` - - @complexity Linear in @a cnt plus linear in the distance between @a pos - and end of the container. - - @liveexample{The example shows how `insert()` is used.,insert__count} - - @since version 1.0.0 - */ - iterator insert(const_iterator pos, size_type cnt, const basic_json& val) - { - // insert only works for arrays - if (is_array()) - { - // check if iterator pos fits to this JSON value - if (pos.m_object != this) - { - JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); - } - - // insert to array and return iterator - iterator result(this); - result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); - return result; - } - - JSON_THROW(type_error::create(309, "cannot use insert() with " + type_name())); - } - - /*! - @brief inserts elements - - Inserts elements from range `[first, last)` before iterator @a pos. - - @param[in] pos iterator before which the content will be inserted; may be - the end() iterator - @param[in] first begin of the range of elements to insert - @param[in] last end of the range of elements to insert - - @throw type_error.309 if called on JSON values other than arrays; example: - `"cannot use insert() with string"` - @throw invalid_iterator.202 if @a pos is not an iterator of *this; - example: `"iterator does not fit current value"` - @throw invalid_iterator.210 if @a first and @a last do not belong to the - same JSON value; example: `"iterators do not fit"` - @throw invalid_iterator.211 if @a first or @a last are iterators into - container for which insert is called; example: `"passed iterators may not - belong to container"` - - @return iterator pointing to the first element inserted, or @a pos if - `first==last` - - @complexity Linear in `std::distance(first, last)` plus linear in the - distance between @a pos and end of the container. - - @liveexample{The example shows how `insert()` is used.,insert__range} - - @since version 1.0.0 - */ - iterator insert(const_iterator pos, const_iterator first, const_iterator last) - { - // insert only works for arrays - if (not is_array()) - { - JSON_THROW(type_error::create(309, "cannot use insert() with " + type_name())); - } - - // check if iterator pos fits to this JSON value - if (pos.m_object != this) - { - JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); - } - - // check if range iterators belong to the same JSON object - if (first.m_object != last.m_object) - { - JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); - } - - if (first.m_object == this or last.m_object == this) - { - JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container")); - } - - // insert to array and return iterator - iterator result(this); - result.m_it.array_iterator = m_value.array->insert( - pos.m_it.array_iterator, - first.m_it.array_iterator, - last.m_it.array_iterator); - return result; - } - - /*! - @brief inserts elements - - Inserts elements from initializer list @a ilist before iterator @a pos. - - @param[in] pos iterator before which the content will be inserted; may be - the end() iterator - @param[in] ilist initializer list to insert the values from - - @throw type_error.309 if called on JSON values other than arrays; example: - `"cannot use insert() with string"` - @throw invalid_iterator.202 if @a pos is not an iterator of *this; - example: `"iterator does not fit current value"` - - @return iterator pointing to the first element inserted, or @a pos if - `ilist` is empty - - @complexity Linear in `ilist.size()` plus linear in the distance between - @a pos and end of the container. - - @liveexample{The example shows how `insert()` is used.,insert__ilist} - - @since version 1.0.0 - */ - iterator insert(const_iterator pos, std::initializer_list ilist) - { - // insert only works for arrays - if (not is_array()) - { - JSON_THROW(type_error::create(309, "cannot use insert() with " + type_name())); - } - - // check if iterator pos fits to this JSON value - if (pos.m_object != this) - { - JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); - } - - // insert to array and return iterator - iterator result(this); - result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist); - return result; - } - - /*! - @brief inserts elements - - Inserts elements from range `[first, last)`. - - @param[in] first begin of the range of elements to insert - @param[in] last end of the range of elements to insert - - @throw type_error.309 if called on JSON values other than objects; example: - `"cannot use insert() with string"` - @throw invalid_iterator.202 if iterator @a first or @a last does does not - point to an object; example: `"iterators first and last must point to - objects"` - @throw invalid_iterator.210 if @a first and @a last do not belong to the - same JSON value; example: `"iterators do not fit"` - - @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number - of elements to insert. - - @liveexample{The example shows how `insert()` is used.,insert__range_object} - - @since version 3.0.0 - */ - void insert(const_iterator first, const_iterator last) - { - // insert only works for objects - if (not is_object()) - { - JSON_THROW(type_error::create(309, "cannot use insert() with " + type_name())); - } - - // check if range iterators belong to the same JSON object - if (first.m_object != last.m_object) - { - JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); - } - - // passed iterators must belong to objects - if (not first.m_object->is_object() or not first.m_object->is_object()) - { - JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); - } - - m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); - } - - /*! - @brief exchanges the values - - Exchanges the contents of the JSON value with those of @a other. Does not - invoke any move, copy, or swap operations on individual elements. All - iterators and references remain valid. The past-the-end iterator is - invalidated. - - @param[in,out] other JSON value to exchange the contents with - - @complexity Constant. - - @liveexample{The example below shows how JSON values can be swapped with - `swap()`.,swap__reference} - - @since version 1.0.0 - */ - void swap(reference other) noexcept ( - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value and - std::is_nothrow_move_constructible::value and - std::is_nothrow_move_assignable::value - ) - { - std::swap(m_type, other.m_type); - std::swap(m_value, other.m_value); - assert_invariant(); - } - - /*! - @brief exchanges the values - - Exchanges the contents of a JSON array with those of @a other. Does not - invoke any move, copy, or swap operations on individual elements. All - iterators and references remain valid. The past-the-end iterator is - invalidated. - - @param[in,out] other array to exchange the contents with - - @throw type_error.310 when JSON value is not an array; example: `"cannot - use swap() with string"` - - @complexity Constant. - - @liveexample{The example below shows how arrays can be swapped with - `swap()`.,swap__array_t} - - @since version 1.0.0 - */ - void swap(array_t& other) - { - // swap only works for arrays - if (is_array()) - { - std::swap(*(m_value.array), other); - } - else - { - JSON_THROW(type_error::create(310, "cannot use swap() with " + type_name())); - } - } - - /*! - @brief exchanges the values - - Exchanges the contents of a JSON object with those of @a other. Does not - invoke any move, copy, or swap operations on individual elements. All - iterators and references remain valid. The past-the-end iterator is - invalidated. - - @param[in,out] other object to exchange the contents with - - @throw type_error.310 when JSON value is not an object; example: - `"cannot use swap() with string"` - - @complexity Constant. - - @liveexample{The example below shows how objects can be swapped with - `swap()`.,swap__object_t} - - @since version 1.0.0 - */ - void swap(object_t& other) - { - // swap only works for objects - if (is_object()) - { - std::swap(*(m_value.object), other); - } - else - { - JSON_THROW(type_error::create(310, "cannot use swap() with " + type_name())); - } - } - - /*! - @brief exchanges the values - - Exchanges the contents of a JSON string with those of @a other. Does not - invoke any move, copy, or swap operations on individual elements. All - iterators and references remain valid. The past-the-end iterator is - invalidated. - - @param[in,out] other string to exchange the contents with - - @throw type_error.310 when JSON value is not a string; example: `"cannot - use swap() with boolean"` - - @complexity Constant. - - @liveexample{The example below shows how strings can be swapped with - `swap()`.,swap__string_t} - - @since version 1.0.0 - */ - void swap(string_t& other) - { - // swap only works for strings - if (is_string()) - { - std::swap(*(m_value.string), other); - } - else - { - JSON_THROW(type_error::create(310, "cannot use swap() with " + type_name())); - } - } - - /// @} - - public: - ////////////////////////////////////////// - // lexicographical comparison operators // - ////////////////////////////////////////// - - /// @name lexicographical comparison operators - /// @{ - - /*! - @brief comparison: equal - - Compares two JSON values for equality according to the following rules: - - Two JSON values are equal if (1) they are from the same type and (2) - their stored values are the same according to their respective - `operator==`. - - Integer and floating-point numbers are automatically converted before - comparison. Floating-point numbers are compared indirectly: two - floating-point numbers `f1` and `f2` are considered equal if neither - `f1 > f2` nor `f2 > f1` holds. Note than two NaN values are always - treated as unequal. - - Two JSON null values are equal. - - @note NaN values never compare equal to themselves or to other NaN values. - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether the values @a lhs and @a rhs are equal - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__equal} - - @since version 1.0.0 - */ - friend bool operator==(const_reference lhs, const_reference rhs) noexcept - { - const auto lhs_type = lhs.type(); - const auto rhs_type = rhs.type(); - - if (lhs_type == rhs_type) - { - switch (lhs_type) - { - case value_t::array: - { - return *lhs.m_value.array == *rhs.m_value.array; - } - case value_t::object: - { - return *lhs.m_value.object == *rhs.m_value.object; - } - case value_t::null: - { - return true; - } - case value_t::string: - { - return *lhs.m_value.string == *rhs.m_value.string; - } - case value_t::boolean: - { - return lhs.m_value.boolean == rhs.m_value.boolean; - } - case value_t::number_integer: - { - return lhs.m_value.number_integer == rhs.m_value.number_integer; - } - case value_t::number_unsigned: - { - return lhs.m_value.number_unsigned == rhs.m_value.number_unsigned; - } - case value_t::number_float: - { - return lhs.m_value.number_float == rhs.m_value.number_float; - } - default: - { - return false; - } - } - } - else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) - { - return static_cast(lhs.m_value.number_integer) == rhs.m_value.number_float; - } - else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) - { - return lhs.m_value.number_float == static_cast(rhs.m_value.number_integer); - } - else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) - { - return static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_float; - } - else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) - { - return lhs.m_value.number_float == static_cast(rhs.m_value.number_unsigned); - } - else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) - { - return static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_integer; - } - else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) - { - return lhs.m_value.number_integer == static_cast(rhs.m_value.number_unsigned); - } - - return false; - } - - /*! - @brief comparison: equal - @copydoc operator==(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs == basic_json(rhs)); - } - - /*! - @brief comparison: equal - @copydoc operator==(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) == rhs); - } - - /*! - @brief comparison: not equal - - Compares two JSON values for inequality by calculating `not (lhs == rhs)`. - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether the values @a lhs and @a rhs are not equal - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__notequal} - - @since version 1.0.0 - */ - friend bool operator!=(const_reference lhs, const_reference rhs) noexcept - { - return not (lhs == rhs); - } - - /*! - @brief comparison: not equal - @copydoc operator!=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs != basic_json(rhs)); - } - - /*! - @brief comparison: not equal - @copydoc operator!=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) != rhs); - } - - /*! - @brief comparison: less than - - Compares whether one JSON value @a lhs is less than another JSON value @a - rhs according to the following rules: - - If @a lhs and @a rhs have the same type, the values are compared using - the default `<` operator. - - Integer and floating-point numbers are automatically converted before - comparison - - In case @a lhs and @a rhs have different types, the values are ignored - and the order of the types is considered, see - @ref operator<(const value_t, const value_t). - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether @a lhs is less than @a rhs - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__less} - - @since version 1.0.0 - */ - friend bool operator<(const_reference lhs, const_reference rhs) noexcept - { - const auto lhs_type = lhs.type(); - const auto rhs_type = rhs.type(); - - if (lhs_type == rhs_type) - { - switch (lhs_type) - { - case value_t::array: - { - return (*lhs.m_value.array) < (*rhs.m_value.array); - } - case value_t::object: - { - return *lhs.m_value.object < *rhs.m_value.object; - } - case value_t::null: - { - return false; - } - case value_t::string: - { - return *lhs.m_value.string < *rhs.m_value.string; - } - case value_t::boolean: - { - return lhs.m_value.boolean < rhs.m_value.boolean; - } - case value_t::number_integer: - { - return lhs.m_value.number_integer < rhs.m_value.number_integer; - } - case value_t::number_unsigned: - { - return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned; - } - case value_t::number_float: - { - return lhs.m_value.number_float < rhs.m_value.number_float; - } - default: - { - return false; - } - } - } - else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) - { - return static_cast(lhs.m_value.number_integer) < rhs.m_value.number_float; - } - else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) - { - return lhs.m_value.number_float < static_cast(rhs.m_value.number_integer); - } - else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) - { - return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_float; - } - else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) - { - return lhs.m_value.number_float < static_cast(rhs.m_value.number_unsigned); - } - else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) - { - return lhs.m_value.number_integer < static_cast(rhs.m_value.number_unsigned); - } - else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) - { - return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; - } - - // We only reach this line if we cannot compare values. In that case, - // we compare types. Note we have to call the operator explicitly, - // because MSVC has problems otherwise. - return operator<(lhs_type, rhs_type); - } - - /*! - @brief comparison: less than - @copydoc operator<(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs < basic_json(rhs)); - } - - /*! - @brief comparison: less than - @copydoc operator<(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) < rhs); - } - - /*! - @brief comparison: less than or equal - - Compares whether one JSON value @a lhs is less than or equal to another - JSON value by calculating `not (rhs < lhs)`. - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether @a lhs is less than or equal to @a rhs - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__greater} - - @since version 1.0.0 - */ - friend bool operator<=(const_reference lhs, const_reference rhs) noexcept - { - return not (rhs < lhs); - } - - /*! - @brief comparison: less than or equal - @copydoc operator<=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs <= basic_json(rhs)); - } - - /*! - @brief comparison: less than or equal - @copydoc operator<=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) <= rhs); - } - - /*! - @brief comparison: greater than - - Compares whether one JSON value @a lhs is greater than another - JSON value by calculating `not (lhs <= rhs)`. - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether @a lhs is greater than to @a rhs - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__lessequal} - - @since version 1.0.0 - */ - friend bool operator>(const_reference lhs, const_reference rhs) noexcept - { - return not (lhs <= rhs); - } - - /*! - @brief comparison: greater than - @copydoc operator>(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs > basic_json(rhs)); - } - - /*! - @brief comparison: greater than - @copydoc operator>(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) > rhs); - } - - /*! - @brief comparison: greater than or equal - - Compares whether one JSON value @a lhs is greater than or equal to another - JSON value by calculating `not (lhs < rhs)`. - - @param[in] lhs first JSON value to consider - @param[in] rhs second JSON value to consider - @return whether @a lhs is greater than or equal to @a rhs - - @complexity Linear. - - @liveexample{The example demonstrates comparing several JSON - types.,operator__greaterequal} - - @since version 1.0.0 - */ - friend bool operator>=(const_reference lhs, const_reference rhs) noexcept - { - return not (lhs < rhs); - } - - /*! - @brief comparison: greater than or equal - @copydoc operator>=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept - { - return (lhs >= basic_json(rhs)); - } - - /*! - @brief comparison: greater than or equal - @copydoc operator>=(const_reference, const_reference) - */ - template::value, int>::type = 0> - friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept - { - return (basic_json(lhs) >= rhs); - } - - /// @} - - private: - ///////////////////// - // output adapters // - ///////////////////// - - /// abstract output adapter interface - template - class output_adapter - { - public: - virtual void write_character(CharType c) = 0; - virtual void write_characters(const CharType* s, size_t length) = 0; - virtual ~output_adapter() {} - - static std::shared_ptr> create(std::vector& vec) - { - return std::shared_ptr(new output_vector_adapter(vec)); - } - - static std::shared_ptr> create(std::ostream& s) - { - return std::shared_ptr(new output_stream_adapter(s)); - } - - static std::shared_ptr> create(std::string& s) - { - return std::shared_ptr(new output_string_adapter(s)); - } - }; - - /// a type to simplify interfaces - template - using output_adapter_t = std::shared_ptr>; - - /// output adapter for byte vectors - template - class output_vector_adapter : public output_adapter - { - public: - output_vector_adapter(std::vector& vec) - : v(vec) - {} - - void write_character(CharType c) override - { - v.push_back(c); - } - - void write_characters(const CharType* s, size_t length) override - { - std::copy(s, s + length, std::back_inserter(v)); - } - - private: - std::vector& v; - }; - - /// putput adatpter for output streams - template - class output_stream_adapter : public output_adapter - { - public: - output_stream_adapter(std::basic_ostream& s) - : stream(s) - {} - - void write_character(CharType c) override - { - stream.put(c); - } - - void write_characters(const CharType* s, size_t length) override - { - stream.write(s, static_cast(length)); - } - - private: - std::basic_ostream& stream; - }; - - /// output adapter for basic_string - template - class output_string_adapter : public output_adapter - { - public: - output_string_adapter(std::string& s) - : str(s) - {} - - void write_character(CharType c) override - { - str.push_back(c); - } - - void write_characters(const CharType* s, size_t length) override - { - str.append(s, length); - } - - private: - std::basic_string& str; - }; - - - /////////////////// - // serialization // - /////////////////// - - /// @name serialization - /// @{ - - private: - /*! - @brief wrapper around the serialization functions - */ - class serializer - { - public: - /*! - @param[in] s output stream to serialize to - @param[in] ichar indentation character to use - */ - serializer(output_adapter_t s, const char ichar) - : o(s), loc(std::localeconv()), - thousands_sep(!loc->thousands_sep ? '\0' : loc->thousands_sep[0]), - decimal_point(!loc->decimal_point ? '\0' : loc->decimal_point[0]), - indent_char(ichar), indent_string(512, indent_char) - {} - - // delete because of pointer members - serializer(const serializer&) = delete; - serializer& operator=(const serializer&) = delete; - - /*! - @brief internal implementation of the serialization function - - This function is called by the public member function dump and - organizes the serialization internally. The indentation level is - propagated as additional parameter. In case of arrays and objects, the - function is called recursively. - - - strings and object keys are escaped using `escape_string()` - - integer numbers are converted implicitly via `operator<<` - - floating-point numbers are converted to a string using `"%g"` format - - @param[in] val value to serialize - @param[in] pretty_print whether the output shall be pretty-printed - @param[in] indent_step the indent level - @param[in] current_indent the current indent level (only used internally) - */ - void dump(const basic_json& val, - const bool pretty_print, - const unsigned int indent_step, - const unsigned int current_indent = 0) - { - switch (val.m_type) - { - case value_t::object: - { - if (val.m_value.object->empty()) - { - o->write_characters("{}", 2); - return; - } - - if (pretty_print) - { - o->write_characters("{\n", 2); - - // variable to hold indentation for recursive calls - const auto new_indent = current_indent + indent_step; - if (indent_string.size() < new_indent) - { - indent_string.resize(new_indent, ' '); - } - - // first n-1 elements - auto i = val.m_value.object->cbegin(); - for (size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) - { - o->write_characters(indent_string.c_str(), new_indent); - o->write_character('\"'); - dump_escaped(i->first); - o->write_characters("\": ", 3); - dump(i->second, true, indent_step, new_indent); - o->write_characters(",\n", 2); - } - - // last element - assert(i != val.m_value.object->cend()); - o->write_characters(indent_string.c_str(), new_indent); - o->write_character('\"'); - dump_escaped(i->first); - o->write_characters("\": ", 3); - dump(i->second, true, indent_step, new_indent); - - o->write_character('\n'); - o->write_characters(indent_string.c_str(), current_indent); - o->write_character('}'); - } - else - { - o->write_character('{'); - - // first n-1 elements - auto i = val.m_value.object->cbegin(); - for (size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) - { - o->write_character('\"'); - dump_escaped(i->first); - o->write_characters("\":", 2); - dump(i->second, false, indent_step, current_indent); - o->write_character(','); - } - - // last element - assert(i != val.m_value.object->cend()); - o->write_character('\"'); - dump_escaped(i->first); - o->write_characters("\":", 2); - dump(i->second, false, indent_step, current_indent); - - o->write_character('}'); - } - - return; - } - - case value_t::array: - { - if (val.m_value.array->empty()) - { - o->write_characters("[]", 2); - return; - } - - if (pretty_print) - { - o->write_characters("[\n", 2); - - // variable to hold indentation for recursive calls - const auto new_indent = current_indent + indent_step; - if (indent_string.size() < new_indent) - { - indent_string.resize(new_indent, ' '); - } - - // first n-1 elements - for (auto i = val.m_value.array->cbegin(); i != val.m_value.array->cend() - 1; ++i) - { - o->write_characters(indent_string.c_str(), new_indent); - dump(*i, true, indent_step, new_indent); - o->write_characters(",\n", 2); - } - - // last element - assert(not val.m_value.array->empty()); - o->write_characters(indent_string.c_str(), new_indent); - dump(val.m_value.array->back(), true, indent_step, new_indent); - - o->write_character('\n'); - o->write_characters(indent_string.c_str(), current_indent); - o->write_character(']'); - } - else - { - o->write_character('['); - - // first n-1 elements - for (auto i = val.m_value.array->cbegin(); i != val.m_value.array->cend() - 1; ++i) - { - dump(*i, false, indent_step, current_indent); - o->write_character(','); - } - - // last element - assert(not val.m_value.array->empty()); - dump(val.m_value.array->back(), false, indent_step, current_indent); - - o->write_character(']'); - } - - return; - } - - case value_t::string: - { - o->write_character('\"'); - dump_escaped(*val.m_value.string); - o->write_character('\"'); - return; - } - - case value_t::boolean: - { - if (val.m_value.boolean) - { - o->write_characters("true", 4); - } - else - { - o->write_characters("false", 5); - } - return; - } - - case value_t::number_integer: - { - dump_integer(val.m_value.number_integer); - return; - } - - case value_t::number_unsigned: - { - dump_integer(val.m_value.number_unsigned); - return; - } - - case value_t::number_float: - { - dump_float(val.m_value.number_float); - return; - } - - case value_t::discarded: - { - o->write_characters("", 11); - return; - } - - case value_t::null: - { - o->write_characters("null", 4); - return; - } - } - } - - private: - /*! - @brief calculates the extra space to escape a JSON string - - @param[in] s the string to escape - @return the number of characters required to escape string @a s - - @complexity Linear in the length of string @a s. - */ - static std::size_t extra_space(const string_t& s) noexcept - { - return std::accumulate(s.begin(), s.end(), size_t{}, - [](size_t res, typename string_t::value_type c) - { - switch (c) - { - case '"': - case '\\': - case '\b': - case '\f': - case '\n': - case '\r': - case '\t': - { - // from c (1 byte) to \x (2 bytes) - return res + 1; - } - - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x0b: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x1f: - { - // from c (1 byte) to \uxxxx (6 bytes) - return res + 5; - } - - default: - { - return res; - } - } - }); - } - - /*! - @brief dump escaped string - - Escape a string by replacing certain special characters by a sequence - of an escape character (backslash) and another character and other - control characters by a sequence of "\u" followed by a four-digit hex - representation. The escaped string is written to output stream @a o. - - @param[in] s the string to escape - - @complexity Linear in the length of string @a s. - */ - void dump_escaped(const string_t& s) const - { - const auto space = extra_space(s); - if (space == 0) - { - o->write_characters(s.c_str(), s.size()); - return; - } - - // create a result string of necessary size - string_t result(s.size() + space, '\\'); - std::size_t pos = 0; - - for (const auto& c : s) - { - switch (c) - { - // quotation mark (0x22) - case '"': - { - result[pos + 1] = '"'; - pos += 2; - break; - } - - // reverse solidus (0x5c) - case '\\': - { - // nothing to change - pos += 2; - break; - } - - // backspace (0x08) - case '\b': - { - result[pos + 1] = 'b'; - pos += 2; - break; - } - - // formfeed (0x0c) - case '\f': - { - result[pos + 1] = 'f'; - pos += 2; - break; - } - - // newline (0x0a) - case '\n': - { - result[pos + 1] = 'n'; - pos += 2; - break; - } - - // carriage return (0x0d) - case '\r': - { - result[pos + 1] = 'r'; - pos += 2; - break; - } - - // horizontal tab (0x09) - case '\t': - { - result[pos + 1] = 't'; - pos += 2; - break; - } - - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x0b: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x1f: - { - // convert a number 0..15 to its hex representation - // (0..f) - static const char hexify[16] = - { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - }; - - // print character c as \uxxxx - for (const char m : - { 'u', '0', '0', hexify[c >> 4], hexify[c & 0x0f] - }) - { - result[++pos] = m; - } - - ++pos; - break; - } - - default: - { - // all other characters are added as-is - result[pos++] = c; - break; - } - } - } - - assert(pos == s.size() + space); - o->write_characters(result.c_str(), result.size()); - } - - /*! - @brief dump an integer - - Dump a given integer to output stream @a o. Works internally with - @a number_buffer. - - @param[in] x integer number (signed or unsigned) to dump - @tparam NumberType either @a number_integer_t or @a number_unsigned_t - */ - template::value or - std::is_same::value, int> = 0> - void dump_integer(NumberType x) - { - // special case for "0" - if (x == 0) - { - o->write_character('0'); - return; - } - - const bool is_negative = x < 0; - size_t i = 0; - - // spare 1 byte for '\0' - while (x != 0 and i < number_buffer.size() - 1) - { - const auto digit = std::labs(static_cast(x % 10)); - number_buffer[i++] = static_cast('0' + digit); - x /= 10; - } - - // make sure the number has been processed completely - assert(x == 0); - - if (is_negative) - { - // make sure there is capacity for the '-' - assert(i < number_buffer.size() - 2); - number_buffer[i++] = '-'; - } - - std::reverse(number_buffer.begin(), number_buffer.begin() + i); - o->write_characters(number_buffer.data(), i); - } - - /*! - @brief dump a floating-point number - - Dump a given floating-point number to output stream @a o. Works - internally with @a number_buffer. - - @param[in] x floating-point number to dump - */ - void dump_float(number_float_t x) - { - // NaN / inf - if (not std::isfinite(x) or std::isnan(x)) - { - o->write_characters("null", 4); - return; - } - - // special case for 0.0 and -0.0 - if (x == 0) - { - if (std::signbit(x)) - { - o->write_characters("-0.0", 4); - } - else - { - o->write_characters("0.0", 3); - } - return; - } - - // get number of digits for a text -> float -> text round-trip - static constexpr auto d = std::numeric_limits::digits10; - - // the actual conversion - std::ptrdiff_t len = snprintf(number_buffer.data(), number_buffer.size(), - "%.*g", d, x); - - // negative value indicates an error - assert(len > 0); - // check if buffer was large enough - assert(static_cast(len) < number_buffer.size()); - - // erase thousands separator - if (thousands_sep != '\0') - { - const auto end = std::remove(number_buffer.begin(), - number_buffer.begin() + len, - thousands_sep); - std::fill(end, number_buffer.end(), '\0'); - assert((end - number_buffer.begin()) <= len); - len = (end - number_buffer.begin()); - } - - // convert decimal point to '.' - if (decimal_point != '\0' and decimal_point != '.') - { - for (auto& c : number_buffer) - { - if (c == decimal_point) - { - c = '.'; - break; - } - } - } - - o->write_characters(number_buffer.data(), static_cast(len)); - - // determine if need to append ".0" - const bool value_is_int_like = std::none_of(number_buffer.begin(), - number_buffer.begin() + len + 1, - [](char c) - { - return c == '.' or c == 'e'; - }); - - if (value_is_int_like) - { - o->write_characters(".0", 2); - } - } - - private: - /// the output of the serializer - output_adapter_t o = nullptr; - - /// a (hopefully) large enough character buffer - std::array number_buffer{ {} }; - - /// the locale - const std::lconv* loc = nullptr; - /// the locale's thousand separator character - const char thousands_sep = '\0'; - /// the locale's decimal point character - const char decimal_point = '\0'; - - /// the indentation character - const char indent_char; - - /// the indentation string - string_t indent_string; - }; - - public: - /*! - @brief serialize to stream - - Serialize the given JSON value @a j to the output stream @a o. The JSON - value will be serialized using the @ref dump member function. - - - The indentation of the output can be controlled with the member variable - `width` of the output stream @a o. For instance, using the manipulator - `std::setw(4)` on @a o sets the indentation level to `4` and the - serialization result is the same as calling `dump(4)`. - - - The indentation characrer can be controlled with the member variable - `fill` of the output stream @a o. For instance, the manipulator - `std::setfill('\\t')` sets indentation to use a tab character rather than - the default space character. - - @param[in,out] o stream to serialize to - @param[in] j JSON value to serialize - - @return the stream @a o - - @complexity Linear. - - @liveexample{The example below shows the serialization with different - parameters to `width` to adjust the indentation level.,operator_serialize} - - @since version 1.0.0; indentaction character added in version 3.0.0 - */ - friend std::ostream& operator<<(std::ostream& o, const basic_json& j) - { - // read width member and use it as indentation parameter if nonzero - const bool pretty_print = (o.width() > 0); - const auto indentation = (pretty_print ? o.width() : 0); - - // reset width to 0 for subsequent calls to this stream - o.width(0); - - // do the actual serialization - serializer s(output_adapter::create(o), o.fill()); - s.dump(j, pretty_print, static_cast(indentation)); - return o; - } - - /*! - @brief serialize to stream - @deprecated This stream operator is deprecated and will be removed in a - future version of the library. Please use - @ref std::ostream& operator<<(std::ostream&, const basic_json&) - instead; that is, replace calls like `j >> o;` with `o << j;`. - */ - JSON_DEPRECATED - friend std::ostream& operator>>(const basic_json& j, std::ostream& o) - { - return o << j; - } - - /// @} - - - ///////////////////// - // deserialization // - ///////////////////// - - /// @name deserialization - /// @{ - - /*! - @brief deserialize from an array - - This function reads from an array of 1-byte values. - - @pre Each element of the container has a size of 1 byte. Violating this - precondition yields undefined behavior. **This precondition is enforced - with a static assertion.** - - @param[in] array array to read from - @param[in] cb a parser callback function of type @ref parser_callback_t - which is used to control the deserialization by filtering unwanted values - (optional) - - @return result of the deserialization - - @throw parse_error.101 if a parse error occurs; example: `""unexpected end - of input; expected string literal""` - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. The complexity can be higher if the parser callback function - @a cb has a super-linear complexity. - - @note A UTF-8 byte order mark is silently ignored. - - @liveexample{The example below demonstrates the `parse()` function reading - from an array.,parse__array__parser_callback_t} - - @since version 2.0.3 - */ - template - static basic_json parse(T(&array)[N], - const parser_callback_t cb = nullptr) - { - // delegate the call to the iterator-range parse overload - return parse(std::begin(array), std::end(array), cb); - } - - template - static bool accept(T(&array)[N]) - { - // delegate the call to the iterator-range accept overload - return accept(std::begin(array), std::end(array)); - } - - /*! - @brief deserialize from string literal - - @tparam CharT character/literal type with size of 1 byte - @param[in] s string literal to read a serialized JSON value from - @param[in] cb a parser callback function of type @ref parser_callback_t - which is used to control the deserialization by filtering unwanted values - (optional) - - @return result of the deserialization - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. The complexity can be higher if the parser callback function - @a cb has a super-linear complexity. - - @note A UTF-8 byte order mark is silently ignored. - @note String containers like `std::string` or @ref string_t can be parsed - with @ref parse(const ContiguousContainer&, const parser_callback_t) - - @liveexample{The example below demonstrates the `parse()` function with - and without callback function.,parse__string__parser_callback_t} - - @sa @ref parse(std::istream&, const parser_callback_t) for a version that - reads from an input stream - - @since version 1.0.0 (originally for @ref string_t) - */ - template::value and - std::is_integral::type>::value and - sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> - static basic_json parse(const CharT s, - const parser_callback_t cb = nullptr) - { - return parser(input_adapter::create(s), cb).parse(true); - } - - template::value and - std::is_integral::type>::value and - sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> - static bool accept(const CharT s) - { - return parser(input_adapter::create(s)).accept(true); - } - - /*! - @brief deserialize from stream - - @param[in,out] i stream to read a serialized JSON value from - @param[in] cb a parser callback function of type @ref parser_callback_t - which is used to control the deserialization by filtering unwanted values - (optional) - - @return result of the deserialization - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - @throw parse_error.111 if input stream is in a bad state - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. The complexity can be higher if the parser callback function - @a cb has a super-linear complexity. - - @note A UTF-8 byte order mark is silently ignored. - - @liveexample{The example below demonstrates the `parse()` function with - and without callback function.,parse__istream__parser_callback_t} - - @sa @ref parse(const CharT, const parser_callback_t) for a version - that reads from a string - - @since version 1.0.0 - */ - static basic_json parse(std::istream& i, - const parser_callback_t cb = nullptr) - { - return parser(input_adapter::create(i), cb).parse(true); - } - - static bool accept(std::istream& i) - { - return parser(input_adapter::create(i)).accept(true); - } - - /*! - @copydoc parse(std::istream&, const parser_callback_t) - */ - static basic_json parse(std::istream&& i, - const parser_callback_t cb = nullptr) - { - return parser(input_adapter::create(i), cb).parse(true); - } - - static bool accept(std::istream&& i) - { - return parser(input_adapter::create(i)).accept(true); - } - - /*! - @brief deserialize from an iterator range with contiguous storage - - This function reads from an iterator range of a container with contiguous - storage of 1-byte values. Compatible container types include - `std::vector`, `std::string`, `std::array`, `std::valarray`, and - `std::initializer_list`. Furthermore, C-style arrays can be used with - `std::begin()`/`std::end()`. User-defined containers can be used as long - as they implement random-access iterators and a contiguous storage. - - @pre The iterator range is contiguous. Violating this precondition yields - undefined behavior. **This precondition is enforced with an assertion.** - @pre Each element in the range has a size of 1 byte. Violating this - precondition yields undefined behavior. **This precondition is enforced - with a static assertion.** - - @warning There is no way to enforce all preconditions at compile-time. If - the function is called with noncompliant iterators and with - assertions switched off, the behavior is undefined and will most - likely yield segmentation violation. - - @tparam IteratorType iterator of container with contiguous storage - @param[in] first begin of the range to parse (included) - @param[in] last end of the range to parse (excluded) - @param[in] cb a parser callback function of type @ref parser_callback_t - which is used to control the deserialization by filtering unwanted values - (optional) - - @return result of the deserialization - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. The complexity can be higher if the parser callback function - @a cb has a super-linear complexity. - - @note A UTF-8 byte order mark is silently ignored. - - @liveexample{The example below demonstrates the `parse()` function reading - from an iterator range.,parse__iteratortype__parser_callback_t} - - @since version 2.0.3 - */ - template::iterator_category>::value, int>::type = 0> - static basic_json parse(IteratorType first, IteratorType last, - const parser_callback_t cb = nullptr) - { - return parser(input_adapter::create(first, last), cb).parse(true); - } - - template::iterator_category>::value, int>::type = 0> - static bool accept(IteratorType first, IteratorType last) - { - return parser(input_adapter::create(first, last)).accept(true); - } - - /*! - @brief deserialize from a container with contiguous storage - - This function reads from a container with contiguous storage of 1-byte - values. Compatible container types include `std::vector`, `std::string`, - `std::array`, and `std::initializer_list`. User-defined containers can be - used as long as they implement random-access iterators and a contiguous - storage. - - @pre The container storage is contiguous. Violating this precondition - yields undefined behavior. **This precondition is enforced with an - assertion.** - @pre Each element of the container has a size of 1 byte. Violating this - precondition yields undefined behavior. **This precondition is enforced - with a static assertion.** - - @warning There is no way to enforce all preconditions at compile-time. If - the function is called with a noncompliant container and with - assertions switched off, the behavior is undefined and will most - likely yield segmentation violation. - - @tparam ContiguousContainer container type with contiguous storage - @param[in] c container to read from - @param[in] cb a parser callback function of type @ref parser_callback_t - which is used to control the deserialization by filtering unwanted values - (optional) - - @return result of the deserialization - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. The complexity can be higher if the parser callback function - @a cb has a super-linear complexity. - - @note A UTF-8 byte order mark is silently ignored. - - @liveexample{The example below demonstrates the `parse()` function reading - from a contiguous container.,parse__contiguouscontainer__parser_callback_t} - - @since version 2.0.3 - */ - template::value and - std::is_base_of< - std::random_access_iterator_tag, - typename std::iterator_traits()))>::iterator_category>::value - , int>::type = 0> - static basic_json parse(const ContiguousContainer& c, - const parser_callback_t cb = nullptr) - { - // delegate the call to the iterator-range parse overload - return parse(std::begin(c), std::end(c), cb); - } - - template::value and - std::is_base_of< - std::random_access_iterator_tag, - typename std::iterator_traits()))>::iterator_category>::value - , int>::type = 0> - static bool accept(const ContiguousContainer& c) - { - // delegate the call to the iterator-range accept overload - return accept(std::begin(c), std::end(c)); - } - - /*! - @brief deserialize from stream - @deprecated This stream operator is deprecated and will be removed in a - future version of the library. Please use - @ref std::istream& operator>>(std::istream&, basic_json&) - instead; that is, replace calls like `j << i;` with `i >> j;`. - */ - JSON_DEPRECATED - friend std::istream& operator<<(basic_json& j, std::istream& i) - { - j = parser(input_adapter::create(i)).parse(false); - return i; - } - - /*! - @brief deserialize from stream - - Deserializes an input stream to a JSON value. - - @param[in,out] i input stream to read a serialized JSON value from - @param[in,out] j JSON value to write the deserialized input to - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - @throw parse_error.111 if input stream is in a bad state - - @complexity Linear in the length of the input. The parser is a predictive - LL(1) parser. - - @note A UTF-8 byte order mark is silently ignored. - - @liveexample{The example below shows how a JSON value is constructed by - reading a serialization from a stream.,operator_deserialize} - - @sa parse(std::istream&, const parser_callback_t) for a variant with a - parser callback function to filter values while parsing - - @since version 1.0.0 - */ - friend std::istream& operator>>(std::istream& i, basic_json& j) - { - j = parser(input_adapter::create(i)).parse(false); - return i; - } - - /// @} - - /////////////////////////// - // convenience functions // - /////////////////////////// - - /*! - @brief return the type as string - - Returns the type name as string to be used in error messages - usually to - indicate that a function was called on a wrong JSON type. - - @return basically a string representation of a the @a m_type member - - @complexity Constant. - - @liveexample{The following code exemplifies `type_name()` for all JSON - types.,type_name} - - @since version 1.0.0, public since 2.1.0 - */ - std::string type_name() const - { - { - switch (m_type) - { - case value_t::null: - return "null"; - case value_t::object: - return "object"; - case value_t::array: - return "array"; - case value_t::string: - return "string"; - case value_t::boolean: - return "boolean"; - case value_t::discarded: - return "discarded"; - default: - return "number"; - } - } - } - - - private: - ////////////////////// - // member variables // - ////////////////////// - - /// the type of the current element - value_t m_type = value_t::null; - - /// the value of the current element - json_value m_value = {}; - - - private: - /////////////// - // iterators // - /////////////// - - /*! - @brief an iterator for primitive JSON types - - This class models an iterator for primitive JSON types (boolean, number, - string). It's only purpose is to allow the iterator/const_iterator classes - to "iterate" over primitive values. Internally, the iterator is modeled by - a `difference_type` variable. Value begin_value (`0`) models the begin, - end_value (`1`) models past the end. - */ - class primitive_iterator_t - { - public: - - difference_type get_value() const noexcept - { - return m_it; - } - /// set iterator to a defined beginning - void set_begin() noexcept - { - m_it = begin_value; - } - - /// set iterator to a defined past the end - void set_end() noexcept - { - m_it = end_value; - } - - /// return whether the iterator can be dereferenced - constexpr bool is_begin() const noexcept - { - return (m_it == begin_value); - } - - /// return whether the iterator is at end - constexpr bool is_end() const noexcept - { - return (m_it == end_value); - } - - friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it == rhs.m_it; - } - - friend constexpr bool operator!=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return !(lhs == rhs); - } - - friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it < rhs.m_it; - } - - friend constexpr bool operator<=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it <= rhs.m_it; - } - - friend constexpr bool operator>(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it > rhs.m_it; - } - - friend constexpr bool operator>=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it >= rhs.m_it; - } - - primitive_iterator_t operator+(difference_type i) - { - auto result = *this; - result += i; - return result; - } - - friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept - { - return lhs.m_it - rhs.m_it; - } - - friend std::ostream& operator<<(std::ostream& os, primitive_iterator_t it) - { - return os << it.m_it; - } - - primitive_iterator_t& operator++() - { - ++m_it; - return *this; - } - - primitive_iterator_t operator++(int) - { - auto result = *this; - m_it++; - return result; - } - - primitive_iterator_t& operator--() - { - --m_it; - return *this; - } - - primitive_iterator_t operator--(int) - { - auto result = *this; - m_it--; - return result; - } - - primitive_iterator_t& operator+=(difference_type n) - { - m_it += n; - return *this; - } - - primitive_iterator_t& operator-=(difference_type n) - { - m_it -= n; - return *this; - } - - private: - static constexpr difference_type begin_value = 0; - static constexpr difference_type end_value = begin_value + 1; - - /// iterator as signed integer type - difference_type m_it = std::numeric_limits::denorm_min(); - }; - - /*! - @brief an iterator value - - @note This structure could easily be a union, but MSVC currently does not - allow unions members with complex constructors, see - https://github.com/nlohmann/json/pull/105. - */ - struct internal_iterator - { - /// iterator for JSON objects - typename object_t::iterator object_iterator; - /// iterator for JSON arrays - typename array_t::iterator array_iterator; - /// generic iterator for all other types - primitive_iterator_t primitive_iterator; - - /// create an uninitialized internal_iterator - internal_iterator() noexcept - : object_iterator(), array_iterator(), primitive_iterator() - {} - }; - - /// proxy class for the iterator_wrapper functions - template - class iteration_proxy - { - private: - /// helper class for iteration - class iteration_proxy_internal - { - private: - /// the iterator - IteratorType anchor; - /// an index for arrays (used to create key names) - size_t array_index = 0; - - public: - explicit iteration_proxy_internal(IteratorType it) noexcept - : anchor(it) - {} - - /// dereference operator (needed for range-based for) - iteration_proxy_internal& operator*() - { - return *this; - } - - /// increment operator (needed for range-based for) - iteration_proxy_internal& operator++() - { - ++anchor; - ++array_index; - - return *this; - } - - /// inequality operator (needed for range-based for) - bool operator!= (const iteration_proxy_internal& o) const - { - return anchor != o.anchor; - } - - /// return key of the iterator - typename basic_json::string_t key() const - { - assert(anchor.m_object != nullptr); - - switch (anchor.m_object->type()) - { - // use integer array index as key - case value_t::array: - { - return std::to_string(array_index); - } - - // use key from the object - case value_t::object: - { - return anchor.key(); - } - - // use an empty key for all primitive types - default: - { - return ""; - } - } - } - - /// return value of the iterator - typename IteratorType::reference value() const - { - return anchor.value(); - } - }; - - /// the container to iterate - typename IteratorType::reference container; - - public: - /// construct iteration proxy from a container - explicit iteration_proxy(typename IteratorType::reference cont) - : container(cont) - {} - - /// return iterator begin (needed for range-based for) - iteration_proxy_internal begin() noexcept - { - return iteration_proxy_internal(container.begin()); - } - - /// return iterator end (needed for range-based for) - iteration_proxy_internal end() noexcept - { - return iteration_proxy_internal(container.end()); - } - }; - - public: - /*! - @brief a template for a random access iterator for the @ref basic_json class - - This class implements a both iterators (iterator and const_iterator) for the - @ref basic_json class. - - @note An iterator is called *initialized* when a pointer to a JSON value - has been set (e.g., by a constructor or a copy assignment). If the - iterator is default-constructed, it is *uninitialized* and most - methods are undefined. **The library uses assertions to detect calls - on uninitialized iterators.** - - @requirement The class satisfies the following concept requirements: - - [RandomAccessIterator](http://en.cppreference.com/w/cpp/concept/RandomAccessIterator): - The iterator that can be moved to point (forward and backward) to any - element in constant time. - - @since version 1.0.0, simplified in version 2.0.9 - */ - template - class iter_impl : public std::iterator - { - /// allow basic_json to access private members - friend class basic_json; - - // make sure U is basic_json or const basic_json - static_assert(std::is_same::value - or std::is_same::value, - "iter_impl only accepts (const) basic_json"); - - public: - /// the type of the values when the iterator is dereferenced - using value_type = typename basic_json::value_type; - /// a type to represent differences between iterators - using difference_type = typename basic_json::difference_type; - /// defines a pointer to the type iterated over (value_type) - using pointer = typename std::conditional::value, - typename basic_json::const_pointer, - typename basic_json::pointer>::type; - /// defines a reference to the type iterated over (value_type) - using reference = typename std::conditional::value, - typename basic_json::const_reference, - typename basic_json::reference>::type; - /// the category of the iterator - using iterator_category = std::bidirectional_iterator_tag; - - /// default constructor - iter_impl() = default; - - /*! - @brief constructor for a given JSON instance - @param[in] object pointer to a JSON object for this iterator - @pre object != nullptr - @post The iterator is initialized; i.e. `m_object != nullptr`. - */ - explicit iter_impl(pointer object) noexcept - : m_object(object) - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - m_it.object_iterator = typename object_t::iterator(); - break; - } - - case basic_json::value_t::array: - { - m_it.array_iterator = typename array_t::iterator(); - break; - } - - default: - { - m_it.primitive_iterator = primitive_iterator_t(); - break; - } - } - } - - /*! - @note The conventional copy constructor and copy assignment are - implicitly defined. - Combined with the following converting constructor and assigment, - they support: copy from iterator to iterator, - copy from const iterator to const iterator, - and conversion from iterator to const iterator. - However conversion from const iterator to iterator is not defined. - */ - - /*! - @brief converting constructor - @param[in] other non-const iterator to copy from - @note It is not checked whether @a other is initialized. - */ - iter_impl(const iter_impl& other) noexcept - : m_object(other.m_object), m_it(other.m_it) - {} - - /*! - @brief converting assignment - @param[in,out] other non-const iterator to copy from - @return const/non-const iterator - @note It is not checked whether @a other is initialized. - */ - iter_impl& operator=(const iter_impl& other) noexcept - { - m_object = other.m_object; - m_it = other.m_it; - return *this; - } - - private: - /*! - @brief set the iterator to the first value - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - void set_begin() noexcept - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - m_it.object_iterator = m_object->m_value.object->begin(); - break; - } - - case basic_json::value_t::array: - { - m_it.array_iterator = m_object->m_value.array->begin(); - break; - } - - case basic_json::value_t::null: - { - // set to end so begin()==end() is true: null is empty - m_it.primitive_iterator.set_end(); - break; - } - - default: - { - m_it.primitive_iterator.set_begin(); - break; - } - } - } - - /*! - @brief set the iterator past the last value - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - void set_end() noexcept - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - m_it.object_iterator = m_object->m_value.object->end(); - break; - } - - case basic_json::value_t::array: - { - m_it.array_iterator = m_object->m_value.array->end(); - break; - } - - default: - { - m_it.primitive_iterator.set_end(); - break; - } - } - } - - public: - /*! - @brief return a reference to the value pointed to by the iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - reference operator*() const - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - assert(m_it.object_iterator != m_object->m_value.object->end()); - return m_it.object_iterator->second; - } - - case basic_json::value_t::array: - { - assert(m_it.array_iterator != m_object->m_value.array->end()); - return *m_it.array_iterator; - } - - case basic_json::value_t::null: - { - JSON_THROW(invalid_iterator::create(214, "cannot get value")); - } - - default: - { - if (m_it.primitive_iterator.is_begin()) - { - return *m_object; - } - - JSON_THROW(invalid_iterator::create(214, "cannot get value")); - } - } - } - - /*! - @brief dereference the iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - pointer operator->() const - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - assert(m_it.object_iterator != m_object->m_value.object->end()); - return &(m_it.object_iterator->second); - } - - case basic_json::value_t::array: - { - assert(m_it.array_iterator != m_object->m_value.array->end()); - return &*m_it.array_iterator; - } - - default: - { - if (m_it.primitive_iterator.is_begin()) - { - return m_object; - } - - JSON_THROW(invalid_iterator::create(214, "cannot get value")); - } - } - } - - /*! - @brief post-increment (it++) - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl operator++(int) - { - auto result = *this; - ++(*this); - return result; - } - - /*! - @brief pre-increment (++it) - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl& operator++() - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - std::advance(m_it.object_iterator, 1); - break; - } - - case basic_json::value_t::array: - { - std::advance(m_it.array_iterator, 1); - break; - } - - default: - { - ++m_it.primitive_iterator; - break; - } - } - - return *this; - } - - /*! - @brief post-decrement (it--) - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl operator--(int) - { - auto result = *this; - --(*this); - return result; - } - - /*! - @brief pre-decrement (--it) - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl& operator--() - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - std::advance(m_it.object_iterator, -1); - break; - } - - case basic_json::value_t::array: - { - std::advance(m_it.array_iterator, -1); - break; - } - - default: - { - --m_it.primitive_iterator; - break; - } - } - - return *this; - } - - /*! - @brief comparison: equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator==(const iter_impl& other) const - { - // if objects are not the same, the comparison is undefined - if (m_object != other.m_object) - { - JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); - } - - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - return (m_it.object_iterator == other.m_it.object_iterator); - } - - case basic_json::value_t::array: - { - return (m_it.array_iterator == other.m_it.array_iterator); - } - - default: - { - return (m_it.primitive_iterator == other.m_it.primitive_iterator); - } - } - } - - /*! - @brief comparison: not equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator!=(const iter_impl& other) const - { - return not operator==(other); - } - - /*! - @brief comparison: smaller - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator<(const iter_impl& other) const - { - // if objects are not the same, the comparison is undefined - if (m_object != other.m_object) - { - JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); - } - - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators")); - } - - case basic_json::value_t::array: - { - return (m_it.array_iterator < other.m_it.array_iterator); - } - - default: - { - return (m_it.primitive_iterator < other.m_it.primitive_iterator); - } - } - } - - /*! - @brief comparison: less than or equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator<=(const iter_impl& other) const - { - return not other.operator < (*this); - } - - /*! - @brief comparison: greater than - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator>(const iter_impl& other) const - { - return not operator<=(other); - } - - /*! - @brief comparison: greater than or equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - bool operator>=(const iter_impl& other) const - { - return not operator<(other); - } - - /*! - @brief add to iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl& operator+=(difference_type i) - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); - } - - case basic_json::value_t::array: - { - std::advance(m_it.array_iterator, i); - break; - } - - default: - { - m_it.primitive_iterator += i; - break; - } - } - - return *this; - } - - /*! - @brief subtract from iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl& operator-=(difference_type i) - { - return operator+=(-i); - } - - /*! - @brief add to iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl operator+(difference_type i) const - { - auto result = *this; - result += i; - return result; - } - - /*! - @brief addition of distance and iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - friend iter_impl operator+(difference_type i, const iter_impl& it) - { - auto result = it; - result += i; - return result; - } - - /*! - @brief subtract from iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - iter_impl operator-(difference_type i) const - { - auto result = *this; - result -= i; - return result; - } - - /*! - @brief return difference - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - difference_type operator-(const iter_impl& other) const - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); - } - - case basic_json::value_t::array: - { - return m_it.array_iterator - other.m_it.array_iterator; - } - - default: - { - return m_it.primitive_iterator - other.m_it.primitive_iterator; - } - } - } - - /*! - @brief access to successor - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - reference operator[](difference_type n) const - { - assert(m_object != nullptr); - - switch (m_object->m_type) - { - case basic_json::value_t::object: - { - JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators")); - } - - case basic_json::value_t::array: - { - return *std::next(m_it.array_iterator, n); - } - - case basic_json::value_t::null: - { - JSON_THROW(invalid_iterator::create(214, "cannot get value")); - } - - default: - { - if (m_it.primitive_iterator.get_value() == -n) - { - return *m_object; - } - - JSON_THROW(invalid_iterator::create(214, "cannot get value")); - } - } - } - - /*! - @brief return the key of an object iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - typename object_t::key_type key() const - { - assert(m_object != nullptr); - - if (m_object->is_object()) - { - return m_it.object_iterator->first; - } - - JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators")); - } - - /*! - @brief return the value of an iterator - @pre The iterator is initialized; i.e. `m_object != nullptr`. - */ - reference value() const - { - return operator*(); - } - - private: - /// associated JSON instance - pointer m_object = nullptr; - /// the actual iterator of the associated instance - struct internal_iterator m_it = internal_iterator(); - }; - - /*! - @brief a template for a reverse iterator class - - @tparam Base the base iterator type to reverse. Valid types are @ref - iterator (to create @ref reverse_iterator) and @ref const_iterator (to - create @ref const_reverse_iterator). - - @requirement The class satisfies the following concept requirements: - - [RandomAccessIterator](http://en.cppreference.com/w/cpp/concept/RandomAccessIterator): - The iterator that can be moved to point (forward and backward) to any - element in constant time. - - [OutputIterator](http://en.cppreference.com/w/cpp/concept/OutputIterator): - It is possible to write to the pointed-to element (only if @a Base is - @ref iterator). - - @since version 1.0.0 - */ - template - class json_reverse_iterator : public std::reverse_iterator - { - public: - /// shortcut to the reverse iterator adaptor - using base_iterator = std::reverse_iterator; - /// the reference type for the pointed-to element - using reference = typename Base::reference; - - /// create reverse iterator from iterator - json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept - : base_iterator(it) - {} - - /// create reverse iterator from base class - json_reverse_iterator(const base_iterator& it) noexcept - : base_iterator(it) - {} - - /// post-increment (it++) - json_reverse_iterator operator++(int) - { - return static_cast(base_iterator::operator++(1)); - } - - /// pre-increment (++it) - json_reverse_iterator& operator++() - { - return static_cast(base_iterator::operator++()); - } - - /// post-decrement (it--) - json_reverse_iterator operator--(int) - { - return static_cast(base_iterator::operator--(1)); - } - - /// pre-decrement (--it) - json_reverse_iterator& operator--() - { - return static_cast(base_iterator::operator--()); - } - - /// add to iterator - json_reverse_iterator& operator+=(difference_type i) - { - return static_cast(base_iterator::operator+=(i)); - } - - /// add to iterator - json_reverse_iterator operator+(difference_type i) const - { - return static_cast(base_iterator::operator+(i)); - } - - /// subtract from iterator - json_reverse_iterator operator-(difference_type i) const - { - return static_cast(base_iterator::operator-(i)); - } - - /// return difference - difference_type operator-(const json_reverse_iterator& other) const - { - return base_iterator(*this) - base_iterator(other); - } - - /// access to successor - reference operator[](difference_type n) const - { - return *(this->operator+(n)); - } - - /// return the key of an object iterator - typename object_t::key_type key() const - { - auto it = --this->base(); - return it.key(); - } - - /// return the value of an iterator - reference value() const - { - auto it = --this->base(); - return it.operator * (); - } - }; - - - private: - //////////////////// - // input adapters // - //////////////////// - - /// abstract input adapter interface - class input_adapter - { - public: - virtual int get_character() = 0; - virtual std::string read(size_t offset, size_t length) = 0; - virtual ~input_adapter() {} - - // native support - - /// input adapter for input stream - static std::shared_ptr create(std::istream& i) - { - return std::shared_ptr(new cached_input_stream_adapter<16384>(i)); - } - - /// input adapter for input stream - static std::shared_ptr create(std::istream&& i) - { - return std::shared_ptr(new cached_input_stream_adapter<16384>(i)); - } - - /// input adapter for buffer - static std::shared_ptr create(const char* b, size_t l) - { - return std::shared_ptr(new input_buffer_adapter(b, l)); - } - - // derived support - - /// input adapter for string literal - template::value and - std::is_integral::type>::value and - sizeof(typename std::remove_pointer::type) == 1, int>::type = 0> - static std::shared_ptr create(CharT b) - { - return create(reinterpret_cast(b), - std::strlen(reinterpret_cast(b))); - } - - /// input adapter for iterator range with contiguous storage - template::iterator_category, std::random_access_iterator_tag>::value - , int>::type - = 0> - static std::shared_ptr create(IteratorType first, IteratorType last) - { - // assertion to check that the iterator range is indeed contiguous, - // see http://stackoverflow.com/a/35008842/266378 for more discussion - assert(std::accumulate(first, last, std::pair(true, 0), - [&first](std::pair res, decltype(*first) val) - { - res.first &= (val == *(std::next(std::addressof(*first), res.second++))); - return res; - }).first); - - // assertion to check that each element is 1 byte long - static_assert(sizeof(typename std::iterator_traits::value_type) == 1, - "each element in the iterator range must have the size of 1 byte"); - - return create(reinterpret_cast(&(*first)), - static_cast(std::distance(first, last))); - } - - /// input adapter for array - template - static std::shared_ptr create(T(&array)[N]) - { - // delegate the call to the iterator-range overload - return create(std::begin(array), std::end(array)); - } - - /// input adapter for contiguous container - template::value and - std::is_base_of< - std::random_access_iterator_tag, - typename std::iterator_traits()))>::iterator_category>::value - , int>::type = 0> - static std::shared_ptr create(const ContiguousContainer& c) - { - // delegate the call to the iterator-range overload - return create(std::begin(c), std::end(c)); - } - }; - - /// a type to simplify interfaces - using input_adapter_t = std::shared_ptr; - - /// input adapter for cached stream input - template - class cached_input_stream_adapter : public input_adapter - { - public: - cached_input_stream_adapter(std::istream& i) - : is(i), start_position(is.tellg()) - { - // immediately abort if stream is erroneous - if (JSON_UNLIKELY(i.fail())) - { - JSON_THROW(parse_error::create(111, 0, "bad input stream")); - } - - fill_buffer(); - - // skip byte order mark - if (fill_size >= 3 and buffer[0] == '\xEF' and buffer[1] == '\xBB' and buffer[2] == '\xBF') - { - buffer_pos += 3; - processed_chars += 3; - } - } - - ~cached_input_stream_adapter() override - { - // clear stream flags - is.clear(); - // We initially read a lot of characters into the buffer, and we - // may not have processed all of them. Therefore, we need to - // "rewind" the stream after the last processed char. - is.seekg(start_position); - is.ignore(static_cast(processed_chars)); - // clear stream flags - is.clear(); - } - - int get_character() override - { - // check if refilling is necessary and possible - if (buffer_pos == fill_size and not eof) - { - fill_buffer(); - - // check and remember that filling did not yield new input - if (fill_size == 0) - { - eof = true; - return std::char_traits::eof(); - } - - // the buffer is ready - buffer_pos = 0; - } - - ++processed_chars; - assert(buffer_pos < buffer.size()); - return buffer[buffer_pos++] & 0xFF; - } - - std::string read(size_t offset, size_t length) override - { - // create buffer - std::string result(length, '\0'); - - // save stream position - const auto current_pos = is.tellg(); - // save stream flags - const auto flags = is.rdstate(); - - // clear stream flags - is.clear(); - // set stream position - is.seekg(static_cast(offset)); - // read bytes - is.read(&result[0], static_cast(length)); - - // reset stream position - is.seekg(current_pos); - // reset stream flags - is.setstate(flags); - - return result; - } - - private: - void fill_buffer() - { - // fill - is.read(buffer.data(), static_cast(buffer.size())); - // store number of bytes in the buffer - fill_size = static_cast(is.gcount()); - } - - /// the associated input stream - std::istream& is; - - /// chars returned via get_character() - size_t processed_chars = 0; - /// chars processed in the current buffer - size_t buffer_pos = 0; - - /// whether stream reached eof - bool eof = false; - /// how many chars have been copied to the buffer by last (re)fill - size_t fill_size = 0; - - /// position of the stream when we started - const std::streampos start_position; - - /// internal buffer - std::array buffer{ {} }; - }; - - /// input adapter for buffer input - class input_buffer_adapter : public input_adapter - { - public: - input_buffer_adapter(const char* b, size_t l) - : input_adapter(), cursor(b), limit(b + l), start(b) - { - // skip byte order mark - if (l >= 3 and b[0] == '\xEF' and b[1] == '\xBB' and b[2] == '\xBF') - { - cursor += 3; - } - } - - // delete because of pointer members - input_buffer_adapter(const input_buffer_adapter&) = delete; - input_buffer_adapter& operator=(input_buffer_adapter&) = delete; - - int get_character() noexcept override - { - if (JSON_LIKELY(cursor < limit)) - { - return *(cursor++) & 0xFF; - } - else - { - return std::char_traits::eof(); - } - } - - std::string read(size_t offset, size_t length) override - { - // avoid reading too many characters - const size_t max_length = static_cast(limit - start); - return std::string(start + offset, (std::min)(length, max_length - offset)); - } - - private: - /// pointer to the current character - const char* cursor; - /// pointer past the last character - const char* limit; - /// pointer to the first character - const char* start; - }; - - ////////////////////////////////////////// - // binary serialization/deserialization // - ////////////////////////////////////////// - - /// @name binary serialization/deserialization support - /// @{ - - private: - /*! - @brief deserialization of CBOR and MessagePack values - */ - class binary_reader - { - public: - /*! - @brief create a binary reader - - @param[in] adapter input adapter to read from - */ - explicit binary_reader(input_adapter_t adapter) - : ia(adapter), is_little_endian(little_endianess()) - { - assert(ia); - } - - /*! - @brief create a JSON value from CBOR input - - @param[in] get_char whether a new character should be retrieved from - the input (true, default) or whether the last - read character should be considered instead - - @return JSON value created from CBOR input - - @throw parse_error.110 if input ended unexpectedly - @throw parse_error.112 if unsupported byte was read - */ - basic_json parse_cbor(const bool get_char = true) - { - switch (get_char ? get() : current) - { - // EOF - case std::char_traits::eof(): - { - JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); - } - - // Integer 0x00..0x17 (0..23) - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: - case 0x09: - case 0x0a: - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - { - return static_cast(current); - } - - case 0x18: // Unsigned integer (one-byte uint8_t follows) - { - return get_number(); - } - - case 0x19: // Unsigned integer (two-byte uint16_t follows) - { - return get_number(); - } - - case 0x1a: // Unsigned integer (four-byte uint32_t follows) - { - return get_number(); - } - - case 0x1b: // Unsigned integer (eight-byte uint64_t follows) - { - return get_number(); - } - - // Negative integer -1-0x00..-1-0x17 (-1..-24) - case 0x20: - case 0x21: - case 0x22: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - case 0x28: - case 0x29: - case 0x2a: - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - { - return static_cast(0x20 - 1 - current); - } - - case 0x38: // Negative integer (one-byte uint8_t follows) - { - // must be uint8_t ! - return static_cast(-1) - get_number(); - } - - case 0x39: // Negative integer -1-n (two-byte uint16_t follows) - { - return static_cast(-1) - get_number(); - } - - case 0x3a: // Negative integer -1-n (four-byte uint32_t follows) - { - return static_cast(-1) - get_number(); - } - - case 0x3b: // Negative integer -1-n (eight-byte uint64_t follows) - { - return static_cast(-1) - static_cast(get_number()); - } - - // UTF-8 string (0x00..0x17 bytes follow) - case 0x60: - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - case 0x68: - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - case 0x78: // UTF-8 string (one-byte uint8_t for n follows) - case 0x79: // UTF-8 string (two-byte uint16_t for n follow) - case 0x7a: // UTF-8 string (four-byte uint32_t for n follow) - case 0x7b: // UTF-8 string (eight-byte uint64_t for n follow) - case 0x7f: // UTF-8 string (indefinite length) - { - return get_cbor_string(); - } - - // array (0x00..0x17 data items follow) - case 0x80: - case 0x81: - case 0x82: - case 0x83: - case 0x84: - case 0x85: - case 0x86: - case 0x87: - case 0x88: - case 0x89: - case 0x8a: - case 0x8b: - case 0x8c: - case 0x8d: - case 0x8e: - case 0x8f: - case 0x90: - case 0x91: - case 0x92: - case 0x93: - case 0x94: - case 0x95: - case 0x96: - case 0x97: - { - basic_json result = value_t::array; - const auto len = static_cast(current & 0x1f); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_cbor()); - } - return result; - } - - case 0x98: // array (one-byte uint8_t for n follows) - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_cbor()); - } - return result; - } - - case 0x99: // array (two-byte uint16_t for n follow) - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_cbor()); - } - return result; - } - - case 0x9a: // array (four-byte uint32_t for n follow) - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_cbor()); - } - return result; - } - - case 0x9b: // array (eight-byte uint64_t for n follow) - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_cbor()); - } - return result; - } - - case 0x9f: // array (indefinite length) - { - basic_json result = value_t::array; - while (get() != 0xff) - { - result.push_back(parse_cbor(false)); - } - return result; - } - - // map (0x00..0x17 pairs of data items follow) - case 0xa0: - case 0xa1: - case 0xa2: - case 0xa3: - case 0xa4: - case 0xa5: - case 0xa6: - case 0xa7: - case 0xa8: - case 0xa9: - case 0xaa: - case 0xab: - case 0xac: - case 0xad: - case 0xae: - case 0xaf: - case 0xb0: - case 0xb1: - case 0xb2: - case 0xb3: - case 0xb4: - case 0xb5: - case 0xb6: - case 0xb7: - { - basic_json result = value_t::object; - const auto len = static_cast(current & 0x1f); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xb8: // map (one-byte uint8_t for n follows) - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xb9: // map (two-byte uint16_t for n follow) - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xba: // map (four-byte uint32_t for n follow) - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xbb: // map (eight-byte uint64_t for n follow) - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xbf: // map (indefinite length) - { - basic_json result = value_t::object; - while (get() != 0xff) - { - auto key = get_cbor_string(); - result[key] = parse_cbor(); - } - return result; - } - - case 0xf4: // false - { - return false; - } - - case 0xf5: // true - { - return true; - } - - case 0xf6: // null - { - return value_t::null; - } - - case 0xf9: // Half-Precision Float (two-byte IEEE 754) - { - const int byte1 = get(); - check_eof(); - const int byte2 = get(); - check_eof(); - - // code from RFC 7049, Appendix D, Figure 3: - // As half-precision floating-point numbers were only added - // to IEEE 754 in 2008, today's programming platforms often - // still only have limited support for them. It is very - // easy to include at least decoding support for them even - // without such support. An example of a small decoder for - // half-precision floating-point numbers in the C language - // is shown in Fig. 3. - const int half = (byte1 << 8) + byte2; - const int exp = (half >> 10) & 0x1f; - const int mant = half & 0x3ff; - double val; - if (exp == 0) - { - val = std::ldexp(mant, -24); - } - else if (exp != 31) - { - val = std::ldexp(mant + 1024, exp - 25); - } - else - { - val = mant == 0 - ? std::numeric_limits::infinity() - : std::numeric_limits::quiet_NaN(); - } - return (half & 0x8000) != 0 ? -val : val; - } - - case 0xfa: // Single-Precision Float (four-byte IEEE 754) - { - return get_number(); - } - - case 0xfb: // Double-Precision Float (eight-byte IEEE 754) - { - return get_number(); - } - - default: // anything else (0xFF is handled inside the other types) - { - std::stringstream ss; - ss << std::setw(2) << std::setfill('0') << std::hex << current; - JSON_THROW(parse_error::create(112, chars_read, "error reading CBOR; last byte: 0x" + ss.str())); - } - } - } - - /*! - @brief create a JSON value from MessagePack input - - @return JSON value created from MessagePack input - - @throw parse_error.110 if input ended unexpectedly - @throw parse_error.112 if unsupported byte was read - */ - basic_json parse_msgpack() - { - switch (get()) - { - // EOF - case std::char_traits::eof(): - { - JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); - } - - // positive fixint - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: - case 0x09: - case 0x0a: - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x1f: - case 0x20: - case 0x21: - case 0x22: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - case 0x28: - case 0x29: - case 0x2a: - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x41: - case 0x42: - case 0x43: - case 0x44: - case 0x45: - case 0x46: - case 0x47: - case 0x48: - case 0x49: - case 0x4a: - case 0x4b: - case 0x4c: - case 0x4d: - case 0x4e: - case 0x4f: - case 0x50: - case 0x51: - case 0x52: - case 0x53: - case 0x54: - case 0x55: - case 0x56: - case 0x57: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x5e: - case 0x5f: - case 0x60: - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - case 0x68: - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - case 0x78: - case 0x79: - case 0x7a: - case 0x7b: - case 0x7c: - case 0x7d: - case 0x7e: - case 0x7f: - { - return static_cast(current); - } - - // fixmap - case 0x80: - case 0x81: - case 0x82: - case 0x83: - case 0x84: - case 0x85: - case 0x86: - case 0x87: - case 0x88: - case 0x89: - case 0x8a: - case 0x8b: - case 0x8c: - case 0x8d: - case 0x8e: - case 0x8f: - { - basic_json result = value_t::object; - const auto len = static_cast(current & 0x0f); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_msgpack_string(); - result[key] = parse_msgpack(); - } - return result; - } - - // fixarray - case 0x90: - case 0x91: - case 0x92: - case 0x93: - case 0x94: - case 0x95: - case 0x96: - case 0x97: - case 0x98: - case 0x99: - case 0x9a: - case 0x9b: - case 0x9c: - case 0x9d: - case 0x9e: - case 0x9f: - { - basic_json result = value_t::array; - const auto len = static_cast(current & 0x0f); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_msgpack()); - } - return result; - } - - // fixstr - case 0xa0: - case 0xa1: - case 0xa2: - case 0xa3: - case 0xa4: - case 0xa5: - case 0xa6: - case 0xa7: - case 0xa8: - case 0xa9: - case 0xaa: - case 0xab: - case 0xac: - case 0xad: - case 0xae: - case 0xaf: - case 0xb0: - case 0xb1: - case 0xb2: - case 0xb3: - case 0xb4: - case 0xb5: - case 0xb6: - case 0xb7: - case 0xb8: - case 0xb9: - case 0xba: - case 0xbb: - case 0xbc: - case 0xbd: - case 0xbe: - case 0xbf: - { - return get_msgpack_string(); - } - - case 0xc0: // nil - { - return value_t::null; - } - - case 0xc2: // false - { - return false; - } - - case 0xc3: // true - { - return true; - } - - case 0xca: // float 32 - { - return get_number(); - } - - case 0xcb: // float 64 - { - return get_number(); - } - - case 0xcc: // uint 8 - { - return get_number(); - } - - case 0xcd: // uint 16 - { - return get_number(); - } - - case 0xce: // uint 32 - { - return get_number(); - } - - case 0xcf: // uint 64 - { - return get_number(); - } - - case 0xd0: // int 8 - { - return get_number(); - } - - case 0xd1: // int 16 - { - return get_number(); - } - - case 0xd2: // int 32 - { - return get_number(); - } - - case 0xd3: // int 64 - { - return get_number(); - } - - case 0xd9: // str 8 - case 0xda: // str 16 - case 0xdb: // str 32 - { - return get_msgpack_string(); - } - - case 0xdc: // array 16 - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_msgpack()); - } - return result; - } - - case 0xdd: // array 32 - { - basic_json result = value_t::array; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - result.push_back(parse_msgpack()); - } - return result; - } - - case 0xde: // map 16 - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_msgpack_string(); - result[key] = parse_msgpack(); - } - return result; - } - - case 0xdf: // map 32 - { - basic_json result = value_t::object; - const auto len = static_cast(get_number()); - for (size_t i = 0; i < len; ++i) - { - get(); - auto key = get_msgpack_string(); - result[key] = parse_msgpack(); - } - return result; - } - - // positive fixint - case 0xe0: - case 0xe1: - case 0xe2: - case 0xe3: - case 0xe4: - case 0xe5: - case 0xe6: - case 0xe7: - case 0xe8: - case 0xe9: - case 0xea: - case 0xeb: - case 0xec: - case 0xed: - case 0xee: - case 0xef: - case 0xf0: - case 0xf1: - case 0xf2: - case 0xf3: - case 0xf4: - case 0xf5: - case 0xf6: - case 0xf7: - case 0xf8: - case 0xf9: - case 0xfa: - case 0xfb: - case 0xfc: - case 0xfd: - case 0xfe: - case 0xff: - { - return static_cast(current); - } - - default: // anything else - { - std::stringstream ss; - ss << std::setw(2) << std::setfill('0') << std::hex << current; - JSON_THROW(parse_error::create(112, chars_read, "error reading MessagePack; last byte: 0x" + ss.str())); - } - } - } - - /*! - @brief determine system byte order - - @return true iff system's byte order is little endian - - @note from http://stackoverflow.com/a/1001328/266378 - */ - static bool little_endianess() noexcept - { - int num = 1; - return (*reinterpret_cast(&num) == 1); - } - - private: - /*! - @brief get next character from the input - - This function provides the interface to the used input adapter. It does - not throw in case the input reached EOF, but returns - `std::char_traits::eof()` in that case. - - @return character read from the input - */ - int get() - { - ++chars_read; - return (current = ia->get_character()); - } - - /* - @brief read a number from the input - - @tparam T the type of the number - - @return number of type @a T - - @note This function needs to respect the system's endianess, because - bytes in CBOR and MessagePack are stored in network order (big - endian) and therefore need reordering on little endian systems. - - @throw parse_error.110 if input has less than `sizeof(T)` bytes - */ - template - T get_number() - { - // step 1: read input into array with system's byte order - std::array vec; - for (size_t i = 0; i < sizeof(T); ++i) - { - get(); - check_eof(); - - // reverse byte order prior to conversion if necessary - if (is_little_endian) - { - vec[sizeof(T) - i - 1] = static_cast(current); - } - else - { - vec[i] = static_cast(current); // LCOV_EXCL_LINE - } - } - - // step 2: convert array into number of type T and return - T result; - std::memcpy(&result, vec.data(), sizeof(T)); - return result; - } - - /*! - @brief create a string by reading characters from the input - - @param[in] len number of bytes to read - - @return string created by reading @a len bytes - - @throw parse_error.110 if input has less than @a len bytes - */ - std::string get_string(const size_t len) - { - std::string result; - for (size_t i = 0; i < len; ++i) - { - get(); - check_eof(); - result.append(1, static_cast(current)); - } - return result; - } - - /*! - @brief reads a CBOR string - - This function first reads starting bytes to determine the expected - string length and then copies this number of bytes into a string. - Additionally, CBOR's strings with indefinite lengths are supported. - - @return string - - @throw parse_error.110 if input ended - @throw parse_error.113 if an unexpexted byte is read - */ - std::string get_cbor_string() - { - check_eof(); - - switch (current) - { - // UTF-8 string (0x00..0x17 bytes follow) - case 0x60: - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - case 0x68: - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - { - const auto len = static_cast(current & 0x1f); - return get_string(len); - } - - case 0x78: // UTF-8 string (one-byte uint8_t for n follows) - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0x79: // UTF-8 string (two-byte uint16_t for n follow) - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0x7a: // UTF-8 string (four-byte uint32_t for n follow) - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0x7b: // UTF-8 string (eight-byte uint64_t for n follow) - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0x7f: // UTF-8 string (indefinite length) - { - std::string result; - while (get() != 0xff) - { - check_eof(); - result.append(1, static_cast(current)); - } - return result; - } - - default: - { - std::stringstream ss; - ss << std::setw(2) << std::setfill('0') << std::hex << current; - JSON_THROW(parse_error::create(113, chars_read, "expected a CBOR string; last byte: 0x" + ss.str())); - } - } - } - - /*! - @brief reads a MessagePack string - - This function first reads starting bytes to determine the expected - string length and then copies this number of bytes into a string. - - @return string - - @throw parse_error.110 if input ended - @throw parse_error.113 if an unexpexted byte is read - */ - std::string get_msgpack_string() - { - check_eof(); - - switch (current) - { - // fixstr - case 0xa0: - case 0xa1: - case 0xa2: - case 0xa3: - case 0xa4: - case 0xa5: - case 0xa6: - case 0xa7: - case 0xa8: - case 0xa9: - case 0xaa: - case 0xab: - case 0xac: - case 0xad: - case 0xae: - case 0xaf: - case 0xb0: - case 0xb1: - case 0xb2: - case 0xb3: - case 0xb4: - case 0xb5: - case 0xb6: - case 0xb7: - case 0xb8: - case 0xb9: - case 0xba: - case 0xbb: - case 0xbc: - case 0xbd: - case 0xbe: - case 0xbf: - { - const auto len = static_cast(current & 0x1f); - return get_string(len); - } - - case 0xd9: // str 8 - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0xda: // str 16 - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - case 0xdb: // str 32 - { - const auto len = static_cast(get_number()); - return get_string(len); - } - - default: - { - std::stringstream ss; - ss << std::setw(2) << std::setfill('0') << std::hex << current; - JSON_THROW(parse_error::create(113, chars_read, "expected a MessagePack string; last byte: 0x" + ss.str())); - } - } - } - - /*! - @brief check if input ended - @throw parse_error.110 if input ended - */ - void check_eof() const - { - if (JSON_UNLIKELY(current == std::char_traits::eof())) - { - JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); - } - } - - private: - /// input adapter - input_adapter_t ia = nullptr; - - /// the current character - int current = std::char_traits::eof(); - - /// the number of characters read - size_t chars_read = 0; - - /// whether we can assume little endianess - const bool is_little_endian = true; - }; - - /*! - @brief serialization to CBOR and MessagePack values - */ - class binary_writer - { - public: - /*! - @brief create a binary writer - - @param[in] adapter output adapter to write to - */ - explicit binary_writer(output_adapter_t adapter) - : is_little_endian(binary_reader::little_endianess()), oa(adapter) - { - assert(oa); - } - - /*! - @brief[in] j JSON value to serialize - */ - void write_cbor(const basic_json& j) - { - switch (j.type()) - { - case value_t::null: - { - oa->write_character(0xf6); - break; - } - - case value_t::boolean: - { - oa->write_character(j.m_value.boolean ? 0xf5 : 0xf4); - break; - } - - case value_t::number_integer: - { - if (j.m_value.number_integer >= 0) - { - // CBOR does not differentiate between positive signed - // integers and unsigned integers. Therefore, we used the - // code from the value_t::number_unsigned case here. - if (j.m_value.number_integer <= 0x17) - { - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer <= (std::numeric_limits::max)()) - { - oa->write_character(0x18); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer <= (std::numeric_limits::max)()) - { - oa->write_character(0x19); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer <= (std::numeric_limits::max)()) - { - oa->write_character(0x1a); - write_number(static_cast(j.m_value.number_integer)); - } - else - { - oa->write_character(0x1b); - write_number(static_cast(j.m_value.number_integer)); - } - } - else - { - // The conversions below encode the sign in the first - // byte, and the value is converted to a positive number. - const auto positive_number = -1 - j.m_value.number_integer; - if (j.m_value.number_integer >= -24) - { - write_number(static_cast(0x20 + positive_number)); - } - else if (positive_number <= (std::numeric_limits::max)()) - { - oa->write_character(0x38); - write_number(static_cast(positive_number)); - } - else if (positive_number <= (std::numeric_limits::max)()) - { - oa->write_character(0x39); - write_number(static_cast(positive_number)); - } - else if (positive_number <= (std::numeric_limits::max)()) - { - oa->write_character(0x3a); - write_number(static_cast(positive_number)); - } - else - { - oa->write_character(0x3b); - write_number(static_cast(positive_number)); - } - } - break; - } - - case value_t::number_unsigned: - { - if (j.m_value.number_unsigned <= 0x17) - { - write_number(static_cast(j.m_value.number_unsigned)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - oa->write_character(0x18); - write_number(static_cast(j.m_value.number_unsigned)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - oa->write_character(0x19); - write_number(static_cast(j.m_value.number_unsigned)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - oa->write_character(0x1a); - write_number(static_cast(j.m_value.number_unsigned)); - } - else - { - oa->write_character(0x1b); - write_number(static_cast(j.m_value.number_unsigned)); - } - break; - } - - case value_t::number_float: - { - // Double-Precision Float - oa->write_character(0xfb); - write_number(j.m_value.number_float); - break; - } - - case value_t::string: - { - // step 1: write control byte and the string length - const auto N = j.m_value.string->size(); - if (N <= 0x17) - { - write_number(static_cast(0x60 + N)); - } - else if (N <= 0xff) - { - oa->write_character(0x78); - write_number(static_cast(N)); - } - else if (N <= 0xffff) - { - oa->write_character(0x79); - write_number(static_cast(N)); - } - else if (N <= 0xffffffff) - { - oa->write_character(0x7a); - write_number(static_cast(N)); - } - // LCOV_EXCL_START - else if (N <= 0xffffffffffffffff) - { - oa->write_character(0x7b); - write_number(static_cast(N)); - } - // LCOV_EXCL_STOP - - // step 2: write the string - oa->write_characters(reinterpret_cast(j.m_value.string->c_str()), - j.m_value.string->size()); - break; - } - - case value_t::array: - { - // step 1: write control byte and the array size - const auto N = j.m_value.array->size(); - if (N <= 0x17) - { - write_number(static_cast(0x80 + N)); - } - else if (N <= 0xff) - { - oa->write_character(0x98); - write_number(static_cast(N)); - } - else if (N <= 0xffff) - { - oa->write_character(0x99); - write_number(static_cast(N)); - } - else if (N <= 0xffffffff) - { - oa->write_character(0x9a); - write_number(static_cast(N)); - } - // LCOV_EXCL_START - else if (N <= 0xffffffffffffffff) - { - oa->write_character(0x9b); - write_number(static_cast(N)); - } - // LCOV_EXCL_STOP - - // step 2: write each element - for (const auto& el : *j.m_value.array) - { - write_cbor(el); - } - break; - } - - case value_t::object: - { - // step 1: write control byte and the object size - const auto N = j.m_value.object->size(); - if (N <= 0x17) - { - write_number(static_cast(0xa0 + N)); - } - else if (N <= 0xff) - { - oa->write_character(0xb8); - write_number(static_cast(N)); - } - else if (N <= 0xffff) - { - oa->write_character(0xb9); - write_number(static_cast(N)); - } - else if (N <= 0xffffffff) - { - oa->write_character(0xba); - write_number(static_cast(N)); - } - // LCOV_EXCL_START - else if (N <= 0xffffffffffffffff) - { - oa->write_character(0xbb); - write_number(static_cast(N)); - } - // LCOV_EXCL_STOP - - // step 2: write each element - for (const auto& el : *j.m_value.object) - { - write_cbor(el.first); - write_cbor(el.second); - } - break; - } - - default: - { - break; - } - } - } - - /*! - @brief[in] j JSON value to serialize - */ - void write_msgpack(const basic_json& j) - { - switch (j.type()) - { - case value_t::null: - { - // nil - oa->write_character(0xc0); - break; - } - - case value_t::boolean: - { - // true and false - oa->write_character(j.m_value.boolean ? 0xc3 : 0xc2); - break; - } - - case value_t::number_integer: - { - if (j.m_value.number_integer >= 0) - { - // MessagePack does not differentiate between positive - // signed integers and unsigned integers. Therefore, we - // used the code from the value_t::number_unsigned case - // here. - if (j.m_value.number_unsigned < 128) - { - // positive fixnum - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 8 - oa->write_character(0xcc); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 16 - oa->write_character(0xcd); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 32 - oa->write_character(0xce); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 64 - oa->write_character(0xcf); - write_number(static_cast(j.m_value.number_integer)); - } - } - else - { - if (j.m_value.number_integer >= -32) - { - // negative fixnum - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer >= (std::numeric_limits::min)() and j.m_value.number_integer <= (std::numeric_limits::max)()) - { - // int 8 - oa->write_character(0xd0); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer >= (std::numeric_limits::min)() and j.m_value.number_integer <= (std::numeric_limits::max)()) - { - // int 16 - oa->write_character(0xd1); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer >= (std::numeric_limits::min)() and j.m_value.number_integer <= (std::numeric_limits::max)()) - { - // int 32 - oa->write_character(0xd2); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_integer >= (std::numeric_limits::min)() and j.m_value.number_integer <= (std::numeric_limits::max)()) - { - // int 64 - oa->write_character(0xd3); - write_number(static_cast(j.m_value.number_integer)); - } - } - break; - } - - case value_t::number_unsigned: - { - if (j.m_value.number_unsigned < 128) - { - // positive fixnum - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 8 - oa->write_character(0xcc); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 16 - oa->write_character(0xcd); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 32 - oa->write_character(0xce); - write_number(static_cast(j.m_value.number_integer)); - } - else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) - { - // uint 64 - oa->write_character(0xcf); - write_number(static_cast(j.m_value.number_integer)); - } - break; - } - - case value_t::number_float: - { - // float 64 - oa->write_character(0xcb); - write_number(j.m_value.number_float); - break; - } - - case value_t::string: - { - // step 1: write control byte and the string length - const auto N = j.m_value.string->size(); - if (N <= 31) - { - // fixstr - write_number(static_cast(0xa0 | N)); - } - else if (N <= 255) - { - // str 8 - oa->write_character(0xd9); - write_number(static_cast(N)); - } - else if (N <= 65535) - { - // str 16 - oa->write_character(0xda); - write_number(static_cast(N)); - } - else if (N <= 4294967295) - { - // str 32 - oa->write_character(0xdb); - write_number(static_cast(N)); - } - - // step 2: write the string - oa->write_characters(reinterpret_cast(j.m_value.string->c_str()), - j.m_value.string->size()); - break; - } - - case value_t::array: - { - // step 1: write control byte and the array size - const auto N = j.m_value.array->size(); - if (N <= 15) - { - // fixarray - write_number(static_cast(0x90 | N)); - } - else if (N <= 0xffff) - { - // array 16 - oa->write_character(0xdc); - write_number(static_cast(N)); - } - else if (N <= 0xffffffff) - { - // array 32 - oa->write_character(0xdd); - write_number(static_cast(N)); - } - - // step 2: write each element - for (const auto& el : *j.m_value.array) - { - write_msgpack(el); - } - break; - } - - case value_t::object: - { - // step 1: write control byte and the object size - const auto N = j.m_value.object->size(); - if (N <= 15) - { - // fixmap - write_number(static_cast(0x80 | (N & 0xf))); - } - else if (N <= 65535) - { - // map 16 - oa->write_character(0xde); - write_number(static_cast(N)); - } - else if (N <= 4294967295) - { - // map 32 - oa->write_character(0xdf); - write_number(static_cast(N)); - } - - // step 2: write each element - for (const auto& el : *j.m_value.object) - { - write_msgpack(el.first); - write_msgpack(el.second); - } - break; - } - - default: - { - break; - } - } - } - - private: - /* - @brief write a number to output input - - @param[in] n number of type @a T - @tparam T the type of the number - - @note This function needs to respect the system's endianess, because - bytes in CBOR and MessagePack are stored in network order (big - endian) and therefore need reordering on little endian systems. - */ - template - void write_number(T n) - { - // step 1: write number to array of length T - std::array vec; - std::memcpy(vec.data(), &n, sizeof(T)); - - // step 2: write array to output (with possible reordering) - for (size_t i = 0; i < sizeof(T); ++i) - { - // reverse byte order prior to conversion if necessary - if (is_little_endian) - { - oa->write_character(vec[sizeof(T) - i - 1]); - } - else - { - oa->write_character(vec[i]); // LCOV_EXCL_LINE - } - } - } - - private: - /// whether we can assume little endianess - const bool is_little_endian = true; - - /// the output - output_adapter_t oa = nullptr; - }; - - public: - /*! - @brief create a CBOR serialization of a given JSON value - - Serializes a given JSON value @a j to a byte vector using the CBOR (Concise - Binary Object Representation) serialization format. CBOR is a binary - serialization format which aims to be more compact than JSON itself, yet - more efficient to parse. - - The library uses the following mapping from JSON values types to - CBOR types according to the CBOR specification (RFC 7049): - - JSON value type | value/range | CBOR type | first byte - --------------- | ------------------------------------------ | ---------------------------------- | --------------- - null | `null` | Null | 0xf6 - boolean | `true` | True | 0xf5 - boolean | `false` | False | 0xf4 - number_integer | -9223372036854775808..-2147483649 | Negative integer (8 bytes follow) | 0x3b - number_integer | -2147483648..-32769 | Negative integer (4 bytes follow) | 0x3a - number_integer | -32768..-129 | Negative integer (2 bytes follow) | 0x39 - number_integer | -128..-25 | Negative integer (1 byte follow) | 0x38 - number_integer | -24..-1 | Negative integer | 0x20..0x37 - number_integer | 0..23 | Integer | 0x00..0x17 - number_integer | 24..255 | Unsigned integer (1 byte follow) | 0x18 - number_integer | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 - number_integer | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1a - number_integer | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1b - number_unsigned | 0..23 | Integer | 0x00..0x17 - number_unsigned | 24..255 | Unsigned integer (1 byte follow) | 0x18 - number_unsigned | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 - number_unsigned | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1a - number_unsigned | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1b - number_float | *any value* | Double-Precision Float | 0xfb - string | *length*: 0..23 | UTF-8 string | 0x60..0x77 - string | *length*: 23..255 | UTF-8 string (1 byte follow) | 0x78 - string | *length*: 256..65535 | UTF-8 string (2 bytes follow) | 0x79 - string | *length*: 65536..4294967295 | UTF-8 string (4 bytes follow) | 0x7a - string | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow) | 0x7b - array | *size*: 0..23 | array | 0x80..0x97 - array | *size*: 23..255 | array (1 byte follow) | 0x98 - array | *size*: 256..65535 | array (2 bytes follow) | 0x99 - array | *size*: 65536..4294967295 | array (4 bytes follow) | 0x9a - array | *size*: 4294967296..18446744073709551615 | array (8 bytes follow) | 0x9b - object | *size*: 0..23 | map | 0xa0..0xb7 - object | *size*: 23..255 | map (1 byte follow) | 0xb8 - object | *size*: 256..65535 | map (2 bytes follow) | 0xb9 - object | *size*: 65536..4294967295 | map (4 bytes follow) | 0xba - object | *size*: 4294967296..18446744073709551615 | map (8 bytes follow) | 0xbb - - @note The mapping is **complete** in the sense that any JSON value type - can be converted to a CBOR value. - - @note The following CBOR types are not used in the conversion: - - byte strings (0x40..0x5f) - - UTF-8 strings terminated by "break" (0x7f) - - arrays terminated by "break" (0x9f) - - maps terminated by "break" (0xbf) - - date/time (0xc0..0xc1) - - bignum (0xc2..0xc3) - - decimal fraction (0xc4) - - bigfloat (0xc5) - - tagged items (0xc6..0xd4, 0xd8..0xdb) - - expected conversions (0xd5..0xd7) - - simple values (0xe0..0xf3, 0xf8) - - undefined (0xf7) - - half and single-precision floats (0xf9-0xfa) - - break (0xff) - - @param[in] j JSON value to serialize - @return MessagePack serialization as byte vector - - @complexity Linear in the size of the JSON value @a j. - - @liveexample{The example shows the serialization of a JSON value to a byte - vector in CBOR format.,to_cbor} - - @sa http://cbor.io - @sa @ref from_cbor(const std::vector&, const size_t) for the - analogous deserialization - @sa @ref to_msgpack(const basic_json& for the related MessagePack format - - @since version 2.0.9 - */ - static std::vector to_cbor(const basic_json& j) - { - std::vector result; - binary_writer bw(output_adapter::create(result)); - bw.write_cbor(j); - return result; - } - - /*! - @brief create a MessagePack serialization of a given JSON value - - Serializes a given JSON value @a j to a byte vector using the MessagePack - serialization format. MessagePack is a binary serialization format which - aims to be more compact than JSON itself, yet more efficient to parse. - - The library uses the following mapping from JSON values types to - MessagePack types according to the MessagePack specification: - - JSON value type | value/range | MessagePack type | first byte - --------------- | --------------------------------- | ---------------- | ---------- - null | `null` | nil | 0xc0 - boolean | `true` | true | 0xc3 - boolean | `false` | false | 0xc2 - number_integer | -9223372036854775808..-2147483649 | int64 | 0xd3 - number_integer | -2147483648..-32769 | int32 | 0xd2 - number_integer | -32768..-129 | int16 | 0xd1 - number_integer | -128..-33 | int8 | 0xd0 - number_integer | -32..-1 | negative fixint | 0xe0..0xff - number_integer | 0..127 | positive fixint | 0x00..0x7f - number_integer | 128..255 | uint 8 | 0xcc - number_integer | 256..65535 | uint 16 | 0xcd - number_integer | 65536..4294967295 | uint 32 | 0xce - number_integer | 4294967296..18446744073709551615 | uint 64 | 0xcf - number_unsigned | 0..127 | positive fixint | 0x00..0x7f - number_unsigned | 128..255 | uint 8 | 0xcc - number_unsigned | 256..65535 | uint 16 | 0xcd - number_unsigned | 65536..4294967295 | uint 32 | 0xce - number_unsigned | 4294967296..18446744073709551615 | uint 64 | 0xcf - number_float | *any value* | float 64 | 0xcb - string | *length*: 0..31 | fixstr | 0xa0..0xbf - string | *length*: 32..255 | str 8 | 0xd9 - string | *length*: 256..65535 | str 16 | 0xda - string | *length*: 65536..4294967295 | str 32 | 0xdb - array | *size*: 0..15 | fixarray | 0x90..0x9f - array | *size*: 16..65535 | array 16 | 0xdc - array | *size*: 65536..4294967295 | array 32 | 0xdd - object | *size*: 0..15 | fix map | 0x80..0x8f - object | *size*: 16..65535 | map 16 | 0xde - object | *size*: 65536..4294967295 | map 32 | 0xdf - - @note The mapping is **complete** in the sense that any JSON value type - can be converted to a MessagePack value. - - @note The following values can **not** be converted to a MessagePack value: - - strings with more than 4294967295 bytes - - arrays with more than 4294967295 elements - - objects with more than 4294967295 elements - - @note The following MessagePack types are not used in the conversion: - - bin 8 - bin 32 (0xc4..0xc6) - - ext 8 - ext 32 (0xc7..0xc9) - - float 32 (0xca) - - fixext 1 - fixext 16 (0xd4..0xd8) - - @note Any MessagePack output created @ref to_msgpack can be successfully - parsed by @ref from_msgpack. - - @param[in] j JSON value to serialize - @return MessagePack serialization as byte vector - - @complexity Linear in the size of the JSON value @a j. - - @liveexample{The example shows the serialization of a JSON value to a byte - vector in MessagePack format.,to_msgpack} - - @sa http://msgpack.org - @sa @ref from_msgpack(const std::vector&, const size_t) for the - analogous deserialization - @sa @ref to_cbor(const basic_json& for the related CBOR format - - @since version 2.0.9 - */ - static std::vector to_msgpack(const basic_json& j) - { - std::vector result; - binary_writer bw(output_adapter::create(result)); - bw.write_msgpack(j); - return result; - } - - /*! - @brief create a JSON value from a byte vector in CBOR format - - Deserializes a given byte vector @a v to a JSON value using the CBOR - (Concise Binary Object Representation) serialization format. - - The library maps CBOR types to JSON value types as follows: - - CBOR type | JSON value type | first byte - ---------------------- | --------------- | ---------- - Integer | number_unsigned | 0x00..0x17 - Unsigned integer | number_unsigned | 0x18 - Unsigned integer | number_unsigned | 0x19 - Unsigned integer | number_unsigned | 0x1a - Unsigned integer | number_unsigned | 0x1b - Negative integer | number_integer | 0x20..0x37 - Negative integer | number_integer | 0x38 - Negative integer | number_integer | 0x39 - Negative integer | number_integer | 0x3a - Negative integer | number_integer | 0x3b - Negative integer | number_integer | 0x40..0x57 - UTF-8 string | string | 0x60..0x77 - UTF-8 string | string | 0x78 - UTF-8 string | string | 0x79 - UTF-8 string | string | 0x7a - UTF-8 string | string | 0x7b - UTF-8 string | string | 0x7f - array | array | 0x80..0x97 - array | array | 0x98 - array | array | 0x99 - array | array | 0x9a - array | array | 0x9b - array | array | 0x9f - map | object | 0xa0..0xb7 - map | object | 0xb8 - map | object | 0xb9 - map | object | 0xba - map | object | 0xbb - map | object | 0xbf - False | `false` | 0xf4 - True | `true` | 0xf5 - Nill | `null` | 0xf6 - Half-Precision Float | number_float | 0xf9 - Single-Precision Float | number_float | 0xfa - Double-Precision Float | number_float | 0xfb - - @warning The mapping is **incomplete** in the sense that not all CBOR - types can be converted to a JSON value. The following CBOR types - are not supported and will yield parse errors (parse_error.112): - - byte strings (0x40..0x5f) - - date/time (0xc0..0xc1) - - bignum (0xc2..0xc3) - - decimal fraction (0xc4) - - bigfloat (0xc5) - - tagged items (0xc6..0xd4, 0xd8..0xdb) - - expected conversions (0xd5..0xd7) - - simple values (0xe0..0xf3, 0xf8) - - undefined (0xf7) - - @warning CBOR allows map keys of any type, whereas JSON only allows - strings as keys in object values. Therefore, CBOR maps with keys - other than UTF-8 strings are rejected (parse_error.113). - - @note Any CBOR output created @ref to_cbor can be successfully parsed by - @ref from_cbor. - - @param[in] v a byte vector in CBOR format - @param[in] start_index the index to start reading from @a v (0 by default) - @return deserialized JSON value - - @throw parse_error.110 if the given vector ends prematurely - @throw parse_error.112 if unsupported features from CBOR were - used in the given vector @a v or if the input is not valid CBOR - @throw parse_error.113 if a string was expected as map key, but not found - - @complexity Linear in the size of the byte vector @a v. - - @liveexample{The example shows the deserialization of a byte vector in CBOR - format to a JSON value.,from_cbor} - - @sa http://cbor.io - @sa @ref to_cbor(const basic_json&) for the analogous serialization - @sa @ref from_msgpack(const std::vector&, const size_t) for the - related MessagePack format - - @since version 2.0.9, parameter @a start_index since 2.1.1 - */ - static basic_json from_cbor(const std::vector& v, - const size_t start_index = 0) - { - binary_reader br(input_adapter::create(v.begin() + static_cast(start_index), v.end())); - return br.parse_cbor(); - } - - - /*! - @brief create a JSON value from a byte vector in MessagePack format - - Deserializes a given byte vector @a v to a JSON value using the MessagePack - serialization format. - - The library maps MessagePack types to JSON value types as follows: - - MessagePack type | JSON value type | first byte - ---------------- | --------------- | ---------- - positive fixint | number_unsigned | 0x00..0x7f - fixmap | object | 0x80..0x8f - fixarray | array | 0x90..0x9f - fixstr | string | 0xa0..0xbf - nil | `null` | 0xc0 - false | `false` | 0xc2 - true | `true` | 0xc3 - float 32 | number_float | 0xca - float 64 | number_float | 0xcb - uint 8 | number_unsigned | 0xcc - uint 16 | number_unsigned | 0xcd - uint 32 | number_unsigned | 0xce - uint 64 | number_unsigned | 0xcf - int 8 | number_integer | 0xd0 - int 16 | number_integer | 0xd1 - int 32 | number_integer | 0xd2 - int 64 | number_integer | 0xd3 - str 8 | string | 0xd9 - str 16 | string | 0xda - str 32 | string | 0xdb - array 16 | array | 0xdc - array 32 | array | 0xdd - map 16 | object | 0xde - map 32 | object | 0xdf - negative fixint | number_integer | 0xe0-0xff - - @warning The mapping is **incomplete** in the sense that not all - MessagePack types can be converted to a JSON value. The following - MessagePack types are not supported and will yield parse errors: - - bin 8 - bin 32 (0xc4..0xc6) - - ext 8 - ext 32 (0xc7..0xc9) - - fixext 1 - fixext 16 (0xd4..0xd8) - - @note Any MessagePack output created @ref to_msgpack can be successfully - parsed by @ref from_msgpack. - - @param[in] v a byte vector in MessagePack format - @param[in] start_index the index to start reading from @a v (0 by default) - @return deserialized JSON value - - @throw parse_error.110 if the given vector ends prematurely - @throw parse_error.112 if unsupported features from MessagePack were - used in the given vector @a v or if the input is not valid MessagePack - @throw parse_error.113 if a string was expected as map key, but not found - - @complexity Linear in the size of the byte vector @a v. - - @liveexample{The example shows the deserialization of a byte vector in - MessagePack format to a JSON value.,from_msgpack} - - @sa http://msgpack.org - @sa @ref to_msgpack(const basic_json&) for the analogous serialization - @sa @ref from_cbor(const std::vector&, const size_t) for the - related CBOR format - - @since version 2.0.9, parameter @a start_index since 2.1.1 - */ - static basic_json from_msgpack(const std::vector& v, - const size_t start_index = 0) - { - binary_reader br(input_adapter::create(v.begin() + static_cast(start_index), v.end())); - return br.parse_msgpack(); - } - - /// @} - - ////////////////////// - // lexer and parser // - ////////////////////// - - private: - /*! - @brief lexical analysis - - This class organizes the lexical analysis during JSON deserialization. - */ - class lexer - { - public: - /// token types for the parser - enum class token_type - { - uninitialized, ///< indicating the scanner is uninitialized - literal_true, ///< the `true` literal - literal_false, ///< the `false` literal - literal_null, ///< the `null` literal - value_string, ///< a string -- use get_string() for actual value - value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value - value_integer, ///< a signed integer -- use get_number_integer() for actual value - value_float, ///< an floating point number -- use get_number_float() for actual value - begin_array, ///< the character for array begin `[` - begin_object, ///< the character for object begin `{` - end_array, ///< the character for array end `]` - end_object, ///< the character for object end `}` - name_separator, ///< the name separator `:` - value_separator, ///< the value separator `,` - parse_error, ///< indicating a parse error - end_of_input, ///< indicating the end of the input buffer - literal_or_value ///< a literal or the begin of a value (only for diagnostics) - }; - - /// return name of values of type token_type (only used for errors) - static const char* token_type_name(const token_type t) noexcept - { - switch (t) - { - case token_type::uninitialized: - return ""; - case token_type::literal_true: - return "true literal"; - case token_type::literal_false: - return "false literal"; - case token_type::literal_null: - return "null literal"; - case token_type::value_string: - return "string literal"; - case lexer::token_type::value_unsigned: - case lexer::token_type::value_integer: - case lexer::token_type::value_float: - return "number literal"; - case token_type::begin_array: - return "'['"; - case token_type::begin_object: - return "'{'"; - case token_type::end_array: - return "']'"; - case token_type::end_object: - return "'}'"; - case token_type::name_separator: - return "':'"; - case token_type::value_separator: - return "','"; - case token_type::parse_error: - return ""; - case token_type::end_of_input: - return "end of input"; - case token_type::literal_or_value: - return "'[', '{', or a literal"; - default: - { - // catch non-enum values - return "unknown token"; // LCOV_EXCL_LINE - } - } - } - - explicit lexer(input_adapter_t adapter) - : ia(adapter), decimal_point_char(get_decimal_point()) - {} - - // delete because of pointer members - lexer(const lexer&) = delete; - lexer& operator=(lexer&) = delete; - - private: - ///////////////////// - // locales - ///////////////////// - - /// return the locale-dependent decimal point - static char get_decimal_point() noexcept - { - const auto loc = localeconv(); - assert(loc != nullptr); - return (loc->decimal_point == nullptr) ? '.' : loc->decimal_point[0]; - } - - ///////////////////// - // scan functions - ///////////////////// - - /*! - @brief get codepoint from 4 hex characters following `\u` - - @return codepoint or -1 in case of an error (e.g. EOF or non-hex - character) - */ - int get_codepoint() - { - // this function only makes sense after reading `\u` - assert(current == 'u'); - int codepoint = 0; - - // byte 1: \uXxxx - switch (get()) - { - case '0': - break; - case '1': - codepoint += 0x1000; - break; - case '2': - codepoint += 0x2000; - break; - case '3': - codepoint += 0x3000; - break; - case '4': - codepoint += 0x4000; - break; - case '5': - codepoint += 0x5000; - break; - case '6': - codepoint += 0x6000; - break; - case '7': - codepoint += 0x7000; - break; - case '8': - codepoint += 0x8000; - break; - case '9': - codepoint += 0x9000; - break; - case 'A': - case 'a': - codepoint += 0xa000; - break; - case 'B': - case 'b': - codepoint += 0xb000; - break; - case 'C': - case 'c': - codepoint += 0xc000; - break; - case 'D': - case 'd': - codepoint += 0xd000; - break; - case 'E': - case 'e': - codepoint += 0xe000; - break; - case 'F': - case 'f': - codepoint += 0xf000; - break; - default: - return -1; - } - - // byte 2: \uxXxx - switch (get()) - { - case '0': - break; - case '1': - codepoint += 0x0100; - break; - case '2': - codepoint += 0x0200; - break; - case '3': - codepoint += 0x0300; - break; - case '4': - codepoint += 0x0400; - break; - case '5': - codepoint += 0x0500; - break; - case '6': - codepoint += 0x0600; - break; - case '7': - codepoint += 0x0700; - break; - case '8': - codepoint += 0x0800; - break; - case '9': - codepoint += 0x0900; - break; - case 'A': - case 'a': - codepoint += 0x0a00; - break; - case 'B': - case 'b': - codepoint += 0x0b00; - break; - case 'C': - case 'c': - codepoint += 0x0c00; - break; - case 'D': - case 'd': - codepoint += 0x0d00; - break; - case 'E': - case 'e': - codepoint += 0x0e00; - break; - case 'F': - case 'f': - codepoint += 0x0f00; - break; - default: - return -1; - } - - // byte 3: \uxxXx - switch (get()) - { - case '0': - break; - case '1': - codepoint += 0x0010; - break; - case '2': - codepoint += 0x0020; - break; - case '3': - codepoint += 0x0030; - break; - case '4': - codepoint += 0x0040; - break; - case '5': - codepoint += 0x0050; - break; - case '6': - codepoint += 0x0060; - break; - case '7': - codepoint += 0x0070; - break; - case '8': - codepoint += 0x0080; - break; - case '9': - codepoint += 0x0090; - break; - case 'A': - case 'a': - codepoint += 0x00a0; - break; - case 'B': - case 'b': - codepoint += 0x00b0; - break; - case 'C': - case 'c': - codepoint += 0x00c0; - break; - case 'D': - case 'd': - codepoint += 0x00d0; - break; - case 'E': - case 'e': - codepoint += 0x00e0; - break; - case 'F': - case 'f': - codepoint += 0x00f0; - break; - default: - return -1; - } - - // byte 4: \uxxxX - switch (get()) - { - case '0': - break; - case '1': - codepoint += 0x0001; - break; - case '2': - codepoint += 0x0002; - break; - case '3': - codepoint += 0x0003; - break; - case '4': - codepoint += 0x0004; - break; - case '5': - codepoint += 0x0005; - break; - case '6': - codepoint += 0x0006; - break; - case '7': - codepoint += 0x0007; - break; - case '8': - codepoint += 0x0008; - break; - case '9': - codepoint += 0x0009; - break; - case 'A': - case 'a': - codepoint += 0x000a; - break; - case 'B': - case 'b': - codepoint += 0x000b; - break; - case 'C': - case 'c': - codepoint += 0x000c; - break; - case 'D': - case 'd': - codepoint += 0x000d; - break; - case 'E': - case 'e': - codepoint += 0x000e; - break; - case 'F': - case 'f': - codepoint += 0x000f; - break; - default: - return -1; - } - - return codepoint; - } - - /*! - @brief scan a string literal - - This function scans a string according to Sect. 7 of RFC 7159. While - scanning, bytes are escaped and copied into buffer yytext. Then the - function returns successfully, yytext is null-terminated and yylen - contains the number of bytes in the string. - - @return token_type::value_string if string could be successfully - scanned, token_type::parse_error otherwise - - @note In case of errors, variable error_message contains a textual - description. - */ - token_type scan_string() - { - // reset yytext (ignore opening quote) - reset(); - - // we entered the function by reading an open quote - assert(current == '\"'); - - while (true) - { - // get next character - switch (get()) - { - // end of file while parsing string - case std::char_traits::eof(): - { - error_message = "invalid string: missing closing quote"; - return token_type::parse_error; - } - - // closing quote - case '\"': - { - // terminate yytext - add('\0'); - --yylen; - return token_type::value_string; - } - - // escapes - case '\\': - { - switch (get()) - { - // quotation mark - case '\"': - add('\"'); - break; - // reverse solidus - case '\\': - add('\\'); - break; - // solidus - case '/': - add('/'); - break; - // backspace - case 'b': - add('\b'); - break; - // form feed - case 'f': - add('\f'); - break; - // line feed - case 'n': - add('\n'); - break; - // carriage return - case 'r': - add('\r'); - break; - // tab - case 't': - add('\t'); - break; - - // unicode escapes - case 'u': - { - int codepoint; - int codepoint1 = get_codepoint(); - - if (JSON_UNLIKELY(codepoint1 == -1)) - { - error_message = "invalid string: '\\u' must be followed by 4 hex digits"; - return token_type::parse_error; - } - - // check if code point is a high surrogate - if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) - { - // expect next \uxxxx entry - if (JSON_LIKELY(get() == '\\' and get() == 'u')) - { - const int codepoint2 = get_codepoint(); - - if (JSON_UNLIKELY(codepoint2 == -1)) - { - error_message = "invalid string: '\\u' must be followed by 4 hex digits"; - return token_type::parse_error; - } - - // check if codepoint2 is a low surrogate - if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) - { - codepoint = - // high surrogate occupies the most significant 22 bits - (codepoint1 << 10) - // low surrogate occupies the least significant 15 bits - + codepoint2 - // there is still the 0xD800, 0xDC00 and 0x10000 noise - // in the result so we have to subtract with: - // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 - -0x35FDC00; - } - else - { - error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; - return token_type::parse_error; - } - } - else - { - error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; - return token_type::parse_error; - } - } - else - { - if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) - { - error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; - return token_type::parse_error; - } - - // only work with first code point - codepoint = codepoint1; - } - - // result of the above calculation yields a proper codepoint - assert(0x00 <= codepoint and codepoint <= 0x10FFFF); - - // translate code point to bytes - if (codepoint < 0x80) - { - // 1-byte characters: 0xxxxxxx (ASCII) - add(codepoint); - } - else if (codepoint <= 0x7ff) - { - // 2-byte characters: 110xxxxx 10xxxxxx - add(0xC0 | (codepoint >> 6)); - add(0x80 | (codepoint & 0x3F)); - } - else if (codepoint <= 0xffff) - { - // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx - add(0xE0 | (codepoint >> 12)); - add(0x80 | ((codepoint >> 6) & 0x3F)); - add(0x80 | (codepoint & 0x3F)); - } - else - { - // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - add(0xF0 | (codepoint >> 18)); - add(0x80 | ((codepoint >> 12) & 0x3F)); - add(0x80 | ((codepoint >> 6) & 0x3F)); - add(0x80 | (codepoint & 0x3F)); - } - - break; - } - - // other characters after escape - default: - error_message = "invalid string: forbidden character after backslash"; - return token_type::parse_error; - } - - break; - } - - // invalid control characters - case 0x00: - case 0x01: - case 0x02: - case 0x03: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - case 0x08: - case 0x09: - case 0x0a: - case 0x0b: - case 0x0c: - case 0x0d: - case 0x0e: - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: - case 0x19: - case 0x1a: - case 0x1b: - case 0x1c: - case 0x1d: - case 0x1e: - case 0x1f: - { - error_message = "invalid string: control character must be escaped"; - return token_type::parse_error; - } - - // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) - case 0x20: - case 0x21: - case 0x23: - case 0x24: - case 0x25: - case 0x26: - case 0x27: - case 0x28: - case 0x29: - case 0x2a: - case 0x2b: - case 0x2c: - case 0x2d: - case 0x2e: - case 0x2f: - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x41: - case 0x42: - case 0x43: - case 0x44: - case 0x45: - case 0x46: - case 0x47: - case 0x48: - case 0x49: - case 0x4a: - case 0x4b: - case 0x4c: - case 0x4d: - case 0x4e: - case 0x4f: - case 0x50: - case 0x51: - case 0x52: - case 0x53: - case 0x54: - case 0x55: - case 0x56: - case 0x57: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5d: - case 0x5e: - case 0x5f: - case 0x60: - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - case 0x68: - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - case 0x70: - case 0x71: - case 0x72: - case 0x73: - case 0x74: - case 0x75: - case 0x76: - case 0x77: - case 0x78: - case 0x79: - case 0x7a: - case 0x7b: - case 0x7c: - case 0x7d: - case 0x7e: - case 0x7f: - { - add(current); - break; - } - - // U+0080..U+07FF: bytes C2..DF 80..BF - case 0xc2: - case 0xc3: - case 0xc4: - case 0xc5: - case 0xc6: - case 0xc7: - case 0xc8: - case 0xc9: - case 0xca: - case 0xcb: - case 0xcc: - case 0xcd: - case 0xce: - case 0xcf: - case 0xd0: - case 0xd1: - case 0xd2: - case 0xd3: - case 0xd4: - case 0xd5: - case 0xd6: - case 0xd7: - case 0xd8: - case 0xd9: - case 0xda: - case 0xdb: - case 0xdc: - case 0xdd: - case 0xde: - case 0xdf: - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+0800..U+0FFF: bytes E0 A0..BF 80..BF - case 0xe0: - { - add(current); - get(); - if (JSON_LIKELY(0xa0 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF - // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF - case 0xe1: - case 0xe2: - case 0xe3: - case 0xe4: - case 0xe5: - case 0xe6: - case 0xe7: - case 0xe8: - case 0xe9: - case 0xea: - case 0xeb: - case 0xec: - case 0xee: - case 0xef: - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+D000..U+D7FF: bytes ED 80..9F 80..BF - case 0xed: - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0x9f)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF - case 0xf0: - { - add(current); - get(); - if (JSON_LIKELY(0x90 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF - case 0xf1: - case 0xf2: - case 0xf3: - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF - case 0xf4: - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0x8f)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - get(); - if (JSON_LIKELY(0x80 <= current and current <= 0xbf)) - { - add(current); - continue; - } - } - } - - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - - // remaining bytes (80..C1 and F5..FF) are ill-formed - default: - { - error_message = "invalid string: ill-formed UTF-8 byte"; - return token_type::parse_error; - } - } - } - } - - static void strtof(float& f, const char* str, char** endptr) noexcept - { - f = std::strtof(str, endptr); - } - - static void strtof(double& f, const char* str, char** endptr) noexcept - { - f = std::strtod(str, endptr); - } - - static void strtof(long double& f, const char* str, char** endptr) noexcept - { - f = std::strtold(str, endptr); - } - - /*! - @brief scan a number literal - - This function scans a string according to Sect. 6 of RFC 7159. - - The function is realized with a deterministic finite state machine - derived from the grammar described in RFC 7159. Starting in state - "init", the input is read and used to determined the next state. Only - state "done" accepts the number. State "error" is a trap state to model - errors. In the table below, "anything" means any character but the ones - listed before. - - state | 0 | 1-9 | e E | + | - | . | anything - ---------|----------|----------|----------|---------|---------|----------|----------- - init | zero | any1 | [error] | [error] | minus | [error] | [error] - minus | zero | any1 | [error] | [error] | [error] | [error] | [error] - zero | done | done | exponent | done | done | decimal1 | done - any1 | any1 | any1 | exponent | done | done | decimal1 | done - decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] - decimal2 | decimal2 | decimal2 | exponent | done | done | done | done - exponent | any2 | any2 | [error] | sign | sign | [error] | [error] - sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] - any2 | any2 | any2 | done | done | done | done | done - - The state machine is realized with one label per state (prefixed with - "scan_number_") and `goto` statements between them. The state machine - contains cycles, but any cycle can be left when EOF is read. Therefore, - the function is guaranteed to terminate. - - During scanning, the read bytes are stored in yytext. This string is - then converted to a signed integer, an unsigned integer, or a - floating-point number. - - @return token_type::value_unsigned, token_type::value_integer, or - token_type::value_float if number could be successfully scanned, - token_type::parse_error otherwise - - @note The scanner is independent of the current locale. Internally, the - locale's decimal point is used instead of `.` to work with the - locale-dependent converters. - */ - token_type scan_number() - { - // reset yytext to store the number's bytes - reset(); - - // the type of the parsed number; initially set to unsigned; will be - // changed if minus sign, decimal point or exponent is read - token_type number_type = token_type::value_unsigned; - - // state (init): we just found out we need to scan a number - switch (current) - { - case '-': - { - add(current); - goto scan_number_minus; - } - - case '0': - { - add(current); - goto scan_number_zero; - } - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any1; - } - - default: - { - // all other characters are rejected outside scan_number() - assert(false); // LCOV_EXCL_LINE - } - } - - scan_number_minus: - // state: we just parsed a leading minus sign - number_type = token_type::value_integer; - switch (get()) - { - case '0': - { - add(current); - goto scan_number_zero; - } - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any1; - } - - default: - { - error_message = "invalid number; expected digit after '-'"; - return token_type::parse_error; - } - } - - scan_number_zero: - // state: we just parse a zero (maybe with a leading minus sign) - switch (get()) - { - case '.': - { - add(decimal_point_char); - goto scan_number_decimal1; - } - - case 'e': - case 'E': - { - add(current); - goto scan_number_exponent; - } - - default: - { - goto scan_number_done; - } - } - - scan_number_any1: - // state: we just parsed a number 0-9 (maybe with a leading minus sign) - switch (get()) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any1; - } - - case '.': - { - add(decimal_point_char); - goto scan_number_decimal1; - } - - case 'e': - case 'E': - { - add(current); - goto scan_number_exponent; - } - - default: - { - goto scan_number_done; - } - } - - scan_number_decimal1: - // state: we just parsed a decimal point - number_type = token_type::value_float; - switch (get()) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_decimal2; - } - - default: - { - error_message = "invalid number; expected digit after '.'"; - return token_type::parse_error; - } - } - - scan_number_decimal2: - // we just parsed at least one number after a decimal point - switch (get()) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_decimal2; - } - - case 'e': - case 'E': - { - add(current); - goto scan_number_exponent; - } - - default: - { - goto scan_number_done; - } - } - - scan_number_exponent: - // we just parsed an exponent - number_type = token_type::value_float; - switch (get()) - { - case '+': - case '-': - { - add(current); - goto scan_number_sign; - } - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any2; - } - - default: - { - error_message = "invalid number; expected '+', '-', or digit after exponent"; - return token_type::parse_error; - } - } - - scan_number_sign: - // we just parsed an exponent sign - switch (get()) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any2; - } - - default: - { - error_message = "invalid number; expected digit after exponent sign"; - return token_type::parse_error; - } - } - - scan_number_any2: - // we just parsed a number after the exponent or exponent sign - switch (get()) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - { - add(current); - goto scan_number_any2; - } - - default: - { - goto scan_number_done; - } - } - - scan_number_done: - // unget the character after the number (we only read it to know - // that we are done scanning a number) - --chars_read; - next_unget = true; - - // terminate token - add('\0'); - --yylen; - - // try to parse integers first and fall back to floats - if (number_type == token_type::value_unsigned) - { - char* endptr = nullptr; - errno = 0; - const auto x = std::strtoull(yytext.data(), &endptr, 10); - - // we checked the number format before - assert(endptr == yytext.data() + yylen); - - if (errno == 0) - { - value_unsigned = static_cast(x); - if (value_unsigned == x) - { - return token_type::value_unsigned; - } - } - } - else if (number_type == token_type::value_integer) - { - char* endptr = nullptr; - errno = 0; - const auto x = std::strtoll(yytext.data(), &endptr, 10); - - // we checked the number format before - assert(endptr == yytext.data() + yylen); - - if (errno == 0) - { - value_integer = static_cast(x); - if (value_integer == x) - { - return token_type::value_integer; - } - } - } - - // this code is reached if we parse a floating-point number or if - // an integer conversion above failed - strtof(value_float, yytext.data(), nullptr); - return token_type::value_float; - } - - /*! - @param[in] literal_text the literal text to expect - @param[in] length the length of the passed literal text - @param[in] return_type the token type to return on success - */ - token_type scan_literal(const char* literal_text, const size_t length, - token_type return_type) - { - assert(current == literal_text[0]); - for (size_t i = 1; i < length; ++i) - { - if (JSON_UNLIKELY(get() != literal_text[i])) - { - error_message = "invalid literal"; - return token_type::parse_error; - } - } - return return_type; - } - - ///////////////////// - // input management - ///////////////////// - - /// reset yytext - void reset() noexcept - { - yylen = 0; - start_pos = chars_read - 1; - } - - /// get a character from the input - int get() - { - ++chars_read; - return next_unget - ? (next_unget = false, current) - : (current = ia->get_character()); - } - - /// add a character to yytext - void add(int c) - { - // resize yytext if necessary; this condition is deemed unlikely, - // because we start with a 1024-byte buffer - if (JSON_UNLIKELY((yylen + 1 > yytext.capacity()))) - { - yytext.resize(2 * yytext.capacity(), '\0'); - } - assert(yylen < yytext.size()); - yytext[yylen++] = static_cast(c); - } - - public: - ///////////////////// - // value getters - ///////////////////// - - /// return integer value - constexpr number_integer_t get_number_integer() const noexcept - { - return value_integer; - } - - /// return unsigned integer value - constexpr number_unsigned_t get_number_unsigned() const noexcept - { - return value_unsigned; - } - - /// return floating-point value - constexpr number_float_t get_number_float() const noexcept - { - return value_float; - } - - /// return string value - const std::string get_string() - { - // yytext cannot be returned as char*, because it may contain a - // null byte (parsed as "\u0000") - return std::string(yytext.data(), yylen); - } - - ///////////////////// - // diagnostics - ///////////////////// - - /// return position of last read token - constexpr size_t get_position() const noexcept - { - return chars_read; - } - - /// return the last read token (for errors only) - std::string get_token_string() const - { - // get the raw byte sequence of the last token - std::string s = ia->read(start_pos, chars_read - start_pos); - - // escape control characters - std::string result; - for (auto c : s) - { - if (c == '\0' or c == std::char_traits::eof()) - { - // ignore EOF - continue; - } - else if ('\x00' <= c and c <= '\x1f') - { - // escape control characters - std::stringstream ss; - ss << "(c) << ">"; - result += ss.str(); - } - else - { - // add character as is - result.append(1, c); - } - } - - return result; - } - - /// return syntax error message - constexpr const char* get_error_message() const noexcept - { - return error_message; - } - - ///////////////////// - // actual scanner - ///////////////////// - - token_type scan() - { - // read next character and ignore whitespace - do - { - get(); - } while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); - - switch (current) - { - // structural characters - case '[': - return token_type::begin_array; - case ']': - return token_type::end_array; - case '{': - return token_type::begin_object; - case '}': - return token_type::end_object; - case ':': - return token_type::name_separator; - case ',': - return token_type::value_separator; - - // literals - case 't': - return scan_literal("true", 4, token_type::literal_true); - case 'f': - return scan_literal("false", 5, token_type::literal_false); - case 'n': - return scan_literal("null", 4, token_type::literal_null); - - // string - case '\"': - return scan_string(); - - // number - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - return scan_number(); - - // end of input (the null byte is needed when parsing from - // string literals) - case '\0': - case std::char_traits::eof(): - return token_type::end_of_input; - - // error - default: - error_message = "invalid literal"; - return token_type::parse_error; - } - } - - private: - /// input adapter - input_adapter_t ia = nullptr; - - /// the current character - int current = std::char_traits::eof(); - - /// whether get() should return the last character again - bool next_unget = false; - - /// the number of characters read - size_t chars_read = 0; - /// the start position of the current token - size_t start_pos = 0; - - /// buffer for variable-length tokens (numbers, strings) - std::vector yytext = std::vector(1024, '\0'); - /// current index in yytext - size_t yylen = 0; - - /// a description of occurred lexer errors - const char* error_message = ""; - - // number values - number_integer_t value_integer = 0; - number_unsigned_t value_unsigned = 0; - number_float_t value_float = 0; - - /// the decimal point - const char decimal_point_char = '.'; - }; - - /*! - @brief syntax analysis - - This class implements a recursive decent parser. - */ - class parser - { - public: - /// a parser reading from an input adapter - explicit parser(input_adapter_t adapter, - const parser_callback_t cb = nullptr) - : callback(cb), m_lexer(adapter) - {} - - /*! - @brief public parser interface - - @param[in] strict whether to expect the last token to be EOF - @return parsed JSON value - - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - */ - basic_json parse(const bool strict = true) - { - // read first token - get_token(); - - basic_json result = parse_internal(true); - result.assert_invariant(); - - if (strict) - { - get_token(); - expect(lexer::token_type::end_of_input); - } - - // return parser result and replace it with null in case the - // top-level value was discarded by the callback function - return result.is_discarded() ? basic_json() : std::move(result); - } - - /*! - @brief public accept interface - - @param[in] strict whether to expect the last token to be EOF - @return whether the input is a proper JSON text - */ - bool accept(const bool strict = true) - { - // read first token - get_token(); - - if (not accept_internal()) - { - return false; - } - - if (strict and get_token() != lexer::token_type::end_of_input) - { - return false; - } - - return true; - } - - private: - /*! - @brief the actual parser - @throw parse_error.101 in case of an unexpected token - @throw parse_error.102 if to_unicode fails or surrogate error - @throw parse_error.103 if to_unicode fails - */ - basic_json parse_internal(bool keep) - { - auto result = basic_json(value_t::discarded); - - switch (last_token) - { - case lexer::token_type::begin_object: - { - if (keep and (not callback - or ((keep = callback(depth++, parse_event_t::object_start, result)) != 0))) - { - // explicitly set result to object to cope with {} - result.m_type = value_t::object; - result.m_value = value_t::object; - } - - // read next token - get_token(); - - // closing } -> we are done - if (last_token == lexer::token_type::end_object) - { - if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) - { - result = basic_json(value_t::discarded); - } - return result; - } - - // parse values - while (true) - { - // store key - expect(lexer::token_type::value_string); - const auto key = m_lexer.get_string(); - - bool keep_tag = false; - if (keep) - { - if (callback) - { - basic_json k(key); - keep_tag = callback(depth, parse_event_t::key, k); - } - else - { - keep_tag = true; - } - } - - // parse separator (:) - get_token(); - expect(lexer::token_type::name_separator); - - // parse and add value - get_token(); - auto value = parse_internal(keep); - if (keep and keep_tag and not value.is_discarded()) - { - result[key] = std::move(value); - } - - // comma -> next value - get_token(); - if (last_token == lexer::token_type::value_separator) - { - get_token(); - continue; - } - - // closing } - expect(lexer::token_type::end_object); - break; - } - - if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) - { - result = basic_json(value_t::discarded); - } - - return result; - } - - case lexer::token_type::begin_array: - { - if (keep and (not callback - or ((keep = callback(depth++, parse_event_t::array_start, result)) != 0))) - { - // explicitly set result to object to cope with [] - result.m_type = value_t::array; - result.m_value = value_t::array; - } - - // read next token - get_token(); - - // closing ] -> we are done - if (last_token == lexer::token_type::end_array) - { - if (callback and not callback(--depth, parse_event_t::array_end, result)) - { - result = basic_json(value_t::discarded); - } - return result; - } - - // parse values - while (true) - { - // parse value - auto value = parse_internal(keep); - if (keep and not value.is_discarded()) - { - result.push_back(std::move(value)); - } - - // comma -> next value - get_token(); - if (last_token == lexer::token_type::value_separator) - { - get_token(); - continue; - } - - // closing ] - expect(lexer::token_type::end_array); - break; - } - - if (keep and callback and not callback(--depth, parse_event_t::array_end, result)) - { - result = basic_json(value_t::discarded); - } - - return result; - } - - case lexer::token_type::literal_null: - { - result.m_type = value_t::null; - break; - } - - case lexer::token_type::value_string: - { - result = basic_json(m_lexer.get_string()); - break; - } - - case lexer::token_type::literal_true: - { - result.m_type = value_t::boolean; - result.m_value = true; - break; - } - - case lexer::token_type::literal_false: - { - result.m_type = value_t::boolean; - result.m_value = false; - break; - } - - case lexer::token_type::value_unsigned: - { - result.m_type = value_t::number_unsigned; - result.m_value = m_lexer.get_number_unsigned(); - break; - } - - case lexer::token_type::value_integer: - { - result.m_type = value_t::number_integer; - result.m_value = m_lexer.get_number_integer(); - break; - } - - case lexer::token_type::value_float: - { - result.m_type = value_t::number_float; - result.m_value = m_lexer.get_number_float(); - - // throw in case of infinity or NAN - if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float))) - { - JSON_THROW(out_of_range::create(406, "number overflow parsing '" + m_lexer.get_token_string() + "'")); - } - - break; - } - - case lexer::token_type::parse_error: - { - // using "uninitialized" to avoid "expected" message - expect(lexer::token_type::uninitialized); - } - - default: - { - // the last token was unexpected; we expected a value - expect(lexer::token_type::literal_or_value); - } - } - - if (keep and callback and not callback(depth, parse_event_t::value, result)) - { - result = basic_json(value_t::discarded); - } - return result; - } - - /*! - @brief the acutal acceptor - - @invariant 1. The last token is not yet processed. Therefore, the - caller of this function must make sure a token has - been read. - 2. When this function returns, the last token is processed. - That is, the last read character was already considered. - - This invariant makes sure that no token needs to be "unput". - */ - bool accept_internal() - { - switch (last_token) - { - case lexer::token_type::begin_object: - { - // read next token - get_token(); - - // closing } -> we are done - if (last_token == lexer::token_type::end_object) - { - return true; - } - - // parse values - while (true) - { - // parse key - if (last_token != lexer::token_type::value_string) - { - return false; - } - - // parse separator (:) - get_token(); - if (last_token != lexer::token_type::name_separator) - { - return false; - } - - // parse value - get_token(); - if (not accept_internal()) - { - return false; - } - - // comma -> next value - get_token(); - if (last_token == lexer::token_type::value_separator) - { - get_token(); - continue; - } - - // closing } - if (last_token != lexer::token_type::end_object) - { - return false; - } - - return true; - } - } - - case lexer::token_type::begin_array: - { - // read next token - get_token(); - - // closing ] -> we are done - if (last_token == lexer::token_type::end_array) - { - return true; - } - - // parse values - while (true) - { - // parse value - if (not accept_internal()) - { - return false; - } - - // comma -> next value - get_token(); - if (last_token == lexer::token_type::value_separator) - { - get_token(); - continue; - } - - // closing ] - if (last_token != lexer::token_type::end_array) - { - return false; - } - - return true; - } - } - - case lexer::token_type::literal_false: - case lexer::token_type::literal_null: - case lexer::token_type::literal_true: - case lexer::token_type::value_float: - case lexer::token_type::value_integer: - case lexer::token_type::value_string: - case lexer::token_type::value_unsigned: - { - return true; - } - - default: - { - // the last token was unexpected - return false; - } - } - } - - /// get next token from lexer - typename lexer::token_type get_token() - { - return (last_token = m_lexer.scan()); - } - - /*! - @throw parse_error.101 if expected token did not occur - */ - void expect(typename lexer::token_type t) - { - if (JSON_UNLIKELY(t != last_token)) - { - errored = true; - expected = t; - throw_exception(); - } - } - - [[noreturn]] void throw_exception() const - { - std::string error_msg = "syntax error - "; - if (last_token == lexer::token_type::parse_error) - { - error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + m_lexer.get_token_string() + "'"; - } - else - { - error_msg += "unexpected " + std::string(lexer::token_type_name(last_token)); - } - - if (expected != lexer::token_type::uninitialized) - { - error_msg += "; expected " + std::string(lexer::token_type_name(expected)); - } - - JSON_THROW(parse_error::create(101, m_lexer.get_position(), error_msg)); - } - - private: - /// current level of recursion - int depth = 0; - /// callback function - const parser_callback_t callback = nullptr; - /// the type of the last read token - typename lexer::token_type last_token = lexer::token_type::uninitialized; - /// the lexer - lexer m_lexer; - /// whether a syntax error occurred - bool errored = false; - /// possible reason for the syntax error - typename lexer::token_type expected = lexer::token_type::uninitialized; - }; - - public: - /*! - @brief JSON Pointer - - A JSON pointer defines a string syntax for identifying a specific value - within a JSON document. It can be used with functions `at` and - `operator[]`. Furthermore, JSON pointers are the base for JSON patches. - - @sa [RFC 6901](https://tools.ietf.org/html/rfc6901) - - @since version 2.0.0 - */ - class json_pointer - { - /// allow basic_json to access private members - friend class basic_json; - - public: - /*! - @brief create JSON pointer - - Create a JSON pointer according to the syntax described in - [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3). - - @param[in] s string representing the JSON pointer; if omitted, the - empty string is assumed which references the whole JSON - value - - @throw parse_error.107 if the given JSON pointer @a s is nonempty and - does not begin with a slash (`/`); see example below - - @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s - is not followed by `0` (representing `~`) or `1` (representing `/`); - see example below - - @liveexample{The example shows the construction several valid JSON - pointers as well as the exceptional behavior.,json_pointer} - - @since version 2.0.0 - */ - explicit json_pointer(const std::string& s = "") - : reference_tokens(split(s)) - {} - - /*! - @brief return a string representation of the JSON pointer - - @invariant For each JSON pointer `ptr`, it holds: - @code {.cpp} - ptr == json_pointer(ptr.to_string()); - @endcode - - @return a string representation of the JSON pointer - - @liveexample{The example shows the result of `to_string`., - json_pointer__to_string} - - @since version 2.0.0 - */ - std::string to_string() const noexcept - { - return std::accumulate(reference_tokens.begin(), - reference_tokens.end(), std::string{}, - [](const std::string & a, const std::string & b) - { - return a + "/" + escape(b); - }); - } - - /// @copydoc to_string() - operator std::string() const - { - return to_string(); - } - - private: - /*! - @brief remove and return last reference pointer - @throw out_of_range.405 if JSON pointer has no parent - */ - std::string pop_back() - { - if (is_root()) - { - JSON_THROW(out_of_range::create(405, "JSON pointer has no parent")); - } - - auto last = reference_tokens.back(); - reference_tokens.pop_back(); - return last; - } - - /// return whether pointer points to the root document - bool is_root() const - { - return reference_tokens.empty(); - } - - json_pointer top() const - { - if (is_root()) - { - JSON_THROW(out_of_range::create(405, "JSON pointer has no parent")); - } - - json_pointer result = *this; - result.reference_tokens = { reference_tokens[0] }; - return result; - } - - /*! - @brief create and return a reference to the pointed to value - - @complexity Linear in the number of reference tokens. - - @throw parse_error.109 if array index is not a number - @throw type_error.313 if value cannot be unflattened - */ - reference get_and_create(reference j) const - { - pointer result = &j; - - // in case no reference tokens exist, return a reference to the - // JSON value j which will be overwritten by a primitive value - for (const auto& reference_token : reference_tokens) - { - switch (result->m_type) - { - case value_t::null: - { - if (reference_token == "0") - { - // start a new array if reference token is 0 - result = &result->operator[](0); - } - else - { - // start a new object otherwise - result = &result->operator[](reference_token); - } - break; - } - - case value_t::object: - { - // create an entry in the object - result = &result->operator[](reference_token); - break; - } - - case value_t::array: - { - // create an entry in the array - JSON_TRY - { - result = &result->operator[](static_cast(std::stoi(reference_token))); - } - JSON_CATCH(std::invalid_argument&) - { - JSON_THROW(parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); - } - break; - } - - /* - The following code is only reached if there exists a - reference token _and_ the current value is primitive. In - this case, we have an error situation, because primitive - values may only occur as single value; that is, with an - empty list of reference tokens. - */ - default: - { - JSON_THROW(type_error::create(313, "invalid value to unflatten")); - } - } - } - - return *result; - } - - /*! - @brief return a reference to the pointed to value - - @note This version does not throw if a value is not present, but tries - to create nested values instead. For instance, calling this function - with pointer `"/this/that"` on a null value is equivalent to calling - `operator[]("this").operator[]("that")` on that value, effectively - changing the null value to an object. - - @param[in] ptr a JSON value - - @return reference to the JSON value pointed to by the JSON pointer - - @complexity Linear in the length of the JSON pointer. - - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.404 if the JSON pointer can not be resolved - */ - reference get_unchecked(pointer ptr) const - { - for (const auto& reference_token : reference_tokens) - { - // convert null values to arrays or objects before continuing - if (ptr->m_type == value_t::null) - { - // check if reference token is a number - const bool nums = std::all_of(reference_token.begin(), - reference_token.end(), - [](const char x) - { - return (x >= '0' and x <= '9'); - }); - - // change value to array for numbers or "-" or to object - // otherwise - if (nums or reference_token == "-") - { - *ptr = value_t::array; - } - else - { - *ptr = value_t::object; - } - } - - switch (ptr->m_type) - { - case value_t::object: - { - // use unchecked object access - ptr = &ptr->operator[](reference_token); - break; - } - - case value_t::array: - { - // error condition (cf. RFC 6901, Sect. 4) - if (reference_token.size() > 1 and reference_token[0] == '0') - { - JSON_THROW(parse_error::create(106, 0, "array index '" + reference_token + "' must not begin with '0'")); - } - - if (reference_token == "-") - { - // explicitly treat "-" as index beyond the end - ptr = &ptr->operator[](ptr->m_value.array->size()); - } - else - { - // convert array index to number; unchecked access - JSON_TRY - { - ptr = &ptr->operator[](static_cast(std::stoi(reference_token))); - } - JSON_CATCH(std::invalid_argument&) - { - JSON_THROW(parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); - } - } - break; - } - - default: - { - JSON_THROW(out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); - } - } - } - - return *ptr; - } - - /*! - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved - */ - reference get_checked(pointer ptr) const - { - for (const auto& reference_token : reference_tokens) - { - switch (ptr->m_type) - { - case value_t::object: - { - // note: at performs range check - ptr = &ptr->at(reference_token); - break; - } - - case value_t::array: - { - if (reference_token == "-") - { - // "-" always fails the range check - JSON_THROW(out_of_range::create(402, "array index '-' (" + - std::to_string(ptr->m_value.array->size()) + - ") is out of range")); - } - - // error condition (cf. RFC 6901, Sect. 4) - if (reference_token.size() > 1 and reference_token[0] == '0') - { - JSON_THROW(parse_error::create(106, 0, "array index '" + reference_token + "' must not begin with '0'")); - } - - // note: at performs range check - JSON_TRY - { - ptr = &ptr->at(static_cast(std::stoi(reference_token))); - } - JSON_CATCH(std::invalid_argument&) - { - JSON_THROW(parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); - } - break; - } - - default: - { - JSON_THROW(out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); - } - } - } - - return *ptr; - } - - /*! - @brief return a const reference to the pointed to value - - @param[in] ptr a JSON value - - @return const reference to the JSON value pointed to by the JSON - pointer - - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved - */ - const_reference get_unchecked(const_pointer ptr) const - { - for (const auto& reference_token : reference_tokens) - { - switch (ptr->m_type) - { - case value_t::object: - { - // use unchecked object access - ptr = &ptr->operator[](reference_token); - break; - } - - case value_t::array: - { - if (reference_token == "-") - { - // "-" cannot be used for const access - JSON_THROW(out_of_range::create(402, "array index '-' (" + - std::to_string(ptr->m_value.array->size()) + - ") is out of range")); - } - - // error condition (cf. RFC 6901, Sect. 4) - if (reference_token.size() > 1 and reference_token[0] == '0') - { - JSON_THROW(parse_error::create(106, 0, "array index '" + reference_token + "' must not begin with '0'")); - } - - // use unchecked array access - JSON_TRY - { - ptr = &ptr->operator[](static_cast(std::stoi(reference_token))); - } - JSON_CATCH(std::invalid_argument&) - { - JSON_THROW(parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); - } - break; - } - - default: - { - JSON_THROW(out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); - } - } - } - - return *ptr; - } - - /*! - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved - */ - const_reference get_checked(const_pointer ptr) const - { - for (const auto& reference_token : reference_tokens) - { - switch (ptr->m_type) - { - case value_t::object: - { - // note: at performs range check - ptr = &ptr->at(reference_token); - break; - } - - case value_t::array: - { - if (reference_token == "-") - { - // "-" always fails the range check - JSON_THROW(out_of_range::create(402, "array index '-' (" + - std::to_string(ptr->m_value.array->size()) + - ") is out of range")); - } - - // error condition (cf. RFC 6901, Sect. 4) - if (reference_token.size() > 1 and reference_token[0] == '0') - { - JSON_THROW(parse_error::create(106, 0, "array index '" + reference_token + "' must not begin with '0'")); - } - - // note: at performs range check - JSON_TRY - { - ptr = &ptr->at(static_cast(std::stoi(reference_token))); - } - JSON_CATCH(std::invalid_argument&) - { - JSON_THROW(parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); - } - break; - } - - default: - { - JSON_THROW(out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); - } - } - } - - return *ptr; - } - - /*! - @brief split the string input to reference tokens - - @note This function is only called by the json_pointer constructor. - All exceptions below are documented there. - - @throw parse_error.107 if the pointer is not empty or begins with '/' - @throw parse_error.108 if character '~' is not followed by '0' or '1' - */ - static std::vector split(const std::string& reference_string) - { - std::vector result; - - // special case: empty reference string -> no reference tokens - if (reference_string.empty()) - { - return result; - } - - // check if nonempty reference string begins with slash - if (reference_string[0] != '/') - { - JSON_THROW(parse_error::create(107, 1, "JSON pointer must be empty or begin with '/' - was: '" + reference_string + "'")); - } - - // extract the reference tokens: - // - slash: position of the last read slash (or end of string) - // - start: position after the previous slash - for ( - // search for the first slash after the first character - size_t slash = reference_string.find_first_of('/', 1), - // set the beginning of the first reference token - start = 1; - // we can stop if start == string::npos+1 = 0 - start != 0; - // set the beginning of the next reference token - // (will eventually be 0 if slash == std::string::npos) - start = slash + 1, - // find next slash - slash = reference_string.find_first_of('/', start)) - { - // use the text between the beginning of the reference token - // (start) and the last slash (slash). - auto reference_token = reference_string.substr(start, slash - start); - - // check reference tokens are properly escaped - for (size_t pos = reference_token.find_first_of('~'); - pos != std::string::npos; - pos = reference_token.find_first_of('~', pos + 1)) - { - assert(reference_token[pos] == '~'); - - // ~ must be followed by 0 or 1 - if (pos == reference_token.size() - 1 or - (reference_token[pos + 1] != '0' and - reference_token[pos + 1] != '1')) - { - JSON_THROW(parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'")); - } - } - - // finally, store the reference token - unescape(reference_token); - result.push_back(reference_token); - } - - return result; - } - - /*! - @brief replace all occurrences of a substring by another string - - @param[in,out] s the string to manipulate; changed so that all - occurrences of @a f are replaced with @a t - @param[in] f the substring to replace with @a t - @param[in] t the string to replace @a f - - @pre The search string @a f must not be empty. **This precondition is - enforced with an assertion.** - - @since version 2.0.0 - */ - static void replace_substring(std::string& s, - const std::string& f, - const std::string& t) - { - assert(not f.empty()); - - for ( - size_t pos = s.find(f); // find first occurrence of f - pos != std::string::npos; // make sure f was found - s.replace(pos, f.size(), t), // replace with t - pos = s.find(f, pos + t.size()) // find next occurrence of f - ); - } - - /// escape tilde and slash - static std::string escape(std::string s) - { - // escape "~"" to "~0" and "/" to "~1" - replace_substring(s, "~", "~0"); - replace_substring(s, "/", "~1"); - return s; - } - - /// unescape tilde and slash - static void unescape(std::string& s) - { - // first transform any occurrence of the sequence '~1' to '/' - replace_substring(s, "~1", "/"); - // then transform any occurrence of the sequence '~0' to '~' - replace_substring(s, "~0", "~"); - } - - /*! - @param[in] reference_string the reference string to the current value - @param[in] value the value to consider - @param[in,out] result the result object to insert values to - - @note Empty objects or arrays are flattened to `null`. - */ - static void flatten(const std::string& reference_string, - const basic_json& value, - basic_json& result) - { - switch (value.m_type) - { - case value_t::array: - { - if (value.m_value.array->empty()) - { - // flatten empty array as null - result[reference_string] = nullptr; - } - else - { - // iterate array and use index as reference string - for (size_t i = 0; i < value.m_value.array->size(); ++i) - { - flatten(reference_string + "/" + std::to_string(i), - value.m_value.array->operator[](i), result); - } - } - break; - } - - case value_t::object: - { - if (value.m_value.object->empty()) - { - // flatten empty object as null - result[reference_string] = nullptr; - } - else - { - // iterate object and use keys as reference string - for (const auto& element : *value.m_value.object) - { - flatten(reference_string + "/" + escape(element.first), - element.second, result); - } - } - break; - } - - default: - { - // add primitive value with its reference string - result[reference_string] = value; - break; - } - } - } - - /*! - @param[in] value flattened JSON - - @return unflattened JSON - - @throw parse_error.109 if array index is not a number - @throw type_error.314 if value is not an object - @throw type_error.315 if object values are not primitive - @throw type_error.313 if value cannot be unflattened - */ - static basic_json unflatten(const basic_json& value) - { - if (not value.is_object()) - { - JSON_THROW(type_error::create(314, "only objects can be unflattened")); - } - - basic_json result; - - // iterate the JSON object values - for (const auto& element : *value.m_value.object) - { - if (not element.second.is_primitive()) - { - JSON_THROW(type_error::create(315, "values in object must be primitive")); - } - - // assign value to reference pointed to by JSON pointer; Note - // that if the JSON pointer is "" (i.e., points to the whole - // value), function get_and_create returns a reference to - // result itself. An assignment will then create a primitive - // value. - json_pointer(element.first).get_and_create(result) = element.second; - } - - return result; - } - - friend bool operator==(json_pointer const& lhs, - json_pointer const& rhs) noexcept - { - return lhs.reference_tokens == rhs.reference_tokens; - } - - friend bool operator!=(json_pointer const& lhs, - json_pointer const& rhs) noexcept - { - return !(lhs == rhs); - } - - /// the reference tokens - std::vector reference_tokens{}; - }; - - ////////////////////////// - // JSON Pointer support // - ////////////////////////// - - /// @name JSON Pointer functions - /// @{ - - /*! - @brief access specified element via JSON Pointer - - Uses a JSON pointer to retrieve a reference to the respective JSON value. - No bound checking is performed. Similar to @ref operator[](const typename - object_t::key_type&), `null` values are created in arrays and objects if - necessary. - - In particular: - - If the JSON pointer points to an object key that does not exist, it - is created an filled with a `null` value before a reference to it - is returned. - - If the JSON pointer points to an array index that does not exist, it - is created an filled with a `null` value before a reference to it - is returned. All indices between the current maximum and the given - index are also filled with `null`. - - The special value `-` is treated as a synonym for the index past the - end. - - @param[in] ptr a JSON pointer - - @return reference to the element pointed to by @a ptr - - @complexity Constant. - - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.404 if the JSON pointer can not be resolved - - @liveexample{The behavior is shown in the example.,operatorjson_pointer} - - @since version 2.0.0 - */ - reference operator[](const json_pointer& ptr) - { - return ptr.get_unchecked(this); - } - - /*! - @brief access specified element via JSON Pointer - - Uses a JSON pointer to retrieve a reference to the respective JSON value. - No bound checking is performed. The function does not change the JSON - value; no `null` values are created. In particular, the the special value - `-` yields an exception. - - @param[in] ptr JSON pointer to the desired element - - @return const reference to the element pointed to by @a ptr - - @complexity Constant. - - @throw parse_error.106 if an array index begins with '0' - @throw parse_error.109 if an array index was not a number - @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved - - @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} - - @since version 2.0.0 - */ - const_reference operator[](const json_pointer& ptr) const - { - return ptr.get_unchecked(this); - } - - /*! - @brief access specified element via JSON Pointer - - Returns a reference to the element at with specified JSON pointer @a ptr, - with bounds checking. - - @param[in] ptr JSON pointer to the desired element - - @return reference to the element pointed to by @a ptr - - @throw parse_error.106 if an array index in the passed JSON pointer @a ptr - begins with '0'. See example below. - - @throw parse_error.109 if an array index in the passed JSON pointer @a ptr - is not a number. See example below. - - @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr - is out of range. See example below. - - @throw out_of_range.402 if the array index '-' is used in the passed JSON - pointer @a ptr. As `at` provides checked access (and no elements are - implicitly inserted), the index '-' is always invalid. See example below. - - @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. - See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Constant. - - @since version 2.0.0 - - @liveexample{The behavior is shown in the example.,at_json_pointer} - */ - reference at(const json_pointer& ptr) - { - return ptr.get_checked(this); - } - - /*! - @brief access specified element via JSON Pointer - - Returns a const reference to the element at with specified JSON pointer @a - ptr, with bounds checking. - - @param[in] ptr JSON pointer to the desired element - - @return reference to the element pointed to by @a ptr - - @throw parse_error.106 if an array index in the passed JSON pointer @a ptr - begins with '0'. See example below. - - @throw parse_error.109 if an array index in the passed JSON pointer @a ptr - is not a number. See example below. - - @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr - is out of range. See example below. - - @throw out_of_range.402 if the array index '-' is used in the passed JSON - pointer @a ptr. As `at` provides checked access (and no elements are - implicitly inserted), the index '-' is always invalid. See example below. - - @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. - See example below. - - @exceptionsafety Strong guarantee: if an exception is thrown, there are no - changes in the JSON value. - - @complexity Constant. - - @since version 2.0.0 - - @liveexample{The behavior is shown in the example.,at_json_pointer_const} - */ - const_reference at(const json_pointer& ptr) const - { - return ptr.get_checked(this); - } - - /*! - @brief return flattened JSON value - - The function creates a JSON object whose keys are JSON pointers (see [RFC - 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all - primitive. The original JSON value can be restored using the @ref - unflatten() function. - - @return an object that maps JSON pointers to primitive values - - @note Empty objects and arrays are flattened to `null` and will not be - reconstructed correctly by the @ref unflatten() function. - - @complexity Linear in the size the JSON value. - - @liveexample{The following code shows how a JSON object is flattened to an - object whose keys consist of JSON pointers.,flatten} - - @sa @ref unflatten() for the reverse function - - @since version 2.0.0 - */ - basic_json flatten() const - { - basic_json result(value_t::object); - json_pointer::flatten("", *this, result); - return result; - } - - /*! - @brief unflatten a previously flattened JSON value - - The function restores the arbitrary nesting of a JSON value that has been - flattened before using the @ref flatten() function. The JSON value must - meet certain constraints: - 1. The value must be an object. - 2. The keys must be JSON pointers (see - [RFC 6901](https://tools.ietf.org/html/rfc6901)) - 3. The mapped values must be primitive JSON types. - - @return the original JSON from a flattened version - - @note Empty objects and arrays are flattened by @ref flatten() to `null` - values and can not unflattened to their original type. Apart from - this example, for a JSON value `j`, the following is always true: - `j == j.flatten().unflatten()`. - - @complexity Linear in the size the JSON value. - - @throw type_error.314 if value is not an object - @throw type_error.315 if object values are not primitve - - @liveexample{The following code shows how a flattened JSON object is - unflattened into the original nested JSON object.,unflatten} - - @sa @ref flatten() for the reverse function - - @since version 2.0.0 - */ - basic_json unflatten() const - { - return json_pointer::unflatten(*this); - } - - /// @} - - ////////////////////////// - // JSON Patch functions // - ////////////////////////// - - /// @name JSON Patch functions - /// @{ - - /*! - @brief applies a JSON patch - - [JSON Patch](http://jsonpatch.com) defines a JSON document structure for - expressing a sequence of operations to apply to a JSON) document. With - this function, a JSON Patch is applied to the current JSON value by - executing all operations from the patch. - - @param[in] json_patch JSON patch document - @return patched document - - @note The application of a patch is atomic: Either all operations succeed - and the patched document is returned or an exception is thrown. In - any case, the original value is not changed: the patch is applied - to a copy of the value. - - @throw parse_error.104 if the JSON patch does not consist of an array of - objects - - @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory - attributes are missing); example: `"operation add must have member path"` - - @throw out_of_range.401 if an array index is out of range. - - @throw out_of_range.403 if a JSON pointer inside the patch could not be - resolved successfully in the current JSON value; example: `"key baz not - found"` - - @throw out_of_range.405 if JSON pointer has no parent ("add", "remove", - "move") - - @throw other_error.501 if "test" operation was unsuccessful - - @complexity Linear in the size of the JSON value and the length of the - JSON patch. As usually only a fraction of the JSON value is affected by - the patch, the complexity can usually be neglected. - - @liveexample{The following code shows how a JSON patch is applied to a - value.,patch} - - @sa @ref diff -- create a JSON patch by comparing two JSON values - - @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) - @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901) - - @since version 2.0.0 - */ - basic_json patch(const basic_json& json_patch) const - { - // make a working copy to apply the patch to - basic_json result = *this; - - // the valid JSON Patch operations - enum class patch_operations { add, remove, replace, move, copy, test, invalid }; - - const auto get_op = [](const std::string & op) - { - if (op == "add") - { - return patch_operations::add; - } - if (op == "remove") - { - return patch_operations::remove; - } - if (op == "replace") - { - return patch_operations::replace; - } - if (op == "move") - { - return patch_operations::move; - } - if (op == "copy") - { - return patch_operations::copy; - } - if (op == "test") - { - return patch_operations::test; - } - - return patch_operations::invalid; - }; - - // wrapper for "add" operation; add value at ptr - const auto operation_add = [&result](json_pointer & ptr, basic_json val) - { - // adding to the root of the target document means replacing it - if (ptr.is_root()) - { - result = val; - } - else - { - // make sure the top element of the pointer exists - json_pointer top_pointer = ptr.top(); - if (top_pointer != ptr) - { - result.at(top_pointer); - } - - // get reference to parent of JSON pointer ptr - const auto last_path = ptr.pop_back(); - basic_json& parent = result[ptr]; - - switch (parent.m_type) - { - case value_t::null: - case value_t::object: - { - // use operator[] to add value - parent[last_path] = val; - break; - } - - case value_t::array: - { - if (last_path == "-") - { - // special case: append to back - parent.push_back(val); - } - else - { - const auto idx = std::stoi(last_path); - if (static_cast(idx) > parent.size()) - { - // avoid undefined behavior - JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); - } - else - { - // default case: insert add offset - parent.insert(parent.begin() + static_cast(idx), val); - } - } - break; - } - - default: - { - // if there exists a parent it cannot be primitive - assert(false); // LCOV_EXCL_LINE - } - } - } - }; - - // wrapper for "remove" operation; remove value at ptr - const auto operation_remove = [&result](json_pointer & ptr) - { - // get reference to parent of JSON pointer ptr - const auto last_path = ptr.pop_back(); - basic_json& parent = result.at(ptr); - - // remove child - if (parent.is_object()) - { - // perform range check - auto it = parent.find(last_path); - if (it != parent.end()) - { - parent.erase(it); - } - else - { - JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found")); - } - } - else if (parent.is_array()) - { - // note erase performs range check - parent.erase(static_cast(std::stoi(last_path))); - } - }; - - // type check: top level value must be an array - if (not json_patch.is_array()) - { - JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); - } - - // iterate and apply the operations - for (const auto& val : json_patch) - { - // wrapper to get a value for an operation - const auto get_value = [&val](const std::string & op, - const std::string & member, - bool string_type) -> basic_json& - { - // find value - auto it = val.m_value.object->find(member); - - // context-sensitive error message - const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; - - // check if desired value is present - if (it == val.m_value.object->end()) - { - JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'")); - } - - // check if result is of type string - if (string_type and not it->second.is_string()) - { - JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'")); - } - - // no error: return value - return it->second; - }; - - // type check: every element of the array must be an object - if (not val.is_object()) - { - JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); - } - - // collect mandatory members - const std::string op = get_value("op", "op", true); - const std::string path = get_value(op, "path", true); - json_pointer ptr(path); - - switch (get_op(op)) - { - case patch_operations::add: - { - operation_add(ptr, get_value("add", "value", false)); - break; - } - - case patch_operations::remove: - { - operation_remove(ptr); - break; - } - - case patch_operations::replace: - { - // the "path" location must exist - use at() - result.at(ptr) = get_value("replace", "value", false); - break; - } - - case patch_operations::move: - { - const std::string from_path = get_value("move", "from", true); - json_pointer from_ptr(from_path); - - // the "from" location must exist - use at() - basic_json v = result.at(from_ptr); - - // The move operation is functionally identical to a - // "remove" operation on the "from" location, followed - // immediately by an "add" operation at the target - // location with the value that was just removed. - operation_remove(from_ptr); - operation_add(ptr, v); - break; - } - - case patch_operations::copy: - { - const std::string from_path = get_value("copy", "from", true); - const json_pointer from_ptr(from_path); - - // the "from" location must exist - use at() - result[ptr] = result.at(from_ptr); - break; - } - - case patch_operations::test: - { - bool success = false; - JSON_TRY - { - // check if "value" matches the one at "path" - // the "path" location must exist - use at() - success = (result.at(ptr) == get_value("test", "value", false)); - } - JSON_CATCH(out_of_range&) - { - // ignore out of range errors: success remains false - } - - // throw an exception if test fails - if (not success) - { - JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump())); - } - - break; - } - - case patch_operations::invalid: - { - // op must be "add", "remove", "replace", "move", "copy", or - // "test" - JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid")); - } - } - } - - return result; - } - - /*! - @brief creates a diff as a JSON patch - - Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can - be changed into the value @a target by calling @ref patch function. - - @invariant For two JSON values @a source and @a target, the following code - yields always `true`: - @code {.cpp} - source.patch(diff(source, target)) == target; - @endcode - - @note Currently, only `remove`, `add`, and `replace` operations are - generated. - - @param[in] source JSON value to compare from - @param[in] target JSON value to compare against - @param[in] path helper value to create JSON pointers - - @return a JSON patch to convert the @a source to @a target - - @complexity Linear in the lengths of @a source and @a target. - - @liveexample{The following code shows how a JSON patch is created as a - diff for two JSON values.,diff} - - @sa @ref patch -- apply a JSON patch - - @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) - - @since version 2.0.0 - */ - static basic_json diff(const basic_json& source, - const basic_json& target, - const std::string& path = "") - { - // the patch - basic_json result(value_t::array); - - // if the values are the same, return empty patch - if (source == target) - { - return result; - } - - if (source.type() != target.type()) - { - // different types: replace value - result.push_back( - { - { "op", "replace" }, - { "path", path }, - { "value", target } - }); - } - else - { - switch (source.type()) - { - case value_t::array: - { - // first pass: traverse common elements - size_t i = 0; - while (i < source.size() and i < target.size()) - { - // recursive call to compare array values at index i - auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); - result.insert(result.end(), temp_diff.begin(), temp_diff.end()); - ++i; - } - - // i now reached the end of at least one array - // in a second pass, traverse the remaining elements - - // remove my remaining elements - const auto end_index = static_cast(result.size()); - while (i < source.size()) - { - // add operations in reverse order to avoid invalid - // indices - result.insert(result.begin() + end_index, object( - { - { "op", "remove" }, - { "path", path + "/" + std::to_string(i) } - })); - ++i; - } - - // add other remaining elements - while (i < target.size()) - { - result.push_back( - { - { "op", "add" }, - { "path", path + "/" + std::to_string(i) }, - { "value", target[i] } - }); - ++i; - } - - break; - } - - case value_t::object: - { - // first pass: traverse this object's elements - for (auto it = source.begin(); it != source.end(); ++it) - { - // escape the key name to be used in a JSON patch - const auto key = json_pointer::escape(it.key()); - - if (target.find(it.key()) != target.end()) - { - // recursive call to compare object values at key it - auto temp_diff = diff(it.value(), target[it.key()], path + "/" + key); - result.insert(result.end(), temp_diff.begin(), temp_diff.end()); - } - else - { - // found a key that is not in o -> remove it - result.push_back(object( - { - { "op", "remove" }, - { "path", path + "/" + key } - })); - } - } - - // second pass: traverse other object's elements - for (auto it = target.begin(); it != target.end(); ++it) - { - if (source.find(it.key()) == source.end()) - { - // found a key that is not in this -> add it - const auto key = json_pointer::escape(it.key()); - result.push_back( - { - { "op", "add" }, - { "path", path + "/" + key }, - { "value", it.value() } - }); - } - } - - break; - } - - default: - { - // both primitive type: replace value - result.push_back( - { - { "op", "replace" }, - { "path", path }, - { "value", target } - }); - break; - } - } - } - - return result; - } - - /// @} - }; - - ///////////// - // presets // - ///////////// - - /*! - @brief default JSON class - - This type is the default specialization of the @ref basic_json class which - uses the standard template types. - - @since version 1.0.0 - */ - using json = basic_json<>; -} // namespace nlohmann - - - /////////////////////// - // nonmember support // - /////////////////////// - - // specialization of std::swap, and std::hash -namespace std -{ - /*! - @brief exchanges the values of two JSON objects - - @since version 1.0.0 - */ - template<> - inline void swap(nlohmann::json& j1, - nlohmann::json& j2) noexcept( - is_nothrow_move_constructible::value and - is_nothrow_move_assignable::value - ) - { - j1.swap(j2); - } - - /// hash value for JSON objects - template<> - struct hash - { - /*! - @brief return a hash value for a JSON object - - @since version 1.0.0 - */ - std::size_t operator()(const nlohmann::json& j) const - { - // a naive hashing via the string representation - const auto& h = hash(); - return h(j.dump()); - } - }; - - /// specialization for std::less - template <> - struct less<::nlohmann::detail::value_t> - { - /*! - @brief compare two value_t enum values - @since version 3.0.0 - */ - bool operator()(nlohmann::detail::value_t lhs, - nlohmann::detail::value_t rhs) const noexcept - { - return nlohmann::detail::operator<(lhs, rhs); - } - }; - -} // namespace std - - /*! - @brief user-defined string literal for JSON values - - This operator implements a user-defined string literal for JSON objects. It - can be used by adding `"_json"` to a string literal and returns a JSON object - if no parse error occurred. - - @param[in] s a string representation of a JSON object - @param[in] n the length of string @a s - @return a JSON object - - @since version 1.0.0 - */ -inline nlohmann::json operator "" _json(const char* s, std::size_t n) -{ - return nlohmann::json::parse(s, s + n); -} - -/*! -@brief user-defined string literal for JSON pointer - -This operator implements a user-defined string literal for JSON Pointers. It -can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer -object if no parse error occurred. - -@param[in] s a string representation of a JSON Pointer -@param[in] n the length of string @a s -@return a JSON pointer object - -@since version 2.0.0 -*/ -inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) -{ - return nlohmann::json::json_pointer(std::string(s, n)); -} - -// restore GCC/clang diagnostic settings -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) -#pragma GCC diagnostic pop -#endif -#if defined(__clang__) -#pragma GCC diagnostic pop -#endif - -// clean up -#undef JSON_CATCH -#undef JSON_THROW -#undef JSON_TRY -#undef JSON_LIKELY -#undef JSON_UNLIKELY -#undef JSON_DEPRECATED - -#endif \ No newline at end of file diff --git a/ArkApi/stdafx.cpp b/ArkApi/stdafx.cpp deleted file mode 100644 index fd4f341..0000000 --- a/ArkApi/stdafx.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "stdafx.h" diff --git a/ArkApi/stdafx.h b/ArkApi/stdafx.h deleted file mode 100644 index 5b1ed41..0000000 --- a/ArkApi/stdafx.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define WIN32_LEAN_AND_MEAN -#include - diff --git a/LICENSE.TXT b/LICENSE.TXT index 0767c2b..b7920a1 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Michidu +Copyright (c) 2017-2018 Michidu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/config.json b/config.json index 086232e..03c198d 100644 --- a/config.json +++ b/config.json @@ -68,10 +68,18 @@ "FAssetData", "UBlueprint", "UTexture2D", - "AGameSession", - "FItemStatInfo" + "FMemory", + "ADroppedItem", + "UBoolProperty", + "APrimalDinoAIController", + "APrimalStructureItemContainer", + "UShooterGameInstance", + "AMatineeActor", + "UEngine" ], "functions": [ - "StaticLoadObject" + "StaticLoadObject", + "RaycastSingle", + "StaticConstructObject" ] } \ No newline at end of file diff --git a/lib/libMinHook.x64.lib b/lib/libMinHook.x64.lib new file mode 100644 index 0000000000000000000000000000000000000000..d683e01cc9d6b650be6a5e56828df6d09d126bcc GIT binary patch literal 368772 zcmeFa33OY<*#>+i+ldoracn2J4iGyD0taLqXTdQki7ZRD64`PrISF78j;$mj-ta;a zwweS&%2Ft$bopqZP+BOImO@Jfr0h%CcPRT(3Y0>j(2thV=6{} z9Bdd9Pcs~$GyY%s%gTDe;9vH!{&aud{#g59EYjcJ-PhX{?}_<`dO8Nu-J$PJUqpGc4 z-q7G*=?|^&QiiXkCDao2HF;`-zB)Uhce&Tw?DYqm14+WVKsXJhfB8yJa|8aGlax)N zNYvZn^F&g`)-U%rtZejzyrCpK_xqaanpQMe7#c%$twCRueEv{tQ;Ojmm#=6JG&Qem3?|FqZ*B5M z0->hSc$$_st!##+>Kc+fsvM(23oTz!9}Lw88!R>4+7xbWZVt7e-l9sW&1Avlq55X8 zH`LTfO|4BUn?h@vBn9H0zP_%ltA=7ju}%X~>CX+ly_@VYPhWgQf^Q3x>f!_K>$+l! z#n)qv1$yFx@%FCxDKU}?H7WEW&Cb*k>+U^S3k(mo4-O4Pdc%YL@tzG7)7leHiro<1 z*br;)GY|sw0K)h{u(x9qinFmZws>K*6Zi(Y&B!3Z8J@1L-VQX|+M)I9WBrD|Kc*g& zc+I@PfNx8zV@U9MIy?Jg0|SOtze%rOOAp<@3%W;LDu-^_M}@4mXuVH8dpZ!qsn zufxbkzs&zCFf?=wo*a`g^xb$k%%NgtI5FR-=!kdCUB5wRWP|2sDRj$?{N;jfLzkwz z)@K+uICWG!Xu5ch&Y-9@4LWM4i*3;vZwwm7+R^9+wraX#=NQJ4T{>!)*SSt-e1OMG zUe{4g2a~!xdb|7LU9tX}+1{GA=KkIdaEDSqQU*#7*;2i@ysa_b(ce4JyMC~Ab$no` zy{j}lIMf;MZL6xBe?*(Nx4U}?Fx;KJ1BQEzvA}SLHsEhvmEra^AgM88xa-6C+iJM|@xjo#6FKQu&vosC?Rf4T zL)E&WcvmM%Gk=i)yXOYu_IHlbW|EDpq7Svs7diw`!`ubt_L1UW#fZMNJ z;COi>T%#(>fcFmnxzqS2{Hb{Lvas~%Fg$939N6A}jKRs+h-~O+E zZP7pODEPGSztJG^_o99G4@SFV-5q^fqXR?iv5Pq~sqZ)29Ds-HQc(`|k^65r4pQ9eG{HuiXCXgdKfz%bTw( z_~gH<@9sAEMbDsse)z+VpS@c9#ie&HzWJaTj^W~hB}e>MChDdic3>7hxDhMw&Vly6 zxX|;B@9p^eLxWQnI9lJz&i~%U=NH^t^Iz&gO=CW<h@=dRWokWWjMd)Al?MF)AdHKg5Zu|9+g>E z=%t&!d+^av$So%;0ecmMsuPq&^oYrmV$KXzQf z1^MfB&#~t&H{bEhX&3$C`pfFaU2?^n&lSD%KL<={Eij_dcDB3?vB4;pZC$ZwC;HfE zUw>?Ue2cL&D<`+qFotJfB>ur{Jalo-Xv&@W4r9s*VD8v>GVpbFY}^#>GIls}vPoP9 z;vbT@Fb~7v+z0csoMqD-tp$!L(@TsN_?4&Qq@j3!tlHS-$Z?P(0*=ec@n^6w5`UWwe+t9(WGFiXKR?wB9rhA{L)F2lQ1Nqe z{DvHFX-si@8B#cIAji^j{LG!CO3^JrwX|=xw}W4h_HNR~K$|Dp!H~iuh%GMqOA@!u z!_SXEjMBoVPtk%?yzNF3zeD0Twd8F{$tiyGD^j0%D1Hu{tVExqMcbU z3s`?k)-Qbc$(kVyfNH2qVfA9+)-%*s-`_jbr9TSpO?Xc?gKhE zzw0!Nz<{^6GuGVR*~x9s9gZw+3l8UDNpmMzDx>%b&N7UnmgmDNon#qxdxYa2xog3F z54p42@$)RWhv#N(%y(qD!S3ki4|Qi{^AQL}?tSiXWD7}CAn9I6$~C%w?=)%yO?BZ& zOQ5MfT8GW$V8~O~?1?lO!+wzMz`mrj5R{9baT?8my2fxI8jg4(t>I{0i^m_qXrZXG zK$Ulok|#)Nef1D-3iXB>n?p^$rbrmxq?pEoDfe2Z(G;rlMM2Ssd}DZ(%7#Q^`m|`2 za|m<((AOL9!J2OX#h-vG$TRZykpIZVPGhirL!B?|T?sVcYlZkcl;(fYzpG$*Hr4wmIa=on`XWB; zN7njU;D(CQ0m`{{!(g*=?a_50hT5iji#%0hI- z#~wj8POw^Ad{Iwb9S&a_Jx!i^6pJ3QQISpt>F;zo{4D_-_XLl&;CI3*XBPyT062mg zEX*}}?DlL4g(7t!Z?v@q5VVgMLGFu?yQ z9E_p%&C$&r105ULon_~;cX<;^K8KR*ITnJhSdX#ODGA;O!M{L|XXF$%2SZKu7#=YP zAIFrbh2aJqVj0G?T;oYJH`UgnfyU-wz#E9*urgG;Lbg2NW!XS|g1ugvJ>l@0Pzx-n zD`lLK?e8_b*d=J~>x=cT0osWI?L7eVg)qrDd(qKKn?^J$r;)v^$UuQ{qMa=9E0FPT zA!D*#2CO$`pEUv4C!pPlJ`0}In$l@8|E&AaGX$EWO+GY*7GEuV4$BEuXKZ76sS=|8 z7EgVOs5}tfSGpop8-@8$u4o_>ZNVuod!tB8D9FCJsm_Dy@I_aLf5^ns5 za55Y`)`F@TN3#vl)t(^y0+n|*D07XMEMAWu7{dXCXulr^iu3HAEfGcv!{Sedi+2Ww*aK6j~YZMd8I(-<=J@jdqW*x8NxtsJBbf zozW6YBd7&k49(N)jl$);?1;`ynk;*Y@_(}(iqgn&^J#d@`Jyz@6d)rzXZ9Dr*Zox3 z+u&>TSbC|+sGAG(2XMB^zIjfr@v5!`bjn^2=wT&Y3v{WcEgfXNFT(x{19oH79|-z5 zVB>Vy*TilejJmrl0OLZtQG{^Qe=KIHG_p%o(a}`m=z`D#B@2E53Z7?N55JB^8v}L0 zXrQ$}9<8jboDWaBP&!4;-pn(9Hn4x2y#Zd;C`CW0f9~ zg5Gov9Gg=f3#+>~`qG(Z!;7@Eh9l9{z82hO@Os2yzMg;pKagT>k;f;X^1{ys#Vas^ZQet9{axxVO$;N6aC_CxwOPxme=x}sRplJcd z#*3BDaV(fo(Hv=xdV@YsQ)_dyz9ocTucyiD3nB;xYdv00GA|K`8tewqJ`VTNmheK~ z?_dd55ytIiUrXfZXhR4V5iKN(~i|_15a3o11e`NSOx;he9$6O`Ay?W0*~P03fiZ3=kZ4N<1-8l zkUiF+$pe7j7VcR!VwNg8JJ^oX)I6h?6N75Z>++0&LQLH1f?`#LK`hs(wA;0LL36Z$ zLp!E&+OCH|#sFoY28}^X4(&Z-y|2mF!VX1uj2!2(l?!?6JP{B2H96NzdJ>72j6lwL zgKv#xf;|q(d(d%V(!hC?Iho}oD$kf_t3zKCrW}|-tzLkVUj^&r8pSE4Gi~b)V$@|N z>mqU@ba)DJ2!lBM2eTpz;h|9bVSccAbqM@em57;uQ#f*S2(@MmUn=}{qAI=`Dor2M z4QV0-om0@Nr)+cbjN-yz^BOElAmk)bIm_&bw9{iIq>me?)17Pc9G$5uyt*;$+Nl^*P>S1`jthX{)5FwG23p4MBv5RFN;A@YL|z3U7!wa zIDln?2Ym-dZ41`@!SI|#q;h-c57f)F--k)pSV<}!^pwSl*a`tzc>8C)o5;wmHUOOj^ zw_cX4(c>L4N1^W?XIJ7|3m_>A8j@|WlQnYy5PcBq!-9yjk>w~)>fm>K>JY+JDB1{_ zIphmZ;UN9ErLI-C9c4S>MB3uQr2P;x!N}2Jj06~m8+~#>x=cx<-|fCe_!K5LP1r?= z;P4UFWp{y9qIEc7FUX~aWjNtl`!IVos_CR?BLLUfY@Jpf0(}RfxAB_Y%@2i|gX|(a zUat?UNiOuQ%il66E3{LJ9gpzQn1^A^746vKHXLmGQL$nb%w3cKpzB32E3C*a4J(n+ zWN}9Eu*K@=5wVAZ6#{oMR-?mXw?ntmZH?XRLFWp~^7>31m*{ZU)wJ#vC^pt{_N^3o zR5P>=w5WhWxObkBwmDJ(ek0_M zVwA!KSJB5ltNB=4VX(nq{GjQrVxALdUcJy5zB=hvxyB0?bNNFpUa`;662&aQ z+|sfbYd?s7F29xQT*H`+IrNC(xyd#*)9(uGl_%!eoScu=t^D)AxQVD&b7* zGO$P08x631kI2a`RO@c+YIND#_S(7@^ymTXw^`bC0W^I6RC30Sz06vi`Zu)qbmAn= zoV#BO*}2ASJNUW)R%#K>W-b1EAm~0$w%%sUO0hvBy93>TIqAC#6=-fW>E$su)%7#y!1y)8$aO{7pjNM7#MdTM#Kj z4_6&U=tCl6$Fa3ZEU131ka0UTE{6_`+9`t~SsmA!`xe-$OxbIo3xANTU3xCY6=PV} zEVhEnrlF$x#C?$HdS0AS+eb4|l3PSc{%RMI;vMYdPLu!}o7bTC_F9K+!XIz9M2kOFWAjb! zyvYue^Cw(D!sHyAml&+M8Aor$1{~)S)3n7ojqpUg*c#ME&xY)A(?rd3F^`_;QSJYj z?6->56b3U7+oo;?(;&7fwXACIw9?Y*0uVo`&^pb=7MQ9=y-3ruX*T8uw0=3zYo+MF zjdM{JI4JhC%~>6{v~!I`BYHS2u!Dg{%L0V`?f&SnRDYEa9`8g;;5KtL3tyURJff9j z0$>h-8UTl_LV)LnH9U}mf3z-w7R@bd(LK=I2iWbxBMH<$%Oclo)+O0jK)=nLP2s%* z)L_t$9k+T+Bh3*w%26cL3Rl)sEH;HZG)`SfVnaz|rLW$niNqF*AJYdp&(c&AjO;H& zM>2?O_o_M6!0B!k&7sqD_VCDw95&4!Mth16$o9k=4)iyih=Thz;j-_eF`=&HbO||Z zi@8RL-8^!W!&j$fQ|YF++-aF_XTxM$ERM|i5&C-{CJv|y-OAjk@5AKIgxVc2SC)Ws zyQus}3pxB^+d@?R>1I7}z7)m@k*_I0f!gfsVoriV#001*#8qm_NdWuvBU5lT1^j;O zqMA$9bfr52TvK!tReOxOfl}?%6sObupLRT2HcPdui0JxsqoOMW?XdI`)VhkO2i^Gq z!UH2U!DI6hp3RM(-EMC5gt;${O(#leJHyFi)L2Lyy8cwQ->XK2+J|OuATs={W0Ck)8cDtZG_kIlp*^c`RHSN z#6_}bUpuZZ$8dZc?ZGkf`d(ZfV2^7IyWzlh2nT)+jYA#+`qnlFooj4@!EhvjS<#3UKQ|1XmF-4(P_p4< z8^b6h?*Q1}ncCr$P4i!newQfOa=XEmsA!eN8IOdjzd)6_Ko^@>mMI{C{yt@yg(aR| zX0cwsVfRvVh9V58eUxqE(PYcSa2>^agqUmGqr8|VF0%s;n6JO38vzc0(X-5n$o$2e ziIn9U+s)w!Z`pBgJ`%#tK94Dr0}>~k&scgayt7z~p{BMav_>8f=+$!}6l@k7U)Vk_ z%{A`U)sJm@9DZ6HfDP~rQ#DqJW9>t7Mil^Tjs)hh!%SEp*LYofp*{}6@(xGh&CP5R z+7mgUJFTFZo2T568y*t7u>b4EAY*QRV)>e9#0s0u6WZZvf+7T^(G~DFdDc-VJoIxh zIH^$y`-0rLM7uSH??Zm}Wpcg58`Qeve;3|$zwoY?EoKy3sNipI71su^<6_;%oQd+? zZ90)YoZ$M-vZ=(C>sDcIY$32NpQ63Pt(a5zJzO^qKWO!om$kXDyU9&lZlYRS?0Co< zhcep+v^?Y1J#CJn?A#K~GhWFTBdFL6$T2rKusdhj-r&?_s_ymVOQ)7Dk5zrTD3KV2 z^Nh#KTVj1(xIBfsLj4V${Y^vNvHo~R9d5?<#5m?+atM(RYDZIR6W!CWXFk~8MtHh{ z9UvUah%Ngxle#%zdLd~pIoRQyWSks|HI{ZQw&jhoQ}Q?au>q5^oMapRsqB>k=tA^~ zE(`jff-v6AjYhj;H0-hNCjPO_r@pa<`M3_qqkhfZ-P+?MNgF-n2Yyn+(M@&Q%A=AUc$>}Yhy zd4vVSa>yE2C^n4DS=LjQ2El7DVGm~4Tvg+27sq+YjXACaAF>dueJ^YkW1BX}$Eiax6_ zWl#MEY4_v?itaJ!*(>aLbQ?ntt9u3?#J-j<7f7YKMwOif8}4B)`f>AX^d)TtRPEA! zioqh(gzEwPkbq?X=iH;{TKgtNbHFlpX4m()^&|pQ&Xj`)js}zL0L?9V^s@RU0ve(& z9cOv3=#E*Og`xhiY(rn6J7p3T>Ols;JrJQ6x}16B+m(*7YUc29pT%)-F#*Rl*gKIY z30U|*w(d^2%e7wK{6fcAAWmh^0}?KEVR}7TNZycSJN)gKjb5!BbZe*OYep=r;KCuC zJnNMeyR6t8vCS)Y?|5B-*Fi9fakj#Z+FZk(VhHO|DRwM)yHDG`91`!bLQTDAC5H~V z#=#9ZG;3~o;R^+rX<|h^Zwy`X@W`Uf1!Z&4I@C5AxBYXC8Fmq^xML@Fy;3>^Ug()= zCzVw!&wG+vZn|vyf#VAt0&p{5Zl7`2jk`0=*k*>waH)l70OlSAHak;XAKogriuG0r zcCKblH+Y56c1`F*^hZyL{^(wdTXDdShPjC&<`>$bIKOa0mAFQSC3Z`owv}@>z3IXx zG+Fz)Skfh3oxSVp`QpAHr-yZRlj!aPixX{#Wsvu%wbi2WLtm>ZJ8R+RvXiRi-Gk(m zhOKUYy9RNCRuo9f=Ouuz*r}4!Dow>x{0A)Nsl}e=YFxRowl%inxV@_l*g9AqhW{de za|dolnrodmbVjJ1}1h#G)XZ;)x%4auJ+DB_W90>E^lsx-D@E;cV;3GE z7KbgZsW+L}Gam!T)pq1|765Q&ko}CjA!=?M%Dc_a!GzC>F5~%f+zeHVR?O;FFotyn zS3$y)*d27*8-=)zz#~YwuAY2wju%QPs=kzNy)U!^V833#BUOD>{13VnnY)1IT_rvK zauj?LMB>GPaI1c8;6Y*GuiDk})Y?*)yek$G z?oC+O{p`f()YJMncQ9_Tj&UPaNotULOcW+&x3wI`^gMXil@p=R9 z#HPOBz&)Rzr*1!B8wA&~_U_6ad36V+guk#QE~9|d8xrKUV6_JPyz z){?&RyU5Npa^G299%dd?M{dL+iE}9Jf740a_ov< zvUK}?Twk{iOx*ZBV#NFm8$J5n5Isrbitv$S$ImT3y?3K``Dow!&AJfRHuS1YZz+<* zg=;I}SpUhfe#^}jY@DjDfj!|Q3=imbIJYs+H90NDLA^}pA`BK@jn3#?;oisEtthX0 zTD_WM&Tr*(Ab^V0s}-JNoMdN4@z-JoI`Rbu&b{u`ZfU-GV!kh+w{d8xHoHKxv9W)) zLSh$qjR|R?1rm?L%jMOc@W!D*eAYqT>v=(xwbAZrx&>LUb2dQsJje*(YKRho*YJ`i z&NXfwv-haO5oa{wskbcNS+d7;@kg{o&Skx$KwD&S`lCSidy7|!g}=G(Pj}0V)3uyy z)kOz!Z<}xQU~0hiL2`mAcA+hDVHbIaiVaV_0%BPLv8mr}p%-^jaFDp#Y({!&OV@e8 z>eh8!N@bJic5v$xHy3swE^TszPiNWpYt%s*^5t2=Yr4zA zWYAo8`Y_dxv|#MeV;RSeoA7=J=J)l%T3nLlB{!`4@Kyo8l_%E1d zYxh?3lXv1x1bN>>cR!r%PO}$PO*+!;F>sz*VJElEQ&}nXEx43zG0;5l9AW2aZmq=z zUIWhm)7Rn-JL4bcbB7%lUMJ#9ZrMXa@y-f-y~RjA zO+8kAyMTvDU;g){1-`VvmlpWa0$*C-OACByfiErar3L;^EfAVDoLyWx94a0Dj}clh zd40kDxmgDd|B^bU+*M#q4LLu}4>^Xvi8z9b5QNQW*wtF#cZad*HH}FZBg?g>AQ3LO zX8W0?hwa?Hz0|0>X8ZZ2E0OsvWG2=i=ls$IJI^dM4!&ml1*Mfcx1UYI3rh_Te`{73 zfbPz~>giM&bH%2EX-_?_FoOYq+;O&nA36VLZh1{8@|&g?@Bqw>eI zFDgB3hiA}8w2ACI4Ojau43I{nJU6DDeXPIp$Vx zV!3}~>bM1=>)~m;Xr19%w64idcS*#AxmuB#=+KWrVZ9S6<+tF5^@PM*Dd~g)DQUJv z5`9cbV&y1Ne74BCjk0JtNY2D^-KrXahh9X>u~x&bZ^LrmQa1Z3k`mu4*tz}3@Q!VB zjKg-+&Ne*wskxK_SocCZVi{{^g+a#k)QV8lpX-01{d-FLFRA@|rgr!yys-e?UyU<2_z*hFZfCA)n?gIxs%w$w@<3MlKNS9qV$Mm ztp9E>L&hD{i;&T<>!;9vwbFkNk`h(bTz4b=V^vW0fUGS>bqm?7gSYDLIs*mV=M->9@dhor=fHtj?7 zyrG(#sr`9m3+;$yto>CmL&i(gijdK;D*^4dDDAHyDRGNU`)uQ|vu2kW9{kkYN(irm zMnFI;V+ikn88ZHefDjlByY2*p-zf<1A}R5^bk2VlwZDgKp&hY|wSNR=$oPO-5i%Nf z-4E^eD(xR5DRHk&`yiX%V9f*6{x@U`?TBTp{hwfljQ^!pgp7t=k3joFO8e(XN<3uK zUI6psRVxpEY91woe}P6oKrCYjS@?J`Wb8H}FdB9}4G2#v2>g(B;z`kci*eD~`ktYF zd|z1VM=WFglcoL%)C*aRhFyPv{^yncDM(5@kKX5}BYU40sedX6MEMcRSpR-thKxe$ zMaXE_^&0fQqVyLdDe+4B-sg4d{|X3%e#A1?Uj}B#IDmQ)G8%Th4gGH^{j-sjcq@JH z`zPw30|KERv5fT}4ra*U7tN`k(Xi`%=zmY?$7lVF#Cruhyw_k7gh5XZf0i!zF9b0k zR00HI8H1<>Gh{5Ha)gYAU4H|Jj}(X{NJ@NUg231}!V^Csh#F7{5Qt?A!UJZ=IEu;< zG8%UM6CgfQAZn46_$;+A+~M7h<9hzqd`=KvPzex-Wdh>U!jPjp9wh*B7~cMRHC)FR`-dnr+vXF5r(btGcx)~k`;1PCIS%t3sd;4C2NZk^#Y)Yb9VKbqVlysG9MtTC}Q~M=xCM` z3u6v3HIyu^m{l>&5NQ&0D+z;GZ!8SET8eDSbV*u7NsivflH`;hT@=X__fT^;bi_9Az*$bDRq`&iQh>l5uZ4?Gb?XaId6 zslF3QD^NOS1;egbQQ}xQ$p{aO39D{OYt=n?U?&V(zDamsW7xH!C=rDM<%QZYHV6e> z`>dc#C}_e8swi=s^lDjl?HF;Pp*yXHJvfFaLbuS+>?$on6GZDAu0m5Y4J_(gmP^*R zG@`EWRd$27i28=v(|^N15x71qMh4sE){xb zE#Ml+^#p(;96o}$pDx0)fGr6D_2$x`x7NT)VcVRV=ctT+E|4O&H%MozJqrPq6CDWo z3;|qD%zMHv$8^7Ycai(w3hEcgb$vmLehiBq31k8>(EPSEvAgJ+?YEZ-WQl*{c^98Q zo)pAd=Hp2<&gqc)Zv_#ty@99@{;d$qC!_C2(9f~MjD}s$%<#LPn&Ez8hPkn_nZw8v zGj?vj!)DCKXGmk#(wI-pP{x#mfO&_-n9t6D^et+jK`axbpK$-@yLkfXw-691qhZ&$ zV!u1P*zGJfk$w-Uw4N9gmt(n^$S%e&dgy|Lvv}wBduhIVOM^1miQcE6W_&TkeIJaX zo)OC!+Pz?gj5`PkA){f}fq=GuvAaY;yAP=X+R?DWa%|Nk_Akb7E1yaL?S4YLAJ9ay z(}VPyS%h{!7zH%MGKR)aK|{uK2ndbQu41Su4juyQFw2fMR7e-4DjEYlz3DZ>0$L0tO5ad;QmC$=LDlswXHzx%Duz1=Zh21 zkXp>ss^CVXewR5f6epe?k@FsMB!k!sn_c~CF^l%+q3O_YB{8oKt^SWh4EIjj6tKL3rhPfH_xl0ze5FnqiirEbMv z;&}=eJ&#bsr=XZ1DqDR5{={>n7u$HELny6&UEugs%1%5@%j7DKzf0|}Q~PJ+7TLm! zo?_ZRn9toN#4`3G=M>>ZUqA*;&1l&54!r2?V)t9c?l+VdWlOpo8H|%bE&|v4(iWeZ zws8HK4s+F{#9P`DZ>T3YjC6qsWPC5hh;M5n{#h|3-d9hWbs|_3?=e|)hCMB>+{dKz$)8{)51^e@UWvB&glU zO6;#e%_Jz}Kob;V8H1VtX2{4!Kv0Z^U1b0@tHgbP!j*^A!~sC_P-$Wol~-Ln?f0Tb zn1q~~*+elJPr@{aWsG75m?2{t0-|6v>^c}I4k~faQ7DR$nwTR|9ArcB739<$LKG!< z5-1SM7{zQbL&kv!h=S3u>rkL5R}kh(3Ks&GyChK#Fprd0-dy%@X%)6h=rso;E8#9d zOl+VWMo@Ra9 z!a%XA#2r#7&O&M;BvGugp*R~kH4&oNfhU0iv5ZlC1I&R>}mt3 zV-%<#N{TBGxQ;JL95WKskC2r(UV}Q0psqxk0EJk_pstfDe}aIZ7{%rRK(&{+qYBs0 zk(!7C&Hbf`b}Fy>?wR)quekv^HJwE93p@!Fh-Hl8w_t{hn-CBMqgc5E#fB1hOrf|H zsfn0GvB8GoHssWtNEEl@NuWS1V-$~p88RM1KopFIUEM&jNkMo*Qapvg)mxI-1TYU` zUwivUlZ;9Z-1uXM^EC1ky?P$eLuAh&O&~)oV`Q&Ly)PgjGDgF$As`zlai65Xy@u4p zNr3c_2`Mok#&HwW>&UJ-nNZ%qlYoL)#!%h^Gi1DtfKV6>yG{X=Eegl`lHvmduG2~q zTY%^hBKjtb#Bs_T%RfYZ;xs*Mo=RkYMVdf{SjNcyA@zQOfXEmPyS4$@aEbd21@3dC zCe8q)$4p3xVKHo(p#FvIn(c)01)c;H#4?7GJxdtLKtL#rhF#|X%GnCXI7yLZk1T_QMH5U=ees~g45X%_KEHFdHOaz3&XxMcLpj@nQlu3#?2wazz zBrXP`r-IREIgjmLiP6jh%oJ1rD84bJc0-`%g+`AO0El9jx2AVfyP zuHOUV110YJ6vVTUiq*6Q;sbVw_oaon18g-95#l*`5)cu~7~(}>hK%zN5F(@4(*(rF zOWcnth!-Q(ZpFv#5FZ7^*GE|KTVShsiV!cslYod=#t?r1X2|$10zzaImjnRu`4acD z3gYERwOjFdJH%(xLc9WOH7^q4kMJZQB9<}4pMe=Nu0}wJjD}rr0OD&U?pGAV>ye5{ zm!+a#vqO9(ZAJeaY&CBZ;thBb5E085;%~qV8NWh6h>T*}5fI;2_V6^d4M=!rhEKMbI+N$Y|Jg01(Yoh-M%O>m&=JnPVV2kcjpJi$H`}#)wM63>hSx8xnTdK5w|K>2Y8fzonyg10sd5f72W&MiLY#{y0THo`A-cf~ z8HXSsL`K6dHy|E5(_OA09*$J(vRNP=YKK^!7GfpXYAOhEKAr?b#4?6h17^rrgn$qk z4Z9Wr;)0p(`3mAvq++3Ifw;g9aei8eUjt*O7p@ zMB!^d61E6;VflvF?^(-B0O+5rRxCHsJfA}I#2K2r53!Vp0$>q{5X%_RDlkJvBat9v z6dT(>v`iriBMJM17DUU&KvYXa5wHkEh-HkZ4a|_SmPimX8g|tKkxwBy9!XfCTM+ri zK-54)QLqR^h-HjuBbXthgGdlEic4`o)Hu_cBTbls~uuE zEyOKgt658kTk#|yB9<}4ZD59s(-9CNqhVJR5RaSbK2||I3#r)Rus}S{4)NHu5YGl% z%?X6K15W}XVi`mH511k2a|DFQDDIvCVu!+KlmVZud3FHMaGAY%@*b9avtd0kIlv?^ zA(kgDj4>5~88Y&T1tFth*Ga(C zt1!(#lD&!cj)|$CnDzscz=T-Fm`cG688e9mA){f}R$$sZ(>Zkgx)wSq7csjl1RC4N0mI@$KK%8aU= z_+`&O3z_1^)~mdLgIm&xTjpWF;Kd_xw@BPdx(%FX!5#Us*v{=&h#9~Y;x_Z}BJi7% zWnXhE3$+-jqELusT&U+GqEOEuV4)ZdyAH4LyWJJ0QC~t*!dgou(2rKhrd4T_R}Sv(r@LjYe5=LzVmkJH=8^Tvx`b zbl@1}3L)e}JIQh>1hw0sg!~N@qW&r?GOxeS!HgpRF9OydqhZ%l)L%`7yINJ@zmS@! z)>SAgC{crion^X)z5tPc@zs5Rk<%(*7zhZ1(XguyFlsB@%PZVRDJ0{NkvK{tk#3M! zj)ZfGMEb#aJCXE*L~X@R_&^nZSjo8{5^#O{05>1ZkTD4X;W8R_tpMDH3b$Wjorcte zUt^VSlxRT0g~TfTr~pI)#>#zw@f9#b{S2x{$Y|Kr1Q3s1 zC=MYCgp7t=#{kXR3ioOS$c@y*Y7Izs0g1Ip*ggqHk$pe~hy;vd_W{OYFhhM6)gxpS zZ;u1U@fGei1>*>$CfYO%*@GmGhnHSLFO^+LHHZX^_I-d+3udT4is}(E8g{J*jLr)8 zIt9av)WkXsLv}%l&Iy!6-@yv_U%8%%dY&b`A!9R&jYQ%fmp`F^tZqa85dGN zLPo=`A7~ukMtlU0QiVe=O@2rmmx5N{KrCY%KLj&me4qLeG8%UMSmU??alkTPOZf$s z#I(aTWjHiPyOeX5s|n&qAQT`F%LK%dBfvbvDL@n=AP7dot|ir~Quae!%s#%53TvuC zRE$KS5V4FE&H^)J>`z4q84bIR(h5rv7YhF+6)vN~G9(Ixh-Iws5HLf=K~#j0(Xh*_ z6_z6|6n-uh)=}X+BnpLyWuoxj8ft+5BAA6hC}ik5cd6gKbE$jBQukR)-P@MBhnKp~ zSn57)sp!}zaqhVJS093AWS11fOA{CQ3 ziQ%`zPzek>iD741q9O&)uRtyEEZ7G;w}BZrenT7x84bH?fTwzud+{pwLIvq|WMD!k zA>Bqu)vGuaYvoU3F(92wc;}WS7N)@41x^9)$bEo!FPH)AF2X{{C|VxiEmgqoLlPz| zmik(n0^oj72ms6W0l;HmhT?~)7$KvW*aAT9D)(}Q;c=v5nj$g$j>f442Ibw$Q}8?i zYJtbM4|rY#GjKdd90(c3%oTVVR=NEO&r3+fL_y-Yi+CDVaXx@EgDc7s{uDefgIeHO zxes{W1~YKHNgN0n#S|8Jf(p!^kc0u+QbEBK0Plc800`{^fPaG-ia)1fgpA^)UjS%U z0RDp{%vUS`no|Jm2893+&J4i$tDy1x9%#f(HmJNns7ze23LPH~Y4Fd{VQyfQSrX)< z7^-*g#+QWUplysdu%fOV8aD8?)k%U=y#ELhH5aWC$S%qZnFF722evmL5W%YmXdFiI z<^%HZ?gM_!F7Hhw6Nsa_0*NGi3n?ytulX|Mz4Rc` zKY}NcRdYCE{00m$7G0%J`FzQBE0<$ZvXx!V3+V^z~-( z`H>CC`49n1#c0^I5W@ZLD*U=D@nhQH6XZ!7R3nkppCZL|Wxf2c&|?Hn9vqg^1P_{1}Ra9A@#|mR1veu<4de~y^Zo9 z{U40+buyuCA1uW0c0dkXQIwfc^sf+(9u~ju8vK|R;`cnHg=&#V3*{iib-mR>5fe>LKk-HBT z;uk(3Cm#XJEI#<*@h@{D`MqJW;12ZKnl8(*U_E4HJVh@E3EQX33=s|2k9-0(KbTc zKG^112!Nb52v}N1u~Pxz*sH*=do_Mc+q5B1+U9s9lKMELxR%*$LndV#@}{@VvB&}c z@!*GTqKK6%nNiB*zbaz2O**Mo+nDlB5c0|?57OHiqisa)KG^1`5CAz>Az*144ZAua z-0xn8U-t?4F>P}V@}zAxB9YX;AoGIB+tJXbGG{oL#iccdn*^Ct?2@1?Iz!5^^m zj8+qR_rYp+LIC94hJe@@4ZHdv-0$weue*ysC*sF6-CZD%rW-;cS?)%P>#`!*RlLWt zkTKO_l%p156qjl}$~0yrRF+t08uD`tFhR{pV1cfCpbKU_8L@Ju|32zZHK&3g&8ehX z&1p)!Uq~#cM96=DF`854?t?j>fB?vO6aj6+C=Lf99LIzBHI4WrlBE$(Lm~;EGE;^_ z!te0HILT9th^`8srZ@!|;CLDwFvaPJl`ARFAk8%gDe~J4e_>@PIl>Y)3C{`%<&*$< z&oRcL3;Fv{^fw>?a$Z5e5-}QfZG&*Ukb+P{?s|$gw%(*y6ef zi8f9HhsK|kiLGsMT%TYG*hR2RTRjgRF_aTv`V;zaC-w1@~UqIW5{v3 zFoq@ndj=P<>3pEiXP>5P?wtkE+ioh#G+3|(XT+!EuU@~ zegFhw$0cW0^)Aps%tc5d=t~eH_&x$*Dh~&LUeF*Mm|uJ)CTVhcD`V$u*VmDaDzM$s zxC}yM>6oiacR7>4gA~D}ff{z8mcG}iY3%j5RFuIv(L$QVB4=j-$=}7Di@%F|5I=&( z1T`{Q)qxgjQ7rsbXB?otMtt=~dUJwa3_4Af%ASQA_rp?W*0oG z`VN{yRoT>$WZ9Ag0|Rh#Ze;NjWN?MwAy#fy>oufSa?`1QSE#>J3b+;#I>B}1 zx(sQ1Z>#C)Y^A=O^K;5m!%r?K(Gn;gW>hWVMv{n@KsxO!zhbg#3Hi#XHz5@Ty$h7( zCiI(0I95Ub4Fb8#_#U2SRo@L}6!q7Lu*kQN|A$E1W06&%666?5BS*to)%Qw0{KB)4 zuUTj@vtja8I^kVYVUd+J_pw|i-|cDnWM7u_O2Jo7J{08+upqb-!PvbtiwlKi)%W8e zVaCQ}5gna#wqSsYyP$%`yPK*wB0-vxGrRgh3FjVUis4G-2m_Xzx%VPBl2h{lXv+x$ z((X5*XaK938u2;s47;F=cvB)Nl-*`$_WNIo?fg@b){VadHPiJa|ye zS^3uN>SvLuW@j3vrIEASC>2x?!IKKRBb1XLIXo>$sQEW}luV}>nds(KbE}_|#5_z$ z5o6{|q8RI{L#`?+F&)x!a_3Y(FXixS0cS6n0t9Ht- zI`YWE#>gvbdn?N{iIO!fRhC*cVVhx*Ip^c~1xq!YcJj zWI${w^R3G}(f`e^egRZs8%geIO_~N1z-4l5v{|?WGi0j?+saWCS;?jgjx6#L>H&;0 zz+l^&BT>ywhYItQKcq+H{J%y;JwS7iiOPl0?$*dW7>Q`)Ch0uHT>W5^_L>TNjcpiV z%`8+rKIpyVMXB%55qiqa95=;p*5Y+_?70H89yr*Nm!zJGk$TLWO61sZCpQ`N3Uxkc z;9zFW@f-E2vpQ>k!8_U3Jpt9RACanwx1m2Pvnk*E2BZfDekxzI)$7q)FQ;`G6W>)& zKERQuaN#R(i!BD5T8Tt#f5`e_`#aJU?9f{aNL-3UvAM^s2FvDNW0qre!7Rh!nCx&k z!UaY&*xS+G6>IK|_YB7R2k_5!8(G=87)XX4`Gzss>2R(AQDkdhtaBu#LsCux<+v^mO5P zhbT3lXo`B z$cTn}hx$8WVf^Fr#!i+%w8V1Yb2tJz+u{(1i>!KN)x`z|<2~(z@!p=a>^?hw#)e13Cjba5y)`qb%`#9hGNMES>SLuiw#d_XRN2wqP$M=&eFX5 zE8d;#|LEt14o68EUccgfO7LbmUoDm`>oplVUl$=;(Bs8Mcw>D1ps|f@#{rq84#%U# zM&nS|V7#v@-qB7}7JUyV^Jqt%!*TEVVq<7ye8a}({@%`^4pC2Xyqn{2zJR>0-p%Q< zo-Q_GTL$~vI|gH&Iv-HXB08TfHmsbMoM(y+n?9LU2D><)D>iy!8`=kBESW==j4e_O zi|=ZizMZc8Zzanp%dh$s_}d%FJeFVQu>9|(D+sl-u3&@r?FF&q{5ho{GONs(gGMl; zL^)4ki7~>}8$?|@ocooSjzOV?rX z+!f0E4$%S*N+)2>9t9kx1(c^jA2dtuR>IF>$zeHT8cIH2^Hz+(Ta}i#TJtWl@9}AQJ2h{+ zC0}>5(b0hGzV<{dU_&|qu{{dt(E>K5L9g0*uM%!+=O=640ZYDat0#@7T({LzwSX;Y zl&hw8ni6hnYTGsMuq9tNmor9FuA9qFE#T}l%9Xc&T?w~&`$d}f0!zO3*z-nHu08hK zTEN9=lq-k3R0+2^+z&MG_bvI_X}&v}a_ux%Y5|w0QNBj?C)a4QtH&a{L6cpVhU{o1 z?Pg7O<5*<3YO-6>kZEjpYqC3(4XksCU8C9Hcm?MnE#QH40`A+RfTy&8$I}UTbTk1c zC&|QIm#46BPh@Urp_EW zH|kYDi#6HwvB(b8WHZMib7`_U3bkH4&vrPx3eH+Bpf#O<@E!%6pamS4 zPQbBy6tG?k=txu2VFk2Hlf}m(>(^wxW09Sr$u?`$de1Ry9Ctc~Mnk?$LE5H;d~Gx# zr|(h7xmw6MqX{{Ck3w#mr+STF&NCwI8tPm-RFYmt?oiGfp;hNS{>1!&C=HA{e3(-yxIq+WE-pKK3IklkginaF)_0{+H4)uB4dpcrW z3W>2Z+g#%hUm&C}w^LiRpDXf@+AHlVwf2Sz!_zSsKUr*ld3&*yy#)()?N%2Gq5i!R z8qz|8dqv->>09=S{#Z@Fw!*0E>T1BAL>G4ZG+5aNR_~Rtb}j7q3d4`>zpnTx(gvmv zSS){uFhbj2$=#skcEUgUaj)omHGS7!(SHZ@9JfWg z`k^&)wKY;xZ6RA`jnr8q=Pgz3dFN82xqU+ndpLtJ_!b&cvJE>NJC+)rt}dLNFo(w@ zw%oIp8mr^6&GwC0?6+)NYOpuJ{#bu(zBpNgvz&a zu_Oq-;w3@weJuroFL&+1R(x4Wir^bjQUqUUQX=>+lqtgM?9y0#HOkDiI=ii^`Ra@~ z@5?#`Pm_4Emvt(h@?h+&tkdv>-Ey1;@)e>3c`lfJhIo?Am9GXF13c{0L(7oE!55*7 zzCh1_bqZ5zP67E=5sy)^tQFJAAsz!@2FPQ6dGN^VHRDm)Sx(-k;e4ysj#rc#}+W+^e5>Pgth$ z#;uT&%{#9mEr%C#B`@#4$tPY)lTW;63Jx5V@;0VO%jP9Z`NW%@ctS2OE=tL~SSNCG zc)wB7@w%aW;@vy(l*QX`@`*RnWZ8JBOs4T#n0RvX9*NB5RT}xkTQ8E1_fq)8E{E4j z44x6`S=`5>IXRttAHj&DE^CL@8{5XA*7A)X!6}CGaSsQFWxP9RoY>Kk%-d-U7c$Su zYn#T2-FA*?Y zS-d7~boBOZ6+J@IgB@ACsAlwenbqGxBbuulF>q(`9T1~0)YX|H5yxLRb^eaXZHaYp zQf1*CVuL|GZ~q&eb`vt4_q#`==S&tS**_jFFUOJdGv;;l;vjJw%Ld~crSf=u+$3Y7 zSmfc3=0rz6US~0~jK6)HH_@4Iz#ArkHqW0k9p4*)1nYm%Xh;8Gl#|J>ShP>w#Hm>3 zX-%86d^zMh^C6WTj*)lN9%Xj654Ia4C`arO*Ilw}^L zWX{Vfm^?kp$U)q|*=I+*XMHbdm^L11xkmRol}7u(IL=%_D{Yi-q_x7x@+ix(Of5Mx z$lX!X*4N*=p})PmbUkLs1Eq&-sa{;(wmII@*}Hk5bW?nAplyC-TfC>EYp64Z$BN2| z`HQQTEUBn$8$zYDb@cYf5LRq7KF*smZpH-Qnux!TaJx#^0qYg@!SadvXxgj#i1rPw z!-@3BV$ix~rnco2B^!QKhH^Pf8|SO^@VqArvP{_HFe@~OjsOWW$j0(&pY1X~tD7H#>Su%)8_ zfx$axc~f%prwTm|V>;uo?F@v%ws>Y4<+CH7WfHa+=O`d1@=6;RMv2KgQ_&YV3fLye z!@n%%gPzZ9sRx+!2d2>TS{na&Z_P?y$~f?pF^}!gZ1bva=2+5aLxW6rMN z6Nf3&kw3?hPRye3AXap0{7;qbP^ANTq~m`o&#m%+QDC8;nl@m^Iv4rW!!j{W8&o2V zWty*f9r-6AM`2u`(x*5I&`u3rO;Iu!!bOZlri{gk7V=Jld|@L~KjY-BCN1BR#G~YgEa}9f(pM$ZMVsMSDs9*Y8d@aGILaAG(&d*T zNAa&7C4H?*H*L5A@jmbg|3FAf9fLH=K337fhNU7$_W8$+k{(T_3(P!%rCi#FnA;hL z+;vGh(a$N&ohseL#=}ycH55$x^R;2-Ld8>V88cd1Bk#^v((z+enV9p-%GJ2JhWyY^y^u~^PA zzAMrx%fKgomk#yxw0Flk-Gl8LjuK_GrLb&G{|9ruZq5mN^gQo-!0>(iT_1rx4wU7i z9SpY5? z!rIHL9X~w>9SUbom!l-nbSha_YZj)>LZyk>^cAKR&JkAl5LTdFrJYyPU$Eyc=dRp% z&XosM!l$@poNqgDGDJF0mx^uaDF;!e@6qo|jh6O~7*1eJ9XupDB+W4rG4brAGW`LI z(98O)Him>>uvAM8b@ZhVPXryyw%icw-;eXqZ%%|2uLQmNufcB1z3(^SQ&&L_efCOP z6K$9_Q*&n8OFh#@>X~*>&n&-sW_i^!%Ojp$Y5TT_uh#5(e6^@p_6^Sb>lF{iHtOJi zB}il54Jyy&D9A-R^ZCayN`VA^d^(;W<_WA zd8DIVlC)0aHzw^Ziq@Q?l9qO(y^{1bhbJELn_@Y z*TabOk22WeIg@yVamaX7(PEBq5^{1(43Fz{XTE+m_Wt@&iV+Vwh& zXHB~2G@UbF<2CK|1Zgx@hw%rK=S9V1;#i0{F_Tu>)@i(K(!Qc-fhlQE%d@2{O2+Hp zp>5tUWxT0mn6%7SS`6!g<;#|73lyE~*W1l2ENodh z(@{KU0m`EO!`|@dSYh)*(6aXnfnl_=Ha1(zDkHM2O(V-%Y4I_K>C^MgG?u|EtMD)4 zA7|L{qbGCDu;8Bp{G;jzejc3>|ANu+bMqrv02Skik*2Qp62Gnf#-*vh@hSB;T3wY` z%8I&D=%iz*7_p+PJn~~%m$Iz$9O7JM2IA3ZJCCg}l&kXwc?8fOTOVh?l~*EZ%ShX? z5igX+J3BURigLZB@*>Dd+)nUro}1#{~u#MxJ}I zy<%X)0Jlr_o0+=VE?ZKq;&DFMyVmaCU?TLcSO-;I%iXeu7w3S!INm+5ECXMf9$r2( znH!JuL?1tzDCQ4rSV1!d^Q^IPj_8Z$m>JwSDxaP-JtjCmE^aVbx8_8XPa_DAesRv; z21#sOw+babaGB2W@NY9pzzjcZ&bu5X^ilOQ)*h~Bfb6! zSQWK@nb$ww5p7GcY*M|+RI+(?tVL{##6HR!ue-NLMKhLjRc__pI15^PQm~b_CAtJx zg*U70jy-m6P7m_?W9LNT=U#B5!ghGd1uS`&_j z4b2MciOov@j^HfH3Io?ev@d`0M3-ZE-~M%fShBZ0#@btQaFN(~Sz-xD%pVJ8 z_dc>w(OBbfBg+ZK{Mf$53TW1!dc!O2D+O62}B1 z0g0jcm^N18#JXBdG;bW!)(%dqB?((r7pk4pPnfn>;>yZd2W(w!o`|a5G3{`6x}J!l zMW$_*czrfmMO)fqtu4v!g+`91jg~kzGJ#kPW>yfofDPPluOB_J< z$51jd?YGOPubWMX(weCQErY)DaDh)2Wc64+kTa;u}zD=7h@mgcP^h|p$VH5^(%jDXl zU9BBxCn*2Qta{Z81#L~(=$X+4CA*@%y(l}4e}XqIiW413PpmuH(`)jei-Z-f%TcNukO(EqaYVyt5l?>nYl+TNb9!1jQ2bV$L{ZZ+~14 zc~W*?H##2MMl8weKDpwcQ;VgvY_xpCJB+6?VRUid9mea4dB;Bc?JypM*4gdkw|0l| zu))Dr>&26H7>BK8TMq`xQg-`$<7t_-_r&4``vJc2DcyREEwmADm<<7{O%5W{Y`NEY z9AVqG}U8`sa*PNC{0=ey-u?~Nbcm1ztm zKMmfvqQsaKbazA(U7ZQLGun#^DEcwQ8?U>sxg%ktyLT%L^DxyLhZVUax{yOiHVP;rQ;HB~P%Y|0rnS;D@QGps?va5xUli5@ySJf}$5mve?q zm9T?zhE0>OLvn^qm#|qm!)8cWG-p_&gf-_3J4nJ>a)w1EtTks?vxLQRhP6moJZG3{ zciVD?se0X>Gb}DV6FI{s*PA*&J9oHPi>ViLa)*oMcu+X?25QAUP#m{#4%4aUFr65I zIujOlj#+aUddVmlBi1g&<(%VYY(6PTH#u{Tu4F4FPTn0X0ZaU19kEXK5mI9dlplK0 zo+w&DFf7z8qVY*k@7>0 zYGKm|^8~xzo<7A?)z)I2Ub550I!yUt-q$Cd#5LUSmtxH~xJt6Z;yuweA=JHZsS58( zq6cGkN~RZ$*-e)~w<>|wWM>y_IC7NLOd~yhCPD&dlP*f*+s*i4F4U=Kog<82!fhKy zYClv2i~tn&GVSLK{x#-NhTh0k6H#-^b(mKM723~{4EV5K!k{A7odqcE6q-hn6nBcE z-l{!yeoxanE<}8`juy;AB|XL-g9?$tP|NHE)fyhK=+B-u(PHFOAbuD*>DgzYxH)W5 zqaM}*u9LAA9ENm&0!&y#ol2nHx~)Kqy$JEBwS8E6FTtb022~5DJ#8_m-Ix}3#yXoZ z1rp5&Se~#}G~m5x!X;Rhet|dKj`eapW$c-SSz$&~y>qmnHx8_&7_&Kc%OTz{-Jh_> zVhIlQhAD_~%*37XS&=uKtp-aI{T%m`P+~_YiMg3`gywpgl1yo-affM1`W8oO3pzX4 zqp>YZnXXMqC182Oq$?9?7Wn+p07|EzXbOE{Mpmj6g8r~xGYTEz^Y2a=-5KihSC%j8 zGR~n&?iZ`v6C_GgbzP>D@p>8wEJ1ws30JdESZ%b1jeZI{$$R@yW?Easue*;1JdZyf zq+?t(ipJaIS^Tx)E5D$M>nJ+)-0W^$rf`$Ur|8DR;O$2|>Uq8B`BQ}s;uyv+Juz+H zMl;>gjzNHtTEL3y@I%qXu}IY>aTAVQ=y0}YDKQn0ocdVk53@PSH(|(;rkju2nVgS- z3KvJD2{CnLh#M!?4D)w)vb(RlGunj}1ZTuC)QQs!JHa}H+> zVuR5wOtBM(?PN!%|sbfikvMP1rIJ`LLGbTfcvzrqK4HEY0dqg3cHo^%v8TIF7q!ZrWi|x>6 zEg)r#{wXagQ?_MJd^;MC$qGkrQZIuL^C%~rifl(QyCP=vS1of4k8&qYTdbEoWC~r5 zEL2FpiH?N}KJGlZ!inD-ZEnVNt+^*TpQBPO%h67_OhQF2V;nzI)>^!r=ffL>ihJ8{rHP^22;?vB5~(;MsP zLiSCu=y;V*ym&08F-~y&WNwYIcz2%=!meWK#U4%^OdNU$pPSy%mdA_6?5SI`qfpb? zGbgxggS2&Rg9$*+bzs+f?m*L8tN=ZG>ccD9zTfAJkojVNCVVKRJoRsBgsN;v?!=&6;n~Mye zXqQvXOd7>H462WXpI9#zJsnLQro%80RAz8pO2b`$U9DrSB6l5L;)W|aEc2mic6URm zRn1m%ku)WSYCU#y>7;2f_(ypBQSF4sNbM&)+EIqdo`vyb2NsbPuQHcLW1y<`sfI5Z zkIR-=J$6HfE&bimT0;a~vfDp)^LQGKI7Vy4M2_96P4Cf?HK%rk(RDm#eI2;*AD2Fz|}~94gQ}b^S8L}`!J5{ zuv>Z;u##c+i-|N%R!X86!}-FzHgJs3RG4%dhD`O;#U{+h6B|nO2plIu6m3teGl`DC zn`X#_X_(v`%`)Mr17gdXtgxoD{Tr0O6>!p0@uz72f-HaRs3CtVsQtT=Xj3rf zae5z>H>)^{Zknbm^U(D{IXj{MJ$Abp0a+m(j>T#A#5sA-a(Qsj$`MINQjH@D(pFlB zng%r*)ia`CnmZx={29pnFw7}OnW44D;!$WR5U3MwdUS<&PMJy%&YpQe<8)Ixy6nhr zaJ(rE=ox!WRFkfw2M)jKQ**_0^ufpm>n<3^IpZ&;>6AMf6(Ywp4{GXScgo*M3ld00 z?Np-Ak;5Qe!0s@E)iV0v()V;CTVCBP1P-SZy6seJM+bJ=72$SIRl|?fHC&Y2t=;03 znmzA}ukWwNWk>zX79GzU1J<*G>)O2zX|Kose%5Zivx=uaR$|N0(p78cv+luaz1Ijs%+63VJQN@(EFVdcv0SVJq6d#VW^O?N`&af}L+eRR~Cu@dIu8K=T!6vA-4 zn*hv7Y!p#>*qv_l3^ppC;g1_|F|dJXG#=b{aTa<`R++K$E~Qy zs07Yx*>Z@RJ6!#z%P??X3+M&9(p^y@R83imAfaZJlWjm}Gy zei)oJYj-o{w>Nv-Y$Q0 z#Z=`xK{xs^j%2}3qf&Xg!bPhj#q8 z#s$9CL$@5qBh3@=znODl-E#0u)W*ffr;cB`e(8#J7{_RTo>S8PJXqoQ^Nbs>Ve4DF zwtpS==a~JWJf8&~>&V2r63~+9=0s~wD$X{C+KB!Oeq4*S(Xht4u*$C_EB;-v`B+EO zg^H0kMt^$u5Nt`HlVM=aaP(COr}c>)9tMFeYR?92NbrY=A1fZ_4uDPBiZNFYS@?%x35cPjMz07ZN_@Pt|{mfi3f8X z@My-KHtjzw+aJ}C20;PAm4Mmq?xd4ZS}DM5?MNlKpOg13;R2{seSQ68r8YYXg&v`$ z;jW^ug9qm}cjIVlN&1`Gb``K@J9RCUNT!fKksB9jFUs;2pwCcz(#&mJ4M42AzbK)A^-YLIm*FxMx;KNIV$G7HvDo1mcbo=HTkxN&L#CDRj5`MA zvxQ4P4gIK!FrJweo{-M?*PSh6%H67EJ zUhJCzYu%rsmLt7xCq>etCL`WLGI!#k#)4n>d<8@G6{xA==f#0q%5;_081}~!t)t&i zB}0~IW#+kKKkXsyH)`D(h)4Tlh;6Mtcfqr?Y*Y0}O-W3*w(ADepUTVwg zTQ@*s3fc%PapJTQsv0UQmWo8Tvcl2jVL(m84O$}A-umhLda)>k#Zn`=0zZE=*4z~# z?4=hg%nDZvFG_Mje;77q#Jaq8r6K-sXAxADjt^Hmb~_8+B0r5W*GX7$b{KXLlh?4p z{$jq8iM`go;r=)(NNZ1tKMcF2-29jN!)z{4(WGfwyWRZZ9Is)p6;B%Zj>r)%)H>~~ za9w_~u|woP(oau0`Bs{u2eE%iB|VLuf`RV%@HSe7ep`&?+JU^9nRKxppeF`QDH>O#u zIV58E=_WjVsI&J$S0Ii-5~zn*2&O#>W-{2XSTiwNz{h)Eu?U*xoJzzKijHIJH>L*(*KnUC2_$ zo-b$ig1cjsA7@;=fJjRi_r)lGXTzpyYjIDE8($g_(*|pQDhZ}WOmB#Zi%pkvcm##5 zmF7RxgsF*{%vx#NFe`)K1$xvK#nkEFl+*NXmm&^l5*M;}Lp^YAe3Zvb#{M}C2BJ1$e{dt&%@z-0OBy8GWLNj2utv!%;{;|KVE z|8(S0_u#ytgFU!!26VK^Gut$2o{guT3vc%+p`~B1)mlIcP z?1T}H`_t9vOr7iUhPTGLv6ls_8=mn*HV?I8Q_|&*^sn|{$0@dEoHbXM_pvkK;hD^s^#B9+oXDLO21Bn_)6 zX1r?rWrm5y*3?$xFYT}sA0?{!U=@pVQa$^9tI+s+v8nMVYtGwFxC}6eTJ`Sx8am}~ zc1Q6ZBkppz77{{j){&g*tlh38f2t+9TNNa!dpkX+S9XDujfQluIlg~g-}?S_-FPv9 zw})vhcl^87Y%oDe7TEV>XcDXO4CeqY1!11B@5%V%?bU%*8*xuTmVaWkoKlA7V|HXT z|7X-5$*!1ix$%z+novT0Zf6I9$gRwXe-3)i3GZ%FwZOS2Mdy2egr)k|ty{eY@zb|C zGn!u69wR0j-Ik&a7e8%m6ZB}m#ji8j+J{3SI!DS+bRmvDS!+p9$7N?FdwMiqwBN#` zB`KSPMOtXL#SdG`qGoNhNc;75aWPj(yIA{i^1?9?wx@|E+^jT#)tY=9RWKe#I=?_X zj)9IZfOK@bH-QpKt(DtrQ_FFg9MUp#K;D#NEJ$llgv8LUI5+fYi8dh)W;Pqv9D{H@ zo@H4kNoNxZt7+!?i%$_j*Qg&{Anl~c6l&+-K;*o$={kZ2PwHh}! z%gx5bRFK8*UvSGE6e-+Vv3UI|_KzjF$$%Q@v;?sJz(ys@D5n2(S^|c(&*|vYaz~r4 zYPRxk>7$Gwe{d7|-vyasRw3;YqUfgD^)T|k8}ZmiAIX{s+~*qHT5h~)h}OEbC#Kd5 z<_3isI}hzX2dq=`;Ai%7F!fZj3mXr)T8ZKnT=x?fng~#{I{Egr883tF0gY`uS4Gp4 z+?B;71}hk6D7y}eBhlOw?NRFtn4kN@ zF-J;vwQ*2mC)#KjSGmRNl0O~}=wQSQa~AdubYtmNx7oq8tfKkjqEW|2m{@b4I@Ct& zjF%ffnwvO}_c)eIEP@-GWoL9YU3yiL^jTq2n_;i;`X_KMQ~a6N9+V=t*}R{#sVb zUrs(Kf9eNhsQlI5(=N3eNXg$T6TLUpgv0d81w;;G^yW|9!ctcpp0wtqIytfC9F6Ca zLBfFFcNm_}Z$QScpY_IT)ur2Y|LvL*R8<`w@S^Qy0aLlk8G_lqI(#;*q1%g#u{n*DxY;1V~?EX zT`dWpg?CU~=8${9<|kUUttIHS(GH5=3UgknH`=BoShUl)UQ;k~152>k&H5;E<+1S& zN+q``ICnJDc0HygbvP}-`X+-LAUQnJ#FwFx%lTpx3Su#8uIcxTRnE7zs@q}S&cy?)p4E!EqOZqnC>Sh!+%x(s#Ux;t)$NMMTuoA`|TAQH{gbR zti-5V9$&L=Y5y|Em+517r)krlM_y^~&_uool-JY9<^{y(T<0;)bu^agz=G_Ftz$e! z0)=BS{>t(1!)@48yD9XI&^JTphfb@yqUwXHkE%YcI<5L!)#q1#yZSrT7gv9`I(-8u z3rCe#gsQ4*)*icIXL-&O44c!;IKlDK8 z!O%mYheMBq9t}MfdOY+*=*iGip=UxbghYpQ-yb#2x4RX0@KTy<;JZB@5d-BERS)dN+JRy|$yT-A$JFIT-@ z^=8%ERqs~4k8Ey3Mn6GT|55d?s?U(&t<~SCKC}9)>Tgz`Q+=*4`*&5}SN%}+W7SVq zKU@8~>fcwtTK#(Uo7Hbuzgzu&^@r7;RBx}|RC8L*88zqBoL6%}&4o1=)m&Qh{hG^b zuB^GL=9-$H*8IHY#+qN$WNLn0b9>DlHFwwCTk}B8!!?i9JX7;R&FoVvOg~i2DWeK^=7k{<1&xB`ucMNFu90N-7>tMumReIf7m~O_is+-pT2)}O9xi& zz5FQggF+z=?t0JqCvlEiDZU&o6$Y+}Wks40-=eo;G=UL*vwjDO0?@ zq0r>|`svfB<2!ls^r`rULPugswS7D8?b?#K=Ey@E|9w;GmA|{T^QYf^?w0DXeb>Kl z3Ro4TMHa(eyfI**^2k50!0AD8ACN7F;bkfVTIh`TDgOT?E8Z-tY?fE>jF(w}`(;^5 zo_|g}Eqn&O2wsQr+C0xcC!Q_<1`WH$vZfvGiG)9$c)Ac6I$^S99gKU*z5kqex*!;K z%2zFG;f%rYAkYZ)6>aXirs|faMR-t8UIk$*Y+eQF99X(;&H6RVH-zR5tlzkJWys#J zaoNC{MGf_nXDn)2vuf2w+!=J@qIoTgdT|HP`bC{K{+v9uZgN9i!?ebR8H<(-tX|Z< zX8i{2Zd!E0^r?%MHqS9H>v1Zx8N-MJ5iaY7&yepD-N7gO1BFpfIPh>vs z7>gv2!v7@=RwULAug+d8g5}Ie+lf{rKCmIV>~^)$K@qkwAcb3XGO9Cpn_HvFp~N1R|KhuEFgmN=D{NK?ikOtJ-iqiC-msvl64vn9;8=8pmlh{yWBmT&Izagqi(mOi zWncUW7fK#hwz5FwohP03S3Rs%D*}K zzn0MP7%ITXEa?-Rr;f736XTs`rVFO??`{31zglw#0}`DKBZV<-M* z#s@FmbkV*qZMgF1zyD@=01xYZ5&k+0&?8*nb`)W;oZ_?QM7!JZzuVI9-k9W&TetJ zsQo}*9HSHmt`#vyfAw-`nbp$L-4gHUPPiOk;H1UE%c5Md;8GGp!@8O6;uE-oCO!}$cc0i(skW~^ev)huT36EB;@tafN3mViBFuGwG_ zkC(7`7-ePeA6`atX2r4k(lxu?i%0CvIBAEyoIDNWVO6Oxab=5`{^e!WIcs(|cH+~OPYq?41`9*P;Kjb!$jhuJ}G-EGm??cJ@j4%xdUv2pb=t1)xMpR+w!hAZ+P3VHe2 zWuJ3hw;qC(1^(6_ecC?y78ACy0vgfaR}SF$6`!=1!fNE zl^DreBkm{*SR;-E@lx+is9OReStM%Urpeq;32r01ecItIu-&H!T!D+U~9#xfguG0 zjt7CtLcK2wSp+{}++XnLCWl~#KM$ZVnc)4R*D~_#z47x`2h*4RnaHB}DJh;HMLo(+ zg01;>j@uVeIi`{3tTL|1u;`|{w6em$eV%jnlR(L4P)aPafa)1NVZI*gxp z95l8czc2pJ8Gk62DASXmObY#cA9`$8*&0wdyfvOd0SV)|*Ii3n|`kFb(+gkVSDbDQ4ES-0Z;s<<4v5R|z_IHQy;;P*8+HvbLEj;u z+d^7m4^S7QXBwKeRer^TX@$F?+@Q+gi?@bM~k(eBI8?llcT5-wuhJKgH zrlLadu+k@i$pd6^?o#|zgz%1Wds(1Ra}W%rBTgg-V&??y9n@8j4B=)?g zTkYo-TZKb1je+|cm6(Vyz;pv6enEDz)m)$9y~t{!>9A`6yGO|G#x?jUm3 za0u9CW&~cE5n%2D#1t6uHp%-|FZVMbqQ}T!w-fMlKNuu{hYUWNN*=GwkkkVsJ|TH* z^Slz*AI*dTLvi~I6 zd~Gv+&PSiP57e^YFVhR+LRwGKj{e2R_2(pgilmR6il4VYS~9E53Me|ht8QT;=r*g; z8!-P*1Nk$g>pKlUe+OONiZW}+i&F#JOyLz0ae!$DM({Oua_U=+_rLWG=00A}l2^m& z_?e6Twi~>PU!Kb1_?uy;q(XTHJdF83I~l7hxhY?VE%&oNN4CHC27WFF+w|DLin79C ze<#a-@aHr96f{sqth@m>7y;IPZwfE#6nbFZI8M~SNr5X!FEE9I^YAkp9q!5%Wr5+s zS{Sk*3xq3Mgg{o2db05qmXNDxNI|I?&!zm1DXjfAeny~^UI8T=<}g=~v-oDq=rx@K zAO9hu#>~NsFcL({cl>xZrZzO27Q!XJ>Z&QEwgb2E2i|3)J& zH#5H{%^{cI=TOibj?4^kGE*p$@<`=R8i26c0s5E8aOwB(lf-~P&@=hKh#$Q+lnp6-;^4rxg9Fs|z=+3lv2Yl?4hChoV~foc@6QjB{_RcB{)x0-{xN>K(23R@Sr!;cn^Xa< zO9iwR70}32K>JJqO)CYoj1e10Gm^&|KLpd&14pbGbMx{SKmS30T2`3S1ihm$GizW)INSLrFUQne6+y z)g9dF_Y7GfVwK!&5|I0CefK(JmyEe5oh>I9g*y`Q8^d zue$@;FtpMoR@vu-KXP6HSEbFxY@quT>`Sa)KU^^AUM&noC2T|mF4gG48)e1T+2?pK z#7b{B&D6q&gfS7yx1p|A_f`#tIx2`-wh`ZKbN)lK0 z7Rqi9x17dW!ORRRxwe0`8X!RFhKtfo1IAPLW*$dCw8*>nY9-`@c|`Vd%536X{B3C6&w!Qkrg%$ zmi6Kp@M7yp)O1tLQ&~4UN~M?b34;HT{(^Q+d%2~I)qwaK@0nv$xp)-$2O{I4epzBw z!CZjv$`QlPLq>B$i)_jP}#?I2Oq;t?`u+F)ws<8bwytc4Gd^|6vP63nrUbB7BW`x1R|Ad0C2Y`E z>nLmv=2W1cqZ6wj5KLEr0m=)>T(6Qz&hfBBJ@~0p6LGfETNSU9BECmeMZHvb*c(H(TPnhSj_I2J&qyLAJc(hX(0QTV;#l_+l#uv~dk zp>9*ku9hqZFUfeSKq+GHmn9>4KgfHTzAGr|{VBSQ`j75Ma2qdb&CqLf^N0P_JWuSl zSZptz^hjy&g?g@V*cS#bR0lb6&=W(Sbd%9?cDZBgy7`zn?$Gb*>rS=xB=L(gl`XLj zd^$Rsv1=P8GgBnl?$5hZ^`OwsIJX7q{RWxl;V2B~)S+rQVZ|NOs*FYRM(0k>h%dyA`K0ektv}#5MJji;xsCvVo>4aP~0Q8(slvwL4)NwC(sF#83 z{X*_`UmtLVd;qd>w!gzLH@mw11-t*C(INlk-mWSIt>CkbR($2g^(zvqvAyMk-7E+IKKvqqO zHNK*wTW%D>bRA>E;N}?~Bek}#CeSq(r~z*n*}qG&e~3RvP9?+u*r|j~$oVbaW-Zs6 zyr*H~Sn2D!rOJ5&jN3AC@_UdU!k`BnTp-gB`*)tYWUjV!>(6+^2>JQRA>OPc$dlE9yAdxHE649B13b*4-Wn z`0vVfbIk$cADzw*2m0)k|F%cB9~_C4cdzg&WU+OW8XK95K-|F*8vn_dG*xr8huA#nzGsjoC$=^^f9~AwC)C4iTx! zCuvm%Dt$4MtH0#3T;0$1CfgIAX8iy}h_d-nCv(Ax8VTVT$X2E6nA^LD|EeQb8jw z*HvfV`0SPqdysw35Xokp&_^*Rk!=_V{N_RRHu1(KD+iV$N(K5?ObS0Q3Kr_zu_6}x z-LWFNsGu3xdyeOuiT(rN|CDIR^G=JC>+W8+$)T>iQihAW(2s7wh)e6YIiNokJAPcX z!aAuaCKkfhEOo{Nd?fujN%RGeFmqqA?22+65`M0%kER*Rs>ZBm(4YpFq^aSVR4Qs^ zxxZ*-X2g3XcGTdpB34r|`?O}xmm)d^)-tx|j=_v2BO$>GV=Af$a@`6mkM43;)=ZCU zb}vY_SNfYE&#Rzr^HYuqKNpiQ;a|ZuL~H9%tDvyVI>kz3B}Eed=Tq);g`xFjqWU-w` zV*`LuMT)KOKkgh3Ru|FXgkc(6&s3wxZtw|@etgb#<*uTPw1Q1y(&7nyqv*6~y)MEZ zs2Oy;KE2E&$_dMXkUFlUjAAuFu1vPl%Ml!WV2ahUa?N@@!u7SWZ-H^}J*DbB{eEQ+ zpbdT-;U(6y5FJkxd#+W6C}@@qeo|ph)*HM$Z2ykn9qunaj|DEP1LpK{G+H`!9$uY& zPak7)#)XUl)q!GoBX@tf-6u%{*O+;$evHT+2eT@@=W2(!nZ?x%tjbi4$~p>fa>7IM z?@3Pn>Sv)kL8lX9Q+%`n=v+kRA|(7Gza+emcDkC3^T}L~w%ir$9M$lBDUdhIx|4<4}HrX(wR-!2t$Gb$F8huR<`YV!m2-Ikwn33pQ_k&Ll_esFOB$6RPSgb3G&K zN@*}+|Cg+OHV=6NN>9l^1i_)-?m9la#z0-XV>5l)pfrf;XQWU?c(l+HY4<0>9? zx6srh8M?boCRL%s56hYIW0v7e`P&fhW;M%DmP|AcawNbr&8P021+b`ayunUJu+B0s zje*-EGzQvSQNnGduK90+Nc>MQk$BpM`63jxuembIjYQFz+$>SSrA?o=#uA@8S0Cv<=+=6~|q} zkcQlb?Jii*&O5|stHM)$a;YPB>i6(QY}Yc$5}q=s!7|aDJp(M_?>+7gQ?MATZaH$t zDJ+2ZAY%V^guVPSmbsnpF;D$St}F3MB-J||*J7n%xU4j!&`SSZB>Xe4!kJSwo-;Zg-J_h2c+fX{@4$Y7KHO^JnJcpiKF4p^ zRK^ee^ptDeq%N0d)huIv^R(%#KFj^d%0ykwD?KT*%1 z2ZCs+KZ8lzldoaWsyoV@Hwu(Zpv3wSbzk3)tya#1pO&FV*wGz7W|fI^k545p&!L*C zodMbJx43gW7WzX@b;hI4$gWe1IY$~hDuoH%;+3-cl|E6LnPE9=9@>4b1{7PzK!(2i zWZiC!wx4HJr8dg!?g|K6X?7b$@3;#^;Q1Bl)@J#oZirLf{Tg2a@xM{tW|`kvWlGAR z#^TgZ{;xt?irBcDcB2JVjV9Q&_?Oj?{bt!Kep(q4;z4!HMX3$n!5nmwZG=5 ztFx}^d0NL+S&mEp9zidt?;C=Npv3C0=r(JLqhuq;Kc%BIJtP*axJLk$*-CE`9sYS; zJlX?uRSSGJ!zXyDnn=o}Ql_VR8~S{zWVwZ=0+@gh`!vSpHd9Ncf7leQryXX1w-SQd z0;*!`R&VR;JtpUAcDYaD_nxxJ^$wIRJRD-}ZUNb;yDy^%CplGTkG>Rx?Cfr+6i;Ynx*Ej&zz< zeKDNdu5z;QcOnR>DcH2pI{#U7X z5>J!3;~om?-{ri2DFy2>hGNtG`4x*VEX)4a!QI?8fbT><38why=z3y259%6>o#6!) z?pNMkchDU}-b;+q=NL7k2HgR*-od+LC{ON=E4E^OG)}`l!!yL01ztld#2zRk(BO?T zJWFw^(6UzIz9q%>l&4;C6JOSwb#Ap9g%o~M*RB=QN}ng#9`cZzd7wN8=n}H_KH`Zc z!r)5+rc&|BIh9wbeQdmbRfiWBRdbZ$2^HRT4_~EX9QEVHX{A)yhmpg#*jnr#PV_}n z-H8RU4)3Uf@*h{1@~++wTF%Asa??EXnl&z>$)gc&yUfwv!%mGGWS4;bjb}P6RRmKS z;sfi}a}y6uAuzQdU*}6XWOk}R{u{Pj6{512iPaScs*0^k-F}m6BT-)3#SoJW>`&RZRXNM@hur|fyb~*V@5l(8yPm!+iNEMkNj=R>Wj{*jDlyF@O@0ij zag~KKZotU3WH=pEzsSy{dp_OMEOPj<&abj)7h~vt6L?1s_bUO7cp(l3V%XT|84$wzm z<2Q=okz3a^!LH(Q@3I{x4Oy#p)Ui^3e)Q9ZSli9Hxs#jS>yQs*jUXL#4dOX(EV;WbNt1Z1~e#&X- z);Io9Fb1&M^%N+Zm^@nwFNu1aU3WH@ zwq?!B8Pbl*sv}Tqb%28>3?vpzsuRYz7Z#ej$Xg6A5aE^r zC6FG^jX3Igoof8#;W>A#h;<%|hnBdk$Snh~c3=~6aXO&(v4QU%{`B!KO_GJ@NgdZ7 zTDQBy6=>zfQtrF^DV?`nUEJKzbH7KR?sLtqFxeIiJm|AHC49XBH@*Cw`(6jL9Gj=ez^E@%{bKeA^RxVzY6zh$nyhg5XXMO7$WD46Eu|9JL zu`Y%5+ zU6VhX?n9xtjvTqy3AnfoKKP8IIZts38^P}XsipD74vc{&ZYK8o{Ft;em+=U z&sj-$=I~Z;FFI((Yr0W(_{CPgzpzx#iN!G0n0n`AJjZg3KQ?wB$V2On`PVIAR@OZ$ zd<&?-kJQcso|#AUuQr~38JYV&3M?2J?OdH}Oi{c}_cAHWgZ-IzYN2=a_#oiB8|A5X zeMk;4JhyQyknyh&P>o(v9OQ_ohT)^s}p9S=n z10i-~sx>C3I{v{?KN)CBiF?|54h`cw$W)_8DWYJ#*Qj-#102)*RD&06%)TKHm&rJ@ zuVk+l6P)U@1o(d-5t9Cv(oZvl4sP(I=gIKY5`3lxE>2@WiTYAuM|yw#O=UnnKsw{yT)m% z`+d69WgD0?lXgtyEXi4@gIpHORSCn`B4-bJ8b>zB>G2G9FrW)W)5?jb-kr|n+7fHA z@~2T3g*Fek>&1VM-4}Frig5>znZ}}WcvR)+Fn^h}^R4n8Zjv%krkfwSd zaS@_cZ7}rSU=1l;EmDX<>fM8+{u3$LPQS`KwIA~lr}b<{x|6`)ciFb^b_SZa?X+2R zZa#NSIL!59j%Wt8BAger>;T#{543|3??I3Li}^=ee{$`U ze52ROLHp2Pb295{TRj#YobAHbN@))9iwsXAbJz~>$-W-u&nZ$48VmhKK(kH`wNa~e zuR6^vT6%33z}rAPh3#o=Ioh}hrzkP4^1m9I<5f^OQ7JmZe6H~;y|#kME6ZwIm@}f` zlwp)VYi8t@%QnElew{zMZ?MnuYwJOU_XuPXXlD3ny8D_t5_UV@x1EP~=;hg0SAbJ+ zH>urvC562R$&QmU+J3Dg&f0=mpNF4 zL*a+xp+#~Ds8zV9bB5V0UwG}2MRK{PRk*toE8AjOB$sx2V;DY0Z;LG67-1ET@$qm& zd6fiiz;{B8Wv@ss&%_%;PKdKHrbsTuvzsFy#hWgy!b+Du`($sCTqbE1?%_n?MkaY!mzd=uN)!g~$*>BC z@29VXthI_p9;U8imV#AI+ieBd- zC_KMBW0zmO`IOKBTQ_eGSq)cjJ}Wc_f#)MIGan&mg{EvhrNY|x>dj||>bGt_jSrf@$k*+HDm@O|D)=2LkDb$Zm=?oB)B9BN7G^^^JB2@Ev%I!uVzwJqmb0MLNMwesgAt){e=7| zEO5_TST}wqoI)m9WgO&5{@%U)84EAP}py zr2ZVdGB@~A-$>2d*mN^fe;&b-I$U|D{tAe}<0YnwFP(NcgVb*|slN)Z%&orEtE~f0 zt*)}7_-VS05MDzZfdE(D5Z(eYc>EC`LZH(Q-vJ1}F%aH{SLQdll>bhq{tkjAb-40Q z{R0q#$9qf_UpnpZeMtQtllnGzW$y8%zJXP5L(~0C{X+yx>TuI zA3^F5nbiLYugpWf)XO1$oX?Hor|D5b_!r^`1i12sP#6#h+cg9_?eNop@T7qdgjeQC zX}+aj^wz#-m_8m-Q|ZH%clx`j^oKEB@S@WW{|@OtZ_*zDugvpkeXbhZ`n<^WMaOItT6^OxOPo|46op$(5 zr2mFVzZzbdH*&YWe`5MIh#=|1m3R6Ff*3sbTqDz`(+z?Bb(k1CRZ z+GL;xiPzfU&e8G6oY9fQ=t$e>NNltklTXUb8GZGpYeG}_V@+)A8=Va7kN5{n;rL4$ zr7n0yFs5SAfp$1KIujdx_2!>ol+HdgR9V@8sB<#O(fAxRZ?ql$qyhuhk4mld0T^?2 zkkMF)68^O8c3x1QuA~1P3D7C@25aYy?k!9P>N5#2|Cwe!@t_5xGi?G;12C_(BhlXYrvCtKep`jw_!>EdWmiQ^qeT>+F`NmW`+%wvjn3Izp$;rZ9%*l}2 zg`<0e$-p!_+?xfy#>lEyQaChc3e`K3Rke}TklI5fg+{LglYxU!M)M(=FNst*^z%!_ z6^|-%ibo3oQu$Fx7po(onIbz!1->jA2xZ7u1LMiSEEHDU4ljiUE*>38jgA~XI&zrS zz_!d{p9UU{EVLtj!cBe|yk;YJ4C=7M{i8F7K}iN_V82N9n4D7m91UCsfz}=)8rW%v zj~bmxApxU>j$#}o39Q`Z1XfA{U6?_Q&K$0^TIJnQi~&huRn8PXM=>M|t0aZ)aA-8D zAZlm20aZ;4Sjt=FOO>}0qEp^;{Q~ci@`mX1DerHhgwmXG;v-WY?X<(sqU@g@9eGlh zdiq*K$~-xG>*kw7lJ3MQoCAfQ0C0TMGl=`?(fC_ntB8PlbEu=G8HeZ)(DWP=qn-;= zxc(EQ)y8HaP&v>6lTYx0%E`FL4hP1>Bilzu{?9=D458uADA8?@=$C*@5ChFGLz(TP zuipIYkRZ$aAO60be{U=8z+7fqX;Z-%aQ#065w8CPqCxm!1&EJB+mFvW_8r=3ho2c6 zk32Ot^2AteSUH~E$P;6?ZvL%Ln2(QD!fd86pBig~sUiaAZ#}|%b}YD`U^*JO@k>L19!FY}IV)#;e(kafubTbnik6*OV<(Y!Z zP~HV-eaf4P#)I7@Ae3^3D{pA`fEYY}OGx$pz z9>0D3s}j)eBeeSfO}q=D@Nb$(X!n6opuv?lG`?;H9?#)JXmr})Cjss8@sUTzM;
    uU(6qnGa{7RO7uLSQzdvN$ zr3wKJv!+$RCUr z1y#Hu>N8Y*it!1*t7P$!mPPo_RG2GDGjBMO_=EWi3ZqnD7zy9W65^YV5dUllGVhwd z9Ma(+&AdZzY0BTG1WMp15`Zgj3H)VGk-*#dPy%$?;W3r*NJXV?dfrztKENkDt};_m zxpngcq52y~-5+Y$G-@qXdK-c=<0|2b;(ycFO89*UKLG_--k|=elKeY91VyJEt^}y@ z2GnON#=r3i?@^fgUm zH?t?uJQT`IWa16yje1a8gi?ewRTIT-_)A0sSKcVbf*3qT;X@R3+TneHVxP)LjX^OU zzL^?@Vjmxh-4W8XA5m1|FF^rU-YBX;3?6&oLlkt{;r)T4)#R%gQj#Or90p^iV z{moSmhZi4*dSICaCG~6HsvF4eAh;WD`CFMW-E}0Z`K_BU22nD10+hfabAKW*QT3 zxS;A$(VAw2G&K@M3;q%maOI7n1H|Cbh7VEDX@|cI6kn>09Ar>*!8db|Lh&UZiX=js z4kn6j{3R&h${WQ35Q9fAK14yM9gYIUAqK*sD#jvw!Y!4VLjdN9Q2i~@$3vLil~ZdD zM^L7v5-u6zG!xVj@DosQh0CAk(Kf}#_K2!NVX8A%vi$HO<10GfM3nK?|n;lk+MqBSQVq^XN2 zPQ+h=0pwkZ9Kry#6k~Anzg>NRQP|WqAI1M39y+pAEe+de>@<#DZ z5QE1V_z(r1c6dHe^ce`}su<_t6JA)E=>wRjLiN8q<;jp4M4XSH%)&~HD`eoXfS@jb zpMZiZZ%~)2Brn2;py;&2iva3S1M2%K#^v~gkEqNXIvCUs5R^H>0d+V*{SbZv3a-3C zU8|D(F+K!ECyWOGwYV~pGPtgTZzcsa_k}WxnRvrRr`#)Ab3HC?NILe3OR|si3nkasazXSzbd82p?#NhD|K14yM z9bN?##~27ts2ES-6JAr9IR;=JfL(j@2c=d$J8t}EgYz`PGi#i2#A+gY27ZDJuDp@G ztkQh}A0ngE4sQgq^_7uh4Y*g~n>iMc9@3C9>!lyppk708({Y6I2mB>a;L01yJ0J#+ zH}N49I_>aR0ObUO<6RZwJ$%9^Rc1~AqDP46TM!caDczU9kMPV%PPh40BKs@+1Q}d; zBl}dP`!{@uj7~ee3CPlwk&_L$f5JC&G9W#sA!X9iZD~;dLU7Y&Lir4T2^6^Uh7z18 zLbC876gutj>40*Y!7)_DD8?uJjmpevK=cF=od+SYS=L?GFob8m;q($)iEKFh1Q}d; zBdbv9j=+b==(NM<0NL4XLK%m@1PWYvLzxI- z@R)!Pq0niEF94MD42~)lqXwVwg_W7}faobAIv+w}D}?{7ZhIpT7nd=7 zkO(5U@BL?EAiC8cS_v=ocAiqZbtk2E8xgGni6DY2Z$!s| z7(9+85`5{j!*>GFZ!06W8&D^}7ZYZ+mbHk={o6_!f~f3$_{rQ3jIX%m_)v%oPU#at z)^rykeg%ICM7Z*XxEaLYaWX!HNT(fs5D@RLjNEG=o(5mcrachv_d~olC&VovYkG(f zPsd*Z5w5%;o(p2|I1?X2q!TtxKzzJ1@~DA$9(?^$eB2N5Q9yickQC1cS<_R5cme(r zh;Zc%@p~W!kBjgjL^`oa01%(Aj67=~UIt&k6rcA)d^RV<%R$!kA|d_&e+fjm@`m^m z5QE2+_z)tUcK8o~_-bY3Wdrf2@Wr6ZQ_!#aA-1{dt>+G9VE|aOI8Y zP7s5~?L>kvop$&=AbQszx*J}wrg#v&yAwq36VW{&5kzq1jpz{&gU16zf-jwR_-{b8 z%^-RVUKp)<5N+EDqK}B^agYcixbjBy0*JxmX(GXwPCNWBAo@pT!q|*+U0OGI- zk)jFO=KK+SG2Hh+9Oj2uG$EH1KL%M-DIxwHe+fjm@`m_t5QE1*@gYPy?eHi-9BJ@b zA>fNvVvB6Km0rbC9tl8yWwBz=kLvjZs;9FrwVa3oAQ41x<&9_(FB8NEW9vJ@*tY96GVFv z(KwI@BDnHK6aq1LOdt|`>9oW908!0^NRdPCNW1Ks?CcYljz1gtue*W~Gm3DIWwt|6s9Vx{2!f6sjlI z(A0j2nM9NTi6DY2Z$xuJ3?7|Cf-jvgYy;6D29XUf*atm`4%rE!W+LhZi6DY2Z$yhg z3?2)J1YbJsa2pWC45B08g&DdBQEVrO+KDIy5T z5b1=a84&v>L~H}`c=*Dc>4DhihiK=7cml|p77*fz_)8$dl{dsqAO?@G;X{aY+Tj!+ z9zG#*n1OgId|~47Ks?+J@vxi_PXk%gk%YJfe+fjm@`m_t5QE1*@gYPyvG)uRml}Ll z74Z40=TZPlSNW?a_hG4%4aX~1AAftSC64(t@u zN@6Mnkzj%=Z%m^>3?5~~f-jwR_*h_CV=#?{m%oax*(s)V#54{>f(fp?F@-=39utTK zUpnpZiNJLHgvdq%s~W!kN_sqCZ7y|d=|;FWxy7k#X$|O_zCw(9<1fJoSKb&SAO?^9 z@F7Mz?eHnU`1J{quNjO7!q;C*zn+EhYdJC2gRW^4F;2!`f)TE~F*bo1Jf`78jC9)J zZvf-z6C$S>j5FcuucoJGVLUA-#xH}e=?r2#7=H;yxbnvM$Q;3VKR(1rryag=QatkW zNs;R(>4Es8@XcI52}7jJ&-u#@JLSW$zYNE%ZkhzL#}Gjvz?CO6NW56 zxOGzG7Y4!v_=bNqDf5d-O35~#T4gnC#V=d_i3pS(Td!~f4t7arZk>bkWU5;(fPnz7lcSBqHluCF_6m$0kRkT`Gpg#UtXrqL-vRX~|0cxAdXQO4c1Zc&BPt7N{uq@@HmH9l^&HNlE9d=3ov#EF_It4 zgMsz{bw+mDfwjOido@(oNLUpjGm959Zki!3rQX23VI$bq3+kjxR#(hI1i zstIXCB!RJb7hp7l7|9>ZE})qYVxZ_H3Vi9b!>fU2 zr9pE9yfP~V4I7FSoRZp_T}bU4AO?@qmIzvtliHr#`7gbWU6YVv*JxDas# z2V8mM_&$ii;}WKiFP(PyM-Gn5;RY;yEahjI5>pOWS7Ff{^-_<|W*bAfkYPD<2RC z%>eP(0s&Eh4?)mrhYxBrg)$Cq8GU@F5^QQjr19{S1mVg%!HFOSk3EITbu-I;g$sdsS<2uf|KAW3Br|6g7-8r z1?Vq66Y-G*`3;{jGalJGGqPo7{b4X(m+y)~(H@nY813vd8x%_irAw!KDFb&IHEENLKO* zS3dbn9th$e?;-iT0w3m+PCIIrat8EmdN_xf(G9 zKxA(I0DcZ)B>Yn*j4z#bxB&p_=SJ!bh8y6EL7c+yOJb-8hONY~wJKAWh37`Z7CcjS z0ne{M3>>!*2flRL;U?f|oEw=wH!{^g`ZWSDpi_{3MM#ZvITY*TPi8tGok4hKRAr`S z!Mh!l0`E(^0Ph|U1J<2{g)g0`d4M<50J|4n7_fNCYi1UJ`w&9_9I^`l9s@BFeuxR< zOD6`l0MI-)GRt6i9KIN)C=9=$aGHU^X!oovJWn9D;EC-5o)AKxt(29Qe|SAuRB87%+c= z7dmK90d-^ncndKEKynuV{2z#s@IRR_zI5WyF938K0RM&;#w#8G-B|#(BZdI5^8;|! zT%>r`YNUvrY)JBKNiuWxTr_-Gq``}z7#mns9uM`Wbk*Cp50Iwnd+aJIXpI7jqaOlLz2ZZ751AcXr_d2`@B+ys~PeyzL zKH>NpeHii{Y7paN#~JNpI3S6tu8u$6SJiX?LO}CJ(DW8I9SB#g;qxZ>1mOct_f=Wx z2fduY@JT#36EOx07u^GA(@vH@@eaJ_Ib$$_`Ht~b48~eo(ksiNCSQ&_4v^; z_#48M3>x9d*dM_s{KGbNvCv}#P8uwhQUniIQ3MZHWym7SPhBoF4FTZtF}Oe~2f0)FyHD@yr1#%2G=KDuHy3X;~`cYZzDf&|CBBsCzI56K|;K@1AL&0l4m;6zJfVg zSo}ts@S`Qf`#h9{n&C+a4S`Sir(Ow>CQBL_vdHpNIXVOZ;4&0kAfXnxY7OTiavlL6 zkAw_wB_YGrBO%SNSoqbFAGq^^5Rs6C?t+AP!w2}3;ln)3g&*NKnB&X^ezkB$BUlM1 z0Z&F83!m^aS~$e**Of z6}L%qkQ+q`YsmrpD#?$^A)&jF^$suqpLTqhBRcJHH<-sGUHFZ3;78}b6JaXGO>+?f`XuNfjXt<)4bN`!919;b zC$FJ7d1FUhwN`lf%@uyNumbiz^r=CD=ZH!=@DS~iOi zret#jJQ@3N_=FGf$%aHmHl)oho5K(S`XfLO*`(mAH9S+~$%lHpvdP8OD;v%4Na0sY ze&D{CF3LticR@B+fdTkjfe&*_ryX7f=JCi9{6>z%kCx5V2vf3I0Z+#M8HuOtwiy*| zBtz02g`8TWyUCC^OD-AmqB3N4ORrTm^&x;qg;iEbl2Npcr_!k3O#O~pIR3kkC&Mm}Z|Mt0fKBTs8$#stYc(^A(lKm<+4 zf&^*ZjkF-vEFxrv&Cs3C~+FDUU6!U_X)>Zas>bT>7qC#bQi?=1Q>wNqxeuZ zbYgK3%&|O(UoFHZ;jM&t5%5J|YPphi8RDEjfVSb96E5!haXC{s%AspO^7rj_9<*o4_0gQt%r& z89zGzuOm$5e+xVr`wjSnCyY@_^jG30jn2Os_S_uGkVTfC>WMZZ09^hEE|AITaMc>l zZ<2EeKAuk9@K)MkxM~TpXVd)tB>Za058U6PixQI1d?a)>?yxvI85lrLk49gHcTv!n z;a7>{m}FojCJ%5+C4fnLcv{q-B2&aUyuII$IuEOa11;uT}-D?F}{&a4iAwzNK|Cx#0DwPSj*zy-1K`d08Zz*n6xB^Z`M`h!Yo|9SHhW=J1E zBVkk882;l_G}^rUW;=WwI>nRX7eVuuh{mA1zDlzcA3k&@=N(WrTouLML)K}xac${q z4m(fzn4BCXIXPK5F=E+P)pRJlYL)-jq4dk?R2fdEF|c;Hxw_$axp-?DR|x0yDS9lv ziKIuuZ)Z|?&q$$QlqVsVD`^XYS+a0a_he7xAX+aLyU!O=`c&Y{5Fce=q%)xMa2mn} zNl1sC&U~5b;_5)bD5V4Gt=@2j&`Ac%J5oaFZy*w;K@?dn<&8$+%)xY0v7EG&_^CyK zX`&$dvR(?4g(aJJ?U2in!Q~uqfx@f1lEW*(Djqo+zq;xD7J@T$14|Z0 z>MzS8P*~l#ju7;%%0_CQax)zK&4$Cz6Vvf?)ljA3C#~N)wDAKhVDWcOtxo*{uWUVX zoDQH|W4X{9o~3<5m`bRoaXm8PV91W+1i0W71(<(F%kd&6vKm~-a7WF;e^eoc{C}ws zmjGXe_`DTjgDSr7BCKf@{;t&?-(zM>d3tI=xt8enz2UkR7~W1TxD1g{3n*F0>2kWL zwM-{}t^E>!QF+K>!(U%grDcUk<~-IKnJI!B@#rHK!pW zq>w%M8ALc89|~Z4a014N45fSIsy1Dd;1gs)fD^9G0vXxd!EEsT4GNgAU_97h7tF(* zTg7LEb;hRo`NX5)TXDw>T5$X`YtNOL-MKR@c$o8;!p@nyic^`~g-kGPpq3&mB!>;z zZxt#YPmtKfn_0V6%6jk4WOXxE6!(Kd)RloC;|C~>7y^^+?hf#>-vv3iJcuvW5~Hb_ zi@>UB_67KyeI7oPDSuC*J|s{sLAqr(mm?av6dyGbVC;r~F{aUO$V@kYf_8HmkRZwT zl|&EYdyJy6LD&p(4cr4%RjV>CY&TcR%pPGTHuG^tX#I5nqB8jbGJ)Mt zOA!`Q*v+FzbnBGpDEp6y$vPGB-LBKeK@KjD;fr<3C~iiBHSR{^bN1EzxC$StVt+32 ze}S)>FC)3;27GWhEf!6YN>!g7hA+KE92$F8;y+J(jXGBz*212C*5{O)Q(rF-XRKCE zVn$JZEZ8`*sNHkr#CNMkO4#dqWzGVM)-Yi>nY=?yQ}0^=>D)_qN4a7!R^rwsqi z#^%92f&H$9&5eV|T@src1%me&i=-RA+w=LEr%&~Kni=;Jbk<@=ph(A9q#70lTjZn6 zLWsPC1rdyvP{&B=E$TYL|n+Sjtw-D-Bn-P`3_ro<- z?cEaT1Eke_6=C5w9hl8`*NN zBqv)8uEJ(aUS3uE3lJI#&FLXdA?HvK&=_Nj0g2Swyyt$+Zl#qEVBJBgHd$pzX@~Isk|rB@yZ@Ld8R2 z2j-_0Mf2n<>tg)sMv$`#)0W&uq8oXHc@{_5;*j0Jh#6!@4u5Qya0s!BBHsgc&1ZJa zGaODY5TR*-|7_9+Bg$FKVQ!BvknUwJ+H{Unp+Dm<3t*0`JlI^uIEcKT{C0Z~xe(;w zxd30ZMn+RLFM(Cl>|fz?_KW;@9v{jB9}0vq#=WjWdI?i)i*m7C8!(>Xuv{EnU+}Ej zd+_%QL@ywZsw|*FbmlPQuZP9)GyYhCNzUuOLbZQ{$SB{Zfy#0&#y7r}Fk16Fz(jix z+1C95(a7)dp#WxVN5B}7;i)|Nxvf52`wHOTtbhFANaRrSDw&NPruwTzb}4ei)$GmS zPZ%pbz3$w^tNxVsXm2mK6d8>%Bh$+{q1r!5VWKQ1gsP`7zfoO5Eyd6Tvdf}%H4ulh z2&wW<6N{FBGSfqk(I9kqJar?fJ@z{uCk7m}FC|+OV?}k;cZ9m*ZwO?UF)cc!;aX46d;{{u|16sX7VJxu*yq>hoho^;U&%qkRb%E2Sw zC9^X4bMbsw z)BWcpk1{>0f7H9lRH)4#z+)n#cwAoY4UCebU2TQxqCytwWZ<(%r{KG$m_@RQy>X}r$>4?`6t)oF|c>h=Wxh|>M% zkVHX0PlmRPg$g)T7Vvc7vx>#)@lxS?5EH*?!(|zc@yOTqNIiR>_f;r5dnn3Jq#0r@G7#o1<%XeV;Y)a>n%L{6L-bvS2 zprt$;t~o=GELH(e?cb8edEil?8qA`IZa%t>&o4}4)^T!aE(DF}`rHMi8K58Vubk+onF%8YvcyPO;-VZQHcNMwf`-{xC73I~#I=!Z+cz8WM zk=&MHs>EHVVnJd5q1q~$&DAQKYnTm-r)ATnyB2^tCDU~XV`8F6uV*Y+$3jMkAl7Vd zK;jtrpm=7@HB?)T6cpymfU;0G;u~K#;Y-X6vTIVgt-C(9)f@=c`a0VENU1pp39`|u!NV9*BL}P0Eay#2vCSY*__7lN>iikVk=;-6#nLf~pG5#G ztXKIHp*q{Cg-0Xw2d{-8)+C5bNO1XIe_1Vw}t zp#LLdfx24Kt0Mhb(f`G!=jMv+vR)Sy5mJEuuS8-c=g9RI(#M!N$z-ElASvD^J*`Z{ zciYOgfgJh1i!bV((NxXDR^|R3DK$%wm$!1?V{)F#{TI@6DmPRcm7@Ne%#q3anx*L1 zl>=RGsuxx3dd&ZjAG7y*%$cb zyKREJkc@nJS(!pIieC_>3C?at2D6*^(TEQ<_WL9dYE~fbwa9&#oW~;fL%OL_srgXt z8jvHe{h1fOd5^i~Ls}30O177sIdgQap!OIbx)zyw|Vv}9VN zm>z&{phn2M9Uwi5{jkz#!Fbn$Y$Q4V9n*R+NC(?U^00-G!5|$%r1?TMRQeDKA#z8v z`&+oBwoA%58(6HOImA8+Y2u_U3cd~3UN(bYw$3#)4cLS!_eYXIa$hiz(b;xinG>hQ>O9VrXh}Y1~PIuywB07zQD1 zNxX->!03pc!W~|i+{`g#lfeX^rcqazz|8qP1fR|&$aBia2q3#a5w3SdlcM_NUrW{Gt#{30j8BU?4l5IMMJw7 ztWaU?NGurzVEtIrunTI|I+Q5OkVnUay7kC8qOy;x?3eFi_HwyHXTS3-SBNYl%o2rc zMQn_&nP#tD$_5E*vtgcMjI;QNB1w>WX_GbhTr3 zhYH6^-ir1(#)|8Xr)W(A5>IpK6e!WeP7sym+ zzCln#NCEndj0Nk~lAb*nl1@Ff2KF9X1^e$F)*o9sW9LTHWxq`7^-7ut!sG7VINfhxa!3+SZ zC}>*S7X?Lx6hOL~u|VBPq*vy3t)joqrgvN0^@1Wo3eev`q&%(dMx+}(%GP$Gq_~On zY;7XG+pX9oo*UJxk);sc`PXx5zekt~o{lQ5RgSb1n3nKt~Op4Om2Rx<_&P z7QT_`y=0gLJhz=|LA>q!KA?{g-P_L3K?<0CTk*c1O!KvKMY+rET%L1OMGMuQE3;d&+m~mr^S1jKLiZ)kXyk%qQrd| zNvz*TbiO(tnvS?cQ`}I`qh_kh`+;B)Aq!Cbkg=k=Eo7+F{39fh;g9icY|w3lKM@oW zQUK{O#)1)=0Ai0b7N|Ru+?4tK3`ykn1ilS7w@Ln7P((-pq+bvzPm_Ea>0{I>3n822 zX_Dd@(z8j5_-;4J7eJ1DpT`%4WHeRtis%5(Lk6lfzKCSeP}S;7R(XE0Lp5rZ$?u!uL_Bzcq3nyV30*>gARIz%Ja;6nk-ZWaM!L`E|=UdG-> zxfU>ReG6O-obzJ6i=}9H!yG|6wc`p%M`LfU!W`4dkZm;X@=*CI5?W!_D6dLP1U?1r2DEX-4rC}lTP{y_tNcNY2^T{sbX;{LLqkKF;4fAPX@AFlN6G zziYnX=0+!S52BH8;zI$96Cq%X$c3E9-GG7XzKZ*P_|Dt*6ptOXJ+oY8w#5IhoQzvC zoIQt#J5yn2OA`LTER7W*Mh#>Z1tC2WHK385OQJa@aK zIFj@nZHoAAd$btHk#9Y|C?umeMlSsAkCDObNBQvsemu;Nhw!0XU6Z6-CconNs(BpH znx~Jz+CFamX18*_O#;3yhZgVzuT%lTY4>uVj}e^-as?81U=Rmv1z>caWwM-)AvK~v zt<2@8NT}I{T+Tipxm?0rDBISvF2rd>d>Fonoms^PF|dzd*67=qGg;V!w5Je9&U`0_ zIZv{3R-mIuMvd4@rcX<9!0Tz_4uW z3Is7b!An#*RkQo&5{?ErxU9w(tDMnP%~PVve+h=OU*N}c{CEZ*skz>RN;>*sqZWQPv_8Q7{qTZCgGbiDZxQr%E@%@$?-2C2Tu?tj?-H~v7c@Z7-wFCh zE@+UT_XzrDF6bnJ{zcHgb3sD{y-(18azVoceL&Fvf_c8Gcd#js~D1Cv~!aasU~e zpfWfS8Tds3HWbbvQz(P(!Wmp;G;>9Tv(b{dTId2ITyHS0DS&aa!T2&UuuiUuH%s%l z&0yRrFpL6fG{#*9nE1B3DX0vL}Oj2{)ic+z0}tN_OI z2IH9ur*~Y%LZ>eoj9*qbqd+k#J3uSs6@&6}h0|v-F)I7B!FUZ!fMS>!y}xBp-k_{o zXz9Z64%FHF!(hBCYGypf2L|Kc1%pAw*D05xWYM|%6aMtTSO^ODEB zI2MnCMDZsFCPVB5uwt7Bhtel^2{rqKhDIg_0S@|t$pYXa0y_!;QO7+>D<{ZO2ToMq zed>FY(Lxuv>_7`?1GY*awQwvzJJZ53UL1>ut%VG*3TVL>*svpDZy_Lb@FH{|{qA$X zYVF$GFfiIb;?{GO&-V-fvhbE<3$=Or_tp%y1FtdD*So0~PTN9VEX?75$z^1yw||2L zTB5nUFimrLc3J^3o(5nXgCjMAlIfa3aJsXyt8X;pHpmK}&p+LX_Vi@>d#ubGHSJ78 zyRW9*O8-YYpX&3?$V1ztX`dCe0srr&%a-+f`R#v2e6s~THQh;V>|HmHW(mUAK+ucQ}to)vEVbr66u;2UTbZ2y9?}m--Ljygd-J+gke^=%6{|d0a zfm8B>1UBKlvL?%0$T1!3;2E9l@&Z$T``Uvml~L6uGw z8o{&~+IXhUaK@Q>v#4vI{}VHmVc~|1Ebbs^_c657cR;&uUfQssooT_Pkqr8L`^|7H z*I`-ia&3JF8V0lSF{s)pgF_61NFM21RLN&+=4Z3y(44a;N z7}_oiZrp6Tkl@DGo?sYk$j2bFQwIHp!HIdK*X?{jGxxOflMU^#1vhQ=q(YgSwtAXj zusKiWx~Y9uGxs#LvkYz4f}7^@`9hhS=Cai=I44i$+SHn^)abC1D&$HD(z2hGibN&2<{}cWc#5(dsyqh9!oq_NC(GhaeihPJeH5ak9W%8S;OF|d<>o} z#Nc=>!Apk0FY_^YVW$jUH4J{AkHO1@7#JPAZW#P2kFGOX(02^ln>#{#&!BDF5!#0a z?LS)TvpJq&7h37_{kxFVCunhk`{oRWR_Am?NSk>kYd+0Y2s&7Ct7isKY`_8h07tFLce zSNDmr{*!x$2KueZ%oeS`B?iB4j?+Fc&}SiS1(FZHU$rZIVunvW@cS}d{iB1+h6Y9l z8@l?tGksbTXKPT+@v|2R?n}McR_^Bu_z}C5`wEkL^BgDIJ<@x!SpI4lz*6>ROxTTC zT_Tt^?Gn?3VcN1w_?-qnxl8!R82r_9oW{PsW~@o{VYSZ)E8D=zU1HW{m>oCAX~Obf zU+-t64wMa8n*V}O!rEQpyTS17fqe}14h;2td(9YeNQWI3pR@78;VLWVY$!8qZ??!v&n|Wn>(>uwyo-XLhaf`( z-5@AnE1zAAy6?-hb`1_<%`Y#KP|ob5w3j&OC}*&Hoo#i-H7qblbAdE6Xm3AA*D$9r z@uv-OEs)l80WzoMFA_|h8XUnf|IeI%>+6wv28p0NB2ov+v>;4ekVJotlDG7tWml+J^{L^XbfBJ<#n zV%d3&bAtTgDjUI)(jx?avq=iUpMsJ?@OPcG5d0CSo#=``Y9v|kmy;w5{_v4zk#$+v z#x4uOpHNc#ZDaRT^-(xiEiwqC5SqlDy+8*-Wl(k?(1{RM%YA|1YJ_yAZ3sJq9bH2k z=;%HDJ_mV8g2gVVTm>EFLO;fMMy%?*#lqn%X}sLfFs`jHom=F8<1jGdM8pdZtk__XYX|faUSB{tVKE z*n!g#k{Ze)BsFvfLPA6SEeLU2KM*`ugec5b6=KHxX$Yqmy^-0Zz(j#*gUtg2Ct7-B zk*LSh1Oesr>hWTv%PPARAt}&h2uXo1M@UxLl?dr7y8z+b%+F(5q0BE41miRR64HgD z1AGK~lH-TH+>DUSoNvI(%)f?E1^1DIw;{Br6YvN8eD7YGFrT59A-*jyLPg&|Xe#wr zbf*d3h0tE44SrMO1@AVYdratCDnvbBi?D;;E6;#u)aSdJ>E4R>`S?V?v$132P^K%l z!(|oRNN~5<<#emT=f6QDJ3l*P8mcDybPzAf-Q;X_vgJ6_<@57ZbZ0Q$ZkbXQ=RYuD zwgg}Bt3;5NAWf~x7v#(7Ze>^&=nL}Ab|=%{wGN|fv)DQ^xoC0`44-e`a!?cq@*Un1 z5qb!rVquAVZnubS+W&Kegq{OW>QK=yLiJ%T z;RS^1?2%vuN}%re?zpot)!#KZym3JI2~{eNX4v2!Bm#B>w-iH*`$`Q~kvNF56;Cdi zT;eNvOk`qdG7MrA`!`6J#pd&=q74N3hN>{bAfKz1jgs%EO7r5Qs|-=}Um={&MEJt% zI1}NkyM@cig79HnufszLd_{c!)wV6W_{As#pWu{b;MtvTR1!uBE#{NA_sN971)S*Cy2~9Pjy;O*z@|{Y{ zfaNm6h|l*Arh8i?4TrB8I)m+9Bi$R_K1L}ogzESCKOn|HAGfDDwb5Rx(h2+gd@Rrz zB(d(dB`G$1`FvvDHYWQPA4GNrmv0gi29@73VUNCGv4EvE4h)TW5n74Bvt84HAsyqs z2uZKJA3|kph=KhPl8!N?p}|TG4TcT03L&ZTY8@(?r9;IvDnzC3jqrG-Qh%Q$WO$@& zWE7p8-ipjNKv185AHvr64h^~SGQF{L&2+3|?HbSCQfjKI~9^L0Z2r*|Eb3SvBMAenh=sZBlQ_YMQh$ws2 z!xWQ%zgC9=hnrBH3dt-MB9>nn^u_7`!eSuF(L+?T@z?86ph1Ns!zGCAfFVs`IZ!0K zHJXY4XdMb1BSJKawK^?$tO*^bLq%y5I$np0yG&@E4wZD9P>&9kW=v?k32o4!;*Baq zGipZI85~Ru^={zmi!}`SPz<=61iUdbg7LTolrz#s0dyOwI_@PLJgRpE!Fdf)_Jgg0 zTn@$b5C?v^4Sdi|8(n5~O-Or3l4%s&w)M z{4Zs%g1!aEy@ZLK2z*&ng9yoncajbThD>N!hk_#}G^#?>VlTow7!mgoTtE>RcnV^# z8bk*&KtRE!r^|2}uw)s|KuDJ1OdSfGWkP4`Q1BcR+M+{6=bF$~6=JzIBRt;8_d+vji6?FB=^OO@e`^%)a31Ox!_vi$%?`gd`j`kfIUX3Yb>rEdsBwGHQM1_b*SWfDkS~& z9f;*un9t9)r9_NLVq@)*G-65CM3mMCiIR8y=y|e zG9mHaGa+7?kZJFm&<83+d-x5)mN84GA%=Eb!ziBQOca}Rj#D<#SB?u5xEuZVZDkYv z5{_M#H5KjcIDE0k{+CX74~?X`8PJzW59*r~bB>I5=7lU>3jY3baAm7@%8uA6 z&z`Q4E@vD+rYc?-R7zeukZ%(Y!LB=XB$Liz=LLYHEOW8uc~GEYGAZshwtA+99(VAnKl10-<-CehKaA;t|P}io=dhBov zhYs9ayC|~ul-~ZHfm4P7G;i2d zCCcSfIxg4g$4MRUiMZn!Q|cb!#?n8eu15eVHLy+V(%qv&=}ldmHGCBCNe156o$em! z$qZr#i+Q0;uxEdT;Lki9n6#%}EU|Z?Owi?2@S-l?5W4hL;LG8ip|UBZ<$H*He9qpC zL$}lLEp&@8%P7OXa+XQxqS#kKnMf;j;5aiB?LHd6!pD2>4r%xoARPD%v!(8*@b}Nb z=d~jK@!pY*A7UKxR1(H^sM@@)n<^_kj2vXTubhJFFm-O@Pt201ue{1ir_924P*%*p z`A?VaV4VkG#N$5=o2_AxQOH6&RXX5cz8Y}m!!j{W9n3`<%QVl>`pQoNM9a89r%&-! zpq)CrTA+FG8z$l$s(38YxZrmZ_zNAW{23>0Epd@Qtqbx!f(9s~m zTCO8BzLJY~4RYmLiZqrjs&T=Cb>UZSsliI0YNf}l^g*O+pS~<7UGs@s>FA3M{)(J* zjo)geQy$GfVWm?Zoqm*?F4_#w!cvEWz@bJ`jH8?#E?#*E5KX_bK>BK(u5`E@@j=iD z`@lCfbu`k*`xuQ29fkx%`ut-Hq^I3G3mJHlmh{4LK!y_)eV>b0&UUM1=-25=hDO9mYs)aGc$}nh zAp?168HU|-Ap;N8lAiTTJ&Y>)lU+RF3$zTIb-I$F331ZeGJHnyI8Eb12DSw)!{SMmyqAK|`XgBeuFj<~%-K<$bZ{mw!BF>o4Ax>WH>A z#N4uIt!s$ld8y{9%5xdwx#hVWX)Mnb8h2t*MOauS^{c`@H@v?e;U+ouxDqsu(=yP% zp=q>V?*E7}-c=&K9hZZ9het9vs;0&xUzF)XJar|;7>nc><7$ykUXBxV7LWG#V|vsx zd!%c_5u%Kq6qc>+V;Jjg;+U}CjPtI64Al>{1rP`Cepn69@MuY_as)h(A0BU88EuI-?hvOT(b?9)+AFIs*}Di1g(Iggqa^8k zS+cHHEzAo-rHRq>jY3t~@wYDi0b8n>ruya>qU}=!kTl z4xH{u&pAk_Y>##ya*|!$8JwU~dGL_mfq9MrQYM~#o16cDoXD5;S?i1nyI`pno5PRh z@SDJ6*_JwDXJlI${N_Yx@n+!bf6ZQ9?z-QEP2B=MwAq`fO|)U^OplqVFCC_ibeMY3 zVU}NqSzaAxc|^D-uW##!)hpK%t4GDsH~7oHp=r>!F%SNmfi%MI(y$s|MJdt==O6nh z{Y^dTKjCi$k5cDu#p52$W1^flY+*X{0v-F&dllY&8c+E=;!!UyuHU&|;Xa^o)fkny z)Eo8X;s=~D#!-$3@h$XX@uvJPuHX5d!hI+YF7;~TKCEyb(YUH?92*l)j*)%N4;9{{ zE}j^p2bJ!B?52w`#!rY3dVW(kk1-DUA9wLQWBi}#bXBe=5a%Cxu*GvE@pHz(<4KK+ zF~&)N6e$^=GU@(u6IT450gQh(zh@Z-zvm2{tXFToKIa96_oBh`mm7JNzMdwIk=5t? zTG70uX_Oob5vR<=mAdsizg4&|Yh1|W>eC8aWzjrd0S$HY2gT!6%|qc5uFI`)|EO^P zq;akJ5!(Z0bjuQO{-W?-*Z8W;nlEWs$A49LZ)!ZN%wC>;=WT`ij>eszx1Bd95*)~N zB-hC1?#9vTS$FShdW5&>@RY#bAxK2I(ALEmf^j)-E2p@Fbw12{E-ql7qSDHs zVS4`ek*@#MI%!v<`7}I7j&jzU6|Ld5n|k{<;_TAwO>R!wEoNl&4^a%d} z{}1qY1TtX_QD4GiS*rl_vaB6inbdK>`Crfw|G)Sa_|tq9JY+*S@%ing0Tk0Q()jQ# zXb|RU0UfT=;ryd|&#+iUU{|s?DbhTZ6*K>0=4V`Dh2yl(YaYPL zzZ#P;4P%`7xoPE2`-0rG=}!B?+_aF>erRsmflm7(JB_tB*HIT7w}EryPw=OiEytzu9RV znyXq8_0f*_JS)B$@%dK#c*GZ2@r{Ttvf_h?A7;fjW6ZbNif5f&U{}tkP`CmcY zF8}L@FSPQ17x6=_`1?+>SIavQmh1SM`bJV+aDCF7O%iF%IE{zBe^oD&krwi`;Q5H| zQ*|1x{zl*GO`GP*aW~_4Gd|CaKf?HYH~uu^3*7iCj4yQK?=pU<8+ZJOFLLAMj34I4 zLyXtD@wtp2?#7og4sFu=Q@(Z)pJ(F7i}-vK9~AKgCY}}Xg(iNfh#xBAQ^3y&ti<7` zfuUq(11GjdU$omBgA&G;HiX+zl!58D1sgN#MmOkW(e{{rcd!LMynd*wABV06+&Uuc zI~J^IXkZhen%^S=7TesN85H+O1gX`Y9{0jE`L;56;ic$-_Fy^Gzo&!V#R-oWMsLE! zx@*xRyfuZMSFZoEpQnuU#Qf&?rviBF38vy(dVgOzJ-A-0-CL(y-h3KqEN}h^#=&EH z4lex$|J>fn@61rR`)J&}Yd=^%=x9#HqK#q*vtYjP<++JVb&s>3=4HvaKl8C5+ zY2571o*8V9yuPDqgHi{1Q?GNFTPnuumSQt|!Tb(!z>D*5)+})+iS)!N{h1+kc?VF% zi>r?1&d4CI0%3kBtbu8JAq}tkjC3*4%6GccbBc7e=ue>?98>j&A+`Ruuam2Y9cbs{ z*jd}OcBF4(rf+b;d~B@Au?kO~R^#tQ2t_SZ2mCifjYVp-mh1BN&rQk1(XqC)tm2gH zsJ&^ZTUykChL2ipz*qv~%J@iTlNqmZ^jYe3cMW!R^V*uI6Q)gahWW78wlc^NfDR7= zFZ~a@Vcz@-$$*x0Fz7fgOMsX%@ldU5DPqRP@r`R~K4%W_iT5cjyBhWLsIO=VLI|HT zPvOnicxs$SU2^8eZ-Fn$9B>vY{6jUq(Yu@HVH#$Q8L12Yxp`yfM)9i4gU@`uWePZp z75);9Z;dhONk~JzxOxaWM=F}7ng&0AtX9sl+gqE{ooy@H606!^QF1j6Nr@F|9TYtr$yct;#-UPs5&s+Zp}IBkiJ@$i5P*E|})szcKUT{!7Iup$>0Ym3&m zXqsX-y)mAW0LotCrju7}b*!PYgJ4y*QWxIYmg;P8Pb48nx~a1bE6s^EQRWFQPHU_+ zkz9kKw|hqf@lZRSQjY=~A?&MLV6@=>2&$;epeDcjF9)r)nGVcL1$1|IA`}YkN8w zQ~L!ff^0#L7S*IJNu5y$fe(&04|3~Udr(@s4`~_n&OM|B0I+@+_f54dEBtVgZIZjpL3kTOKUvK z)1~m&X?(@ko4?QLQFxggJg*n^IU5w-MvaFuusoDa!%nbZQVti^r(yZmd^(cR*7ih8 zyiM;enK&$q_0q5DRXGL_cRjYx8Dt!ICuzLwS3jop9F}CdGnmZub(vWSwU}=`hZ_06 ztkGb_%0CRr^*^l9>{uhPdLD<33upILRUUbJ9~Q94+(T$$(QUr{LRIwSc%abE<|Z z9xMZSXv;fI@%XI9vqq|3Yw|mvSGcEZ+`P5jtoIAkY2iw&xT@_lH2pL=c49tgYyG3c znI7Sh!Pf_!odrDoFX&i&^6_2y(Rc5LanUx@!{sm@?8>ayr?t+89OvNg0|-OiohjsU zSCP*}T&{EaHk&E=-YmU_6mxmkU5cXJ9U&DVMId zWY;OOUQ~IF?gaocsC2DcBul-jbfY^7*oM<^!oIZLkZg2j%FjfWUGdOmN3txNN;mRL zz_zj)$@@N(xnnTi-#gOF$5k@=NgMsRPFYyuard!fFqIk62y#hakZ?c&ICT6tOrKD=`A`GBE;Q*}AD zA}ssj4)HQ*VsvN-=S7-&*I{u@+ZRVOc&Mg_myBXqTszgWJ@%(~8pQ=!JlRiTZ6q_2 zalyJyxl%=*3GUjEpQ=-x-o~99rtdH7igR4GD5Dl`u+IKoW8$W+*q?!}0k^xQ+DT{f zP-7jH$1f#rGP4OAaV!gQm2Nn0adqJO3`JvsK;z}t*gMRN+k&Bo-%-5(qw`VvRQv?U zVruH$hTDvFo=O+d!NI;$1(P1gs(7=H_UIxy*c;mnxLWsk0`+0{^{$?R&L2Rl`MjEk zkFW_fPUM(^v`2y;M=gJ}X#XT>Q{rxF$AEh0#kFhBBI3ib&6)1e5o%38GgOA(vyx`z`c;y!txNd)8jF%yUF9= zjnR&%P@l+SiVdgMl+O3C)8lf5m@<{y=}j%sWogQv?ntB)^~<@;qv-dv@!C6*5>0Q$ z%6hA?aaK1b(>Rs3EH2lWrrNMZti81)qK)m*j%KCHy=-_gk?3elG>BSP`R{GR)rwrY zDc*ubGE>LXY#c08tzMHhR=~1;Vm#bf0^!qbI4Uic#HqMcEUizwebRYk0TAD8x7F#8($e)wmj&-qkt3LDR<=2>uHtE&CU=Cfp4b`wL z8B3|wRFngcHO7sF73aW`v6XR%BjhZ}fq`qHNm&kd!ae0{inp0Fj@wW7!V(?LF}B{a zBTB@%3eHR4g2ud9IN;bR)-hHs%mWa$_wnp);KtElZ%?1QO8GWqc?W-I;h02O_JoOE zU&>`s*nAuP1$3I|OyV$aj!zXhXqIhgyFe4Qsr{*dC86`A0xDYVQw6*}h9;{UD1D2p z0qt7_js_zGfuZvsO7C0#s0$9n|QJt}r^x@h+3wT2dI+A!} zbY(Q&Vy(GrA1!d$v30CzkGV)f7VW1cABv%!nTtrDr2V$Q6LphXgD#^zmK3MNMg3|Y zE^r{S7eneu`)`*|XFFZ6T{qf)3mgg7H7sP-K3wNxaS(9r!v&n%1PSz(N=I71+K($9 zvh!0dS^IARTNz8no8qy?0{YXwT;R$)c)Y!Z8y8YDvfSFI3%tgdCqM1a1&qo-X_;Mf zw5_oPeuDa+VcU%8?%F!A0fU|yn?i}UXh#R?PRYNIjf?6;2a=3&!$p@t;q7bVHMGEj z8lr7-O${4O9i~n1XXC}yo|S7JLg)M2II?B4?-8=kv|-8UDkFw!uOS;Q`pd=`w|1Zg zL0@UZ<#;8D5tkXKg>ASTrliqij7P8X!du&Miy_Tb;)XTYXlaPWS7LWd$x`jb<&Y=M z?JD*idJk+?J{)Wo#d7xZY6{}XLg+jXD2SJg*<+sr3*td(t?j0~k%D-*N|KT%^A9SB zLvOh(iGi}v{lPY#(iu)AG-=rn@xT|ft1-5qoo&NXP@ud{B6OOo_c=B$yhOd8$ zQKwr?Yzv>ValL#~V#{!qTc2}nT;XQfc#^n|BirRX51dzBJnc$5Ls6djHm)#YObXgt zqVcxYcnZh!&;UhSSYYF|chkn>U3Ll zWj(yh3KUY}Eb`#Ql5kmKAntYd68A6j^91bEd13Pf4A02IoyaX&ScBrZK){ydg)J1YBl5xy6|f`o z!WIeG(!8+41T2~tRx4ojd0~eOSVLY|RKObZ!s-PqmKP@X#hdcNq~BeZ7be?vb6!}J z$Sm1Qr-PAp4{b8O?wX+a(rMgr)rtYC8?rD01VST%4eiw->#M+B<#- ze0oO*%R^;J-HOm4(im##U36vPK8NY-Y2yuAPkxbxk&~Kz21K007CGu+E5K5LknO+7 z2U36uTc~LSDz1D5+V*zf(P}%2Qpqvye0a4~^ELtev12)}cqIMV|EbxVEWcPr6(Y zqmA>dFSSx6wL)P~%d$(;osXTUHB$_H_7%6WufSObb0WH5TNXQpH173xbfR9BMTxZb zPA>9U>3&C~!*S|lU4D_S8iz~^N?g+z*cS9%;|a11B=R%{ouFl(sA_etXbaBK?BuoPzk8io=nx>abw ziB%kLV_+oQjBZawE>5f-OXTf|_RjX!Xd8AJ%&4T;;M8L+V9;RIE*y9owI_gD2;F_ASp(ZICuY5K{PvDIn;Pvui) z@Wgd;PU11YiZ2thd2Cy-eNQqth8O3BdRbB6Og1=hT6i_VQiZUzDF&_!>MhG22HxC( z%jtT*AgwnB(n?jjZp#gRD%uniyC5A2wN*ly_cU-CJ@1e;QfBmN4J$N{3WKvO*1=vh zjc!S7W{AEOoewvK+`05rgO8KF^_bGtCljkUa#gzA%fQ7%Rp@1Jlcwuhsh4X3SUSd> zPT)-&hu0EY7R3S$M`lnv*ABGYpD?(%7S|97)(-Mktqscr;z%ssAjl8Y-eNN7*_$7WBS~f1pP2C;R)>*eY;}8FF3P4c zO_4p6-;uBm`hi4KT1>iR=OVNfP;j-dh+DI2fl`fMf;n(|eo>@gnDL;Vd0_TBImU1jCb|txCVT2q4fF8Cfh%R@c%MVk zCUN@!9f6%^NW&DZ%2S-yq9rZWaI^uj-i3RGOwZ<~&zI?r&*UZXanF$Wjz1?IC(cBA zP^Gse;8U=sVR|1~Hm5X)4)+oTUAaZq3FB;q{U=k+dIaQz6kOi&$j^JJ%Yy@3j!0S( za&6w9b+QVo9cnbHW=+8?&vSVB6G*uTGxaEDagDL2D6A9`$oGcS=n8nIPDKySo_Tfc zB3(P$L*>O=Fdsc*hep-;8apuj7A?$&XY4`i275CY#+mUK%V6pqPKAPb$jN5J9 zA}U(;$9JOn6u#d$%m%Jn_a~6|bo^!5y4C3@zQNIlBX!-I23N7|VP(gRcvs@?5W3Sf zQUjQacBI=nQ68yL%tLX{Nv;TE4vMf`p@4Suvd|;|n!>FUI4tjC)I%IA=<$nI>SaJfDzoBuJU3Grlr`!z42P zNygDLq|o>@fBc>-1~yQQk_W#QiB^OjFPcn7Ro(2%v<8{LeD`CV<5o0eGy=1uwm;Kb z+No$^)iY&$6%$BT%{aD$cn*s3S&U<7WanSQv`(EU*W58Al(+ zku2CLsbpEU??HY@lEN#`E$|yKo)EG-A;c~HJ4;EkhI?@WpPm>gy8jV0{_OVcNQ<{{ zFs(kD7H3;xZi0@aXfb zd@Tn&hRDR;Eog|hbE35Z_Y&cAXpQKr6<;HUM@-z!ygkw!o`x&_ z)!@OA?4!6&QI@?}tz-F|<)*ErfM(j7=8X~crn&am9l9{`@$!ZtrQho!&Ptm2{a zm$lTRnt4W*GiN#cRCNR!&4ptL0@q(9R=NqhRl3L839h#79rBB|t--tC?uu^&Qey_O z4E_-6#Ua{QGde|_U2`|=^1xK7Kb~2|z`7H#A!3a?4uVVvfh3(J!biq6YUCKqycJ7b?|{uSL+RFY&10}zlzapL%KE9fE62HDWA+V zl|Vl53c!haaNr3rz3IT&8?aXWExZ8oYd1NP7A+lkYslQ-p+$pV`zk4hX~`nZmIJMr z`O1}NtWTCH8~&86IkJQoTIr4rRf6#EXq9t;$5rPLeX%}cuY9f=$w`eWe|#!%d0#;N zCX4aY&nX)C-d>FUVB>eGbJ~v6In>KV82A=!pGNCbXrgH3*oG1|nFB{xiGes5eBi;T z9bXQ8X9qT%uo0^@>i5FoU#J^pke#$~!th-}nLE5#7;{h1P{SM=BA*u|xaW3(3x69szJ6yJG06iNID(=ct zr&@Lg-^hVH7ovr#8=&G`cocC=)%rQC(zmNR*t+{hhc~i=9~u=e=Qeb8Z_Gd@?NfPE z6*r>fuV~00XqIz5z*8J;&UC28%W+d2J^&lsTtmas z9@gCG6)?iVj=ngxskDUC0kXjtq=DxV=fkl>plEP%U?((U{kA3A;Lde+hbE0vg|Q@# zmbPGJJ_)y=S_)1k>~g+XhQR=IJP#+keP>MM(mCf;u&lC`?kR=_Sj0|F)W{B6pdb`E%yel8n(z|Y`Yv@!P0J(U3!LNK_o6O(B@SGOPNmu^o)^YwoHcr8f+y%Q(?^T$Mz7h3{zQ%^M0#VJn$yWKgh-3GuUsf} zBgYLoP5Nv(UXW>xI2pn|L+=QuAX`qKAzt>vrjMFAsXk-A(h){q9iS2WJ+ydbwS4K4 zR*QR-1LE~e)Tep3R{2uin6$4sn$cLDd<{Xq?y#FLNvSu_*FYxyuY6bDJV!Z>1`S`4 z>H=ZeI<0@6>y#4}EMtj(RRt+n(H zPf^bcxp*C?FO#R&9uIfx;#gG|C*uL1vTU*Lld{{feJXb0J!cJ}f0c|qOtmhCYBoEW zE?jO`sBLaxS+GFE5?2qgBc|sRI$f+1p!3n5MyHE@$>75p6(2l?&UFQ~g7KGtPPb)~ za|C*$*9}|@_9(R+X&s>HWV${D$M<2mpOl7%;E5EHaYZWbYVvrc$;p+_q`KFx)@9_{ z&gZp-v=5w;8R{J7yK)sh~kQ6cpmWNrZkLD-OnljL}|sUMi1yYuYa@-WkpLh zuh3Y1P($Cqa7NmsY2|#ImaROQk?maT>0t0mXNHFQ2f#o3pxa-GV^d<8PW2n;uSA+! zU=^A}UnSC7#Y0(I12Rq6P7}s7%Bq42mz}*h>!tXjuM#{O65{Z<&@TEYk%ps&QN15t zqS89sxPdQgr&OhJLdr2Kjx7qyIYC+u-2nL*)6of9n_d&D2gUD4 zrPt%<9FUhDi_#CeSHYDRWdEhK&$q1gs^TDC&tnalH?);y)&U2z))8FuHgx+l&)#8~ zXP=}y2Wevb3?5hLu#)j5#F-Cg%otD0@v!30_n1-(?fOTgLMEwJZpmH^i`0tl#Ct-THx3kT>Ie zS*Fx!?%lvsxOiO{YWAN7o$G&iIk3R%!o|}*t1SH`o<(ibEm$>vtWIJLRc!O=agFhE zgf*{dX;n6YzE*lIncmPzy}(v5bP=}ldE|rHtMIu%k+xzbXj?fQcvWz1$R6bGq$e;a z#duP#V`4Wz)-ZBuk6kR4*Pbtzot$UubW~Q3KV#1+!w;*o%t}5C^|v^_}vfC-WsD-6nvy9ct+bZK0WOE=W(matvW##?YrvpIpa4csnB<5p2ii@@WJgA`A2 ztG-WGD06F#H>V{{a%I%C9xpuB?7~VNFAV2H;tk?JljiM~Aua4drYl{EvZcjsAem14 z&}CNVvD@V7H>rPHCpmCzHE_e6Lq2sNTJ{zV8EzODYVH|orbgFyg%cyx8wQz0B)4>qs9DZkA3jwQx|`Ay=d>>;z_a}R2#wQF!?Z|0Q5 z`X>D1CMvrN-a+>jdd1pvUP1M{CxNf(pUqR4=9i>s0eSLo%WNJI)}i_p{)Pp&GsSW^ zY0$42`4x_}>nV3Efn$E_OX0i-KAv%fDj(mP9JijvzEsiiHCv7_xmqveQsa?%;I}EW ziErDOev_}*uIwEe8SU!BO3Mh|5{I4?AHEMsK2je@w|-dwZcoHRj(q9uc)paDJppqk zjyBLSTzot~7XOC9>KTUG0OjU&1_dPEn;)H$_r zbOgUji~V-lw>1q6b!U1^DyfB@@;{a5 zgf9)BAHH?g1>p~?zZAYDd|UXA@K3@&4gWm+RQR3nd*L&x&aTSN^5KQUJu9Y$D#KNS zCyk7rHR-ZRmruH4(v6dDo^;EkcPDL|^xmX@PC6rWX6UTYImqC`&_&4PlF+50%aGMo zp)ZE64qX$vE_8k9hR{u+uY~Rh-5I(obWiC1(1W3eLq7;T8v0S_$DyBu9t%Al`f2EA zp(jE=4?P+BMd+!})1hZV&xW24{U-Ek=r5tSLfb{%DXD>sl2c9fyxIfAF6z$^3lr2E1#%*vhumg7b{el`4B_)p)>^s`skiullfRd)1lMTdKEKpI?1Z^`+HURDZGh`s%M#f35oV>btA&ul`Q;gVo=w zex&*b)jz6!qWa0|r>dW?{$=$`)h}1SQvJv3KUcq5{ciO?s^6>rPxS}YA69R#K6BPt zv(A~db=C#5E}3=ttZQanH|y3}x6QhJ)*Z9%ob^d(TJ|p3_8v=d9CmO{Z_i(Qg1+tB zVOGx4^>}-1&fK||`ml&EQs(sF7oA7ohw%@V=LCG8A7{>Ux_kSo*KZK%XmG%JKR?cf zK9SDF?SOA=buNsy(ds(8C1i zc&tfn-;T$Lx5U4G{L!`ly?4^BzrLgO8`r&ff4C;~!#!8|oT-ya9Kzo2^ueLaf407v zLTw+CtA&Z>vW!aS#QQJ)ZqLD6>Xa`Px=?y2-XV>+q{K?H{uw-_dxBbUKkWG?3kgAk zr}R(gX=gf4h%fV7{|uh01A=}~<2ctnV<91E@KikzdfBmfx+%wehzFI>b8HA(R>!?dcs@JAdxH!`3zoY}z!6SNBd` zyRu;|*EELLwx$rAw{Xt9`E%wUT08%+wd;EO*ESCfkKl;!+Rcj=uI-*br>Czk%rTrZ zo2N^Adi$K&>zyW(f8L*!YHp0J-Pn^^v=F~7HM?hE*qOb`S>Vi0Y{1{T`OfTEGm=_6 zoY^?oGke*o&g`b%k;J+aIDFG#cJBxe>>#IgqrH7SD9pS=g{sovJ`BtBj z0b3N{)Wh=R!Ew>&45A)pV_|Oq4@nLV42{$c;`dVqN1Q#I_WRz=3w$qbgni9Nwrj;o7dBeTeKUUW z*$Y3cTK&+uo0s3S<-6bfdBs4*N8zr{|MC3J$Z(Iyp{cEV#%rtJJ7mJ(zOS5q==%>> z{A=n*$zfE;KLAfUG?K=^RxIR*jBfqn`s97Vw_kqfmYVI?eqrk^6_@Vyv1N1$R{F4a zDf02((i^V+{J##L@&1fG_r8DKOBL^Z^a5Gz_j|FstnauLXZ>!%mci;s`^^>q{Al&< z{=RIv?^93sZvS2VhgUta=)PIgeA($0pFZp(sc6$$m^G%?!z1EXWQOHskaFL}*KGOc z&qnrG;Ol%XSbojr7gqeF?jz=dnjRQBRrBBe>^=*ZpR)PB(YsoYD|$5MR9t-2N8zte ztzuPxEmqX>(2-aEJoJ~}e&wArzx_=A%zuBn;;2u3lq^O?HK=oK<-V6=r+)vicYky5 z)d&1$IE}Daqor46jxkS zzO&!(>&X~rTkc!FaIb4WJa$^g^oesH_{rP}pPI6&0!#BddJKDOpr|y2D-6@n1%FtH zKp#48XUZexK4;205O>?JV{h>l1&Pdev;UXKQ?V_&y87|*fWK-_->M4VluyjSRLgoa z`%GVvj}&~B`M;$2D`THS_d4;BxyWK)iLc&qu61nu?ZiKwA7ci;YKG@gXb_YXIb_M_ zowH&5?ZuCOf?&cUbN$Ygh$3)vun5i|?zQ|_gc+73nC&S6jsl(SEAlf3J`{Z>aYI%3 zI0Xc<2=hHf$RRk31m7mXy@ud$Zy7+L3&A(1&nCt4YJB|7$aJK)5IGd*km6}l%thVF zQZ#r<;pmFvCYO*Io5V5k^e&ER}JU0UCudna~ZMEI2a%MZ;=gr2)Zw=!cT*f(C zzLMBa5PLe#%t?vo&Dr6T>AG6^z&L@pOA#Y^g%l&`IS zk)$8S@Dae-JSYIw(3C^!d0<@=KM3NhNqiQj6WJ9Yu6P7b4NO^?L+p8VT@zF2YlP6v zAa29q$0H0Q|y|S@3jlp_A}Cc9<);GjXAXDd3H_62i&h?roW2gqiVV)?8_zO zkFMjl3~?wxlTzO6Nt#}cj{%TMc?U^a;3;>T_DiIFo3vjBZLuipm*-fEsPcJt-DmOX z_Zvv^+6sL979?;V$aD7Ve#a3rkaQ28^d8>iZ1EQb9pG>(a}z1%rt#4-6CY;;k1zN8 zJ_VA}QfJ_&e)WKsIL)Xpdh$*_Q~}~GJ}2m(>XbUQ&*wgnD<8ql9-y(fJvaGL%}+cq z>3LWcTXOob(=31FO|UKj(ZsK-H?e>r9(2gg(cn@%ApMCw(`k;RarmeUXJ`ho)r>9Y zVH9No^ihVNRNOKA7nl3F7^q)H0v(@|FLS>C1b(oI+nszyM{RhbV-&FRskpJ8#82Oq zI+t8xzetlkT#E+%ITwBrJ5@L^q~4J6yc3gMtTBDStnn%aC-GLVabKQv^$`N@khf9< zt~m4|wwBy#nTA4?Lw6{H{YVK4c%&#q5Oq8XW#I}Zws%KMou8n@qO{oE5*K@M$6Y-I zB+4ynq!bby;gvS$Jw8|3THq$VxcW|5dft4;MO*>Ilb}fPq=|m#BwMdF#8vXAf9}2^ zGVWcAY)qq02I?cG9Oh9eSAIXVa&85-c*UhYXDWUJ+pACerEOQ4dx7t7!B?DO$7Z2? zU?AJ9^DP4W>}|Z#QsAO{c7;Y|X@+!R?e|{X0{bB3X+QU|>g1heR2qL0EclgW?se5I zzKNm{^DfD=XvC$?{ZEQps<^zF<-urCU*$;O(_05QZ}_^^Q04@uV-#;rpllp+wg!Tw z^c39q`6V(5&ax1A5__v(BJkeZuYgeIluX4lx^2tQS7AV0%#=N+${$&C_AGUtLvzz@ zEuHhOnP_=J>L8?E=dBlWFTt&pVkg)5H3zd|5i;hFr`Wa}q*nTG% z-OF6U(p8aR{z>TgC(?A)*)Z39tHJ+3um0_4b=^t~1Mvi} z#o!c+)k{qQLfp&AIHSWYUsMmg4QQUYrljsIW%+AxN@c-vZU63Nqb&Edp)nEYT3?7ND!t$5#ObxnpypB^Wo`hf>`&|C~j2jPq`5YP{`L0}Gy z%A7+yl@;UraJY`Uasd!-ff`Dk8961&d4Aq476&);a**Yl+?{fQ}A2$W9o7GT9)KWI`qZRCEj>KxCDrF0C3t zk!r1VX=^vDtyODlYt`CLt3PX1tgZWQ+qW*QwVPJ$^1ilx_4oZgXSwH2CgAY)&%$SN z&Uwyrp67d>v!8qJxg$+(&1k3Im-BNw0_i?pZf{NSCYO3uV_Q4q;ssP@v40{6z*c5V zW^84S1L%di1?POB-EXn1q4R?x2i;li3!V+`UpRHo+|=dQw@PqK3d)mrakB2I_eCCx z1TQ)wO?4i8>6ou%9MT+rx240O|>jPud%r)fkDzo7?rXBa_>Y{pmiJz*B=oV`h0$?*Wb<74XaQ zXjGMI^dJqo3*i@COT43kA_CuM@YB|Sb6k)!$5%vreh!S=QHZiQ<-LBmjMiVOv2ex* zr49Pth%bwy|6`8T(aXtomf1H#`nG4+dDNw1*{nC$&AUs|c2u z%z615Kf6Y|=!Y%1&M)uq#HwFi!2l)De?jtY_WlkZA>j`XTEhKamS5v& z={L$c>QBN&pV(Q(oGyHr={MBtDz@zSmeVyrR_cu%yIk$0o>}635*uFnhCX}4oO8RL zY=E&$vDW6`Kh|2D*(GD-wKOiEx0iTN*m`c?a?uC<{pvmjVmq?)inTkx z8G>(4_<3!C_|aoKyf@4@JG+=|Fo?`ow*d=uXt<(MW$WJz3_hD$g0pDgk{%^m=W7G<09~V5&EJ)^x_w%S*EWPsG#IP189FO$<{R{jsebpwadpI4xy^;! z(>>r)=yNuMF-6sYSB>wfRn*UW<1yRUtJ zeG#3%*-xXE+ZrkR0rG0KUni-2cF;D#?#Tb3nQy4$kf<++7+?MMfeuHdy@}OJ-`J=g zOodT(hki?V=P>T3djouz_zO~jUqs_j58kqG6!%vZ%;2N85#dvW=mTuq;q<+7jCn+i zF>&CF(zr`=R&GRdqqD@@2!p9x%?3RQ;L866)ox4;@*lc|y#Xe#4_edkrQIi=^TGEP z#IJy?_)qxF&c5M1a2@O*V?6CQIS6?0 z_Z9tuKMWQv)U%A~b2!bYDe*4WV@>wGj{a!F+2r$1ca(j5zuz&9g@SWr8>&{uu?KD0 z>M!{CrOVbepjGF*2GiHivFtTlo9v?$=Pq`?MsZ^HKQU~G>lb#hxGeB^FhZZD*xrNB ze0w{Ky@Jrd7*GdlP;X#Pjwx%$cIZc*17qY7=)YpJt#8I``=J}0V?vVfb!vShuXLLZ zobP#mMe6^r9E;_;@87rD1my2QU0>{OzuYD!&tRmaxzhZoSQhJi7TdElt@BFwz>RLD z_?0ymwmR{Ws`?^@^Au(nb+bhBcUwbhv{7iUMuGBL9p1y z*xpND7U6eYoCH4=-Pe1t&~-C(VdKG8BbnD@GtYJs>{O${7QiPISc?q$LZ{yjCL__$ zeG92^%KvDAUz^xc&rtn|bDN?+^JEMCy6RAHtF%7`GjHBlzDk_#l9@tn5Tb0x4f^<_ z4{!$L)&!Ga89DentbPjCp?lrIWzZ|J?mM>wx0=erdhlb^)FD0@fg<23jS_EB5RL5? z=Q;!MLdYr^D|hfGbokI`~Gnb~Q2E55eRU3@m67M>HNZ`J2f-m^^rJrs_V!7x;X+- zcd00IW0fDto#-V)6m`8*)Qw*Fyt-U3KAXcFd@uT&(hrUZiVGYc%i5C(d*M=dYAhGL zo1T>q>TeT?zjSHP2K1o{uzhJ$IOcRNI3!2Xon`PRyn8 zISgE%=1-UKlBicRHfvY=c4c9Im&2azVI6J_;<2p>-KU+-HbLyGWol=py2P6mOoB(k zLw(}b7cmv8?z1%#BZ2=RKfed%9Af;}gF6ZM%9g*LV<-2N`z!$S!mLLD?CM7c0qXCm z;2}-U^ERA{y==Q+dBTJqOTO9ScfVvBXGaiqEs#Hea0XExR66KGw7xAkP(18ZoLrx# z@+%FuqSmP+QRo88J}r&@7jPus7d`4x&Yi7-^j zp0WR(Sbt}PP3Rz7*X0T>zpAqsUMu6BwKDf>4w}SvA6R7A?&Ac=d%|tCX#5xZI!NILn#5u+<$N)F4Mo(Ucwee6&6x$YsC!)tl49o9K>QlXn_Zl`m5+Z%A=6r0SBeJBNN+7 z>T`KMR2uDF7)>wy&{TQ%roZyz6yOGDc$OtQ`ZZ@{W<@B^s&i_S%vLz|3w@{xSjDP~ zx%~+zmnn}yfpb$8x&W>ROT2@FS(brTHLR>*b_|3RgBcs5Y$n`a!?%%D*@mZ>0T|o= za$AVmisfO_Z==4Kdh^kogv-BmF`%l1aBbf-HmzT?oRh=wG z?>5}DQj~74FDv^^mOb-IR9tIE?l}P$&)A2bS4Su1o;GuGl9#M}N4kucqH;lz`kDvk zZ~9UxS?}mhr^H(mY!vGLKpb5{b+X6!Ih$LWl~wa~^Xcv>oD%`|vT{D(v}dS)VOx>j zs?#TcY(wHG_zakW7l?VX)GYB%2&$C}uKhN}W8{|wH#z*zvHE))thi-CLER}%8hC|g zV?(k7NA_%SF|&sRnel)xXC3EGM8+NC2Caw8Ajjbthew09R>PQG61s~89^c&<0FZ)GRe+YkYu2e{9EZ4SXv0$zY|!!Dh2*tDm9q7?iXzcE$hYbo=T{ zjec*>-RXIQ=4bK&H@WNEnWVAff86i*xm9N_D)e{jXy2dcvXCM)b&y=a?8Ce7?BLaEoQ=zJgo3ok=w#ADDU-l;(=E^bQTE;P4RbIkdH znhxN*Q2v6Dj~ccG6Qf^Tf%{8wFPcn9eCu=W^FZ0w(1NSqPf zsv%*Y-!7o|%=#F0xW>Kr2YJ0q@|q0RG~0qOskS}IV#q!gG6L5SNqRdux@VughrR90 zU#2r>PulDcdIyJd*`^_&&32$255Au{wNjS&dWE0soEN8S!@h1#BgiRdzUtD1uPxyg zR)4gT-DF2D?4nLFvEi9_Bb>bxHuVP`ez~34|3FOj zZ6hyDNWl~AnZer0SA$xx$>R4Pl5B&X+ieDyp)Bos1q&IF~}68 znHNmc(Or*Ey)MQ_nwH^Xit_Cuzhcky!cWV#wA^K7PFVAPtGi|Hc7g06%l6y|T&xw| zv7>+WR9qn9`98H>9x4cZ4ZmBp`~9qNHr>R#?vIdWU%zka_(!#S16=p_9fXO2znkzg zvR;7y=lH#%X}{6#AK>ywI)B&V_Y?fy!tWjYDCZgN(obFFzYaem`^Vbrp1o#=|?;H4ChTo^~TaDi-Ieu3;w2#0~Uea88u5`I*XCU1+Erao$S-KNG)2`_F~@ZTyIfKNJ69+}+@(4QMO6VeNk|%Vile{vJ(#Tf0ohG#-8(S-%eu zuFm>VhWmREVg4_}kNoCG9?GPAmLKW#lYcLMtQRI7`51378u_HVKSMWpHM)KTz8~X9 z4AjN{hR38aymVceZrJ6apYq(FiBzZ?V>4>`JQ9W3U=r#A$v%g@2(=J3_lg zhKu7M%p#_ZNhK8BZvJ&vlFIXH_Y}; zn$h9G@BUbi+#k!@gjuJIpK0i)%X(w#j*&%PmNkFmmQ@gu0{qJy}!0&zhPQZ`-J>}i5-S24k zPVN2x?*HKTLmmE+cJJ5j!*E$YSK-HcM_HFU{s$fZLyn)k{QVI>;-sJXEyvH~bu9eD z@uSS~4*g(bL zt9W=cYT)dR`uf%m=S%u#E~ z4=pJ?a^QCA7=3@acTlq6?`6r*z?BHY`4pU#4yGc@%bR1}cse$Qq^l4WIjKC;U4F~1 z3#*UavujtiH{+IFpQv7f$g2^VISDbJsGhm!!m-{_x9qySdfJ{{7nAXdYA?aR@fGD@ zy#}mZ1zn*iLgkCPye?d^`@shv66TkY7&1N&hnN^lMOFdk>E*H0%3~`H*smfYbGqQE zT}`bw>J(pti+tTHs0I$k4xnc1X0BQl_&vL>CHO0=Gb_t)N_-A^K$aL)5I)-TrrkK{ zQ`N`rPHguwr%7~a0)coh)!YQ}U4>Cmc?(rd9s^ZZR(k`7LRD+t@@}O(8Vl0%Hr8E8 z3{2mKLt`lNre7IrV|kW!6y3K@$x*v^{dMFtk~GPY z#5!gqv2cti`W;z6q%2wvlJl|LW>bv7!&*eku~bu$&%$z_Ha5E%q|B$w_w2e6wPWXG z@7Ue-le`4}#IL0Qmc3|4C~xg7Fv$2OwZfJ1i+l;%zhJcAPVHaN+EF)A8_S_RQ69gJ z+P`D8Bb2vx76N3jQcydCsmNEM{RX2w15)OO@|)_vrt^-%9myuXYh?UJ>Sx(W?h(pc z|BsOvGVY^ZxD2KuUx)sijs6Ef%G`_!bdzeC?2C;4TdDs+Fo=GH^49+-5<|u#)C-rv zROH*xf1A<&7)Y7ha+Uq<)c!c4MLR-yYkv-jA>(Okh09+7ZfI`>&7~GJZj=a2ZTRehBRuqy1%&GMRw(N#3y+O{(z{_!GZ}5MBX~ zKtL#O2yY-UWc&sWAuyPV{1^~^WFY(wq|A?URsIL4{r89#?Fi+q{cR+Mj5nzjE`zDa zPoRCT(f$rdnY{t++u8KC#~-2gcM&bx5z1Tpdq@l!f2UTs45lKFL;Isf`#(U+JQ~nm z4)fQHf%$93#GfF9e}YFKAe1+R!jM4tKto_K6?qO2o-q)@AZ4DB?pwx1xAi?w{kSb( z=|?DU{iBrr;nWLR45lK#fc}?^{?Q<1UPAA4^Wfg+m(+g{7$pA)<*olOTYwq938W_17RVWE@7la2ZTR-hlqsjs8g>WnRzS`~Hsl zCxb!sBb2xP2bX|A zC~pw8NDLXXsT?kYsmNae;#~t`9!QyYH3*D-gKFa62qF$H0fA87AQDIn8OKvOTn1B- ze*(mN21GqbnfJ2$!rcwKO3)$TZ~R{b(Eu(1flxjm{ysJtiY7yop*)(3BrBR@Z56R4 z6|t6z*rEzGC!dmOtGH$7*Q;mpk2kS)c||gG4ET?o$@!ObN*y4@FsEYFajD4Cip-*l zTXx-wSvtqe>Z+<4U|o_~S^;O?ii%X^y|I|E{&l1`a4hCrtrRp~SR(%@yLacXLL8kS zeThV94PD{rii)nnWN2Du350)J3!gaef7`P1`%|c>f zC?r!um82W9D$+cmDbU?yY{hzGRw~j}5m07x(j_@L{B3noMJP(~-gGV{eMocaZ=;+sbmInARD0IS?st&7!K zs7`EWtH1)Ofv61m*1+auXdw!#ITh(c4eYIm^;E>t6|qxw4P2Dz4b;F5$iiaqxA^MU zfOH~q$Eem+WNk&}R8*2dHE^w1bz@Ge?xzN>fkC4ir3SX8BK;Ma9w;!i&{m9oQLyQN z6>Jg(?N~uoWYVfutGwHav0gN6&Z%KP6+^PHSu}J+CRLybqIC|;KvUBOmhx8lQsu3T zXv=$P(BPd?-Y|VW<^3s?&;VDQaAe7&gQ>_1DEsFsV$bMOANU5CGS5`(*>zX7=$$x| zYoN%}01kIxE^$9s0l&ajjDUJqbt}Hiij~67$?+GdjP+cQBJ^R9PBMEI0+kaT2>EX~ zsB$vzNkt0BHOE5ZVjmc&|3Yl!eOmM#Sad#+31Xo6esv}^?v`EmR131q2Nk#Mx|jZU zMz&%t^Ulb4cpRkuuYrirhkRLJ&pP7cwll!a{7-WDc*y-){O21+=|{winQZ zT#x`gUPEYmkx-x^ls7bf*#I)0heK!#rXtS(+EbOWCn{r)8Far=d@n2K73I9DoY$1| zYvsHSC-Oq2WQ8wSF)NYhD*^uMk(noKmL4;{))`>n4%}~<@I^`J&DdEkyK--k_EKf$ zd2-7n+#Ha+a7dEN(l}cvq55D-25&uV5d`Uq5pIrIDs5hzL z=am2=okn%-tD@j7C5*ICnMV0%(9pHN%5r*}{=(=h^uJ5q=aiBDQbZ$RFnp>Kx$ed< z^Ad$i&m(H+Yn2J2vDIIYKJy~^WgAaAgzDPY1jk>M?96ktOo>VHH>LeGYX5JhmT0L( z&yw~(jOT6>LV4Gs0(|iTGX4b_G&O^%$nQ~$-l&YdUK#tfsYPMMSEQU`<&?mQys2#Q zS8a>PpIBkOIx_RRwZyND4;4mLf#FQ}$1EehVU74FlOXe^@!6y!kTmm0lBFyE11(Sr znpgm#ye;sj!^8r=gF_22n2H=+)f^jFrMsTD6vx|eB8OCE##Qav^^@vpcZ_+sddAK% zTUe#vK~(0DDufdF#Ve~odlxhTg;3t0{-IR<9S%V;n2H<hDrJ!ae0?kjWGc{B`E_V+x2Pu_FzNN>DRLDilWrP#l7o_!Oe3 zf=^H&lsAe=NDLW=!yyU=Q;`@@9Ah9Hp*SLNBF9x_jsciQtEb&n^Rwz1*e+qMISNsk z{V zK{1Gp2!LvF1ZW_lS7I1dg{ zFqn#T14XJTw$z}w2-M6{g(4L|aWP`z%ZOq(e1Za@yit4-i6P@sI7Go&HfF__2${W-dmC9@35EO%{ z$Y}tz(tx^7aa<24a(Y!}k0^Zy_eWhA6%bpP)b}Zxr80V#v4?4pA_Ol{--MSH;#E z6h8npvsR(#51{xVV&WT!;vV<}1wwhFcpQl#XEhF z;Qj$>W&n^L*N`$hW!Tc7{)y=L#f0)N_yh_dfr3!pP$nWVWK4iVC=8||p8=F>42~MbF&R$e z+N#VoK=d>bT@53#7s8Lt?FhtYuC<-wXNl}c&;%Jmc_W*u^hV(j8H1_FbwKvTs@UfZ zxM`qfJ`YHHHKfcJrBl+NrXxE3WkQ(&pFlwDHe%b!%Y9*f1Zm%yL+jYO0{5DkKp^2<46F3?zn(HADiJ zL7Wu;qKrYb0VIrePN`+~QEK-P(MBW@L{R0P&Hk*uw_m#h_v}?Ld4a2=U>Z5O*V4{82)@1U`X?P~H$fg~X6?85}}n5PO<{ z_*7Nw2?OyeP=i){DhTljKzwD86|Y9J__Ks~4SWI-p}Zk}35g-&S~!HrAPxxt;!9Pr z7YxKNgBrBrOF@V)PBg1-UG%z_~rPx z>g0ZbWbyY2@t5!kM1=B&_&O3p#w&0Lk-=1?XhL(Wa6&9JL2u~30V+0s9EgPz0uVzJ zazXqZlEsTBK8A+HTbm_aliB&?GhM2GDIQ8f`Aj3j~xp}Y}QBQa!5AQHF?rXoiH z(UB8klMSdzpkgCURjjQnxFaW^oa7X*JWQPojDPjZ5sy?k2bqjy@uLax2>1jdLU}`s zAu(he4TlgJOht|Z#Mp$`F$UsspkkNJffx%yJSHc^X-F2IMu^kl6Nm`q4Ka?ykTDw$ zAu^bX%mu{R6Jj$B#5z#1&~zZq4nmxn6XF6Si`Nq3@$d;mgz|>ijKq*p4~GyLOhpy| z;(UW|F-X`Vycf$iZ{RGJ@_Yb#kHw1RCYtBdXr6e6rp`kgPed(9B8U*m8_`lEhKx2M zfy*E^wt*;N5T!uE{-A>>u@6LzMAU^Of(W6!5v@dG$XG!na2ZTRT7YPgL3A2OSfM+J z7VQJkiA0n}5}qxGKigKKwLf{)@>l31uC{P9f-?= z5W90iJR8a4Cllg1@CihO@`kt*i6P@WIE2VxD$)ap=?Sq@4aAE;#TJJHF&%_>YEFn3 zBUyYEA?}7xAR?4E#P^XHGX4RF5E;bTGeGP!_`Dk63pCF@02-(XHcy_zQg1e_Bc>1% z2_}T{#xxv>A)^QmF)^5mYy_tD22&|W!3Mg1pO`ig(?}!|ObF$TsRD^1ql{SKGMI{N z1Ew<#rtu&Jo9LPQ#I&854n`uugizj?s*xBnCJ+l;22+ub0@FDYVrLmxlRynN(sKZ7 z*GRvWo`vvEzc_U(os4wxj}hY$@CinQ^2QiLV#qie4ly#AitGZ$3n#=bFc^;mHP}io z%))p=J{q4%A>X{dg9}OLAgd zfOPRs5aaRi2}XqS#`x$G!T2y7Vq`ECxob*u?2ak1+o$NY!egLjZl8iFQsxf+<$;~@ z;W%H0*R8%g1<4)+O7Prlc`mwKczzq? zsRqw2mIoS%=ZzrG(ct;I&vS*y`CX7_8hCECJQrOfJiia})Z&dsm2=PJ{LLUo9XP&G z!=en~G0OEKZZoxrU?HD zY9?-rP!&+74um~5wuJr#CV_Fn0l+Bg78o8J!eB5JX$FkOsj>R0v4sXnF(NVxEfQ4? zGW8%_N+hZt3=1-;dXQ7aaiHG9-qKk#Go?!BnIba8H~XTWqk7 z0X4JOVpY{Bb0P>=5UZ+3*PAWQ}+(`6wztw1Vz!(8doP~lZ)a0J)|&GG|4 zb1V`A#nD6om%&tICD5EaHMYV4ih-J0VF9TwAagPZyGFt&st=e7CV_G40l=7p#85wj z>fthox5okF^r^Aa42-#;W=^v(R1cCl9kuit)>74l)PhN1^d10=dL)MW_m zz*sXiw%WjG05!AP!cbjMX3bRgKeiKU1e3t%KL8kQNDTESQaxM-Q;`jTafZRr4pQa} zi@~oVp`2AD33frV@c_^)M`EDpA_}++rXpK_W|Kj48c3N0m>ZFt$0f8(Ek$Sl z{aVVmu_UG)ZmGdTbF@n}XStamZUCczKqwy&^XDS*_yPej77jr$n2OA=HHC68!ZQ2# zmr__)3#LjCMIl0YE1ZbLkZ~v#!DTQNS!fkjBPRjCn z5+=ZEJL0?C)H!x3=e|I?yGHhJZUKh?IBseF0B%QODE=lD!(}iPnFRndmd2(T4Br72 zlQ@Op`@}E<81@juo|??GEIfCBTky<206afLV&J%&IN&mviqrv5d}*w9X>5*xbPpmh zp;M54NJ#OeoQiexPo@@-E+xE6Ycg}P;N6Rq0&l?qzJ&>Q!0kbASSi|(6}^KZ!kOoDyAt4!~dgk8iB#o?)oe| zPl8+UEII%@KSyHVc%C@mGKiTg@SM0bw%FkL1*n)PC_MKQ&xuPpAHXw%>uWNLv+(>9 z+=8d=0Pwty#K7?yalmB|Q&`|>H(-7X5(a3efZDSFya5gYu=D@`{4Wwi@js{-E`xaK z7XUg9fcHVde8mCKnFZhja0r0z`~ZA%DKvg!6Exx^8&qB)Dl=CsMaPGSH2Bsv<_2Dk zLr`8Bsz3MuA7xR4wl~bfin@NsfQM_^M@mY0{}CeMS1lD}SLKJS5Z`(MwpSq#&adFm zI1J*=2gKps2mIAt-fJKeNT_xih-CaVD3QgR^~;bCvIdbKC(gJ}h8HB!)Ya>cdu!rT z5rZ_pL7J|@_;iG#M$YS$Qw$0u?Zvl3A8{o?#@-tC?7ocOii{{_KqBw-kj#sQeENEw zeO|HwId8#Xt{6;3=0JFJY!?2;X5f#u!Cw%kY!C;L+w~O@<<}XzFsIxrl(2zd;JDG9RI+k<5ELBK%aJlKreJ8&aS0rAjCuk1w&}^)||b z^#5Uquak+k1F#V9?SLFqMaeUR=wBfmJuLpl>hMQfi1&FY3pIjB3l)J9`Ic)TrpdBK zh9a_PDn|)KKuR&Bz(P$3MUCWPlw1aiV<973S;$CrETrX?h`cD}K{_u85erG|0a%DP zd_Yba9OhXr{D>@uaJ+MYzuGtzh*ri~0wNj5gA#dO8|MWUG1;{tUewh`8KMOdNWnWq zV2D}%RnS|J1CJl^FH;j2%L#7nsjD2ei^1^RYzM=#=tw@ z=n7u0iKh^Q^huS2!Na)!XY*WQ<1F@-W=P4zp+jHvjKm!>Fx)EGTm7qGRcoYiCkBqx{BX3FHD$i zG0HKEFpA5z9%XtHGbT#bnV!0i0VarVLlWqE0J>n-vk{6K{SQ%pwmA(1Wlkg2HK&%i zS0qL$5%M2qh~|{o12E^45CA!k!J%y!#KS=d$Kyf#)kb^@WM#zjK_uhTnlg}-dWRRr z$)06IbXB;T;$w(Fif51lrnms1sFCt4Xptj9QFk-^iG^Y0h$R9No)ZaCN`SoQ8DiE& z{sCnDRS1Bb|ANCDF^JbuARI5G;BRaIe{}v|L!8S09uUd>YfvJGjZ>BA&&16%I{#|g zb60hSBC=>|B)S+8kn$TyflWS+P}E3%osuVk;tc9WwyGUQsmLkp2ck zw2;K+W1-7&hsEe*XcTff8Z%*hn-wc>{Ebb+A7zt+B6H!-kf3gDrlVQ z!Fm>1z}(X})%xaG-|^PB+WPveZ_NVcm}%E8AZ)3(Z)2sffW;yquBaBUq$R{P)B;wX z)?{dIlocV)+8JdH4#%LF@(#qlMQ*%sW`LOylt7t06t zeg%M)27uX)irNmESbG6dphVjONk&SNeF4^)YL}jyozjU1N#C9fB{5(PKxmYb4QRh4 zuSfY!uDvj4+*c7-BXK~~kyW_K&{9){t+cYz+MSS;40YPtton-hE+SBIT{iB&50+ZO zxMZjs>wm(C5^OTGJeQGIMCKtf!_kSk^F1sO$g)7fMRE{IdS|(`+C*jsaTXU0X4Td_ zIYV_OsZ->CwfRC7PkX@ju*uhi!wCe~gI z`N>dPC4qk3oD}(V7>WRrp;dP1G%|Y!BOUA}i*)192GOYu6Vo8S12pCP(aE{!ymnf*~ z{YeOmai9*fBmOH;Q<7w8gP#XmAqJK1|E(TKeG1g_(%L>$_{g*tm5%h2p56U;;5#M;Y2 zLi+QvYC5+h`L7^Dxo(=0u-i6GLpWdQw~fFxm&1QF?(R3jGAvCKz?4L0xfgU5#Xkvp zRO1>L0EjGX|4U%_XItUGg$QKhmMElO!lZV3raPSa6 z&uMfOM~MQVYYH#F}vO3`PLD!vT<_-FAas;QqNl~AIjLip!F=o%KKt~m1( z)i}REdhw8z*{M-q1ZR|rAni-=!?})$i=wP#2z{BMaFjI}p&Jkih;{1JwP0b6zd|0j z2b{k`$8Zi9{k)QNBm5CI3F*H~o&6fqy0&3#_=tI50^=ZhXkzUbK#wvKdU?-k{3Q6} zUnG@Lpx#32$s~{p!q-8FUZ?!Lp>;5bZ-6>TS$N{S8<1!ay=Y?Xmnof*kp4}o6A;&v z$|z93MXG=x6$E~W0u6b&3ejQ_8j0&t(wOV&1+)}>H46xrzDbrgS!h^Aim0d-bUVd{ zUvxz6S5@>~h*sIUk+L=QZc-&%q(aK~ zDDi8`&&AvziJ^(}Zb9@QIyBux!Hk5Qj8%6tsf+^khgKb_Alw52tayqFF{2UYjaDR$ z7L#6Z0W&Efc4Z3)kd|Zes7`z@MTMiZ9AfT6C|7^|bwty0KSDg5`^h!~G_!l-w1#hJ z)*pi>tB2*@9RK+}>;nizPDKjaQ*hI3U`&DVc?HtrnPh&C_aLH?|8F8;)aZMNqUu2L zdvx1T+a7jr4tO_zZ2_@Ki0FLI|284ES}KWZ z75@dlF*i?ez}(+~h$u}8R?e(d|0GnF1gNi40J~`TUxPnTF7BKU5481?Nltr2+0!A- z>qxV&?Gr3)2Y5Au&jA*BT&|o>%W6KvG)5)&F`pY9{h|_`@ZoEf>9m+ z`(AuM zu7B98xkvN9&G-`>DTH4~2 zC9mt3jv9t2G##25j66c)TWXHpEgcv^V630EMXf=A<}XD|^dXgaB)QyKgx?35{dW0y zPk`qzmBqObL2Vr2jNwN^Uc67qK8SkuDnGijq4dZ?*cAJiY(DC`VWi!?cee3%$~N9W zxucP%f1(d7jXd%bK<(#DDxlFgE}M@U@xa664jTW)tM}@6=m#EhbO>!o=aP1g(6nqr zq^Xue`>K{h3(yx{KxAw~JbM(?$$6?sJ<)W_%Gqo%+us8`YlJQEOCco6-L^p;0M`6J z0UZi>&}hiKn*~^u%u$L%iU~}?4&T%kB1X^p2uQ3mhvtf3SX%p29nTLP4FXhBTKh8{ zfA~HSm0+f6N@HR+-?;sie>GCr>aVAN09*rd{0wM^e-ivyR1yn9lNqyK`Hx^sILcfg z=17Dx3HV`z+DG9s=MfTfw~%Us`lxIkqQ<@LP96FxZzkM1dB#q4Yx~hiVNsXZGLC|b zs`VIjM+qQ@N#{MTflbL)>Q`_Kx2hLCCYy)A_F1`)b%BK~u$Th&1c4C%3^Ns^_$CsB zO3a}0OHX1zgZ210|XRk*bFNkr4QGZ7!94ESe}H@Bhj>_z2gb~ev`tH&Iqu!i=l z$6SyBlQ^KdmSVGOe?e*OQyS*HY_-0r@nl^=<439j@Cohukydx`kv@lx`3eJ-AhaMC z2DGrJH3ojbDypmP3E8@QJOgD;Yg(Aix8LGVAcckO7k@p-=zE?4mM8%YG8X!tXEo4< zY^4skumi3!n{U4cYZ4SuDvA;cthNZGsBY#h*#bQ&0ow|*&Wse=$2oRXKIn+r=X5Sk z%ogV4!t3xmtR>leN-4X~gUq1FlbNV&6b;Djxl^chBA%|xHy~#zUO8pSlQa_cPtvp% zhE|kM^g^Lgp-`y1+)KA^?(Nyo*Ri>O)Aqit+q^x6USYTd^Q?hTndglv2o;V@2bP+`I9^24?K)2)0*F1bUY(-76xvu(Y%I|PMcDm+9YRwAMy zi#n=cR3Q{>&ftw1R7`Wjnz6?hTyo-a@;_U z-32ClM;aNoT8^8A!x|uBIBvHbx0QQaa^bk!a@;ut$32!KGX%#2mg7f5a6Do;_71`E zgynd22#)71$1~+#|Db|}O@C=QUMlx?fW?~ZC}WV8GriC!UE!SV{Wg2KWT$}KoayC>5v zC=8#X!r_(TvNg622y;+q1ooISZ+ru|>+T_y=p#H*)3wbw7_P|E6C-efzZ^$NbwE=KqhmGD7Vv zE7;)8U`CvnKV@Y^Mb&td(FiK5OywC@0hX1&37WinWtQz|Y%)w1?TWRr^SL zc+Rv(*t9iHys9KyLZOLOp3`+WHTOhQ`=(d{N97W5H z^Tr_OGi};w`$#)0XWF<;JJ*RXRI)>%*+T(uH#uKu1uV!VVE%puG+F_P9OyfA&YO&I z%m~%6Q;wXs*tE_2NPA+=v>i5Wn-i}FeRNbyh5~MTt7TR|Dwlwz`xS7q6|g)9`c9qm zQ;cwQK)Rnm&eJyS%6+6gJ!jfAHf^sHZ@bx^p@7@Ic7qkrpG&~n{R-G(1#HZL-n8>G zjqpG_Kij6=;l$gvx@{=swymCL1)Q5hxoK+W8{vVbcCk&n(}}muWnd`fwz*tt1zeIt zxvA}!8R3E2ew9sog%fXU?Bzo#w>9>&R=_nml$#27tq~rma9_4*zv#rDe{!p3yLn%1w_CQ`a|6q7?pMI^R>1rmIX%Y!ZM1BOeX*Tr*%s}Kt<$n4 z4QhY>jK%y=sLwZWPPPJ;=MvDpUjeJEfOIYar|wt4IxCUC`1yuo4G z1Ex?Y{-NY7vT_>1zoD;Z(~d2Rwr<|BrJ-k2Z{G%k#M=|rYy5%BMS6XZ+tGfh#4r3% z+S{!56Q_EK-tGM#k?pUB&DhF58w++@t*#KEi$9dmrB-PBhvHvu`MW+8|EZS$Dmw*NNtpQ~)3>wshVYs3hreJHv8R_+?qkFEWi zxAt#8$KT}{xL#zf{!p?uT3Kg&DE>1o|E3Sc|2gn;+?IBAy&JgM4b;^-Yza5e>;^8c zGwu1(Ic6Xh(tiSK9;6^O=TP~{e z*c)JfY-`^(_hE}F^qqBHa?P4;eZft^0RY*$xfcnBs4M5!q3k#Gwe@V-f<3>SOk$kl zmYQDT*rnc<-c@d`vt7e%%QOQ_+qbxnA5_;cZRo@cY~nbW)^GzdtL4{<&|Y_EQZ@NG zLrYCqsmBk^w8%0wF7-BUc6T3@aqEXp+h)_AxOC|1zIbQ>ORa$Rp_#fZQ|Hi3SAj{* zLa$iro$XXADZ#0DOl4inI!NACJP=sKpi*G-)3(^17cP74Y_-{VCwBH%b97 z(@{BS)jlfVbv#dSn}St7q2%XNE$&-)6A%r(6^B zdKD%8bS<;6fLE{>>AbvU2vs|NxMg;p^x_eSR{ zZVq@ihtk0-K$H&N-(hs{?vJ5#@EQ_V$DmG-SB1C?P9X(A@Rke(f|qY75WGplfZ(+o z`>_?Tkx(LdSA`P6t0s&H-cq4OxRqTQiFikeT?*JzplB=v3Gx_N7Q^OoMttA$#e z0#!s8cfnW6hwR1O@QLUmz6RrM+MLE`!aU+E84dFcwNl$_XoagSjfdEjL3jdA z8HA@Xyw&~NdbVx!O~QjK-qyYiGiRhXuNNcn)Q{J{apUwkniAd)%2>(k4(t1f^_?X? zWHfxXrJZAa=fYPZpRvBr8eieH*7rH%EBZWqV_A)gzF=uzw7xGXUqNBfb(ZhTHuie!yTS5( zMfi}*qOaQ68?EnaHufeaeM~+ z-a2=d{EiG_(@2-j(O)zjA){BQfTyCpjcLyRcJi?!A01YQ3Qkbuts4W><2AK!ZGb$V zWcJGe>O4|=*KFunyDdOpNIE*LE$MAMwc%=wGfMa4E`6>j;IOAx@zvb+D5xWOovd2} z^f{#W1|-iW>FfY0LDJ?eb7nbI^@vywZ(#Dr^Bt|^+Rh1$dbn6aG7oQbs0bhCs3QCi z^KYnVsYLdy+R&HQ&-Gn^MV(5utGIX+{|^%Z6ao#W?n{VhD?$=swtxAEn<#kvME@@y z>5Y)B6ukaEB2-q0Hwg;8ci$-;QBdZg5{yKVmo^uT!+opBsrxUT?%lebqa=>IrMH;# zZc|T4bmxp&xDfIS${>}aomYDNer2xi+1}#~l1HkR6*jW=fo~&^Dy%wZdtW+BTrdI> zRi2BD%qfNCqsA3_MF@L1VbI&ZY0YNvkTwjo5^v)wL!*6QoPrYJRW>T~a#~?C;yBZ|dE! zV|5?AQ>RUxK4-?fc~hsY+<`(_*}HjbAKa$|szJU&+QwyuewwoJ7=%5~R;AwUT>k$>*?K!- zN^IQ5Rq5UxThkkR&NlHo5I@q!Z|F_4Bin*~2I@kdP@fCRMLuR>?|E!Qg)E&33=lfhHb~g72CqkJSu;vjCm4U6o<-*iD{J$Jg-Wp zonZLOL*;CfOv7IxX>*rVwS#xSkWExpUK-XMhD`^$A2a+X5xTRu&|zL8*tx&0~7Ty zPYlxr(?DaMrrWfkvNI85FwQje(V=p*Q;!G0j10P{BHnB*V~*j4yfYzRY^3!w%(S)S zg?@&qf1XYochZVZ-NuMTYylf>f#2Xd-tcQ&JQ0?SYawXNTf*={2Fs#Ax1|P$KGvZ( zIrJ@{n?8L}7Tw5cap+?l{v}y-!{6r6iO0xKI&|VO^rb#s+6+%D(1u&ULyM#sMn1cI zzOrh>nDonrpsz4=ZNn20-hy;eKj6|*Cxb@Wrx;$?uv%hNpMUBQ^t4YG%sl8oxwH>4 z_b?2(t9(A`=M3i6hOV*kNCVTl*w$znYYi{3v9C0C?)T|}f#)5VUOEn7Sg+G>@cGKv zZViS_hORL*BFwZdhAmpgnT8h_D8pdb=F-3kJh^mR=xz#>iqdeqE4FFHrOgEnT%aBWIVPpO|yJ>*`21BwAbR z6Aeq!P3_BCI+N|`Wi!>#kUMVSLa7568@W@5lG~9?wpu|9Af>8*mzcD<=S0-o+LUPT z?np1{Om=rzApxq!@o^(d+nRkOf3B@B0}t!%Ck$_WPRxmhu9jtqt`?Y}A=%#5w4zIC z9!%G|KWXIUo{zcqYiUn)CE6RB{Ja>en;0$gQ%0uF&y@&g=jSTWn4hZ+?}(!ENm4Uu zU+oY1{=*C4Z&q`UPa}=zwQkd&jG{d@%v^M z>~XltAMN0I&9cnm+?70@x6Lb^TFg0X@fQ)!fwyZAUd(;Iq~+gA`MAxbu)KitE6*+1 zj?R{3XG_;f>BTLJ7JG~j<&JMpcD5y2(E`YWYcHLKXJxb|mwOUlm^;3ueOaQlrE#A; z4ax5IE|y+t{jhOG=ukLw`Z98o&ZUxNwR~32C={B^rmxplxJ0b*7OX(KDmyP@eZiA0 zHFxFXof7ppSn3oX%#;Nl>v}@xGu+AmJ?n9=u6wNa)m~>$Zy%m>Y8`wOdvuP6wZz0H zl+$uQ#uU9Q&suMXM_%Tt&OYk4k0^zYd0XhozVkb!=r>2eieCZ0`L{S|%MaggqE3Ak za#&}-LTjQ8(`IJQOnVtWZDjnkgYh%}#?Sm3Kl3C0NY1{ktEpahJx%o}SoRGCW#2Su zFt$+#|5bs;xNn)bNT|F7bjI_?G0M2Klle)1D>6#F+qI1E7#Snfx?wlz)P-~$NAJ{p zcNsq2=aG+g@p%ipyEX6k46mM}l9zU)y?p*cFT*hM@dLPG7e_Yn`@99-J(~C49K5uv z%X^>Z{gL6-dE?xed}@vy@_wxO9`N~Ojvm&wf5@lH9Ahu}k)AGX^Dx7}{}Z1tFvtI? zq3eA83}OB#gDsvjiANcRjK>Tw<``!prbuIW!qN-MtY6D}3UU0o@}6cG@}9BjRJjKA zhP>xA-}9EQpv>ac_Ii>$7Hi0RNvHX_NuzPhLYSDzt881~{ZjM(m*E8_-=2=&$%~Qk z3ewOvuWA{u85x?F@h0Df_cxmNb;IkdkJuiF(a%ev_lD;Go#EGcHgcJUW&8)t_eaC$ zZR`<=BwM|;O^4hlkwn+6L zy(@v3zd5taKF(ht|F8IU14(Jz#m)WFTEV4oGdz8cnX@SDqyaofLf}Q8Q~YRQ1`%1Ay@l`J~QG~BNp$Lq__5M5i|@JAk1fJ1`TP2pl!o8F-IPT!wAorqb$#G z5yNx+a50`(ovlYa#t&mSeU?pMBH^tzJY2$O+wcepud?A%vyH4rR>~ZyX)_!>qj>TG zyW9rnXcdyt)3!SKDKoTU3K z8I4&B#_@Tbmc^1eOm@swJWIRAQyc50Xcd(xg7?5<{vGKJ(JC++|3jDZ31BXr5|Z7> z@t~#CJ>2YF+h;d?)y5e%_4`>arB#ZzhP=J&@Umn7>fUwh)10N4xGuzX_Vuhz^q#q+ ze`{Z@)I^=m#If6WV;4vgzzOOO=bxueH5I0E4C*yMwIks_E8tD&igN>Ph`Fb_3bk%;uj& z=3UD$c?VhLP17xY74c4KM9IDjdG6ZMvZ;T2KacYDnFEyOC}-&;#m8Ax*OpY@cEixM zZY!$l7M|oZvN&@J@VMtQSq1@}j;z4q(&yvsDj<&&`{n)H*Ku;sJZo&6Sq1p)JKejMG^sDk4f z*wQj}vl@QsUD6nBaO^j8XB59 zy3%beZA~dymhpvdT5LshCeq!Vt!m{LcH>$T?Tfk-i<)%0A~&u()zsOZXftueZd^wq zm0F(cY}Dz7xpCczbVtjIrq-0wSCSRikZetM>U6{1xMWIJz$085F{FVHi&EyR)Q!{m zZfb8xHo`_G?;~BFj%2C}`!UHSEltLDqXxw{Cb|-0KG8ASji=SL%@1BghbnmVyNk!nhtU57*5cn4qUjA7#r!N|+C$0W20Yy|lgTp}n=#VT zLS9x}({d@Tf-HJRXH#oSo7sB_rfKXZlX-6?E>TF8s)>M=g-_+P*Yglns zTxZj=7Qhjl!?NNaHQB6nV%H^*zvh;9yVvx=1;Myv*WxC&-qPcT$<78#ECP!KxvA)Eyf_a?a$mH7H5G+EO?*|(??Fnz1=m}n>v z4lT#@vBJ~T-e}ld9@Ezj*42<~>qxev+1YWz^u59>d&RA-Q0XwLe#i8~*?JvDsYRx5 z7QXHjMI{;*H#IgSJ5DloG<~%2q>u@4bv7;SZc3>>-1N^9-_VMIq@^*jEYZ@MsBbl6 zjp?I>hXY&JNgYi-lVCCZw30&@rZe*y*(aHPTll1GQYT@^=xFMc-Fhis(}xQWAO|^= zjZFXT%jxc57wnde>A!_XMVk^9%%%@FdK?K7Z~AbFM-%NzVzksYGWIq7xR#*?Ki!f| z|1ELLnmSvWTbde&u%GG6g;(j|V}{n&)?|aSjLNs^(}l0GDWK2v=MqO_Ah%SvIMLqN zihhFjugYpyU8taqEh&u57=n`RiLNe`oyI@GBC&UmhSc??HD)x>LE5i+~rX%n`4h)pXkPQCYDke5@Q zbgH`p15YXiF3IbWxp*+BHKny}w0$E(@~KRix_H!(e4S11+~?>a`CzoR4x8WTkbHQg zmr_qirVPo$-f~eVCdyKF$GCjjW{W$Unho}21MxFE^c-8##@x6R45%LKiA}TZKGo$# zuaas>v5M5zSM0=NQPnP|2jcn2G0?6|XDIoZ z;qpo)#-gC3HPO=E){<&VbfE!C{g~O_|%6Y*eouXyJMc-vc=o0}T(s5j^MQS0)~nN{C{ zR%517%tIg^BFyY-o|_I0hlm=})5M1HoN?17Zhp?V84`z=uF#$6siT!SQ{oonjGHBK z$LEZjEpaF0jGH5I3v%}?annh+y&baB*Oq)M3cl>k{za)3O>;tpj1man5P_6jXpYs;3VcPT>W(sDY zcEQ5IF>4J&lFWiJV?74ETyxxo$E~FUal7VdPc~xVoil9QC|v?ERRWF4wsstGlvgC>VKqv{p`i>Q>)*7J+_>%Rja-SyI%F#JABW$? zA(rY@_UV6PQ>tMJ`U5N?+m(ewo~1Q+w>K~#b-BQ&FH3X^SxUUnr_)%Rq6>f6r?<3q zV2aSvmFVce9)vEnB0s(@u>vTk4jYHZji>jc)-64%_>f_ZwYU3C;{I;wWJoTzYiZm_17 zGWSBd4Zh8CLaIH7H(Fl&Ov5~#5fk9D+?#YwWn z>sT#wxQ^$hO}ZHqAK9K!?PY|H18f!L?Cg~4I1b#VZH&}38KN}4QHF-KP@7(LjyALw zzi&85)6ftw15nt@G|f)_HRdrUy|JrK#I{?m<6Ikz)ii4v$YHz0hKkg**(mKa8lhN< zXQR+=)hUu7(e#dUz|Y>%!}d^Vr`eA|gGghlWllfo8XodU=SbVqVC+;NG|Zgz>a$S7 zoVKW04_g7Y3Itm%^Z*5fu!Y)2pu@VaK#x5Se5|$Icq~|o4?P%E4OsRpYLeECWno)W zTRoOQQZquH6W53iybE2pM61#-aN|==U7Syu{mjCwI8#&IHCou^!EPz$Y-du~#IZ=#u}Bk-TE^yZw_Q)>C- z$Q~EySUa^Wl9f6hNzhg!EsvGOHJ{ls6rNF*2OSblraGpOnl{?Tn~VnYa*&N*+=T;x z=2<}6Z2G6QsZ80HS^iX_xk;XIbS3p;5Mmx<<5`hY39PP&8RJ#M5+kGB@+@lV;s}|> zkRuN&WZcBS!UsP7I(e++?@H9yW4Tt}nOx3UskUW>jh98J*kzohnX=aA@+vJ4`Ujd+V?4yt4W6#1 z)^=py6pQAovV6@=O&a3_OOv%V=HeaQk`VhUrd=Frd9ZNkBzzw8L|@)KY}{eGH)}*o z=g8c`$2QQdTN}0j8LQ=cw4yP<&XFo89JN zMoyyLHZ!B6M8~1(ed|T>y(outVs(^JlcTlWldLD2eRoi6x|D1U5bCErWa(>E8T3JuFOf-jmp`E`rnyaY-T`SwT{QbX^zA>WiRw)aMH>dNo!Kg zBMJt*0Uc{P)I>tBh{6Lrbr+P+Nalxewj5=J*4WgXKrICV^-hPLU4hS*sf^$pnOD@# zF{Pu+j`9Zc;W7#CNa}(#dTl+h^5)FS#b@h-u??QPU>axVU({*K9i0l1W0{9)>SMR% zZ*{=}=|n2s(rxW9s4n1Sm%-|p`rxPUY(uu(x>*PuwiG&2>BiPpoRS+hZh~&%?Yf0a z<@Q^*1f^v!`@cWm--b(c`c|(zi|@#8V*}T%I|r+uY=ez;OeR?-;S&U53F2!|6%N0$68urQ5raA7xRjF}u<&YPT2bOZe3eZkYZ~J|iDDt72jU(`Y=nHxaD}BVMAjGoj1oP|_L{fpQOH znDbUNWHbW%wCr%wTRUiIsnruzcsU77cLc+D)Wb7Q3?Iobrbe#*2x;AhsBkYNjdNN~ zYII%_q+xPaufz2WLs3(rO=LHya1z^_c7LbQ=fRXVc#^2e@cS{6hi1~LCyRd(=?!X! ze6jfX#8lxTFicTN0)a?KfJwjwjUfpb2_%L@#i|`a5x2V5s`d!1uf(N&7F5Q#L?ry;&yF2Ep}(B)u(A8<8YG4i3^Sio z-?Tv0AKLNX>KFKG4_$LKBF-lKS8+_NYYv_Q=xaHy`MB1#tw;5sAEW)bGhh32)3^2K zsSaN6)zsbH-h=%)W^X4?BtS+Fg?Lv2s%sZ=pf$g_hIJ0D5$zZJxE32j#X6@RtNco{ z;$J^!Db~?+rlRMK-k;t*gt;W}NjETMINB5YR?Adkl>Fgeyn&vF18h@ zEdrp@TTZZSCrbe;*D$XH`Z)))w^CPw+@H%uQQiM%$!KV@r5bZgplzy`5hHfZRaRlW zUzZfLiNu4k4rEkePn-51p6rie$O%CK!Igl6+}%lsA-9?VZ+2aCZ8g>cYS*mo#r>4c zWo2bkl-Udv3Ohng!(BzoAcJF@hj5rHC;kIHcNK6BvSqEgwxJp66TNYf7K0Vp&%)fw z7>o|1!}{5kb(|_$(ol!FX{Eu;!FXg+pqYCOWv5Thp~Dc1>Ng(&l!KsBJTghOEh;zl z&5(H+Z1bd2rv5TJbBD~ITUUi_=KfQToK^Qz=Mii)IUG|E4XD+TVD#x~uo7ijtZmR5 z+a6S2W&I(zd&Qm2Z2@YGAm*YzgnF?-cFsIBirAOtF27%^G9=F-P0z3Y9YyiCSif+xOERQh%e=tppwCAA_uG^?rVy9%G%VdumE!y1q4G zs6#u@i-WD+s`pZ(&hF{pWD4pCEOAy=#Zc5xSg}+jwv`l)CJ!BIPTZg-QuVE$zo`+6 zLRc&{n#=IZM`g`j5h7k%vCO1!weX@em*o$`#*8`j-g%`V{&2eps&dDNYaVtx3*KRV z9y47hVcE%H*g;HL!~6To^py{QO@2}FO zb(QZA<7Bw-B>Ahj^d6L)=&-T7=u)x@mTy`n=5qh`%J{l9btib(PF13)<>0Iy^A)#9 z9ujNDoH=F%lr3vFjJY3Olg#Jf7S269oKg4nlcpxrKpF3_>mHjV@a zoUJ??C05SR>Ju!LaATOYhFv0tpKikAhuXalx&W~cQj2nkg<#G{VVVr{S1g(6Enwwa zb~oC3aa%kn{j!f5d*(C`R@hZR9WWl53$3fHcE=6r@HAuh-JHePf?0=I?!_pY+FG%K zzuoa-N&}s_{xY2S)@=z<)6g8BAg6PdxU2oW$enF4t2%ibL{d-xcXr|9W`>n*X6~&I z_>RT@2wHLc2HP4o9>QG5o-aFk!EFi3k0UN#xuG?T8xoYi-LR?ZTHK7_(n|$m>R|0p zBf-#!0e>!nXq^$zPY< z|4vS-K93$Podg^wv`I7TG^w7=T!qxX0jW#He|Ehd%cwS2 z{Aw32*;n#RwX?=g)px3WRerOv+kthgSqVJ_*plkla{rh>*RkbVN9dKT2al|C&^nQC z_U!v|lLqehQ=ME6T(PkelW^Rhu6k$cT$eX|_MC;-%YxMnPk$m=hFY=7sdsz&r+KjB z1X>l&!K%yGQ?wNQ!`<|3)af~PPnNc!rVfs8#nPLs;QIEU!Dh8L*1zS0Td9My8Lip4Rh9{qlhY5cv|RR5DD z=R+GV9SovYt^1yaPx+hOQM|c>=UX;GLnzIf$QEbqb~Sm1*5pnhXi~R!dQ7k81x_{= zvasv8_MWD-?L7-|6F=|E(N=E#>$`eQkkSSAJsFDjTm4`-;E zR_upz>E(nmEFYsIWBF&(dL+3rh0Be9T+oCO>T^2-1R}LEB0dNF91}hibAO+8eM;)-WESS!6t}NXN%v0hS^Ox2%=M={3QQt&<<T2=BHnK{y9y(0>HPv$gS7|s~`*Fa+eh;>!N$#Jga-T(+a%}b+ z52KOuLC1d2aT(BvuIt8ABhB4%M`QB}T$zNp%(##DL6}*i?sd=@>Jobog|?n3XfT@T z#og1Ek9QX~cdS)1I~Ct)@H2P0Txi}khS%UWBPR5@)ZDf{eH#&3Ys5a9yK&+C>UP|x z(7Xoslgj;_#FSy=)f?;8hL2et%st8Sh-nvX31`^6`E?7lZc$gO607{Ho2Uoq*vwk| z1bV}0LFyZj=qlLtFgm^hbgX-iWCU)LuB)wDT)9}SCtw`z z564)jp?)qqFR|LWoB&s;#VV4Y4hM12Gsd(P_6ID)605G8v*NN^=BGvFjSVkzs+!c{ zHDV`SYW%2HYIuyt&QM~p+ssWas62=+z4}Q0q%bMLn3wSS*W&!8_%p4Gk&E0;hYhuy zwZv)Gx%Nb?3SWY4A)IK|^O~B1n6aN)C7MN<6BW(XRmPIHitO4t96g)YfUzKUOgH1C zL|vWGaTj%ryHa(%tumBo7SzsbRy>QBR9frzhtHYkhGjecFszH$R?9{XBU{ogX=oOE zQ2tt1%3n@6D1X`qbg2B*9@BcY>qqI|s}sEk)r4b;l?#RJuINpkx>lvFSecx)X z-rb4Q{%fnddgitD)c37!@9AirjmtFFw99QZOZOd&0_Bkt|Y1hjYevcXjK-ZO|M(^209+HLTzle~=L^D7mJsGqZ2L zHB?;>^WGsYkI1wfb3^-kR!-Ea2ihBZC!?l$1-z7L+b-QUPJ#dG_SLJq&=bljHEmOE zTW5RhsJ>p@{freCRmy9+@KyUZ>&y7DtHspmwFL$21zt zbYMa9WKN?1t$*e?^s`d@eZB?xwmx`9@CU&QgQtbA4Sg2+IuySGl$oRQM+ZYi#ofpB z_HD>LKlg&%3v;i^y*l@r+-q|`%iWUux7<^L>w_DDr-AwG;5iU*Zt%R|`4Dq)@JGQ* zf|mw=9K1YuMeyq2b-|m1w*+qs-Wj|*_(1TX;KRX3f{z9t3qBrvBKTzRso>MW&B14a z&jz0hJ|BD`_)_ro;Jd*Of`18a3I09!FM!$@+7vo7bWZ5p&_$uE0P*_J4WS!DH-&y0 z`dR4a(5<1{LU)Aj3f&#LH*|mKq0r-@&7l`VuY_I;y%Bmh^nU2W(8r-qk*qC9*i}W> z7Ts8MbJ49uzbd-3C{gs=qWg*-EPABq@uH`So-KN*=nqA26}?;ZLD64|{#vx9=!>Gi z75%g5Uq$~eT3>u>@y6maiq9!Nzxap6mlR)Ge0lK|#a9(yU3^{fjm1AJ{$=qU#ouwp z#qUBc>^uuwce+bE+Wy>@71+9!mnF?w(caQqT2^*m0Fxx*Q`&|bzI$OO_``}nz87&a zUwwb2tsR{cSF992mE#vsmQVHh27^<|%BD}B9t>7YEiWq<`Xez2+PXF1v~8^Y>5+$4e0zKD_5XMCf}j8R zl{<^Vu?OFs9dJhH4s#gxyXt_0VjzEBh0}xTo=nYq|3>5~g=(cU=o|e1EQxNGlQ&Be zsufSVF{r_BU@m$7ES*+9gDC3mS`QIkEuGE)hMw2sIQI-hr!#?c_fK@3`M>3x`)B3p zj9|#^$djCRTpGTS4l0e%UQv7YM2o7U%kXJ6xw)S8skym+K}Ty(*V?WXy}>0NYx`O{ zgR$PewvMi4P&Sa4J+}#yxfV*nFp^0jZOqhkde9ToJdVaZ^QDVc`dAYpUp24L~6PQiDr3U zM`s&SGG&?o)pu4c>+D#*pkvKE-0-$cgTSm3M71$BDTrM9(r)BJL_Q^iTh+RHdZV}@ zVs&?~Gpc5{-(E8{aP3hriE@jU`;4aZ6JE58=n8eDWAU;GYje@|^jpYRjA2{*sZ;B7T_w?frx^3e%`ag-m`>BLxw7W8|2#n+@w>g!n$vm2{0(mo z-`G8|WZ^aWU;JnJ?Or#W7ue^iz|Y>S`sU*Mr{A&1xInxhf5v|Qk&5Kv6MmDiS8m=~ ztM;wt1%7bp#=kw;yYtjQ(|cKYmtJso{=?D#FdpP|SI;^lf9nh5_dV#i6n&BndI>%+ z@Wz~VzuWJ#*KfaM&)0je|K%TkkRNzA<3IX>h)x3R2v?@9&2~oKpBHdO9tq}F?+t?+14FV%%)1A#Ch=%YV;?;6@x088(5OID zeqiL-Lhr?V70&v=kN`P&v)wi1_%mH6p;I&B{xU>SsOa@wcz*h8N&o#2eiD{GROq`{ z4-CVGI26e%@~$Jp82rV$Aq0?*xQ!^EPI|B7?Qyl zc-h_!qzxA1=QuE^B$WA*ki>8!8GcQM+bzR>{xpEYB!c($-9(Oq&{c^4)neM;pNJ%m zpOWJ_a+D$OR4OWcslexNRmSlGz@L$P$sYJQ2IMLYHNG_X$Zsb3$0WbSk}vS5z~bj! zfM;1-YkKads3+adMiJwU@CWU^f4?UKWHwBcH9*YQWCBxZdSOo@!f0++| z62mXZ5ZVhrH(G{Pe+s~1@__dn{*oMblH)y#sl%U!B#zt2F|!0e6LU=}Rx41rC(&=$ zzas5}q-_Unj+BEwgGY!xCVD%GmrcUY)gVS{VbdpA!AaJ32Z=u*@w-;?dRKCi-Ta!= zr|gZN-Er_;i9X$m_8GyQB+Z?SpJtFM$mhC(t@3C9caio6(*D?ry~v79%A4PicuE96 zf3SitcLgVDIYH{DNL_&a0SYm`8a~*ylO|hvZR6c!pE(;pFOEf*S`?3ui2H7Q^xQ^i zSb1aRJ!Ji64t_FmZyXeWY`}NJeXPDqDh>19VE!$cH=wr|pAY8z`*9?4B)+)qWA@!# zX_yK6UI9H1%=OsZF;YO|^V>dV?{$`jmv>(Nj=WEj_hj%Y)c7j4kJnytX&8A4=6z)R zeJy^9ai^_fJUW@t{a}M(CEokV+I$dxy1=UN;%nHA-2+^Q>E(TZyq}QwO7ISqwEm>j zNxmY}v{}49^Fgw_Hy=NL01K)Q#QE(98II%LL|P?75wTGRbX>N0h+JjO_^F$Kk?)c4 z8tL#OZ%u1D>xJ^<^ZWW91Zel84R9BEkP zt9Ve*0_kd1$?eZ3#@!L)V`TeF8-Ci^l5TP4*xKfsvU^fc`Rg zyG}e+P4GO8^#nzI+KHc1G-!Jsl@|yw_Q1%YWF+h)jqw=PQ)Ftzj7I#&U|J3)S7XD; zSG#u3@$IdBy)F1epZT~rn=8i3GgO-?;Ob-Wvkpz%c*Y8q;hS(zm^=4mQ;#`2BsU+# zc|>Dlz{$!O?PNRCUrN4DQQessj~S{=P~|*iM0AjX0yToi%>_ zdM|2ql{*GzcXliKvZ%5mKPJU3shM`i{+V5DMpm;@n3gvE>2S&i*_|x&qS8 zh8!nr97bPu5gex;Hf3f>hH_otR8%%u#U27~7~GVh2za#OG!W!CLq_8k#`?MFW?(Ec zlsFN-Y)U$^kd7n$Ib}D|y4f_; z$*Sq{9_84SsSJ`QJT?MewlmbP4D2*C_lmlT$Z)a_9Ai&@7#(ou$mt?uC%+8r6*5(2 z%35tWq8*NsDVIgr8!+5zjp3(0g1RH=Xhod+S0wc;mO051uv)0EUvfp|fbfx^XZ0!h z6h!~i4RP)~kyuzZZu^IrU5btP$j);?neDvpDF;ZeoZEIw!cb70<*x|s{V8rG2o3+- z+A{WxdyV-5(ecB|nDvGf*Ptgte%P;n?>&ufCKiG4D8I#E3xVSr%SaH+^-HqV(+p4T zR0XAWMoSSKuy|)HEjn!G7wb>YFvl6Sn4(jmwp) z{gJ%c33+pF9=|Ev+>0$1+0L6b7u?hCZZ6QIUi4I%+qk*Gtw8g^xUXL+vQ-Y{M6Nn? z^;_m-1x?b;N}@O6KSIKDoS(z4lQ#5CfhAokmh`FzA$AVQ$>J3EIk@P?0o{Avg!7D& z<0hL~x>pike~YUenO8IaaGT$!$W=R4+`Z*oNQ;FKke3>VM(@+ zRSmk|A<^7OiOz&NfFZjvx$8n@jhNidARJbj>N8_F3LwkhPW&p?tLzlAyZ5Lk#Y^D}bRo~l1)Wj^kaX-vd>4U8*sn3MJFIJ=SEv`gIFex+DqdA}~J96o~X z*k{dg){a(NK;gkJN@Y7`eq}CnZzOe{4_-i|J+ml<_vF*w-w&K6=&ovnm&FBYF z-x%(8tA_&V8dOH;8kpOG0GM5+9A}a*vpnB1bK?9?S+-MRv8&iJI8kX@0xg5ed9NMqmqufB0384I40q)2oP=esu8jb#sT+`E(;GjRfHdk$8_ zuR)ec0c3|D1631@&73k(l~azh2}aNEsU7aX3OU5db{_Ji$bX@fn+lGW{%GrQ?0Svi zgNxoPQQRthXJGiwXulz>RIRZ&E$24JEJPK4?dXKFwRJDVb+xlEIEE*2=ubJ|Tno3A zd5nvd*7Bs5yb?!l`TY#HU%}4WiP{7ayFMlC+8vd&LZ!ex1L&rKW_h?j68D24ZY(5Q z=_iwKYY;Lvz2RttOUqHwZu%CbvkB_*Gl{ zQ{6V@mVeekZ|32sc^!6zWjl{+Gd4#`_I2XFaLp>)`MpP7sjvNVm9+~*zmnI)(JH=j zf_`tm<`)O|Rrf&5mUfr#&phcH^Q_ZA^$SZ>5lyd2+um)G38!GLfYqm+E#x30WV0vu^j|AfmOLa&S>k1<4v(Q3akYyLE1md%`vQOHH|4L}S ze!=aa_dk^aSlnKh?G*Xb?YWlUHP_uix5X{^-eX#B*=HU40PMVYII-5Hu8PS&?G zI6oa*hi?h4uI0w}^}|MB?h;dcz;dVb=8hk2?jmvWbDT$D6-lFva*)$9vYjiQwY%Nb zjS1Ky8~+W0bX|mwsK;owaj%|hJv%#DQJEy*Q4(X{oFlkf?7O4bp7${4K;pkOk@CYy zFGC63y6(BB3y?XZgc+02Ao-RBlB};ro0Ay(w7`b-jl57FC&aUzY5i(a96I3VmfV31>-AkxF`9bu zVPSmQM#j@>Qc=07WOFzgU^%^QE~uT2OJik%TOd)ryZQBy;v*=oI=%z?^}4IJjmuHo z{u@pIK8w?4icBt9<l>*20X$p0I zSa#@&Ub-E+&IR4s0D{8As}7{&XxEoG6SOtLnV=Zw$Z@TWJNNUrXme-u+f8$?`|YD7 z$L9|aHwuo8y9RORTP2v&dTzBe1kq=Yma7psv5)!3N3C)5V3ydnS|_wcV1$!3%G9Iw zynr!N9)f#9jQnL!4#^qGdid>)O&IIQoaENcp1K)m-TR_YQ;oRvd z=Hk?Tm6HB$oLea|8-Mbw+g-pqkvbOZ_7^B=cfUqCH;O4h*5>|iD7pGA1Xo4B_~l!1 zZtUzDRry6*LqR{+X4d|oJK_nmv?@!r_Op?0zmRp|x&EmsHCopfio5eutkCk4Ox(=V zcq&)g@d|&m-mf{jF*9Qx9&8apU&Z9EJW#25*8HG#+_1pIrLF-o@~M8^`0F6|b3Lx2 z_5o9?A2GgZ=>i=NtGt772!#K6Cwmdv32K)+2f?5|$zEjs7 z#V~xt_fy2ak9_yYtzs*dlzQE3%b8RjvmUZiyqug9K}45G$6xZ&<@C$X+Q9rpy$4O z*8pkwo84k(&#J~ZoBEad3;6-}|9Y64@w+O3C1 zBR7td*~toNs~)sjsXs^IW+n^M$vWzk_rAIDv%PxT8joGZ@mxOa8W1~Me~+O0*C#bG zV9jybM=#XtsPR#<()zWu5TqQAMho zt6g=B2k-}VzS|`PxlczHcBDn*LedLVljmG-`~`1*{=p_4Go(0asIF7@tmX_un(yA$ z%q7xxjg*!*@}zl^k^B%nJHbnI+_?$rduLnA=wt0}6~i9svn7L_Ttr+iBQDHB*!-7H zHfH~9VP@sGr{7Y!tbu_+zwgAk_F4?4-@EEi?TLH6wrd6~QAeqA@3|MuE%+=+H>!e< z`%m4rl4<)kpNBu2F`6_?X>t?B=_sgZo@<+>{8n7U3*KhoD(*f)yDNp99u=O(Ax!kR~IUkI#7@JE* z+-?)I>=()~)kV3kZH_?DuT+q^W5x~S)OGCuSzYDH>e)`#_hzO#4r_LR@U-k}QqN`k z#rbxnB~6fIIa$NKU0At_*wma{-G5yqzUHw2^a5oaJNbJ7uFY`J8TDgOwTMjHa~(9* zLdA4&_4q9ZeNNB!oL%d|fmdh3Xy0sij`Q)1{xgKx&aF!C?nH#$I7G`n$dA&NF;uFy zGdc&6y_KgXPlDM_xt|5A%L9FW(G^jOsP46PipIeG$dp^JvIj8cr~bh|z6|4z{aN)r z>s>iOuP$lffDJ&dAE5po0M>d^Zrx!=>J3{l%R&|EG5O|zTPc%hv~5?^wI*(}!VW>6 zKhl05Npy9==Hn5MIi>ovifc-oEn1=WTcKjimsQfUfP_OxsNS~!?mk79!`}>A=uPL` z*2vU+wBOhT?LNL&?G9d8WwjR%a7hioaqctQi6kk)yL73(DC(-B1QH+eLQUSwqz=;K z;DU&rG>B;ZkyKZ97_y5|M9l0HXXUeU&g@rNcPYURXQhfC-@SW8E|Src&a;{y#{i^svW@*t|E}kN3Ft!|p@| zqLQ6y?k5Y~xeJz+&j8e^WS&O9Iw!&60CRG>Fy4_OFUOfc_-YbP18Qo<&WBodj=GgNYZdV_p zAS4UKnA2oA;uIOa{=2jQ?Jejo$C(doYM#5f8lIf#&T%e+QPKwX-iECFA6Tp8~zVvI=HfD6_hnZrG>`(O-P`6C8ralywZS}|*B;aZQuB?~T zu1vYx!)(grg&%K=1-x1!7tg5M>Cwy6mj%hFNXjpcE;u{`;jC=#_8gyB3u|&RGO=WY z;}VdT|)0vAHPWGPJ~bcBmIJ!_~k5FW}aQ$un?OJZC#4_)i-RJ5@ECX^K%V{er)WqJzI_nxHh0Dt;y@${~F%>aalkZ)?mS(*d?w?f@cCTE0h zNuJp7T~6&zaL|e~)Red_gzs4ElCGj;o2Ln2=dNY|#1)>Lt%T^^NA-Ai`%d$7^`CJz zdk{QQrXaSX{i z6(SKIglsY5HCjm<5V(+??d;dDYboDOlBiSaKA-CvF*UW! zFHjdyb_2bT*t@$)L&5@s9s6-byhQCH@?N-vw7xHCUEsGyTk0?#u(i`X$esilzWbkq zU#mFVxqHwW$6m(e&O0z=&)DSauiUx`XTQ990BF-Z&<+6I6CTTzISV~yk!nL5yPiXS zYW6xLf0Wy8SY;a9BNuv6+qGCY%?T0DWDu)^2R-z1xhvKd_2)U=qD0eq%xl)XbJv|_ zXYdezy76h9*=RR_prHxhKJ+A>U9qvAr9#ubeJ<@=rhn4OET|#p)tbXwwt_+wXo?iEz=UC?RQWKB#} zodUmU!zBcNelT%p{tcCvA`M6qgEF%Aa-6d3ip~p8-dNe|B$i2VP9+@C7DjUe#5ZP^ zNR&4*s?aDzb$-x^?~17E(w6r#%A>L%J#A&(0cK$O1s+ruow0BSl(jNH(w-k_HOl%m z0un2gvR36MX-E0H+R5H?D?xl9(6R2IyPjgAM zi@KT+m}s@Hb)vnaDdjidhW13_-IR1>zLHerkwhCal9)M06yH6v?x8Gd4wBQ++-j4J zz(Xsd=9sIo@DHK63yschgjeFi{7oCKgLSMgb|!DEDsn3E6TO%MnD-JpTxrM7415u`?4OgGRyF>5PT1M(kIb z*c0$dT$z7E)%7~<$lP2O@eR4rYZyQCPErq7+VMXKX2`gY@#0BmEPNy4zuv_E5WEuC z!+>s3C6jfLiT@_X|1bz7ez?+(|7kEo#uJPePda1aTM+-vCjQOvO5B_(?{8)7&mdT0 zhb!&aUj{Q|yueuTq%#)29kJhLVt)l*iQ9a!_tEnDqIWR%R}n0+!vf!0?UaD_t7rmwLCB~1doK^gAr5*oHD*oY&7qaM#h5rxn zziQ$i39rPfsC{niU;Dhq_;&_@q#v%d??ZCkTz6YW_S`@LvdG3aA7GTxo--05fDvW8`?!84G_7 z5T6+kGvJl@OoKq%*Uu8aAc!ca1O!}ZgQx^EWE{ZA@uV{r{wF|uWk6KHEAdrwUAVD& z1NIZ}H~KX}RD()Dz?BY&FGn{7N*V&ih`b~gUNEL6GJi~@c1&dMn8=(ls!u*CF@MZW z>wg-Y${%M!Mbnsuz}}#rJeB<~sg&yB6+xehLHoqQ4Pz2>#@w{wXXvG~%?uV6mVPJA-@Ty+#QPDsN4$h&v_uuR-wNdNf~pkrvvDp@k7F|#31 zmZ*jBUufYIW*j^wF;@U;oJAE&$CMllBvSygoFd}4prV;YEOZ5=Yp7V7(5s@KBYp~W z6A9}u-q<%5UOdJZnN7)JNy#BQn35qShm2{=Y6wh=g&UK=7aLtQN(_gljG<^CT@@K! z4JkQPVyN(Hupux5d9)Oo`L1Y%T|d88T=l3dr+Tykpq1-_I$N!VW{U2t3G6Qx2xCas z0&5xqvyfRev2ZIauw_i7c}(Q+F_FWx1s>wBe4R#5-Xs$3Wrd036Twe#HIa z7`zK?MF^;O1ncmnFN_q{7e`-VWVCZZ3fJ}^Ei!W!0+k&d2>A*Rn4I)`V&TBpn#k5M zk$)Sg{Ip5<8)|e5H2Pg26U0FCn_yz=n432IHYmsv|Hk{heBY8=hq26-+-SyFNd32g z2-o&NGzdQ*4d!D}_v6vSwnIB(;g`nML|zydd2XDZSUHZ($aCX1ZMe^;%xA|bWmZv{ zFN`zFRD^(epGTQ5kAw8%O+y1$I!M3Z{Ldx0ts9RE@gPzNJfE1dMSLV zJ!uqYVYr#dD!?yl==?-R!KMulQ+*Ey>y&o}YM=b*umXs?42+V`aHS3HVK76+eT0N3 zow4xlfVOKvq|iWn1ik|85NKf*rfL$q7T~vuZ-s#ND4{(HXyTnw3IFH>LVFa90u8RT zq4DNz$an=0LZdSlejd=CEr@I`h&*M`y{YKlQjfRQ;~n*QS3TZSkN5Eizg!?m;YM#J zCHztWz+ae~*ld&ZlzFQw2LWf`{zS%CgwZKqpD(j=AJFgBg2YRtmVR0}%!t$ktrGui7!n_wH_JK#tcj24Emir4)IbjWL<4Z8t%1MnCK~t<4{CtU zSa@tk_f>BRMjgX6wXc1BDgf~$QTxp{i z2WH3^g$Gg484K?T6nhj#iVcba_$G=KiamTNzJrkHUPMudH$eec+9-;^3>mxQK@@bx z!g~WniGeUtQH1dbM+y@q0P}RP?2gb=!E#KO&}#NXP$E(YmrS5cCaAsOC!pX;8&sK! zaxxwSMQ1Er22iC2RJo$q7msjxVWPA@sA&jFlv_|!2x>a~1Qc9pgE~+}8O4L3=!}K; z1E^_*k*Nk(C43W8f##WDVj3eazbLd>tfmSf(F&rd#+#skD{T~YV1|sjcn}4hvGD#t z@!i7641=N`zKIzM#dm!u8W0jafG8H?O;Esl4h5CxsFa3xS2XdoP_D3;+7 zt}aX*2r$nD%kHdvHi*$(KCR|(1SP5q;gUX16+s;VKLG_-+MrgbD3{|wP;|z^H2^i+ zfI3Q19F0eKUSVQ(e^9Fsl$d8h%_XQ#_z5Vu(gxM1qU^?lpy%j~eC*eU9bjHFlpjcEGX)q{Gg>Rxk zp;+WYaT-FRjYP2#Z-N4@v{C#3%#d*=9z;QBEW8vbnhb>V6vYL2gbyi9Gy%*D!Lr|+ z@_f*AA}&Nw;*di0E2QIaFhN}eKLG_-+Mq61QC@-vLD3ltF9WDU4X7&=#Z`EOk0?wW z+8@-_2ud7bK^;y|*T7Fe!Id_sn^lxI;6YGyV)6i>S_&i02G=d{O*8||qrpTABQL+? zlt;vBZbeA6jVOMBH$eec+9-YlX2`f552BzGBX^)!Sr}?W3_J+@LoiaAu_-BRl zBEl10wjZ&E$XXrycs-EC3nM2Ra9_hWaWWu1qah{Y(rjr^ z|3Ywd1EG9_H-Q3I+EB74h>{#U2!+mA_;f%y&EOcSD6;VgpHY}N4Tzp2q6?rTR?E8S z8jkS98Mc+!L}Vl2C&=JR8`)?T??^m|jLum2Tp&BAFmjdwHx|B$vjFK~4JmPs)Y2N% zI0Q$}Ba~h6CQ#r?8_EPQL&kVK2!+mA_#!~Lz~Bfeiefy%7Z)Zj0HPO&=t3xowGjSU z+$JJCaj~rwe@J9|z)z6Dl{T_c6>kY1L`G*Ud^wO^Rv5X&fGdM<;u1i5R6|N!CY6!~ zH3h-ZpAbqp-UJFx%#abqgHY(i`aYmsX>iPf7e-(AqL@4JCQd(H2~e*R6sjeR zEFTZnO~&Basl-q88X~F$iy(q4ZA7(ThKxBxf+w9=@du*o4Wjw*!qCfu==wnr-9$wE zI+Y-TD{VxLV1|r^M1m)s*aHAWHycDt;N{oR%|P^j1L){hB3cR-K?GOYh?>C+8T@t@ z5z&c#0YG${LDT{-zm9Gj1koKtv>Ysg2(Gjd9Svs4SV1Is(uutSKy;Tu)Cn)NcAi|j zYmi*Kn}}9}MG(Q2Hlky}3>n7|37&Mu!Vdt^eT9*G4XEScivhD*%UVX`zORrIK{WOz z{3PxL#y8!3d@{%dr}#RsMIR)@6YwSw;Yu6g1~5a$$#@VVow4u}fcRKp$r zAimvCix+||`T`+dgg1c*SK1JN0%pj#1P?-_6PpA8@zuh}%Ld|=@bzo)RX@a+Q$oB7 zY|+;U@oKyYM7Yw1_%kp=#`Sm*BAv1DJAn9BVdM=1@#pYGr^}PkZ}}mIjQ$oLf=gh(f*9RcxugYP%+!i37b=*r+rbSx|H1JL`-R&>445Il{B z!0!F|kcbjs5kzpMjpzX|L&m*Cf+wA^@Fzg@u|f0@yfB;MLGUjgHv-F$pTRdTO`E&2^1{sC_S5w5f$ zz7J-|cpDEwq%#)I9A6U&jE`(J5I=w~CVxB-1LJ)Vx2A;nA=si><01AVya`0O(uVjs zm?7g6JP47_SU3j|hmVg88?Wb_zl1Nk`yPnH{Sb$ZPo>4bfi0R#h=0eMK!hu8h~I)4 zGQP%x5b2DCM*-r_2A>lIzRE&ukYFm2^QGFDBBIVf8TM zipL|LWEZb2riOs=OE({}q{==>G1#JELY#;zc z0MI{~tr%{ic)oz*i8VB}A7UmE)q+J3!Id_mMPP=E1w?`;otW4Lq5}=07`!k)=s|Sg zAc(4ns1YoJ2(GjdEdw)T984s5(iscS1)@0y(Gl>%2;GBd&LD{95m7T(1QA?mBRUGq zkkLvcc+!bYaX_?Sd}O`>bu@f2W2p@5L}uKA@yI7xLY55$^MUbOHy^RBfW>na*rE#w zu@i3s5w5f$_JJ8Py73@HIx*7>h)v@oF$3{9_+mQK1F^{uF_seI@nDM{Oo;37CJ^CD z8{&E}L&iyX5F(wia5EqtK0b1ofp{u>F~#A5c(@LI3G zz$BR9N*hxU%#bmjSn#AX7G4KT$BmEl8CXT|^%v6P0Bb|8TT1)jUhih7E~Ulbi=IG? z6Y(Y(;Yu501k8}J7aqh&XDoaQFn)i0GzW`o|F<}8Tg{>iE#?v1S4E& zV~m0sGN$1{jC97rX8_~r<0GdTj5FcuFQ%s_VLUA*#{Iz;J(Cy@z?)!%D{YKV&lil3 z;X#aa#=^gvR1^8-q{yw4bVqzMd=s}$LKi9VOa5}hPX2K0FT-)G+b4nT84w5rxYCAD zSSJw1;Xw#=Vj>F=?wS<&wSh1mzTtZ&C4N0g8QF$YLr(c7{IcesfI!)?^(HsqV3%~_ zu1RPxxbaB#7Rj!pd%$@r%#nx1Hf^{{dH`3+Zszzj@N3DcuDP3unhsw{6kKU1>eWU` z)Ju3UQFO+_`;^v1BBffXufr=5Dc!VTV@REP+_>Qy*@c~14!ts2@A)aR_uRDMdeE{; zMAA1&(*NkE$pg&|F3p)j^S+;^05msRnp4janm_qzf}pv{(jZ3S`M^)J7ifO!(wr-D zKJ?R+f#zqH=G2RX<|98%1x_@olshKnpZFLI%L;`ot4#3R=Gi2oALAZ3r!UqBFywXUG!8!`Qi5iPlnNeaMJkBLnWk>lS5*YJ$ z0LFK~jOfQPdOYcjh3f&M&R{5nSE4Qn1B%wUp{*9ec+d!hh8=)V1ZG4%fl=d0Cyq1# z!eRrV7+#6R7J{b~h@n^SCsi5@UR4GYK`v;Tb^y&}FayP2M1d!rvGAclb8u;7i2)RW zZ(@lBq^f|#!SL9S3#F(!pcF&`F9b7WoXhy}q%#)&iN*0lxclJ<8XR_L zas_c*3|hefSK2tP05fD<#`y81GZwzi;9-Ni{>bos?TygL0k<& z0RdM!AZF|b=5ZMUVl*BEL1!#Hqrzm$E^tfl;~N!Wv;ss0@RSJQN;|>{V1|rc84;dz z#=-~K2!n7-g#S_z9>@qo@RSJQN;|^6zzi9CFd{tZjD@Rhge7oGgkP%&XEVY{@RSJQ zN+-gHql^Lei^l{!BtkyJXU?pNY?>L_I5TqU%*gtgk@(EW$ulD-&eXu3CwP7$W6qp@5vtD6WwzyBm=W>M88M!8#=_+QP_`&iYB1aeUv%OWhTjlF88B=jhE1VFX%e1a zfm-lP-2puJfEhUMBn~|3jD@4XQ?V#AeNkjz1L?O2K!;92x`&V|7O^YV#Gk};KsuA~ z&I~2?O@enXI0fE!cL3hQUtS9R-Ew0pgjri2VVq8C(@g)Fk2g1E>Yh{2jpaKA3^yUE;u#PIO^` zr_O-+6THwsdorjl3BU)S5C9E30N~$XM#Nt;Vm#@@pgxF8qoL?zgn;Ld;AzZ^?gLkek@G&~@B`qG z^k~S5KjD=G8IOiov%50>Br-}U0}^?sha_HNNT;sX$>${-kn<@XOckB6@V*dU6Dh}U zqzpe=2VWpe>7W9hr2Y~<;cMoqi-n#caPnZWlqz^CL=`+0N>D_SpSoOV8Ui5YZ;%45 z%z&%JNanpAVSY$R$$rTz8&aQlrHacZkB3-syp8f8{U3DkIGMz@0~+GJ9gqW4lr+4-ckUF8m1BKse4^;8!bW z41$$%YT-%3aqtPhq?Pk3vzX*s5x>{wqZBb00pQ>rB2dIZaFrM-yhJ3-&!#FxyzZ5Q zq(6u9gMu5?668ja%o0j~yh6&OaY*P6B)tv-AZH#POc9;2@InZ$iPYmaQimU%{sjnA z>2HK5sq5hrj+*n-ZxT3}PAxj73I7T5($rCwlrnJU8&$zuq39xnfWHC!&_)wnB}V2# z${YtDR3~qvI(cs(soE;M@)n7_63T=0#dJ|O659^w<}e6=oTYd$wRB>p0>Uv@f#1jy z{Ak@QLzvRd5%47S;qVC`=+h0EjBd!AS~rIw1pG&UAG&FVtHj7`rc8eJ#H*WBQoXv- z@{SaFC6ov0Ep$;g61oGrxe)>&=UP0NS~_FlHVChYEXQx;Nc?Es+=MWto1@@K>R*s~ z>P{O_&~|1>ye^YNYcw|rGAHRJL0L40q-N>uP_!K(karv8L027cl`xKmsgB5IT)#qC zm>+l7I{Opt$;2Xhvhv}2TN*1@^6etIgpwia4!Wo{iFXIIc0U9_&OLY#8=bLmH-y(j z*5EhN$)BU~qgD3+2$bsj;7OJT;S;`mjH)U=Vp_E8%XQojeE@c6OHi2h34QFwwk#9TW1&k&~5KDRO#hu?@Qm41WlVs6HrxP$wU)B-3v zsxV?B9jaAVBgGUzM&Je5h+HF_5{05k)KW-9>8knAhQJ|6!=bTo80B;8OD0jSVP>pWesRU#a5elCf6Dp>Ppp{VyEK!aQ zVPsAPWu>o7=K?Y$0FHfy<7mH3HMzAXg{bgOD}+mRH!-`la(sFys+cC?Rx1F?(IraR zJ^`8fj)!h!Iu%x;G}EK((}mR#SSxlwh-urwx`x2llYBP@Mk)HlpUN9 zJ^=3tdf23DY$vH8hC}HIawpqC9LjYRnKyW6&~pJ`Jwi)nQN9tv*lj$aib^;^w*hnj z8b1|JJWiv~)V5I#24x#sVhY=sr-W{Vlqe%8(H@&9mI4N}ky^!h1_%veC0}L8{uHKZ z&Z014uo9glgRuczMZGq+3_8g$H+%fRa2u^kOOPpL%qZ_%OJkJhRk10FavwB|h*~bu z>bwA)UPB^osFgQBi!q5i-AW~X3D_a!M|d!==!}KyAi5@U5Po&DcB!KJv3gvt9#^Qx zm3V}|ouQ_KMxe}x7l9Gkd3upd?_S0526%}-bBTrU+#kYSK0lr5ELj++gKq;BiZaN^J0(xdJtuBSkMvlu-LekF(CCoG}-VVjh)y(=Mc z!X;s)9IQALo=D>_5gpCqc04VO*t1b?(TtP4{3=XqrMTimgq4s0GVXwkC_$Cb7an(c zg&Mm!k9P5;-Z>JiI9ZYY#!HG~yCoD|KuJ0{f#Ak0C7j54Cu00wcoO^X@C+XbU#oVz zsC^%TN?I7iaBE8@ZN(MK;SCY@Yf%pvQPKoskON)C3yjG#347T_N)~Fg1={KiYcnP$ z6cBVAER+W!+J>oOKB40KD*A^I7A2Gt?ePe4Fw4T5(bfuz@oa3-RhebFDRHOF?X$!k z^kk&p;*TD{w#a@e=}g5RBZy>Eh$|3}TM*jg33x#1R9}hK)06a~?l<=rG@;@YCFmK1 zF<+j=Gu#2c{`vA8f=Z5N5X0Sk(RLN8SfxZguSLCJL`jpl9r>aKdGp1@l$0+oLbOF; z@@2h>{w0J(38h4Pyh0p1mM{M3lk(;F1d*IC8x)BDvmms`Yw$q6P<FZ#J5@=04`Iw4nP~2TpCtsOFGJGE&O#-HcXkChzicVoBCPaesW|WKqsl`m`J3!{ zO8O8qCC4ccA88POCLckl8iAiT*tFsDBA+O>CA!W)eCNylxsQ|MQ$$vj1@;#Z zh8Y2&&zfdZ^$EOj{aGKAZ=zQfo5=%lWlF7lzpj--Gl;(ASo|P4e@%u!=>H6PE9%ch zgP#!st8bespi`xB3t?oI=$zq%x}|ZeK*Ys~b?E`HN=&;uDRbVC!ijL^{6F{%XF?S2 zIKZ#&0sIr*2<1K4;WOYZeFT&=R3GsPsCyEmWl6Q=M6I6BhtEflEo;i3 zw{(XuBn#!(s#A53&kief+R=iuONWTDls*I2KVsMG9C>z19$%LM4 zp02ZbLTVa}HT&46Vw`!oN>&hr)If*~)IPOT@e>tT#a{Fb}f1ggihICi!;ERTyEaXtK856P%4hN_479;EL)zp2U!>5}l2c83WU4 z^8=4C!)Frjzc2m0`Gq5Cof)fbr6bJ-j`A&0PS8GdW`@*h{HNEXU@=@>1EcvK+ z01@t#5y)5yqQ-UI?QQ)j1Bx;iltVKEEs&cL$jn%tzq^)ygq6>ag=@K_4g{7VXhF-` zRs8U9W>yv|)cAKK;7|lqC;9G_u~Q}@I9f-r3K3*T0#*(jLHj@vv<@7>#a1&H<~v7u zFi#X+0K(;#;?e;quCWwXl44_qN!}ht#!Z&udZDli2pfu9Eyd0GPIoFCcUX$s2B5gx zQrtBF#RHb&cLPv7W+@&XfMTK@wKJ+YJl|CkD1_P zq7*cZVJXPWT%w*COZD?$J~J}24pHu`L*>cRIDd@O9P8@qX>E^noY3xUVhW@rmH=NM zP-}xd2C%|+1c_O-noYg&3cy4Iv*pW~=Gl?9|WIRtqhVGKdzMZLlW=N(+Z0Xj@u1 z%unNy;nhMrs0PqNAamtlfgJ+{LIJOWhWJ;?So z=9z(;wUmIZpqt&^*|E92hy9F{o5XdNSD%;xH*R**epKW+2Sl(R??TM4y3pxo>hmP80~xy% zYQtJjCE(xb2Jd*wTQCUkt|@toEbjzQxH6LNKw!5*$5VB9EcYN|eS28}d!!OjyiEa< zt$>mg=<9UKBS!eCOgS{?j6%w%Sl-e>c*|4rR#@I?p72a1I}n&U5b%1F@&l}Z@1_zk zW19l1tbhYkpkJs{UTuVee58D?<()kU@4S?}^_F+OCtNl9sHkcO0&Z)oMk`=Z zDgh1K6mYN=(3ArGVx96sjBr#yx}HGF54XIB4#ImxO5Qfh+u{kg)ok-Xz-?W7v=y*2 zm4Nnb3Rq(WtV)62l=Chl+*i(zwY+OR;kK+EGf?EVtbWf5I6g(>rl_50g!_ux2Fn}w zgxlhB@<5T>; zPb}|co^We4mkboSHJWRzfGbl(zSPtwH(9dl2P3=HlHHtw><}aE4oi01U}Se&vb$1{ zS!@qlvipnM)r**`=>#DD*H2RLPLSTR|BCw z+Q7-eRkEsg9T=~BA6@}lw<#dk3K*VBz_9THbTKS~d@Eq*@%{ToT?S}@B^x^!+3uEX z{9t5ZOIB=9+p%*|AP^b|b+3U_Y6a|_Nf<=Pg!*Iy=U^+KDV2cOHU%7M1stAAz+u}Iu)+#xO_9>L z0orNFItC-_v1DC?k)2@4jL)Ed8>IZQ1UcADUlHD`OIaY_Leq#JoXawTQc*(TPh(=1C>Xy#VF8YIr9EIr1LpCi&| z`KdjzpDE!7Y**~_ZS3<(oyykUj$>u|tGWwQ*~eqRZq4dk5n8idLL02my6vKGvh<6$ zi~cZ6e{iWYyR&m1<|H~X+h@V5GO%R3gtb^nEvbRI6>(^+ki*&7l{&Yqo<>*r=xeBJIfQlN@OkHE?KLrtfRJzzRS{gZWsNJK+kqt%GDKK$Ms%Ew8BGn zpw}_m>o{wsDbJf`ItyD?wqp*bw;i^Hg5;LrKw#rcr?RsXYbOlh@`x|=)S1qbj`rjH z6S0_YSwGWZZGic)p7yog#TJ$6@tID;iWO_y{gZ+x14vI-D;Nf_l@n(o?>pNUv~+i4 z&MzgAC?~SW)Dn{xIo++xy;f(dhN+gQ3`D)%-sJ~XHIxp_{9Vgj0iqS0fJ`d+(?w{j zcV2#VYhd2_mUrHwfz7>UU;zzQK;6JZF-x>? zV50Ltqo7pV&oaX0VCj%z->jq zqi`w$p0HCXI7q)S0-n*+G6urP6JtsQkEJOQO&$^T6j6Oti%jG8ICdOxOd!BRZ~dh| z?^Q9+Tq)^CXqlNAJeOru%oAM$NawM!ZAj)@ zqVsKU3V2{g#ldqyDh?j%F>&xf&_HqUY?3#Qew8544|xeZndAe(qcaKwPvj^NJYHi! z@GQ51Xh;Rmx|fc4lVmhPPZU z^kwXhw;bI<1v19N<#bn}u%f@Dj&;l6C|`=_g*}K=;LwYzDmm^yeZk->z~8r z#!Q}Eko0Bp_Ck2qAmg7^VXu5qLs+!rS)%H;Or zTqh$VGn3ndX$hH`-2aSa6uh-aDC{J2xr8z=xs6hEkjcH2Du1~#a2SekX6CVY<1i^R zlbipBh>e|qH|~kZ%=n(XL2?#%Jd4({PEv1JbUxYoaaXSj<0W6Stq)>=udy14`k?@Xfgmb&4(;e&Vk|BdGbYHSWX2CSM*G`!xcL^E= zaOdG53gAA#lp+He+?SX-J&253lUSW(W^m_{DhJ%Yq{;y|NU1#ICMtOw!d+bIjT^KK zJnq9oBz-GZ_?CxF{&07d)4i~#{aBB}SO*0%xT((RZfxmU+1{&bDNkl_?^SB>YJUJX z)ul}LPD7A7ZbdS^8*YAbx(60~;eZ^;>vk>?-* zxmYaBsTndBcW{8;``6su+SA+29(!kdbGO;n1!0ljxxwT`>iZ0O5 zZy5ZtQBN5^>Icfn$QD|qqdX_27W${hXpU)GJY*cXTcgXmd%9Nkw5$%Uz%XQOaIfPl zrk5-`u47GG*Kuout2%nuE}K%etYb}UXJ1=8UQ5eLr%W%OF{89>SsyZGS!-8MJD#OS zIa_i@4jnffxJKarGi+hAdBA){elUHKANAXnAI;r;%dza=KN-}n4z#))X=KB$LP%FY z>p0K&AE9(S3U0@-rqtTY(cc$J*S!eIwqdK6H@EinG^4&V;e80twc(wu&8=N+?cEq= zGA^VE_MDL~@)-xt-T3px1A9Bt1YM4XEb8(j(Pectf8b$Y+@(5C1b64tl<`r0%BacTb|{-ar0x zbD)<#NH_3=7{+p_%e={(Vvm0jVo?5pJOVZE)VY^_M4U1MdBq-oVwSptSka2{&!lZ{ z69>Xb$3GJmF=4|QSW$fx0*br~ZT(FJtWjdz3V07I{F zaYIltu37M7+A0k#WH2u>bXltQ_>cDZ&++(o!{5~DbCdjyoLY}RIu@3Gev-eTU*Pd4 z9wWcO<4-)sf064iWrhpZ)L}PhsF4`mNN1x+m4ByTK>+fhRR} zDEuhw*`G*hS-|YGeX0CHnF7-pqEp$Wfa+gl(IfJ>)_-kxj(I&4K+X^jX zrJ)5j)|E!j9j?D%;Bq(lrQ!gFRhqxkrORWvH5k?ye~n=_+~oCQ=+-ihF|@!y83w~z z*IzJj)tmgxU+SSx^B?QdNnKzt9B=$Jh8noZ>&0+_mhnA93k)m^2E$3#KSSz_+@Y%d z`hK#1hVnnf`l~W$N98W%QKSJu^4RaVb$o>RZ1c5y>}^OC8mX-FM5YnIr+ zX-018Kynv0G}Ku^bbwRY-|2=ob)Sgw*3GG`Z(7(qcX310LMz1Qt8tuRWNBTqj^w{r z*Jpu-c6+v=txAcxvbwQ$No8X#R8ZYe-#F*sMip~^e;xM^jJ(wSF|Yn=>tl_T_0@CS zv>2_M5H0gOBU7j6e7KX-a{>IAo(m1_h#~n!Vwu#heh;|syJz6NM)f^@2p-3&>sqt2 zrf-d!m6kr<#p1sZJNP@+_O@d^N%u#7r2KohG$MVB>8g)$iTG2N<77EA`_`;!S>4_i z>1|ngfTYpq!?e}^7y5du*(Y3M`+1iF!)5sYc_Z|(yGkGR;5ap%Ei2bL?7NZ%LrEv6 zbSV3*LobIr1>VMfc+vOyiI)E}%8%dbWaekEf8}^HcH!dMhQ+mwhcwTtojcEAcp!Cn zeZ%4fm31fqq`_%lPrKc|h5}uhlytaNxWnJy;L20TRn(7;wdpT9Z#tuP+!k*KW zNJ(?5D4ADF_e~juOq1U9Ray(DixxhG7N}RH=OwfkENrO0D`)q!)oP&F6zAph9Pg^0 zBmP{%EAaUzt@df#qumFc#VxJvSmx4ka3yZ96l-YJQm+*Fp|$_8MvvWtciMeP-&*yi-T! zoq90uOuu<&dd)l2Bk$pqbz9?{DqZ!=sY1rGZpg^{x#2DEwn)WV3 ztNW;=rQWD7mp;=;(2aE5ji>0vBb)eL+6?Enn)colwA8DY_C8H}zoFG>W8au`s*fCS z9@KOXxpdM;&(gYo#Pydx#-pSMKcCdiV{`-m<1U@AkN>3c*Xeo+ZvImSOFVlLPty$< zn++}c7{?%Fh{o`&_0Pz&?^@pT2;;w3-V1a?-iww`<*Ps5fb+7Zd&SaaUs;;4WzAEruAC!FN-)BaK_kB=#vAPD`8PekDVe64EjJ)ZpZTK8+j7nq` zg7xy3aA!N+H9hU^QulH^o#*teZEsTtSaNiq;%~x7UbYX-UgW9MQmXnCEA0Hy+GUsl zKB}v0Rb+Jwx-mV=*7me6TQ0MhrLD-Lq2vCJIKIOFbi_ej5UbP=o-sG`hxM8_Prn8o z>HlTu@m_4+Q_m$C{FSlV>gL+|8g>BKyY#0eIaKG-w??+c^>4Vh;-A=vOW9DS46ukR zfPt2zBYuT$p;^m0zTE<r*BE1gv$%bwIUwfY31XRx z{X^3;n8*zW-1VSaZOYxtkzEclONE7qj7%Ule`RiNC+lO|+Cr{!73eZ(XSXTPPHIbz z9TIDtvq17eiS&3t=c+{@c{gZRi<)0VkVoXnVM!i}wV){h_ww8roOaw&_%J zTb)+t<>+6n)M0t~H#B}~d9-dXpVcUw=6 z%p4m8E%iUkK`%S3Y-rT~w{|T+a$MDQ_9LyNS$!;9@&{~sW(*_-6#Wp!sSx$d^z61Y zGd*}nlIN1w5^M$)cV60#~l)+Po_3^v%s*G2dQhff8{!37i{6{pO{0nEpIi&T;d z6&J3MN{|z%q#!8ge%|ZXqmi6cq^d1#-+SMC_ucpIefQpXyO-ya+0BjoEar#?7MuW%8(1z^Z3(>~SFA}e`R=msEVvH3wgO=uTIsRwfH;-%_2My5@ z&qSYZGhVn-+gxSZpgqk;<}Q8$wWo2;fDh89tF_HFhVHr%z7N<8e46g3>lR!hnLN3q zu9x~Z&EH1adX>u9`^(4;U@J2_e*)6nwGT5tfMsq9xBLqN zIxKxZj5&7~!(;O&=BbvlZz4=nOIs`p9mO%-#iW125OfbOVXH1uDXr;?VwW6EE|dn3 zxiOu-a_OCnj^dkKe-v8J&Yw6;;Wf=!d3$7#&W6Vsjm*;-(@7oW`J!r}rG?XGo<7Xg<^Q!k{ct%L6!!-1&sRtk$J8-}`8yh+=CH94T- zzhEC~dxIxuHHX)|PqqoXwfaXFmQKrkHnJinURE2Xw9}x~`k21u!|@*2-s%3?LwtcB zmrmj~?Nj+{f-XEB+}1yM^2GiFM{MP1arx;{$w!S8s$sjHbmOo+l}-nKJ%|%pP02Gk zIKNg4I^DDtwt@s2O!zUkEfSuwpZ4OWT+?q)_57(o+pTbMy(Ea+e#_uiy10&? zB(qUm*LD*wuIHzna9_|&WV}@axLVYVVr{qD#YG9{+19u);vofpNPW?~iY`v)9kgpv z9WpX=pLA(DQPM@$H`*HpMs{n@!Pot+&*I}T*133+n#z2=3lEX4Q}_lK-e~$$DXmS~ zjnb&PC#Z4Gj(ESsrR#KKAu}0iS+|WY&Axh^A_qAYwwbR>U0gkyZ8syo-toKBD$C1U zd>lpHdQ{_8S3Wnn_^=&zL%*3e!e-#C@n)B%6G!{zQo9Ri4ws*cw>yFGSGagAS`Z@# zngprIZC>f(9sY{jCpKLP4~R6S4b4EhIosgm^v&+ffp$|4^WtQlPc9ufx^PTAz6fJ? z@bd~>>lE=f7EETi6V_Wvm?GET?Io$Ed|A^*3In)cmRD^Hi) zisJ+A!Zwy+Dh?9WrWFJDpdQ*CwsHU$2QwkqVLm4YaOgE^=$Odu=H}N3+cu+p_7C#7 zs5>2y_7-0@!TD2Kv6!Tm>jCNP9^Z+~?i_;P)w?)8`{L5V;{2f_SU&7>^4Syc(#6l~ z;n)_JZ&{PKrM!HY9@z`XH0s5;x>5ZY)xF6yP|G%S7i7Ge#-1`RhRkC{YFlGd8D9;c zvPMD4w#W(?+sZTsjRBZK`!P0_X@Yj$khwI*)}A|7Eoyb5Hq_3Z6UO#3E#F8rn;6m| z6uV>W@Zh)(A@3q%o0+bcP*;9!I;hv8&YY2>vC&MEU=pB;gO~S$L~OXR&y24%agc;{ zf5s1+ezj@N8e^lGh7PvwTqnqgm=|NGr5|F$7_*F!Y?86tOvh`J%;CuB1hHgoh{o7( zrUA=&3Xzeq-&sGs4w+zgZH)b98bO;CW}b}=H{&=xFy7d3#zRHB5l%~$k&&;l z6~|iF>h#qvUD#{yZR6a`wg=1n8ka^io6a8Q{W&f!_Gc{{s;{1l=ku~2bRD}vbJL|L)HN)Cm3KJBBGlBI(uFcbu%abO(4i26q0Ts{n zxx;91s0FFYM&*u9I;Xoqyu-BcJhOFgO z3`d#Q?gcKL%4|9g8iw~5=I}c@>SJ@;7rD3u0+iwbmg%6}x45*hDoKchWZQV1*)owX z{Dw=L?>9-IdeLmQo?Bg7HnZd_#wflJz1)_=Q(;3+uZ%I|`D}M-c@rZj=rsMX-3k+A zuc3gvKX$luonEyWCOGahg`qj@bZJPDoBkZRkQtTm_hOeWNt(TVDO8VdFfd7>*_ERS zVwfy;#PjA}XkU_}ZHJ9UP)9+@(DUPZmv-0AY6z_{ZWPTShesF2`+BL{4vIq@)zhsk z!yAU;wlVHEhvK#~4sZ6soT%$)``p2}-x`YB$+(vd#l4tuzdaPUi*dV$;$Ffye<<#H z##M*nUdp)IP@K=W`cPbzaluerjd6{kII+7^LvfS3A*;AD8DEc`G<#;M(HCN>8yB+Hbo{ z1urm>L5!eUq`lI`sn$*i3>sA<(}?s09ldc+Iu&hQrQ=1djMvoyL)_P6An~;(4@*h& z4PV6pTqE|UxS{erDfo7T6O5))+%>Ujt**eFtUx_#wNXgT7Z@gtbYNHm^mUOU$)m?_ zJ4%rV$00Xj{NKUPog=iWZ?`o@^&qM3g*`wJ*%k?p6fCUKYuD(3_wr~4pYdY`^NNpU za1s`|=uAJJ!NXPuE<)J#J00X8bk$a5_?Ev9TyB}zgv33^+^r=^t=;3g zEhlq>n3~&YQbabN-TQ*Gn^NJ3rMV4?`=*huV#yW3j%7UJXvVXX z%y`9WpQ{y5Nt?6*$A{B1qAzO{2et*}WOj;*ql4S%#-zgdh*JL68W>`smPVcH3@prS z!+M255#Rv`?;8|moqy%|64TzuRU47+Zd9BrgG&`=C4+uQFOg8;owlD=9Hx;aMHQHG zZ;o2EJkVIj1E44CSU`HH7@K?y6e5MIWoj&ShmRBpPA6?xGjbYb7(6G9KF9c(+!pbA zNDGiEVBQX49B_e7NJFg>=(E}iSnNK{0Y5!l9~bclXbo32ggsLMYd69|lnGQ30`blm zDLA+~3^=Z=1ud&T>f)22Oa7F}XO0cv%uaPtmI*p8dYuRD0QpdmHe)%Qk(I2%cpld^Ug(M(yc3$evoZ&l%oputs&b&b*DW%8 zViKzIz3A6IdFV#oM>S%4cN$o;i?n@8y8xu1f&C|qV$-|i5lgUzyQo#7C=Wju$6V- zi80G@0N*AKH1`b?UYmx4U?e(HXejG&h=s6GIm#Y+j5Wt;lGCDpKQ}sMG7T{5EbEtT(dK(o~Vdm_Z4!+(}GWID|%d zs2)TRih1rHU;IOnDBgEsZ&+s>qbc%C50E!+gpW>cKuu-03() zOUFgS6ucv@3a2=V$8`nCYSPl!z9=3v=|rYkYiVGtP#f=vf_K_Fi#HR^&t<*EPj^v* zZ0-qCb0LtbsLa}Ku=I)F2>AA+8|f7Z@qCHJ(?(8wL|()*&N7s|>1njl(o6+iIz3Yy zM|_FFXDSXIx(v!<=u0hq*RNI)%2nfNmONIKO7lZBbJR`F5}04Za{a!j}R z9J*#OsLAdR(HLVG&JUwIYT{x4ZS4_RT180_nWl8j9ep2*2GS`b{9>_F5= zIoOgzg{3v7c)mYFw#D268i|h&;N7@lh2jwDV4WnZw9>+`d=g9dS~3#B<26E1T1!7SY9I)ra%n>NOFLB4LMo9xNnz9XK|5tW#)< z&6p8qUWaYZ<6N9Orh^Md51?8os|&jgqV?FcpnxeR;y$lMC62HL$?+ih^#^{_cx z*#B`dZ9JfYr+8dk(@8wE@7-A+P}yd9Etvg~wU1kv zmb*8{z=vIhPLkG}%|h|I34FFxH2n8f!+CRO+Rcxw*)#wDx6Y2^D^C4GuQ)|-=^rNr z*BXG=VC>i8r%&3gRXy~k#SxS{9Xz@?OS*@Qj`etFaQNUjof8Ql2JNQp9_AwwMf}-K zL&*dq_Qda!-5sajWBGjr|1MeBmGpaUjwL-ozw?PGeXXMBDjZwwdo|-tC@VB;2!>lT zld~vt8+v6^@RRh6h&J@ITc))HGZ#R*JJ%5miHwk5ZnM?~uuwAImv9?AC~l)X+f3=D z^1RdFFQeyB=D104TmwkEW;5e5el8b00Kzl=AOv`hP(&inSJE?1h6KuI`p2hz;n+Yl z$`3x=2`$2j=f|h40-2BcGO>8l8(zFgRybeXi0o1`7NZ_g$0c2&qq-`>AI% zaB1^ZMuDNvFg%9_!D*ZU`YD3fBzr#1zte51%sZrKoMGh2qC4eE=5lsD^#_nJFBX3T z)7RinFz*Eq&yM^HyQ$3_-N7+ESz?MDI<9??6`wb;X{TC{WoR(AdC=~)#D3_*#qtYs)R?9)}A)VZRDm``Z z_`$7v5(hWDqHMaVOu9lL=;@i?o1r_2-`cyI!1 zQqO_>65vSx<2D5SqU1oz2SBCeD7ez&YXVs{?3cb*}&>g(S@n{|D+jF&uTUD zPoV9!IbuXbonJ*QfNBcPMB)dr4*IB~-c8}F2jNgdN)|E`bW5-&t6X{$Rx1U2^=2B@ za8D2(JAPvSkt6BWty{OrwmBab`v{hXDvs_#9~9d>iq}bt%Wu`Z)<|KG)wMK?Qp}I# zMi;mUR=C!MR%`S^bchbyb-ziel9{N9ytPPh>_TlgDUebfB3A(wZ=Ap=a;p9jxV!*Y z(uNaQ&qS5Y{%-V1Z|J;s3(fvLHmirlpK4aI%v767k+Zm;x<=TegLtGMB3N}y7(QJC zw^ZiDdInmvw=dYA-=4$QpR!EvTfsFVh$+}Zh!@4P!88s<)U0I}bwhAE>x&arEF8E6 z7a@+{aSwR97e6n@kFgSt-!VT+7H;{8Ou{vYDe2N@9x|!cQd}U_)NaCCt);D`hKvlT z)aDXQ0kr?1^`P-{G|+T}FJ08spldx(q2(B_V@IU6&}7ifQRkKp8jJoqv%-d)70^_M zxqLuNX`J$j$440Q=BGn4s#3Sj#Ut-Bv|lz;Td)@m-5-d`n~s-BuiOzo|~ z!G_Mmi^E?1gw|OX3caOyN~XX@;QG_ACQvmfE3T1vZw=sa+*B^4f*y|t;RCDBoCK)sjN2U zag+?_HUn@OOY2jLH%x50T(#s~wEOkkqE$ZkyfV!q|nz~zYyZ^r)7by)mbLaL^ zSU&qqok$v*;uEZNaVDz-_yAVt85)aCeg-18(-)^gAK!+#`H*=h^Ml~;L-<)kyLkCQ zdm478luYg6ATjTg;rvrm=Z8xeB(wBWz0PofRqbI|U@y4kO9;CK7x{{b@}stXi{ zmx5RnfFdDBb?oA)$@^a}z8-W?^MacW$F~^lLvC-1?ab@{lrs;!@m9r4bMlt}hMXGb z;AYFW7gX+6K=Rsn&965g;?J0JA^oDG%FTiu!Us^i00Gj2` zW%ixRYB-&vb{6)XVVa2J*~7LotQFOJc$tJ@u5(3)}1k~a5~7i7D)SrZD;yg z#KpxdA=q?=p%l$G_ofpH>$T~kS0ubjVHDVqe}u9&Uj4t4)h9Kle(drafRV@}BvJgF z8qIXN&CSD&RF5x`z6k zKQ4V9k#=_iX1-`}pZQ%Qs~_UoL{{+4BnPfHIO?AL%0gGQ!b5zR;2$!4ncCX=0WkX;0p={ma>GU|Co!fiq80oM%0(yvt@%!+Af8c!Et4kIr36M= ztD2pAmirEycwKEeLX3zi>lANSG@DFEmDdSXvZ|ey1to4;;WR#qL~Y_3-|qH2KA6sM zs|tA>?#sg(7kHSydG0)il=p+cRaOG$w;}{i`vWo*xYVV#r5Z@&@5)5$Rt+AhSGqtX z*F_6M)r!(yv3*iDCv8z+O)(n1v&1s+oOz&pYfsvphG&M z_0~*5G0xr~{tmP#?k^s}R}hZZ7M7+DE#XTy{iXSXb$n#xSpT?~h6_;R<`copoi3`%Y zsbI_onP5}t`hCpG$?={u%J5Y1a57`NexQe+CO@90iIKFi#f}}Lr40_;gcuuReRjzh?Qt8EFJ70 zvQXj?)iUNx_$SPP@+I0R7l64yBikoIPqEV1DOS>ReHVCvcsN&b1tO@i&G5^H{CoNg zV$VCgyS%r0_jz}gK2-W?>F1??FWq1MRp}4QZz$hgUj95OX;4{{iXMV*$SN2MoAPnCXB`d3WwOzCM%@jo!p z|0?~W^vlwJmwr_`Te`h`N13Ml#`0a|H)G=WlpOpWt{B-$e<^L@IvV42xuFBn&dn)%=-d%a1 z^1jOZD<7;pSouihW0g-<9;*C#<>AU_E1$1CQu#vV%az9}U#&b|`9|f5%6BV2sQg3a zA1hB*t}JX`ehRC(em6>s7PrhF`sYLABWKTI5emC+>hC|XW$V^^N07u}$d*I+8we+` z-|!C=3HX~nucKdc|F#^QKXUC&H!}=d3^c#Y;pu^CZa%_rN+67lTn3Yt|Hm}=!!7iW zKMXZOBj*1xP5(9q(uNxwxpyf~p<^9C&0xG@0-8sz9ZGZP0D~u(=2P + +namespace ArkApi +{ + class ApiUtils : public IApiUtils + { + public: + static ApiUtils& Get(); + + ApiUtils(const ApiUtils&) = delete; + ApiUtils(ApiUtils&&) = delete; + ApiUtils& operator=(const ApiUtils&) = delete; + ApiUtils& operator=(ApiUtils&&) = delete; + + UWorld* GetWorld() const override; + AShooterGameMode* GetShooterGameMode() const override; + + void SetWorld(UWorld* uworld); + void SetShooterGameMode(AShooterGameMode* shooter_game_mode); + + private: + ApiUtils() + : u_world_(nullptr), + shooter_game_mode_(nullptr) + { + } + + ~ApiUtils() = default; + + UWorld* u_world_; + AShooterGameMode* shooter_game_mode_; + }; +} diff --git a/version/Core/Private/Base.cpp b/version/Core/Private/Base.cpp new file mode 100644 index 0000000..c89b9aa --- /dev/null +++ b/version/Core/Private/Base.cpp @@ -0,0 +1,23 @@ +#include + +#include "Offsets.h" + +DWORD64 GetAddress(const void* base, const std::string& name) +{ + return ArkApi::Offsets::Get().GetAddress(base, name); +} + +LPVOID GetAddress(const std::string& name) +{ + return ArkApi::Offsets::Get().GetAddress(name); +} + +BitField GetBitField(const void* base, const std::string& name) +{ + return ArkApi::Offsets::Get().GetBitField(base, name); +} + +BitField GetBitField(LPVOID base, const std::string& name) +{ + return ArkApi::Offsets::Get().GetBitField(base, name); +} \ No newline at end of file diff --git a/version/Core/Private/Commands.cpp b/version/Core/Private/Commands.cpp new file mode 100644 index 0000000..902c9cc --- /dev/null +++ b/version/Core/Private/Commands.cpp @@ -0,0 +1,103 @@ +#include "Commands.h" + +namespace ArkApi +{ + Commands& Commands::Get() + { + static Commands instance; + return instance; + } + + void Commands::AddChatCommand(const FString& command, + const std::function& + callback) + { + chat_commands_.push_back(std::make_shared(command, callback)); + } + + void Commands::AddConsoleCommand(const FString& command, + const std::function& callback) + { + console_commands_.push_back(std::make_shared(command, callback)); + } + + void Commands::AddRconCommand(const FString& command, + const std::function& callback) + { + rcon_commands_.push_back(std::make_shared(command, callback)); + } + + void Commands::AddOnTickCallback(const FString& id, const std::function& callback) + { + on_tick_callbacks_.push_back(std::make_shared(id, callback)); + } + + void Commands::AddOnTimerCallback(const FString& id, const std::function& callback) + { + on_timer_callbacks_.push_back(std::make_shared(id, callback)); + } + + bool Commands::RemoveChatCommand(const FString& command) + { + return RemoveCommand(command, chat_commands_); + } + + bool Commands::RemoveConsoleCommand(const FString& command) + { + return RemoveCommand(command, console_commands_); + } + + bool Commands::RemoveRconCommand(const FString& command) + { + return RemoveCommand(command, rcon_commands_); + } + + bool Commands::RemoveOnTickCallback(const FString& id) + { + return RemoveCommand(id, on_tick_callbacks_); + } + + bool Commands::RemoveOnTimerCallback(const FString& id) + { + return RemoveCommand(id, on_timer_callbacks_); + } + + bool Commands::CheckChatCommands(AShooterPlayerController* shooter_player_controller, FString* message, + EChatSendMode::Type mode) + { + return CheckCommands(*message, chat_commands_, shooter_player_controller, message, mode); + } + + bool Commands::CheckConsoleCommands(APlayerController* a_player_controller, FString* cmd, bool write_to_log) + { + return CheckCommands(*cmd, console_commands_, a_player_controller, cmd, write_to_log); + } + + bool Commands::CheckRconCommands(RCONClientConnection* rcon_client_connection, RCONPacket* rcon_packet, + UWorld* u_world) + { + return CheckCommands(rcon_packet->Body, rcon_commands_, rcon_client_connection, rcon_packet, u_world); + } + + void Commands::CheckOnTickCallbacks(float delta_seconds) + { + for (const auto& data : on_tick_callbacks_) + { + data->callback(delta_seconds); + } + } + + void Commands::CheckOnTimerCallbacks() + { + for (const auto& data : on_timer_callbacks_) + { + data->callback(); + } + } + + // Free function + ICommands& GetCommands() + { + return Commands::Get(); + } +} diff --git a/version/Core/Private/Commands.h b/version/Core/Private/Commands.h new file mode 100644 index 0000000..f3cccca --- /dev/null +++ b/version/Core/Private/Commands.h @@ -0,0 +1,122 @@ +#pragma once + +#include + +#include +#include +#include +#include + +namespace ArkApi +{ + class Commands : public ICommands + { + public: + static Commands& Get(); + + Commands(const Commands&) = delete; + Commands(Commands&&) = delete; + Commands& operator=(const Commands&) = delete; + Commands& operator=(Commands&&) = delete; + + void AddChatCommand(const FString& command, + const std::function& + callback) override; + void AddConsoleCommand(const FString& command, + const std::function& callback) override; + void AddRconCommand(const FString& command, + const std::function& callback) override; + + void AddOnTickCallback(const FString& id, const std::function& callback) override; + void AddOnTimerCallback(const FString& id, const std::function& callback) override; + + bool RemoveChatCommand(const FString& command) override; + bool RemoveConsoleCommand(const FString& command) override; + bool RemoveRconCommand(const FString& command) override; + + bool RemoveOnTickCallback(const FString& id) override; + bool RemoveOnTimerCallback(const FString& id) override; + + bool CheckChatCommands(AShooterPlayerController* shooter_player_controller, FString* message, + EChatSendMode::Type mode); + bool CheckConsoleCommands(APlayerController* a_player_controller, FString* cmd, bool write_to_log); + bool CheckRconCommands(RCONClientConnection* rcon_client_connection, RCONPacket* rcon_packet, + UWorld* u_world); + void CheckOnTickCallbacks(float delta_seconds); + void CheckOnTimerCallbacks(); + + private: + Commands() = default; + ~Commands() = default; + + template + struct Command + { + Command(FString command, std::function callback) + : command(std::move(command)), + callback(std::move(callback)) + { + } + + FString command; + std::function callback; + }; + + using ChatCommand = Command; + using ConsoleCommand = Command; + using RconCommand = Command; + + using OnTickCallback = Command; + using OnTimerCallback = Command; + + template + bool RemoveCommand(const FString& command, std::vector>& commands) + { + auto iter = std::find_if(commands.begin(), commands.end(), + [&command](const std::shared_ptr& data) -> bool + { + return data->command == command; + }); + + if (iter != commands.end()) + { + commands.erase(std::remove(commands.begin(), commands.end(), *iter), commands.end()); + + return true; + } + + return false; + } + + template + bool CheckCommands(const FString& message, const std::vector>& commands, Args&&... args) + { + TArray parsed; + message.ParseIntoArray(parsed, L" ", true); + + if (!parsed.IsValidIndex(0)) + return false; + + const FString command_text = parsed[0]; + + for (const auto& command : commands) + { + if (command_text.Compare(command->command, ESearchCase::IgnoreCase) == 0) + { + command->callback(std::forward(args)...); + + return true; + } + } + + return false; + } + + std::vector> chat_commands_; + std::vector> console_commands_; + std::vector> rcon_commands_; + + std::vector> on_tick_callbacks_; + std::vector> on_timer_callbacks_; + }; +} diff --git a/version/Core/Private/Hooks.cpp b/version/Core/Private/Hooks.cpp new file mode 100644 index 0000000..8cd043e --- /dev/null +++ b/version/Core/Private/Hooks.cpp @@ -0,0 +1,112 @@ +#include "Hooks.h" + +#include + +#include + +#include "../../MinHook.h" +#include "Offsets.h" + +namespace ArkApi +{ + Hooks::Hooks() + { + if (MH_Initialize() != MH_OK) + { + Log::GetLog()->critical("Can't initialize MinHook"); + throw; + } + } + + Hooks& Hooks::Get() + { + static Hooks instance; + return instance; + } + + bool Hooks::SetHookInternal(const std::string& func_name, LPVOID detour, LPVOID* original) + { + LPVOID target = Offsets::Get().GetAddress(func_name); + if (target == nullptr) + { + Log::GetLog()->error("{} does not exist", func_name); + return false; + } + + auto& hook_vector = all_hooks_[func_name]; + + LPVOID new_target = hook_vector.empty() + ? target + : hook_vector.back()->detour; + + hook_vector.push_back(std::make_shared(new_target, detour, original)); + + if (MH_CreateHook(new_target, detour, original) != MH_OK) + { + Log::GetLog()->error("Failed to create hook for {}", func_name); + return false; + } + + if (MH_EnableHook(new_target) != MH_OK) + { + Log::GetLog()->error("Failed to enable hook for {}", func_name); + return false; + } + + return true; + } + + bool Hooks::DisableHook(const std::string& func_name, LPVOID detour) + { + LPVOID target = Offsets::Get().GetAddress(func_name); + if (target == nullptr) + { + Log::GetLog()->error("{} does not exist", func_name); + return false; + } + + auto& hook_vector = all_hooks_[func_name]; + + const auto iter = std::find_if(hook_vector.begin(), hook_vector.end(), + [detour](const std::shared_ptr& hook) -> bool + { + return hook->detour == detour; + }); + + if (iter == hook_vector.end()) + { + Log::GetLog()->warn("Failed to find hook"); + return false; + } + + // Remove all hooks placed on this function + for (const auto& hook : hook_vector) + { + if (MH_RemoveHook(hook->target) != MH_OK) + { + Log::GetLog()->error("Failed to disable hook for {}", func_name); + return false; + } + } + + // Remove hook from all_hooks vector + hook_vector.erase(std::remove(hook_vector.begin(), hook_vector.end(), *iter), hook_vector.end()); + + auto hook_vec(move(hook_vector)); + hook_vector.clear(); + + // Enable all hooks again + for (const auto& hook : hook_vec) + { + SetHookInternal(func_name, hook->detour, hook->original); + } + + return true; + } + + // Free function + IHooks& GetHooks() + { + return Hooks::Get(); + } +} diff --git a/version/Core/Private/Hooks.h b/version/Core/Private/Hooks.h new file mode 100644 index 0000000..13c3808 --- /dev/null +++ b/version/Core/Private/Hooks.h @@ -0,0 +1,44 @@ +#pragma once + +#include + +#include +#include + +namespace ArkApi +{ + class Hooks : public IHooks + { + public: + static Hooks& Get(); + + Hooks(const Hooks&) = delete; + Hooks(Hooks&&) = delete; + Hooks& operator=(const Hooks&) = delete; + Hooks& operator=(Hooks&&) = delete; + + bool SetHookInternal(const std::string& func_name, LPVOID detour, LPVOID* original) override; + + bool DisableHook(const std::string& func_name, LPVOID detour) override; + + private: + struct Hook + { + Hook(LPVOID target, LPVOID detour, LPVOID* original) + : target(target), + detour(detour), + original(original) + { + } + + LPVOID target; + LPVOID detour; + LPVOID* original; + }; + + Hooks(); + ~Hooks() = default; + + std::unordered_map>> all_hooks_; + }; +} diff --git a/version/Core/Private/HooksImpl.cpp b/version/Core/Private/HooksImpl.cpp new file mode 100644 index 0000000..bfd7d8e --- /dev/null +++ b/version/Core/Private/HooksImpl.cpp @@ -0,0 +1,119 @@ +#include "HooksImpl.h" + +#include + +#include "Hooks.h" +#include "ApiUtils.h" +#include "Commands.h" +#include "PluginManager/PluginManager.h" + +namespace ArkApi +{ + // Hooks declaration + DECLARE_HOOK(UEngine_Init, void, DWORD64, DWORD64); + DECLARE_HOOK(UWorld_InitWorld, void, UWorld*, DWORD64); + DECLARE_HOOK(UWorld_Tick, void, DWORD64, DWORD64, float); + DECLARE_HOOK(AShooterGameMode_InitGame, void, AShooterGameMode*, FString*, FString*, FString*); + DECLARE_HOOK(AShooterPlayerController_ServerSendChatMessage_Impl, void, AShooterPlayerController*, FString*, + EChatSendMode::Type); + DECLARE_HOOK(APlayerController_ConsoleCommand, FString*, APlayerController*, FString*, FString*, bool); + DECLARE_HOOK(RCONClientConnection_ProcessRCONPacket, void, RCONClientConnection*, RCONPacket*, UWorld*); + DECLARE_HOOK(AGameState_DefaultTimer, void, AGameState*); + + void InitHooks() + { + auto& hooks = Hooks::Get(); + + hooks.SetHook("UEngine.Init", &Hook_UEngine_Init, &UEngine_Init_original); + hooks.SetHook("UWorld.InitWorld", &Hook_UWorld_InitWorld, &UWorld_InitWorld_original); + hooks.SetHook("UWorld.Tick", &Hook_UWorld_Tick, &UWorld_Tick_original); + hooks.SetHook("AShooterGameMode.InitGame", &Hook_AShooterGameMode_InitGame, &AShooterGameMode_InitGame_original); + hooks.SetHook("AShooterPlayerController.ServerSendChatMessage_Implementation", + &Hook_AShooterPlayerController_ServerSendChatMessage_Impl, + &AShooterPlayerController_ServerSendChatMessage_Impl_original); + hooks.SetHook("APlayerController.ConsoleCommand", &Hook_APlayerController_ConsoleCommand, + &APlayerController_ConsoleCommand_original); + hooks.SetHook("RCONClientConnection.ProcessRCONPacket", &Hook_RCONClientConnection_ProcessRCONPacket, + &RCONClientConnection_ProcessRCONPacket_original); + hooks.SetHook("AGameState.DefaultTimer", &Hook_AGameState_DefaultTimer, &AGameState_DefaultTimer_original); + + Log::GetLog()->info("Initialized hooks\n"); + } + + // Hooks + + void Hook_UEngine_Init(DWORD64 _this, DWORD64 InEngineLoop) + { + UEngine_Init_original(_this, InEngineLoop); + + Log::GetLog()->info("UGameEngine::Init was called"); + Log::GetLog()->info("Loading plugins..\n"); + + PluginManager::Get().LoadAllPlugins(); + } + + void Hook_UWorld_InitWorld(UWorld* world, DWORD64 ivs) + { + Log::GetLog()->info("UWorld::InitWorld was called"); + + ApiUtils::Get().SetWorld(world); + + UWorld_InitWorld_original(world, ivs); + } + + void Hook_UWorld_Tick(DWORD64 world, DWORD64 tick_type, float delta_seconds) + { + Commands::Get().CheckOnTickCallbacks(delta_seconds); + + UWorld_Tick_original(world, tick_type, delta_seconds); + } + + void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, + FString* error_message) + { + ApiUtils::Get().SetShooterGameMode(a_shooter_game_mode); + + AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); + } + + void Hook_AShooterPlayerController_ServerSendChatMessage_Impl( + AShooterPlayerController* player_controller, FString* message, EChatSendMode::Type mode) + { + const long double last_chat_time = player_controller->LastChatMessageTimeField()(); + const long double time_seconds = ApiUtils::Get().GetWorld()->TimeSecondsField()(); + + if (last_chat_time > 0 && time_seconds - last_chat_time < 1.0) + return; + + if (Commands::Get().CheckChatCommands(player_controller, message, mode)) + { + player_controller->LastChatMessageTimeField() = time_seconds; + return; + } + + AShooterPlayerController_ServerSendChatMessage_Impl_original(player_controller, message, mode); + } + + FString* Hook_APlayerController_ConsoleCommand(APlayerController* a_player_controller, FString* result, + FString* cmd, bool write_to_log) + { + Commands::Get().CheckConsoleCommands(a_player_controller, cmd, write_to_log); + + return APlayerController_ConsoleCommand_original(a_player_controller, result, cmd, write_to_log); + } + + void Hook_RCONClientConnection_ProcessRCONPacket(RCONClientConnection* _this, RCONPacket* packet, + UWorld* in_world) + { + Commands::Get().CheckRconCommands(_this, packet, in_world); + + RCONClientConnection_ProcessRCONPacket_original(_this, packet, in_world); + } + + void Hook_AGameState_DefaultTimer(AGameState* _this) + { + Commands::Get().CheckOnTimerCallbacks(); + + AGameState_DefaultTimer_original(_this); + } +} diff --git a/version/Core/Private/HooksImpl.h b/version/Core/Private/HooksImpl.h new file mode 100644 index 0000000..41532f2 --- /dev/null +++ b/version/Core/Private/HooksImpl.h @@ -0,0 +1,6 @@ +#pragma once + +namespace ArkApi +{ + void InitHooks(); +} diff --git a/version/Core/Private/Logger.cpp b/version/Core/Private/Logger.cpp new file mode 100644 index 0000000..7e562e1 --- /dev/null +++ b/version/Core/Private/Logger.cpp @@ -0,0 +1,13 @@ +#include +#include + +std::vector& GetLogSinks() +{ + static std::vector sinks{ + std::make_shared(), + std::make_shared(ArkApi::Tools::GetCurrentDir() + "/logs/ArkApi.log", + 1024 * 1024, 5) + }; + + return sinks; +} diff --git a/version/Core/Private/Offsets.cpp b/version/Core/Private/Offsets.cpp new file mode 100644 index 0000000..470f89d --- /dev/null +++ b/version/Core/Private/Offsets.cpp @@ -0,0 +1,58 @@ +#include "Offsets.h" + +namespace ArkApi +{ + Offsets::Offsets() + { + module_base_ = reinterpret_cast(GetModuleHandle(nullptr)); + + const auto dos_header = reinterpret_cast(module_base_); + const auto nt_headers = reinterpret_cast(module_base_ + dos_header->e_lfanew); + + module_base_ += nt_headers->OptionalHeader.BaseOfCode; + } + + Offsets& Offsets::Get() + { + static Offsets instance; + return instance; + } + + void Offsets::Init(std::unordered_map&& offsets_dump, std::unordered_map&& bitfields_dump) + { + offsets_dump_.swap(offsets_dump); + bitfields_dump_.swap(bitfields_dump); + } + + DWORD64 Offsets::GetAddress(const void* base, const std::string& name) + { + return reinterpret_cast(base) + static_cast(offsets_dump_[name]); + } + + LPVOID Offsets::GetAddress(const std::string& name) + { + return reinterpret_cast(module_base_ + static_cast(offsets_dump_[name])); + } + + BitField Offsets::GetBitField(const void* base, const std::string& name) + { + return GetBitFieldInternal(base, name); + } + + BitField Offsets::GetBitField(LPVOID base, const std::string& name) + { + return GetBitFieldInternal(base, name); + } + + BitField Offsets::GetBitFieldInternal(const void* base, const std::string& name) + { + auto bf = bitfields_dump_[name]; + auto cf = BitField(); + cf.bit_position = bf.bit_position; + cf.length = bf.length; + cf.num_bits = bf.num_bits; + cf.offset = reinterpret_cast(base) + static_cast(bf.offset); + + return cf; + } +} diff --git a/version/Core/Private/Offsets.h b/version/Core/Private/Offsets.h new file mode 100644 index 0000000..1f86a5a --- /dev/null +++ b/version/Core/Private/Offsets.h @@ -0,0 +1,36 @@ +#pragma once + +#include +#include "../Public/API/Base.h" + +namespace ArkApi +{ + class Offsets + { + public: + static Offsets& Get(); + + Offsets(const Offsets&) = delete; + Offsets(Offsets&&) = delete; + Offsets& operator=(const Offsets&) = delete; + Offsets& operator=(Offsets&&) = delete; + + void Init(std::unordered_map&& offsets_dump, std::unordered_map&& bitfields_dump); + + DWORD64 GetAddress(const void* base, const std::string& name); + LPVOID GetAddress(const std::string& name); + + BitField GetBitField(const void* base, const std::string& name); + BitField GetBitField(LPVOID base, const std::string& name); + + private: + Offsets(); + ~Offsets() = default; + + BitField GetBitFieldInternal(const void* base, const std::string& name); + + DWORD64 module_base_; + std::unordered_map offsets_dump_; + std::unordered_map bitfields_dump_; + }; +} diff --git a/version/Core/Private/PDBReader/PDBReader.cpp b/version/Core/Private/PDBReader/PDBReader.cpp new file mode 100644 index 0000000..d0c4987 --- /dev/null +++ b/version/Core/Private/PDBReader/PDBReader.cpp @@ -0,0 +1,346 @@ +#include "PDBReader.h" + +#include +#include + +#include +#include + +#include "../Private/Offsets.h" + +namespace ArkApi +{ + void PdbReader::Read(std::wstring path, std::unordered_map* offsets_dump, + std::unordered_map* bitfields_dump) + { + offsets_dump_ = offsets_dump; + bitfields_dump_ = bitfields_dump; + + std::ifstream f{path}; + if (!f.good()) + throw std::runtime_error("Failed to open pdb file"); + + IDiaDataSource* data_source; + IDiaSession* dia_session; + IDiaSymbol* symbol; + + try + { + LoadDataFromPdb(path, &data_source, &dia_session, &symbol); + } + catch (const std::runtime_error&) + { + Log::GetLog()->error("Failed to load data from pdb file "); + throw; + } + + if (!ReadConfig()) + throw std::runtime_error("Failed to open config.json"); + + Log::GetLog()->info("Dumping structures.."); + DumpStructs(symbol); + + Log::GetLog()->info("Dumping functions.."); + DumpFreeFunctions(symbol); + + Cleanup(symbol, dia_session); + + Log::GetLog()->info("Successfully read information from PDB\n"); + } + + void PdbReader::LoadDataFromPdb(const std::wstring& path, IDiaDataSource** dia_source, IDiaSession** session, + IDiaSymbol** symbol) + { + const std::string current_dir = Tools::GetCurrentDir(); + + std::string lib_path = current_dir + "\\msdia140.dll"; + const HMODULE h_module = LoadLibraryA(lib_path.c_str()); + if (!h_module) + throw std::runtime_error("Failed to load msdia140.dll. Error code - " + std::to_string(GetLastError())); + + const auto dll_get_class_object = reinterpret_cast(GetProcAddress( + h_module, "DllGetClassObject")); + if (!dll_get_class_object) + throw std::runtime_error("Can't find DllGetClassObject. Error code - " + std::to_string(GetLastError())); + + IClassFactory* class_factory; + HRESULT hr = dll_get_class_object(__uuidof(DiaSource), IID_IClassFactory, &class_factory); + if (FAILED(hr)) + throw std::runtime_error("DllGetClassObject has failed. Error code - " + std::to_string(GetLastError())); + + hr = class_factory->CreateInstance(nullptr, __uuidof(IDiaDataSource), reinterpret_cast(dia_source)); + if (FAILED(hr)) + { + class_factory->Release(); + throw std::runtime_error("CreateInstance has failed. Error code - " + std::to_string(GetLastError())); + } + + hr = (*dia_source)->loadDataFromPdb(path.c_str()); + if (FAILED(hr)) + { + class_factory->Release(); + throw std::runtime_error("loadDataFromPdb has failed. HRESULT - " + std::to_string(hr)); + } + + // Open a session for querying symbols + + hr = (*dia_source)->openSession(session); + if (FAILED(hr)) + { + class_factory->Release(); + throw std::runtime_error("openSession has failed. HRESULT - " + std::to_string(hr)); + } + + // Retrieve a reference to the global scope + + hr = (*session)->get_globalScope(symbol); + if (hr != S_OK) + { + class_factory->Release(); + throw std::runtime_error("get_globalScope has failed. HRESULT - " + std::to_string(hr)); + } + + class_factory->Release(); + } + + bool PdbReader::ReadConfig() + { + const std::string config_path = Tools::GetCurrentDir() + "/config.json"; + std::ifstream file{config_path}; + if (!file.is_open()) + return false; + + file >> config_; + file.close(); + + return true; + } + + void PdbReader::DumpStructs(IDiaSymbol* g_symbol) + { + IDiaSymbol* symbol; + + auto structs_array = config_["structures"].get>(); + + IDiaEnumSymbols* enum_symbols; + if (FAILED(g_symbol->findChildren(SymTagUDT, nullptr, nsNone, &enum_symbols))) + throw std::runtime_error("Failed to find symbols"); + + ULONG celt = 0; + while (SUCCEEDED(enum_symbols->Next(1, &symbol, &celt)) && celt == 1) + { + BSTR bstr_name; + if (symbol->get_name(&bstr_name) != S_OK) + continue; + + const _bstr_t bbstr_name(bstr_name); + const std::string str_name(bbstr_name); + + // Check if structure name is in config + const auto find_res = find(structs_array.begin(), structs_array.end(), str_name); + if (find_res != structs_array.end()) + DumpType(symbol, str_name, 0); + + SysFreeString(bstr_name); + + symbol->Release(); + } + + enum_symbols->Release(); + } + + void PdbReader::DumpFreeFunctions(IDiaSymbol* g_symbol) + { + IDiaSymbol* symbol; + + auto funcs_array = config_["functions"].get>(); + + IDiaEnumSymbols* enum_symbols; + if (FAILED(g_symbol->findChildren(SymTagFunction, nullptr, nsNone, &enum_symbols))) + throw std::runtime_error("Failed to find symbols"); + + ULONG celt = 0; + while (SUCCEEDED(enum_symbols->Next(1, &symbol, &celt)) && celt == 1) + { + BSTR bstr_name; + if (symbol->get_name(&bstr_name) != S_OK) + continue; + + const _bstr_t bbstr_name(bstr_name); + const std::string str_name(bbstr_name); + + const auto find_res = find(funcs_array.begin(), funcs_array.end(), str_name); + if (find_res != funcs_array.end()) + { + DWORD offset; + if (symbol->get_addressOffset(&offset) != S_OK) + continue; + + (*offsets_dump_)["Global." + str_name] = offset; + } + + SysFreeString(bstr_name); + + symbol->Release(); + } + + enum_symbols->Release(); + } + + void PdbReader::DumpType(IDiaSymbol* symbol, const std::string& structure, int indent) const + { + IDiaEnumSymbols* enum_children; + IDiaSymbol* symbol_child; + DWORD sym_tag; + ULONG celt = 0; + + if (indent > 5) + return; + + if (symbol->get_symTag(&sym_tag) != S_OK) + return; + + switch (sym_tag) + { + case SymTagData: + DumpData(symbol, structure); + break; + case SymTagEnum: + case SymTagUDT: + if (SUCCEEDED(symbol->findChildren(SymTagNull, nullptr, nsNone, &enum_children))) + { + while (SUCCEEDED(enum_children->Next(1, &symbol_child, &celt)) && celt == 1) + { + DumpType(symbol_child, structure, indent + 2); + + symbol_child->Release(); + } + + enum_children->Release(); + } + break; + case SymTagFunction: + DumpFunction(symbol, structure); + break; + default: + break; + } + } + + void PdbReader::DumpData(IDiaSymbol* symbol, const std::string& structure) const + { + DWORD loc_type; + if (symbol->get_locationType(&loc_type) != S_OK) + return; + + if (loc_type != LocIsThisRel && loc_type != LocIsBitField) + return; + + IDiaSymbol* type; + if (symbol->get_type(&type) != S_OK) + return; + + if (type) + { + LONG offset; + if (symbol->get_offset(&offset) != S_OK) + return; + + BSTR bstr_name; + if (symbol->get_name(&bstr_name) != S_OK) + return; + + const _bstr_t bbstr_name(bstr_name); + + if (loc_type == LocIsBitField) + { + DWORD bit_position; + if (symbol->get_bitPosition(&bit_position) != S_OK) + return; + + ULONGLONG num_bits; + if (symbol->get_length(&num_bits) != S_OK) + return; + + ULONGLONG length; + if (type->get_length(&length) != S_OK) + return; + + const BitField bit_field{static_cast(offset), bit_position, num_bits, length}; + + (*bitfields_dump_)[structure + "." + std::string(bbstr_name)] = bit_field; + } + else if (loc_type == LocIsThisRel) + { + (*offsets_dump_)[structure + "." + std::string(bbstr_name)] = offset; + } + + SysFreeString(bstr_name); + } + + type->Release(); + } + + std::string PdbReader::GetName(IDiaSymbol* symbol) + { + BSTR bstr_name; + BSTR bstr_und_name; + BSTR bstr_full_name; + + if (symbol->get_name(&bstr_name) != S_OK) + return ""; + + if (symbol->get_undecoratedName(&bstr_und_name) == S_OK) + { + bstr_full_name = wcscmp(bstr_name, bstr_und_name) == 0 ? bstr_name : bstr_und_name; + } + else + { + bstr_full_name = bstr_name; + } + + const _bstr_t str_name(bstr_name); + + SysFreeString(bstr_name); + SysFreeString(bstr_und_name); + SysFreeString(bstr_full_name); + + return std::string(str_name); + } + + void PdbReader::DumpFunction(IDiaSymbol* symbol, const std::string& structure) const + { + DWORD offset; + if (symbol->get_addressOffset(&offset) != S_OK) + return; + + BSTR bstr_name; + if (symbol->get_name(&bstr_name) != S_OK) + return; + + const _bstr_t bbstr_name(bstr_name); + std::string str_name(bbstr_name); + + if (str_name.find("exec") != std::string::npos) // Filter out functions with "exec" prefix + return; + + (*offsets_dump_)[std::string(structure) + "." + str_name] = offset; + //jsonDump["structures"][structure][str_name] = nlohmann::json({ + //{"offset", offset}, + //{"kind", "method"} + //}); + + SysFreeString(bstr_name); + } + + void PdbReader::Cleanup(IDiaSymbol* symbol, IDiaSession* session) + { + if (symbol) + symbol->Release(); + + if (session) + session->Release(); + + CoUninitialize(); + } +} diff --git a/version/Core/Private/PDBReader/PDBReader.h b/version/Core/Private/PDBReader/PDBReader.h new file mode 100644 index 0000000..ffc4ec4 --- /dev/null +++ b/version/Core/Private/PDBReader/PDBReader.h @@ -0,0 +1,38 @@ +#pragma once + +#include + +#include +#include "../../json.hpp" + +namespace ArkApi +{ + class PdbReader + { + public: + PdbReader() + : offsets_dump_(nullptr), + bitfields_dump_(nullptr) + { + } + + void Read(std::wstring path, std::unordered_map* offsets_dump, + std::unordered_map* bitfields_dump); + + private: + static void LoadDataFromPdb(const std::wstring&, IDiaDataSource**, IDiaSession**, IDiaSymbol**); + bool ReadConfig(); + void DumpStructs(IDiaSymbol*); + void DumpFreeFunctions(IDiaSymbol*); + void DumpType(IDiaSymbol*, const std::string&, int) const; + void DumpData(IDiaSymbol*, const std::string&) const; + static std::string GetName(IDiaSymbol*); + void DumpFunction(IDiaSymbol*, const std::string&) const; + static void Cleanup(IDiaSymbol*, IDiaSession*); + + std::unordered_map* offsets_dump_; + std::unordered_map* bitfields_dump_; + + nlohmann::json config_; + }; +} diff --git a/version/Core/Private/PluginManager/PluginManager.cpp b/version/Core/Private/PluginManager/PluginManager.cpp new file mode 100644 index 0000000..86a1c95 --- /dev/null +++ b/version/Core/Private/PluginManager/PluginManager.cpp @@ -0,0 +1,229 @@ +#include "PluginManager.h" + +#include +#include + +#include +#include +#include + +#include "../Commands.h" + +namespace ArkApi +{ + PluginManager::PluginManager() + { + Commands& commands = Commands::Get(); + + commands.AddConsoleCommand("plugins.load", &LoadPluginCmd); + commands.AddConsoleCommand("plugins.unload", &UnloadPluginCmd); + } + + PluginManager& PluginManager::Get() + { + static PluginManager instance; + return instance; + } + + void PluginManager::LoadAllPlugins() + { + namespace fs = std::experimental::filesystem; + + const std::string dir_path = Tools::GetCurrentDir() + "/ArkApi/Plugins"; + + for (const auto& dir_name : fs::directory_iterator(dir_path)) + { + const auto& path = dir_name.path(); + const auto filename = path.filename().stem().generic_string(); + + try + { + std::stringstream stream; + + std::shared_ptr& plugin = LoadPlugin(filename); + + stream << "Loaded plugin " << (plugin->full_name.empty() ? plugin->name : plugin->full_name) << " V" << std::fixed + << std::setprecision(1) << plugin->version << " (" << plugin->description << ")"; + + Log::GetLog()->info(stream.str()); + } + catch (const std::exception& error) + { + Log::GetLog()->warn(error.what()); + } + } + + CheckPluginsDependencies(); + + Log::GetLog()->info("Loaded all plugins\n"); + } + + std::shared_ptr& PluginManager::LoadPlugin(const std::string& plugin_name) noexcept(false) + { + namespace fs = std::experimental::filesystem; + + const std::string dir_path = Tools::GetCurrentDir() + "/ArkApi/Plugins/" + plugin_name; + const std::string full_path = dir_path + "/" + plugin_name + ".dll"; + + if (!fs::exists(full_path)) + throw std::runtime_error("Plugin " + plugin_name + " does not exist"); + + if (IsPluginLoaded(plugin_name)) + throw std::runtime_error("Plugin " + plugin_name + " was already loaded"); + + auto plugin_info = ReadPluginInfo(plugin_name); + + // Check version + const auto required_version = static_cast(plugin_info["MinApiVersion"]); + if (required_version != .0f && std::stof(API_VERSION) < required_version) + throw std::runtime_error("Plugin " + plugin_name + " requires newer API version!"); + + HINSTANCE h_module = LoadLibraryExA(full_path.c_str(), nullptr, LOAD_LIBRARY_SEARCH_USER_DIRS); + if (!h_module) + throw std::runtime_error( + "Failed to load plugin - " + plugin_name + "\nError code: " + std::to_string(GetLastError())); + + return loaded_plugins_.emplace_back(std::make_shared(h_module, plugin_name, plugin_info["FullName"], + plugin_info["Description"], plugin_info["Version"], + plugin_info["MinApiVersion"], + plugin_info["Dependencies"])); + } + + void PluginManager::UnloadPlugin(const std::string& plugin_name) noexcept(false) + { + namespace fs = std::experimental::filesystem; + + const auto iter = FindPlugin(plugin_name); + if (iter == loaded_plugins_.end()) + throw std::runtime_error("Plugin " + plugin_name + " is not loaded"); + + const std::string dir_path = Tools::GetCurrentDir() + "/ArkApi/Plugins/" + plugin_name; + const std::string full_path = dir_path + "/" + plugin_name + ".dll"; + + if (!fs::exists(full_path)) + throw std::runtime_error("Plugin " + plugin_name + " does not exist"); + + const BOOL result = FreeLibrary((*iter)->h_module); + if (!result) + throw std::runtime_error( + "Failed to unload plugin - " + plugin_name + "\nError code: " + std::to_string(GetLastError())); + + loaded_plugins_.erase(remove(loaded_plugins_.begin(), loaded_plugins_.end(), *iter), loaded_plugins_.end()); + } + + nlohmann::json PluginManager::ReadPluginInfo(const std::string& plugin_name) + { + nlohmann::json plugin_info = nlohmann::json::object(); + + const std::string dir_path = Tools::GetCurrentDir() + "/ArkApi/Plugins/" + plugin_name; + const std::string config_path = dir_path + "/PluginInfo.json"; + + std::ifstream file{config_path}; + if (file.is_open()) + { + file >> plugin_info; + file.close(); + } + + plugin_info["FullName"] = plugin_info.value("FullName", ""); + plugin_info["Description"] = plugin_info.value("Description", "No description"); + plugin_info["Version"] = plugin_info.value("Version", 1.0f); + plugin_info["MinApiVersion"] = plugin_info.value("MinApiVersion", .0f); + plugin_info["Dependencies"] = plugin_info.value("Dependencies", std::vector{}); + + return plugin_info; + } + + void PluginManager::CheckPluginsDependencies() + { + for (const auto& plugin : loaded_plugins_) + { + if (plugin->dependencies.empty()) + continue; + + for (const std::string& dependency : plugin->dependencies) + { + if (!IsPluginLoaded(dependency)) + { + Log::GetLog()->error("Plugin {} is missing! {} might not work correctly", dependency, plugin->name); + } + } + } + } + + std::vector>::const_iterator PluginManager::FindPlugin(const std::string& plugin_name) + { + const auto iter = std::find_if(loaded_plugins_.begin(), loaded_plugins_.end(), + [plugin_name](const std::shared_ptr& plugin) -> bool + { + return plugin->name == plugin_name; + }); + + return iter; + } + + bool PluginManager::IsPluginLoaded(const std::string& plugin_name) + { + return FindPlugin(plugin_name) != loaded_plugins_.end(); + } + + // Callbacks + + void PluginManager::LoadPluginCmd(APlayerController* player_controller, FString* cmd, bool) + { + TArray parsed; + cmd->ParseIntoArray(parsed, L" ", true); + + if (parsed.IsValidIndex(1)) + { + AShooterPlayerController* shooter_controller = static_cast(player_controller); + + const std::string plugin_name = parsed[1].ToString(); + + try + { + Get().LoadPlugin(plugin_name); + } + catch (const std::exception& error) + { + GetApiUtils().SendServerMessage(shooter_controller, FColorList::Red, "Failed to load plugin - {}", error.what()); + + Log::GetLog()->warn(error.what()); + return; + } + + GetApiUtils().SendServerMessage(shooter_controller, FColorList::Green, "Successfully loaded plugin"); + + Log::GetLog()->info("Loaded plugin - {}", plugin_name.c_str()); + } + } + + void PluginManager::UnloadPluginCmd(APlayerController* player_controller, FString* cmd, bool) + { + TArray parsed; + cmd->ParseIntoArray(parsed, L" ", true); + + if (parsed.IsValidIndex(1)) + { + AShooterPlayerController* shooter_controller = static_cast(player_controller); + + const std::string plugin_name = parsed[1].ToString(); + + try + { + Get().UnloadPlugin(plugin_name); + } + catch (const std::exception& error) + { + GetApiUtils().SendServerMessage(shooter_controller, FColorList::Red, "Failed to unload plugin - {}", error.what()); + + Log::GetLog()->warn(error.what()); + return; + } + + GetApiUtils().SendServerMessage(shooter_controller, FColorList::Green, "Successfully unloaded plugin"); + + Log::GetLog()->info("Unloaded plugin - {}", plugin_name.c_str()); + } + } +} diff --git a/version/Core/Private/PluginManager/PluginManager.h b/version/Core/Private/PluginManager/PluginManager.h new file mode 100644 index 0000000..7f62f55 --- /dev/null +++ b/version/Core/Private/PluginManager/PluginManager.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include +#include + +#include + +#include "../../../json.hpp" + +namespace ArkApi +{ + struct Plugin + { + Plugin(HINSTANCE h_module, std::string name, std::string full_name, + std::string description, float version, float min_api_version, std::vector dependencies) + : h_module(h_module), + name(std::move(name)), + full_name(std::move(full_name)), + description(std::move(description)), + version(version), + min_api_version(min_api_version), + dependencies(std::move(dependencies)) + { + } + + HINSTANCE h_module; + std::string name; + std::string full_name; + std::string description; + float version; + float min_api_version; + std::vector dependencies; + }; + + class PluginManager + { + public: + static PluginManager& Get(); + + PluginManager(const PluginManager&) = delete; + PluginManager(PluginManager&&) = delete; + PluginManager& operator=(const PluginManager&) = delete; + PluginManager& operator=(PluginManager&&) = delete; + + /** + * \brief Find and load all plugins + */ + void LoadAllPlugins(); + + /** + * \brief Load plugin by it's name + * \param plugin_name File name of the plugin + * \return Loaded plugin + */ + std::shared_ptr& LoadPlugin(const std::string& plugin_name) noexcept(false); + + /** + * \brief Unload plugin by it's name. Plugin must free all used resources. + * \param plugin_name File name of the plugin + */ + void UnloadPlugin(const std::string& plugin_name) noexcept(false); + + /** + * \brief Find plugin by it's name + * \param plugin_name File name of the plugin + * \return An iterator to the loaded plugin + */ + std::vector>::const_iterator FindPlugin(const std::string& plugin_name); + + /** + * \brief Returns true if plugin was loaded, false otherwise + */ + bool IsPluginLoaded(const std::string& plugin_name); + + private: + PluginManager(); + ~PluginManager() = default; + + static nlohmann::json ReadPluginInfo(const std::string& plugin_name); + + void CheckPluginsDependencies(); + + // Callbacks + static void LoadPluginCmd(APlayerController*, FString*, bool); + static void UnloadPluginCmd(APlayerController*, FString*, bool); + + std::vector> loaded_plugins_; + }; +} diff --git a/version/Core/Private/Tools.cpp b/version/Core/Private/Tools.cpp new file mode 100644 index 0000000..e1ba6f5 --- /dev/null +++ b/version/Core/Private/Tools.cpp @@ -0,0 +1,47 @@ +#include "Tools.h" + +#include "PluginManager/PluginManager.h" + +namespace ArkApi::Tools +{ + std::string GetCurrentDir() + { + char buffer[MAX_PATH]; + GetModuleFileNameA(nullptr, buffer, MAX_PATH); + + const std::string::size_type pos = std::string(buffer).find_last_of("\\/"); + + return std::string(buffer).substr(0, pos); + } + + std::wstring ConvertToWideStr(const std::string& text) + { + const size_t size = text.size(); + + std::wstring wstr; + if (size > 0) + { + wstr.resize(size); + + size_t converted_chars; + mbstowcs_s(&converted_chars, wstr.data(), size + 1, text.c_str(), _TRUNCATE); + } + + return wstr; + } + + std::string ConvertToAnsiStr(const std::wstring& text) + { + const size_t length = text.size(); + + std::string str(length, '\0'); + std::use_facet>(std::locale()).narrow(text.c_str(), text.c_str() + length, '?', str.data()); + + return str; + } + + bool IsPluginLoaded(const std::string& plugin_name) + { + return PluginManager::Get().IsPluginLoaded(plugin_name); + } +} diff --git a/version/Core/Public/API/ARK/Actor.h b/version/Core/Public/API/ARK/Actor.h new file mode 100644 index 0000000..0481c05 --- /dev/null +++ b/version/Core/Public/API/ARK/Actor.h @@ -0,0 +1,4885 @@ +#pragma once + +#include "../Base.h" + +struct FChatMessage +{ + FString SenderName; + FString SenderSteamName; + FString SenderTribeName; + unsigned int SenderId; + FString Message; + FString Receiver; + int SenderTeamIndex; + long double ReceivedTime; + TEnumAsByte SendMode; + unsigned int RadioFrequency; + TEnumAsByte ChatType; + UTexture2D* SenderIcon; + FString UserId; + + FChatMessage() + : SenderName(""), + SenderSteamName(""), + SenderTribeName(""), + SenderId(0), + Message(""), + Receiver(""), + SenderTeamIndex(0), + ReceivedTime(-1), + SendMode(EChatSendMode::GlobalChat), + RadioFrequency(0), + ChatType(EChatType::GlobalChat), + SenderIcon(nullptr), + UserId("") + { + } + + FChatMessage(FChatMessage* __that) { NativeCall(this, "FChatMessage.FChatMessage", __that); } + FChatMessage* operator=(FChatMessage* __that) { return NativeCall(this, "FChatMessage.operator=", __that); } +}; + +struct FUniqueNetIdRepl +{ + TSharedPtr UniqueNetId; +}; + +struct FActorSpawnParameters +{ + FActorSpawnParameters() + : Name() + , Template(NULL) + , Owner(NULL) + , Instigator(NULL) + , OverrideLevel(NULL) + , bNoCollisionFail(0) + , bRemoteOwned(false) + , bNoFail(false) + , bDeferConstruction(false) + , bAllowDuringConstructionScript(false) + , bDeferBeginPlay(0) + , ExtraSpawnData(0) + , ObjectFlags(EObjectFlags::RF_Transactional) + , AttachToComponent(nullptr) + { + } + + FName Name; + AActor *Template; + AActor *Owner; + APawn *Instigator; + ULevel *OverrideLevel; + unsigned __int32 bNoCollisionFail : 1; + unsigned __int32 bRemoteOwned : 1; + unsigned __int32 bNoFail : 1; + unsigned __int32 bDeferConstruction : 1; + unsigned __int32 bAllowDuringConstructionScript : 1; + unsigned __int32 bDeferBeginPlay : 1; + int ExtraSpawnData; + EObjectFlags ObjectFlags; + USceneComponent *AttachToComponent; + FName AttachToBoneName; +}; + +struct FPlayerDeathReason +{ + int PlayerID; + FString DeathReason; + long double DiedAtTime; +}; + +struct __declspec(align(8)) FPrimalPlayerCharacterConfigStruct +{ + __int8 bIsFemale : 1; + FLinearColor BodyColors[4]; + FLinearColor OverrideHeadHairColor; + FLinearColor OverrideFacialHairColor; + char FacialHairIndex; + char HeadHairIndex; + FString PlayerCharacterName; + float RawBoneModifiers[22]; + int PlayerSpawnRegionIndex; +}; + +struct FPrimalCharacterStatusValueModifier +{ + EPrimalCharacterStatusValue::Type ValueType; + EPrimalCharacterStatusValue::Type StopOnValueNearMax; + float AmountToAdd; + float BaseAmountToAdd; + float SpeedToAdd; + bool bContinueOnUnchangedValue; + bool bSetValue; + bool bSetAdditionalValue; + bool bMakeUntameable; + int StatusValueModifierDescriptionIndex; +}; + +struct FDinoBaseLevelWeightEntry +{ + float EntryWeight; + float BaseLevelMinRange; + float BaseLevelMaxRange; +}; + +struct FClassRemappingWeight +{ + TSubclassOf FromClass; + TArray> ToClasses; + TArray Weights; +}; + +struct FClassNameReplacement +{ + FString FromClassName; + FString ToClassName; +}; + +struct FNPCDifficultyLevelRange +{ + TArray EnemyLevelsMin; + TArray EnemyLevelsMax; + TArray GameDifficulties; +}; + +struct FNPCSpawnEntry +{ + FString AnEntryName; + TArray> NPCsToSpawn; + TArray NPCsToSpawnStrings; + TArray NPCRandomSpawnClassWeights; + TArray NPCsSpawnOffsets; + TArray NPCsToSpawnPercentageChance; + TArray NPCMinLevelOffset; + TArray NPCMaxLevelOffset; + TArray NPCMinLevelMultiplier; + TArray NPCMaxLevelMultiplier; + unsigned __int32 bAddLevelOffsetBeforeMultiplier : 1; + TArray NPCOverrideLevel; + FVector ExtentCheck; + FVector GroupSpawnOffset; + float EntryWeight; + float ManualSpawnPointSpreadRadius; + float WaterOnlySpawnMinimumWaterHeight; + float MaximumWaterHeight; + TArray NPCDifficultyLevelRanges; + float LevelDifficultyTestOverride; + float SpawnMinDistanceFromStructuresMultiplier; + float SpawnMinDistanceFromPlayersMultiplier; + float SpawnMinDistanceFromTamedDinosMultiplier; + float RandGroupSpawnOffsetZMin; + float RandGroupSpawnOffsetZMax; +}; + +struct FNPCSpawnLimit +{ + TSubclassOf NPCClass; + FString NPCClassString; + float MaxPercentageOfDesiredNumToAllow; + int CurrentNumberOfNPCTouching; +}; + +struct __declspec(align(8)) UNPCSpawnEntriesContainer : UObject +{ + TArray NPCSpawnEntries; + TArray NPCSpawnLimits; + float MaxDesiredNumEnemiesMultiplier; +}; + +struct FConfigCacheIni +{ +}; + +struct USceneComponent : UActorComponent +{ + FieldValue ComponentToWorldField() { return { this, "USceneComponent.ComponentToWorld" }; } + FieldValue> MobilityField() { return { this, "USceneComponent.Mobility" }; } + FieldValue BoundsField() { return { this, "USceneComponent.Bounds" }; } + FieldValue AttachParentField() { return { this, "USceneComponent.AttachParent" }; } + FieldValue AttachSocketNameField() { return { this, "USceneComponent.AttachSocketName" }; } + FieldValue> AttachChildrenField() { return { this, "USceneComponent.AttachChildren" }; } + FieldValue RelativeLocationField() { return { this, "USceneComponent.RelativeLocation" }; } + FieldValue RelativeRotationField() { return { this, "USceneComponent.RelativeRotation" }; } + FieldValue> DetailModeField() { return { this, "USceneComponent.DetailMode" }; } + FieldValue AttachmentChangedIncrementerField() { return { this, "USceneComponent.AttachmentChangedIncrementer" }; } + FieldValue NetUpdateTransformField() { return { this, "USceneComponent.NetUpdateTransform" }; } + FieldValue NetOldAttachParentField() { return { this, "USceneComponent.NetOldAttachParent" }; } + FieldValue NetOldAttachSocketNameField() { return { this, "USceneComponent.NetOldAttachSocketName" }; } + FieldValue RelativeScale3DField() { return { this, "USceneComponent.RelativeScale3D" }; } + FieldValue ComponentVelocityField() { return { this, "USceneComponent.ComponentVelocity" }; } + + // Functions + + void OnChildAttached(USceneComponent * ChildComponent) { NativeCall(this, "USceneComponent.OnChildAttached", ChildComponent); } + FVector * GetCustomLocation(FVector * result) { return NativeCall(this, "USceneComponent.GetCustomLocation", result); } + UField * StaticClass() { return NativeCall(this, "USceneComponent.StaticClass"); } + FVector * GetForwardVector(FVector * result) { return NativeCall(this, "USceneComponent.GetForwardVector", result); } + FTransform * CalcNewComponentToWorld(FTransform * result, FTransform * NewRelativeTransform, USceneComponent * Parent) { return NativeCall(this, "USceneComponent.CalcNewComponentToWorld", result, NewRelativeTransform, Parent); } + void UpdateComponentToWorldWithParent(USceneComponent * Parent, bool bSkipPhysicsMove, FQuat * RelativeRotationQuat) { NativeCall(this, "USceneComponent.UpdateComponentToWorldWithParent", Parent, bSkipPhysicsMove, RelativeRotationQuat); } + void OnRegister() { NativeCall(this, "USceneComponent.OnRegister"); } + void UpdateComponentToWorld(bool bSkipPhysicsMove) { NativeCall(this, "USceneComponent.UpdateComponentToWorld", bSkipPhysicsMove); } + void PropagateTransformUpdate(bool bTransformChanged, bool bSkipPhysicsMove) { NativeCall(this, "USceneComponent.PropagateTransformUpdate", bTransformChanged, bSkipPhysicsMove); } + void DestroyComponent() { NativeCall(this, "USceneComponent.DestroyComponent"); } + FBoxSphereBounds * CalcBounds(FBoxSphereBounds * result, FTransform * LocalToWorld) { return NativeCall(this, "USceneComponent.CalcBounds", result, LocalToWorld); } + void CalcBoundingCylinder(float * CylinderRadius, float * CylinderHalfHeight) { NativeCall(this, "USceneComponent.CalcBoundingCylinder", CylinderRadius, CylinderHalfHeight); } + void UpdateBounds() { NativeCall(this, "USceneComponent.UpdateBounds"); } + void SetRelativeLocationAndRotation(FVector NewLocation, FQuat * NewRotation, bool bSweep) { NativeCall(this, "USceneComponent.SetRelativeLocationAndRotation", NewLocation, NewRotation, bSweep); } + void AddLocalOffset(FVector DeltaLocation, bool bSweep) { NativeCall(this, "USceneComponent.AddLocalOffset", DeltaLocation, bSweep); } + void AddLocalRotation(FRotator DeltaRotation, bool bSweep) { NativeCall(this, "USceneComponent.AddLocalRotation", DeltaRotation, bSweep); } + void AddLocalTransform(FTransform * DeltaTransform, bool bSweep) { NativeCall(this, "USceneComponent.AddLocalTransform", DeltaTransform, bSweep); } + void AddWorldTransform(FTransform * DeltaTransform, bool bSweep) { NativeCall(this, "USceneComponent.AddWorldTransform", DeltaTransform, bSweep); } + void SetRelativeScale3D(FVector NewScale3D) { NativeCall(this, "USceneComponent.SetRelativeScale3D", NewScale3D); } + void ResetRelativeTransform() { NativeCall(this, "USceneComponent.ResetRelativeTransform"); } + void SetRelativeTransform(FTransform * NewTransform, bool bSweep) { NativeCall(this, "USceneComponent.SetRelativeTransform", NewTransform, bSweep); } + FTransform * GetRelativeTransform(FTransform * result) { return NativeCall(this, "USceneComponent.GetRelativeTransform", result); } + void SetWorldLocation(FVector NewLocation, bool bSweep) { NativeCall(this, "USceneComponent.SetWorldLocation", NewLocation, bSweep); } + void SetWorldRotation(FQuat * NewRotation, bool bSweep) { NativeCall(this, "USceneComponent.SetWorldRotation", NewRotation, bSweep); } + void SetWorldScale3D(FVector NewScale) { NativeCall(this, "USceneComponent.SetWorldScale3D", NewScale); } + void SetWorldTransform(FTransform * NewTransform, bool bSweep) { NativeCall(this, "USceneComponent.SetWorldTransform", NewTransform, bSweep); } + void SetWorldLocationAndRotation(FVector NewLocation, FQuat * NewRotation, bool bSweep) { NativeCall(this, "USceneComponent.SetWorldLocationAndRotation", NewLocation, NewRotation, bSweep); } + void SetWorldLocationAndRotationNoPhysics(FVector * NewLocation, FRotator * NewRotation) { NativeCall(this, "USceneComponent.SetWorldLocationAndRotationNoPhysics", NewLocation, NewRotation); } + FVector * GetRightVector(FVector * result) { return NativeCall(this, "USceneComponent.GetRightVector", result); } + FVector * GetUpVector(FVector * result) { return NativeCall(this, "USceneComponent.GetUpVector", result); } + void GetParentComponents(TArray * Parents) { NativeCall *>(this, "USceneComponent.GetParentComponents", Parents); } + void GetChildrenComponents(bool bIncludeAllDescendants, TArray * Children) { NativeCall *>(this, "USceneComponent.GetChildrenComponents", bIncludeAllDescendants, Children); } + void AppendDescendants(TArray * Children) { NativeCall *>(this, "USceneComponent.AppendDescendants", Children); } + void AttachTo(USceneComponent * Parent, FName InSocketName, EAttachLocation::Type AttachType, bool bWeldSimulatedBodies) { NativeCall(this, "USceneComponent.AttachTo", Parent, InSocketName, AttachType, bWeldSimulatedBodies); } + void DetachFromParent(bool bMaintainWorldPosition) { NativeCall(this, "USceneComponent.DetachFromParent", bMaintainWorldPosition); } + FVector * GetMeshScaleMultiplier(FVector * result) { return NativeCall(this, "USceneComponent.GetMeshScaleMultiplier", result); } + AActor * GetAttachmentRootActor() { return NativeCall(this, "USceneComponent.GetAttachmentRootActor"); } + void UpdateChildTransforms() { NativeCall(this, "USceneComponent.UpdateChildTransforms"); } + void PostInterpChange(UProperty * PropertyThatChanged) { NativeCall(this, "USceneComponent.PostInterpChange", PropertyThatChanged); } + FTransform * GetSocketTransform(FTransform * result, FName SocketName, ERelativeTransformSpace TransformSpace) { return NativeCall(this, "USceneComponent.GetSocketTransform", result, SocketName, TransformSpace); } + FVector * GetSocketLocation(FVector * result, FName SocketName) { return NativeCall(this, "USceneComponent.GetSocketLocation", result, SocketName); } + FRotator * GetSocketRotation(FRotator * result, FName SocketName) { return NativeCall(this, "USceneComponent.GetSocketRotation", result, SocketName); } + FQuat * GetSocketQuaternion(FQuat * result, FName SocketName) { return NativeCall(this, "USceneComponent.GetSocketQuaternion", result, SocketName); } + FVector * GetComponentVelocity(FVector * result) { return NativeCall(this, "USceneComponent.GetComponentVelocity", result); } + void GetSocketWorldLocationAndRotation(FName InSocketName, FVector * OutLocation, FRotator * OutRotation) { NativeCall(this, "USceneComponent.GetSocketWorldLocationAndRotation", InSocketName, OutLocation, OutRotation); } + FCollisionResponseContainer * GetCollisionResponseToChannels() { return NativeCall(this, "USceneComponent.GetCollisionResponseToChannels"); } + void SetMobility(EComponentMobility::Type NewMobility) { NativeCall(this, "USceneComponent.SetMobility", NewMobility); } + bool IsAnySimulatingPhysics() { return NativeCall(this, "USceneComponent.IsAnySimulatingPhysics"); } + void UpdatePhysicsVolume(bool bTriggerNotifiers) { NativeCall(this, "USceneComponent.UpdatePhysicsVolume", bTriggerNotifiers); } + void BeginDestroy() { NativeCall(this, "USceneComponent.BeginDestroy"); } + bool InternalSetWorldLocationAndRotation(FVector NewLocation, FQuat * RotationQuat, bool bNoPhysics) { return NativeCall(this, "USceneComponent.InternalSetWorldLocationAndRotation", NewLocation, RotationQuat, bNoPhysics); } + bool MoveComponentImpl(FVector * Delta, FQuat * NewRotation, bool bSweep, FHitResult * OutHit, EMoveComponentFlags MoveFlags, bool bUpdateOverlaps) { return NativeCall(this, "USceneComponent.MoveComponentImpl", Delta, NewRotation, bSweep, OutHit, MoveFlags, bUpdateOverlaps); } + bool IsVisibleInEditor() { return NativeCall(this, "USceneComponent.IsVisibleInEditor"); } + bool ShouldRender() { return NativeCall(this, "USceneComponent.ShouldRender"); } + bool CanEverRender() { return NativeCall(this, "USceneComponent.CanEverRender"); } + bool IsVisible() { return NativeCall(this, "USceneComponent.IsVisible"); } + void SetVisibility(bool bNewVisibility, bool bPropagateToChildren) { NativeCall(this, "USceneComponent.SetVisibility", bNewVisibility, bPropagateToChildren); } + void SetHiddenInGame(bool NewHiddenGame, bool bPropagateToChildren) { NativeCall(this, "USceneComponent.SetHiddenInGame", NewHiddenGame, bPropagateToChildren); } + void ApplyWorldOffset(FVector * InOffset, bool bWorldShift) { NativeCall(this, "USceneComponent.ApplyWorldOffset", InOffset, bWorldShift); } + FBoxSphereBounds * GetPlacementExtent(FBoxSphereBounds * result) { return NativeCall(this, "USceneComponent.GetPlacementExtent", result); } + void PreNetReceive() { NativeCall(this, "USceneComponent.PreNetReceive"); } + void PostNetReceive() { NativeCall(this, "USceneComponent.PostNetReceive"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "USceneComponent.GetLifetimeReplicatedProps", OutLifetimeProps); } + void StopSound(USoundBase * SoundToStop, float FadeOutTime) { NativeCall(this, "USceneComponent.StopSound", SoundToStop, FadeOutTime); } + static void StaticRegisterNativesUSceneComponent() { NativeCall(nullptr, "USceneComponent.StaticRegisterNativesUSceneComponent"); } +}; + +// Actor + +struct AActor : UObject +{ + FieldValue CustomTimeDilationField() { return { this, "AActor.CustomTimeDilation" }; } + FieldValue ClientReplicationSendNowThresholdField() { return { this, "AActor.ClientReplicationSendNowThreshold" }; } + FieldValue> RemoteRoleField() { return { this, "AActor.RemoteRole" }; } + FieldValue OwnerField() { return { this, "AActor.Owner" }; } + FieldValue LastReplicatedMovementField() { return { this, "AActor.LastReplicatedMovement" }; } + FieldValue> RoleField() { return { this, "AActor.Role" }; } + FieldValue> NetDormancyField() { return { this, "AActor.NetDormancy" }; } + FieldValue>> ReplicatedComponentsField() { return { this, "AActor.ReplicatedComponents" }; } + FieldValue> LastPostProcessVolumeSoundField() { return { this, "AActor.LastPostProcessVolumeSound" }; } + FieldValue DefaultStasisComponentOctreeFlagsField() { return { this, "AActor.DefaultStasisComponentOctreeFlags" }; } + FieldValue StasisCheckComponentField() { return { this, "AActor.StasisCheckComponent" }; } + FieldValue> NetworkSpatializationChildrenField() { return { this, "AActor.NetworkSpatializationChildren" }; } + FieldValue NetworkSpatializationParentField() { return { this, "AActor.NetworkSpatializationParent" }; } + FieldValue NetworkAndStasisRangeMultiplierField() { return { this, "AActor.NetworkAndStasisRangeMultiplier" }; } + FieldValue UnstasisLastInRangeTimeField() { return { this, "AActor.UnstasisLastInRangeTime" }; } + FieldValue LastPreReplicationTimeField() { return { this, "AActor.LastPreReplicationTime" }; } + FieldValue LastEnterStasisTimeField() { return { this, "AActor.LastEnterStasisTime" }; } + FieldValue LastExitStasisTimeField() { return { this, "AActor.LastExitStasisTime" }; } + FieldValue CustomTagField() { return { this, "AActor.CustomTag" }; } + FieldValue CustomDataField() { return { this, "AActor.CustomData" }; } + FieldValue ReplicationIntervalMultiplierField() { return { this, "AActor.ReplicationIntervalMultiplier" }; } + FieldValue ForceImmediateReplicationFrameField() { return { this, "AActor.ForceImmediateReplicationFrame" }; } + FieldValue StasisSetIndexField() { return { this, "AActor.StasisSetIndex" }; } + FieldValue RandomStartByteField() { return { this, "AActor.RandomStartByte" }; } + FieldValue LastFrameUnStasisField() { return { this, "AActor.LastFrameUnStasis" }; } + FieldValue LastUnstasisFrameCounterField() { return { this, "AActor.LastUnstasisFrameCounter" }; } + FieldValue>> StasisUnRegisteredComponentsField() { return { this, "AActor.StasisUnRegisteredComponents" }; } + FieldValue NetCullDistanceSquaredField() { return { this, "AActor.NetCullDistanceSquared" }; } + FieldValue NetCullDistanceSquaredDormantField() { return { this, "AActor.NetCullDistanceSquaredDormant" }; } + FieldValue NetTagField() { return { this, "AActor.NetTag" }; } + FieldValue NetUpdateTimeField() { return { this, "AActor.NetUpdateTime" }; } + FieldValue NetUpdateFrequencyField() { return { this, "AActor.NetUpdateFrequency" }; } + FieldValue NetPriorityField() { return { this, "AActor.NetPriority" }; } + FieldValue LastNetUpdateTimeField() { return { this, "AActor.LastNetUpdateTime" }; } + FieldValue NetDriverNameField() { return { this, "AActor.NetDriverName" }; } + FieldValue TargetingTeamField() { return { this, "AActor.TargetingTeam" }; } + FieldValue OverrideStasisComponentRadiusField() { return { this, "AActor.OverrideStasisComponentRadius" }; } + FieldValue InstigatorField() { return { this, "AActor.Instigator" }; } + FieldValue CreationTimeField() { return { this, "AActor.CreationTime" }; } + FieldValue OriginalCreationTimeField() { return { this, "AActor.OriginalCreationTime" }; } + FieldValue> ChildrenField() { return { this, "AActor.Children" }; } + FieldValue AnimUpdateRateShiftTagField() { return { this, "AActor.AnimUpdateRateShiftTag" }; } + FieldValue AnimUpdateRateFrameCountField() { return { this, "AActor.AnimUpdateRateFrameCount" }; } + FieldValue RootComponentField() { return { this, "AActor.RootComponent" }; } + FieldValue> ControllingMatineeActorsField() { return { this, "AActor.ControllingMatineeActors" }; } + FieldValue InitialLifeSpanField() { return { this, "AActor.InitialLifeSpan" }; } + FieldValue> LayersField() { return { this, "AActor.Layers" }; } + FieldValue> ParentComponentActorField() { return { this, "AActor.ParentComponentActor" }; } + FieldValue LastRenderTimeField() { return { this, "AActor.LastRenderTime" }; } + FieldValue LastRenderTimeIgnoreShadowField() { return { this, "AActor.LastRenderTimeIgnoreShadow" }; } + FieldValue> TagsField() { return { this, "AActor.Tags" }; } + FieldValue HiddenEditorViewsField() { return { this, "AActor.HiddenEditorViews" }; } + FieldValue DefaultActorLocationField() { return { this, "AActor.DefaultActorLocation" }; } + FieldValue UniqueGuidIdField() { return { this, "AActor.UniqueGuidId" }; } + FieldValue ForceMaximumReplicationRateUntilTimeField() { return { this, "AActor.ForceMaximumReplicationRateUntilTime" }; } + FieldValue LastActorForceReplicationTimeField() { return { this, "AActor.LastActorForceReplicationTime" }; } + FieldValue> OwnedComponentsField() { return { this, "AActor.OwnedComponents" }; } + FieldValue> SerializedComponentsField() { return { this, "AActor.SerializedComponents" }; } + FieldValue LastFrameCalculcatedNetworkRangeMultiplierField() { return { this, "AActor.LastFrameCalculcatedNetworkRangeMultiplier" }; } + + // Functions + + FVector * GetTargetPathfindingLocation(FVector * result, AActor * RequestedBy) { return NativeCall(this, "AActor.GetTargetPathfindingLocation", result, RequestedBy); } + FVector * GetTargetingLocation(FVector * result) { return NativeCall(this, "AActor.GetTargetingLocation", result); } + bool IsLevelBoundsRelevant() { return NativeCall(this, "AActor.IsLevelBoundsRelevant"); } + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "AActor.GetPrivateStaticClass"); } + void OutsideWorldBounds() { NativeCall(this, "AActor.OutsideWorldBounds"); } + bool IsPendingKillPending() { return NativeCall(this, "AActor.IsPendingKillPending"); } + bool AllowSaving() { return NativeCall(this, "AActor.AllowSaving"); } + FString * GetHumanReadableName(FString * result) { return NativeCall(this, "AActor.GetHumanReadableName", result); } + bool CheckDefaultSubobjectsInternal() { return NativeCall(this, "AActor.CheckDefaultSubobjectsInternal"); } + bool CheckActorComponents() { return NativeCall(this, "AActor.CheckActorComponents"); } + void ResetOwnedComponents() { NativeCall(this, "AActor.ResetOwnedComponents"); } + void PostInitProperties() { NativeCall(this, "AActor.PostInitProperties"); } + UWorld * GetWorld() { return NativeCall(this, "AActor.GetWorld"); } + bool IsInGameplayWorld() { return NativeCall(this, "AActor.IsInGameplayWorld"); } + void ClearCrossLevelReferences() { NativeCall(this, "AActor.ClearCrossLevelReferences"); } + bool TeleportTo(FVector * DestLocation, FRotator * DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall(this, "AActor.TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } + bool SimpleTeleportTo(FVector * DestLocation, FRotator * DestRotation) { return NativeCall(this, "AActor.SimpleTeleportTo", DestLocation, DestRotation); } + void AddTickPrerequisiteActor(AActor * PrerequisiteActor) { NativeCall(this, "AActor.AddTickPrerequisiteActor", PrerequisiteActor); } + void AddTickPrerequisiteComponent(UActorComponent * PrerequisiteComponent) { NativeCall(this, "AActor.AddTickPrerequisiteComponent", PrerequisiteComponent); } + void RemoveTickPrerequisiteActor(AActor * PrerequisiteActor) { NativeCall(this, "AActor.RemoveTickPrerequisiteActor", PrerequisiteActor); } + void RemoveTickPrerequisiteComponent(UActorComponent * PrerequisiteComponent) { NativeCall(this, "AActor.RemoveTickPrerequisiteComponent", PrerequisiteComponent); } + void BeginDestroy() { NativeCall(this, "AActor.BeginDestroy"); } + bool IsReadyForFinishDestroy() { return NativeCall(this, "AActor.IsReadyForFinishDestroy"); } + void PostLoad() { NativeCall(this, "AActor.PostLoad"); } + void PostLoadSubobjects(FObjectInstancingGraph * OuterInstanceGraph) { NativeCall(this, "AActor.PostLoadSubobjects", OuterInstanceGraph); } + void ProcessEvent(UFunction * Function, void * Parameters) { NativeCall(this, "AActor.ProcessEvent", Function, Parameters); } + void RegisterActorTickFunctions(bool bRegister, bool bSaveAndRestoreTickState) { NativeCall(this, "AActor.RegisterActorTickFunctions", bRegister, bSaveAndRestoreTickState); } + void RegisterAllActorTickFunctions(bool bRegister, bool bDoComponents, bool bSaveAndRestoreTickState) { NativeCall(this, "AActor.RegisterAllActorTickFunctions", bRegister, bDoComponents, bSaveAndRestoreTickState); } + void SetActorTickEnabled(bool bEnabled) { NativeCall(this, "AActor.SetActorTickEnabled", bEnabled); } + bool Rename(const wchar_t * InName, UObject * NewOuter, unsigned int Flags) { return NativeCall(this, "AActor.Rename", InName, NewOuter, Flags); } + UNetConnection * GetNetConnection() { return NativeCall(this, "AActor.GetNetConnection"); } + UPlayer * GetNetOwningPlayer() { return NativeCall(this, "AActor.GetNetOwningPlayer"); } + void Tick(float DeltaSeconds) { NativeCall(this, "AActor.Tick", DeltaSeconds); } + void GetComponentsBoundingCylinder(float * OutCollisionRadius, float * OutCollisionHalfHeight, bool bNonColliding) { NativeCall(this, "AActor.GetComponentsBoundingCylinder", OutCollisionRadius, OutCollisionHalfHeight, bNonColliding); } + void GetSimpleCollisionCylinder(float * CollisionRadius, float * CollisionHalfHeight) { NativeCall(this, "AActor.GetSimpleCollisionCylinder", CollisionRadius, CollisionHalfHeight); } + bool IsRootComponentCollisionRegistered() { return NativeCall(this, "AActor.IsRootComponentCollisionRegistered"); } + bool IsAttachedTo(AActor * Other) { return NativeCall(this, "AActor.IsAttachedTo", Other); } + bool IsBasedOnActor(AActor * Other) { return NativeCall(this, "AActor.IsBasedOnActor", Other); } + bool Modify(bool bAlwaysMarkDirty) { return NativeCall(this, "AActor.Modify", bAlwaysMarkDirty); } + FBox * GetComponentsBoundingBox(FBox * result, bool bNonColliding) { return NativeCall(this, "AActor.GetComponentsBoundingBox", result, bNonColliding); } + FBox * GetComponentsBoundingBoxForLevelBounds(FBox * result) { return NativeCall(this, "AActor.GetComponentsBoundingBoxForLevelBounds", result); } + bool CheckStillInWorld() { return NativeCall(this, "AActor.CheckStillInWorld"); } + void GetOverlappingActors(TArray * OverlappingActors, UClass * ClassFilter) { NativeCall *, UClass *>(this, "AActor.GetOverlappingActors", OverlappingActors, ClassFilter); } + void GetOverlappingComponents(TArray * OutOverlappingComponents) { NativeCall *>(this, "AActor.GetOverlappingComponents", OutOverlappingComponents); } + long double GetLastRenderTime(bool ignoreShadow) { return NativeCall(this, "AActor.GetLastRenderTime", ignoreShadow); } + void SetOwner(AActor * NewOwner) { NativeCall(this, "AActor.SetOwner", NewOwner); } + bool HasNetOwner() { return NativeCall(this, "AActor.HasNetOwner"); } + void AttachRootComponentTo(USceneComponent * InParent, FName InSocketName, EAttachLocation::Type AttachLocationType, bool bWeldSimulatedBodies) { NativeCall(this, "AActor.AttachRootComponentTo", InParent, InSocketName, AttachLocationType, bWeldSimulatedBodies); } + void OnRep_AttachmentReplication() { NativeCall(this, "AActor.OnRep_AttachmentReplication"); } + void AttachRootComponentToActor(AActor * InParentActor, FName InSocketName, EAttachLocation::Type AttachLocationType, bool bWeldSimulatedBodies) { NativeCall(this, "AActor.AttachRootComponentToActor", InParentActor, InSocketName, AttachLocationType, bWeldSimulatedBodies); } + void DetachRootComponentFromParent(bool bMaintainWorldPosition) { NativeCall(this, "AActor.DetachRootComponentFromParent", bMaintainWorldPosition); } + AActor * GetAttachParentActor() { return NativeCall(this, "AActor.GetAttachParentActor"); } + FName * GetAttachParentSocketName(FName * result) { return NativeCall(this, "AActor.GetAttachParentSocketName", result); } + void GetAttachedActors(TArray * OutActors) { NativeCall *>(this, "AActor.GetAttachedActors", OutActors); } + bool ActorHasTag(FName Tag) { return NativeCall(this, "AActor.ActorHasTag", Tag); } + bool IsMatineeControlled() { return NativeCall(this, "AActor.IsMatineeControlled"); } + bool IsRelevancyOwnerFor(AActor * ReplicatedActor, AActor * ActorOwner, AActor * ConnectionActor) { return NativeCall(this, "AActor.IsRelevancyOwnerFor", ReplicatedActor, ActorOwner, ConnectionActor); } + void PrestreamTextures(float Seconds, bool bEnableStreaming, int CinematicTextureGroups) { NativeCall(this, "AActor.PrestreamTextures", Seconds, bEnableStreaming, CinematicTextureGroups); } + void EndPlay(EEndPlayReason::Type EndPlayReason) { NativeCall(this, "AActor.EndPlay", EndPlayReason); } + FTransform * GetTransform(FTransform * result) { return NativeCall(this, "AActor.GetTransform", result); } + void ClearNetworkSpatializationParent() { NativeCall(this, "AActor.ClearNetworkSpatializationParent"); } + void SetNetworkSpatializationParent(AActor * NewParent) { NativeCall(this, "AActor.SetNetworkSpatializationParent", NewParent); } + void Destroyed() { NativeCall(this, "AActor.Destroyed"); } + void FellOutOfWorld(UDamageType * dmgType) { NativeCall(this, "AActor.FellOutOfWorld", dmgType); } + void MakeNoise(float Loudness, APawn * NoiseInstigator, FVector NoiseLocation) { NativeCall(this, "AActor.MakeNoise", Loudness, NoiseInstigator, NoiseLocation); } + static void MakeNoiseImpl(AActor * NoiseMaker, float Loudness, APawn * NoiseInstigator, FVector * NoiseLocation) { NativeCall(nullptr, "AActor.MakeNoiseImpl", NoiseMaker, Loudness, NoiseInstigator, NoiseLocation); } + float TakeDamage(float DamageAmount, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "AActor.TakeDamage", DamageAmount, DamageEvent, EventInstigator, DamageCauser); } + float InternalTakeRadialDamage(float Damage, FRadialDamageEvent * RadialDamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "AActor.InternalTakeRadialDamage", Damage, RadialDamageEvent, EventInstigator, DamageCauser); } + void DispatchBlockingHit(UPrimitiveComponent * MyComp, UPrimitiveComponent * OtherComp, bool bSelfMoved, FHitResult * Hit) { NativeCall(this, "AActor.DispatchBlockingHit", MyComp, OtherComp, bSelfMoved, Hit); } + void BecomeViewTarget(APlayerController * PC) { NativeCall(this, "AActor.BecomeViewTarget", PC); } + void EndViewTarget(APlayerController * PC) { NativeCall(this, "AActor.EndViewTarget", PC); } + void CalcCamera(float DeltaTime, FMinimalViewInfo * OutResult) { NativeCall(this, "AActor.CalcCamera", DeltaTime, OutResult); } + void ForceNetRelevant() { NativeCall(this, "AActor.ForceNetRelevant"); } + void InventoryItemUsed(UObject * InventoryItemObject) { NativeCall(this, "AActor.InventoryItemUsed", InventoryItemObject); } + void InventoryItemDropped(UObject * InventoryItemObject) { NativeCall(this, "AActor.InventoryItemDropped", InventoryItemObject); } + bool ForceAllowsInventoryUse(UObject * InventoryItemObject) { return NativeCall(this, "AActor.ForceAllowsInventoryUse", InventoryItemObject); } + void RemoveOwnedComponent(UActorComponent * Component) { NativeCall(this, "AActor.RemoveOwnedComponent", Component); } + UActorComponent * GetComponentByClass(TSubclassOf ComponentClass) { return NativeCall>(this, "AActor.GetComponentByClass", ComponentClass); } + UPrimitiveComponent * GetVisibleComponentByClass(TSubclassOf ComponentClass) { return NativeCall>(this, "AActor.GetVisibleComponentByClass", ComponentClass); } + UActorComponent * GetComponentByCustomTag(FName TheTag) { return NativeCall(this, "AActor.GetComponentByCustomTag", TheTag); } + TArray * GetComponentsByClass(TArray * result, TSubclassOf ComponentClass) { return NativeCall *, TArray *, TSubclassOf>(this, "AActor.GetComponentsByClass", result, ComponentClass); } + TArray * GetComponentsByCustomTag(TArray * result, FName TheTag) { return NativeCall *, TArray *, FName>(this, "AActor.GetComponentsByCustomTag", result, TheTag); } + void DisableComponentsSimulatePhysics() { NativeCall(this, "AActor.DisableComponentsSimulatePhysics"); } + void PostSpawnInitialize(FVector * SpawnLocation, FRotator * SpawnRotation, AActor * InOwner, APawn * InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction, bool bDeferBeginPlay) { NativeCall(this, "AActor.PostSpawnInitialize", SpawnLocation, SpawnRotation, InOwner, InInstigator, bRemoteOwned, bNoFail, bDeferConstruction, bDeferBeginPlay); } + void FinishSpawning(FTransform * Transform, bool bIsDefaultTransform) { NativeCall(this, "AActor.FinishSpawning", Transform, bIsDefaultTransform); } + void DoExecuteActorConstruction(FTransform * Transform, bool bIsDefaultTransform) { NativeCall(this, "AActor.DoExecuteActorConstruction", Transform, bIsDefaultTransform); } + void PreSave() { NativeCall(this, "AActor.PreSave"); } + void PostActorConstruction() { NativeCall(this, "AActor.PostActorConstruction"); } + void SetReplicates(bool bInReplicates) { NativeCall(this, "AActor.SetReplicates", bInReplicates); } + void CopyRemoteRoleFrom(AActor * CopyFromActor) { NativeCall(this, "AActor.CopyRemoteRoleFrom", CopyFromActor); } + void PostNetInit() { NativeCall(this, "AActor.PostNetInit"); } + void BeginPlay() { NativeCall(this, "AActor.BeginPlay"); } + void MatineeUpdated() { NativeCall(this, "AActor.MatineeUpdated"); } + void ForceReplicateNowWithChannel() { NativeCall(this, "AActor.ForceReplicateNowWithChannel"); } + void EnableInput(APlayerController * PlayerController) { NativeCall(this, "AActor.EnableInput", PlayerController); } + void DisableInput(APlayerController * PlayerController) { NativeCall(this, "AActor.DisableInput", PlayerController); } + float GetInputAxisValue(FName InputAxisName) { return NativeCall(this, "AActor.GetInputAxisValue", InputAxisName); } + float GetInputAxisKeyValue(FKey InputAxisKey) { return NativeCall(this, "AActor.GetInputAxisKeyValue", InputAxisKey); } + FVector * GetInputVectorAxisValue(FVector * result, FKey InputAxisKey) { return NativeCall(this, "AActor.GetInputVectorAxisValue", result, InputAxisKey); } + bool SetActorLocation(FVector * NewLocation, bool bSweep) { return NativeCall(this, "AActor.SetActorLocation", NewLocation, bSweep); } + bool SetActorRotation(FRotator NewRotation) { return NativeCall(this, "AActor.SetActorRotation", NewRotation); } + bool SetActorLocationAndRotation(FVector * NewLocation, FRotator NewRotation, bool bSweep) { return NativeCall(this, "AActor.SetActorLocationAndRotation", NewLocation, NewRotation, bSweep); } + void SetActorScale3D(FVector * NewScale3D) { NativeCall(this, "AActor.SetActorScale3D", NewScale3D); } + void SetActorRelativeScale3D(FVector NewRelativeScale) { NativeCall(this, "AActor.SetActorRelativeScale3D", NewRelativeScale); } + void SetActorHiddenInGame(bool bNewHidden) { NativeCall(this, "AActor.SetActorHiddenInGame", bNewHidden); } + void SetActorEnableCollision(bool bNewActorEnableCollision) { NativeCall(this, "AActor.SetActorEnableCollision", bNewActorEnableCollision); } + bool Destroy(bool bNetForce, bool bShouldModifyLevel) { return NativeCall(this, "AActor.Destroy", bNetForce, bShouldModifyLevel); } + bool SetRootComponent(USceneComponent * NewRootComponent) { return NativeCall(this, "AActor.SetRootComponent", NewRootComponent); } + FVector * GetActorForwardVector(FVector * result) { return NativeCall(this, "AActor.GetActorForwardVector", result); } + FVector * GetActorUpVector(FVector * result) { return NativeCall(this, "AActor.GetActorUpVector", result); } + FVector * GetActorRightVector(FVector * result) { return NativeCall(this, "AActor.GetActorRightVector", result); } + void GetActorBounds(bool bOnlyCollidingComponents, FVector * Origin, FVector * BoxExtent) { NativeCall(this, "AActor.GetActorBounds", bOnlyCollidingComponents, Origin, BoxExtent); } + AWorldSettings * GetWorldSettings() { return NativeCall(this, "AActor.GetWorldSettings"); } + void PlaySoundOnActor(USoundCue * InSoundCue, float VolumeMultiplier, float PitchMultiplier) { NativeCall(this, "AActor.PlaySoundOnActor", InSoundCue, VolumeMultiplier, PitchMultiplier); } + void PlaySoundAtLocation(USoundCue * InSoundCue, FVector SoundLocation, float VolumeMultiplier, float PitchMultiplier) { NativeCall(this, "AActor.PlaySoundAtLocation", InSoundCue, SoundLocation, VolumeMultiplier, PitchMultiplier); } + void UnregisterAllComponents(bool bDetachFromOtherParent) { NativeCall(this, "AActor.UnregisterAllComponents", bDetachFromOtherParent); } + void RegisterAllComponents() { NativeCall(this, "AActor.RegisterAllComponents"); } + void MarkComponentsAsPendingKill() { NativeCall(this, "AActor.MarkComponentsAsPendingKill"); } + void ReregisterAllComponents() { NativeCall(this, "AActor.ReregisterAllComponents"); } + void MarkComponentsRenderStateDirty() { NativeCall(this, "AActor.MarkComponentsRenderStateDirty"); } + void InitializeComponents() { NativeCall(this, "AActor.InitializeComponents"); } + void UninitializeComponents() { NativeCall(this, "AActor.UninitializeComponents"); } + void InvalidateLightingCacheDetailed(bool bTranslationOnly) { NativeCall(this, "AActor.InvalidateLightingCacheDetailed", bTranslationOnly); } + void SetLifeSpan(float InLifespan) { NativeCall(this, "AActor.SetLifeSpan", InLifespan); } + float GetLifeSpan() { return NativeCall(this, "AActor.GetLifeSpan"); } + void PostInitializeComponents() { NativeCall(this, "AActor.PostInitializeComponents"); } + void Stasis() { NativeCall(this, "AActor.Stasis"); } + void Unstasis() { NativeCall(this, "AActor.Unstasis"); } + void PreInitializeComponents() { NativeCall(this, "AActor.PreInitializeComponents"); } + float GetDistanceTo(AActor * OtherActor) { return NativeCall(this, "AActor.GetDistanceTo", OtherActor); } + float GetHorizontalDistanceTo(AActor * OtherActor) { return NativeCall(this, "AActor.GetHorizontalDistanceTo", OtherActor); } + float GetVerticalDistanceTo(AActor * OtherActor) { return NativeCall(this, "AActor.GetVerticalDistanceTo", OtherActor); } + float GetDotProductTo(AActor * OtherActor) { return NativeCall(this, "AActor.GetDotProductTo", OtherActor); } + float GetHorizontalDotProductTo(AActor * OtherActor) { return NativeCall(this, "AActor.GetHorizontalDotProductTo", OtherActor); } + APlayerController * GetOwnerController() { return NativeCall(this, "AActor.GetOwnerController"); } + bool AlwaysReplicatePropertyConditional(UProperty * forProperty) { return NativeCall(this, "AActor.AlwaysReplicatePropertyConditional", forProperty); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "AActor.TryMultiUse", ForPC, UseIndex); } + void ChangeActorTeam(int NewTeam) { NativeCall(this, "AActor.ChangeActorTeam", NewTeam); } + bool GetIsMapActor() { return NativeCall(this, "AActor.GetIsMapActor"); } + void SendExecCommand(FName CommandName, FNetExecParams * ExecParams, bool bIsReliable) { NativeCall(this, "AActor.SendExecCommand", CommandName, ExecParams, bIsReliable); } + void ServerSendSimpleExecCommandToEveryone(FName CommandName, bool bIsReliable, bool bForceSendToLocalPlayer, bool bIgnoreRelevancy) { NativeCall(this, "AActor.ServerSendSimpleExecCommandToEveryone", CommandName, bIsReliable, bForceSendToLocalPlayer, bIgnoreRelevancy); } + bool IsOwnedOrControlledBy(AActor * TestOwner) { return NativeCall(this, "AActor.IsOwnedOrControlledBy", TestOwner); } + bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall(this, "AActor.PreventCharacterBasing", OtherActor, BasedOnComponent); } + bool BPIsA(TSubclassOf anActorClass) { return NativeCall>(this, "AActor.BPIsA", anActorClass); } + void MulticastProperty(FName PropertyName) { NativeCall(this, "AActor.MulticastProperty", PropertyName); } + void PropertyServerToClients_Implementation(AActor * ActorToRep, FName PropertyName, TArray * ReplicationData) { NativeCall *>(this, "AActor.PropertyServerToClients_Implementation", ActorToRep, PropertyName, ReplicationData); } + float GetNetStasisAndRangeMultiplier() { return NativeCall(this, "AActor.GetNetStasisAndRangeMultiplier"); } + void StopActorSound(USoundBase * SoundAsset, float FadeOutTime) { NativeCall(this, "AActor.StopActorSound", SoundAsset, FadeOutTime); } + void GetAllSceneComponents(TArray * OutComponents) { NativeCall *>(this, "AActor.GetAllSceneComponents", OutComponents); } + void ActorPlaySound_Implementation(USoundBase * SoundAsset, bool bAttach, FName BoneName, FVector LocOffset) { NativeCall(this, "AActor.ActorPlaySound_Implementation", SoundAsset, bAttach, BoneName, LocOffset); } + void NetAttachRootComponentTo_Implementation(USceneComponent * InParent, FName InSocketName, FVector RelativeLocation, FRotator RelativeRotation) { NativeCall(this, "AActor.NetAttachRootComponentTo_Implementation", InParent, InSocketName, RelativeLocation, RelativeRotation); } + void NetDetachRootComponentFromAny_Implementation() { NativeCall(this, "AActor.NetDetachRootComponentFromAny_Implementation"); } + void ResetPropertiesForConstruction() { NativeCall(this, "AActor.ResetPropertiesForConstruction"); } + void DestroyConstructedComponents() { NativeCall(this, "AActor.DestroyConstructedComponents"); } + void RerunConstructionScripts() { NativeCall(this, "AActor.RerunConstructionScripts"); } + UActorComponent * CreateComponentFromTemplate(UActorComponent * Template, FString * InName) { return NativeCall(this, "AActor.CreateComponentFromTemplate", Template, InName); } + UActorComponent * AddComponent(FName TemplateName, bool bManualAttachment, FTransform * RelativeTransform, UObject * ComponentTemplateContext) { return NativeCall(this, "AActor.AddComponent", TemplateName, bManualAttachment, RelativeTransform, ComponentTemplateContext); } + void PreNetReceive() { NativeCall(this, "AActor.PreNetReceive"); } + void PostNetReceive() { NativeCall(this, "AActor.PostNetReceive"); } + void OnRep_ReplicatedMovement() { NativeCall(this, "AActor.OnRep_ReplicatedMovement"); } + void PostNetReceiveLocationAndRotation() { NativeCall(this, "AActor.PostNetReceiveLocationAndRotation"); } + void PostNetReceivePhysicState() { NativeCall(this, "AActor.PostNetReceivePhysicState"); } + bool IsNetRelevantFor(APlayerController * RealViewer, AActor * Viewer, FVector * SrcLocation) { return NativeCall(this, "AActor.IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AActor.GetLifetimeReplicatedProps", OutLifetimeProps); } + void GetSubobjectsWithStableNamesForNetworking(TArray * ObjList) { NativeCall *>(this, "AActor.GetSubobjectsWithStableNamesForNetworking", ObjList); } + void OnSubobjectCreatedFromReplication(UObject * NewSubobject) { NativeCall(this, "AActor.OnSubobjectCreatedFromReplication", NewSubobject); } + void OnSubobjectDestroyFromReplication(UObject * NewSubobject) { NativeCall(this, "AActor.OnSubobjectDestroyFromReplication", NewSubobject); } + bool IsNameStableForNetworking() { return NativeCall(this, "AActor.IsNameStableForNetworking"); } + void GetComponents(TArray * OutComponents) { NativeCall *>(this, "AActor.GetComponents", OutComponents); } + void GatherCurrentMovement() { NativeCall(this, "AActor.GatherCurrentMovement"); } + void ForceReplicateNow(bool bForceCreateChannel, bool bForceCreateChannelIfRelevant) { NativeCall(this, "AActor.ForceReplicateNow", bForceCreateChannel, bForceCreateChannelIfRelevant); } + void ForceNetUpdate(bool bDormantDontReplicateProperties) { NativeCall(this, "AActor.ForceNetUpdate", bDormantDontReplicateProperties); } + static void StaticRegisterNativesAActor() { NativeCall(nullptr, "AActor.StaticRegisterNativesAActor"); } + bool AllowIgnoreCharacterEncroachment(UPrimitiveComponent * HitComponent, AActor * EncroachingCharacter) { return NativeCall(this, "AActor.AllowIgnoreCharacterEncroachment", HitComponent, EncroachingCharacter); } + bool AllowManualMultiUseActivation(APlayerController * ForPC) { return NativeCall(this, "AActor.AllowManualMultiUseActivation", ForPC); } + void BPAttachedRootComponent() { NativeCall(this, "AActor.BPAttachedRootComponent"); } + bool BPForceAllowsInventoryUse(UObject * InventoryItemObject) { return NativeCall(this, "AActor.BPForceAllowsInventoryUse", InventoryItemObject); } + void BPInventoryItemDropped(UObject * InventoryItemObject) { NativeCall(this, "AActor.BPInventoryItemDropped", InventoryItemObject); } + void BPInventoryItemUsed(UObject * InventoryItemObject) { NativeCall(this, "AActor.BPInventoryItemUsed", InventoryItemObject); } + void DrawBasicFloatingHUD(AHUD * ForHUD) { NativeCall(this, "AActor.DrawBasicFloatingHUD", ForHUD); } + void K2_OnBecomeViewTarget(APlayerController * PC) { NativeCall(this, "AActor.K2_OnBecomeViewTarget", PC); } + void K2_OnEndViewTarget(APlayerController * PC) { NativeCall(this, "AActor.K2_OnEndViewTarget", PC); } + void ModifyHudMultiUseLoc(FVector2D * theVec, APlayerController * PC, int index) { NativeCall(this, "AActor.ModifyHudMultiUseLoc", theVec, PC, index); } + void PropertyServerToClients(AActor * ActorToRep, FName PropertyName, TArray * ReplicationData) { NativeCall *>(this, "AActor.PropertyServerToClients", ActorToRep, PropertyName, ReplicationData); } + void ReceiveActorBeginCursorOver() { NativeCall(this, "AActor.ReceiveActorBeginCursorOver"); } + void ReceiveActorBeginOverlap(AActor * OtherActor) { NativeCall(this, "AActor.ReceiveActorBeginOverlap", OtherActor); } + void ReceiveActorEndCursorOver() { NativeCall(this, "AActor.ReceiveActorEndCursorOver"); } + void ReceiveActorEndOverlap(AActor * OtherActor) { NativeCall(this, "AActor.ReceiveActorEndOverlap", OtherActor); } + void ReceiveActorOnClicked() { NativeCall(this, "AActor.ReceiveActorOnClicked"); } + void ReceiveActorOnInputTouchBegin(ETouchIndex::Type FingerIndex) { NativeCall(this, "AActor.ReceiveActorOnInputTouchBegin", FingerIndex); } + void ReceiveActorOnInputTouchEnd(ETouchIndex::Type FingerIndex) { NativeCall(this, "AActor.ReceiveActorOnInputTouchEnd", FingerIndex); } + void ReceiveActorOnInputTouchEnter(ETouchIndex::Type FingerIndex) { NativeCall(this, "AActor.ReceiveActorOnInputTouchEnter", FingerIndex); } + void ReceiveActorOnInputTouchLeave(ETouchIndex::Type FingerIndex) { NativeCall(this, "AActor.ReceiveActorOnInputTouchLeave", FingerIndex); } + void ReceiveActorOnReleased() { NativeCall(this, "AActor.ReceiveActorOnReleased"); } + void ReceiveAnyDamage(float Damage, UDamageType * DamageType, AController * InstigatedBy, AActor * DamageCauser) { NativeCall(this, "AActor.ReceiveAnyDamage", Damage, DamageType, InstigatedBy, DamageCauser); } + void ReceiveBeginPlay() { NativeCall(this, "AActor.ReceiveBeginPlay"); } + void ReceiveDestroyed() { NativeCall(this, "AActor.ReceiveDestroyed"); } + void ReceiveEndPlay(EEndPlayReason::Type EndPlayReason) { NativeCall(this, "AActor.ReceiveEndPlay", EndPlayReason); } + void ReceiveHit(UPrimitiveComponent * MyComp, AActor * Other, UPrimitiveComponent * OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, FHitResult * Hit) { NativeCall(this, "AActor.ReceiveHit", MyComp, Other, OtherComp, bSelfMoved, HitLocation, HitNormal, NormalImpulse, Hit); } + void ReceiveInput(FString * InputName, float Value, FVector VectorValue, bool bStarted, bool bEnded) { NativeCall(this, "AActor.ReceiveInput", InputName, Value, VectorValue, bStarted, bEnded); } + void ReceivePointDamage(float Damage, UDamageType * DamageType, FVector HitLocation, FVector HitNormal, UPrimitiveComponent * HitComponent, FName BoneName, FVector ShotFromDirection, AController * InstigatedBy, AActor * DamageCauser) { NativeCall(this, "AActor.ReceivePointDamage", Damage, DamageType, HitLocation, HitNormal, HitComponent, BoneName, ShotFromDirection, InstigatedBy, DamageCauser); } + void ReceiveRadialDamage(float DamageReceived, UDamageType * DamageType, FVector Origin, FHitResult * HitInfo, AController * InstigatedBy, AActor * DamageCauser) { NativeCall(this, "AActor.ReceiveRadialDamage", DamageReceived, DamageType, Origin, HitInfo, InstigatedBy, DamageCauser); } + void ReceiveTick(float DeltaSeconds) { NativeCall(this, "AActor.ReceiveTick", DeltaSeconds); } + void RecieveMatineeUpdated() { NativeCall(this, "AActor.RecieveMatineeUpdated"); } + void UserConstructionScript() { NativeCall(this, "AActor.UserConstructionScript"); } +}; + +struct APawn : AActor +{ + FieldValue BaseEyeHeightField() { return { this, "APawn.BaseEyeHeight" }; } + FieldValue> AIControllerClassField() { return { this, "APawn.AIControllerClass" }; } + FieldValue PlayerStateField() { return { this, "APawn.PlayerState" }; } + FieldValue RemoteViewPitchField() { return { this, "APawn.RemoteViewPitch" }; } + FieldValue LastHitByField() { return { this, "APawn.LastHitBy" }; } + FieldValue ControllerField() { return { this, "APawn.Controller" }; } + FieldValue AllowedYawErrorField() { return { this, "APawn.AllowedYawError" }; } + FieldValue bClearOnConsumeField() { return { this, "APawn.bClearOnConsume" }; } + FieldValue ControlInputVectorField() { return { this, "APawn.ControlInputVector" }; } + FieldValue LastControlInputVectorField() { return { this, "APawn.LastControlInputVector" }; } + FieldValue> SpawnedForControllerField() { return { this, "APawn.SpawnedForController" }; } + + // Functions + + FVector * GetNavAgentLocation(FVector * result) { return NativeCall(this, "APawn.GetNavAgentLocation", result); } + void PreInitializeComponents() { NativeCall(this, "APawn.PreInitializeComponents"); } + void PostInitializeComponents() { NativeCall(this, "APawn.PostInitializeComponents"); } + void PostLoad() { NativeCall(this, "APawn.PostLoad"); } + void PostRegisterAllComponents() { NativeCall(this, "APawn.PostRegisterAllComponents"); } + void UpdateNavAgent() { NativeCall(this, "APawn.UpdateNavAgent"); } + bool CanBeBaseForCharacter(APawn * APawn2) { return NativeCall(this, "APawn.CanBeBaseForCharacter", APawn2); } + FVector * GetVelocity(FVector * result, bool bIsForRagdoll) { return NativeCall(this, "APawn.GetVelocity", result, bIsForRagdoll); } + bool IsLocallyControlled() { return NativeCall(this, "APawn.IsLocallyControlled"); } + bool ReachedDesiredRotation() { return NativeCall(this, "APawn.ReachedDesiredRotation"); } + float GetDefaultHalfHeight() { return NativeCall(this, "APawn.GetDefaultHalfHeight"); } + bool ShouldTickIfViewportsOnly() { return NativeCall(this, "APawn.ShouldTickIfViewportsOnly"); } + FVector * GetPawnViewLocation(FVector * result, bool bAllTransforms) { return NativeCall(this, "APawn.GetPawnViewLocation", result, bAllTransforms); } + FRotator * GetViewRotation(FRotator * result) { return NativeCall(this, "APawn.GetViewRotation", result); } + void SpawnDefaultController() { NativeCall(this, "APawn.SpawnDefaultController"); } + void TurnOff() { NativeCall(this, "APawn.TurnOff"); } + void BecomeViewTarget(APlayerController * PC) { NativeCall(this, "APawn.BecomeViewTarget", PC); } + void PawnClientRestart() { NativeCall(this, "APawn.PawnClientRestart"); } + void Destroyed() { NativeCall(this, "APawn.Destroyed"); } + bool ShouldTakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APawn.ShouldTakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + float TakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APawn.TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + FRotator * GetControlRotation(FRotator * result) { return NativeCall(this, "APawn.GetControlRotation", result); } + void OnRep_Controller() { NativeCall(this, "APawn.OnRep_Controller"); } + void PossessedBy(AController * NewController) { NativeCall(this, "APawn.PossessedBy", NewController); } + void UnPossessed() { NativeCall(this, "APawn.UnPossessed"); } + UNetConnection * GetNetConnection() { return NativeCall(this, "APawn.GetNetConnection"); } + UPlayer * GetNetOwningPlayer() { return NativeCall(this, "APawn.GetNetOwningPlayer"); } + void DestroyPlayerInputComponent() { NativeCall(this, "APawn.DestroyPlayerInputComponent"); } + bool IsMoveInputIgnored() { return NativeCall(this, "APawn.IsMoveInputIgnored"); } + void AddMovementInput(FVector WorldDirection, float ScaleValue, bool bForce) { NativeCall(this, "APawn.AddMovementInput", WorldDirection, ScaleValue, bForce); } + FVector * ConsumeMovementInputVector(FVector * result) { return NativeCall(this, "APawn.ConsumeMovementInputVector", result); } + void Internal_AddMovementInput(FVector WorldAccel, bool bForce) { NativeCall(this, "APawn.Internal_AddMovementInput", WorldAccel, bForce); } + void PostInputProcessed() { NativeCall(this, "APawn.PostInputProcessed"); } + FVector * Internal_ConsumeMovementInputVector(FVector * result) { return NativeCall(this, "APawn.Internal_ConsumeMovementInputVector", result); } + void AddControllerPitchInput(float Val) { NativeCall(this, "APawn.AddControllerPitchInput", Val); } + void AddControllerYawInput(float Val) { NativeCall(this, "APawn.AddControllerYawInput", Val); } + void AddControllerRollInput(float Val) { NativeCall(this, "APawn.AddControllerRollInput", Val); } + void Restart() { NativeCall(this, "APawn.Restart"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APawn.Tick", DeltaSeconds); } + void RecalculateBaseEyeHeight() { NativeCall(this, "APawn.RecalculateBaseEyeHeight"); } + void Reset() { NativeCall(this, "APawn.Reset"); } + FString * GetHumanReadableName(FString * result) { return NativeCall(this, "APawn.GetHumanReadableName", result); } + void GetActorEyesViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "APawn.GetActorEyesViewPoint", out_Location, out_Rotation); } + FRotator * GetBaseAimRotation(FRotator * result) { return NativeCall(this, "APawn.GetBaseAimRotation", result); } + bool InFreeCam() { return NativeCall(this, "APawn.InFreeCam"); } + void OutsideWorldBounds() { NativeCall(this, "APawn.OutsideWorldBounds"); } + void ClientSetRotation(FRotator NewRotation) { NativeCall(this, "APawn.ClientSetRotation", NewRotation); } + void FaceRotation(FRotator NewControlRotation, float DeltaTime, bool bFromController) { NativeCall(this, "APawn.FaceRotation", NewControlRotation, DeltaTime, bFromController); } + void DetachFromControllerPendingDestroy() { NativeCall(this, "APawn.DetachFromControllerPendingDestroy"); } + AController * GetDamageInstigator(AController * InstigatedBy, UDamageType * DamageType) { return NativeCall(this, "APawn.GetDamageInstigator", InstigatedBy, DamageType); } + void EnableInput(APlayerController * PlayerController) { NativeCall(this, "APawn.EnableInput", PlayerController); } + void DisableInput(APlayerController * PlayerController) { NativeCall(this, "APawn.DisableInput", PlayerController); } + bool IsWalking() { return NativeCall(this, "APawn.IsWalking"); } + bool IsFalling() { return NativeCall(this, "APawn.IsFalling"); } + bool IsCrouched() { return NativeCall(this, "APawn.IsCrouched"); } + void PostNetReceiveVelocity(FVector * NewVelocity) { NativeCall(this, "APawn.PostNetReceiveVelocity", NewVelocity); } + void PostNetReceiveLocationAndRotation() { NativeCall(this, "APawn.PostNetReceiveLocationAndRotation"); } + bool IsBasedOnActor(AActor * Other) { return NativeCall(this, "APawn.IsBasedOnActor", Other); } + bool IsNetRelevantFor(APlayerController * RealViewer, AActor * Viewer, FVector * SrcLocation) { return NativeCall(this, "APawn.IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APawn.GetLifetimeReplicatedProps", OutLifetimeProps); } + void PawnMakeNoise(float Loudness, FVector NoiseLocation, bool bUseNoiseMakerLocation, AActor * NoiseMaker) { NativeCall(this, "APawn.PawnMakeNoise", Loudness, NoiseLocation, bUseNoiseMakerLocation, NoiseMaker); } + APlayerController * GetOwnerController() { return NativeCall(this, "APawn.GetOwnerController"); } + AController * GetCharacterController() { return NativeCall(this, "APawn.GetCharacterController"); } + bool IsLocallyControlledByPlayer() { return NativeCall(this, "APawn.IsLocallyControlledByPlayer"); } + static void StaticRegisterNativesAPawn() { NativeCall(nullptr, "APawn.StaticRegisterNativesAPawn"); } +}; + +struct UCheatManager +{ + FieldValue DebugTraceDistanceField() { return { this, "UCheatManager.DebugTraceDistance" }; } + FieldValue DebugCapsuleHalfHeightField() { return { this, "UCheatManager.DebugCapsuleHalfHeight" }; } + FieldValue DebugCapsuleRadiusField() { return { this, "UCheatManager.DebugCapsuleRadius" }; } + FieldValue DebugTraceDrawNormalLengthField() { return { this, "UCheatManager.DebugTraceDrawNormalLength" }; } + FieldValue> DebugTraceChannelField() { return { this, "UCheatManager.DebugTraceChannel" }; } + FieldValue CurrentTraceIndexField() { return { this, "UCheatManager.CurrentTraceIndex" }; } + FieldValue CurrentTracePawnIndexField() { return { this, "UCheatManager.CurrentTracePawnIndex" }; } + FieldValue DumpAILogsIntervalField() { return { this, "UCheatManager.DumpAILogsInterval" }; } + + // Functions + + void FreezeFrame(float delay) { NativeCall(this, "UCheatManager.FreezeFrame", delay); } + void Teleport() { NativeCall(this, "UCheatManager.Teleport"); } + void ChangeSize(float F) { NativeCall(this, "UCheatManager.ChangeSize", F); } + void Fly() { NativeCall(this, "UCheatManager.Fly"); } + void Walk() { NativeCall(this, "UCheatManager.Walk"); } + void Ghost() { NativeCall(this, "UCheatManager.Ghost"); } + void God() { NativeCall(this, "UCheatManager.God"); } + void Slomo(float T) { NativeCall(this, "UCheatManager.Slomo", T); } + void DamageTarget(float DamageAmount) { NativeCall(this, "UCheatManager.DamageTarget", DamageAmount); } + void DestroyTarget() { NativeCall(this, "UCheatManager.DestroyTarget"); } + void DestroyAll(TSubclassOf aClass) { NativeCall>(this, "UCheatManager.DestroyAll", aClass); } + void DestroyPawns(TSubclassOf aClass) { NativeCall>(this, "UCheatManager.DestroyPawns", aClass); } + void Summon(FString * ClassName) { NativeCall(this, "UCheatManager.Summon", ClassName); } + void PlayersOnly() { NativeCall(this, "UCheatManager.PlayersOnly"); } + void ViewSelf() { NativeCall(this, "UCheatManager.ViewSelf"); } + void ViewPlayer(FString * S) { NativeCall(this, "UCheatManager.ViewPlayer", S); } + void ViewActor(FName ActorName) { NativeCall(this, "UCheatManager.ViewActor", ActorName); } + void ViewClass(TSubclassOf DesiredClass) { NativeCall>(this, "UCheatManager.ViewClass", DesiredClass); } + void SetLevelStreamingStatus(FName PackageName, bool bShouldBeLoaded, bool bShouldBeVisible) { NativeCall(this, "UCheatManager.SetLevelStreamingStatus", PackageName, bShouldBeLoaded, bShouldBeVisible); } + void StreamLevelIn(FName PackageName) { NativeCall(this, "UCheatManager.StreamLevelIn", PackageName); } + void OnlyLoadLevel(FName PackageName) { NativeCall(this, "UCheatManager.OnlyLoadLevel", PackageName); } + void StreamLevelOut(FName PackageName) { NativeCall(this, "UCheatManager.StreamLevelOut", PackageName); } + void ToggleDebugCamera() { NativeCall(this, "UCheatManager.ToggleDebugCamera"); } + void EnableDebugCamera() { NativeCall(this, "UCheatManager.EnableDebugCamera"); } + void DisableDebugCamera() { NativeCall(this, "UCheatManager.DisableDebugCamera"); } + void DebugCapsuleSweep() { NativeCall(this, "UCheatManager.DebugCapsuleSweep"); } + void DebugCapsuleSweepSize(float HalfHeight, float Radius) { NativeCall(this, "UCheatManager.DebugCapsuleSweepSize", HalfHeight, Radius); } + void DebugCapsuleSweepChannel(ECollisionChannel Channel) { NativeCall(this, "UCheatManager.DebugCapsuleSweepChannel", Channel); } + void DebugCapsuleSweepComplex(bool bTraceComplex) { NativeCall(this, "UCheatManager.DebugCapsuleSweepComplex", bTraceComplex); } + void DebugCapsuleSweepCapture() { NativeCall(this, "UCheatManager.DebugCapsuleSweepCapture"); } + void DebugCapsuleSweepPawn() { NativeCall(this, "UCheatManager.DebugCapsuleSweepPawn"); } + void DebugCapsuleSweepClear() { NativeCall(this, "UCheatManager.DebugCapsuleSweepClear"); } + void TestCollisionDistance() { NativeCall(this, "UCheatManager.TestCollisionDistance"); } + void WidgetReflector() { NativeCall(this, "UCheatManager.WidgetReflector"); } + void RebuildNavigation() { NativeCall(this, "UCheatManager.RebuildNavigation"); } + void DumpOnlineSessionState() { NativeCall(this, "UCheatManager.DumpOnlineSessionState"); } + void DumpVoiceMutingState() { NativeCall(this, "UCheatManager.DumpVoiceMutingState"); } + UWorld * GetWorld() { return NativeCall(this, "UCheatManager.GetWorld"); } + void BugItGo(float X, float Y, float Z, float Pitch, float Yaw, float Roll) { NativeCall(this, "UCheatManager.BugItGo", X, Y, Z, Pitch, Yaw, Roll); } + void BugItGoString(FString * TheLocation, FString * TheRotation) { NativeCall(this, "UCheatManager.BugItGoString", TheLocation, TheRotation); } + void BugItWorker(FVector TheLocation, FRotator TheRotation) { NativeCall(this, "UCheatManager.BugItWorker", TheLocation, TheRotation); } + void BugIt(FString * ScreenShotDescription) { NativeCall(this, "UCheatManager.BugIt", ScreenShotDescription); } + void BugItStringCreator(FVector ViewLocation, FRotator ViewRotation, FString * GoString, FString * LocString) { NativeCall(this, "UCheatManager.BugItStringCreator", ViewLocation, ViewRotation, GoString, LocString); } + void FlushLog() { NativeCall(this, "UCheatManager.FlushLog"); } + void LogLoc() { NativeCall(this, "UCheatManager.LogLoc"); } + void SetWorldOrigin() { NativeCall(this, "UCheatManager.SetWorldOrigin"); } + void ServerToggleAILogging() { NativeCall(this, "UCheatManager.ServerToggleAILogging"); } +}; + +struct UShooterCheatManager : UCheatManager +{ + FieldValue bIsRCONCheatManagerField() { return { this, "UShooterCheatManager.bIsRCONCheatManager" }; } + FieldValue MyPCField() { return { this, "UShooterCheatManager.MyPC" }; } + + // Functions + + void TakeAllStructure() { NativeCall(this, "UShooterCheatManager.TakeAllStructure"); } + void TakeAllDino() { NativeCall(this, "UShooterCheatManager.TakeAllDino"); } + void GMBuff() { NativeCall(this, "UShooterCheatManager.GMBuff"); } + void GMSummon(FString * ClassName, int Level) { NativeCall(this, "UShooterCheatManager.GMSummon", ClassName, Level); } + void AllowPlayerToJoinNoCheck(FString * SteamId) { NativeCall(this, "UShooterCheatManager.AllowPlayerToJoinNoCheck", SteamId); } + void RenameTribe(FString * TribeName, FString * NewName) { NativeCall(this, "UShooterCheatManager.RenameTribe", TribeName, NewName); } + void RenamePlayer(FString * PlayerName, FString * NewName) { NativeCall(this, "UShooterCheatManager.RenamePlayer", PlayerName, NewName); } + void DestroyActors(FString * ClassName) { NativeCall(this, "UShooterCheatManager.DestroyActors", ClassName); } + void StartSaveBackup() { NativeCall(this, "UShooterCheatManager.StartSaveBackup"); } + void DoExit() { NativeCall(this, "UShooterCheatManager.DoExit"); } + void OpenMap(FString * MapName) { NativeCall(this, "UShooterCheatManager.OpenMap", MapName); } + void DoRestartLevel() { NativeCall(this, "UShooterCheatManager.DoRestartLevel"); } + void SetGlobalPause(bool bIsPaused) { NativeCall(this, "UShooterCheatManager.SetGlobalPause", bIsPaused); } + void DisallowPlayerToJoinNoCheck(FString * SteamId) { NativeCall(this, "UShooterCheatManager.DisallowPlayerToJoinNoCheck", SteamId); } + void GiveExpToPlayer(__int64 PlayerID, float HowMuch, bool fromTribeShare, bool bPreventSharingWithTribe) { NativeCall(this, "UShooterCheatManager.GiveExpToPlayer", PlayerID, HowMuch, fromTribeShare, bPreventSharingWithTribe); } + void DestroyMyTarget() { NativeCall(this, "UShooterCheatManager.DestroyMyTarget"); } + void SetMyTargetSleeping(bool bIsSleeping) { NativeCall(this, "UShooterCheatManager.SetMyTargetSleeping", bIsSleeping); } + void SetTargetDinoColor(int ColorRegion, int ColorID) { NativeCall(this, "UShooterCheatManager.SetTargetDinoColor", ColorRegion, ColorID); } + void Kill() { NativeCall(this, "UShooterCheatManager.Kill"); } + void KillPlayer(__int64 PlayerID) { NativeCall(this, "UShooterCheatManager.KillPlayer", PlayerID); } + void TeleportPlayerIDToMe(__int64 PlayerID) { NativeCall(this, "UShooterCheatManager.TeleportPlayerIDToMe", PlayerID); } + void TeleportPlayerNameToMe(FString * PlayerName) { NativeCall(this, "UShooterCheatManager.TeleportPlayerNameToMe", PlayerName); } + void TeleportToPlayer(__int64 PlayerID) { NativeCall(this, "UShooterCheatManager.TeleportToPlayer", PlayerID); } + void DestroyTribePlayers() { NativeCall(this, "UShooterCheatManager.DestroyTribePlayers"); } + void DestroyTribeDinos() { NativeCall(this, "UShooterCheatManager.DestroyTribeDinos"); } + void DestroyAllTames() { NativeCall(this, "UShooterCheatManager.DestroyAllTames"); } + void DestroyTribeStructures() { NativeCall(this, "UShooterCheatManager.DestroyTribeStructures"); } + void ForcePlayerToJoinTargetTribe(__int64 PlayerID) { NativeCall(this, "UShooterCheatManager.ForcePlayerToJoinTargetTribe", PlayerID); } + void ForcePlayerToJoinTribe(__int64 PlayerID, FString TribeName) { NativeCall(this, "UShooterCheatManager.ForcePlayerToJoinTribe", PlayerID, TribeName); } + void SpawnActorTamed(FString * blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset) { NativeCall(this, "UShooterCheatManager.SpawnActorTamed", blueprintPath, spawnDistance, spawnYOffset, ZOffset); } + AActor * DoSummon(FString * ClassName) { return NativeCall(this, "UShooterCheatManager.DoSummon", ClassName); } + void Summon(FString * ClassName) { NativeCall(this, "UShooterCheatManager.Summon", ClassName); } + void SummonTamed(FString * ClassName) { NativeCall(this, "UShooterCheatManager.SummonTamed", ClassName); } + void SDF(FName * DinoBlueprintPath, bool bIsTamed) { NativeCall(this, "UShooterCheatManager.SDF", DinoBlueprintPath, bIsTamed); } + void EnableCheats(FString pass) { NativeCall(this, "UShooterCheatManager.EnableCheats", pass); } + void BanPlayer(FString PlayerSteamName) { NativeCall(this, "UShooterCheatManager.BanPlayer", PlayerSteamName); } + void UnbanPlayer(FString PlayerSteamName) { NativeCall(this, "UShooterCheatManager.UnbanPlayer", PlayerSteamName); } + void KickPlayer(FString PlayerSteamName) { NativeCall(this, "UShooterCheatManager.KickPlayer", PlayerSteamName); } + void Suicide() { NativeCall(this, "UShooterCheatManager.Suicide"); } + void ForceTame() { NativeCall(this, "UShooterCheatManager.ForceTame"); } + void SetImprintQuality(float ImprintQuality) { NativeCall(this, "UShooterCheatManager.SetImprintQuality", ImprintQuality); } + void DoTame() { NativeCall(this, "UShooterCheatManager.DoTame"); } + void GiveToMe() { NativeCall(this, "UShooterCheatManager.GiveToMe"); } + void GiveAllStructure() { NativeCall(this, "UShooterCheatManager.GiveAllStructure"); } + void SetTargetPlayerBodyVal(int BodyValIndex, float BodyVal) { NativeCall(this, "UShooterCheatManager.SetTargetPlayerBodyVal", BodyValIndex, BodyVal); } + void SetTargetPlayerColorVal(int ColorValIndex, float ColorVal) { NativeCall(this, "UShooterCheatManager.SetTargetPlayerColorVal", ColorValIndex, ColorVal); } + void SetBabyAge(float AgeValue) { NativeCall(this, "UShooterCheatManager.SetBabyAge", AgeValue); } + void ListPlayers() { NativeCall(this, "UShooterCheatManager.ListPlayers"); } + void EnemyInVisible(bool Invisible) { NativeCall(this, "UShooterCheatManager.EnemyInVisible", Invisible); } + void AddItemToAllClustersInventory(FString UserId, int MasterIndexNum) { NativeCall(this, "UShooterCheatManager.AddItemToAllClustersInventory", UserId, MasterIndexNum); } + void GiveItemToPlayer(int playerID, FString * blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { NativeCall(this, "UShooterCheatManager.GiveItemToPlayer", playerID, blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); } + void GiveItemNumToPlayer(int playerID, int masterIndexNum, int quantityOverride, float qualityOverride, bool bForceBlueprint) { NativeCall(this, "UShooterCheatManager.GiveItemNumToPlayer", playerID, masterIndexNum, quantityOverride, qualityOverride, bForceBlueprint); } + void ClearPlayerInventory(int playerID, bool bClearInventory, bool bClearSlotItems, bool bClearEquippedItems) { NativeCall(this, "UShooterCheatManager.ClearPlayerInventory", playerID, bClearInventory, bClearSlotItems, bClearEquippedItems); } + void DestroyAllEnemies() { NativeCall(this, "UShooterCheatManager.DestroyAllEnemies"); } + void DestroyWildDinos() { NativeCall(this, "UShooterCheatManager.DestroyWildDinos"); } + void DestroyStructures() { NativeCall(this, "UShooterCheatManager.DestroyStructures"); } + void PrintActorLocation(FString * ActorName) { NativeCall(this, "UShooterCheatManager.PrintActorLocation", ActorName); } + void TeleportToActorLocation(FString * ActorName) { NativeCall(this, "UShooterCheatManager.TeleportToActorLocation", ActorName); } + void TP(FString LocationName) { NativeCall(this, "UShooterCheatManager.TP", LocationName); } + void ServerChat(FString * MessageText) { NativeCall(this, "UShooterCheatManager.ServerChat", MessageText); } + AShooterPlayerController * FindPlayerControllerFromPlayerID(__int64 PlayerID) { return NativeCall(this, "UShooterCheatManager.FindPlayerControllerFromPlayerID", PlayerID); } + void GameCommand(FString * TheCommand) { NativeCall(this, "UShooterCheatManager.GameCommand", TheCommand); } + void ScriptCommand(FString * commandString) { NativeCall(this, "UShooterCheatManager.ScriptCommand", commandString); } + void RemoveTribeAdmin() { NativeCall(this, "UShooterCheatManager.RemoveTribeAdmin"); } + void MakeTribeFounder() { NativeCall(this, "UShooterCheatManager.MakeTribeFounder"); } + void VisualizeClass(FString * ClassIn, int MaxTotal) { NativeCall(this, "UShooterCheatManager.VisualizeClass", ClassIn, MaxTotal); } + void UnlockEngram(FString * ItemClassName) { NativeCall(this, "UShooterCheatManager.UnlockEngram", ItemClassName); } + void SetHeadHairPercent(float thePercent) { NativeCall(this, "UShooterCheatManager.SetHeadHairPercent", thePercent); } + void SetFacialHairPercent(float thePercent) { NativeCall(this, "UShooterCheatManager.SetFacialHairPercent", thePercent); } + void SetHeadHairstyle(int hairStyleIndex) { NativeCall(this, "UShooterCheatManager.SetHeadHairstyle", hairStyleIndex); } + void SetFacialHairstyle(int hairStyleIndex) { NativeCall(this, "UShooterCheatManager.SetFacialHairstyle", hairStyleIndex); } + void PrintMessageOut(FString * Msg) { NativeCall(this, "UShooterCheatManager.PrintMessageOut", Msg); } + void GetTribeIdPlayerList(int TribeID) { NativeCall(this, "UShooterCheatManager.GetTribeIdPlayerList", TribeID); } + void GetSteamIDForPlayerID(int PlayerID) { NativeCall(this, "UShooterCheatManager.GetSteamIDForPlayerID", PlayerID); } + void GetPlayerIDForSteamID(int SteamID) { NativeCall(this, "UShooterCheatManager.GetPlayerIDForSteamID", SteamID); } + void psc(FString * command) { NativeCall(this, "UShooterCheatManager.psc", command); } + UField * GetPrivateStaticClass() { return NativeCall(this, "UShooterCheatManager.GetPrivateStaticClass"); } +}; + +struct UPlayer +{ + FieldValue PlayerControllerField() { return { this, "UPlayer.PlayerController" }; } + FieldValue CurrentNetSpeedField() { return { this, "UPlayer.CurrentNetSpeed" }; } + FieldValue ConfiguredInternetSpeedField() { return { this, "UPlayer.ConfiguredInternetSpeed" }; } + FieldValue ConfiguredLanSpeedField() { return { this, "UPlayer.ConfiguredLanSpeed" }; } + FieldValue TransferringPlayerDataIdField() { return { this, "UPlayer.TransferringPlayerDataId" }; } + + // Functions + + void SwitchController(APlayerController * PC) { NativeCall(this, "UPlayer.SwitchController", PC); } +}; + +struct APlayerState : AActor +{ + FieldValue ScoreField() { return { this, "APlayerState.Score" }; } + FieldValue PingField() { return { this, "APlayerState.Ping" }; } + FieldValue PlayerNameField() { return { this, "APlayerState.PlayerName" }; } + FieldValue OldNameField() { return { this, "APlayerState.OldName" }; } + FieldValue PlayerIdField() { return { this, "APlayerState.PlayerId" }; } + FieldValue StartTimeField() { return { this, "APlayerState.StartTime" }; } + FieldValue ExactPingField() { return { this, "APlayerState.ExactPing" }; } + FieldValue SavedNetworkAddressField() { return { this, "APlayerState.SavedNetworkAddress" }; } + FieldValue UniqueIdField() { return { this, "APlayerState.UniqueId" }; } + FieldValue SessionNameField() { return { this, "APlayerState.SessionName" }; } + FieldValue CurPingBucketField() { return { this, "APlayerState.CurPingBucket" }; } + FieldValue CurPingBucketTimestampField() { return { this, "APlayerState.CurPingBucketTimestamp" }; } + + // Functions + + void UpdatePing(float InPing) { NativeCall(this, "APlayerState.UpdatePing", InPing); } + void RecalculateAvgPing() { NativeCall(this, "APlayerState.RecalculateAvgPing"); } + void OverrideWith(APlayerState * PlayerState) { NativeCall(this, "APlayerState.OverrideWith", PlayerState); } + void CopyProperties(APlayerState * PlayerState) { NativeCall(this, "APlayerState.CopyProperties", PlayerState); } + void PostInitializeComponents() { NativeCall(this, "APlayerState.PostInitializeComponents"); } + void ClientInitialize(AController * C) { NativeCall(this, "APlayerState.ClientInitialize", C); } + void OnRep_PlayerName() { NativeCall(this, "APlayerState.OnRep_PlayerName"); } + void OnRep_bIsInactive() { NativeCall(this, "APlayerState.OnRep_bIsInactive"); } + bool ShouldBroadCastWelcomeMessage(bool bExiting) { return NativeCall(this, "APlayerState.ShouldBroadCastWelcomeMessage", bExiting); } + void Destroyed() { NativeCall(this, "APlayerState.Destroyed"); } + FString * GetHumanReadableName(FString * result) { return NativeCall(this, "APlayerState.GetHumanReadableName", result); } + void SetPlayerName(FString * S) { NativeCall(this, "APlayerState.SetPlayerName", S); } + void OnRep_UniqueId() { NativeCall(this, "APlayerState.OnRep_UniqueId"); } + void SetUniqueId(TSharedPtr * InUniqueId) { NativeCall *>(this, "APlayerState.SetUniqueId", InUniqueId); } + void RegisterPlayerWithSession(bool bWasFromInvite) { NativeCall(this, "APlayerState.RegisterPlayerWithSession", bWasFromInvite); } + void UnregisterPlayerWithSession() { NativeCall(this, "APlayerState.UnregisterPlayerWithSession"); } + APlayerState * Duplicate() { return NativeCall(this, "APlayerState.Duplicate"); } + void SeamlessTravelTo(APlayerState * NewPlayerState) { NativeCall(this, "APlayerState.SeamlessTravelTo", NewPlayerState); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APlayerState.GetLifetimeReplicatedProps", OutLifetimeProps); } + static void StaticRegisterNativesAPlayerState() { NativeCall(nullptr, "APlayerState.StaticRegisterNativesAPlayerState"); } +}; + +struct AShooterPlayerState : APlayerState +{ + FieldValue MyPlayerDataField() { return { this, "AShooterPlayerState.MyPlayerData" }; } + FieldPointer MyPlayerDataStructField() { return { this, "AShooterPlayerState.MyPlayerDataStruct" }; } + FieldArray, 10> DefaultItemSlotClassesField() { return { this, "AShooterPlayerState.DefaultItemSlotClasses" }; } + FieldArray DefaultItemSlotEngramsField() { return { this, "AShooterPlayerState.DefaultItemSlotEngrams" }; } + FieldValue MyTribeDataField() { return { this, "AShooterPlayerState.MyTribeData" }; } + FieldValue LastTribeInviteDataField() { return { this, "AShooterPlayerState.LastTribeInviteData" }; } + FieldValue TotalEngramPointsField() { return { this, "AShooterPlayerState.TotalEngramPoints" }; } + FieldValue FreeEngramPointsField() { return { this, "AShooterPlayerState.FreeEngramPoints" }; } + FieldValue>> EngramItemBlueprintsField() { return { this, "AShooterPlayerState.EngramItemBlueprints" }; } + FieldValue, DefaultKeyFuncs, 0>, FDefaultSetAllocator>> ServerEngramItemBlueprintsSetField() { return { this, "AShooterPlayerState.ServerEngramItemBlueprintsSet" }; } + FieldValue NextAllowedRespawnTimeField() { return { this, "AShooterPlayerState.NextAllowedRespawnTime" }; } + FieldValue AllowedRespawnIntervalField() { return { this, "AShooterPlayerState.AllowedRespawnInterval" }; } + FieldValue LastTimeDiedToEnemyTeamField() { return { this, "AShooterPlayerState.LastTimeDiedToEnemyTeam" }; } + FieldValue CurrentlySelectedDinoOrderGroupField() { return { this, "AShooterPlayerState.CurrentlySelectedDinoOrderGroup" }; } + FieldArray DinoOrderGroupsField() { return { this, "AShooterPlayerState.DinoOrderGroups" }; } + FieldValue LastTribeRequestTimeField() { return { this, "AShooterPlayerState.LastTribeRequestTime" }; } + + // Functions + + void Reset() { NativeCall(this, "AShooterPlayerState.Reset"); } + void UnregisterPlayerWithSession() { NativeCall(this, "AShooterPlayerState.UnregisterPlayerWithSession"); } + void ClientInitialize(AController * InController) { NativeCall(this, "AShooterPlayerState.ClientInitialize", InController); } + void CopyProperties(APlayerState * PlayerState) { NativeCall(this, "AShooterPlayerState.CopyProperties", PlayerState); } + void ServerGetAllPlayerNamesAndLocations_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetAllPlayerNamesAndLocations_Implementation"); } + void ServerGetAlivePlayerConnectedData_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetAlivePlayerConnectedData_Implementation"); } + void ServerGetPlayerConnectedData_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetPlayerConnectedData_Implementation"); } + void ServerGetServerOptions_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetServerOptions_Implementation"); } + void ServerGetPlayerBannedData_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetPlayerBannedData_Implementation"); } + void ServerGetPlayerWhiteListedData_Implementation() { NativeCall(this, "AShooterPlayerState.ServerGetPlayerWhiteListedData_Implementation"); } + void ClientGetServerOptions_Implementation(FServerOptions info) { NativeCall(this, "AShooterPlayerState.ClientGetServerOptions_Implementation", info); } + void BroadcastDeath_Implementation(AShooterPlayerState * KillerPlayerState, UDamageType * KillerDamageType, AShooterPlayerState * KilledPlayerState) { NativeCall(this, "AShooterPlayerState.BroadcastDeath_Implementation", KillerPlayerState, KillerDamageType, KilledPlayerState); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AShooterPlayerState.GetLifetimeReplicatedProps", OutLifetimeProps); } + void Destroyed() { NativeCall(this, "AShooterPlayerState.Destroyed"); } + void BeginPlay() { NativeCall(this, "AShooterPlayerState.BeginPlay"); } + void PromoteToTribeAdmin() { NativeCall(this, "AShooterPlayerState.PromoteToTribeAdmin"); } + bool AddToTribe(FTribeData * MyNewTribe, bool bMergeTribe, bool bForce, bool bIsFromInvite) { return NativeCall(this, "AShooterPlayerState.AddToTribe", MyNewTribe, bMergeTribe, bForce, bIsFromInvite); } + void ClearTribe(bool bDontRemoveFromTribe, bool bForce) { NativeCall(this, "AShooterPlayerState.ClearTribe", bDontRemoveFromTribe, bForce); } + void TransferTribalObjects(FTribeData * TribeData, bool bTransferToTribe, bool bDontIncludePlayers) { NativeCall(this, "AShooterPlayerState.TransferTribalObjects", TribeData, bTransferToTribe, bDontIncludePlayers); } + bool IsTribeOwner(unsigned int CheckPlayerDataID) { return NativeCall(this, "AShooterPlayerState.IsTribeOwner", CheckPlayerDataID); } + bool IsTribeAdmin() { return NativeCall(this, "AShooterPlayerState.IsTribeAdmin"); } + void ServerRequestDinoOrderGroups_Implementation() { NativeCall(this, "AShooterPlayerState.ServerRequestDinoOrderGroups_Implementation"); } + void ClientRefreshDinoOrderGroup_Implementation(int groupIndex, FDinoOrderGroup groupData, int UseCurrentlySelectedGroup) { NativeCall(this, "AShooterPlayerState.ClientRefreshDinoOrderGroup_Implementation", groupIndex, groupData, UseCurrentlySelectedGroup); } + bool AllowDinoOrderByGroup(APrimalDinoCharacter * orderDino) { return NativeCall(this, "AShooterPlayerState.AllowDinoOrderByGroup", orderDino); } + void ServerDinoOrderGroup_AddOrRemoveDinoClass_Implementation(int groupIndex, TSubclassOf DinoClass, bool bAdd) { NativeCall, bool>(this, "AShooterPlayerState.ServerDinoOrderGroup_AddOrRemoveDinoClass_Implementation", groupIndex, DinoClass, bAdd); } + void ServerSetDinoGroupName_Implementation(int groupIndex, FString * GroupName) { NativeCall(this, "AShooterPlayerState.ServerSetDinoGroupName_Implementation", groupIndex, GroupName); } + FString * GetDinoOrderGroupName(FString * result, int groupIndex) { return NativeCall(this, "AShooterPlayerState.GetDinoOrderGroupName", result, groupIndex); } + bool IsDinoInOrderGroup(int groupIndex, APrimalDinoCharacter * dinoChar) { return NativeCall(this, "AShooterPlayerState.IsDinoInOrderGroup", groupIndex, dinoChar); } + bool IsDinoClassInOrderGroup(int groupIndex, TSubclassOf dinoClass) { return NativeCall>(this, "AShooterPlayerState.IsDinoClassInOrderGroup", groupIndex, dinoClass); } + void ServerDinoOrderGroup_AddOrRemoveDinoCharacter_Implementation(int groupIndex, APrimalDinoCharacter * DinoCharacter, bool bAdd) { NativeCall(this, "AShooterPlayerState.ServerDinoOrderGroup_AddOrRemoveDinoCharacter_Implementation", groupIndex, DinoCharacter, bAdd); } + void ServerDinoOrderGroup_Clear_Implementation(int groupIndex, bool bClearClasses, bool bClearChars) { NativeCall(this, "AShooterPlayerState.ServerDinoOrderGroup_Clear_Implementation", groupIndex, bClearClasses, bClearChars); } + void ServerDinoOrderGroup_RemoveEntryByIndex_Implementation(int groupIndex, bool bIsClass, int entryIndex) { NativeCall(this, "AShooterPlayerState.ServerDinoOrderGroup_RemoveEntryByIndex_Implementation", groupIndex, bIsClass, entryIndex); } + void ServerSetSelectedDinoOrderGroup_Implementation(int newGroup) { NativeCall(this, "AShooterPlayerState.ServerSetSelectedDinoOrderGroup_Implementation", newGroup); } + void ServerRequestRenameTribe_Implementation(FString * TribeName) { NativeCall(this, "AShooterPlayerState.ServerRequestRenameTribe_Implementation", TribeName); } + void ServerRequestSetTribeGovernment_Implementation(FTribeGovernment TribeGovernment) { NativeCall(this, "AShooterPlayerState.ServerRequestSetTribeGovernment_Implementation", TribeGovernment); } + void ServerRequestCreateNewTribe_Implementation(FString * TribeName, FTribeGovernment TribeGovernment) { NativeCall(this, "AShooterPlayerState.ServerRequestCreateNewTribe_Implementation", TribeName, TribeGovernment); } + void ServerRequestLeaveTribe_Implementation() { NativeCall(this, "AShooterPlayerState.ServerRequestLeaveTribe_Implementation"); } + void ServerRequestRemovePlayerIndexFromMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall(this, "AShooterPlayerState.ServerRequestRemovePlayerIndexFromMyTribe_Implementation", PlayerIndexInTribe); } + void ServerRequestPromotePlayerInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall(this, "AShooterPlayerState.ServerRequestPromotePlayerInMyTribe_Implementation", PlayerIndexInTribe); } + void ServerRequestDemotePlayerInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall(this, "AShooterPlayerState.ServerRequestDemotePlayerInMyTribe_Implementation", PlayerIndexInTribe); } + void InvitedRankGroupPlayerIntoTribe(AShooterPlayerState * OtherPlayer) { NativeCall(this, "AShooterPlayerState.InvitedRankGroupPlayerIntoTribe", OtherPlayer); } + void ServerRequestSetTribeMemberGroupRank_Implementation(int PlayerIndexInTribe, int RankGroupIndex) { NativeCall(this, "AShooterPlayerState.ServerRequestSetTribeMemberGroupRank_Implementation", PlayerIndexInTribe, RankGroupIndex); } + void ServerTribeRequestAddRankGroup_Implementation(FString * GroupName) { NativeCall(this, "AShooterPlayerState.ServerTribeRequestAddRankGroup_Implementation", GroupName); } + void ServerTribeRequestRemoveRankGroup_Implementation(int RankGroupIndex) { NativeCall(this, "AShooterPlayerState.ServerTribeRequestRemoveRankGroup_Implementation", RankGroupIndex); } + void ServerTribeRequestApplyRankGroupSettings_Implementation(int RankGroupIndex, FTribeRankGroup newGroupSettings) { NativeCall(this, "AShooterPlayerState.ServerTribeRequestApplyRankGroupSettings_Implementation", RankGroupIndex, newGroupSettings); } + void ServerRequestTransferOwnershipInMyTribe_Implementation(int PlayerIndexInTribe) { NativeCall(this, "AShooterPlayerState.ServerRequestTransferOwnershipInMyTribe_Implementation", PlayerIndexInTribe); } + FString * GetPlayerName(FString * result) { return NativeCall(this, "AShooterPlayerState.GetPlayerName", result); } + void ServerRequestMySpawnPoints_Implementation(int IgnoreBedID, TSubclassOf FilterClass) { NativeCall>(this, "AShooterPlayerState.ServerRequestMySpawnPoints_Implementation", IgnoreBedID, FilterClass); } + void RequestCreateNewPlayerWithArkData(UPrimalPlayerData * PlayerArkData) { NativeCall(this, "AShooterPlayerState.RequestCreateNewPlayerWithArkData", PlayerArkData); } + void ServerRequestApplyEngramPoints_Implementation(TSubclassOf forItemEntry) { NativeCall>(this, "AShooterPlayerState.ServerRequestApplyEngramPoints_Implementation", forItemEntry); } + void ServerUnlockEngram(TSubclassOf forItemEntry, bool bNotifyPlayerHUD, bool bForceUnlock) { NativeCall, bool, bool>(this, "AShooterPlayerState.ServerUnlockEngram", forItemEntry, bNotifyPlayerHUD, bForceUnlock); } + bool IsAlliedWith(int OtherTeam) { return NativeCall(this, "AShooterPlayerState.IsAlliedWith", OtherTeam); } + void AddEngramBlueprintToPlayerInventory(UPrimalInventoryComponent * invComp, TSubclassOf engramItemBlueprint) { NativeCall>(this, "AShooterPlayerState.AddEngramBlueprintToPlayerInventory", invComp, engramItemBlueprint); } + UObject * GetObjectW() { return NativeCall(this, "AShooterPlayerState.GetObjectW"); } + bool HasEngram(TSubclassOf ItemClass) { return NativeCall>(this, "AShooterPlayerState.HasEngram", ItemClass); } + void NotifyPlayerJoinedTribe_Implementation(FString * ThePlayerName, FString * TribeName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerJoinedTribe_Implementation", ThePlayerName, TribeName); } + void NotifyPlayerLeftTribe_Implementation(FString * ThePlayerName, FString * TribeName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerLeftTribe_Implementation", ThePlayerName, TribeName); } + void NotifyPlayerJoined_Implementation(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerJoined_Implementation", ThePlayerName); } + void NotifyTribememberJoined_Implementation(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyTribememberJoined_Implementation", ThePlayerName); } + void NotifyPlayerLeft_Implementation(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerLeft_Implementation", ThePlayerName); } + void NotifyTribememberLeft_Implementation(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyTribememberLeft_Implementation", ThePlayerName); } + void ServerSetDefaultItemSlotClass_Implementation(int slotNum, TSubclassOf ItemClass, bool bIsEngram) { NativeCall, bool>(this, "AShooterPlayerState.ServerSetDefaultItemSlotClass_Implementation", slotNum, ItemClass, bIsEngram); } + void ClientNotifyLevelUpAvailable_Implementation() { NativeCall(this, "AShooterPlayerState.ClientNotifyLevelUpAvailable_Implementation"); } + int GetCharacterLevel() { return NativeCall(this, "AShooterPlayerState.GetCharacterLevel"); } + void SetTribeTamingDinoSettings(APrimalDinoCharacter * aDinoChar) { NativeCall(this, "AShooterPlayerState.SetTribeTamingDinoSettings", aDinoChar); } + void SendTribeInviteData_Implementation(FTribeData TribeInviteData) { NativeCall(this, "AShooterPlayerState.SendTribeInviteData_Implementation", TribeInviteData); } + void DoRespec(UPrimalPlayerData * ForPlayerData, AShooterCharacter * ForCharacter, bool bSetRespecedAtCharacterLevel) { NativeCall(this, "AShooterPlayerState.DoRespec", ForPlayerData, ForCharacter, bSetRespecedAtCharacterLevel); } + FString * GetUniqueIdString(FString * result) { return NativeCall(this, "AShooterPlayerState.GetUniqueIdString", result); } + void ServerDeclareTribeWar_Implementation(int EnemyTeamID, int StartDayNum, int EndDayNumber, float WarStartTime, float WarEndTime) { NativeCall(this, "AShooterPlayerState.ServerDeclareTribeWar_Implementation", EnemyTeamID, StartDayNum, EndDayNumber, WarStartTime, WarEndTime); } + void ServerAcceptTribeWar_Implementation(int EnemyTeamID) { NativeCall(this, "AShooterPlayerState.ServerAcceptTribeWar_Implementation", EnemyTeamID); } + void ServerRejectTribeWar_Implementation(int EnemyTeamID) { NativeCall(this, "AShooterPlayerState.ServerRejectTribeWar_Implementation", EnemyTeamID); } + FTribeWar * GetTribeWar(FTribeWar * result, int EnemyTeam) { return NativeCall(this, "AShooterPlayerState.GetTribeWar", result, EnemyTeam); } + void ServerRequestRemoveAllianceMember_Implementation(unsigned int AllianceID, unsigned int MemberID) { NativeCall(this, "AShooterPlayerState.ServerRequestRemoveAllianceMember_Implementation", AllianceID, MemberID); } + void ServerRequestPromoteAllianceMember_Implementation(unsigned int AllianceID, unsigned int MemberID) { NativeCall(this, "AShooterPlayerState.ServerRequestPromoteAllianceMember_Implementation", AllianceID, MemberID); } + void ServerTribeRequestNewAlliance_Implementation(FString * AllianceName) { NativeCall(this, "AShooterPlayerState.ServerTribeRequestNewAlliance_Implementation", AllianceName); } + void ServerRequestLeaveAlliance_Implementation(unsigned int AllianceID) { NativeCall(this, "AShooterPlayerState.ServerRequestLeaveAlliance_Implementation", AllianceID); } + void AcceptJoinAlliance(unsigned int AllianceID, unsigned int NewMemberID, FString NewMemberName) { NativeCall(this, "AShooterPlayerState.AcceptJoinAlliance", AllianceID, NewMemberID, NewMemberName); } + bool AllowTribeGroupPermission(ETribeGroupPermission::Type TribeGroupPermission, UObject * OnObject) { return NativeCall(this, "AShooterPlayerState.AllowTribeGroupPermission", TribeGroupPermission, OnObject); } + void ServerRequestSpawnPointsForDownloadedCharacters_Implementation(unsigned __int64 PlayerDataID, int IgnoreBedID) { NativeCall(this, "AShooterPlayerState.ServerRequestSpawnPointsForDownloadedCharacters_Implementation", PlayerDataID, IgnoreBedID); } + static void StaticRegisterNativesAShooterPlayerState() { NativeCall(nullptr, "AShooterPlayerState.StaticRegisterNativesAShooterPlayerState"); } + UField * GetPrivateStaticClass() { return NativeCall(this, "AShooterPlayerState.GetPrivateStaticClass"); } + void ClientGetServerOptions(FServerOptions info) { NativeCall(this, "AShooterPlayerState.ClientGetServerOptions", info); } + void ClientRefreshDinoOrderGroup(int groupIndex, FDinoOrderGroup groupData, int UseCurrentlySelectedGroup) { NativeCall(this, "AShooterPlayerState.ClientRefreshDinoOrderGroup", groupIndex, groupData, UseCurrentlySelectedGroup); } + void NotifyPlayerJoined(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerJoined", ThePlayerName); } + void NotifyPlayerJoinedTribe(FString * ThePlayerName, FString * TribeName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerJoinedTribe", ThePlayerName, TribeName); } + void NotifyPlayerLeft(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerLeft", ThePlayerName); } + void NotifyPlayerLeftTribe(FString * ThePlayerName, FString * TribeName) { NativeCall(this, "AShooterPlayerState.NotifyPlayerLeftTribe", ThePlayerName, TribeName); } + void NotifyTribememberJoined(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyTribememberJoined", ThePlayerName); } + void NotifyTribememberLeft(FString * ThePlayerName) { NativeCall(this, "AShooterPlayerState.NotifyTribememberLeft", ThePlayerName); } + void SendTribeInviteData(FTribeData TribeInviteData) { NativeCall(this, "AShooterPlayerState.SendTribeInviteData", TribeInviteData); } + void ServerAcceptTribeWar(int EnemyTeamID) { NativeCall(this, "AShooterPlayerState.ServerAcceptTribeWar", EnemyTeamID); } + void ServerDinoOrderGroup_AddOrRemoveDinoCharacter(int groupIndex, APrimalDinoCharacter * DinoCharacter, bool bAdd) { NativeCall(this, "AShooterPlayerState.ServerDinoOrderGroup_AddOrRemoveDinoCharacter", groupIndex, DinoCharacter, bAdd); } + void ServerGetAllPlayerNamesAndLocations() { NativeCall(this, "AShooterPlayerState.ServerGetAllPlayerNamesAndLocations"); } + void ServerRequestApplyEngramPoints(TSubclassOf forItemEntry) { NativeCall>(this, "AShooterPlayerState.ServerRequestApplyEngramPoints", forItemEntry); } + void ServerRequestCreateNewTribe(FString * TribeName, FTribeGovernment TribeGovernment) { NativeCall(this, "AShooterPlayerState.ServerRequestCreateNewTribe", TribeName, TribeGovernment); } + void ServerRequestRenameTribe(FString * ServerRequestRenameTribe) { NativeCall(this, "AShooterPlayerState.ServerRequestRenameTribe", ServerRequestRenameTribe); } + void ServerRequestSetTribeMemberGroupRank(int PlayerIndexInTribe, int RankGroupIndex) { NativeCall(this, "AShooterPlayerState.ServerRequestSetTribeMemberGroupRank", PlayerIndexInTribe, RankGroupIndex); } + void ServerRequestSpawnPointsForDownloadedCharacters(unsigned __int64 PlayerDataID, int IgnoreBedID) { NativeCall(this, "AShooterPlayerState.ServerRequestSpawnPointsForDownloadedCharacters", PlayerDataID, IgnoreBedID); } + void ServerSetDefaultItemSlotClass(int slotNum, TSubclassOf ItemClass, bool bIsEngram) { NativeCall, bool>(this, "AShooterPlayerState.ServerSetDefaultItemSlotClass", slotNum, ItemClass, bIsEngram); } + void ServerSetDinoGroupName(int groupIndex, FString * GroupName) { NativeCall(this, "AShooterPlayerState.ServerSetDinoGroupName", groupIndex, GroupName); } + void ServerTribeRequestApplyRankGroupSettings(int RankGroupIndex, FTribeRankGroup newGroupSettings) { NativeCall(this, "AShooterPlayerState.ServerTribeRequestApplyRankGroupSettings", RankGroupIndex, newGroupSettings); } +}; + +struct AController : AActor +{ + FieldValue> OldPawnField() { return { this, "AController.OldPawn" }; } + FieldValue CharacterField() { return { this, "AController.Character" }; } + FieldValue PlayerStateField() { return { this, "AController.PlayerState" }; } + FieldValue PawnField() { return { this, "AController.Pawn" }; } + FieldValue ControlRotationField() { return { this, "AController.ControlRotation" }; } + FieldValue> StartSpotField() { return { this, "AController.StartSpot" }; } + FieldValue StateNameField() { return { this, "AController.StateName" }; } + + // Functions + + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "AController.GetPrivateStaticClass"); } + bool IsLocalController() { return NativeCall(this, "AController.IsLocalController"); } + void FailedToSpawnPawn() { NativeCall(this, "AController.FailedToSpawnPawn"); } + void SetInitialLocationAndRotation(FVector * NewLocation, FRotator * NewRotation) { NativeCall(this, "AController.SetInitialLocationAndRotation", NewLocation, NewRotation); } + FRotator * GetControlRotation(FRotator * result) { return NativeCall(this, "AController.GetControlRotation", result); } + void SetControlRotation(FRotator * NewRotation) { NativeCall(this, "AController.SetControlRotation", NewRotation); } + void AttachToPawn(APawn * InPawn) { NativeCall(this, "AController.AttachToPawn", InPawn); } + void DetachFromPawn() { NativeCall(this, "AController.DetachFromPawn"); } + AActor * GetViewTarget() { return NativeCall(this, "AController.GetViewTarget"); } + void GetPlayerViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "AController.GetPlayerViewPoint", out_Location, out_Rotation); } + bool LineOfSightTo(AActor * Other, FVector ViewPoint, bool bAlternateChecks) { return NativeCall(this, "AController.LineOfSightTo", Other, ViewPoint, bAlternateChecks); } + void PostInitializeComponents() { NativeCall(this, "AController.PostInitializeComponents"); } + void Possess(APawn * InPawn) { NativeCall(this, "AController.Possess", InPawn); } + void PawnPendingDestroy(APawn * inPawn) { NativeCall(this, "AController.PawnPendingDestroy", inPawn); } + void Reset() { NativeCall(this, "AController.Reset"); } + void ClientSetLocation_Implementation(FVector NewLocation, FRotator NewRotation) { NativeCall(this, "AController.ClientSetLocation_Implementation", NewLocation, NewRotation); } + void ClientSetRotation_Implementation(FRotator NewRotation, bool bResetCamera) { NativeCall(this, "AController.ClientSetRotation_Implementation", NewRotation, bResetCamera); } + void RemovePawnTickDependency(APawn * InOldPawn) { NativeCall(this, "AController.RemovePawnTickDependency", InOldPawn); } + void AddPawnTickDependency(APawn * NewPawn) { NativeCall(this, "AController.AddPawnTickDependency", NewPawn); } + void SetPawn(APawn * InPawn) { NativeCall(this, "AController.SetPawn", InPawn); } + void OnRep_Pawn() { NativeCall(this, "AController.OnRep_Pawn"); } + void OnRep_PlayerState() { NativeCall(this, "AController.OnRep_PlayerState"); } + void Destroyed() { NativeCall(this, "AController.Destroyed"); } + void CleanupPlayerState() { NativeCall(this, "AController.CleanupPlayerState"); } + void InstigatedAnyDamage(float Damage, UDamageType * DamageType, AActor * DamagedActor, AActor * DamageCauser) { NativeCall(this, "AController.InstigatedAnyDamage", Damage, DamageType, DamagedActor, DamageCauser); } + void InitPlayerState() { NativeCall(this, "AController.InitPlayerState"); } + FRotator * GetDesiredRotation(FRotator * result) { return NativeCall(this, "AController.GetDesiredRotation", result); } + void GetActorEyesViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "AController.GetActorEyesViewPoint", out_Location, out_Rotation); } + FString * GetHumanReadableName(FString * result) { return NativeCall(this, "AController.GetHumanReadableName", result); } + void ChangeState(FName NewState) { NativeCall(this, "AController.ChangeState", NewState); } + FVector * GetNavAgentLocation(FVector * result) { return NativeCall(this, "AController.GetNavAgentLocation", result); } + void GetMoveGoalReachTest(AActor * MovingActor, FVector * MoveOffset, FVector * GoalOffset, float * GoalRadius, float * GoalHalfHeight) { NativeCall(this, "AController.GetMoveGoalReachTest", MovingActor, MoveOffset, GoalOffset, GoalRadius, GoalHalfHeight); } + void UpdateNavigationComponents() { NativeCall(this, "AController.UpdateNavigationComponents"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AController.GetLifetimeReplicatedProps", OutLifetimeProps); } + static void StaticRegisterNativesAController() { NativeCall(nullptr, "AController.StaticRegisterNativesAController"); } + void ReceiveInstigatedAnyDamage(float Damage, UDamageType * DamageType, AActor * DamagedActor, AActor * DamageCauser) { NativeCall(this, "AController.ReceiveInstigatedAnyDamage", Damage, DamageType, DamagedActor, DamageCauser); } +}; + +struct APlayerController : AController +{ + FieldValue PlayerField() { return { this, "APlayerController.Player" }; } + FieldValue AcknowledgedPawnField() { return { this, "APlayerController.AcknowledgedPawn" }; } + FieldValue LocalPlayerCachedLODDistanceFactorField() { return { this, "APlayerController.LocalPlayerCachedLODDistanceFactor" }; } + FieldValue MyHUDField() { return { this, "APlayerController.MyHUD" }; } + FieldValue PlayerCameraManagerField() { return { this, "APlayerController.PlayerCameraManager" }; } + FieldValue> PlayerCameraManagerClassField() { return { this, "APlayerController.PlayerCameraManagerClass" }; } + FieldValue bAutoManageActiveCameraTargetField() { return { this, "APlayerController.bAutoManageActiveCameraTarget" }; } + FieldValue TargetViewRotationField() { return { this, "APlayerController.TargetViewRotation" }; } + FieldValue BlendedTargetViewRotationField() { return { this, "APlayerController.BlendedTargetViewRotation" }; } + FieldValue> HiddenActorsField() { return { this, "APlayerController.HiddenActors" }; } + FieldValue LastSpectatorStateSynchTimeField() { return { this, "APlayerController.LastSpectatorStateSynchTime" }; } + FieldValue ClientCapField() { return { this, "APlayerController.ClientCap" }; } + FieldValue ServerLastReceivedSpectatorLocTimeField() { return { this, "APlayerController.ServerLastReceivedSpectatorLocTime" }; } + FieldValue CheatManagerField() { return { this, "APlayerController.CheatManager" }; } + FieldValue> CheatClassField() { return { this, "APlayerController.CheatClass" }; } + FieldValue> PendingMapChangeLevelNamesField() { return { this, "APlayerController.PendingMapChangeLevelNames" }; } + FieldValue NetPlayerIndexField() { return { this, "APlayerController.NetPlayerIndex" }; } + FieldValue PendingSwapConnectionField() { return { this, "APlayerController.PendingSwapConnection" }; } + FieldValue NetConnectionField() { return { this, "APlayerController.NetConnection" }; } + FieldValue RotationInputField() { return { this, "APlayerController.RotationInput" }; } + FieldValue InputYawScaleField() { return { this, "APlayerController.InputYawScale" }; } + FieldValue InputPitchScaleField() { return { this, "APlayerController.InputPitchScale" }; } + FieldValue InputRollScaleField() { return { this, "APlayerController.InputRollScale" }; } + FieldValue> DefaultMouseCursorField() { return { this, "APlayerController.DefaultMouseCursor" }; } + FieldValue> CurrentMouseCursorField() { return { this, "APlayerController.CurrentMouseCursor" }; } + FieldValue> DefaultClickTraceChannelField() { return { this, "APlayerController.DefaultClickTraceChannel" }; } + FieldValue> CurrentClickTraceChannelField() { return { this, "APlayerController.CurrentClickTraceChannel" }; } + FieldValue bLockedInputUIField() { return { this, "APlayerController.bLockedInputUI" }; } + FieldValue> TransformComponentField() { return { this, "APlayerController.TransformComponent" }; } + FieldValue> CurrentClickablePrimitiveField() { return { this, "APlayerController.CurrentClickablePrimitive" }; } + FieldArray, 11> CurrentTouchablePrimitivesField() { return { this, "APlayerController.CurrentTouchablePrimitives" }; } + FieldValue IgnoreMoveInputField() { return { this, "APlayerController.IgnoreMoveInput" }; } + FieldValue IgnoreLookInputField() { return { this, "APlayerController.IgnoreLookInput" }; } + FieldValue> AudioListenerComponentField() { return { this, "APlayerController.AudioListenerComponent" }; } + FieldValue AudioListenerLocationOverrideField() { return { this, "APlayerController.AudioListenerLocationOverride" }; } + FieldValue AudioListenerRotationOverrideField() { return { this, "APlayerController.AudioListenerRotationOverride" }; } + FieldValue SpawnLocationField() { return { this, "APlayerController.SpawnLocation" }; } + FieldValue LastRetryPlayerTimeField() { return { this, "APlayerController.LastRetryPlayerTime" }; } + FieldValue SeamlessTravelCountField() { return { this, "APlayerController.SeamlessTravelCount" }; } + FieldValue LastCompletedSeamlessTravelCountField() { return { this, "APlayerController.LastCompletedSeamlessTravelCount" }; } + FieldValue LastReplicatedFocalLocField() { return { this, "APlayerController.LastReplicatedFocalLoc" }; } + FieldValue bIsDelayedNetCleanupField() { return { this, "APlayerController.bIsDelayedNetCleanup" }; } + FieldValue LastTeleportDistanceField() { return { this, "APlayerController.LastTeleportDistance" }; } + + // Functions + + AActor * GetAimedUseActor(UActorComponent ** UseComponent, int * hitBodyIndex) { return NativeCall(this, "APlayerController.GetAimedUseActor", UseComponent, hitBodyIndex); } + AActor * BaseGetPlayerCharacter() { return NativeCall(this, "APlayerController.BaseGetPlayerCharacter"); } + static UClass * StaticClass() { return NativeCall(nullptr, "APlayerController.StaticClass"); } + UPlayer * GetNetOwningPlayer() { return NativeCall(this, "APlayerController.GetNetOwningPlayer"); } + UNetConnection * GetNetConnection() { return NativeCall(this, "APlayerController.GetNetConnection"); } + bool IsLocalController() { return NativeCall(this, "APlayerController.IsLocalController"); } + bool ServerPause_Validate() { return NativeCall(this, "APlayerController.ServerPause_Validate"); } + void FailedToSpawnPawn() { NativeCall(this, "APlayerController.FailedToSpawnPawn"); } + void ClientFlushLevelStreaming_Implementation() { NativeCall(this, "APlayerController.ClientFlushLevelStreaming_Implementation"); } + void ServerUpdateLevelVisibility_Implementation(FName PackageName, bool bIsVisible) { NativeCall(this, "APlayerController.ServerUpdateLevelVisibility_Implementation", PackageName, bIsVisible); } + bool ServerUpdateLevelVisibility_Validate(FName PackageName, bool bIsVisible) { return NativeCall(this, "APlayerController.ServerUpdateLevelVisibility_Validate", PackageName, bIsVisible); } + FString * ConsoleCommand(FString * result, FString * Cmd, bool bWriteToLog) { return NativeCall(this, "APlayerController.ConsoleCommand", result, Cmd, bWriteToLog); } + void CleanUpAudioComponents() { NativeCall(this, "APlayerController.CleanUpAudioComponents"); } + AActor * GetViewTarget() { return NativeCall(this, "APlayerController.GetViewTarget"); } + void AutoManageActiveCameraTarget(AActor * SuggestedTarget) { NativeCall(this, "APlayerController.AutoManageActiveCameraTarget", SuggestedTarget); } + void ServerNotifyLoadedWorld_Implementation(FName WorldPackageName) { NativeCall(this, "APlayerController.ServerNotifyLoadedWorld_Implementation", WorldPackageName); } + bool HasClientLoadedCurrentWorld() { return NativeCall(this, "APlayerController.HasClientLoadedCurrentWorld"); } + void ForceSingleNetUpdateFor(AActor * Target) { NativeCall(this, "APlayerController.ForceSingleNetUpdateFor", Target); } + void SmoothTargetViewRotation(APawn * TargetPawn, float DeltaSeconds) { NativeCall(this, "APlayerController.SmoothTargetViewRotation", TargetPawn, DeltaSeconds); } + void InitInputSystem() { NativeCall(this, "APlayerController.InitInputSystem"); } + void SafeRetryClientRestart() { NativeCall(this, "APlayerController.SafeRetryClientRestart"); } + void ClientRetryClientRestart_Implementation(APawn * NewPawn) { NativeCall(this, "APlayerController.ClientRetryClientRestart_Implementation", NewPawn); } + void ClientRestart_Implementation(APawn * NewPawn) { NativeCall(this, "APlayerController.ClientRestart_Implementation", NewPawn); } + void Possess(APawn * PawnToPossess) { NativeCall(this, "APlayerController.Possess", PawnToPossess); } + void AcknowledgePossession(APawn * P) { NativeCall(this, "APlayerController.AcknowledgePossession", P); } + void ReceivedPlayer() { NativeCall(this, "APlayerController.ReceivedPlayer"); } + FVector * GetFocalLocation(FVector * result) { return NativeCall(this, "APlayerController.GetFocalLocation", result); } + void PostLoad() { NativeCall(this, "APlayerController.PostLoad"); } + void GetActorEyesViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "APlayerController.GetActorEyesViewPoint", out_Location, out_Rotation); } + void CalcCamera(float DeltaTime, FMinimalViewInfo * OutResult) { NativeCall(this, "APlayerController.CalcCamera", DeltaTime, OutResult); } + void GetPlayerViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "APlayerController.GetPlayerViewPoint", out_Location, out_Rotation); } + void UpdateRotation(float DeltaTime) { NativeCall(this, "APlayerController.UpdateRotation", DeltaTime); } + void PostInitializeComponents() { NativeCall(this, "APlayerController.PostInitializeComponents"); } + void AddCheats(bool bForce) { NativeCall(this, "APlayerController.AddCheats", bForce); } + void EnableCheats(FString pass) { NativeCall(this, "APlayerController.EnableCheats", pass); } + void SpawnDefaultHUD() { NativeCall(this, "APlayerController.SpawnDefaultHUD"); } + void CreateTouchInterface() { NativeCall(this, "APlayerController.CreateTouchInterface"); } + void CleanupGameViewport() { NativeCall(this, "APlayerController.CleanupGameViewport"); } + void GetViewportSize(int * SizeX, int * SizeY) { NativeCall(this, "APlayerController.GetViewportSize", SizeX, SizeY); } + void Reset() { NativeCall(this, "APlayerController.Reset"); } + void ClientReset_Implementation() { NativeCall(this, "APlayerController.ClientReset_Implementation"); } + void ClientGotoState_Implementation(FName NewState) { NativeCall(this, "APlayerController.ClientGotoState_Implementation", NewState); } + bool IsFrozen() { return NativeCall(this, "APlayerController.IsFrozen"); } + void ServerAcknowledgePossession_Implementation(APawn * P) { NativeCall(this, "APlayerController.ServerAcknowledgePossession_Implementation", P); } + bool ServerAcknowledgePossession_Validate(APawn * P) { return NativeCall(this, "APlayerController.ServerAcknowledgePossession_Validate", P); } + void UnPossess() { NativeCall(this, "APlayerController.UnPossess"); } + void ClientSetHUD_Implementation(TSubclassOf NewHUDClass) { NativeCall>(this, "APlayerController.ClientSetHUD_Implementation", NewHUDClass); } + void CleanupPlayerState() { NativeCall(this, "APlayerController.CleanupPlayerState"); } + void OnNetCleanup(UNetConnection * Connection) { NativeCall(this, "APlayerController.OnNetCleanup", Connection); } + void DelayedNetCleanup() { NativeCall(this, "APlayerController.DelayedNetCleanup"); } + void ClientPlaySound_Implementation(USoundBase * Sound, float VolumeMultiplier, float PitchMultiplier) { NativeCall(this, "APlayerController.ClientPlaySound_Implementation", Sound, VolumeMultiplier, PitchMultiplier); } + void ClientPlaySoundAtLocation_Implementation(USoundBase * Sound, FVector Location, float VolumeMultiplier, float PitchMultiplier) { NativeCall(this, "APlayerController.ClientPlaySoundAtLocation_Implementation", Sound, Location, VolumeMultiplier, PitchMultiplier); } + void ClientMessage_Implementation(FString * S, FName Type, float MsgLifeTime) { NativeCall(this, "APlayerController.ClientMessage_Implementation", S, Type, MsgLifeTime); } + void ClientTeamMessage_Implementation(APlayerState * SenderPlayerState, FString * S, FName Type, float MsgLifeTime) { NativeCall(this, "APlayerController.ClientTeamMessage_Implementation", SenderPlayerState, S, Type, MsgLifeTime); } + void ServerToggleAILogging_Implementation() { NativeCall(this, "APlayerController.ServerToggleAILogging_Implementation"); } + void PawnLeavingGame() { NativeCall(this, "APlayerController.PawnLeavingGame"); } + void EndPlay(EEndPlayReason::Type EndPlayReason) { NativeCall(this, "APlayerController.EndPlay", EndPlayReason); } + void Destroyed() { NativeCall(this, "APlayerController.Destroyed"); } + void FOV(float F) { NativeCall(this, "APlayerController.FOV", F); } + void Camera(FName NewMode) { NativeCall(this, "APlayerController.Camera", NewMode); } + void ServerCamera_Implementation(FName NewMode) { NativeCall(this, "APlayerController.ServerCamera_Implementation", NewMode); } + bool ServerCamera_Validate(FName NewMode) { return NativeCall(this, "APlayerController.ServerCamera_Validate", NewMode); } + void SetCameraMode(FName NewCamMode) { NativeCall(this, "APlayerController.SetCameraMode", NewCamMode); } + void ResetCameraMode() { NativeCall(this, "APlayerController.ResetCameraMode"); } + void ClientSetCameraFade_Implementation(bool bEnableFading, FColor FadeColor, FVector2D FadeAlpha, float FadeTime, bool bFadeAudio) { NativeCall(this, "APlayerController.ClientSetCameraFade_Implementation", bEnableFading, FadeColor, FadeAlpha, FadeTime, bFadeAudio); } + void SendClientAdjustment() { NativeCall(this, "APlayerController.SendClientAdjustment"); } + void ClientCapBandwidth_Implementation(int Cap) { NativeCall(this, "APlayerController.ClientCapBandwidth_Implementation", Cap); } + void SetSpawnLocation(FVector * NewLocation) { NativeCall(this, "APlayerController.SetSpawnLocation", NewLocation); } + void SetInitialLocationAndRotation(FVector * NewLocation, FRotator * NewRotation) { NativeCall(this, "APlayerController.SetInitialLocationAndRotation", NewLocation, NewRotation); } + void ServerUpdateCamera_Implementation(FVector_NetQuantize CamLoc, int CamPitchAndYaw) { NativeCall(this, "APlayerController.ServerUpdateCamera_Implementation", CamLoc, CamPitchAndYaw); } + void RestartLevel() { NativeCall(this, "APlayerController.RestartLevel"); } + void LocalTravel(FString * FURL) { NativeCall(this, "APlayerController.LocalTravel", FURL); } + void ClientReturnToMainMenu_Implementation(FString * ReturnReason) { NativeCall(this, "APlayerController.ClientReturnToMainMenu_Implementation", ReturnReason); } + void Pause() { NativeCall(this, "APlayerController.Pause"); } + void ServerPause_Implementation() { NativeCall(this, "APlayerController.ServerPause_Implementation"); } + void SetName(FString * S) { NativeCall(this, "APlayerController.SetName", S); } + void ServerChangeName_Implementation(FString * S) { NativeCall(this, "APlayerController.ServerChangeName_Implementation", S); } + bool ServerChangeName_Validate(FString * S) { return NativeCall(this, "APlayerController.ServerChangeName_Validate", S); } + void SwitchLevel(FString * FURL) { NativeCall(this, "APlayerController.SwitchLevel", FURL); } + void NotifyLoadedWorld(FName WorldPackageName, bool bFinalDest) { NativeCall(this, "APlayerController.NotifyLoadedWorld", WorldPackageName, bFinalDest); } + void GameHasEnded(AActor * EndGameFocus, bool bIsWinner) { NativeCall(this, "APlayerController.GameHasEnded", EndGameFocus, bIsWinner); } + void ClientGameEnded_Implementation(AActor * EndGameFocus, bool bIsWinner) { NativeCall(this, "APlayerController.ClientGameEnded_Implementation", EndGameFocus, bIsWinner); } + bool GetHitResultUnderCursor(ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultUnderCursor", TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultUnderCursorByChannel(ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultUnderCursorByChannel", TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultUnderCursorForObjects(TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>(this, "APlayerController.GetHitResultUnderCursorForObjects", ObjectTypes, bTraceComplex, HitResult); } + bool GetHitResultUnderFinger(ETouchIndex::Type FingerIndex, ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultUnderFinger", FingerIndex, TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultUnderFingerByChannel(ETouchIndex::Type FingerIndex, ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultUnderFingerByChannel", FingerIndex, TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultUnderFingerForObjects(ETouchIndex::Type FingerIndex, TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>(this, "APlayerController.GetHitResultUnderFingerForObjects", FingerIndex, ObjectTypes, bTraceComplex, HitResult); } + bool DeprojectMousePositionToWorld(FVector * WorldLocation, FVector * WorldDirection) { return NativeCall(this, "APlayerController.DeprojectMousePositionToWorld", WorldLocation, WorldDirection); } + bool DeprojectScreenPositionToWorld(float ScreenX, float ScreenY, FVector * WorldLocation, FVector * WorldDirection) { return NativeCall(this, "APlayerController.DeprojectScreenPositionToWorld", ScreenX, ScreenY, WorldLocation, WorldDirection); } + bool ProjectWorldLocationToScreen(FVector WorldLocation, FVector2D * ScreenLocation) { return NativeCall(this, "APlayerController.ProjectWorldLocationToScreen", WorldLocation, ScreenLocation); } + bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, ECollisionChannel TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultAtScreenPosition", ScreenPosition, TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult * HitResult) { return NativeCall(this, "APlayerController.GetHitResultAtScreenPosition", ScreenPosition, TraceChannel, bTraceComplex, HitResult); } + bool GetHitResultAtScreenPosition(FVector2D ScreenPosition, TArray> * ObjectTypes, bool bTraceComplex, FHitResult * HitResult) { return NativeCall> *, bool, FHitResult *>(this, "APlayerController.GetHitResultAtScreenPosition", ScreenPosition, ObjectTypes, bTraceComplex, HitResult); } + void PlayerTick(float DeltaTime) { NativeCall(this, "APlayerController.PlayerTick", DeltaTime); } + void FlushPressedKeys() { NativeCall(this, "APlayerController.FlushPressedKeys"); } + bool InputKey(FKey Key, EInputEvent EventType, float AmountDepressed, bool bGamepad) { return NativeCall(this, "APlayerController.InputKey", Key, EventType, AmountDepressed, bGamepad); } + bool InputAxis(FKey Key, float Delta, float DeltaTime, int NumSamples, bool bGamepad) { return NativeCall(this, "APlayerController.InputAxis", Key, Delta, DeltaTime, NumSamples, bGamepad); } + bool InputTouch(unsigned int Handle, ETouchType::Type Type, FVector2D * TouchLocation, FDateTime DeviceTimestamp, unsigned int TouchpadIndex) { return NativeCall(this, "APlayerController.InputTouch", Handle, Type, TouchLocation, DeviceTimestamp, TouchpadIndex); } + bool InputMotion(FVector * Tilt, FVector * RotationRate, FVector * Gravity, FVector * Acceleration) { return NativeCall(this, "APlayerController.InputMotion", Tilt, RotationRate, Gravity, Acceleration); } + bool ShouldShowMouseCursor() { return NativeCall(this, "APlayerController.ShouldShowMouseCursor"); } + EMouseCursor::Type GetMouseCursor() { return NativeCall(this, "APlayerController.GetMouseCursor"); } + void SetupInputComponent() { NativeCall(this, "APlayerController.SetupInputComponent"); } + void ProcessPlayerInput(const float DeltaTime, const bool bGamePaused) { NativeCall(this, "APlayerController.ProcessPlayerInput", DeltaTime, bGamePaused); } + void PostProcessInput(const float DeltaTime, const bool bGamePaused) { NativeCall(this, "APlayerController.PostProcessInput", DeltaTime, bGamePaused); } + void ResetIgnoreInputFlags() { NativeCall(this, "APlayerController.ResetIgnoreInputFlags"); } + void SetCinematicMode(bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning) { NativeCall(this, "APlayerController.SetCinematicMode", bInCinematicMode, bAffectsMovement, bAffectsTurning); } + void SetIgnoreMoveInput(bool bNewMoveInput) { NativeCall(this, "APlayerController.SetIgnoreMoveInput", bNewMoveInput); } + bool IsMoveInputIgnored() { return NativeCall(this, "APlayerController.IsMoveInputIgnored"); } + void SetIgnoreLookInput(bool bNewLookInput) { NativeCall(this, "APlayerController.SetIgnoreLookInput", bNewLookInput); } + bool IsLookInputIgnored() { return NativeCall(this, "APlayerController.IsLookInputIgnored"); } + void ServerVerifyViewTarget_Implementation() { NativeCall(this, "APlayerController.ServerVerifyViewTarget_Implementation"); } + void SpawnPlayerCameraManager() { NativeCall(this, "APlayerController.SpawnPlayerCameraManager"); } + void GetAudioListenerPosition(FVector * OutLocation, FVector * OutFrontDir, FVector * OutRightDir) { NativeCall(this, "APlayerController.GetAudioListenerPosition", OutLocation, OutFrontDir, OutRightDir); } + void ServerCheckClientPossession_Implementation() { NativeCall(this, "APlayerController.ServerCheckClientPossession_Implementation"); } + void SafeServerCheckClientPossession() { NativeCall(this, "APlayerController.SafeServerCheckClientPossession"); } + void SafeServerUpdateSpectatorState() { NativeCall(this, "APlayerController.SafeServerUpdateSpectatorState"); } + void ServerSetSpectatorLocation_Implementation(FVector NewLoc) { NativeCall(this, "APlayerController.ServerSetSpectatorLocation_Implementation", NewLoc); } + void ServerViewNextPlayer_Implementation() { NativeCall(this, "APlayerController.ServerViewNextPlayer_Implementation"); } + void ServerViewPrevPlayer_Implementation() { NativeCall(this, "APlayerController.ServerViewPrevPlayer_Implementation"); } + APlayerState * GetNextViewablePlayer(int dir) { return NativeCall(this, "APlayerController.GetNextViewablePlayer", dir); } + void ViewAPlayer(int dir) { NativeCall(this, "APlayerController.ViewAPlayer", dir); } + void StartFire(char FireModeNum) { NativeCall(this, "APlayerController.StartFire", FireModeNum); } + bool NotifyServerReceivedClientData(APawn * InPawn, float TimeStamp) { return NativeCall(this, "APlayerController.NotifyServerReceivedClientData", InPawn, TimeStamp); } + void ServerRestartPlayer_Implementation() { NativeCall(this, "APlayerController.ServerRestartPlayer_Implementation"); } + bool CanRestartPlayer() { return NativeCall(this, "APlayerController.CanRestartPlayer"); } + void ClientIgnoreMoveInput_Implementation(bool bIgnore) { NativeCall(this, "APlayerController.ClientIgnoreMoveInput_Implementation", bIgnore); } + void ClientIgnoreLookInput_Implementation(bool bIgnore) { NativeCall(this, "APlayerController.ClientIgnoreLookInput_Implementation", bIgnore); } + void SetCinematicMode(bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning) { NativeCall(this, "APlayerController.SetCinematicMode", bInCinematicMode, bHidePlayer, bAffectsHUD, bAffectsMovement, bAffectsTurning); } + void ClientSetCinematicMode_Implementation(bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning, bool bAffectsHUD) { NativeCall(this, "APlayerController.ClientSetCinematicMode_Implementation", bInCinematicMode, bAffectsMovement, bAffectsTurning, bAffectsHUD); } + void ClientForceGarbageCollection_Implementation() { NativeCall(this, "APlayerController.ClientForceGarbageCollection_Implementation"); } + void ClientPrepareMapChange_Implementation(FName LevelName, bool bFirst, bool bLast) { NativeCall(this, "APlayerController.ClientPrepareMapChange_Implementation", LevelName, bFirst, bLast); } + void DelayedPrepareMapChange() { NativeCall(this, "APlayerController.DelayedPrepareMapChange"); } + void ClientCommitMapChange_Implementation() { NativeCall(this, "APlayerController.ClientCommitMapChange_Implementation"); } + void ClientCancelPendingMapChange_Implementation() { NativeCall(this, "APlayerController.ClientCancelPendingMapChange_Implementation"); } + void ClientSetBlockOnAsyncLoading_Implementation() { NativeCall(this, "APlayerController.ClientSetBlockOnAsyncLoading_Implementation"); } + void GetSeamlessTravelActorList(bool bToEntry, TArray * ActorList) { NativeCall *>(this, "APlayerController.GetSeamlessTravelActorList", bToEntry, ActorList); } + void SeamlessTravelFrom(APlayerController * OldPC) { NativeCall(this, "APlayerController.SeamlessTravelFrom", OldPC); } + void ClientEnableNetworkVoice_Implementation(bool bEnable) { NativeCall(this, "APlayerController.ClientEnableNetworkVoice_Implementation", bEnable); } + void StartTalking() { NativeCall(this, "APlayerController.StartTalking"); } + void ToggleSpeaking(bool bSpeaking) { NativeCall(this, "APlayerController.ToggleSpeaking", bSpeaking); } + void ClientVoiceHandshakeComplete_Implementation() { NativeCall(this, "APlayerController.ClientVoiceHandshakeComplete_Implementation"); } + void ServerMutePlayer_Implementation(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ServerMutePlayer_Implementation", PlayerId); } + bool ServerUnmutePlayer_Validate(FUniqueNetIdRepl PlayerId) { return NativeCall(this, "APlayerController.ServerUnmutePlayer_Validate", PlayerId); } + void ServerUnmutePlayer_Implementation(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ServerUnmutePlayer_Implementation", PlayerId); } + void ClientMutePlayer_Implementation(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ClientMutePlayer_Implementation", PlayerId); } + void ClientUnmutePlayer_Implementation(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ClientUnmutePlayer_Implementation", PlayerId); } + bool IsPlayerMuted(FUniqueNetId * PlayerId) { return NativeCall(this, "APlayerController.IsPlayerMuted", PlayerId); } + bool ShouldReplicateVoicePacketFrom(FUniqueNetId * Sender, char * PlaybackFlags) { return NativeCall(this, "APlayerController.ShouldReplicateVoicePacketFrom", Sender, PlaybackFlags); } + void NotifyDirectorControl(bool bNowControlling, AMatineeActor * CurrentMatinee) { NativeCall(this, "APlayerController.NotifyDirectorControl", bNowControlling, CurrentMatinee); } + void ClientWasKicked_Implementation(FText * KickReason) { NativeCall(this, "APlayerController.ClientWasKicked_Implementation", KickReason); } + bool IsSplitscreenPlayer(int * OutSplitscreenPlayerIndex) { return NativeCall(this, "APlayerController.IsSplitscreenPlayer", OutSplitscreenPlayerIndex); } + int GetSplitscreenPlayerCount() { return NativeCall(this, "APlayerController.GetSplitscreenPlayerCount"); } + void ClientSetForceMipLevelsToBeResident_Implementation(UMaterialInterface * Material, float ForceDuration, int CinematicTextureGroups) { NativeCall(this, "APlayerController.ClientSetForceMipLevelsToBeResident_Implementation", Material, ForceDuration, CinematicTextureGroups); } + void ClientPrestreamTextures_Implementation(AActor * ForcedActor, float ForceDuration, bool bEnableStreaming, int CinematicTextureGroups) { NativeCall(this, "APlayerController.ClientPrestreamTextures_Implementation", ForcedActor, ForceDuration, bEnableStreaming, CinematicTextureGroups); } + void ProcessForceFeedback(const float DeltaTime, const bool bGamePaused) { NativeCall(this, "APlayerController.ProcessForceFeedback", DeltaTime, bGamePaused); } + void ClientClearCameraLensEffects_Implementation() { NativeCall(this, "APlayerController.ClientClearCameraLensEffects_Implementation"); } + void ReceivedSpectatorClass(TSubclassOf SpectatorClass) { NativeCall>(this, "APlayerController.ReceivedSpectatorClass", SpectatorClass); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APlayerController.GetLifetimeReplicatedProps", OutLifetimeProps); } + void SetPawn(APawn * InPawn) { NativeCall(this, "APlayerController.SetPawn", InPawn); } + void SetPlayer(UPlayer * InPlayer) { NativeCall(this, "APlayerController.SetPlayer", InPlayer); } + void TickPlayerInput(const float DeltaSeconds, const bool bGamePaused) { NativeCall(this, "APlayerController.TickPlayerInput", DeltaSeconds, bGamePaused); } + bool IsNetRelevantFor(APlayerController * RealViewer, AActor * Viewer, FVector * SrcLocation) { return NativeCall(this, "APlayerController.IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } + bool DefaultCanUnpause() { return NativeCall(this, "APlayerController.DefaultCanUnpause"); } + void StartSpectatingOnly() { NativeCall(this, "APlayerController.StartSpectatingOnly"); } + void EndPlayingState() { NativeCall(this, "APlayerController.EndPlayingState"); } + void BeginSpectatingState() { NativeCall(this, "APlayerController.BeginSpectatingState"); } + void DestroySpectatorPawn() { NativeCall(this, "APlayerController.DestroySpectatorPawn"); } + void UpdateStateInputComponents() { NativeCall(this, "APlayerController.UpdateStateInputComponents"); } + void ChangeState(FName NewState) { NativeCall(this, "APlayerController.ChangeState", NewState); } + void EndSpectatingState() { NativeCall(this, "APlayerController.EndSpectatingState"); } + void BeginInactiveState() { NativeCall(this, "APlayerController.BeginInactiveState"); } + void AddPitchInput(float Val) { NativeCall(this, "APlayerController.AddPitchInput", Val); } + void AddYawInput(float Val) { NativeCall(this, "APlayerController.AddYawInput", Val); } + void AddRollInput(float Val) { NativeCall(this, "APlayerController.AddRollInput", Val); } + bool IsInputKeyDown(FKey Key) { return NativeCall(this, "APlayerController.IsInputKeyDown", Key); } + bool WasInputKeyJustPressed(FKey Key) { return NativeCall(this, "APlayerController.WasInputKeyJustPressed", Key); } + bool WasInputKeyJustReleased(FKey Key) { return NativeCall(this, "APlayerController.WasInputKeyJustReleased", Key); } + float GetInputAnalogKeyState(FKey Key) { return NativeCall(this, "APlayerController.GetInputAnalogKeyState", Key); } + FVector * GetInputVectorKeyState(FVector * result, FKey Key) { return NativeCall(this, "APlayerController.GetInputVectorKeyState", result, Key); } + void GetInputMotionState(FVector * Tilt, FVector * RotationRate, FVector * Gravity, FVector * Acceleration) { NativeCall(this, "APlayerController.GetInputMotionState", Tilt, RotationRate, Gravity, Acceleration); } + float GetInputKeyTimeDown(FKey Key) { return NativeCall(this, "APlayerController.GetInputKeyTimeDown", Key); } + bool GetMousePosition(float * LocationX, float * LocationY) { return NativeCall(this, "APlayerController.GetMousePosition", LocationX, LocationY); } + void GetInputMouseDelta(float * DeltaX, float * DeltaY) { NativeCall(this, "APlayerController.GetInputMouseDelta", DeltaX, DeltaY); } + void EnableInput(APlayerController * PlayerController) { NativeCall(this, "APlayerController.EnableInput", PlayerController); } + void DisableInput(APlayerController * PlayerController) { NativeCall(this, "APlayerController.DisableInput", PlayerController); } + void SetVirtualJoystickVisibility(bool bVisible) { NativeCall(this, "APlayerController.SetVirtualJoystickVisibility", bVisible); } + void UpdateCameraManager(float DeltaSeconds) { NativeCall(this, "APlayerController.UpdateCameraManager", DeltaSeconds); } + void ClientRepObjRef_Implementation(UObject * Object) { NativeCall(this, "APlayerController.ClientRepObjRef_Implementation", Object); } + void NetSpawnActorAtLocation_Implementation(TSubclassOf AnActorClass, FVector_NetQuantize AtLocation, FRotator_NetQuantize AtRotation, USceneComponent * attachToComponent, int dataIndex, FName attachSocketName) { NativeCall, FVector_NetQuantize, FRotator_NetQuantize, USceneComponent *, int, FName>(this, "APlayerController.NetSpawnActorAtLocation_Implementation", AnActorClass, AtLocation, AtRotation, attachToComponent, dataIndex, attachSocketName); } + void ServerReceivedPlayerControllerAck_Implementation() { NativeCall(this, "APlayerController.ServerReceivedPlayerControllerAck_Implementation"); } + void ClientProcessNetExecCommandUnreliable_Implementation(AActor * ForActor, FName CommandName, FNetExecParams ExecParams) { NativeCall(this, "APlayerController.ClientProcessNetExecCommandUnreliable_Implementation", ForActor, CommandName, ExecParams); } + void ClientProcessSimpleNetExecCommandBP_Implementation(AActor * ForActor, FName CommandName) { NativeCall(this, "APlayerController.ClientProcessSimpleNetExecCommandBP_Implementation", ForActor, CommandName); } + void ClientProcessSimpleNetExecCommandUnreliableBP_Implementation(AActor * ForActor, FName CommandName) { NativeCall(this, "APlayerController.ClientProcessSimpleNetExecCommandUnreliableBP_Implementation", ForActor, CommandName); } + static void StaticRegisterNativesAPlayerController() { NativeCall(nullptr, "APlayerController.StaticRegisterNativesAPlayerController"); } + void ClientClearCameraLensEffects() { NativeCall(this, "APlayerController.ClientClearCameraLensEffects"); } + void ClientCommitMapChange() { NativeCall(this, "APlayerController.ClientCommitMapChange"); } + void ClientEnableNetworkVoice(bool bEnable) { NativeCall(this, "APlayerController.ClientEnableNetworkVoice", bEnable); } + void ClientMessage(FString * S, FName Type, float MsgLifeTime) { NativeCall(this, "APlayerController.ClientMessage", S, Type, MsgLifeTime); } + void ClientMutePlayer(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ClientMutePlayer", PlayerId); } + void ClientRepObjRef(UObject * Object) { NativeCall(this, "APlayerController.ClientRepObjRef", Object); } + void ClientReturnToMainMenu(FString * ReturnReason) { NativeCall(this, "APlayerController.ClientReturnToMainMenu", ReturnReason); } + void ClientSetHUD(TSubclassOf NewHUDClass) { NativeCall>(this, "APlayerController.ClientSetHUD", NewHUDClass); } + void ClientTeamMessage(APlayerState * SenderPlayerState, FString * S, FName Type, float MsgLifeTime) { NativeCall(this, "APlayerController.ClientTeamMessage", SenderPlayerState, S, Type, MsgLifeTime); } + void ClientUnmutePlayer(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ClientUnmutePlayer", PlayerId); } + void ClientVoiceHandshakeComplete() { NativeCall(this, "APlayerController.ClientVoiceHandshakeComplete"); } + void ClientWasKicked(FText * KickReason) { NativeCall(this, "APlayerController.ClientWasKicked", KickReason); } + void ServerChangeName(FString * S) { NativeCall(this, "APlayerController.ServerChangeName", S); } + void ServerMutePlayer(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ServerMutePlayer", PlayerId); } + void ServerRestartPlayer() { NativeCall(this, "APlayerController.ServerRestartPlayer"); } + void ServerUnmutePlayer(FUniqueNetIdRepl PlayerId) { NativeCall(this, "APlayerController.ServerUnmutePlayer", PlayerId); } + void ServerVerifyViewTarget() { NativeCall(this, "APlayerController.ServerVerifyViewTarget"); } +}; + +struct AShooterPlayerController : APlayerController +{ + FieldArray HeldItemSlotField() { return { this, "AShooterPlayerController.HeldItemSlot" }; } + FieldArray UsedItemSlotField() { return { this, "AShooterPlayerController.UsedItemSlot" }; } + FieldArray LastRepeatUseConsumableTimeField() { return { this, "AShooterPlayerController.LastRepeatUseConsumableTime" }; } + FieldArray HeldItemSlotTimeField() { return { this, "AShooterPlayerController.HeldItemSlotTime" }; } + FieldArray LastUsedItemSlotTimesField() { return { this, "AShooterPlayerController.LastUsedItemSlotTimes" }; } + FieldValue CurrentPlayerCharacterLocationField() { return { this, "AShooterPlayerController.CurrentPlayerCharacterLocation" }; } + FieldValue ModifedButtonCountField() { return { this, "AShooterPlayerController.ModifedButtonCount" }; } + FieldValue LastDeathLocationField() { return { this, "AShooterPlayerController.LastDeathLocation" }; } + FieldValue LastDeathTimeField() { return { this, "AShooterPlayerController.LastDeathTime" }; } + FieldValue> LastDeathPrimalCharacterField() { return { this, "AShooterPlayerController.LastDeathPrimalCharacter" }; } + FieldValue bWasDeadField() { return { this, "AShooterPlayerController.bWasDead" }; } + FieldValue LastDeadCharacterDestructionTimeField() { return { this, "AShooterPlayerController.LastDeadCharacterDestructionTime" }; } + FieldValue bShowGameModeHUDField() { return { this, "AShooterPlayerController.bShowGameModeHUD" }; } + FieldValue CurrentRadialDirection1Field() { return { this, "AShooterPlayerController.CurrentRadialDirection1" }; } + FieldValue CurrentRadialDirection2Field() { return { this, "AShooterPlayerController.CurrentRadialDirection2" }; } + FieldValue SelectSlotSoundField() { return { this, "AShooterPlayerController.SelectSlotSound" }; } + FieldValue PrimalLocalProfileField() { return { this, "AShooterPlayerController.PrimalLocalProfile" }; } + FieldValue bPlayerSpeakingField() { return { this, "AShooterPlayerController.bPlayerSpeaking" }; } + FieldValue CurrentGameModeMaxNumOfRespawnsField() { return { this, "AShooterPlayerController.CurrentGameModeMaxNumOfRespawns" }; } + FieldValue LastRawInputDirField() { return { this, "AShooterPlayerController.LastRawInputDir" }; } + FieldValue TargetOrbitedPlayerIdField() { return { this, "AShooterPlayerController.TargetOrbitedPlayerId" }; } + FieldValue TargetOrbitedTrialCountField() { return { this, "AShooterPlayerController.TargetOrbitedTrialCount" }; } + FieldValue> LastControlledPlayerCharacterField() { return { this, "AShooterPlayerController.LastControlledPlayerCharacter" }; } + FieldValue MaxUseDistanceField() { return { this, "AShooterPlayerController.MaxUseDistance" }; } + FieldValue MaxUseCheckRadiusField() { return { this, "AShooterPlayerController.MaxUseCheckRadius" }; } + FieldValue> SavedSurvivorProfileSettingsField() { return { this, "AShooterPlayerController.SavedSurvivorProfileSettings" }; } + FieldValue bCachedOnlyShowOnlineTribeMembersField() { return { this, "AShooterPlayerController.bCachedOnlyShowOnlineTribeMembers" }; } + FieldValue>> RemoteViewingInventoriesField() { return { this, "AShooterPlayerController.RemoteViewingInventories" }; } + FieldValue> LastHeldUseActorField() { return { this, "AShooterPlayerController.LastHeldUseActor" }; } + FieldValue> LastHeldUseHitComponentField() { return { this, "AShooterPlayerController.LastHeldUseHitComponent" }; } + FieldValue LastHeldUseHitBodyIndexField() { return { this, "AShooterPlayerController.LastHeldUseHitBodyIndex" }; } + FieldValue bUsePressedFromGamepadField() { return { this, "AShooterPlayerController.bUsePressedFromGamepad" }; } + FieldValue> SpawnAtBedField() { return { this, "AShooterPlayerController.SpawnAtBed" }; } + FieldValue TempLastLostPawnField() { return { this, "AShooterPlayerController.TempLastLostPawn" }; } + FieldValue bLockedInputDontRecenterMouseField() { return { this, "AShooterPlayerController.bLockedInputDontRecenterMouse" }; } + FieldValue LastRespawnTimeField() { return { this, "AShooterPlayerController.LastRespawnTime" }; } + FieldValue bIsFirstSpawnField() { return { this, "AShooterPlayerController.bIsFirstSpawn" }; } + FieldValue bIsRespawningField() { return { this, "AShooterPlayerController.bIsRespawning" }; } + FieldValue bIsVRPlayerField() { return { this, "AShooterPlayerController.bIsVRPlayer" }; } + FieldValue> AwaitingHUDClassField() { return { this, "AShooterPlayerController.AwaitingHUDClass" }; } + FieldValue LastEquipedItemNetIDField() { return { this, "AShooterPlayerController.LastEquipedItemNetID" }; } + FieldValue LastUnequippedItemNetIDField() { return { this, "AShooterPlayerController.LastUnequippedItemNetID" }; } + FieldValue<__int64> LinkedPlayerIDField() { return { this, "AShooterPlayerController.LinkedPlayerID" }; } + FieldValue bDrawLocationField() { return { this, "AShooterPlayerController.bDrawLocation" }; } + FieldValue PlayerControllerNumField() { return { this, "AShooterPlayerController.PlayerControllerNum" }; } + FieldValue LastTurnSpeedField() { return { this, "AShooterPlayerController.LastTurnSpeed" }; } + FieldValue LastMultiUseInteractionTimeField() { return { this, "AShooterPlayerController.LastMultiUseInteractionTime" }; } + FieldValue LastTimeSentCarriedRotationField() { return { this, "AShooterPlayerController.LastTimeSentCarriedRotation" }; } + FieldValue LastSteamItemIDToRemoveField() { return { this, "AShooterPlayerController.LastSteamItemIDToRemove" }; } + FieldValue LastSteamItemIDToAddField() { return { this, "AShooterPlayerController.LastSteamItemIDToAdd" }; } + FieldValue bConsumeItemSucceededField() { return { this, "AShooterPlayerController.bConsumeItemSucceeded" }; } + FieldValue bRefreshedInvetoryForRemoveField() { return { this, "AShooterPlayerController.bRefreshedInvetoryForRemove" }; } + FieldValue bServerRefreshedSteamInventoryField() { return { this, "AShooterPlayerController.bServerRefreshedSteamInventory" }; } + FieldValue bServerRefreshStatusField() { return { this, "AShooterPlayerController.bServerRefreshStatus" }; } + FieldValue bCloseSteamStatusSceneField() { return { this, "AShooterPlayerController.bCloseSteamStatusScene" }; } + FieldValue LastSteamInventoryRefreshTimeField() { return { this, "AShooterPlayerController.LastSteamInventoryRefreshTime" }; } + FieldValue LastRequesteDinoAncestorsTimeField() { return { this, "AShooterPlayerController.LastRequesteDinoAncestorsTime" }; } + FieldValue LastDiedMessageTimeField() { return { this, "AShooterPlayerController.LastDiedMessageTime" }; } + FieldValue LastNotifiedTorpidityIncreaseTimeField() { return { this, "AShooterPlayerController.LastNotifiedTorpidityIncreaseTime" }; } + FieldValue LastInvDropRequestTimeField() { return { this, "AShooterPlayerController.LastInvDropRequestTime" }; } + FieldValue LastHadPawnTimeField() { return { this, "AShooterPlayerController.LastHadPawnTime" }; } + FieldValue LastChatMessageTimeField() { return { this, "AShooterPlayerController.LastChatMessageTime" }; } + FieldValue ARKTributeItemNetInfoField() { return { this, "AShooterPlayerController.ARKTributeItemNetInfo" }; } + FieldValue bServerIsPaintingField() { return { this, "AShooterPlayerController.bServerIsPainting" }; } + FieldValue bServerPaintingSuccessField() { return { this, "AShooterPlayerController.bServerPaintingSuccess" }; } + FieldValue LastListenServerNotifyOutOfRangeTimeField() { return { this, "AShooterPlayerController.LastListenServerNotifyOutOfRangeTime" }; } + FieldValue SpectatorCycleIndexField() { return { this, "AShooterPlayerController.SpectatorCycleIndex" }; } + FieldValue bPossessedAnyPawnField() { return { this, "AShooterPlayerController.bPossessedAnyPawn" }; } + FieldValue bIsFastTravellingField() { return { this, "AShooterPlayerController.bIsFastTravelling" }; } + FieldValue bSuppressAdminIconField() { return { this, "AShooterPlayerController.bSuppressAdminIcon" }; } + FieldValue WaitingForSpawnUITimeField() { return { this, "AShooterPlayerController.WaitingForSpawnUITime" }; } + FieldValue ChatSpamWeightField() { return { this, "AShooterPlayerController.ChatSpamWeight" }; } + FieldValue bChatSpammedField() { return { this, "AShooterPlayerController.bChatSpammed" }; } + FieldValue EnteredSpectatingStateTimeField() { return { this, "AShooterPlayerController.EnteredSpectatingStateTime" }; } + FieldValue bPreventPaintingStreamingField() { return { this, "AShooterPlayerController.bPreventPaintingStreaming" }; } + FieldValue LastUsePressTimeField() { return { this, "AShooterPlayerController.LastUsePressTime" }; } + FieldValue> PlayerAppIDsField() { return { this, "AShooterPlayerController.PlayerAppIDs" }; } + FieldValue> NotifiedTribeWarIDsField() { return { this, "AShooterPlayerController.NotifiedTribeWarIDs" }; } + FieldValue> NotifiedTribeWarNamesField() { return { this, "AShooterPlayerController.NotifiedTribeWarNames" }; } + FieldValue ServerTribeLogLastLogIndexField() { return { this, "AShooterPlayerController.ServerTribeLogLastLogIndex" }; } + FieldValue ServerTribeLogLastTribeIDField() { return { this, "AShooterPlayerController.ServerTribeLogLastTribeID" }; } + FieldValue LastViewLocationField() { return { this, "AShooterPlayerController.LastViewLocation" }; } + FieldValue bHasGottenInitialSpawnLocationField() { return { this, "AShooterPlayerController.bHasGottenInitialSpawnLocation" }; } + FieldValue bClientReceivedTribeLogField() { return { this, "AShooterPlayerController.bClientReceivedTribeLog" }; } + FieldValue> CurrentTribeLogField() { return { this, "AShooterPlayerController.CurrentTribeLog" }; } + FieldValue LastTribeLogRequestTimeField() { return { this, "AShooterPlayerController.LastTribeLogRequestTime" }; } + FieldValue bHasSurvivedOneDayField() { return { this, "AShooterPlayerController.bHasSurvivedOneDay" }; } + FieldValue bHasReachedHighestPeakField() { return { this, "AShooterPlayerController.bHasReachedHighestPeak" }; } + FieldValue bHasReachedLowestDepthField() { return { this, "AShooterPlayerController.bHasReachedLowestDepth" }; } + FieldValue, FDefaultSetAllocator>> ServerCachedAchievementIDsField() { return { this, "AShooterPlayerController.ServerCachedAchievementIDs" }; } + FieldValue bZoomingOutField() { return { this, "AShooterPlayerController.bZoomingOut" }; } + FieldValue bZoomingInField() { return { this, "AShooterPlayerController.bZoomingIn" }; } + FieldValue LastRPCStayAliveTimeField() { return { this, "AShooterPlayerController.LastRPCStayAliveTime" }; } + FieldValue PlayerBadgeGroupField() { return { this, "AShooterPlayerController.PlayerBadgeGroup" }; } + FieldValue LastMultiUseTraceTimeField() { return { this, "AShooterPlayerController.LastMultiUseTraceTime" }; } + FieldValue LastLargeMoveLocationField() { return { this, "AShooterPlayerController.LastLargeMoveLocation" }; } + FieldValue LastLargeMoveTimeField() { return { this, "AShooterPlayerController.LastLargeMoveTime" }; } + FieldValue LastNotOnUnriddenDinoTimeField() { return { this, "AShooterPlayerController.LastNotOnUnriddenDinoTime" }; } + FieldValue LastHitMarkerCharacterTimeField() { return { this, "AShooterPlayerController.LastHitMarkerCharacterTime" }; } + FieldValue bLastHitMarkerCharacterAllyField() { return { this, "AShooterPlayerController.bLastHitMarkerCharacterAlly" }; } + FieldValue LastHitMarkerStructureTimeField() { return { this, "AShooterPlayerController.LastHitMarkerStructureTime" }; } + FieldValue bLastHitMarkerStructureAllyField() { return { this, "AShooterPlayerController.bLastHitMarkerStructureAlly" }; } + FieldValue DoFSettingCurrentTimerField() { return { this, "AShooterPlayerController.DoFSettingCurrentTimer" }; } + FieldValue DoFSettingTargetTimerField() { return { this, "AShooterPlayerController.DoFSettingTargetTimer" }; } + FieldValue LastSpawnPointIDField() { return { this, "AShooterPlayerController.LastSpawnPointID" }; } + FieldValue LastSpawnRegionIndexField() { return { this, "AShooterPlayerController.LastSpawnRegionIndex" }; } + FieldValue LastTransferredPlayerIDField() { return { this, "AShooterPlayerController.LastTransferredPlayerID" }; } + FieldValue bReceivedSubscribedAppsField() { return { this, "AShooterPlayerController.bReceivedSubscribedApps" }; } + FieldValue bIsTransferringCharacterField() { return { this, "AShooterPlayerController.bIsTransferringCharacter" }; } + FieldValue PossessedFirstPawnTimeField() { return { this, "AShooterPlayerController.PossessedFirstPawnTime" }; } + FieldValue SnapPointCycleField() { return { this, "AShooterPlayerController.SnapPointCycle" }; } + FieldValue LastSnapPointCyclePositionField() { return { this, "AShooterPlayerController.LastSnapPointCyclePosition" }; } + FieldValue ViewingWheelCategoryField() { return { this, "AShooterPlayerController.ViewingWheelCategory" }; } + FieldValue ForceDrawCurrentGroupsUntilTimeField() { return { this, "AShooterPlayerController.ForceDrawCurrentGroupsUntilTime" }; } + FieldValue LastRequestedPlaceStructureTimeField() { return { this, "AShooterPlayerController.LastRequestedPlaceStructureTime" }; } + FieldValue PersonalDinoTameCountField() { return { this, "AShooterPlayerController.PersonalDinoTameCount" }; } + FieldValue bNextShowCharacterCreationUIDownloadField() { return { this, "AShooterPlayerController.bNextShowCharacterCreationUIDownload" }; } + FieldValue bForceHideGameplayUIField() { return { this, "AShooterPlayerController.bForceHideGameplayUI" }; } + FieldValue LastGamepadOpenRemoteInventoryTimeField() { return { this, "AShooterPlayerController.LastGamepadOpenRemoteInventoryTime" }; } + FieldValue bIsGamepadActiveField() { return { this, "AShooterPlayerController.bIsGamepadActive" }; } + FieldValue bClientIsDPCField() { return { this, "AShooterPlayerController.bClientIsDPC" }; } + FieldValue LastClientRequestTribeOnlineListTimeField() { return { this, "AShooterPlayerController.LastClientRequestTribeOnlineListTime" }; } + FieldValue LastClientModifiedARKInventoryTimeField() { return { this, "AShooterPlayerController.LastClientModifiedARKInventoryTime" }; } + FieldValue> ClientCachedTribeOnlineListField() { return { this, "AShooterPlayerController.ClientCachedTribeOnlineList" }; } + FieldValue bPreventDefaultCharacterItemsField() { return { this, "AShooterPlayerController.bPreventDefaultCharacterItems" }; } + FieldValue SFXVolumeMultiplierField() { return { this, "AShooterPlayerController.SFXVolumeMultiplier" }; } + FieldValue LastTeleportedTimeField() { return { this, "AShooterPlayerController.LastTeleportedTime" }; } + FieldValue LastConvertedPlayerIDField() { return { this, "AShooterPlayerController.LastConvertedPlayerID" }; } + FieldValue LastConvertedPlayerIDStringField() { return { this, "AShooterPlayerController.LastConvertedPlayerIDString" }; } + FieldValue LastShowExtendedInfoTimeField() { return { this, "AShooterPlayerController.LastShowExtendedInfoTime" }; } + FieldValue bHasDisplayedSplitScreenMessageField() { return { this, "AShooterPlayerController.bHasDisplayedSplitScreenMessage" }; } + FieldValue LastTransferredToRemoteInventoryItemField() { return { this, "AShooterPlayerController.LastTransferredToRemoteInventoryItem" }; } + FieldValue, DefaultKeyFuncs, 0>, FDefaultSetAllocator>> PendingResponseEquippedItemsQueueField() { return { this, "AShooterPlayerController.PendingResponseEquippedItemsQueue" }; } + FieldValue, DefaultKeyFuncs, 0>, FDefaultSetAllocator>> PendingRequestEquippedItemsQueueField() { return { this, "AShooterPlayerController.PendingRequestEquippedItemsQueue" }; } + FieldValue bIsViewingTributeInventoryField() { return { this, "AShooterPlayerController.bIsViewingTributeInventory" }; } + FieldValue bDrawBlackBackgroundField() { return { this, "AShooterPlayerController.bDrawBlackBackground" }; } + + // Functions + + void EnableCheats(FString Pass) { NativeCall(this, "AShooterPlayerController.EnableCheats", Pass); } + void CheckCheatsPassword_Implementation(FString * Pass) { NativeCall(this, "AShooterPlayerController.CheckCheatsPassword_Implementation", Pass); } + void CheckRequestSpectator_Implementation(FString * InSpectatorPass) { NativeCall(this, "AShooterPlayerController.CheckRequestSpectator_Implementation", InSpectatorPass); } + void ServerStopSpectating_Implementation() { NativeCall(this, "AShooterPlayerController.ServerStopSpectating_Implementation"); } + TArray * GetCheatsCommands(TArray * result) { return NativeCall *, TArray *>(this, "AShooterPlayerController.GetCheatsCommands", result); } + void SetupInputComponent() { NativeCall(this, "AShooterPlayerController.SetupInputComponent"); } + void OnLevelView() { NativeCall(this, "AShooterPlayerController.OnLevelView"); } + void LevelView() { NativeCall(this, "AShooterPlayerController.LevelView"); } + void SpectatorDetachOrbitCamera() { NativeCall(this, "AShooterPlayerController.SpectatorDetachOrbitCamera"); } + void SpectatorPreviousPlayer() { NativeCall(this, "AShooterPlayerController.SpectatorPreviousPlayer"); } + void SpectatorNextPlayer() { NativeCall(this, "AShooterPlayerController.SpectatorNextPlayer"); } + void DelayedTeamSpectatorSetup() { NativeCall(this, "AShooterPlayerController.DelayedTeamSpectatorSetup"); } + void ServerCycleSpectator_Implementation(bool bNext) { NativeCall(this, "AShooterPlayerController.ServerCycleSpectator_Implementation", bNext); } + void ServerSpectateToPlayerByID_Implementation(unsigned __int64 PlayerID) { NativeCall(this, "AShooterPlayerController.ServerSpectateToPlayerByID_Implementation", PlayerID); } + void ClientTeleportSpectator_Implementation(FVector Location, unsigned __int64 PlayerID) { NativeCall(this, "AShooterPlayerController.ClientTeleportSpectator_Implementation", Location, PlayerID); } + void ForceCraftPressed() { NativeCall(this, "AShooterPlayerController.ForceCraftPressed"); } + void ForceCraftReleased() { NativeCall(this, "AShooterPlayerController.ForceCraftReleased"); } + void StopTalkingWrapper() { NativeCall(this, "AShooterPlayerController.StopTalkingWrapper"); } + void ToggleHUDHidden() { NativeCall(this, "AShooterPlayerController.ToggleHUDHidden"); } + void OnUseItemSlotForStructure(int ItemSlotNumber) { NativeCall(this, "AShooterPlayerController.OnUseItemSlotForStructure", ItemSlotNumber); } + void OnUsePress(bool bFromGamepad) { NativeCall(this, "AShooterPlayerController.OnUsePress", bFromGamepad); } + bool GetAllAimedHarvestActors(float MaxDistance, TArray * OutHarvestActors, TArray * OutHarvestComponents, TArray * OutHitBodyIndices) { return NativeCall *, TArray *, TArray *>(this, "AShooterPlayerController.GetAllAimedHarvestActors", MaxDistance, OutHarvestActors, OutHarvestComponents, OutHitBodyIndices); } + AActor * GetAimedUseActor(UActorComponent ** UseComponent, int * hitBodyIndex) { return NativeCall(this, "AShooterPlayerController.GetAimedUseActor", UseComponent, hitBodyIndex); } + void OnUseRelease(bool bFromGamepad) { NativeCall(this, "AShooterPlayerController.OnUseRelease", bFromGamepad); } + void ActivateMultiUseSelection(bool bIsFromUseRelease) { NativeCall(this, "AShooterPlayerController.ActivateMultiUseSelection", bIsFromUseRelease); } + void CancelMultiUseSelection() { NativeCall(this, "AShooterPlayerController.CancelMultiUseSelection"); } + void OnKeyboardUsePress() { NativeCall(this, "AShooterPlayerController.OnKeyboardUsePress"); } + void OnKeyboardUseRelease() { NativeCall(this, "AShooterPlayerController.OnKeyboardUseRelease"); } + void OnGamepadUsePress() { NativeCall(this, "AShooterPlayerController.OnGamepadUsePress"); } + void OnGamepadUseRelease() { NativeCall(this, "AShooterPlayerController.OnGamepadUseRelease"); } + void OnRepeatUseHeldTimer() { NativeCall(this, "AShooterPlayerController.OnRepeatUseHeldTimer"); } + void OnUseHeldTimer() { NativeCall(this, "AShooterPlayerController.OnUseHeldTimer"); } + void SetMultiUseWheelCategory(int Category) { NativeCall(this, "AShooterPlayerController.SetMultiUseWheelCategory", Category); } + void StartInventoryRadialSelector() { NativeCall(this, "AShooterPlayerController.StartInventoryRadialSelector"); } + void EndInventoryRadialSelector() { NativeCall(this, "AShooterPlayerController.EndInventoryRadialSelector"); } + void StartPlayerActionRadialSelector() { NativeCall(this, "AShooterPlayerController.StartPlayerActionRadialSelector"); } + void EndPlayerActionRadialSelector() { NativeCall(this, "AShooterPlayerController.EndPlayerActionRadialSelector"); } + void OnEmoteKey2Press() { NativeCall(this, "AShooterPlayerController.OnEmoteKey2Press"); } + void OnEmoteKey1Release() { NativeCall(this, "AShooterPlayerController.OnEmoteKey1Release"); } + void SaveSpectatorPos(int Index) { NativeCall(this, "AShooterPlayerController.SaveSpectatorPos", Index); } + void LoadSpectatorPos(int Index) { NativeCall(this, "AShooterPlayerController.LoadSpectatorPos", Index); } + void OnEmoteKey2Release() { NativeCall(this, "AShooterPlayerController.OnEmoteKey2Release"); } + void StartEmoteSelection() { NativeCall(this, "AShooterPlayerController.StartEmoteSelection"); } + void OnWhistlePress() { NativeCall(this, "AShooterPlayerController.OnWhistlePress"); } + void StartWhistleSelection() { NativeCall(this, "AShooterPlayerController.StartWhistleSelection"); } + void EndWhistleSelection() { NativeCall(this, "AShooterPlayerController.EndWhistleSelection"); } + void EndEmoteSelection() { NativeCall(this, "AShooterPlayerController.EndEmoteSelection"); } + void TriggerPlayerAction(int ActionIndex) { NativeCall(this, "AShooterPlayerController.TriggerPlayerAction", ActionIndex); } + void ShowMyInventory() { NativeCall(this, "AShooterPlayerController.ShowMyInventory"); } + void ShowMyCraftables() { NativeCall(this, "AShooterPlayerController.ShowMyCraftables"); } + void ShowTribeManager() { NativeCall(this, "AShooterPlayerController.ShowTribeManager"); } + void ShowGlobalChat() { NativeCall(this, "AShooterPlayerController.ShowGlobalChat"); } + void ShowTribeChat() { NativeCall(this, "AShooterPlayerController.ShowTribeChat"); } + void ShowAllianceChat() { NativeCall(this, "AShooterPlayerController.ShowAllianceChat"); } + void ShowLocalChat() { NativeCall(this, "AShooterPlayerController.ShowLocalChat"); } + void ShowTutorial(int TutorialIndex, bool bForceDisplay) { NativeCall(this, "AShooterPlayerController.ShowTutorial", TutorialIndex, bForceDisplay); } + void ClearTutorials() { NativeCall(this, "AShooterPlayerController.ClearTutorials"); } + void ToggleAutoChat() { NativeCall(this, "AShooterPlayerController.ToggleAutoChat"); } + void ScrollChatDown() { NativeCall(this, "AShooterPlayerController.ScrollChatDown"); } + void ScrollChatUp() { NativeCall(this, "AShooterPlayerController.ScrollChatUp"); } + void ToggleMap() { NativeCall(this, "AShooterPlayerController.ToggleMap"); } + void OpenMapMarkers() { NativeCall(this, "AShooterPlayerController.OpenMapMarkers"); } + void ShowAllPlayersListToFollow() { NativeCall(this, "AShooterPlayerController.ShowAllPlayersListToFollow"); } + void ToggleShowAllPlayersWhenSpectatingLocal() { NativeCall(this, "AShooterPlayerController.ToggleShowAllPlayersWhenSpectatingLocal"); } + void ToggleDinoNameTags() { NativeCall(this, "AShooterPlayerController.ToggleDinoNameTags"); } + void ToggleShowAllPlayersWhenSpectating() { NativeCall(this, "AShooterPlayerController.ToggleShowAllPlayersWhenSpectating"); } + void ToggleWeaponAccessory() { NativeCall(this, "AShooterPlayerController.ToggleWeaponAccessory"); } + void BeginPlay() { NativeCall(this, "AShooterPlayerController.BeginPlay"); } + void SaveProfile() { NativeCall(this, "AShooterPlayerController.SaveProfile"); } + void ClientNotifyPaintFinished_Implementation(bool bSuccess) { NativeCall(this, "AShooterPlayerController.ClientNotifyPaintFinished_Implementation", bSuccess); } + bool IsValidUnStasisCaster() { return NativeCall(this, "AShooterPlayerController.IsValidUnStasisCaster"); } + void ServerSetSpectatorLocation_Implementation(FVector NewLoc) { NativeCall(this, "AShooterPlayerController.ServerSetSpectatorLocation_Implementation", NewLoc); } + static void TickStasisForCharacter(UWorld * theWorld, AShooterCharacter * Character, FVector ActorLocation) { NativeCall(nullptr, "AShooterPlayerController.TickStasisForCharacter", theWorld, Character, ActorLocation); } + void SetPlayer(UPlayer * InPlayer) { NativeCall(this, "AShooterPlayerController.SetPlayer", InPlayer); } + void UnFreeze() { NativeCall(this, "AShooterPlayerController.UnFreeze"); } + void ServerCheckUnfreeze_Implementation() { NativeCall(this, "AShooterPlayerController.ServerCheckUnfreeze_Implementation"); } + void DoServerCheckUnfreeze_Implementation() { NativeCall(this, "AShooterPlayerController.DoServerCheckUnfreeze_Implementation"); } + void FailedToSpawnPawn() { NativeCall(this, "AShooterPlayerController.FailedToSpawnPawn"); } + void EnableSpectator() { NativeCall(this, "AShooterPlayerController.EnableSpectator"); } + void DisableSpectator() { NativeCall(this, "AShooterPlayerController.DisableSpectator"); } + void OnDisableSpectator_Implementation() { NativeCall(this, "AShooterPlayerController.OnDisableSpectator_Implementation"); } + void ServerSaveWorld_Implementation() { NativeCall(this, "AShooterPlayerController.ServerSaveWorld_Implementation"); } + void ServerLoadWorld_Implementation() { NativeCall(this, "AShooterPlayerController.ServerLoadWorld_Implementation"); } + void CheckforOrbiting() { NativeCall(this, "AShooterPlayerController.CheckforOrbiting"); } + bool CheckforOrbitingInstantaneously() { return NativeCall(this, "AShooterPlayerController.CheckforOrbitingInstantaneously"); } + void OnToggleInGameMenu() { NativeCall(this, "AShooterPlayerController.OnToggleInGameMenu"); } + void OnToggleDoFMenu() { NativeCall(this, "AShooterPlayerController.OnToggleDoFMenu"); } + void MoveForward(float Val) { NativeCall(this, "AShooterPlayerController.MoveForward", Val); } + void MoveRight(float Val) { NativeCall(this, "AShooterPlayerController.MoveRight", Val); } + void TurnAtRate(float Val) { NativeCall(this, "AShooterPlayerController.TurnAtRate", Val); } + void LookUpAtRate(float Val) { NativeCall(this, "AShooterPlayerController.LookUpAtRate", Val); } + void SpectatorTurn(float Val) { NativeCall(this, "AShooterPlayerController.SpectatorTurn", Val); } + void TurnInput(float Val) { NativeCall(this, "AShooterPlayerController.TurnInput", Val); } + void LookInput(float Val) { NativeCall(this, "AShooterPlayerController.LookInput", Val); } + void OnStartFire() { NativeCall(this, "AShooterPlayerController.OnStartFire"); } + void OnStopFire() { NativeCall(this, "AShooterPlayerController.OnStopFire"); } + void OnStartGamepadRightFire() { NativeCall(this, "AShooterPlayerController.OnStartGamepadRightFire"); } + void OnStopGamepadRightFire() { NativeCall(this, "AShooterPlayerController.OnStopGamepadRightFire"); } + void ShowBattleGameModeHUD() { NativeCall(this, "AShooterPlayerController.ShowBattleGameModeHUD"); } + void OnStartTargeting() { NativeCall(this, "AShooterPlayerController.OnStartTargeting"); } + void OnStopTargeting() { NativeCall(this, "AShooterPlayerController.OnStopTargeting"); } + void OnStartGamepadLeftFire() { NativeCall(this, "AShooterPlayerController.OnStartGamepadLeftFire"); } + void OnStopGamepadLeftFire() { NativeCall(this, "AShooterPlayerController.OnStopGamepadLeftFire"); } + void ServerRequestPlaceStructure_Implementation(int StructureIndex, FVector BuildLocation, FRotator BuildRotation, FRotator PlayerViewRotation, APawn * AttachToPawn, APrimalDinoCharacter * DinoCharacter, FName BoneName, FItemNetID PlaceUsingItemID, bool bSnapped, bool bIsCheat, bool bIsFlipped, int SnapPointCycle) { NativeCall(this, "AShooterPlayerController.ServerRequestPlaceStructure_Implementation", StructureIndex, BuildLocation, BuildRotation, PlayerViewRotation, AttachToPawn, DinoCharacter, BoneName, PlaceUsingItemID, bSnapped, bIsCheat, bIsFlipped, SnapPointCycle); } + void SetCinematicMode(bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning) { NativeCall(this, "AShooterPlayerController.SetCinematicMode", bInCinematicMode, bHidePlayer, bAffectsHUD, bAffectsMovement, bAffectsTurning); } + void PawnLeavingGame() { NativeCall(this, "AShooterPlayerController.PawnLeavingGame"); } + void InitInputSystem() { NativeCall(this, "AShooterPlayerController.InitInputSystem"); } + void FlushPressedKeys() { NativeCall(this, "AShooterPlayerController.FlushPressedKeys"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AShooterPlayerController.GetLifetimeReplicatedProps", OutLifetimeProps); } + void EnemyInVisible(bool Invisible) { NativeCall(this, "AShooterPlayerController.EnemyInVisible", Invisible); } + void ServerSuicide_Implementation() { NativeCall(this, "AShooterPlayerController.ServerSuicide_Implementation"); } + void ServerRemovePassenger_Implementation() { NativeCall(this, "AShooterPlayerController.ServerRemovePassenger_Implementation"); } + void ClientTeamMessage_Implementation(APlayerState * SenderPlayerState, FString * S, FName Type, float MsgLifeTime) { NativeCall(this, "AShooterPlayerController.ClientTeamMessage_Implementation", SenderPlayerState, S, Type, MsgLifeTime); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "AShooterPlayerController.DrawHUD", HUD); } + void SetControlRotation(FRotator * NewRotation) { NativeCall(this, "AShooterPlayerController.SetControlRotation", NewRotation); } + void AcknowledgePossession(APawn * P) { NativeCall(this, "AShooterPlayerController.AcknowledgePossession", P); } + void LeaveMeAlone() { NativeCall(this, "AShooterPlayerController.LeaveMeAlone"); } + void InfiniteStats() { NativeCall(this, "AShooterPlayerController.InfiniteStats"); } + void Destroyed() { NativeCall(this, "AShooterPlayerController.Destroyed"); } + void PostInitializeComponents() { NativeCall(this, "AShooterPlayerController.PostInitializeComponents"); } + void ServerGetMessageOfTheDay_Implementation() { NativeCall(this, "AShooterPlayerController.ServerGetMessageOfTheDay_Implementation"); } + void ClientGetMessageOfTheDay_Implementation(FString * Message) { NativeCall(this, "AShooterPlayerController.ClientGetMessageOfTheDay_Implementation", Message); } + void ServerReadMessageOFTheDay_Implementation() { NativeCall(this, "AShooterPlayerController.ServerReadMessageOFTheDay_Implementation"); } + void ClientStartReceivingActorItems_Implementation(UPrimalInventoryComponent * forInventory, bool bEquippedItems) { NativeCall(this, "AShooterPlayerController.ClientStartReceivingActorItems_Implementation", forInventory, bEquippedItems); } + void ClientFinishedReceivingActorItems_Implementation(UPrimalInventoryComponent * forInventory, bool bEquippedItems) { NativeCall(this, "AShooterPlayerController.ClientFinishedReceivingActorItems_Implementation", forInventory, bEquippedItems); } + void ClientAddActorItem_Implementation(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification) { NativeCall(this, "AShooterPlayerController.ClientAddActorItem_Implementation", forInventory, itemInfo, bEquipItem, ShowHUDNotification); } + void ClientAddActorItemToFolder_Implementation(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification, FString * ToFolder) { NativeCall(this, "AShooterPlayerController.ClientAddActorItemToFolder_Implementation", forInventory, itemInfo, bEquipItem, ShowHUDNotification, ToFolder); } + void ClientAddItemToArk_Implementation(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bFromLoad) { NativeCall(this, "AShooterPlayerController.ClientAddItemToArk_Implementation", forInventory, itemInfo, bFromLoad); } + void ClientAddFolderToInventoryComponent_Implementation(UPrimalInventoryComponent * forInventory, FString * NewCustomFolderName, int InventoryCompType) { NativeCall(this, "AShooterPlayerController.ClientAddFolderToInventoryComponent_Implementation", forInventory, NewCustomFolderName, InventoryCompType); } + void ClientLoadArkItems_Implementation(UPrimalInventoryComponent * forInventory, TArray * itemInfos) { NativeCall *>(this, "AShooterPlayerController.ClientLoadArkItems_Implementation", forInventory, itemInfos); } + void ClientFinishedLoadArkItems_Implementation(UPrimalInventoryComponent * forInventory) { NativeCall(this, "AShooterPlayerController.ClientFinishedLoadArkItems_Implementation", forInventory); } + void ClientInsertActorItem_Implementation(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, FItemNetID InsertAfterItemID) { NativeCall(this, "AShooterPlayerController.ClientInsertActorItem_Implementation", forInventory, itemInfo, InsertAfterItemID); } + void ClientRemoveActorItem_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID, bool showHUDMessage) { NativeCall(this, "AShooterPlayerController.ClientRemoveActorItem_Implementation", forInventory, itemID, showHUDMessage); } + void ClientSwapActorItems_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID1, FItemNetID itemID2) { NativeCall(this, "AShooterPlayerController.ClientSwapActorItems_Implementation", forInventory, itemID1, itemID2); } + void ClientUpdateInventoryCraftQueue_Implementation(UPrimalInventoryComponent * forInventory, TArray * CraftQueueEntries) { NativeCall *>(this, "AShooterPlayerController.ClientUpdateInventoryCraftQueue_Implementation", forInventory, CraftQueueEntries); } + void ServerRequestActorItems_Implementation(UPrimalInventoryComponent * forInventory, bool bInventoryItems, bool bIsFirstSpawn) { NativeCall(this, "AShooterPlayerController.ServerRequestActorItems_Implementation", forInventory, bInventoryItems, bIsFirstSpawn); } + void ServerRemovePawnItem_Implementation(FItemNetID itemID, bool bSecondryAction) { NativeCall(this, "AShooterPlayerController.ServerRemovePawnItem_Implementation", itemID, bSecondryAction); } + void ServerEquipPawnItem_Implementation(FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerEquipPawnItem_Implementation", itemID); } + void ServerDeleteCustomFolder_Implementation(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType) { NativeCall(this, "AShooterPlayerController.ServerDeleteCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType); } + void ServerAddItemToCustomFolder_Implementation(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "AShooterPlayerController.ServerAddItemToCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType, ItemId); } + void ServerDeleteItemFromCustomFolder_Implementation(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "AShooterPlayerController.ServerDeleteItemFromCustomFolder_Implementation", forInventory, CFolderName, InventoryCompType, ItemId); } + void ServerCraftItem_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerCraftItem_Implementation", inventoryComp, itemID); } + void ServerRepairItem_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRepairItem_Implementation", inventoryComp, itemID); } + void ServerRequestInventorySwapItems_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, FItemNetID itemID2) { NativeCall(this, "AShooterPlayerController.ServerRequestInventorySwapItems_Implementation", inventoryComp, itemID1, itemID2); } + void ServerRequestInventoryUseItemWithItem_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, FItemNetID itemID2, int AdditionalData) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItemWithItem_Implementation", inventoryComp, itemID1, itemID2, AdditionalData); } + void ServerRequestInventoryUseItemWithActor_Implementation(AActor * anActor, UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, int AdditionalData) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItemWithActor_Implementation", anActor, inventoryComp, itemID1, AdditionalData); } + void ServerRequestInventoryUseItem_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItem_Implementation", inventoryComp, itemID); } + void ServerActorViewRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerActorViewRemoteInventory_Implementation", inventoryComp); } + void ServerActorCloseRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerActorCloseRemoteInventory_Implementation", inventoryComp); } + void ServerDropFromRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerDropFromRemoteInventory_Implementation", inventoryComp, itemID); } + void ServerInventoryClearCraftQueue_Implementation(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerInventoryClearCraftQueue_Implementation", inventoryComp); } + void ServerRequestRemoveItemSkin_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoveItemSkin_Implementation", inventoryComp, itemID); } + void ServerRequestRemoveItemSkinOnly_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoveItemSkinOnly_Implementation", inventoryComp, itemID); } + void ServerRequestRemoveWeaponAccessoryOnly_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoveWeaponAccessoryOnly_Implementation", inventoryComp, itemID); } + void ServerRequestRemoveWeaponClipAmmo_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoveWeaponClipAmmo_Implementation", inventoryComp, itemID); } + void ServerEquipToRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerEquipToRemoteInventory_Implementation", inventoryComp, itemID); } + void ServerTransferFromRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, int requestedQuantity, int ToSlotIndex, bool bEquipItem) { NativeCall(this, "AShooterPlayerController.ServerTransferFromRemoteInventory_Implementation", inventoryComp, itemID, requestedQuantity, ToSlotIndex, bEquipItem); } + void ServerTransferAllFromRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FString * CurrentCustomFolderFilter, FString * CurrentNameFilter, FString * CurrentDestinationFolder, bool bNoFolderView) { NativeCall(this, "AShooterPlayerController.ServerTransferAllFromRemoteInventory_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder, bNoFolderView); } + void ServerTransferAllToRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FString * CurrentCustomFolderFilter, FString * CurrentNameFilter, FString * CurrentDestinationFolder, bool bNoFolderView) { NativeCall(this, "AShooterPlayerController.ServerTransferAllToRemoteInventory_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder, bNoFolderView); } + void ServerTransferToRemoteInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, bool bAlsoTryToEqup, int requestedQuantity) { NativeCall(this, "AShooterPlayerController.ServerTransferToRemoteInventory_Implementation", inventoryComp, itemID, bAlsoTryToEqup, requestedQuantity); } + void ClientFailedToAddItemFromArkInventory_Implementation() { NativeCall(this, "AShooterPlayerController.ClientFailedToAddItemFromArkInventory_Implementation"); } + void ServerAddItemFromArkInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, int requestedQuantity) { NativeCall(this, "AShooterPlayerController.ServerAddItemFromArkInventory_Implementation", inventoryComp, itemID, requestedQuantity); } + void OnRefreshSteamInventoryFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall(this, "AShooterPlayerController.OnRefreshSteamInventoryFinished", bSuccess, SteamID); } + void ServerTakeItemFromArkInventoryAfterRefresh() { NativeCall(this, "AShooterPlayerController.ServerTakeItemFromArkInventoryAfterRefresh"); } + void ClientRemoveItemFromArk_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID RemovedItemID) { NativeCall(this, "AShooterPlayerController.ClientRemoveItemFromArk_Implementation", forInventory, RemovedItemID); } + void UploadCharaterDataToArk(UPrimalInventoryComponent * InvComp) { NativeCall(this, "AShooterPlayerController.UploadCharaterDataToArk", InvComp); } + void ServerRequestCreateNewPlayerWithArkData(TArray * PlayerArkDataBytes, unsigned __int64 TribeID) { NativeCall *, unsigned __int64>(this, "AShooterPlayerController.ServerRequestCreateNewPlayerWithArkData", PlayerArkDataBytes, TribeID); } + void ServerUploadCurrentCharacterAndItems_Implementation(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerUploadCurrentCharacterAndItems_Implementation", inventoryComp); } + void ClientOnCurrentCharacterAndItemsUploaded_Implementation(unsigned __int64 TransferringPlayerDataId) { NativeCall(this, "AShooterPlayerController.ClientOnCurrentCharacterAndItemsUploaded_Implementation", TransferringPlayerDataId); } + void OnCurrentCharacterAndItemsUploaded(bool Success) { NativeCall(this, "AShooterPlayerController.OnCurrentCharacterAndItemsUploaded", Success); } + void ServerUploadCharaterDataToArk_Implementation(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerUploadCharaterDataToArk_Implementation", inventoryComp); } + void UploadCharacterPlayerDataToArk(TArray * PlayerDataBytes, FString PlayerName, TArray PlayerStats, unsigned __int64 PlayerDataId, bool WithItems, unsigned int ItemCount) { NativeCall *, FString, TArray, unsigned __int64, bool, unsigned int>(this, "AShooterPlayerController.UploadCharacterPlayerDataToArk", PlayerDataBytes, PlayerName, PlayerStats, PlayerDataId, WithItems, ItemCount); } + void RemoveInvetoryItem(unsigned int ItemID) { NativeCall(this, "AShooterPlayerController.RemoveInvetoryItem", ItemID); } + bool IsHudVisible() { return NativeCall(this, "AShooterPlayerController.IsHudVisible"); } + AShooterCharacter * GetPlayerCharacter() { return NativeCall(this, "AShooterPlayerController.GetPlayerCharacter"); } + void SetPawn(APawn * InPawn) { NativeCall(this, "AShooterPlayerController.SetPawn", InPawn); } + void ServerRepeatMultiUse_Implementation(UObject * ForObject, int useIndex) { NativeCall(this, "AShooterPlayerController.ServerRepeatMultiUse_Implementation", ForObject, useIndex); } + void ServerMultiUse_Implementation(UObject * ForObject, int useIndex) { NativeCall(this, "AShooterPlayerController.ServerMultiUse_Implementation", ForObject, useIndex); } + void ClientDoMultiUse_Implementation(UObject * ForObject, int useIndex) { NativeCall(this, "AShooterPlayerController.ClientDoMultiUse_Implementation", ForObject, useIndex); } + void ClientUpdateItemQuantity_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID, int ItemQuantity) { NativeCall(this, "AShooterPlayerController.ClientUpdateItemQuantity_Implementation", forInventory, itemID, ItemQuantity); } + void ClientUpdateItemDurability_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID, float ItemDurability) { NativeCall(this, "AShooterPlayerController.ClientUpdateItemDurability_Implementation", forInventory, itemID, ItemDurability); } + void ClientUpdateItemWeaponClipAmmo_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID, int Ammo) { NativeCall(this, "AShooterPlayerController.ClientUpdateItemWeaponClipAmmo_Implementation", forInventory, itemID, Ammo); } + void ClientUsedActorItem_Implementation(UPrimalInventoryComponent * forInventory, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ClientUsedActorItem_Implementation", forInventory, itemID); } + void UnPossess() { NativeCall(this, "AShooterPlayerController.UnPossess"); } + void Possess(APawn * inPawn) { NativeCall(this, "AShooterPlayerController.Possess", inPawn); } + void UpdateRotation(float DeltaTime) { NativeCall(this, "AShooterPlayerController.UpdateRotation", DeltaTime); } + bool CanDoPlayerCharacterInput(bool bIgnoreCurrentWeapon, bool bWeaponForcesMountedWeaponry) { return NativeCall(this, "AShooterPlayerController.CanDoPlayerCharacterInput", bIgnoreCurrentWeapon, bWeaponForcesMountedWeaponry); } + AActor * GetPlayerControllerViewerOverride() { return NativeCall(this, "AShooterPlayerController.GetPlayerControllerViewerOverride"); } + void ForceTame(bool bCheatTame) { NativeCall(this, "AShooterPlayerController.ForceTame", bCheatTame); } + void SetImprintQuality(float ImprintingQuality) { NativeCall(this, "AShooterPlayerController.SetImprintQuality", ImprintingQuality); } + void GiveToMe() { NativeCall(this, "AShooterPlayerController.GiveToMe"); } + void GiveActorToMe(AActor * anAct, bool bNotifyNetwork) { NativeCall(this, "AShooterPlayerController.GiveActorToMe", anAct, bNotifyNetwork); } + void ServerRequestLevelUp_Implementation(UPrimalCharacterStatusComponent * forStatusComp, EPrimalCharacterStatusValue::Type ValueType) { NativeCall(this, "AShooterPlayerController.ServerRequestLevelUp_Implementation", forStatusComp, ValueType); } + void AddExperience(float HowMuch, bool fromTribeShare, bool bPreventSharingWithTribe) { NativeCall(this, "AShooterPlayerController.AddExperience", HowMuch, fromTribeShare, bPreventSharingWithTribe); } + void ServerRequestSetPin_Implementation(UObject * forTarget, int PinValue, bool bIsSetting, int TheCustomIndex) { NativeCall(this, "AShooterPlayerController.ServerRequestSetPin_Implementation", forTarget, PinValue, bIsSetting, TheCustomIndex); } + void ClientNotifyTribeXP_Implementation(float HowMuch) { NativeCall(this, "AShooterPlayerController.ClientNotifyTribeXP_Implementation", HowMuch); } + void ClientHUDNotificationTypeParams_Implementation(int MessageType, int MessageParam1, int MessageParam2, UObject * ObjectParam1) { NativeCall(this, "AShooterPlayerController.ClientHUDNotificationTypeParams_Implementation", MessageType, MessageParam1, MessageParam2, ObjectParam1); } + void ServerRequestRespawnAtPoint_Implementation(int spawnPointID, int spawnRegionIndex) { NativeCall(this, "AShooterPlayerController.ServerRequestRespawnAtPoint_Implementation", spawnPointID, spawnRegionIndex); } + void ServerRequestFastTravelToPoint_Implementation(int fromSpawnPointID, int spawnPointID) { NativeCall(this, "AShooterPlayerController.ServerRequestFastTravelToPoint_Implementation", fromSpawnPointID, spawnPointID); } + void ServerUploadDino_Implementation(APrimalDinoCharacter * DownloadedDino) { NativeCall(this, "AShooterPlayerController.ServerUploadDino_Implementation", DownloadedDino); } + void ServerRequestRemoteDropAllItems_Implementation(UPrimalInventoryComponent * inventoryComp, FString * CurrentCustomFolderFilter, FString * CurrentNameFilter) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoteDropAllItems_Implementation", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter); } + void ServerRequestDropAllItems_Implementation(FString * CurrentCustomFolderFilter, FString * CurrentNameFilter) { NativeCall(this, "AShooterPlayerController.ServerRequestDropAllItems_Implementation", CurrentCustomFolderFilter, CurrentNameFilter); } + void ClientShowSpawnUI_Implementation(float Delay) { NativeCall(this, "AShooterPlayerController.ClientShowSpawnUI_Implementation", Delay); } + void ClientShowCharacterCreationUI_Implementation(bool bShowDownloadCharacter) { NativeCall(this, "AShooterPlayerController.ClientShowCharacterCreationUI_Implementation", bShowDownloadCharacter); } + AActor * SpawnActor(FString * blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay) { return NativeCall(this, "AShooterPlayerController.SpawnActor", blueprintPath, spawnDistance, spawnYOffset, ZOffset, bDoDeferBeginPlay); } + bool GiveItem(FString * blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { return NativeCall(this, "AShooterPlayerController.GiveItem", blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); } + bool GiveFast(FName * blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { return NativeCall(this, "AShooterPlayerController.GiveFast", blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); } + bool GiveSlotItem(FString * blueprintPath, int slotNum, int quantityOverride) { return NativeCall(this, "AShooterPlayerController.GiveSlotItem", blueprintPath, slotNum, quantityOverride); } + bool GiveSlotItemNum(int masterIndexNum, int slotNum, int quantityOverride) { return NativeCall(this, "AShooterPlayerController.GiveSlotItemNum", masterIndexNum, slotNum, quantityOverride); } + bool GiveItemNum(int masterIndexNum, int quantityOverride, float qualityOverride, bool bForceBlueprint) { return NativeCall(this, "AShooterPlayerController.GiveItemNum", masterIndexNum, quantityOverride, qualityOverride, bForceBlueprint); } + FString * GetUniqueNetIdAsString(FString * result) { return NativeCall(this, "AShooterPlayerController.GetUniqueNetIdAsString", result); } + void ClientOnAddedItemsToAllClustersInventory_Implementation(bool Success, FString * UserId, TArray * MasterIndexNum) { NativeCall *>(this, "AShooterPlayerController.ClientOnAddedItemsToAllClustersInventory_Implementation", Success, UserId, MasterIndexNum); } + void OnAddedItemsToAllClustersInventory(bool Success, FString * UserId, TArray * MasterIndexNum) { NativeCall *>(this, "AShooterPlayerController.OnAddedItemsToAllClustersInventory", Success, UserId, MasterIndexNum); } + bool AddItemToAllClustersInventory(FString UserId, int MasterIndexNum) { return NativeCall(this, "AShooterPlayerController.AddItemToAllClustersInventory", UserId, MasterIndexNum); } + void BeginInactiveState() { NativeCall(this, "AShooterPlayerController.BeginInactiveState"); } + void PawnPendingDestroy(APawn * inPawn) { NativeCall(this, "AShooterPlayerController.PawnPendingDestroy", inPawn); } + void BeginSpectatingState() { NativeCall(this, "AShooterPlayerController.BeginSpectatingState"); } + void SetGraphicsQuality(int val) { NativeCall(this, "AShooterPlayerController.SetGraphicsQuality", val); } + void ResetSpawnTime() { NativeCall(this, "AShooterPlayerController.ResetSpawnTime"); } + void GetPlayerViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "AShooterPlayerController.GetPlayerViewPoint", out_Location, out_Rotation); } + void GetPlayerViewPoint(FVector * out_Location, FRotator * out_Rotation, bool ForAiming) { NativeCall(this, "AShooterPlayerController.GetPlayerViewPoint", out_Location, out_Rotation, ForAiming); } + void GetPlayerViewPointNoModifiers(FVector * out_Location, FRotator * out_Rotation, bool ForAiming, bool bNoTPVAim) { NativeCall(this, "AShooterPlayerController.GetPlayerViewPointNoModifiers", out_Location, out_Rotation, ForAiming, bNoTPVAim); } + void ClientNotifyEditText_Implementation(TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject * ForObject) { NativeCall, unsigned int, unsigned int, UObject *>(this, "AShooterPlayerController.ClientNotifyEditText_Implementation", ForObjectClass, ExtraID1, ExtraID2, ForObject); } + void ServerNotifyEditText_Implementation(FString * TextToUse, bool checkedBox, TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject * ForObject) { NativeCall, unsigned int, unsigned int, UObject *>(this, "AShooterPlayerController.ServerNotifyEditText_Implementation", TextToUse, checkedBox, ForObjectClass, ExtraID1, ExtraID2, ForObject); } + void ServerSendChatMessage_Implementation(FString * ChatMessage, EChatSendMode::Type SendMode) { NativeCall(this, "AShooterPlayerController.ServerSendChatMessage_Implementation", ChatMessage, SendMode); } + void ClientChatMessage_Implementation(FChatMessage Chat) { NativeCall(this, "AShooterPlayerController.ClientChatMessage_Implementation", Chat); } + void ClientServerChatMessage_Implementation(FString * MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall(this, "AShooterPlayerController.ClientServerChatMessage_Implementation", MessageText, MessageColor, bIsBold); } + void ClientServerChatDirectMessage_Implementation(FString * MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall(this, "AShooterPlayerController.ClientServerChatDirectMessage_Implementation", MessageText, MessageColor, bIsBold); } + void ClientServerNotification_Implementation(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay) { NativeCall(this, "AShooterPlayerController.ClientServerNotification_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } + void ClientServerNotificationSingle_Implementation(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay, int MessageTypeID) { NativeCall(this, "AShooterPlayerController.ClientServerNotificationSingle_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay, MessageTypeID); } + void ClientServerSOTFNotificationCustom_Implementation(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay) { NativeCall(this, "AShooterPlayerController.ClientServerSOTFNotificationCustom_Implementation", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } + void ServerGetOriginalHairColor_Implementation() { NativeCall(this, "AShooterPlayerController.ServerGetOriginalHairColor_Implementation"); } + void ClientReceiveOriginalHairColor_Implementation(FLinearColor HairColor) { NativeCall(this, "AShooterPlayerController.ClientReceiveOriginalHairColor_Implementation", HairColor); } + FString * WritePNTScreenshot(FString * result) { return NativeCall(this, "AShooterPlayerController.WritePNTScreenshot", result); } + void TestNotification() { NativeCall(this, "AShooterPlayerController.TestNotification"); } + void ClientReset_Implementation() { NativeCall(this, "AShooterPlayerController.ClientReset_Implementation"); } + void Reset() { NativeCall(this, "AShooterPlayerController.Reset"); } + void TestAlarmNotification(FString Title, FString Message) { NativeCall(this, "AShooterPlayerController.TestAlarmNotification", Title, Message); } + void SendAlarmNotification(FString SteamID, FString Title, FString Message) { NativeCall(this, "AShooterPlayerController.SendAlarmNotification", SteamID, Title, Message); } + bool SendUseItemSlotToStructure() { return NativeCall(this, "AShooterPlayerController.SendUseItemSlotToStructure"); } + void SpectatorUseItem(int Index) { NativeCall(this, "AShooterPlayerController.SpectatorUseItem", Index); } + void ApplyDepthOfFieldSetting(int Index, float CurrentTimer) { NativeCall(this, "AShooterPlayerController.ApplyDepthOfFieldSetting", Index, CurrentTimer); } + void ServerReleaseSeatingStructure_Implementation() { NativeCall(this, "AShooterPlayerController.ServerReleaseSeatingStructure_Implementation"); } + void AdminCheat(FString * Msg) { NativeCall(this, "AShooterPlayerController.AdminCheat", Msg); } + void OnExtendedInfoPress() { NativeCall(this, "AShooterPlayerController.OnExtendedInfoPress"); } + void OnExtendedInfoRelease() { NativeCall(this, "AShooterPlayerController.OnExtendedInfoRelease"); } + void ClientNotifyPlayerDeath_Implementation(APawn * InstigatingPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyPlayerDeath_Implementation", InstigatingPawn); } + void ClientNotifyPlayerDeathReason_Implementation(FString * ReasonString) { NativeCall(this, "AShooterPlayerController.ClientNotifyPlayerDeathReason_Implementation", ReasonString); } + void ServerShowMessageOfTheDay_Implementation() { NativeCall(this, "AShooterPlayerController.ServerShowMessageOfTheDay_Implementation"); } + void ServerSetMessageOfTheDay_Implementation(FString * Message) { NativeCall(this, "AShooterPlayerController.ServerSetMessageOfTheDay_Implementation", Message); } + void ClientNotifyMessageOfTheDay_Implementation(FString * Message, float TimeToDisplay) { NativeCall(this, "AShooterPlayerController.ClientNotifyMessageOfTheDay_Implementation", Message, TimeToDisplay); } + void ClientNotifyRemotePlayerDeath_Implementation(FString * PlayerName, FString * AttackerName) { NativeCall(this, "AShooterPlayerController.ClientNotifyRemotePlayerDeath_Implementation", PlayerName, AttackerName); } + void ClientNotifyPlayerKill_Implementation(AActor * PlayerPawn, APawn * VictimPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyPlayerKill_Implementation", PlayerPawn, VictimPawn); } + void ClientNotifyDinoKill_Implementation(APrimalDinoCharacter * InstigatingPawn, APawn * VictimPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyDinoKill_Implementation", InstigatingPawn, VictimPawn); } + void ClientNotifyDinoDeath_Implementation(FString * DinoName, FString * AttackerName, bool bIsVehicle) { NativeCall(this, "AShooterPlayerController.ClientNotifyDinoDeath_Implementation", DinoName, AttackerName, bIsVehicle); } + void ClientNotifyRespawned_Implementation(APawn * NewPawn, bool IsFirstSpawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyRespawned_Implementation", NewPawn, IsFirstSpawn); } + void ClientNotifyReconnected_Implementation(APawn * NewPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyReconnected_Implementation", NewPawn); } + void ClientResetRespawningFlag_Implementation() { NativeCall(this, "AShooterPlayerController.ClientResetRespawningFlag_Implementation"); } + void CheckForPlayerInventory() { NativeCall(this, "AShooterPlayerController.CheckForPlayerInventory"); } + void ReportSpawnManagers() { NativeCall(this, "AShooterPlayerController.ReportSpawnManagers"); } + void HibernationReport(FString * ClassName) { NativeCall(this, "AShooterPlayerController.HibernationReport", ClassName); } + void HiWarp(FString * ClassName, int Index) { NativeCall(this, "AShooterPlayerController.HiWarp", ClassName, Index); } + void ReportLeastSpawnManagers() { NativeCall(this, "AShooterPlayerController.ReportLeastSpawnManagers"); } + void FlushLevelStreaming() { NativeCall(this, "AShooterPlayerController.FlushLevelStreaming"); } + void DoFlushLevelStreaming() { NativeCall(this, "AShooterPlayerController.DoFlushLevelStreaming"); } + void FinalFlushLevelStreaming() { NativeCall(this, "AShooterPlayerController.FinalFlushLevelStreaming"); } + void ClientNotifyCantHarvest_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyCantHarvest_Implementation"); } + void ClientNotifyHitHarvest_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyHitHarvest_Implementation"); } + void ClientNotifyCantHitHarvest_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyCantHitHarvest_Implementation"); } + void ServerSetVRPlayer_Implementation(bool bSetVRPlayer) { NativeCall(this, "AShooterPlayerController.ServerSetVRPlayer_Implementation", bSetVRPlayer); } + void ClientNotifyTamedDino_Implementation(TSubclassOf DinoClass) { NativeCall>(this, "AShooterPlayerController.ClientNotifyTamedDino_Implementation", DinoClass); } + void ClientNotifySummonedDino_Implementation(TSubclassOf DinoClass) { NativeCall>(this, "AShooterPlayerController.ClientNotifySummonedDino_Implementation", DinoClass); } + void ClientNotifyDefeatedDino_Implementation(TSubclassOf DinoClass) { NativeCall>(this, "AShooterPlayerController.ClientNotifyDefeatedDino_Implementation", DinoClass); } + void SetPlayerPos(float X, float Y, float Z) { NativeCall(this, "AShooterPlayerController.SetPlayerPos", X, Y, Z); } + void SPI(float X, float Y, float Z, float Yaw, float Pitch) { NativeCall(this, "AShooterPlayerController.SPI", X, Y, Z, Yaw, Pitch); } + void ClientSetSpectatorLocation_Implementation(FVector NewLocation) { NativeCall(this, "AShooterPlayerController.ClientSetSpectatorLocation_Implementation", NewLocation); } + void ClientSetControlRotation_Implementation(FRotator NewRotation) { NativeCall(this, "AShooterPlayerController.ClientSetControlRotation_Implementation", NewRotation); } + bool ShouldReplicateVoicePacketFrom(FUniqueNetId * Sender, char * PlaybackFlags) { return NativeCall(this, "AShooterPlayerController.ShouldReplicateVoicePacketFrom", Sender, PlaybackFlags); } + bool HasRadio(bool allowVoice) { return NativeCall(this, "AShooterPlayerController.HasRadio", allowVoice); } + TArray * GetRadioFrequencies(TArray * result) { return NativeCall *, TArray *>(this, "AShooterPlayerController.GetRadioFrequencies", result); } + bool HasSameRadioFrequency(AShooterPlayerController * OtherPC, unsigned int * SharedFrequency) { return NativeCall(this, "AShooterPlayerController.HasSameRadioFrequency", OtherPC, SharedFrequency); } + bool CanCommunicateVoiceWithRadio(AShooterPlayerController * otherPC) { return NativeCall(this, "AShooterPlayerController.CanCommunicateVoiceWithRadio", otherPC); } + void ToggleSpeaking(bool bSpeaking) { NativeCall(this, "AShooterPlayerController.ToggleSpeaking", bSpeaking); } + void ForceUnstasisAtLocation(FVector AtLocation) { NativeCall(this, "AShooterPlayerController.ForceUnstasisAtLocation", AtLocation); } + void SpawnActorSpread(FString * blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, int NumberActors, float SpreadAmount) { NativeCall(this, "AShooterPlayerController.SpawnActorSpread", blueprintPath, spawnDistance, spawnYOffset, ZOffset, NumberActors, SpreadAmount); } + void SpawnActorSpreadTamed(FString * blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, int NumberActors, float SpreadAmount) { NativeCall(this, "AShooterPlayerController.SpawnActorSpreadTamed", blueprintPath, spawnDistance, spawnYOffset, ZOffset, NumberActors, SpreadAmount); } + void GiveResources() { NativeCall(this, "AShooterPlayerController.GiveResources"); } + void GiveEngrams() { NativeCall(this, "AShooterPlayerController.GiveEngrams"); } + void ForceTribes(FString * PlayerName1, FString * PlayerName2, FString * NewTribeName) { NativeCall(this, "AShooterPlayerController.ForceTribes", PlayerName1, PlayerName2, NewTribeName); } + void ClientPlayLocalSound_Implementation(USoundBase * aSound, bool bAttach) { NativeCall(this, "AShooterPlayerController.ClientPlayLocalSound_Implementation", aSound, bAttach); } + void ClientStopLocalSound_Implementation(USoundBase * aSound) { NativeCall(this, "AShooterPlayerController.ClientStopLocalSound_Implementation", aSound); } + void ServerAddItemToArkInventory_Implementation(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, int requestedQuantity) { NativeCall(this, "AShooterPlayerController.ServerAddItemToArkInventory_Implementation", inventoryComp, itemID, requestedQuantity); } + void OnArkTributeAllClustersInventoryItemsLoaded(TArray * Items, bool bAllowForcedItemDownload) { NativeCall *, bool>(this, "AShooterPlayerController.OnArkTributeAllClustersInventoryItemsLoaded", Items, bAllowForcedItemDownload); } + void OnArkTributeSaved(bool Success) { NativeCall(this, "AShooterPlayerController.OnArkTributeSaved", Success); } + void ClientSetArkTributeLimits_Implementation(bool LimitItems, bool LimitDinos, bool LimitCharacters, int MaxItems, int MaxDinos, int MaxCharacters) { NativeCall(this, "AShooterPlayerController.ClientSetArkTributeLimits_Implementation", LimitItems, LimitDinos, LimitCharacters, MaxItems, MaxDinos, MaxCharacters); } + void ServerLoadArkInventoryItems_Implementation(TArray * ArkInventoryItemsInfo) { NativeCall *>(this, "AShooterPlayerController.ServerLoadArkInventoryItems_Implementation", ArkInventoryItemsInfo); } + void GetTamedDinosNearBy(TArray> * Dinos, float RangeRadius) { NativeCall> *, float>(this, "AShooterPlayerController.GetTamedDinosNearBy", Dinos, RangeRadius); } + bool IsTamedDinoNearBy(APrimalDinoCharacter * Dino, float RangeRadius) { return NativeCall(this, "AShooterPlayerController.IsTamedDinoNearBy", Dino, RangeRadius); } + void ServerSendArkDataPayloadBegin_Implementation(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, FString * DataClass, FString * TagName, FString * Name, TArray * DataStats, unsigned int ID1, unsigned int ID2) { NativeCall *, unsigned int, unsigned int>(this, "AShooterPlayerController.ServerSendArkDataPayloadBegin_Implementation", ID, ArkDataType, DataClass, TagName, Name, DataStats, ID1, ID2); } + void ServerSendArkDataPayload_Implementation(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, TArray * DataBytes) { NativeCall *>(this, "AShooterPlayerController.ServerSendArkDataPayload_Implementation", ID, ArkDataType, DataBytes); } + void ServerSendArkDataPayloadEnd_Implementation(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType) { NativeCall(this, "AShooterPlayerController.ServerSendArkDataPayloadEnd_Implementation", ID, ArkDataType); } + void ClientSendArkDataPayloadBegin_Implementation(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, FString * DataClass, FString * TagName, FString * Name, TArray * DataStats, unsigned int ID1, unsigned int ID2) { NativeCall *, unsigned int, unsigned int>(this, "AShooterPlayerController.ClientSendArkDataPayloadBegin_Implementation", ID, ArkDataType, DataClass, TagName, Name, DataStats, ID1, ID2); } + void ClientSendArkDataPayloadEnd_Implementation(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, unsigned __int64 PlayerDataID) { NativeCall(this, "AShooterPlayerController.ClientSendArkDataPayloadEnd_Implementation", ID, ArkDataType, PlayerDataID); } + void ServerCharacterUploadWithItems_CharaterPayload_Implementation(unsigned __int64 PlayerDataId, TArray * PlayerDataChunk) { NativeCall *>(this, "AShooterPlayerController.ServerCharacterUploadWithItems_CharaterPayload_Implementation", PlayerDataId, PlayerDataChunk); } + void ServerCharacterUploadWithItems_UploadItem_Implementation(unsigned __int64 PlayerDataId, FItemNetInfo InvItem) { NativeCall(this, "AShooterPlayerController.ServerCharacterUploadWithItems_UploadItem_Implementation", PlayerDataId, InvItem); } + void ServerCharacterUploadWithItems_FinishAndCreateCharacter_Implementation(unsigned __int64 PlayerDataId) { NativeCall(this, "AShooterPlayerController.ServerCharacterUploadWithItems_FinishAndCreateCharacter_Implementation", PlayerDataId); } + void RequestCreateNewPlayerWithArkData(TArray PlayerArkDataBytes, unsigned __int64 TribeID) { NativeCall, unsigned __int64>(this, "AShooterPlayerController.RequestCreateNewPlayerWithArkData", PlayerArkDataBytes, TribeID); } + void LoadLocalPlayerArkData() { NativeCall(this, "AShooterPlayerController.LoadLocalPlayerArkData"); } + int GetSubscribedAppIds() { return NativeCall(this, "AShooterPlayerController.GetSubscribedAppIds"); } + void ServerLoadUploadedDinos_Implementation() { NativeCall(this, "AShooterPlayerController.ServerLoadUploadedDinos_Implementation"); } + void ClientDownloadDinoRequestFinished_Implementation(bool Success) { NativeCall(this, "AShooterPlayerController.ClientDownloadDinoRequestFinished_Implementation", Success); } + void ServerLoadUploadedCharacters_Implementation() { NativeCall(this, "AShooterPlayerController.ServerLoadUploadedCharacters_Implementation"); } + void ClientOnStartDownloadTransferredPlayerCharacter_Implementation() { NativeCall(this, "AShooterPlayerController.ClientOnStartDownloadTransferredPlayerCharacter_Implementation"); } + void ClientOnEndDownloadTransferredPlayerCharacter_Implementation(bool Success, int FailureResponseCode, FString * FailureResponseMessage) { NativeCall(this, "AShooterPlayerController.ClientOnEndDownloadTransferredPlayerCharacter_Implementation", Success, FailureResponseCode, FailureResponseMessage); } + void DownloadTransferredPlayerCharacter() { NativeCall(this, "AShooterPlayerController.DownloadTransferredPlayerCharacter"); } + void ClientDownloadPlayerCharacterRequestFinished_Implementation(bool Success) { NativeCall(this, "AShooterPlayerController.ClientDownloadPlayerCharacterRequestFinished_Implementation", Success); } + void ServerSetSubscribedApp_Implementation(int AppID, bool bPreventDefaultItems) { NativeCall(this, "AShooterPlayerController.ServerSetSubscribedApp_Implementation", AppID, bPreventDefaultItems); } + void ServerAddItemToSteamInventory(int ItemSteamDefID, int Quantity) { NativeCall(this, "AShooterPlayerController.ServerAddItemToSteamInventory", ItemSteamDefID, Quantity); } + void ClientRemoveItemFromSteamInventory_Implementation(TArray * ItemSteamUserID, int Quantity) { NativeCall *, int>(this, "AShooterPlayerController.ClientRemoveItemFromSteamInventory_Implementation", ItemSteamUserID, Quantity); } + void ServerRemoveSteamItemSucceeded_Implementation() { NativeCall(this, "AShooterPlayerController.ServerRemoveSteamItemSucceeded_Implementation"); } + void OnConsumeItemFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall(this, "AShooterPlayerController.OnConsumeItemFinished", bSuccess, SteamID); } + void OnAddItemFinished(bool bSuccess, TArray SteamItemUserIds, unsigned __int64 SteamID) { NativeCall, unsigned __int64>(this, "AShooterPlayerController.OnAddItemFinished", bSuccess, SteamItemUserIds, SteamID); } + void ServerRefreshSteamInventoryForRemove() { NativeCall(this, "AShooterPlayerController.ServerRefreshSteamInventoryForRemove"); } + void ServerRefreshSteamInventoryToCheckConsume() { NativeCall(this, "AShooterPlayerController.ServerRefreshSteamInventoryToCheckConsume"); } + void ServerRefreshSteamInventory_Implementation() { NativeCall(this, "AShooterPlayerController.ServerRefreshSteamInventory_Implementation"); } + void OnServerRefreshSteamInventoryFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall(this, "AShooterPlayerController.OnServerRefreshSteamInventoryFinished", bSuccess, SteamID); } + void OnRefreshSteamInventoryToCheckConsumeFinished(bool bSuccess, unsigned __int64 SteamID) { NativeCall(this, "AShooterPlayerController.OnRefreshSteamInventoryToCheckConsumeFinished", bSuccess, SteamID); } + void ClientRefreshSteamInventoryFinished_Implementation(bool bSuccess) { NativeCall(this, "AShooterPlayerController.ClientRefreshSteamInventoryFinished_Implementation", bSuccess); } + void RefreshSteamInventory() { NativeCall(this, "AShooterPlayerController.RefreshSteamInventory"); } + void ServerRemoveSteamItem_Implementation(unsigned int ItemdDefId) { NativeCall(this, "AShooterPlayerController.ServerRemoveSteamItem_Implementation", ItemdDefId); } + void ReceivedPlayerState() { NativeCall(this, "AShooterPlayerController.ReceivedPlayerState"); } + void CloseSteamStatusScene() { NativeCall(this, "AShooterPlayerController.CloseSteamStatusScene"); } + void ServerAllowPlayerToJoinNoCheck_Implementation(FString * PlayerId) { NativeCall(this, "AShooterPlayerController.ServerAllowPlayerToJoinNoCheck_Implementation", PlayerId); } + void ServerDisallowPlayerToJoinNoCheck_Implementation(FString * PlayerId) { NativeCall(this, "AShooterPlayerController.ServerDisallowPlayerToJoinNoCheck_Implementation", PlayerId); } + void ServerSendDirectMessage_Implementation(FString * PlayerSteamID, FString * MessageText) { NativeCall(this, "AShooterPlayerController.ServerSendDirectMessage_Implementation", PlayerSteamID, MessageText); } + void ServerListPlayers_Implementation() { NativeCall(this, "AShooterPlayerController.ServerListPlayers_Implementation"); } + void KickPlayer(FString PlayerSteamName) { NativeCall(this, "AShooterPlayerController.KickPlayer", PlayerSteamName); } + void ServerKickPlayer_Implementation(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerKickPlayer_Implementation", PlayerSteamName, PlayerSteamID); } + void BanPlayer(FString PlayerSteamName) { NativeCall(this, "AShooterPlayerController.BanPlayer", PlayerSteamName); } + void ServerBanPlayer_Implementation(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerBanPlayer_Implementation", PlayerSteamName, PlayerSteamID); } + void UnbanPlayer(FString PlayerSteamName) { NativeCall(this, "AShooterPlayerController.UnbanPlayer", PlayerSteamName); } + void ServerUnbanPlayer_Implementation(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerUnbanPlayer_Implementation", PlayerSteamName, PlayerSteamID); } + void SetKickedNotification(FString KickReason) { NativeCall(this, "AShooterPlayerController.SetKickedNotification", KickReason); } + void ClientUnlockAchievement_Implementation(FString * AchievementID) { NativeCall(this, "AShooterPlayerController.ClientUnlockAchievement_Implementation", AchievementID); } + void ClientNotifyLevelUp_Implementation(APrimalCharacter * ForChar, int NewLevel) { NativeCall(this, "AShooterPlayerController.ClientNotifyLevelUp_Implementation", ForChar, NewLevel); } + void ClientNotifyAdmin_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyAdmin_Implementation"); } + void ClientNotifyTorpidityIncrease_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyTorpidityIncrease_Implementation"); } + void InitCharacterPainting_Implementation(APrimalCharacter * Char) { NativeCall(this, "AShooterPlayerController.InitCharacterPainting_Implementation", Char); } + void ClientNotifyListenServerOutOfRange_Implementation() { NativeCall(this, "AShooterPlayerController.ClientNotifyListenServerOutOfRange_Implementation"); } + void StopLoadingMusic() { NativeCall(this, "AShooterPlayerController.StopLoadingMusic"); } + void FadeOutLoadingMusic() { NativeCall(this, "AShooterPlayerController.FadeOutLoadingMusic"); } + void ChangeState(FName NewState) { NativeCall(this, "AShooterPlayerController.ChangeState", NewState); } + bool IsSpectator() { return NativeCall(this, "AShooterPlayerController.IsSpectator"); } + void ClientFailedRemoveSaddle_Implementation() { NativeCall(this, "AShooterPlayerController.ClientFailedRemoveSaddle_Implementation"); } + void PrintColors() { NativeCall(this, "AShooterPlayerController.PrintColors"); } + FString * ConsoleCommand(FString * result, FString * Command, bool bWriteToLog) { return NativeCall(this, "AShooterPlayerController.ConsoleCommand", result, Command, bWriteToLog); } + void GiveColors(int quantity) { NativeCall(this, "AShooterPlayerController.GiveColors", quantity); } + void ClientShowPaintingUI_Implementation(UObject * ObjectToPaint) { NativeCall(this, "AShooterPlayerController.ClientShowPaintingUI_Implementation", ObjectToPaint); } + void HideRiders(bool bDoHide) { NativeCall(this, "AShooterPlayerController.HideRiders", bDoHide); } + void SetAdminIcon(bool bAdminIcon) { NativeCall(this, "AShooterPlayerController.SetAdminIcon", bAdminIcon); } + void SpawnPlayerCameraManager() { NativeCall(this, "AShooterPlayerController.SpawnPlayerCameraManager"); } + void ServerSetSupressAdminIcon_Implementation(bool bSuppress) { NativeCall(this, "AShooterPlayerController.ServerSetSupressAdminIcon_Implementation", bSuppress); } + void NotifyTribeWarStatus_Implementation(FString * EnemyTribeString, int StatusType) { NativeCall(this, "AShooterPlayerController.NotifyTribeWarStatus_Implementation", EnemyTribeString, StatusType); } + void StartArkGamepadLeftShoulder() { NativeCall(this, "AShooterPlayerController.StartArkGamepadLeftShoulder"); } + void StartArkGamepadRightShoulder() { NativeCall(this, "AShooterPlayerController.StartArkGamepadRightShoulder"); } + void EndArkGamepadRightShoulder() { NativeCall(this, "AShooterPlayerController.EndArkGamepadRightShoulder"); } + void ServerRequestTribeLog_Implementation() { NativeCall(this, "AShooterPlayerController.ServerRequestTribeLog_Implementation"); } + void ClientStartReceivingTribeLog_Implementation() { NativeCall(this, "AShooterPlayerController.ClientStartReceivingTribeLog_Implementation"); } + void ClientReceiveTribeLog_Implementation(FString * LogString) { NativeCall(this, "AShooterPlayerController.ClientReceiveTribeLog_Implementation", LogString); } + void ClientEndReceivingTribeLog_Implementation() { NativeCall(this, "AShooterPlayerController.ClientEndReceivingTribeLog_Implementation"); } + void EndArkGamepadLeftShoulder() { NativeCall(this, "AShooterPlayerController.EndArkGamepadLeftShoulder"); } + void RPCStayAlive_Implementation() { NativeCall(this, "AShooterPlayerController.RPCStayAlive_Implementation"); } + void StartArkGamepadBackButton() { NativeCall(this, "AShooterPlayerController.StartArkGamepadBackButton"); } + void EndArkGamepadBackButton() { NativeCall(this, "AShooterPlayerController.EndArkGamepadBackButton"); } + void StartArkGamepadFaceButtonLeft() { NativeCall(this, "AShooterPlayerController.StartArkGamepadFaceButtonLeft"); } + void EndArkGamepadFaceButtonLeft() { NativeCall(this, "AShooterPlayerController.EndArkGamepadFaceButtonLeft"); } + void StartArkGamepadFaceButtonRight() { NativeCall(this, "AShooterPlayerController.StartArkGamepadFaceButtonRight"); } + void EndArkGamepadFaceButtonRight() { NativeCall(this, "AShooterPlayerController.EndArkGamepadFaceButtonRight"); } + void StartArkGamepadFaceButtonTop() { NativeCall(this, "AShooterPlayerController.StartArkGamepadFaceButtonTop"); } + void EndArkGamepadFaceButtonTop() { NativeCall(this, "AShooterPlayerController.EndArkGamepadFaceButtonTop"); } + void StartArkGamepadFaceButtonBottom() { NativeCall(this, "AShooterPlayerController.StartArkGamepadFaceButtonBottom"); } + void EndArkGamepadFaceButtonBottom() { NativeCall(this, "AShooterPlayerController.EndArkGamepadFaceButtonBottom"); } + void StartArkGamepadDpadLeft() { NativeCall(this, "AShooterPlayerController.StartArkGamepadDpadLeft"); } + void EndArkGamepadDpadLeft() { NativeCall(this, "AShooterPlayerController.EndArkGamepadDpadLeft"); } + void StartArkGamepadDpadUp() { NativeCall(this, "AShooterPlayerController.StartArkGamepadDpadUp"); } + void EndAArkGamepadDpadUp() { NativeCall(this, "AShooterPlayerController.EndAArkGamepadDpadUp"); } + void StartArkGamepadDpadRight() { NativeCall(this, "AShooterPlayerController.StartArkGamepadDpadRight"); } + void EndArkGamepadDpadRight() { NativeCall(this, "AShooterPlayerController.EndArkGamepadDpadRight"); } + void StartArkGamepadDpadDown() { NativeCall(this, "AShooterPlayerController.StartArkGamepadDpadDown"); } + void EndArkGamepadDpadDown() { NativeCall(this, "AShooterPlayerController.EndArkGamepadDpadDown"); } + void ServerAddAchievementID_Implementation(FString * AchievementID, bool bIsOnSpawn) { NativeCall(this, "AShooterPlayerController.ServerAddAchievementID_Implementation", AchievementID, bIsOnSpawn); } + FString * GetPlayerCharacterName(FString * result) { return NativeCall(this, "AShooterPlayerController.GetPlayerCharacterName", result); } + void ClientCollectedAchievementItem_Implementation(TSubclassOf ItemClass) { NativeCall>(this, "AShooterPlayerController.ClientCollectedAchievementItem_Implementation", ItemClass); } + bool UseTribeGroupRanks() { return NativeCall(this, "AShooterPlayerController.UseTribeGroupRanks"); } + bool IsTribeAdmin() { return NativeCall(this, "AShooterPlayerController.IsTribeAdmin"); } + void ClientAddFloatingDamageText_Implementation(FVector_NetQuantize AtLocation, int DamageAmount, int FromTeamID) { NativeCall(this, "AShooterPlayerController.ClientAddFloatingDamageText_Implementation", AtLocation, DamageAmount, FromTeamID); } + void ClientAddFloatingText_Implementation(FVector_NetQuantize AtLocation, FString * FloatingTextString, FColor FloatingTextColor, float ScaleX, float ScaleY, float TextLifeSpan, FVector TextVelocity, float MinScale, float FadeInTime, float FadeOutTime) { NativeCall(this, "AShooterPlayerController.ClientAddFloatingText_Implementation", AtLocation, FloatingTextString, FloatingTextColor, ScaleX, ScaleY, TextLifeSpan, TextVelocity, MinScale, FadeInTime, FadeOutTime); } + UPrimalItem * GetInventoryUISelectedItemLocal() { return NativeCall(this, "AShooterPlayerController.GetInventoryUISelectedItemLocal"); } + UPrimalItem * GetInventoryUISelectedItemRemote() { return NativeCall(this, "AShooterPlayerController.GetInventoryUISelectedItemRemote"); } + void PlayHitMarkerCharacter_Implementation() { NativeCall(this, "AShooterPlayerController.PlayHitMarkerCharacter_Implementation"); } + void PlayHitMarkerStructure_Implementation() { NativeCall(this, "AShooterPlayerController.PlayHitMarkerStructure_Implementation"); } + void PlayHitMarkerCharacterAlly_Implementation() { NativeCall(this, "AShooterPlayerController.PlayHitMarkerCharacterAlly_Implementation"); } + void PlayHitMarkerStructureAlly_Implementation() { NativeCall(this, "AShooterPlayerController.PlayHitMarkerStructureAlly_Implementation"); } + void ClientShowTransferredPlayerConfirmationDialog_Implementation() { NativeCall(this, "AShooterPlayerController.ClientShowTransferredPlayerConfirmationDialog_Implementation"); } + void ShowTransferCharacterConfirmationDialog() { NativeCall(this, "AShooterPlayerController.ShowTransferCharacterConfirmationDialog"); } + void OnTransferCharacterConfirmationDialogClosed(bool bAccept) { NativeCall(this, "AShooterPlayerController.OnTransferCharacterConfirmationDialogClosed", bAccept); } + void ServerTransferredPlayerConfirmationResult_Implementation(bool bAccpet) { NativeCall(this, "AShooterPlayerController.ServerTransferredPlayerConfirmationResult_Implementation", bAccpet); } + void ClientSetHUDAndInitUIScenes_Implementation(TSubclassOf NewHUDClass) { NativeCall>(this, "AShooterPlayerController.ClientSetHUDAndInitUIScenes_Implementation", NewHUDClass); } + void ClientShowSpawnUIForTransferringPlayer_Implementation(TSubclassOf NewHUDClass, unsigned __int64 TransferingPlayerID, bool bUseTimer) { NativeCall, unsigned __int64, bool>(this, "AShooterPlayerController.ClientShowSpawnUIForTransferringPlayer_Implementation", NewHUDClass, TransferingPlayerID, bUseTimer); } + void ServerDownloadTransferredPlayer_Implementation(int spawnPointID, int spawnPointRegionIndex) { NativeCall(this, "AShooterPlayerController.ServerDownloadTransferredPlayer_Implementation", spawnPointID, spawnPointRegionIndex); } + void GetAudioListenerPosition(FVector * OutLocation, FVector * OutFrontDir, FVector * OutRightDir) { NativeCall(this, "AShooterPlayerController.GetAudioListenerPosition", OutLocation, OutFrontDir, OutRightDir); } + void ServerStartWeaponFire_Implementation(AShooterWeapon * weapon) { NativeCall(this, "AShooterPlayerController.ServerStartWeaponFire_Implementation", weapon); } + void ServerStopWeaponFire_Implementation(AShooterWeapon * weapon) { NativeCall(this, "AShooterPlayerController.ServerStopWeaponFire_Implementation", weapon); } + void ServerStartWeaponAltFire_Implementation(AShooterWeapon * weapon) { NativeCall(this, "AShooterPlayerController.ServerStartWeaponAltFire_Implementation", weapon); } + void ServerStopWeaponAltFire_Implementation(AShooterWeapon * weapon) { NativeCall(this, "AShooterPlayerController.ServerStopWeaponAltFire_Implementation", weapon); } + void ClientStartSurfaceCameraForPassenger_Implementation(float yaw, float pitch, float roll, bool bInvertTurnInput) { NativeCall(this, "AShooterPlayerController.ClientStartSurfaceCameraForPassenger_Implementation", yaw, pitch, roll, bInvertTurnInput); } + void ServerUnlockPerMapExplorerNote_Implementation(int ExplorerNoteIndex) { NativeCall(this, "AShooterPlayerController.ServerUnlockPerMapExplorerNote_Implementation", ExplorerNoteIndex); } + void UnlockExplorerNote(int ExplorerNoteIndex) { NativeCall(this, "AShooterPlayerController.UnlockExplorerNote", ExplorerNoteIndex); } + void ClientUnlockExplorerNote_Implementation(int ExplorerNoteIndex) { NativeCall(this, "AShooterPlayerController.ClientUnlockExplorerNote_Implementation", ExplorerNoteIndex); } + APawn * GetResponsibleDamager(AActor * DamageCauser) { return NativeCall(this, "AShooterPlayerController.GetResponsibleDamager", DamageCauser); } + void UnlockEmote(FName EmoteName) { NativeCall(this, "AShooterPlayerController.UnlockEmote", EmoteName); } + void LockEmote(FName EmoteName) { NativeCall(this, "AShooterPlayerController.LockEmote", EmoteName); } + bool IsEmoteUnlocked(FName EmoteName) { return NativeCall(this, "AShooterPlayerController.IsEmoteUnlocked", EmoteName); } + int GetCurrentMultiUseWheelCategory() { return NativeCall(this, "AShooterPlayerController.GetCurrentMultiUseWheelCategory"); } + void ClientReceiveDinoAncestors_Implementation(APrimalDinoCharacter * ForDino, TArray * DinoAncestors, TArray * DinoAncestorsMale, int RandomMutationsFemale, int RandomMutationsMale) { NativeCall *, TArray *, int, int>(this, "AShooterPlayerController.ClientReceiveDinoAncestors_Implementation", ForDino, DinoAncestors, DinoAncestorsMale, RandomMutationsFemale, RandomMutationsMale); } + void ServerRequestDinoAncestors_Implementation(APrimalDinoCharacter * ForDino) { NativeCall(this, "AShooterPlayerController.ServerRequestDinoAncestors_Implementation", ForDino); } + void OnPressGroupAddOrRemoveTame() { NativeCall(this, "AShooterPlayerController.OnPressGroupAddOrRemoveTame"); } + AActor * BaseGetPlayerCharacter() { return NativeCall(this, "AShooterPlayerController.BaseGetPlayerCharacter"); } + void ClientNotifyUnlockedEngram_Implementation(TSubclassOf ItemClass, bool bTekGram) { NativeCall, bool>(this, "AShooterPlayerController.ClientNotifyUnlockedEngram_Implementation", ItemClass, bTekGram); } + void ClientTeleportSucceeded_Implementation(FVector TeleportLoc, FRotator TeleportRot, bool bSimpleTeleport) { NativeCall(this, "AShooterPlayerController.ClientTeleportSucceeded_Implementation", TeleportLoc, TeleportRot, bSimpleTeleport); } + bool IsAtPersonalTameLimit(bool bIsForStructure) { return NativeCall(this, "AShooterPlayerController.IsAtPersonalTameLimit", bIsForStructure); } + FString * GetPersonalTameLimitString(FString * result) { return NativeCall(this, "AShooterPlayerController.GetPersonalTameLimitString", result); } + void ClientSetPersonalDinoTameCount_Implementation(int NewPersonalDinoTameCount) { NativeCall(this, "AShooterPlayerController.ClientSetPersonalDinoTameCount_Implementation", NewPersonalDinoTameCount); } + void UpdatePostProcessVolumes() { NativeCall(this, "AShooterPlayerController.UpdatePostProcessVolumes"); } + bool IsSavingData() { return NativeCall(this, "AShooterPlayerController.IsSavingData"); } + FString * PlayerCommand_Implementation(FString * result, FString * TheCommand) { return NativeCall(this, "AShooterPlayerController.PlayerCommand_Implementation", result, TheCommand); } + void TryToForceUploadCharacter_Implementation() { NativeCall(this, "AShooterPlayerController.TryToForceUploadCharacter_Implementation"); } + void ServerDPC_Implementation() { NativeCall(this, "AShooterPlayerController.ServerDPC_Implementation"); } + void QuitToMainMenu() { NativeCall(this, "AShooterPlayerController.QuitToMainMenu"); } + bool IsViewingInventoryUI() { return NativeCall(this, "AShooterPlayerController.IsViewingInventoryUI"); } + bool IsFirstLocalPlayerOrLivingLocalPlayer() { return NativeCall(this, "AShooterPlayerController.IsFirstLocalPlayerOrLivingLocalPlayer"); } + void ServerRequestMyTribeOnlineList_Implementation() { NativeCall(this, "AShooterPlayerController.ServerRequestMyTribeOnlineList_Implementation"); } + void ClientReceiveMyTribeOnlineList_Implementation(TArray * OnlinePlayerIDs) { NativeCall *>(this, "AShooterPlayerController.ClientReceiveMyTribeOnlineList_Implementation", OnlinePlayerIDs); } + void ClientNotifyUnlockHairStyleOrEmote_Implementation(FName HairstyleOrEmoteName) { NativeCall(this, "AShooterPlayerController.ClientNotifyUnlockHairStyleOrEmote_Implementation", HairstyleOrEmoteName); } + void UpdateRequestEquippedItemsQueue() { NativeCall(this, "AShooterPlayerController.UpdateRequestEquippedItemsQueue"); } + void SetGamma1() { NativeCall(this, "AShooterPlayerController.SetGamma1"); } + void SetGamma2() { NativeCall(this, "AShooterPlayerController.SetGamma2"); } + void ServerDropAllNotReadyForUploadItems_Implementation() { NativeCall(this, "AShooterPlayerController.ServerDropAllNotReadyForUploadItems_Implementation"); } + void ClientOnDropAllNotReadyForUploadItemsFinished_Implementation() { NativeCall(this, "AShooterPlayerController.ClientOnDropAllNotReadyForUploadItemsFinished_Implementation"); } + void QueueRequestEquippedItems(UPrimalInventoryComponent * invComp) { NativeCall(this, "AShooterPlayerController.QueueRequestEquippedItems", invComp); } + static void StaticRegisterNativesAShooterPlayerController() { NativeCall(nullptr, "AShooterPlayerController.StaticRegisterNativesAShooterPlayerController"); } + void CheckCheatsPassword(FString * pass) { NativeCall(this, "AShooterPlayerController.CheckCheatsPassword", pass); } + void CheckRequestSpectator(FString * InSpectatorPass) { NativeCall(this, "AShooterPlayerController.CheckRequestSpectator", InSpectatorPass); } + void ClientAddActorItem(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification) { NativeCall(this, "AShooterPlayerController.ClientAddActorItem", forInventory, itemInfo, bEquipItem, ShowHUDNotification); } + void ClientAddActorItemToFolder(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bEquipItem, bool ShowHUDNotification, FString * ToFolder) { NativeCall(this, "AShooterPlayerController.ClientAddActorItemToFolder", forInventory, itemInfo, bEquipItem, ShowHUDNotification, ToFolder); } + void ClientAddItemToArk(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, bool bFromLoad) { NativeCall(this, "AShooterPlayerController.ClientAddItemToArk", forInventory, itemInfo, bFromLoad); } + void ClientChatMessage(FChatMessage Chat) { NativeCall(this, "AShooterPlayerController.ClientChatMessage", Chat); } + void ClientCollectedAchievementItem(TSubclassOf ItemClass) { NativeCall>(this, "AShooterPlayerController.ClientCollectedAchievementItem", ItemClass); } + void ClientDoMultiUse(UObject * ForObject, int useIndex) { NativeCall(this, "AShooterPlayerController.ClientDoMultiUse", ForObject, useIndex); } + void ClientFailedRemoveSaddle() { NativeCall(this, "AShooterPlayerController.ClientFailedRemoveSaddle"); } + void ClientFailedToAddItemFromArkInventory() { NativeCall(this, "AShooterPlayerController.ClientFailedToAddItemFromArkInventory"); } + void ClientFinishedReceivingActorItems(UPrimalInventoryComponent * forInventory, bool bEquippedItems) { NativeCall(this, "AShooterPlayerController.ClientFinishedReceivingActorItems", forInventory, bEquippedItems); } + void ClientHUDNotificationTypeParams(int MessageType, int MessageType1, int MessageParam2, UObject * ObjectParam1) { NativeCall(this, "AShooterPlayerController.ClientHUDNotificationTypeParams", MessageType, MessageType1, MessageParam2, ObjectParam1); } + void ClientInsertActorItem(UPrimalInventoryComponent * forInventory, FItemNetInfo itemInfo, FItemNetID InsertAfterItemID) { NativeCall(this, "AShooterPlayerController.ClientInsertActorItem", forInventory, itemInfo, InsertAfterItemID); } + void ClientNotifyAdmin() { NativeCall(this, "AShooterPlayerController.ClientNotifyAdmin"); } + void ClientNotifyDinoDeath(FString * DinoName, FString * AttackerName, bool bIsVehicle) { NativeCall(this, "AShooterPlayerController.ClientNotifyDinoDeath", DinoName, AttackerName, bIsVehicle); } + void ClientNotifyDinoKill(APrimalDinoCharacter * InstigatingPawn, APawn * VictimPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyDinoKill", InstigatingPawn, VictimPawn); } + void ClientNotifyEditText(TSubclassOf ForObjectClass, unsigned int ExtraID1, unsigned int ExtraID2, UObject * ForObject) { NativeCall, unsigned int, unsigned int, UObject *>(this, "AShooterPlayerController.ClientNotifyEditText", ForObjectClass, ExtraID1, ExtraID2, ForObject); } + void ClientNotifyListenServerOutOfRange() { NativeCall(this, "AShooterPlayerController.ClientNotifyListenServerOutOfRange"); } + void ClientNotifyMessageOfTheDay(FString * Message, float timeToDisplay) { NativeCall(this, "AShooterPlayerController.ClientNotifyMessageOfTheDay", Message, timeToDisplay); } + void ClientNotifyPlayerDeathReason(FString * ReasonString) { NativeCall(this, "AShooterPlayerController.ClientNotifyPlayerDeathReason", ReasonString); } + void ClientNotifyPlayerKill(AActor * PlayerPawn, APawn * VictimPawn) { NativeCall(this, "AShooterPlayerController.ClientNotifyPlayerKill", PlayerPawn, VictimPawn); } + void ClientNotifyTamedDino(TSubclassOf DinoClass) { NativeCall>(this, "AShooterPlayerController.ClientNotifyTamedDino", DinoClass); } + void ClientNotifyUnlockedEngram(TSubclassOf ItemClass, bool bTekGram) { NativeCall, bool>(this, "AShooterPlayerController.ClientNotifyUnlockedEngram", ItemClass, bTekGram); } + void ClientOnAddedItemsToAllClustersInventory(bool Success, FString * UserId, TArray * MasterIndexNum) { NativeCall *>(this, "AShooterPlayerController.ClientOnAddedItemsToAllClustersInventory", Success, UserId, MasterIndexNum); } + void ClientOnEndDownloadTransferredPlayerCharacter(bool Success, int FailureResponseCode, FString * FailureResponseMessage) { NativeCall(this, "AShooterPlayerController.ClientOnEndDownloadTransferredPlayerCharacter", Success, FailureResponseCode, FailureResponseMessage); } + void ClientPlayLocalSound(USoundBase * aSound, bool bAttach) { NativeCall(this, "AShooterPlayerController.ClientPlayLocalSound", aSound, bAttach); } + void ClientReceiveDinoAncestors(APrimalDinoCharacter * ForDino, TArray * DinoAncestors, TArray * DinoAncestorsMale, int RandomMutationsFemale, int RandomMutationsMale) { NativeCall *, TArray *, int, int>(this, "AShooterPlayerController.ClientReceiveDinoAncestors", ForDino, DinoAncestors, DinoAncestorsMale, RandomMutationsFemale, RandomMutationsMale); } + void ClientReceiveTribeLog(FString * LogString) { NativeCall(this, "AShooterPlayerController.ClientReceiveTribeLog", LogString); } + void ClientRemoveItemFromSteamInventory(TArray * ItemSteamUserID, int Quantity) { NativeCall *, int>(this, "AShooterPlayerController.ClientRemoveItemFromSteamInventory", ItemSteamUserID, Quantity); } + void ClientSendArkDataPayloadBegin(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, FString * DataClass, FString * TagName, FString * Name, TArray * DataStats, unsigned int ID1, unsigned int ID2) { NativeCall *, unsigned int, unsigned int>(this, "AShooterPlayerController.ClientSendArkDataPayloadBegin", ID, ArkDataType, DataClass, TagName, Name, DataStats, ID1, ID2); } + void ClientServerChatDirectMessage(FString * MessageText, FLinearColor MessageColor, bool bIsBold) { NativeCall(this, "AShooterPlayerController.ClientServerChatDirectMessage", MessageText, MessageColor, bIsBold); } + void ClientServerNotification(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay) { NativeCall(this, "AShooterPlayerController.ClientServerNotification", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } + void ClientServerSOTFNotificationCustom(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay) { NativeCall(this, "AShooterPlayerController.ClientServerSOTFNotificationCustom", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay); } + void ClientSetArkTributeLimits(bool LimitItems, bool LimitDinos, bool LimitCharacters, int MaxItems, int MaxDinos, int MaxCharacters) { NativeCall(this, "AShooterPlayerController.ClientSetArkTributeLimits", LimitItems, LimitDinos, LimitCharacters, MaxItems, MaxDinos, MaxCharacters); } + void ClientSetHUDAndInitUIScenes(TSubclassOf NewHUDClass) { NativeCall>(this, "AShooterPlayerController.ClientSetHUDAndInitUIScenes", NewHUDClass); } + void ClientShowPaintingUI(UObject * ObjectToPaint) { NativeCall(this, "AShooterPlayerController.ClientShowPaintingUI", ObjectToPaint); } + void ClientUnlockAchievement(FString * AchievementID) { NativeCall(this, "AShooterPlayerController.ClientUnlockAchievement", AchievementID); } + void ClientUpdateInventoryCraftQueue(UPrimalInventoryComponent * forInventory, TArray * CraftQueueEntries) { NativeCall *>(this, "AShooterPlayerController.ClientUpdateInventoryCraftQueue", forInventory, CraftQueueEntries); } + void NotifyTribeWarStatus(FString * EnemyTribeString, int StatusType) { NativeCall(this, "AShooterPlayerController.NotifyTribeWarStatus", EnemyTribeString, StatusType); } + FString * PlayerCommand(FString * result, FString * TheCommand) { return NativeCall(this, "AShooterPlayerController.PlayerCommand", result, TheCommand); } + void ServerAddAchievementID(FString * AchievementID, bool bIsOnSpawn) { NativeCall(this, "AShooterPlayerController.ServerAddAchievementID", AchievementID, bIsOnSpawn); } + void ServerAddItemToCustomFolder(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "AShooterPlayerController.ServerAddItemToCustomFolder", forInventory, CFolderName, InventoryCompType, ItemId); } + void ServerAllowPlayerToJoinNoCheck(FString * PlayerId) { NativeCall(this, "AShooterPlayerController.ServerAllowPlayerToJoinNoCheck", PlayerId); } + void ServerBanPlayer(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerBanPlayer", PlayerSteamName, PlayerSteamID); } + void ServerCharacterUploadWithItems_UploadItem(unsigned __int64 PlayerDataId, FItemNetInfo InvItem) { NativeCall(this, "AShooterPlayerController.ServerCharacterUploadWithItems_UploadItem", PlayerDataId, InvItem); } + void ServerCraftItem(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerCraftItem", inventoryComp, itemID); } + void ServerDeleteCustomFolder(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType) { NativeCall(this, "AShooterPlayerController.ServerDeleteCustomFolder", forInventory, CFolderName, InventoryCompType); } + void ServerDeleteItemFromCustomFolder(UPrimalInventoryComponent * forInventory, FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "AShooterPlayerController.ServerDeleteItemFromCustomFolder", forInventory, CFolderName, InventoryCompType, ItemId); } + void ServerDisallowPlayerToJoinNoCheck(FString * PlayerId) { NativeCall(this, "AShooterPlayerController.ServerDisallowPlayerToJoinNoCheck", PlayerId); } + void ServerDPC() { NativeCall(this, "AShooterPlayerController.ServerDPC"); } + void ServerDropFromRemoteInventory(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerDropFromRemoteInventory", inventoryComp, itemID); } + void ServerEquipPawnItem(FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerEquipPawnItem", itemID); } + void ServerEquipToRemoteInventory(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerEquipToRemoteInventory", inventoryComp, itemID); } + void ServerKickPlayer(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerKickPlayer", PlayerSteamName, PlayerSteamID); } + void ServerMultiUse(UObject * ForObject, int useIndex) { NativeCall(this, "AShooterPlayerController.ServerMultiUse", ForObject, useIndex); } + void ServerRemovePassenger() { NativeCall(this, "AShooterPlayerController.ServerRemovePassenger"); } + void ServerRemovePawnItem(FItemNetID itemID, bool bSecondryAction) { NativeCall(this, "AShooterPlayerController.ServerRemovePawnItem", itemID, bSecondryAction); } + void ServerRepairItem(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRepairItem", inventoryComp, itemID); } + void ServerRequestInventorySwapItems(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, FItemNetID itemID2) { NativeCall(this, "AShooterPlayerController.ServerRequestInventorySwapItems", inventoryComp, itemID1, itemID2); } + void ServerRequestInventoryUseItem(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItem", inventoryComp, itemID); } + void ServerRequestInventoryUseItemWithActor(AActor * anActor, UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, int AdditionalData) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItemWithActor", anActor, inventoryComp, itemID1, AdditionalData); } + void ServerRequestInventoryUseItemWithItem(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID1, FItemNetID itemID2, int AdditionalData) { NativeCall(this, "AShooterPlayerController.ServerRequestInventoryUseItemWithItem", inventoryComp, itemID1, itemID2, AdditionalData); } + void ServerRequestRemoveWeaponClipAmmo(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID) { NativeCall(this, "AShooterPlayerController.ServerRequestRemoveWeaponClipAmmo", inventoryComp, itemID); } + void ServerSendArkDataPayloadBegin(FGuid ID, EPrimalARKTributeDataType::Type ArkDataType, FString * DataClass, FString * TagName, FString * Name, TArray * DataStats, unsigned int ID1, unsigned int ID2) { NativeCall *, unsigned int, unsigned int>(this, "AShooterPlayerController.ServerSendArkDataPayloadBegin", ID, ArkDataType, DataClass, TagName, Name, DataStats, ID1, ID2); } + void ServerSendChatMessage(FString * ChatMessage, EChatSendMode::Type SendMode) { NativeCall(this, "AShooterPlayerController.ServerSendChatMessage", ChatMessage, SendMode); } + void ServerSendDirectMessage(FString * PlayerSteamID, FString * Message) { NativeCall(this, "AShooterPlayerController.ServerSendDirectMessage", PlayerSteamID, Message); } + void ServerTransferAllFromRemoteInventory(UPrimalInventoryComponent * inventoryComp, FString * CurrentCustomFolderFilter, FString * CurrentNameFilter, FString * CurrentDestinationFolder, bool bNoFolderView) { NativeCall(this, "AShooterPlayerController.ServerTransferAllFromRemoteInventory", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder, bNoFolderView); } + void ServerTransferAllToRemoteInventory(UPrimalInventoryComponent * inventoryComp, FString * CurrentCustomFolderFilter, FString * CurrentNameFilter, FString * CurrentDestinationFolder, bool bNoFolderView) { NativeCall(this, "AShooterPlayerController.ServerTransferAllToRemoteInventory", inventoryComp, CurrentCustomFolderFilter, CurrentNameFilter, CurrentDestinationFolder, bNoFolderView); } + void ServerTransferFromRemoteInventory(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, int requestedQuantity, int ToSlotIndex, bool bEquipItem) { NativeCall(this, "AShooterPlayerController.ServerTransferFromRemoteInventory", inventoryComp, itemID, requestedQuantity, ToSlotIndex, bEquipItem); } + void ServerTransferToRemoteInventory(UPrimalInventoryComponent * inventoryComp, FItemNetID itemID, bool bAlsoTryToEqup, int requestedQuantity) { NativeCall(this, "AShooterPlayerController.ServerTransferToRemoteInventory", inventoryComp, itemID, bAlsoTryToEqup, requestedQuantity); } + void ServerUnbanPlayer(FString * PlayerSteamName, FString * PlayerSteamID) { NativeCall(this, "AShooterPlayerController.ServerUnbanPlayer", PlayerSteamName, PlayerSteamID); } + void ServerUploadCurrentCharacterAndItems(UPrimalInventoryComponent * inventoryComp) { NativeCall(this, "AShooterPlayerController.ServerUploadCurrentCharacterAndItems", inventoryComp); } +}; + +struct ACharacter : APawn +{ + FieldValue> CharacterMovementField() { return { this, "ACharacter.CharacterMovement" }; } + FieldValue BaseTranslationOffsetField() { return { this, "ACharacter.BaseTranslationOffset" }; } + FieldValue ReplicatedMovementModeField() { return { this, "ACharacter.ReplicatedMovementMode" }; } + FieldValue LeftDynamicActorBaseTimeField() { return { this, "ACharacter.LeftDynamicActorBaseTime" }; } + FieldValue CrouchedEyeHeightField() { return { this, "ACharacter.CrouchedEyeHeight" }; } + FieldValue ProneEyeHeightField() { return { this, "ACharacter.ProneEyeHeight" }; } + FieldValue> CharacterOverrideSoundFromField() { return { this, "ACharacter.CharacterOverrideSoundFrom" }; } + FieldValue> CharacterOverrideSoundToField() { return { this, "ACharacter.CharacterOverrideSoundTo" }; } + FieldValue bInBaseReplicationField() { return { this, "ACharacter.bInBaseReplication" }; } + FieldValue JumpKeyHoldTimeField() { return { this, "ACharacter.JumpKeyHoldTime" }; } + FieldValue JumpMaxHoldTimeField() { return { this, "ACharacter.JumpMaxHoldTime" }; } + FieldValue LastTeleportedFrameField() { return { this, "ACharacter.LastTeleportedFrame" }; } + FieldValue ForceUnfreezeSkeletalDynamicsUntilTimeField() { return { this, "ACharacter.ForceUnfreezeSkeletalDynamicsUntilTime" }; } + + // Functions + + void SetLastMovementDesiredRotation(FRotator * InRotation) { NativeCall(this, "ACharacter.SetLastMovementDesiredRotation", InRotation); } + bool NotifyLanded(FHitResult * Hit) { return NativeCall(this, "ACharacter.NotifyLanded", Hit); } + bool IsJumping() { return NativeCall(this, "ACharacter.IsJumping"); } + UPrimitiveComponent * GetMovementBase() { return NativeCall(this, "ACharacter.GetMovementBase"); } + void PostInitializeComponents() { NativeCall(this, "ACharacter.PostInitializeComponents"); } + void GetSimpleCollisionCylinder(float * CollisionRadius, float * CollisionHalfHeight) { NativeCall(this, "ACharacter.GetSimpleCollisionCylinder", CollisionRadius, CollisionHalfHeight); } + void ApplyWorldOffset(FVector * InOffset, bool bWorldShift) { NativeCall(this, "ACharacter.ApplyWorldOffset", InOffset, bWorldShift); } + float GetDefaultHalfHeight() { return NativeCall(this, "ACharacter.GetDefaultHalfHeight"); } + UActorComponent * FindComponentByClass(TSubclassOf ComponentClass) { return NativeCall>(this, "ACharacter.FindComponentByClass", ComponentClass); } + void Landed(FHitResult * Hit) { NativeCall(this, "ACharacter.Landed", Hit); } + bool CanJump() { return NativeCall(this, "ACharacter.CanJump"); } + bool CanJumpInternal_Implementation() { return NativeCall(this, "ACharacter.CanJumpInternal_Implementation"); } + bool DoJump(bool bReplayingMoves) { return NativeCall(this, "ACharacter.DoJump", bReplayingMoves); } + void RecalculateBaseEyeHeight() { NativeCall(this, "ACharacter.RecalculateBaseEyeHeight"); } + void OnRep_IsCrouched() { NativeCall(this, "ACharacter.OnRep_IsCrouched"); } + void OnRep_IsProne() { NativeCall(this, "ACharacter.OnRep_IsProne"); } + bool CanCrouch() { return NativeCall(this, "ACharacter.CanCrouch"); } + void Crouch(bool bClientSimulation) { NativeCall(this, "ACharacter.Crouch", bClientSimulation); } + void UnCrouch(bool bClientSimulation) { NativeCall(this, "ACharacter.UnCrouch", bClientSimulation); } + bool CanProne() { return NativeCall(this, "ACharacter.CanProne"); } + void Prone(bool bClientSimulation) { NativeCall(this, "ACharacter.Prone", bClientSimulation); } + void UnProne(bool bClientSimulation) { NativeCall(this, "ACharacter.UnProne", bClientSimulation); } + void OnEndCrouch(float HeightAdjust, float ScaledHeightAdjust) { NativeCall(this, "ACharacter.OnEndCrouch", HeightAdjust, ScaledHeightAdjust); } + void OnStartCrouch(float HeightAdjust, float ScaledHeightAdjust) { NativeCall(this, "ACharacter.OnStartCrouch", HeightAdjust, ScaledHeightAdjust); } + void ApplyDamageMomentum(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "ACharacter.ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void TeleportSucceeded(bool bIsATest, bool bSimpleTeleport) { NativeCall(this, "ACharacter.TeleportSucceeded", bIsATest, bSimpleTeleport); } + void NetTeleportSucceeded_Implementation(FVector ToLoc, FRotator ToRot) { NativeCall(this, "ACharacter.NetTeleportSucceeded_Implementation", ToLoc, ToRot); } + void ClearCrossLevelReferences() { NativeCall(this, "ACharacter.ClearCrossLevelReferences"); } + void SetBase(UPrimitiveComponent * NewBaseComponent, FName BoneName, bool bNotifyPawn) { NativeCall(this, "ACharacter.SetBase", NewBaseComponent, BoneName, bNotifyPawn); } + bool IsBasedOnDynamicActor() { return NativeCall(this, "ACharacter.IsBasedOnDynamicActor"); } + void TurnOff() { NativeCall(this, "ACharacter.TurnOff"); } + void Restart() { NativeCall(this, "ACharacter.Restart"); } + void PawnClientRestart() { NativeCall(this, "ACharacter.PawnClientRestart"); } + void PossessedBy(AController * NewController) { NativeCall(this, "ACharacter.PossessedBy", NewController); } + void UnPossessed() { NativeCall(this, "ACharacter.UnPossessed"); } + void TornOff() { NativeCall(this, "ACharacter.TornOff"); } + void BaseChange() { NativeCall(this, "ACharacter.BaseChange"); } + void LaunchCharacter(FVector LaunchVelocity, bool bXYOverride, bool bZOverride) { NativeCall(this, "ACharacter.LaunchCharacter", LaunchVelocity, bXYOverride, bZOverride); } + void OnMovementModeChanged(EMovementMode PrevMovementMode, char PrevCustomMode) { NativeCall(this, "ACharacter.OnMovementModeChanged", PrevMovementMode, PrevCustomMode); } + bool ShouldNotifyLanded(FHitResult * Hit) { return NativeCall(this, "ACharacter.ShouldNotifyLanded", Hit); } + void Jump() { NativeCall(this, "ACharacter.Jump"); } + void StopJumping() { NativeCall(this, "ACharacter.StopJumping"); } + void CheckJumpInput(float DeltaTime) { NativeCall(this, "ACharacter.CheckJumpInput", DeltaTime); } + void ClearJumpInput() { NativeCall(this, "ACharacter.ClearJumpInput"); } + float GetJumpMaxHoldTime() { return NativeCall(this, "ACharacter.GetJumpMaxHoldTime"); } + void PreNetReceive() { NativeCall(this, "ACharacter.PreNetReceive"); } + void PostNetReceive() { NativeCall(this, "ACharacter.PostNetReceive"); } + void OnRep_ReplicatedBasedMovement() { NativeCall(this, "ACharacter.OnRep_ReplicatedBasedMovement"); } + void OnRep_ReplicatedMovement() { NativeCall(this, "ACharacter.OnRep_ReplicatedMovement"); } + void OnRep_RootMotion() { NativeCall(this, "ACharacter.OnRep_RootMotion"); } + void SimulatedRootMotionPositionFixup(float DeltaSeconds) { NativeCall(this, "ACharacter.SimulatedRootMotionPositionFixup", DeltaSeconds); } + void UpdateSimulatedPosition(FVector * NewLocation, FRotator * NewRotation) { NativeCall(this, "ACharacter.UpdateSimulatedPosition", NewLocation, NewRotation); } + void PostNetReceiveLocationAndRotation() { NativeCall(this, "ACharacter.PostNetReceiveLocationAndRotation"); } + bool TeleportTo(FVector * DestLocation, FRotator * DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall(this, "ACharacter.TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } + bool SimpleTeleportTo(FVector * DestLocation, FRotator * DestRotation) { return NativeCall(this, "ACharacter.SimpleTeleportTo", DestLocation, DestRotation); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "ACharacter.GetLifetimeReplicatedProps", OutLifetimeProps); } + bool IsPlayingRootMotion() { return NativeCall(this, "ACharacter.IsPlayingRootMotion"); } + USoundBase * BPOverrideCharacterSound_Implementation(USoundBase * SoundIn) { return NativeCall(this, "ACharacter.BPOverrideCharacterSound_Implementation", SoundIn); } + float PlayAnimMontage(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall(this, "ACharacter.PlayAnimMontage", AnimMontage, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } + void StopAnimMontage(UAnimMontage * AnimMontage) { NativeCall(this, "ACharacter.StopAnimMontage", AnimMontage); } + UAnimMontage * GetCurrentMontage() { return NativeCall(this, "ACharacter.GetCurrentMontage"); } + void ClientCheatWalk_Implementation() { NativeCall(this, "ACharacter.ClientCheatWalk_Implementation"); } + void ClientCheatFly_Implementation() { NativeCall(this, "ACharacter.ClientCheatFly_Implementation"); } + void ClientCheatGhost_Implementation() { NativeCall(this, "ACharacter.ClientCheatGhost_Implementation"); } + bool ShouldReplicateRotPitch() { return NativeCall(this, "ACharacter.ShouldReplicateRotPitch"); } + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "ACharacter.GetPrivateStaticClass"); } + void K2_OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall(this, "ACharacter.K2_OnEndCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } + void K2_OnMovementModeChanged(EMovementMode PrevMovementMode, EMovementMode NewMovementMode, char PrevCustomMode, char NewCustomMode) { NativeCall(this, "ACharacter.K2_OnMovementModeChanged", PrevMovementMode, NewMovementMode, PrevCustomMode, NewCustomMode); } + void K2_OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall(this, "ACharacter.K2_OnStartCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } + void K2_UpdateCustomMovement(float DeltaTime) { NativeCall(this, "ACharacter.K2_UpdateCustomMovement", DeltaTime); } + void OnJumped() { NativeCall(this, "ACharacter.OnJumped"); } + void OnLanded(FHitResult * Hit) { NativeCall(this, "ACharacter.OnLanded", Hit); } + void OnLaunched(FVector LaunchVelocity, bool bXYOverride, bool bZOverride) { NativeCall(this, "ACharacter.OnLaunched", LaunchVelocity, bXYOverride, bZOverride); } + void OnWalkingOffLedge() { NativeCall(this, "ACharacter.OnWalkingOffLedge"); } +}; + +struct APrimalCharacter : ACharacter +{ + FieldValue OldLocationField() { return { this, "APrimalCharacter.OldLocation" }; } + FieldValue OldRotationField() { return { this, "APrimalCharacter.OldRotation" }; } + FieldValue EffectorInterpSpeedField() { return { this, "APrimalCharacter.EffectorInterpSpeed" }; } + FieldValue HalfLegLengthField() { return { this, "APrimalCharacter.HalfLegLength" }; } + FieldValue TwoLeggedVirtualPointDistFactorField() { return { this, "APrimalCharacter.TwoLeggedVirtualPointDistFactor" }; } + FieldValue FullIKDistanceField() { return { this, "APrimalCharacter.FullIKDistance" }; } + FieldValue SimpleIkRateField() { return { this, "APrimalCharacter.SimpleIkRate" }; } + FieldValue GroundCheckExtentField() { return { this, "APrimalCharacter.GroundCheckExtent" }; } + FieldValue LastForceAimedCharactersTimeField() { return { this, "APrimalCharacter.LastForceAimedCharactersTime" }; } + FieldValue JumpAnimField() { return { this, "APrimalCharacter.JumpAnim" }; } + FieldValue LandedAnimField() { return { this, "APrimalCharacter.LandedAnim" }; } + FieldValue HurtAnimField() { return { this, "APrimalCharacter.HurtAnim" }; } + FieldValue HurtSoundField() { return { this, "APrimalCharacter.HurtSound" }; } + FieldValue RootBodyBoneNameField() { return { this, "APrimalCharacter.RootBodyBoneName" }; } + FieldValue> BuffsField() { return { this, "APrimalCharacter.Buffs" }; } + FieldValue TribeNameField() { return { this, "APrimalCharacter.TribeName" }; } + FieldValue WaterSubmergedDepthThresholdField() { return { this, "APrimalCharacter.WaterSubmergedDepthThreshold" }; } + FieldValue ProneWaterSubmergedDepthThresholdField() { return { this, "APrimalCharacter.ProneWaterSubmergedDepthThreshold" }; } + FieldValue> SubmergedWaterMovementModeField() { return { this, "APrimalCharacter.SubmergedWaterMovementMode" }; } + FieldValue> UnSubmergedWaterMovementModeField() { return { this, "APrimalCharacter.UnSubmergedWaterMovementMode" }; } + FieldValue> PoopItemClassField() { return { this, "APrimalCharacter.PoopItemClass" }; } + FieldValue DragBoneNameField() { return { this, "APrimalCharacter.DragBoneName" }; } + FieldValue DragSocketNameField() { return { this, "APrimalCharacter.DragSocketName" }; } + FieldValue MaxDragDistanceField() { return { this, "APrimalCharacter.MaxDragDistance" }; } + FieldValue MaxDragDistanceTimeoutField() { return { this, "APrimalCharacter.MaxDragDistanceTimeout" }; } + FieldValue> BonesToIngoreWhileDraggedField() { return { this, "APrimalCharacter.BonesToIngoreWhileDragged" }; } + FieldValue PreviewCameraMaxZoomMultiplierField() { return { this, "APrimalCharacter.PreviewCameraMaxZoomMultiplier" }; } + FieldValue PreviewCameraDefaultZoomMultiplierField() { return { this, "APrimalCharacter.PreviewCameraDefaultZoomMultiplier" }; } + FieldValue PreviewCameraDistanceScaleFactorField() { return { this, "APrimalCharacter.PreviewCameraDistanceScaleFactor" }; } + FieldValue StartDraggedSoundField() { return { this, "APrimalCharacter.StartDraggedSound" }; } + FieldValue EndDraggedSoundField() { return { this, "APrimalCharacter.EndDraggedSound" }; } + FieldValue DraggedCharacterField() { return { this, "APrimalCharacter.DraggedCharacter" }; } + FieldValue DraggingCharacterField() { return { this, "APrimalCharacter.DraggingCharacter" }; } + FieldValue LocalDraggedCharacterTransformField() { return { this, "APrimalCharacter.LocalDraggedCharacterTransform" }; } + FieldValue StartDraggingTimeField() { return { this, "APrimalCharacter.StartDraggingTime" }; } + FieldValue LastDragUpdateTimeField() { return { this, "APrimalCharacter.LastDragUpdateTime" }; } + FieldValue ImmobilizationActorField() { return { this, "APrimalCharacter.ImmobilizationActor" }; } + FieldValue CurrentFrameAnimPreventInputField() { return { this, "APrimalCharacter.CurrentFrameAnimPreventInput" }; } + FieldValue BPTimerServerMinField() { return { this, "APrimalCharacter.BPTimerServerMin" }; } + FieldValue BPTimerServerMaxField() { return { this, "APrimalCharacter.BPTimerServerMax" }; } + FieldValue BPTimerNonDedicatedMinField() { return { this, "APrimalCharacter.BPTimerNonDedicatedMin" }; } + FieldValue BPTimerNonDedicatedMaxField() { return { this, "APrimalCharacter.BPTimerNonDedicatedMax" }; } + FieldValue NextBPTimerServerField() { return { this, "APrimalCharacter.NextBPTimerServer" }; } + FieldValue NextBPTimerNonDedicatedField() { return { this, "APrimalCharacter.NextBPTimerNonDedicated" }; } + FieldValue>> ImmobilizationTrapsToIgnoreField() { return { this, "APrimalCharacter.ImmobilizationTrapsToIgnore" }; } + FieldValue> CarryingDinoField() { return { this, "APrimalCharacter.CarryingDino" }; } + FieldValue DediOverrideCapsuleCollisionProfileNameField() { return { this, "APrimalCharacter.DediOverrideCapsuleCollisionProfileName" }; } + FieldValue DediOverrideMeshCollisionProfileNameField() { return { this, "APrimalCharacter.DediOverrideMeshCollisionProfileName" }; } + FieldValue SnaredFromSocketField() { return { this, "APrimalCharacter.SnaredFromSocket" }; } + FieldValue> DeathDestructionDepositInventoryClassField() { return { this, "APrimalCharacter.DeathDestructionDepositInventoryClass" }; } + FieldValue DamageNotifyTeamAggroMultiplierField() { return { this, "APrimalCharacter.DamageNotifyTeamAggroMultiplier" }; } + FieldValue DamageNotifyTeamAggroRangeField() { return { this, "APrimalCharacter.DamageNotifyTeamAggroRange" }; } + FieldValue DamageNotifyTeamAggroRangeFalloffField() { return { this, "APrimalCharacter.DamageNotifyTeamAggroRangeFalloff" }; } + FieldValue ReplicatedCurrentHealthField() { return { this, "APrimalCharacter.ReplicatedCurrentHealth" }; } + FieldValue ReplicatedMaxHealthField() { return { this, "APrimalCharacter.ReplicatedMaxHealth" }; } + FieldValue ReplicatedCurrentTorporField() { return { this, "APrimalCharacter.ReplicatedCurrentTorpor" }; } + FieldValue ReplicatedMaxTorporField() { return { this, "APrimalCharacter.ReplicatedMaxTorpor" }; } + FieldValue DragOffsetField() { return { this, "APrimalCharacter.DragOffset" }; } + FieldValue LastGrapHookPullingOwnerField() { return { this, "APrimalCharacter.LastGrapHookPullingOwner" }; } + FieldValue LastIkUpdateTimeField() { return { this, "APrimalCharacter.LastIkUpdateTime" }; } + FieldValue LastUpdatedAimOffsetsTimeField() { return { this, "APrimalCharacter.LastUpdatedAimOffsetsTime" }; } + FieldValue MeshPreRagdollRelativeLocationField() { return { this, "APrimalCharacter.MeshPreRagdollRelativeLocation" }; } + FieldValue MeshPreRagdollRelativeRotationField() { return { this, "APrimalCharacter.MeshPreRagdollRelativeRotation" }; } + FieldValue DraggingBodyIndexField() { return { this, "APrimalCharacter.DraggingBodyIndex" }; } + FieldValue DraggedBoneIndexField() { return { this, "APrimalCharacter.DraggedBoneIndex" }; } + FieldValue customBitFlagsField() { return { this, "APrimalCharacter.customBitFlags" }; } + FieldValue RunningSpeedModifierField() { return { this, "APrimalCharacter.RunningSpeedModifier" }; } + FieldValue LowHealthPercentageField() { return { this, "APrimalCharacter.LowHealthPercentage" }; } + FieldValue BaseTurnRateField() { return { this, "APrimalCharacter.BaseTurnRate" }; } + FieldValue BaseLookUpRateField() { return { this, "APrimalCharacter.BaseLookUpRate" }; } + FieldValue DeathAnimField() { return { this, "APrimalCharacter.DeathAnim" }; } + FieldValue DeathSoundField() { return { this, "APrimalCharacter.DeathSound" }; } + FieldValue RunLoopSoundField() { return { this, "APrimalCharacter.RunLoopSound" }; } + FieldValue RunStopSoundField() { return { this, "APrimalCharacter.RunStopSound" }; } + FieldValue> FootStepSoundsPhysMatField() { return { this, "APrimalCharacter.FootStepSoundsPhysMat" }; } + FieldValue> LandedSoundsPhysMatField() { return { this, "APrimalCharacter.LandedSoundsPhysMat" }; } + FieldValue MeshRootSocketNameField() { return { this, "APrimalCharacter.MeshRootSocketName" }; } + FieldValue> LastVoiceAudioComponentField() { return { this, "APrimalCharacter.LastVoiceAudioComponent" }; } + FieldValue MaxFallSpeedField() { return { this, "APrimalCharacter.MaxFallSpeed" }; } + FieldValue FallDamageMultiplierField() { return { this, "APrimalCharacter.FallDamageMultiplier" }; } + FieldValue RunLoopACField() { return { this, "APrimalCharacter.RunLoopAC" }; } + FieldValue CurrentCarriedYawField() { return { this, "APrimalCharacter.CurrentCarriedYaw" }; } + FieldValue CurrentTransponderField() { return { this, "APrimalCharacter.CurrentTransponder" }; } + FieldValue TargetCarriedYawField() { return { this, "APrimalCharacter.TargetCarriedYaw" }; } + FieldValue ServerTargetCarriedYawField() { return { this, "APrimalCharacter.ServerTargetCarriedYaw" }; } + FieldValue NetDynamicMusicSoundField() { return { this, "APrimalCharacter.NetDynamicMusicSound" }; } + FieldValue> MountedDinoField() { return { this, "APrimalCharacter.MountedDino" }; } + FieldValue MountedDinoTimeField() { return { this, "APrimalCharacter.MountedDinoTime" }; } + FieldValue> PreviousMountedDinoField() { return { this, "APrimalCharacter.PreviousMountedDino" }; } + FieldValue LastForceFallCheckBaseLocationField() { return { this, "APrimalCharacter.LastForceFallCheckBaseLocation" }; } + FieldValue LastHitWallSweepCheckLocationField() { return { this, "APrimalCharacter.LastHitWallSweepCheckLocation" }; } + FieldValue LastTimeBasedMovementHadCurrentActorField() { return { this, "APrimalCharacter.LastTimeBasedMovementHadCurrentActor" }; } + FieldValue> LastBasedMovementActorRefField() { return { this, "APrimalCharacter.LastBasedMovementActorRef" }; } + FieldValue GrabWeightThresholdField() { return { this, "APrimalCharacter.GrabWeightThreshold" }; } + FieldValue DragWeightField() { return { this, "APrimalCharacter.DragWeight" }; } + FieldValue DescriptiveNameField() { return { this, "APrimalCharacter.DescriptiveName" }; } + FieldValue> ReplicatedRagdollPositionsField() { return { this, "APrimalCharacter.ReplicatedRagdollPositions" }; } + FieldValue> ReplicatedRagdollRotationsField() { return { this, "APrimalCharacter.ReplicatedRagdollRotations" }; } + FieldValue> LastReplicatedRagdollPositionsField() { return { this, "APrimalCharacter.LastReplicatedRagdollPositions" }; } + FieldValue> LastReplicatedRagdollRotationsField() { return { this, "APrimalCharacter.LastReplicatedRagdollRotations" }; } + FieldValue ReplicatedRootRotationField() { return { this, "APrimalCharacter.ReplicatedRootRotation" }; } + FieldValue> ReplicatedBonesIndiciesField() { return { this, "APrimalCharacter.ReplicatedBonesIndicies" }; } + FieldValue KillXPBaseField() { return { this, "APrimalCharacter.KillXPBase" }; } + FieldValue> ReplicatedBonesField() { return { this, "APrimalCharacter.ReplicatedBones" }; } + FieldValue RagdollReplicationIntervalField() { return { this, "APrimalCharacter.RagdollReplicationInterval" }; } + FieldValue ClientRotationInterpSpeedField() { return { this, "APrimalCharacter.ClientRotationInterpSpeed" }; } + FieldValue ClientLocationInterpSpeedField() { return { this, "APrimalCharacter.ClientLocationInterpSpeed" }; } + FieldValue MaxDragMovementSpeedField() { return { this, "APrimalCharacter.MaxDragMovementSpeed" }; } + FieldValue CurrentAimRotField() { return { this, "APrimalCharacter.CurrentAimRot" }; } + FieldValue CurrentRootLocField() { return { this, "APrimalCharacter.CurrentRootLoc" }; } + FieldValue LastYawSpeedWorldFrameCounterField() { return { this, "APrimalCharacter.LastYawSpeedWorldFrameCounter" }; } + FieldValue MeshPreRagdollCollisionProfileNameField() { return { this, "APrimalCharacter.MeshPreRagdollCollisionProfileName" }; } + FieldValue CapsulePreRagdollCollisionProfileNameField() { return { this, "APrimalCharacter.CapsulePreRagdollCollisionProfileName" }; } + FieldValue MyCharacterStatusComponentField() { return { this, "APrimalCharacter.MyCharacterStatusComponent" }; } + FieldValue MyInventoryComponentField() { return { this, "APrimalCharacter.MyInventoryComponent" }; } + FieldValue LastRunningTimeField() { return { this, "APrimalCharacter.LastRunningTime" }; } + FieldValue TPVCameraOffsetField() { return { this, "APrimalCharacter.TPVCameraOffset" }; } + FieldValue TPVCameraOffsetMultiplierField() { return { this, "APrimalCharacter.TPVCameraOffsetMultiplier" }; } + FieldValue TPVCameraOrgOffsetField() { return { this, "APrimalCharacter.TPVCameraOrgOffset" }; } + FieldValue LandedSoundMaxRangeField() { return { this, "APrimalCharacter.LandedSoundMaxRange" }; } + FieldValue FallingDamageHealthScaleBaseField() { return { this, "APrimalCharacter.FallingDamageHealthScaleBase" }; } + FieldValue FootstepsMaxRangeField() { return { this, "APrimalCharacter.FootstepsMaxRange" }; } + FieldValue MinTimeBetweenFootstepsField() { return { this, "APrimalCharacter.MinTimeBetweenFootsteps" }; } + FieldValue LastPlayedFootstepTimeField() { return { this, "APrimalCharacter.LastPlayedFootstepTime" }; } + FieldValue MinTimeBetweenFootstepsRunningField() { return { this, "APrimalCharacter.MinTimeBetweenFootstepsRunning" }; } + FieldValue> AnimationsPreventInputField() { return { this, "APrimalCharacter.AnimationsPreventInput" }; } + FieldValue LastNetDidLandField() { return { this, "APrimalCharacter.LastNetDidLand" }; } + FieldValue> LastDamageEventInstigatorField() { return { this, "APrimalCharacter.LastDamageEventInstigator" }; } + FieldValue CachedNumberOfClientRagdollCorrectionAttemptsField() { return { this, "APrimalCharacter.CachedNumberOfClientRagdollCorrectionAttempts" }; } + FieldValue NumberOfClientRagdollCorrectionAttemptsField() { return { this, "APrimalCharacter.NumberOfClientRagdollCorrectionAttempts" }; } + FieldValue ServerForceSleepRagdollIntervalField() { return { this, "APrimalCharacter.ServerForceSleepRagdollInterval" }; } + FieldValue ClientForceSleepRagdollIntervalField() { return { this, "APrimalCharacter.ClientForceSleepRagdollInterval" }; } + FieldValue NonRelevantServerForceSleepRagdollIntervalField() { return { this, "APrimalCharacter.NonRelevantServerForceSleepRagdollInterval" }; } + FieldValue> TargetableDamageFXDefaultPhysMaterialField() { return { this, "APrimalCharacter.TargetableDamageFXDefaultPhysMaterial" }; } + FieldValue PoopAnimationField() { return { this, "APrimalCharacter.PoopAnimation" }; } + FieldValue CorpseDestructionTimeField() { return { this, "APrimalCharacter.CorpseDestructionTime" }; } + FieldValue CorpseLifespanField() { return { this, "APrimalCharacter.CorpseLifespan" }; } + FieldValue TPVStructurePlacingHeightMultiplierField() { return { this, "APrimalCharacter.TPVStructurePlacingHeightMultiplier" }; } + FieldValue CorpseFadeAwayTimeField() { return { this, "APrimalCharacter.CorpseFadeAwayTime" }; } + FieldValue RagdollDeathImpulseScalerField() { return { this, "APrimalCharacter.RagdollDeathImpulseScaler" }; } + FieldValue PoopSoundField() { return { this, "APrimalCharacter.PoopSound" }; } + FieldValue BaseTargetingDesirabilityField() { return { this, "APrimalCharacter.BaseTargetingDesirability" }; } + FieldValue DeadBaseTargetingDesirabilityField() { return { this, "APrimalCharacter.DeadBaseTargetingDesirability" }; } + FieldValue OrbitCamRotField() { return { this, "APrimalCharacter.OrbitCamRot" }; } + FieldValue OrbitCamZoomField() { return { this, "APrimalCharacter.OrbitCamZoom" }; } + FieldValue LastSubmergedCheckLocField() { return { this, "APrimalCharacter.LastSubmergedCheckLoc" }; } + FieldValue LastTimeNotInFallingField() { return { this, "APrimalCharacter.LastTimeNotInFalling" }; } + FieldValue MaxCursorHUDDistanceField() { return { this, "APrimalCharacter.MaxCursorHUDDistance" }; } + FieldValue AddForwardVelocityOnJumpField() { return { this, "APrimalCharacter.AddForwardVelocityOnJump" }; } + FieldValue DeathActorTargetingOffsetField() { return { this, "APrimalCharacter.DeathActorTargetingOffset" }; } + FieldValue SocketOverrideTargetingLocationField() { return { this, "APrimalCharacter.SocketOverrideTargetingLocation" }; } + FieldValue CurrentDamageEventField() { return { this, "APrimalCharacter.CurrentDamageEvent" }; } + FieldValue LastApproximatePhysVolumeLocationField() { return { this, "APrimalCharacter.LastApproximatePhysVolumeLocation" }; } + FieldValue LastTimeSubmergedField() { return { this, "APrimalCharacter.LastTimeSubmerged" }; } + FieldValue LastFootPhysicalSurfaceTypeField() { return { this, "APrimalCharacter.LastFootPhysicalSurfaceType" }; } + FieldValue LastFootPhysicalSurfaceCheckTimeField() { return { this, "APrimalCharacter.LastFootPhysicalSurfaceCheckTime" }; } + FieldValue FootPhysicalSurfaceCheckIntervalField() { return { this, "APrimalCharacter.FootPhysicalSurfaceCheckInterval" }; } + FieldValue> LastHurtByNearbyPlayerField() { return { this, "APrimalCharacter.LastHurtByNearbyPlayer" }; } + FieldValue LastHurtByNearbyPlayerTimeField() { return { this, "APrimalCharacter.LastHurtByNearbyPlayerTime" }; } + FieldValue> LastAttackedNearbyPlayerField() { return { this, "APrimalCharacter.LastAttackedNearbyPlayer" }; } + FieldValue LastAttackedNearbyPlayerTimeField() { return { this, "APrimalCharacter.LastAttackedNearbyPlayerTime" }; } + FieldValue LastStartFallingRagdollTimeField() { return { this, "APrimalCharacter.LastStartFallingRagdollTime" }; } + FieldValue RagdollLastFrameLinearVelocityField() { return { this, "APrimalCharacter.RagdollLastFrameLinearVelocity" }; } + FieldValue RagdollImpactDamageVelocityScaleField() { return { this, "APrimalCharacter.RagdollImpactDamageVelocityScale" }; } + FieldValue RagdollImpactDamageMinDecelerationSpeedField() { return { this, "APrimalCharacter.RagdollImpactDamageMinDecelerationSpeed" }; } + FieldValue StartFallingImpactRagdollTimeIntervalField() { return { this, "APrimalCharacter.StartFallingImpactRagdollTimeInterval" }; } + FieldValue LastUnstasisTimeField() { return { this, "APrimalCharacter.LastUnstasisTime" }; } + FieldValue PreviousRagdollLocationField() { return { this, "APrimalCharacter.PreviousRagdollLocation" }; } + FieldValue RagdollPenetrationFailuresField() { return { this, "APrimalCharacter.RagdollPenetrationFailures" }; } + FieldValue NextBlinkTimeField() { return { this, "APrimalCharacter.NextBlinkTime" }; } + FieldValue BlinkTimerField() { return { this, "APrimalCharacter.BlinkTimer" }; } + FieldValue LastInSwimmingSoundTimeField() { return { this, "APrimalCharacter.LastInSwimmingSoundTime" }; } + FieldValue EnteredSwimmingSoundField() { return { this, "APrimalCharacter.EnteredSwimmingSound" }; } + FieldValue EnteredSleepingSoundField() { return { this, "APrimalCharacter.EnteredSleepingSound" }; } + FieldValue LeftSleepingSoundField() { return { this, "APrimalCharacter.LeftSleepingSound" }; } + FieldValue LastRelevantToPlayerTimeField() { return { this, "APrimalCharacter.LastRelevantToPlayerTime" }; } + FieldValue MeshStopForceUpdatingAtTimeField() { return { this, "APrimalCharacter.MeshStopForceUpdatingAtTime" }; } + FieldValue LastWalkingTimeField() { return { this, "APrimalCharacter.LastWalkingTime" }; } + FieldValue LastSpecialDamageTimeField() { return { this, "APrimalCharacter.LastSpecialDamageTime" }; } + FieldValue CorpseDraggedDecayRateField() { return { this, "APrimalCharacter.CorpseDraggedDecayRate" }; } + FieldValue PoopAltItemChanceField() { return { this, "APrimalCharacter.PoopAltItemChance" }; } + FieldValue> PoopAltItemClassField() { return { this, "APrimalCharacter.PoopAltItemClass" }; } + FieldValue>> DefaultBuffsField() { return { this, "APrimalCharacter.DefaultBuffs" }; } + FieldValue PoopIconField() { return { this, "APrimalCharacter.PoopIcon" }; } + FieldValue RunningMaxDesiredRotDeltaField() { return { this, "APrimalCharacter.RunningMaxDesiredRotDelta" }; } + FieldValue CorpseDestructionTimerField() { return { this, "APrimalCharacter.CorpseDestructionTimer" }; } + FieldValue OriginalCorpseLifespanField() { return { this, "APrimalCharacter.OriginalCorpseLifespan" }; } + FieldValue CorpseHarvestFadeTimeField() { return { this, "APrimalCharacter.CorpseHarvestFadeTime" }; } + FieldValue CurrentLocalRootLocField() { return { this, "APrimalCharacter.CurrentLocalRootLoc" }; } + FieldValue RootYawField() { return { this, "APrimalCharacter.RootYaw" }; } + FieldValue LastTimeInSwimmingField() { return { this, "APrimalCharacter.LastTimeInSwimming" }; } + FieldValue LastListenRangePushTimeField() { return { this, "APrimalCharacter.LastListenRangePushTime" }; } + FieldValue LastDamageAmountMaterialValueField() { return { this, "APrimalCharacter.LastDamageAmountMaterialValue" }; } + FieldValue BuffedDamageMultField() { return { this, "APrimalCharacter.BuffedDamageMult" }; } + FieldValue BuffedResistanceMultField() { return { this, "APrimalCharacter.BuffedResistanceMult" }; } + FieldValue ExtraMaxSpeedModifierField() { return { this, "APrimalCharacter.ExtraMaxSpeedModifier" }; } + FieldValue TamedDinoCallOutRangeField() { return { this, "APrimalCharacter.TamedDinoCallOutRange" }; } + FieldValue LastBumpedDamageTimeField() { return { this, "APrimalCharacter.LastBumpedDamageTime" }; } + FieldValue TargetPathfindingLocationOffsetField() { return { this, "APrimalCharacter.TargetPathfindingLocationOffset" }; } + FieldValue LastTookDamageTimeField() { return { this, "APrimalCharacter.LastTookDamageTime" }; } + FieldValue ExtraReceiveDamageMultiplierField() { return { this, "APrimalCharacter.ExtraReceiveDamageMultiplier" }; } + FieldValue ExtraMeleeDamageMultiplierField() { return { this, "APrimalCharacter.ExtraMeleeDamageMultiplier" }; } + FieldValue LastFallingZField() { return { this, "APrimalCharacter.LastFallingZ" }; } + FieldValue NumFallZFailsField() { return { this, "APrimalCharacter.NumFallZFails" }; } + FieldValue>> CharactersGrappledToMeField() { return { this, "APrimalCharacter.CharactersGrappledToMe" }; } + FieldValue DamageTheMeleeDamageCauserPercentField() { return { this, "APrimalCharacter.DamageTheMeleeDamageCauserPercent" }; } + FieldValue DurabilityDegrateTheMeleeDamageCauserPercentField() { return { this, "APrimalCharacter.DurabilityDegrateTheMeleeDamageCauserPercent" }; } + FieldValue> DamageTheMeleeDamageCauserDamageTypeField() { return { this, "APrimalCharacter.DamageTheMeleeDamageCauserDamageType" }; } + FieldValue TribeGroupInventoryRankField() { return { this, "APrimalCharacter.TribeGroupInventoryRank" }; } + FieldValue CharacterDamageImpulseMultiplierField() { return { this, "APrimalCharacter.CharacterDamageImpulseMultiplier" }; } + FieldValue ForceCheckPushThroughWallsTimeField() { return { this, "APrimalCharacter.ForceCheckPushThroughWallsTime" }; } + FieldValue LastStoppedEatAnimationTimeField() { return { this, "APrimalCharacter.LastStoppedEatAnimationTime" }; } + FieldValue ClientRotationInterpSpeedMultiplierGroundField() { return { this, "APrimalCharacter.ClientRotationInterpSpeedMultiplierGround" }; } + FieldValue GlideGravityScaleMultiplierField() { return { this, "APrimalCharacter.GlideGravityScaleMultiplier" }; } + FieldValue GlideMaxCarriedWeightField() { return { this, "APrimalCharacter.GlideMaxCarriedWeight" }; } + FieldValue lastPlayedMountAnimField() { return { this, "APrimalCharacter.lastPlayedMountAnim" }; } + FieldValue ScaleDeathHarvestHealthyByMaxHealthBaseField() { return { this, "APrimalCharacter.ScaleDeathHarvestHealthyByMaxHealthBase" }; } + FieldValue LastForceMeshRefreshBonesTimeField() { return { this, "APrimalCharacter.LastForceMeshRefreshBonesTime" }; } + FieldValue LastStartedBeingCarriedTimeField() { return { this, "APrimalCharacter.LastStartedBeingCarriedTime" }; } + FieldValue RunMinVelocityRotDotField() { return { this, "APrimalCharacter.RunMinVelocityRotDot" }; } + FieldValue LastHitDamageTimeField() { return { this, "APrimalCharacter.LastHitDamageTime" }; } + FieldValue>> PreventBuffClassesField() { return { this, "APrimalCharacter.PreventBuffClasses" }; } + + // Functions + + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalCharacter.GetPrivateStaticClass"); } + float BPGetAddForwardVelocityOnJump_Implementation() { return NativeCall(this, "APrimalCharacter.BPGetAddForwardVelocityOnJump_Implementation"); } + bool CanJumpInternal_Implementation() { return NativeCall(this, "APrimalCharacter.CanJumpInternal_Implementation"); } + void PreInitializeComponents() { NativeCall(this, "APrimalCharacter.PreInitializeComponents"); } + void ValidatePaintingComponentOctree() { NativeCall(this, "APrimalCharacter.ValidatePaintingComponentOctree"); } + void PostInitializeComponents() { NativeCall(this, "APrimalCharacter.PostInitializeComponents"); } + void Destroyed() { NativeCall(this, "APrimalCharacter.Destroyed"); } + void BeginPlay() { NativeCall(this, "APrimalCharacter.BeginPlay"); } + void FellOutOfWorld(UDamageType * dmgType) { NativeCall(this, "APrimalCharacter.FellOutOfWorld", dmgType); } + void Suicide() { NativeCall(this, "APrimalCharacter.Suicide"); } + bool IsDead() { return NativeCall(this, "APrimalCharacter.IsDead"); } + void InventoryItemUsed(UObject * InventoryItemObject) { NativeCall(this, "APrimalCharacter.InventoryItemUsed", InventoryItemObject); } + void AdjustDamage(float * Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool CanBeTargetedBy(ITargetableInterface * Attacker) { return NativeCall(this, "APrimalCharacter.CanBeTargetedBy", Attacker); } + bool IsValidForCombatMusic() { return NativeCall(this, "APrimalCharacter.IsValidForCombatMusic"); } + float TakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APrimalCharacter.TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool CanDie(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "APrimalCharacter.CanDie", KillingDamage, DamageEvent, Killer, DamageCauser); } + bool Die(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "APrimalCharacter.Die", KillingDamage, DamageEvent, Killer, DamageCauser); } + void PlayDyingPoint_Implementation(float KillingDamage, FPointDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDyingPoint_Implementation", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayDyingRadial_Implementation(float KillingDamage, FRadialDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDyingRadial_Implementation", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void SetDeath(bool bForceRagdoll) { NativeCall(this, "APrimalCharacter.SetDeath", bForceRagdoll); } + bool CanIgnoreImmobilizationTrap(TSubclassOf TrapClass, bool * bForceTrigger) { return NativeCall, bool *>(this, "APrimalCharacter.CanIgnoreImmobilizationTrap", TrapClass, bForceTrigger); } + void Immobilize(bool bImmobilize, AActor * UsingActor, bool bImmobilizeFalling) { NativeCall(this, "APrimalCharacter.Immobilize", bImmobilize, UsingActor, bImmobilizeFalling); } + float GetCorpseLifespan() { return NativeCall(this, "APrimalCharacter.GetCorpseLifespan"); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayHitEffectGeneric_Implementation(float DamageTaken, FPointDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayHitEffectGeneric_Implementation", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void PlayHitEffectRadial_Implementation(float DamageTaken, FRadialDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayHitEffectRadial_Implementation", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + bool AllowHurtAnimation() { return NativeCall(this, "APrimalCharacter.AllowHurtAnimation"); } + UPrimitiveComponent * GetPrimaryHitComponent() { return NativeCall(this, "APrimalCharacter.GetPrimaryHitComponent"); } + void PlayHitEffect(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser, bool bIsLocalPath) { NativeCall(this, "APrimalCharacter.PlayHitEffect", DamageTaken, DamageEvent, PawnInstigator, DamageCauser, bIsLocalPath); } + void DoSetRagdollPhysics() { NativeCall(this, "APrimalCharacter.DoSetRagdollPhysics"); } + void SetRagdollPhysics(bool bUseRagdollLocationOffset, bool bForceRecreateBones, bool bForLoading) { NativeCall(this, "APrimalCharacter.SetRagdollPhysics", bUseRagdollLocationOffset, bForceRecreateBones, bForLoading); } + void CheckOnDinoPlatformSaddle() { NativeCall(this, "APrimalCharacter.CheckOnDinoPlatformSaddle"); } + void ForceSleepRagdollEx() { NativeCall(this, "APrimalCharacter.ForceSleepRagdollEx"); } + void ForceSleepRagdoll() { NativeCall(this, "APrimalCharacter.ForceSleepRagdoll"); } + void ClearRagdollPhysics() { NativeCall(this, "APrimalCharacter.ClearRagdollPhysics"); } + void DoFindGoodSpot(FVector RagdollLoc, bool bClearCollisionSweep) { NativeCall(this, "APrimalCharacter.DoFindGoodSpot", RagdollLoc, bClearCollisionSweep); } + void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall(this, "APrimalCharacter.SetSleeping", bSleeping, bUseRagdollLocationOffset); } + void ExecSetSleeping(bool bEnable) { NativeCall(this, "APrimalCharacter.ExecSetSleeping", bEnable); } + void ChangeActorTeam(int NewTeam) { NativeCall(this, "APrimalCharacter.ChangeActorTeam", NewTeam); } + void UpdateTribeName(FString NewTribeName) { NativeCall(this, "APrimalCharacter.UpdateTribeName", NewTribeName); } + void NetUpdateTribeName_Implementation(FString * NewTribeName) { NativeCall(this, "APrimalCharacter.NetUpdateTribeName_Implementation", NewTribeName); } + float GetMaxCursorHUDDistance(AShooterPlayerController * PC) { return NativeCall(this, "APrimalCharacter.GetMaxCursorHUDDistance", PC); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalCharacter.DrawHUD", HUD); } + bool IsSubmerged(bool bDontCheckSwimming, bool bUseFullThreshold, bool bForceCheck, bool bFromVolumeChange) { return NativeCall(this, "APrimalCharacter.IsSubmerged", bDontCheckSwimming, bUseFullThreshold, bForceCheck, bFromVolumeChange); } + float GetWaterSubmergedDepthThreshold() { return NativeCall(this, "APrimalCharacter.GetWaterSubmergedDepthThreshold"); } + float PlayAnimMontage(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall(this, "APrimalCharacter.PlayAnimMontage", AnimMontage, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } + void StopAnimMontage(UAnimMontage * AnimMontage) { NativeCall(this, "APrimalCharacter.StopAnimMontage", AnimMontage); } + bool IsMontagePlaying(UAnimMontage * AnimMontage, float TimeFromEndToConsiderFinished) { return NativeCall(this, "APrimalCharacter.IsMontagePlaying", AnimMontage, TimeFromEndToConsiderFinished); } + void StopAllAnimMontages(float BlendOutTime) { NativeCall(this, "APrimalCharacter.StopAllAnimMontages", BlendOutTime); } + void TryGiveDefaultWeapon() { NativeCall(this, "APrimalCharacter.TryGiveDefaultWeapon"); } + void TryPoop() { NativeCall(this, "APrimalCharacter.TryPoop"); } + void OrbitCamToggle() { NativeCall(this, "APrimalCharacter.OrbitCamToggle"); } + void OrbitCamOn() { NativeCall(this, "APrimalCharacter.OrbitCamOn"); } + void OrbitCamOff() { NativeCall(this, "APrimalCharacter.OrbitCamOff"); } + void ServerRequestDrag_Implementation() { NativeCall(this, "APrimalCharacter.ServerRequestDrag_Implementation"); } + void ServerDinoOrder_Implementation(APrimalDinoCharacter * aDino, EDinoTamedOrder::Type OrderType, AActor * enemyTarget) { NativeCall(this, "APrimalCharacter.ServerDinoOrder_Implementation", aDino, OrderType, enemyTarget); } + void MoveForward(float Val) { NativeCall(this, "APrimalCharacter.MoveForward", Val); } + void MoveRight(float Val) { NativeCall(this, "APrimalCharacter.MoveRight", Val); } + void MoveUp(float Val) { NativeCall(this, "APrimalCharacter.MoveUp", Val); } + void TurnInput(float Val) { NativeCall(this, "APrimalCharacter.TurnInput", Val); } + void LookInput(float Val) { NativeCall(this, "APrimalCharacter.LookInput", Val); } + void TurnAtRate(float Val) { NativeCall(this, "APrimalCharacter.TurnAtRate", Val); } + void LookUpAtRate(float Val) { NativeCall(this, "APrimalCharacter.LookUpAtRate", Val); } + bool IsGameInputAllowed() { return NativeCall(this, "APrimalCharacter.IsGameInputAllowed"); } + bool IsInputAllowed() { return NativeCall(this, "APrimalCharacter.IsInputAllowed"); } + void OnStartRunning() { NativeCall(this, "APrimalCharacter.OnStartRunning"); } + void OnStopRunning() { NativeCall(this, "APrimalCharacter.OnStopRunning"); } + void OnRunToggle() { NativeCall(this, "APrimalCharacter.OnRunToggle"); } + bool IsRunning() { return NativeCall(this, "APrimalCharacter.IsRunning"); } + bool IsMoving() { return NativeCall(this, "APrimalCharacter.IsMoving"); } + void UpdateStatusComponent(float DeltaSeconds) { NativeCall(this, "APrimalCharacter.UpdateStatusComponent", DeltaSeconds); } + void SetBoundsScale(float NewScale) { NativeCall(this, "APrimalCharacter.SetBoundsScale", NewScale); } + void UpdateStencilValues() { NativeCall(this, "APrimalCharacter.UpdateStencilValues"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APrimalCharacter.Tick", DeltaSeconds); } + void SetCharacterMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall(this, "APrimalCharacter.SetCharacterMeshesMaterialScalarParamValue", ParamName, Value); } + void UpdateSwimmingState() { NativeCall(this, "APrimalCharacter.UpdateSwimmingState"); } + FVector * GetRootBodyBoneLocation(FVector * result) { return NativeCall(this, "APrimalCharacter.GetRootBodyBoneLocation", result); } + void ZoomIn() { NativeCall(this, "APrimalCharacter.ZoomIn"); } + void ZoomOut() { NativeCall(this, "APrimalCharacter.ZoomOut"); } + void OnStartJump() { NativeCall(this, "APrimalCharacter.OnStartJump"); } + void PlayJumpAnim() { NativeCall(this, "APrimalCharacter.PlayJumpAnim"); } + void PlayLandedAnim() { NativeCall(this, "APrimalCharacter.PlayLandedAnim"); } + void OnJumped_Implementation() { NativeCall(this, "APrimalCharacter.OnJumped_Implementation"); } + void NetOnJumped_Implementation() { NativeCall(this, "APrimalCharacter.NetOnJumped_Implementation"); } + void OnStopJump() { NativeCall(this, "APrimalCharacter.OnStopJump"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalCharacter.GetLifetimeReplicatedProps", OutLifetimeProps); } + float GetRunningSpeedModifier(bool bIsForDefaultSpeed) { return NativeCall(this, "APrimalCharacter.GetRunningSpeedModifier", bIsForDefaultSpeed); } + float GetMaxHealth() { return NativeCall(this, "APrimalCharacter.GetMaxHealth"); } + bool AllowFirstPerson() { return NativeCall(this, "APrimalCharacter.AllowFirstPerson"); } + AActor * GetAimedActor(ECollisionChannel CollisionChannel, UActorComponent ** HitComponent, float MaxDistanceOverride, float CheckRadius, int * hitBodyIndex, FHitResult * outHitResult, bool bForceUseCameraLocation, bool bForceUpdateAimedActors) { return NativeCall(this, "APrimalCharacter.GetAimedActor", CollisionChannel, HitComponent, MaxDistanceOverride, CheckRadius, hitBodyIndex, outHitResult, bForceUseCameraLocation, bForceUpdateAimedActors); } + void OnPrimalCharacterSleeped() { NativeCall(this, "APrimalCharacter.OnPrimalCharacterSleeped"); } + void OnPrimalCharacterUnsleeped() { NativeCall(this, "APrimalCharacter.OnPrimalCharacterUnsleeped"); } + float PlayAnimEx(UAnimMontage * AnimMontage, float InPlayRate, FName StartSectionName, bool bReplicate, bool bReplicateToOwner, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer) { return NativeCall(this, "APrimalCharacter.PlayAnimEx", AnimMontage, InPlayRate, StartSectionName, bReplicate, bReplicateToOwner, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer); } + void StopAnimEx(UAnimMontage * AnimMontage, bool bReplicate, bool bReplicateToOwner, float BlendOutTime) { NativeCall(this, "APrimalCharacter.StopAnimEx", AnimMontage, bReplicate, bReplicateToOwner, BlendOutTime); } + void ClientPlayAnimation_Implementation(UAnimMontage * AnimMontage, float PlayRate, FName StartSectionName, bool bPlayOnOwner, bool bForceTickPoseAndServerUpdateMesh) { NativeCall(this, "APrimalCharacter.ClientPlayAnimation_Implementation", AnimMontage, PlayRate, StartSectionName, bPlayOnOwner, bForceTickPoseAndServerUpdateMesh); } + void ClientStopAnimation_Implementation(UAnimMontage * AnimMontage, bool bStopOnOwner, float BlendOutTime) { NativeCall(this, "APrimalCharacter.ClientStopAnimation_Implementation", AnimMontage, bStopOnOwner, BlendOutTime); } + void SetRunning(bool bNewRunning) { NativeCall(this, "APrimalCharacter.SetRunning", bNewRunning); } + void ServerSetRunning_Implementation(bool bNewRunning) { NativeCall(this, "APrimalCharacter.ServerSetRunning_Implementation", bNewRunning); } + void UpdateRunSounds(bool bNewRunning) { NativeCall(this, "APrimalCharacter.UpdateRunSounds", bNewRunning); } + void ControllerLeavingGame(AShooterPlayerController * theController) { NativeCall(this, "APrimalCharacter.ControllerLeavingGame", theController); } + float GetLowHealthPercentage() { return NativeCall(this, "APrimalCharacter.GetLowHealthPercentage"); } + bool IsAlive() { return NativeCall(this, "APrimalCharacter.IsAlive"); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "APrimalCharacter.GetDescriptiveName", result); } + FString * GetShortName(FString * result) { return NativeCall(this, "APrimalCharacter.GetShortName", result); } + float GetHealthPercentage() { return NativeCall(this, "APrimalCharacter.GetHealthPercentage"); } + float GetHealth() { return NativeCall(this, "APrimalCharacter.GetHealth"); } + FVector * GetInterpolatedLocation(FVector * result) { return NativeCall(this, "APrimalCharacter.GetInterpolatedLocation", result); } + FRotator * GetInterpolatedRotation(FRotator * result) { return NativeCall(this, "APrimalCharacter.GetInterpolatedRotation", result); } + float GetClientRotationInterpSpeed(FVector * RootLoc) { return NativeCall(this, "APrimalCharacter.GetClientRotationInterpSpeed", RootLoc); } + FRotator * GetAimOffsets(FRotator * result, float DeltaTime, FRotator * RootRotOffset, float * RootYawSpeed, float MaxYawAimClamp, FVector * RootLocOffset) { return NativeCall(this, "APrimalCharacter.GetAimOffsets", result, DeltaTime, RootRotOffset, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } + void ForceRefreshBones() { NativeCall(this, "APrimalCharacter.ForceRefreshBones"); } + void StartForceSkelUpdate(float ForTime, bool bForceUpdateMesh, bool bServerOnly) { NativeCall(this, "APrimalCharacter.StartForceSkelUpdate", ForTime, bForceUpdateMesh, bServerOnly); } + void EndForceSkelUpdate() { NativeCall(this, "APrimalCharacter.EndForceSkelUpdate"); } + bool IsConscious() { return NativeCall(this, "APrimalCharacter.IsConscious"); } + void Stasis() { NativeCall(this, "APrimalCharacter.Stasis"); } + void Unstasis() { NativeCall(this, "APrimalCharacter.Unstasis"); } + UPrimalCharacterStatusComponent * GetCharacterStatusComponent() { return NativeCall(this, "APrimalCharacter.GetCharacterStatusComponent"); } + void DrawLocalPlayerHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalCharacter.DrawLocalPlayerHUD", HUD); } + bool IsInStatusState(EPrimalCharacterStatusState::Type StatusStateType) { return NativeCall(this, "APrimalCharacter.IsInStatusState", StatusStateType); } + bool IsValidForStatusUpdate() { return NativeCall(this, "APrimalCharacter.IsValidForStatusUpdate"); } + float GetMaxSpeedModifier() { return NativeCall(this, "APrimalCharacter.GetMaxSpeedModifier"); } + float GetJumpZModifier() { return NativeCall(this, "APrimalCharacter.GetJumpZModifier"); } + bool CanBeBaseForCharacter(APawn * Pawn) { return NativeCall(this, "APrimalCharacter.CanBeBaseForCharacter", Pawn); } + float GetDefaultMovementSpeed() { return NativeCall(this, "APrimalCharacter.GetDefaultMovementSpeed"); } + void TakeFallingDamage(FHitResult * Hit) { NativeCall(this, "APrimalCharacter.TakeFallingDamage", Hit); } + void OnLanded(FHitResult * Hit) { NativeCall(this, "APrimalCharacter.OnLanded", Hit); } + void NetDidLand_Implementation() { NativeCall(this, "APrimalCharacter.NetDidLand_Implementation"); } + void DidLand() { NativeCall(this, "APrimalCharacter.DidLand"); } + void FadeOutLoadingMusic() { NativeCall(this, "APrimalCharacter.FadeOutLoadingMusic"); } + void LocalPossessedBy(APlayerController * ByController) { NativeCall(this, "APrimalCharacter.LocalPossessedBy", ByController); } + void LocalUnpossessed_Implementation() { NativeCall(this, "APrimalCharacter.LocalUnpossessed_Implementation"); } + void PlayFootstep() { NativeCall(this, "APrimalCharacter.PlayFootstep"); } + EPhysicalSurface GetFootPhysicalSurfaceType(bool bForce) { return NativeCall(this, "APrimalCharacter.GetFootPhysicalSurfaceType", bForce); } + bool ModifyInputAcceleration(FVector * InputAcceleration) { return NativeCall(this, "APrimalCharacter.ModifyInputAcceleration", InputAcceleration); } + bool ShouldAttackStopMoveCollapsing() { return NativeCall(this, "APrimalCharacter.ShouldAttackStopMoveCollapsing"); } + bool AnimationPreventsInput() { return NativeCall(this, "APrimalCharacter.AnimationPreventsInput"); } + float SetHealth(float newHealth) { return NativeCall(this, "APrimalCharacter.SetHealth", newHealth); } + bool IsOfTribe(int ID) { return NativeCall(this, "APrimalCharacter.IsOfTribe", ID); } + void SetRagdollReplication(bool Enabled) { NativeCall(this, "APrimalCharacter.SetRagdollReplication", Enabled); } + void ReplicateRagdoll() { NativeCall(this, "APrimalCharacter.ReplicateRagdoll"); } + void InitRagdollRepConstraints() { NativeCall(this, "APrimalCharacter.InitRagdollRepConstraints"); } + void TermRagdollRepConstraints() { NativeCall(this, "APrimalCharacter.TermRagdollRepConstraints"); } + void ClientRagdollUpdate_Implementation(TArray * BoneLocations, FRotator_NetQuantize TargetRootRotation) { NativeCall *, FRotator_NetQuantize>(this, "APrimalCharacter.ClientRagdollUpdate_Implementation", BoneLocations, TargetRootRotation); } + void SleepBodies() { NativeCall(this, "APrimalCharacter.SleepBodies"); } + void UpdateRagdollReplicationOnClient() { NativeCall(this, "APrimalCharacter.UpdateRagdollReplicationOnClient"); } + void ClientEndRagdollUpdate_Implementation() { NativeCall(this, "APrimalCharacter.ClientEndRagdollUpdate_Implementation"); } + void OnRep_RagdollPositions() { NativeCall(this, "APrimalCharacter.OnRep_RagdollPositions"); } + void InitRagdollReplication() { NativeCall(this, "APrimalCharacter.InitRagdollReplication"); } + bool CanDragCharacter(APrimalCharacter * Character) { return NativeCall(this, "APrimalCharacter.CanDragCharacter", Character); } + bool CanBeDragged() { return NativeCall(this, "APrimalCharacter.CanBeDragged"); } + bool IsInvincible() { return NativeCall(this, "APrimalCharacter.IsInvincible"); } + int GetNearestBoneIndexForDrag(APrimalCharacter * Character, FVector HitLocation) { return NativeCall(this, "APrimalCharacter.GetNearestBoneIndexForDrag", Character, HitLocation); } + void TryDragCharacter() { NativeCall(this, "APrimalCharacter.TryDragCharacter"); } + void UpdateDragging() { NativeCall(this, "APrimalCharacter.UpdateDragging"); } + void OnBeginDrag_Implementation(APrimalCharacter * Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall(this, "APrimalCharacter.OnBeginDrag_Implementation", Dragged, BoneIndex, bWithGrapHook); } + void OnEndDrag_Implementation() { NativeCall(this, "APrimalCharacter.OnEndDrag_Implementation"); } + void OnBeginDragged(APrimalCharacter * Dragger) { NativeCall(this, "APrimalCharacter.OnBeginDragged", Dragger); } + void OnEndDragged(APrimalCharacter * Dragger) { NativeCall(this, "APrimalCharacter.OnEndDragged", Dragger); } + bool CanBeCarried(APrimalCharacter * ByCarrier) { return NativeCall(this, "APrimalCharacter.CanBeCarried", ByCarrier); } + float GetKillXP() { return NativeCall(this, "APrimalCharacter.GetKillXP"); } + void UpdateIK() { NativeCall(this, "APrimalCharacter.UpdateIK"); } + void SetEnableIK(bool bEnable, bool bForceOnDedicated) { NativeCall(this, "APrimalCharacter.SetEnableIK", bEnable, bForceOnDedicated); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalCharacter.TryMultiUse", ForPC, UseIndex); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "APrimalCharacter.ClientMultiUse", ForPC, UseIndex); } + void ForceTickPoseDelta() { NativeCall(this, "APrimalCharacter.ForceTickPoseDelta"); } + void CheckJumpOutOfWater() { NativeCall(this, "APrimalCharacter.CheckJumpOutOfWater"); } + bool IsTargetableDead() { return NativeCall(this, "APrimalCharacter.IsTargetableDead"); } + EShooterPhysMaterialType::Type GetTargetableDamageFXDefaultPhysMaterial() { return NativeCall(this, "APrimalCharacter.GetTargetableDamageFXDefaultPhysMaterial"); } + void Poop(bool bForcePoop) { NativeCall(this, "APrimalCharacter.Poop", bForcePoop); } + void EmitPoop() { NativeCall(this, "APrimalCharacter.EmitPoop"); } + bool IsValidForStatusRecovery() { return NativeCall(this, "APrimalCharacter.IsValidForStatusRecovery"); } + bool GetGroundLocation(FVector * theGroundLoc, FVector * OffsetUp, FVector * OffsetDown) { return NativeCall(this, "APrimalCharacter.GetGroundLocation", theGroundLoc, OffsetUp, OffsetDown); } + void DeathHarvestingFadeOut_Implementation() { NativeCall(this, "APrimalCharacter.DeathHarvestingFadeOut_Implementation"); } + void ServerUploadCharacter(AShooterPlayerController * UploadedBy) { NativeCall(this, "APrimalCharacter.ServerUploadCharacter", UploadedBy); } + FRotator * GetBaseAimRotation(FRotator * result) { return NativeCall(this, "APrimalCharacter.GetBaseAimRotation", result); } + void ApplyDamageMomentum(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void NetAddCharacterMovementImpulse_Implementation(FVector Impulse, bool bVelChange, float ImpulseExponent, bool bSetNewMovementMode, EMovementMode NewMovementMode, bool bOverrideMaxImpulseZ) { NativeCall(this, "APrimalCharacter.NetAddCharacterMovementImpulse_Implementation", Impulse, bVelChange, ImpulseExponent, bSetNewMovementMode, NewMovementMode, bOverrideMaxImpulseZ); } + void NetSetCharacterMovementVelocity_Implementation(bool bSetNewVelocity, FVector NewVelocity, bool bSetNewMovementMode, EMovementMode NewMovementMode) { NativeCall(this, "APrimalCharacter.NetSetCharacterMovementVelocity_Implementation", bSetNewVelocity, NewVelocity, bSetNewMovementMode, NewMovementMode); } + bool AllowSaving() { return NativeCall(this, "APrimalCharacter.AllowSaving"); } + bool IsWatered() { return NativeCall(this, "APrimalCharacter.IsWatered"); } + void LoadedFromSaveGame() { NativeCall(this, "APrimalCharacter.LoadedFromSaveGame"); } + FVector * GetTargetingLocation(FVector * result) { return NativeCall(this, "APrimalCharacter.GetTargetingLocation", result); } + void CheckJumpInput(float DeltaTime) { NativeCall(this, "APrimalCharacter.CheckJumpInput", DeltaTime); } + void ServerTryPoop_Implementation() { NativeCall(this, "APrimalCharacter.ServerTryPoop_Implementation"); } + void ClientFailedPoop_Implementation() { NativeCall(this, "APrimalCharacter.ClientFailedPoop_Implementation"); } + void ClientDidPoop_Implementation() { NativeCall(this, "APrimalCharacter.ClientDidPoop_Implementation"); } + void TryAccessInventoryWrapper() { NativeCall(this, "APrimalCharacter.TryAccessInventoryWrapper"); } + bool TryAccessInventory() { return NativeCall(this, "APrimalCharacter.TryAccessInventory"); } + bool IsRagdolled() { return NativeCall(this, "APrimalCharacter.IsRagdolled"); } + static void ForceUpdateAimedCharacters(UWorld * World, FVector * StartLoc, FVector * EndLoc, AActor * IgnoreActor, bool bForceUpdateIgnoreActor, float TraceRadius) { NativeCall(nullptr, "APrimalCharacter.ForceUpdateAimedCharacters", World, StartLoc, EndLoc, IgnoreActor, bForceUpdateIgnoreActor, TraceRadius); } + void NetForceUpdateAimedCharacters_Implementation(FVector StartLoc, FVector EndLoc, AActor * IgnoreActor, bool bForceUpdateIgnoreActor, float TraceRadius) { NativeCall(this, "APrimalCharacter.NetForceUpdateAimedCharacters_Implementation", StartLoc, EndLoc, IgnoreActor, bForceUpdateIgnoreActor, TraceRadius); } + bool HasBuff(TSubclassOf BuffClass, bool useExactMatch) { return NativeCall, bool>(this, "APrimalCharacter.HasBuff", BuffClass, useExactMatch); } + APrimalBuff * GetBuff(TSubclassOf BuffClass) { return NativeCall>(this, "APrimalCharacter.GetBuff", BuffClass); } + APrimalBuff * GetBuffForPostEffect(UMaterialInterface * anEffect) { return NativeCall(this, "APrimalCharacter.GetBuffForPostEffect", anEffect); } + void RemoveAllJumpDeactivatedBuffs(APrimalBuff * IgnoredBuff) { NativeCall(this, "APrimalCharacter.RemoveAllJumpDeactivatedBuffs", IgnoredBuff); } + void AttachGPSTransponder(APrimalStructureExplosiveTransGPS * Transponder) { NativeCall(this, "APrimalCharacter.AttachGPSTransponder", Transponder); } + void UpdateNetDynamicMusic() { NativeCall(this, "APrimalCharacter.UpdateNetDynamicMusic"); } + void NetPlaySoundOnCharacter_Implementation(USoundBase * SoundToPlay, bool bPlayOnOwner) { NativeCall(this, "APrimalCharacter.NetPlaySoundOnCharacter_Implementation", SoundToPlay, bPlayOnOwner); } + bool IsMeshGameplayRelevant() { return NativeCall(this, "APrimalCharacter.IsMeshGameplayRelevant"); } + float GetCorpseDecayRate() { return NativeCall(this, "APrimalCharacter.GetCorpseDecayRate"); } + void TagFriendlyStructures() { NativeCall(this, "APrimalCharacter.TagFriendlyStructures"); } + void OnAttachedToCharacter() { NativeCall(this, "APrimalCharacter.OnAttachedToCharacter"); } + void OnDetachedFromCharacter(APrimalCharacter * aCharacter, int OverrideDirection) { NativeCall(this, "APrimalCharacter.OnDetachedFromCharacter", aCharacter, OverrideDirection); } + void ClearMountedDino(bool fromMountedDino) { NativeCall(this, "APrimalCharacter.ClearMountedDino", fromMountedDino); } + bool DinoMountOnMe(APrimalDinoCharacter * dinoCharacter) { return NativeCall(this, "APrimalCharacter.DinoMountOnMe", dinoCharacter); } + bool CanMountOnMe(APrimalDinoCharacter * dinoCharacter) { return NativeCall(this, "APrimalCharacter.CanMountOnMe", dinoCharacter); } + void OnRep_MountedDino() { NativeCall(this, "APrimalCharacter.OnRep_MountedDino"); } + float GetDragWeight(APrimalCharacter * ForDragger) { return NativeCall(this, "APrimalCharacter.GetDragWeight", ForDragger); } + void SetBase(UPrimitiveComponent * NewBaseComponent, FName BoneName, bool bNotifyPawn) { NativeCall(this, "APrimalCharacter.SetBase", NewBaseComponent, BoneName, bNotifyPawn); } + void UnPossessed() { NativeCall(this, "APrimalCharacter.UnPossessed"); } + void TryCallAttackTarget() { NativeCall(this, "APrimalCharacter.TryCallAttackTarget"); } + void TryCallMoveTo() { NativeCall(this, "APrimalCharacter.TryCallMoveTo"); } + UTexture2D * GetOverrideDefaultCharacterParamTexture(FName theParamName, UTexture2D * CurrentTexture) { return NativeCall(this, "APrimalCharacter.GetOverrideDefaultCharacterParamTexture", theParamName, CurrentTexture); } + bool CanBePainted() { return NativeCall(this, "APrimalCharacter.CanBePainted"); } + UPaintingTexture * GetPaintingTexture() { return NativeCall(this, "APrimalCharacter.GetPaintingTexture"); } + bool AllowColoringBy(APlayerController * ForPC, UObject * anItem) { return NativeCall(this, "APrimalCharacter.AllowColoringBy", ForPC, anItem); } + void NetStopAllAnimMontage_Implementation() { NativeCall(this, "APrimalCharacter.NetStopAllAnimMontage_Implementation"); } + void DeactivateBuffs(TSubclassOf ForBuffClass, UPrimalItem * ForInstigatorItem, bool perfectClassMatch) { NativeCall, UPrimalItem *, bool>(this, "APrimalCharacter.DeactivateBuffs", ForBuffClass, ForInstigatorItem, perfectClassMatch); } + bool ExcludePostProcessBlendableMaterial(UMaterialInterface * BlendableMaterialInterface) { return NativeCall(this, "APrimalCharacter.ExcludePostProcessBlendableMaterial", BlendableMaterialInterface); } + FVector * GetVelocity(FVector * result, bool bIsForRagdoll) { return NativeCall(this, "APrimalCharacter.GetVelocity", result, bIsForRagdoll); } + void TryCallStayOne() { NativeCall(this, "APrimalCharacter.TryCallStayOne"); } + void TryCallFollowOne() { NativeCall(this, "APrimalCharacter.TryCallFollowOne"); } + void TryCallFollowDistanceCycleOne() { NativeCall(this, "APrimalCharacter.TryCallFollowDistanceCycleOne"); } + void OnRep_AttachmentReplication() { NativeCall(this, "APrimalCharacter.OnRep_AttachmentReplication"); } + bool SimulatedPreventBasedPhysics() { return NativeCall(this, "APrimalCharacter.SimulatedPreventBasedPhysics"); } + APrimalDinoCharacter * GetBasedOnDino() { return NativeCall(this, "APrimalCharacter.GetBasedOnDino"); } + FVector * GetTargetPathfindingLocation(FVector * result) { return NativeCall(this, "APrimalCharacter.GetTargetPathfindingLocation", result); } + void ClientHandleNetDestroy() { NativeCall(this, "APrimalCharacter.ClientHandleNetDestroy"); } + bool UseClearOnConsumeInput() { return NativeCall(this, "APrimalCharacter.UseClearOnConsumeInput"); } + float GetDamageTorpidityIncreaseMultiplierScale() { return NativeCall(this, "APrimalCharacter.GetDamageTorpidityIncreaseMultiplierScale"); } + float GetIndirectTorpidityIncreaseMultiplierScale() { return NativeCall(this, "APrimalCharacter.GetIndirectTorpidityIncreaseMultiplierScale"); } + void NotifyBumpedByPawn(APrimalCharacter * ByPawn) { NativeCall(this, "APrimalCharacter.NotifyBumpedByPawn", ByPawn); } + void NotifyBumpedPawn(APawn * BumpedPawn) { NativeCall(this, "APrimalCharacter.NotifyBumpedPawn", BumpedPawn); } + void PossessedBy(AController * NewController) { NativeCall(this, "APrimalCharacter.PossessedBy", NewController); } + void BPNetAddCharacterMovementImpulse(FVector Impulse, bool bVelChange, float ImpulseExponent, bool bSetNewMovementMode, EMovementMode NewMovementMode, bool bOverrideMaxImpulseZ) { NativeCall(this, "APrimalCharacter.BPNetAddCharacterMovementImpulse", Impulse, bVelChange, ImpulseExponent, bSetNewMovementMode, NewMovementMode, bOverrideMaxImpulseZ); } + void BPNetSetCharacterMovementVelocity(bool bSetNewVelocity, FVector NewVelocity, bool bSetNewMovementMode, EMovementMode NewMovementMode) { NativeCall(this, "APrimalCharacter.BPNetSetCharacterMovementVelocity", bSetNewVelocity, NewVelocity, bSetNewMovementMode, NewMovementMode); } + float GetGravityZScale() { return NativeCall(this, "APrimalCharacter.GetGravityZScale"); } + void OnMovementModeChanged(EMovementMode PrevMovementMode, char PreviousCustomMode) { NativeCall(this, "APrimalCharacter.OnMovementModeChanged", PrevMovementMode, PreviousCustomMode); } + void EnableBPTimerServer(bool bEnable) { NativeCall(this, "APrimalCharacter.EnableBPTimerServer", bEnable); } + void EnableBPTimerNonDedicated(bool bEnable) { NativeCall(this, "APrimalCharacter.EnableBPTimerNonDedicated", bEnable); } + void CheckRagdollPenetration() { NativeCall(this, "APrimalCharacter.CheckRagdollPenetration"); } + APrimalStructureExplosive * GetAttachedExplosive() { return NativeCall(this, "APrimalCharacter.GetAttachedExplosive"); } + bool IsInVacuumSealedSpace() { return NativeCall(this, "APrimalCharacter.IsInVacuumSealedSpace"); } + void DownCallOne() { NativeCall(this, "APrimalCharacter.DownCallOne"); } + float BPModifyFOV_Implementation(float FOVIn) { return NativeCall(this, "APrimalCharacter.BPModifyFOV_Implementation", FOVIn); } + FVector * OverrideNewFallVelocity(FVector * result, FVector * InitialVelocity, FVector * Gravity, float DeltaTime) { return NativeCall(this, "APrimalCharacter.OverrideNewFallVelocity", result, InitialVelocity, Gravity, DeltaTime); } + void SetDynamicMusic(USoundBase * newMusic) { NativeCall(this, "APrimalCharacter.SetDynamicMusic", newMusic); } + bool PreventsTargeting_Implementation(AActor * ByActor) { return NativeCall(this, "APrimalCharacter.PreventsTargeting_Implementation", ByActor); } + bool PreventInputType(EPrimalCharacterInputType::Type inputType) { return NativeCall(this, "APrimalCharacter.PreventInputType", inputType); } + bool IsAlliedWithOtherTeam(int OtherTeamID) { return NativeCall(this, "APrimalCharacter.IsAlliedWithOtherTeam", OtherTeamID); } + void ResetCollisionSweepLocation(FVector * newLocation) { NativeCall(this, "APrimalCharacter.ResetCollisionSweepLocation", newLocation); } + void DidTeleport_Implementation(FVector newLoc, FRotator newRot) { NativeCall(this, "APrimalCharacter.DidTeleport_Implementation", newLoc, newRot); } + void FinalLoadedFromSaveGame() { NativeCall(this, "APrimalCharacter.FinalLoadedFromSaveGame"); } + void DoExecuteActorConstruction(FTransform * Transform, bool bIsDefaultTransform) { NativeCall(this, "APrimalCharacter.DoExecuteActorConstruction", Transform, bIsDefaultTransform); } + void UpdateSimulatedPosition(FVector * NewLocation, FRotator * NewRotation) { NativeCall(this, "APrimalCharacter.UpdateSimulatedPosition", NewLocation, NewRotation); } + void NotifyItemQuantityUpdated(UPrimalItem * anItem, int amount) { NativeCall(this, "APrimalCharacter.NotifyItemQuantityUpdated", anItem, amount); } + void NotifyItemAdded(UPrimalItem * anItem, bool bEquipItem) { NativeCall(this, "APrimalCharacter.NotifyItemAdded", anItem, bEquipItem); } + void NotifyItemRemoved(UPrimalItem * anItem) { NativeCall(this, "APrimalCharacter.NotifyItemRemoved", anItem); } + void TeleportSucceeded(bool bIsATest, bool bSimpleTeleport) { NativeCall(this, "APrimalCharacter.TeleportSucceeded", bIsATest, bSimpleTeleport); } + bool IsAttachedToSomething() { return NativeCall(this, "APrimalCharacter.IsAttachedToSomething"); } + bool UseFastTurretTargeting() { return NativeCall(this, "APrimalCharacter.UseFastTurretTargeting"); } + bool IsProneOrSitting(bool bIgnoreLockedToSeat) { return NativeCall(this, "APrimalCharacter.IsProneOrSitting", bIgnoreLockedToSeat); } + bool CharacterIsCarriedAsPassenger() { return NativeCall(this, "APrimalCharacter.CharacterIsCarriedAsPassenger"); } + void DoCharacterDetachment(bool bIncludeRiding, bool bIncludeCarrying, APrimalBuff * BuffToIgnore) { NativeCall(this, "APrimalCharacter.DoCharacterDetachment", bIncludeRiding, bIncludeCarrying, BuffToIgnore); } + bool IsCharacterHardAttached(bool bIgnoreRiding, bool bIgnoreCarried) { return NativeCall(this, "APrimalCharacter.IsCharacterHardAttached", bIgnoreRiding, bIgnoreCarried); } + void InitializedAnimScriptInstance() { NativeCall(this, "APrimalCharacter.InitializedAnimScriptInstance"); } + bool ForceAddUnderwaterCharacterStatusValues() { return NativeCall(this, "APrimalCharacter.ForceAddUnderwaterCharacterStatusValues"); } + UObject * GetUObjectInterfaceTargetableInterface() { return NativeCall(this, "APrimalCharacter.GetUObjectInterfaceTargetableInterface"); } + float GetBaseDragWeight() { return NativeCall(this, "APrimalCharacter.GetBaseDragWeight"); } + static void StaticRegisterNativesAPrimalCharacter() { NativeCall(nullptr, "APrimalCharacter.StaticRegisterNativesAPrimalCharacter"); } + float BPAdjustDamage(float IncomingDamage, FDamageEvent TheDamageEvent, AController * EventInstigator, AActor * DamageCauser, bool bIsPointDamage, FHitResult PointHitInfo) { return NativeCall(this, "APrimalCharacter.BPAdjustDamage", IncomingDamage, TheDamageEvent, EventInstigator, DamageCauser, bIsPointDamage, PointHitInfo); } + FRotator * BPCameraBaseOrientation(FRotator * result, APrimalCharacter * viewingCharacter) { return NativeCall(this, "APrimalCharacter.BPCameraBaseOrientation", result, viewingCharacter); } + FRotator * BPCameraRotationFinal(FRotator * result, APrimalCharacter * viewingCharacter, FRotator * InCurrentFinalRot) { return NativeCall(this, "APrimalCharacter.BPCameraRotationFinal", result, viewingCharacter, InCurrentFinalRot); } + bool BPCanNotifyTeamAggroAI(APrimalDinoCharacter * Dino) { return NativeCall(this, "APrimalCharacter.BPCanNotifyTeamAggroAI", Dino); } + FVector * BPGetFPVViewLocation(FVector * result, APrimalCharacter * viewingCharacter) { return NativeCall(this, "APrimalCharacter.BPGetFPVViewLocation", result, viewingCharacter); } + float BPModifyViewHitDir(APrimalCharacter * viewingCharacter, float InViewHitDir) { return NativeCall(this, "APrimalCharacter.BPModifyViewHitDir", viewingCharacter, InViewHitDir); } + void BPNotifyLevelUp(int ExtraCharacterLevel) { NativeCall(this, "APrimalCharacter.BPNotifyLevelUp", ExtraCharacterLevel); } + FVector * BPOverrideCharacterNewFallVelocity(FVector * result, FVector * InitialVelocity, FVector * Gravity, float DeltaTime) { return NativeCall(this, "APrimalCharacter.BPOverrideCharacterNewFallVelocity", result, InitialVelocity, Gravity, DeltaTime); } + bool BPOverrideFPVViewLocation(APrimalCharacter * viewingCharacter) { return NativeCall(this, "APrimalCharacter.BPOverrideFPVViewLocation", viewingCharacter); } + void LocalUnpossessed() { NativeCall(this, "APrimalCharacter.LocalUnpossessed"); } + void NetPlaySoundOnCharacter(USoundBase * SoundToPlay, bool bPlayOnOwner) { NativeCall(this, "APrimalCharacter.NetPlaySoundOnCharacter", SoundToPlay, bPlayOnOwner); } + void NetUpdateTribeName(FString * NewTribeName) { NativeCall(this, "APrimalCharacter.NetUpdateTribeName", NewTribeName); } + void OnBeginDrag(APrimalCharacter * Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall(this, "APrimalCharacter.OnBeginDrag", Dragged, BoneIndex, bWithGrapHook); } + void OnEndDrag() { NativeCall(this, "APrimalCharacter.OnEndDrag"); } + void PlayDyingGeneric(float KillingDamage, FDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDyingGeneric", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayDyingPoint(float KillingDamage, FPointDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDyingPoint", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayDyingRadial(float KillingDamage, FRadialDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayDyingRadial", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayHitEffectPoint(float DamageTaken, FPointDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayHitEffectPoint", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void PlayHitEffectRadial(float DamageTaken, FRadialDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalCharacter.PlayHitEffectRadial", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + bool PreventsTargeting(AActor * ByActor) { return NativeCall(this, "APrimalCharacter.PreventsTargeting", ByActor); } + void ServerCallAggressive() { NativeCall(this, "APrimalCharacter.ServerCallAggressive"); } + void ServerCallFollow() { NativeCall(this, "APrimalCharacter.ServerCallFollow"); } + void ServerCallNeutral() { NativeCall(this, "APrimalCharacter.ServerCallNeutral"); } + void ServerCallPassive() { NativeCall(this, "APrimalCharacter.ServerCallPassive"); } + void ServerCallSetAggressive() { NativeCall(this, "APrimalCharacter.ServerCallSetAggressive"); } + void ServerCallStay() { NativeCall(this, "APrimalCharacter.ServerCallStay"); } + void ServerDinoOrder(APrimalDinoCharacter * aDino, EDinoTamedOrder::Type OrderType, AActor * target) { NativeCall(this, "APrimalCharacter.ServerDinoOrder", aDino, OrderType, target); } + void ServerGiveDefaultWeapon() { NativeCall(this, "APrimalCharacter.ServerGiveDefaultWeapon"); } + void ServerRequestDrag() { NativeCall(this, "APrimalCharacter.ServerRequestDrag"); } + void ServerTryPoop() { NativeCall(this, "APrimalCharacter.ServerTryPoop"); } +}; + +struct AShooterCharacter : APrimalCharacter +{ + FieldValue SpawnIntroAnim1PField() { return { this, "AShooterCharacter.SpawnIntroAnim1P" }; } + FieldValue RespawnIntroAnim1PField() { return { this, "AShooterCharacter.RespawnIntroAnim1P" }; } + FieldValue ProneInAnimField() { return { this, "AShooterCharacter.ProneInAnim" }; } + FieldValue ProneOutAnimField() { return { this, "AShooterCharacter.ProneOutAnim" }; } + FieldValue StartRidingAnimField() { return { this, "AShooterCharacter.StartRidingAnim" }; } + FieldValue StopRidingAnimField() { return { this, "AShooterCharacter.StopRidingAnim" }; } + FieldValue TalkingAnimField() { return { this, "AShooterCharacter.TalkingAnim" }; } + FieldValue VoiceTalkingAnimField() { return { this, "AShooterCharacter.VoiceTalkingAnim" }; } + FieldValue> EmoteAnimsField() { return { this, "AShooterCharacter.EmoteAnims" }; } + FieldValue FireBallistaAnimationField() { return { this, "AShooterCharacter.FireBallistaAnimation" }; } + FieldValue ReloadBallistaAnimationField() { return { this, "AShooterCharacter.ReloadBallistaAnimation" }; } + FieldValue DraggingCharacterAnimField() { return { this, "AShooterCharacter.DraggingCharacterAnim" }; } + FieldValue bWasProneField() { return { this, "AShooterCharacter.bWasProne" }; } + FieldValue bIsPreviewCharacterField() { return { this, "AShooterCharacter.bIsPreviewCharacter" }; } + FieldValue bIsVoiceTalkingField() { return { this, "AShooterCharacter.bIsVoiceTalking" }; } + FieldValue LastStartedTalkingTimeField() { return { this, "AShooterCharacter.LastStartedTalkingTime" }; } + FieldValue OriginalCollisionHeightField() { return { this, "AShooterCharacter.OriginalCollisionHeight" }; } + FieldValue WalkBobMagnitudeField() { return { this, "AShooterCharacter.WalkBobMagnitude" }; } + FieldValue WalkBobInterpSpeedField() { return { this, "AShooterCharacter.WalkBobInterpSpeed" }; } + FieldValue TargetingTimeField() { return { this, "AShooterCharacter.TargetingTime" }; } + FieldValue BobMaxMovementSpeedField() { return { this, "AShooterCharacter.BobMaxMovementSpeed" }; } + FieldValue WeaponBobMaxMovementSpeedField() { return { this, "AShooterCharacter.WeaponBobMaxMovementSpeed" }; } + FieldValue> DefaultWeaponField() { return { this, "AShooterCharacter.DefaultWeapon" }; } + FieldValue> MapWeaponField() { return { this, "AShooterCharacter.MapWeapon" }; } + FieldValue> GPSWeaponField() { return { this, "AShooterCharacter.GPSWeapon" }; } + FieldValue> CompassWeaponField() { return { this, "AShooterCharacter.CompassWeapon" }; } + FieldValue PlayerNameField() { return { this, "AShooterCharacter.PlayerName" }; } + FieldValue> RidingDinoField() { return { this, "AShooterCharacter.RidingDino" }; } + FieldValue> LowerBodyPartRootBonesField() { return { this, "AShooterCharacter.LowerBodyPartRootBones" }; } + FieldValue DropItemAnimationField() { return { this, "AShooterCharacter.DropItemAnimation" }; } + FieldValue ThrowItemAnimationField() { return { this, "AShooterCharacter.ThrowItemAnimation" }; } + FieldValue PickupItemAnimationField() { return { this, "AShooterCharacter.PickupItemAnimation" }; } + FieldValue ActivateInventoryAnimationField() { return { this, "AShooterCharacter.ActivateInventoryAnimation" }; } + FieldValue LastDinoAimRotationOffsetField() { return { this, "AShooterCharacter.LastDinoAimRotationOffset" }; } + FieldValue LastAimRotOffsetField() { return { this, "AShooterCharacter.LastAimRotOffset" }; } + FieldValue LastGrapHookACField() { return { this, "AShooterCharacter.LastGrapHookAC" }; } + FieldValue _GrapHookCableObjectCountField() { return { this, "AShooterCharacter._GrapHookCableObjectCount" }; } + FieldValue GrapHookDefaultOffsetField() { return { this, "AShooterCharacter.GrapHookDefaultOffset" }; } + FieldValue GrapHookCableWidthField() { return { this, "AShooterCharacter.GrapHookCableWidth" }; } + FieldValue GrapHookMaterialField() { return { this, "AShooterCharacter.GrapHookMaterial" }; } + FieldValue LadderLateralJumpVelocityField() { return { this, "AShooterCharacter.LadderLateralJumpVelocity" }; } + FieldValue GrapHookPulledRopeDistanceField() { return { this, "AShooterCharacter.GrapHookPulledRopeDistance" }; } + FieldValue GrapHookSyncTimeField() { return { this, "AShooterCharacter.GrapHookSyncTime" }; } + FieldValue bReleasingGrapHookField() { return { this, "AShooterCharacter.bReleasingGrapHook" }; } + FieldValue PlatformProfileNameField() { return { this, "AShooterCharacter.PlatformProfileName" }; } + FieldValue PlatformProfileIDField() { return { this, "AShooterCharacter.PlatformProfileID" }; } + FieldValue CharacterStatusStateSoundComponentField() { return { this, "AShooterCharacter.CharacterStatusStateSoundComponent" }; } + FieldValue LastUncrouchTimeField() { return { this, "AShooterCharacter.LastUncrouchTime" }; } + FieldValue LastUnproneTimeField() { return { this, "AShooterCharacter.LastUnproneTime" }; } + FieldValue CurrentWeaponBobSpeedField() { return { this, "AShooterCharacter.CurrentWeaponBobSpeed" }; } + FieldValue WalkBobOldSpeedField() { return { this, "AShooterCharacter.WalkBobOldSpeed" }; } + FieldValue AppliedBobField() { return { this, "AShooterCharacter.AppliedBob" }; } + FieldValue BobTimeField() { return { this, "AShooterCharacter.BobTime" }; } + FieldValue LastPressReloadTimeField() { return { this, "AShooterCharacter.LastPressReloadTime" }; } + FieldValue WeaponAttachPointField() { return { this, "AShooterCharacter.WeaponAttachPoint" }; } + FieldValue TargetingSpeedModifierField() { return { this, "AShooterCharacter.TargetingSpeedModifier" }; } + FieldValue LowHealthSoundField() { return { this, "AShooterCharacter.LowHealthSound" }; } + FieldValue CallFollowAnimField() { return { this, "AShooterCharacter.CallFollowAnim" }; } + FieldValue CallStayAnimField() { return { this, "AShooterCharacter.CallStayAnim" }; } + FieldValue CallFollowAnimSingleField() { return { this, "AShooterCharacter.CallFollowAnimSingle" }; } + FieldValue CallStayAnimSingleField() { return { this, "AShooterCharacter.CallStayAnimSingle" }; } + FieldValue CallMoveToAnimField() { return { this, "AShooterCharacter.CallMoveToAnim" }; } + FieldValue CallAttackAnimField() { return { this, "AShooterCharacter.CallAttackAnim" }; } + FieldValue LowHealthWarningPlayerField() { return { this, "AShooterCharacter.LowHealthWarningPlayer" }; } + FieldValue NextWeaponItemIDField() { return { this, "AShooterCharacter.NextWeaponItemID" }; } + FieldValue WeaponBobTimeField() { return { this, "AShooterCharacter.WeaponBobTime" }; } + FieldValue CurrentAimBlendingField() { return { this, "AShooterCharacter.CurrentAimBlending" }; } + FieldValue InterpLastCrouchProneStateChangeTimeField() { return { this, "AShooterCharacter.InterpLastCrouchProneStateChangeTime" }; } + FieldValue PressCrouchProneToggleTimeField() { return { this, "AShooterCharacter.PressCrouchProneToggleTime" }; } + FieldValue CraftingMovementSpeedModifierField() { return { this, "AShooterCharacter.CraftingMovementSpeedModifier" }; } + FieldValue WeaponBobMagnitudesField() { return { this, "AShooterCharacter.WeaponBobMagnitudes" }; } + FieldValue WeaponBobPeriodsField() { return { this, "AShooterCharacter.WeaponBobPeriods" }; } + FieldValue WeaponBobOffsetsField() { return { this, "AShooterCharacter.WeaponBobOffsets" }; } + FieldValue WeaponBobMagnitudes_TargetingField() { return { this, "AShooterCharacter.WeaponBobMagnitudes_Targeting" }; } + FieldValue WeaponBobPeriods_TargetingField() { return { this, "AShooterCharacter.WeaponBobPeriods_Targeting" }; } + FieldValue WeaponBobOffsets_TargetingField() { return { this, "AShooterCharacter.WeaponBobOffsets_Targeting" }; } + FieldValue WeaponBobMinimumSpeedField() { return { this, "AShooterCharacter.WeaponBobMinimumSpeed" }; } + FieldValue WeaponBobSpeedBaseField() { return { this, "AShooterCharacter.WeaponBobSpeedBase" }; } + FieldValue WeaponBobSpeedBaseFallingField() { return { this, "AShooterCharacter.WeaponBobSpeedBaseFalling" }; } + FieldValue WeaponBobTargetingBlendField() { return { this, "AShooterCharacter.WeaponBobTargetingBlend" }; } + FieldValue> DefaultAttachmentInfosField() { return { this, "AShooterCharacter.DefaultAttachmentInfos" }; } + FieldValue StartCrouchSoundField() { return { this, "AShooterCharacter.StartCrouchSound" }; } + FieldValue EndCrouchSoundField() { return { this, "AShooterCharacter.EndCrouchSound" }; } + FieldValue StartProneSoundField() { return { this, "AShooterCharacter.StartProneSound" }; } + FieldValue EndProneSoundField() { return { this, "AShooterCharacter.EndProneSound" }; } + FieldValue> NextInventoryWeaponField() { return { this, "AShooterCharacter.NextInventoryWeapon" }; } + FieldValue PreMapWeaponItemNetIDField() { return { this, "AShooterCharacter.PreMapWeaponItemNetID" }; } + FieldValue ServerSeatedViewRotationYawField() { return { this, "AShooterCharacter.ServerSeatedViewRotationYaw" }; } + FieldValue ServerSeatedViewRotationPitchField() { return { this, "AShooterCharacter.ServerSeatedViewRotationPitch" }; } + FieldValue CurrentWeaponField() { return { this, "AShooterCharacter.CurrentWeapon" }; } + FieldValue LinkedPlayerDataIDField() { return { this, "AShooterCharacter.LinkedPlayerDataID" }; } + FieldValue LastTimeInFallingField() { return { this, "AShooterCharacter.LastTimeInFalling" }; } + FieldValue StartedRidingTimeField() { return { this, "AShooterCharacter.StartedRidingTime" }; } + FieldValue TimeSinceLastControllerField() { return { this, "AShooterCharacter.TimeSinceLastController" }; } + FieldValue> LastControllerField() { return { this, "AShooterCharacter.LastController" }; } + FieldValue DrinkingAnimationField() { return { this, "AShooterCharacter.DrinkingAnimation" }; } + FieldValue LastRequestedTribeTimeField() { return { this, "AShooterCharacter.LastRequestedTribeTime" }; } + FieldValue LastRequestedTribeIDField() { return { this, "AShooterCharacter.LastRequestedTribeID" }; } + FieldValue LastRequestedTribeNameField() { return { this, "AShooterCharacter.LastRequestedTribeName" }; } + FieldValue> LastRequestedTribePlayerCharacterField() { return { this, "AShooterCharacter.LastRequestedTribePlayerCharacter" }; } + FieldValue IndoorsHyperthermiaInsulationField() { return { this, "AShooterCharacter.IndoorsHyperthermiaInsulation" }; } + FieldValue IndoorsHypothermiaInsulationField() { return { this, "AShooterCharacter.IndoorsHypothermiaInsulation" }; } + FieldValue IndoorCheckIntervalField() { return { this, "AShooterCharacter.IndoorCheckInterval" }; } + FieldValue LastIndoorCheckTimeField() { return { this, "AShooterCharacter.LastIndoorCheckTime" }; } + FieldValue PreRidingWeaponItemNetIDField() { return { this, "AShooterCharacter.PreRidingWeaponItemNetID" }; } + FieldValue PreInventoryWeaponItemNetIDField() { return { this, "AShooterCharacter.PreInventoryWeaponItemNetID" }; } + FieldValue ViewingInventoryAnimationField() { return { this, "AShooterCharacter.ViewingInventoryAnimation" }; } + FieldValue DefaultDinoRidingAnimationField() { return { this, "AShooterCharacter.DefaultDinoRidingAnimation" }; } + FieldValue DefaultDinoRidingMoveAnimationField() { return { this, "AShooterCharacter.DefaultDinoRidingMoveAnimation" }; } + FieldValue DefaultSeatingAnimationField() { return { this, "AShooterCharacter.DefaultSeatingAnimation" }; } + FieldValue DefaultShieldAnimationField() { return { this, "AShooterCharacter.DefaultShieldAnimation" }; } + FieldValue ShieldCoverAnimationField() { return { this, "AShooterCharacter.ShieldCoverAnimation" }; } + FieldValue ShieldCoverAnimationForCrouchField() { return { this, "AShooterCharacter.ShieldCoverAnimationForCrouch" }; } + FieldValue EnemyPlayerMaxCursorHUDDistanceProneField() { return { this, "AShooterCharacter.EnemyPlayerMaxCursorHUDDistanceProne" }; } + FieldValue EnemyPlayerMaxCursorHUDDistanceCrouchedField() { return { this, "AShooterCharacter.EnemyPlayerMaxCursorHUDDistanceCrouched" }; } + FieldValue EnemyPlayerMaxCursorHUDDistanceStandingField() { return { this, "AShooterCharacter.EnemyPlayerMaxCursorHUDDistanceStanding" }; } + FieldValue CurrentPassengerSeatDefinitionField() { return { this, "AShooterCharacter.CurrentPassengerSeatDefinition" }; } + FieldValue> AnimsOverrideFromField() { return { this, "AShooterCharacter.AnimsOverrideFrom" }; } + FieldValue> AnimOverrideToField() { return { this, "AShooterCharacter.AnimOverrideTo" }; } + FieldValue> AnimSequencesOverrideFromField() { return { this, "AShooterCharacter.AnimSequencesOverrideFrom" }; } + FieldValue> AnimSequenceOverrideToField() { return { this, "AShooterCharacter.AnimSequenceOverrideTo" }; } + FieldValue PreviousRootYawSpeedField() { return { this, "AShooterCharacter.PreviousRootYawSpeed" }; } + FieldArray BodyColorsField() { return { this, "AShooterCharacter.BodyColors" }; } + FieldValue FacialHairIndexField() { return { this, "AShooterCharacter.FacialHairIndex" }; } + FieldValue HeadHairIndexField() { return { this, "AShooterCharacter.HeadHairIndex" }; } + FieldArray RawBoneModifiersField() { return { this, "AShooterCharacter.RawBoneModifiers" }; } + FieldValue LoggedOutTargetingDesirabilityField() { return { this, "AShooterCharacter.LoggedOutTargetingDesirability" }; } + FieldValue bIsRainWateredField() { return { this, "AShooterCharacter.bIsRainWatered" }; } + FieldValue LastAttackTimeField() { return { this, "AShooterCharacter.LastAttackTime" }; } + FieldValue bCacheRidingDinoWeaponField() { return { this, "AShooterCharacter.bCacheRidingDinoWeapon" }; } + FieldValue bWasLocallyControlledField() { return { this, "AShooterCharacter.bWasLocallyControlled" }; } + FieldValue UniqueNetIdTypeHashField() { return { this, "AShooterCharacter.UniqueNetIdTypeHash" }; } + FieldValue LastUseHarvestTimeField() { return { this, "AShooterCharacter.LastUseHarvestTime" }; } + FieldValue StopRidingTimeField() { return { this, "AShooterCharacter.StopRidingTime" }; } + FieldValue SpawnAnimField() { return { this, "AShooterCharacter.SpawnAnim" }; } + FieldValue FirstSpawnAnimField() { return { this, "AShooterCharacter.FirstSpawnAnim" }; } + FieldValue LocalLastViewingInventoryTimeField() { return { this, "AShooterCharacter.LocalLastViewingInventoryTime" }; } + FieldValue LastStasisCastPositionField() { return { this, "AShooterCharacter.LastStasisCastPosition" }; } + FieldValue bWasHostPlayerField() { return { this, "AShooterCharacter.bWasHostPlayer" }; } + FieldValue LastTimeHadControllerField() { return { this, "AShooterCharacter.LastTimeHadController" }; } + FieldValue LastTaggedTimeField() { return { this, "AShooterCharacter.LastTaggedTime" }; } + FieldValue LastTaggedTimeExtraField() { return { this, "AShooterCharacter.LastTaggedTimeExtra" }; } + FieldValue LastTaggedTimeThirdField() { return { this, "AShooterCharacter.LastTaggedTimeThird" }; } + FieldValue ExtraFloatVarField() { return { this, "AShooterCharacter.ExtraFloatVar" }; } + FieldValue ExtraVectorVarField() { return { this, "AShooterCharacter.ExtraVectorVar" }; } + FieldValue ExtraExtraVectorVarField() { return { this, "AShooterCharacter.ExtraExtraVectorVar" }; } + FieldValue ExtraNameVarField() { return { this, "AShooterCharacter.ExtraNameVar" }; } + FieldValue bIsOnSeatingStructureField() { return { this, "AShooterCharacter.bIsOnSeatingStructure" }; } + FieldValue bIsControllingBallistaField() { return { this, "AShooterCharacter.bIsControllingBallista" }; } + FieldValue bUseBallistaAimOffsetField() { return { this, "AShooterCharacter.bUseBallistaAimOffset" }; } + FieldValue CurrentControlledBallistaYawField() { return { this, "AShooterCharacter.CurrentControlledBallistaYaw" }; } + FieldValue bIsServerAdminField() { return { this, "AShooterCharacter.bIsServerAdmin" }; } + FieldValue> SeatingStructureField() { return { this, "AShooterCharacter.SeatingStructure" }; } + FieldValue SeatingStructureSeatNumberField() { return { this, "AShooterCharacter.SeatingStructureSeatNumber" }; } + FieldValue NextPlayerUndergroundCheckField() { return { this, "AShooterCharacter.NextPlayerUndergroundCheck" }; } + FieldValue PlayerNumUnderGroundFailField() { return { this, "AShooterCharacter.PlayerNumUnderGroundFail" }; } + FieldValue LastSweepCapsuleHeightField() { return { this, "AShooterCharacter.LastSweepCapsuleHeight" }; } + FieldValue LastSweepCapsuleRadiusField() { return { this, "AShooterCharacter.LastSweepCapsuleRadius" }; } + FieldValue ThrowCharacterSoundField() { return { this, "AShooterCharacter.ThrowCharacterSound" }; } + FieldValue ClientSeatedViewRotationPitchField() { return { this, "AShooterCharacter.ClientSeatedViewRotationPitch" }; } + FieldValue ClientSeatedViewRotationYawField() { return { this, "AShooterCharacter.ClientSeatedViewRotationYaw" }; } + FieldValue LastReleaseSeatingStructureTimeField() { return { this, "AShooterCharacter.LastReleaseSeatingStructureTime" }; } + FieldValue PlayerBadgeGroupField() { return { this, "AShooterCharacter.PlayerBadgeGroup" }; } + FieldValue bShouldInvertTurnInputField() { return { this, "AShooterCharacter.bShouldInvertTurnInput" }; } + FieldValue> LastGrappledToCharacterField() { return { this, "AShooterCharacter.LastGrappledToCharacter" }; } + FieldValue> CurrentGrappledToCharacterField() { return { this, "AShooterCharacter.CurrentGrappledToCharacter" }; } + FieldValue AllianceInviteRequestingTeamField() { return { this, "AShooterCharacter.AllianceInviteRequestingTeam" }; } + FieldValue AllianceInviteIDField() { return { this, "AShooterCharacter.AllianceInviteID" }; } + FieldValue AllianceInviteNameField() { return { this, "AShooterCharacter.AllianceInviteName" }; } + FieldValue AllianceInviteTimeField() { return { this, "AShooterCharacter.AllianceInviteTime" }; } + FieldValue MountedCarryingDinoAnimationField() { return { this, "AShooterCharacter.MountedCarryingDinoAnimation" }; } + FieldValue CuddleAnimationField() { return { this, "AShooterCharacter.CuddleAnimation" }; } + FieldValue LastUpdatedAimActorsTimeField() { return { this, "AShooterCharacter.LastUpdatedAimActorsTime" }; } + FieldValue UpdateHyperThermalInsulationPositionField() { return { this, "AShooterCharacter.UpdateHyperThermalInsulationPosition" }; } + FieldValue UpdateHypoThermalInsulationPositionField() { return { this, "AShooterCharacter.UpdateHypoThermalInsulationPosition" }; } + FieldValue NextUpdateHyperThermalInsulationTimeField() { return { this, "AShooterCharacter.NextUpdateHyperThermalInsulationTime" }; } + FieldValue NextUpdateHypoThermalInsulationTimeField() { return { this, "AShooterCharacter.NextUpdateHypoThermalInsulationTime" }; } + FieldValue LastAdditionalHypoThermalInsulationField() { return { this, "AShooterCharacter.LastAdditionalHypoThermalInsulation" }; } + FieldValue LastAdditionalHyperThermalInsulationField() { return { this, "AShooterCharacter.LastAdditionalHyperThermalInsulation" }; } + FieldValue WaterLossRateMultiplierField() { return { this, "AShooterCharacter.WaterLossRateMultiplier" }; } + FieldValue CharacterAdditiveStandingAnimField() { return { this, "AShooterCharacter.CharacterAdditiveStandingAnim" }; } + FieldValue LastTryAccessInventoryFailTimeField() { return { this, "AShooterCharacter.LastTryAccessInventoryFailTime" }; } + FieldValue LastEmotePlayTimeField() { return { this, "AShooterCharacter.LastEmotePlayTime" }; } + FieldValue IntervalForFullHeadHairGrowthField() { return { this, "AShooterCharacter.IntervalForFullHeadHairGrowth" }; } + FieldValue IntervalForFullFacialHairGrowthField() { return { this, "AShooterCharacter.IntervalForFullFacialHairGrowth" }; } + FieldValue PercentOfFullFacialHairGrowthField() { return { this, "AShooterCharacter.PercentOfFullFacialHairGrowth" }; } + FieldValue PercentOfFullHeadHairGrowthField() { return { this, "AShooterCharacter.PercentOfFullHeadHairGrowth" }; } + FieldValue OriginalHairColorField() { return { this, "AShooterCharacter.OriginalHairColor" }; } + FieldValue LastEmoteTryPlayTimeField() { return { this, "AShooterCharacter.LastEmoteTryPlayTime" }; } + FieldValue IgnoreCollisionSweepUntilFrameNumberField() { return { this, "AShooterCharacter.IgnoreCollisionSweepUntilFrameNumber" }; } + FieldValue ReplicatedWeightField() { return { this, "AShooterCharacter.ReplicatedWeight" }; } + FieldValue LocalDiedAtTimeField() { return { this, "AShooterCharacter.LocalDiedAtTime" }; } + FieldValue LastNotStuckTimeField() { return { this, "AShooterCharacter.LastNotStuckTime" }; } + FieldValue ProneMoveSoundField() { return { this, "AShooterCharacter.ProneMoveSound" }; } + FieldValue UploadEarliestValidTimeField() { return { this, "AShooterCharacter.UploadEarliestValidTime" }; } + FieldValue SimulatedLastFrameProcessedForceUpdateAimedActorsField() { return { this, "AShooterCharacter.SimulatedLastFrameProcessedForceUpdateAimedActors" }; } + FieldValue OriginalLastHitWallSweepCheckLocationField() { return { this, "AShooterCharacter.OriginalLastHitWallSweepCheckLocation" }; } + FieldValue LastCapsuleAttachmentChangedIncrementField() { return { this, "AShooterCharacter.LastCapsuleAttachmentChangedIncrement" }; } + FieldValue LastMeshAttachmentChangedIncrementField() { return { this, "AShooterCharacter.LastMeshAttachmentChangedIncrement" }; } + FieldValue LastCameraAttachmentChangedIncrementField() { return { this, "AShooterCharacter.LastCameraAttachmentChangedIncrement" }; } + FieldValue bPreventWeaponMovementAnimsField() { return { this, "AShooterCharacter.bPreventWeaponMovementAnims" }; } + + // Functions + + static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "AShooterCharacter.GetPrivateStaticClass"); } + bool BuffsPreventFirstPerson() { return NativeCall(this, "AShooterCharacter.BuffsPreventFirstPerson"); } + void PostInitializeComponents() { NativeCall(this, "AShooterCharacter.PostInitializeComponents"); } + void AuthPostSpawnInit() { NativeCall(this, "AShooterCharacter.AuthPostSpawnInit"); } + void Destroyed() { NativeCall(this, "AShooterCharacter.Destroyed"); } + void OnRep_RawBoneModifiers() { NativeCall(this, "AShooterCharacter.OnRep_RawBoneModifiers"); } + void UpdateTransponders() { NativeCall(this, "AShooterCharacter.UpdateTransponders"); } + void BeginPlay() { NativeCall(this, "AShooterCharacter.BeginPlay"); } + void DrawTranspondersInfo(AShooterHUD * HUD) { NativeCall(this, "AShooterCharacter.DrawTranspondersInfo", HUD); } + void PlaySpawnAnim() { NativeCall(this, "AShooterCharacter.PlaySpawnAnim"); } + void ClearSpawnAnim() { NativeCall(this, "AShooterCharacter.ClearSpawnAnim"); } + void PlayJumpAnim() { NativeCall(this, "AShooterCharacter.PlayJumpAnim"); } + void PlayLandedAnim() { NativeCall(this, "AShooterCharacter.PlayLandedAnim"); } + void DedicatedServerBoneFixup() { NativeCall(this, "AShooterCharacter.DedicatedServerBoneFixup"); } + void ControllerLeavingGame(AShooterPlayerController * theController) { NativeCall(this, "AShooterCharacter.ControllerLeavingGame", theController); } + void ModifyFirstPersonCameraLocation(FVector * Loc, float DeltaTime) { NativeCall(this, "AShooterCharacter.ModifyFirstPersonCameraLocation", Loc, DeltaTime); } + void PossessedBy(AController * InController) { NativeCall(this, "AShooterCharacter.PossessedBy", InController); } + void LocalPossessedBy(APlayerController * ByController) { NativeCall(this, "AShooterCharacter.LocalPossessedBy", ByController); } + void ServerDetachGrapHookCable_Implementation(bool bDoUpwardsJump, float UpwardsJumpYaw) { NativeCall(this, "AShooterCharacter.ServerDetachGrapHookCable_Implementation", bDoUpwardsJump, UpwardsJumpYaw); } + void ServerReleaseGrapHookCable_Implementation(bool bReleasing) { NativeCall(this, "AShooterCharacter.ServerReleaseGrapHookCable_Implementation", bReleasing); } + void DetachGrapHookCable_Implementation() { NativeCall(this, "AShooterCharacter.DetachGrapHookCable_Implementation"); } + void SyncGrapHookDistance_Implementation(float Distance) { NativeCall(this, "AShooterCharacter.SyncGrapHookDistance_Implementation", Distance); } + void UpdateGrapHook(float DeltaSeconds) { NativeCall(this, "AShooterCharacter.UpdateGrapHook", DeltaSeconds); } + void SetCarriedPitchYaw_Implementation(float NewCarriedPitch, float NewCarriedYaw) { NativeCall(this, "AShooterCharacter.SetCarriedPitchYaw_Implementation", NewCarriedPitch, NewCarriedYaw); } + FRotator * GetAimOffsets(FRotator * result, float DeltaTime, FRotator * RootRotOffset, float * RootYawSpeed, float MaxYawAimClamp, FVector * RootLocOffset) { return NativeCall(this, "AShooterCharacter.GetAimOffsets", result, DeltaTime, RootRotOffset, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } + void UpdatePawnMeshes(bool bForceThirdPerson, bool bForceFlush) { NativeCall(this, "AShooterCharacter.UpdatePawnMeshes", bForceThirdPerson, bForceFlush); } + void OnCameraUpdate(FVector * CameraLocation, FRotator * CameraRotation) { NativeCall(this, "AShooterCharacter.OnCameraUpdate", CameraLocation, CameraRotation); } + void GiveDefaultWeapon(bool bForceGiveDefaultWeapon) { NativeCall(this, "AShooterCharacter.GiveDefaultWeapon", bForceGiveDefaultWeapon); } + void GiveMapWeapon() { NativeCall(this, "AShooterCharacter.GiveMapWeapon"); } + void SwitchMap() { NativeCall(this, "AShooterCharacter.SwitchMap"); } + void DelayGiveDefaultWeapon(float DelayTime) { NativeCall(this, "AShooterCharacter.DelayGiveDefaultWeapon", DelayTime); } + void ServerSwitchMap_Implementation() { NativeCall(this, "AShooterCharacter.ServerSwitchMap_Implementation"); } + void ServerGiveDefaultWeapon_Implementation() { NativeCall(this, "AShooterCharacter.ServerGiveDefaultWeapon_Implementation"); } + void GivePrimalItemWeapon(UPrimalItem * aPrimalItem) { NativeCall(this, "AShooterCharacter.GivePrimalItemWeapon", aPrimalItem); } + void StartWeaponSwitch(UPrimalItem * aPrimalItem, bool bDontClearLastWeapon) { NativeCall(this, "AShooterCharacter.StartWeaponSwitch", aPrimalItem, bDontClearLastWeapon); } + void FinishWeaponSwitch() { NativeCall(this, "AShooterCharacter.FinishWeaponSwitch"); } + float GetMaxCursorHUDDistance(AShooterPlayerController * PC) { return NativeCall(this, "AShooterCharacter.GetMaxCursorHUDDistance", PC); } + void DrawFloatingHUD(AShooterHUD * HUD) { NativeCall(this, "AShooterCharacter.DrawFloatingHUD", HUD); } + void DrawFloatingChatMessage(AShooterHUD * HUD, FString Message, long double receivedChatTime) { NativeCall(this, "AShooterCharacter.DrawFloatingChatMessage", HUD, Message, receivedChatTime); } + void SetCurrentWeapon(AShooterWeapon * NewWeapon, AShooterWeapon * LastWeapon) { NativeCall(this, "AShooterCharacter.SetCurrentWeapon", NewWeapon, LastWeapon); } + void ForceSleep() { NativeCall(this, "AShooterCharacter.ForceSleep"); } + bool CanFire() { return NativeCall(this, "AShooterCharacter.CanFire"); } + void SetTargeting(bool bNewTargeting) { NativeCall(this, "AShooterCharacter.SetTargeting", bNewTargeting); } + void ServerSetTargeting_Implementation(bool bNewTargeting) { NativeCall(this, "AShooterCharacter.ServerSetTargeting_Implementation", bNewTargeting); } + void ClientUpdateTranspondersInfo_Implementation(TArray * TranspondersInfo, bool bNewData) { NativeCall *, bool>(this, "AShooterCharacter.ClientUpdateTranspondersInfo_Implementation", TranspondersInfo, bNewData); } + void ZoomIn() { NativeCall(this, "AShooterCharacter.ZoomIn"); } + void ZoomOut() { NativeCall(this, "AShooterCharacter.ZoomOut"); } + bool CanProne() { return NativeCall(this, "AShooterCharacter.CanProne"); } + bool CanCrouch() { return NativeCall(this, "AShooterCharacter.CanCrouch"); } + void OnPressCrouch() { NativeCall(this, "AShooterCharacter.OnPressCrouch"); } + void OnPressProne() { NativeCall(this, "AShooterCharacter.OnPressProne"); } + void OnPressCrouchProneToggle() { NativeCall(this, "AShooterCharacter.OnPressCrouchProneToggle"); } + void OnReleaseCrouchProneToggle() { NativeCall(this, "AShooterCharacter.OnReleaseCrouchProneToggle"); } + void OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall(this, "AShooterCharacter.OnEndCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } + void OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) { NativeCall(this, "AShooterCharacter.OnStartCrouch", HalfHeightAdjust, ScaledHalfHeightAdjust); } + void OnStartFire(bool bFromGamepadRight) { NativeCall(this, "AShooterCharacter.OnStartFire", bFromGamepadRight); } + void OnStopFire(bool bFromGamepadRight) { NativeCall(this, "AShooterCharacter.OnStopFire", bFromGamepadRight); } + void OnStartAltFire() { NativeCall(this, "AShooterCharacter.OnStartAltFire"); } + void OnStopAltFire() { NativeCall(this, "AShooterCharacter.OnStopAltFire"); } + void OnStartTargeting(bool bFromGamepadLeft) { NativeCall(this, "AShooterCharacter.OnStartTargeting", bFromGamepadLeft); } + void OnStopTargeting(bool bFromGamepadLeft) { NativeCall(this, "AShooterCharacter.OnStopTargeting", bFromGamepadLeft); } + void OnPressReload() { NativeCall(this, "AShooterCharacter.OnPressReload"); } + void OnReload() { NativeCall(this, "AShooterCharacter.OnReload"); } + bool IsRunning() { return NativeCall(this, "AShooterCharacter.IsRunning"); } + void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall(this, "AShooterCharacter.SetSleeping", bSleeping, bUseRagdollLocationOffset); } + bool IsValidUnStasisCaster() { return NativeCall(this, "AShooterCharacter.IsValidUnStasisCaster"); } + void CheckAndHandleBasedPlayersBeingPushedThroughWalls() { NativeCall(this, "AShooterCharacter.CheckAndHandleBasedPlayersBeingPushedThroughWalls"); } + void Tick(float DeltaSeconds) { NativeCall(this, "AShooterCharacter.Tick", DeltaSeconds); } + void UpdateCarriedLocationAndRotation(float DeltaSeconds) { NativeCall(this, "AShooterCharacter.UpdateCarriedLocationAndRotation", DeltaSeconds); } + float GetCarryingSocketYaw(bool RefreshBones) { return NativeCall(this, "AShooterCharacter.GetCarryingSocketYaw", RefreshBones); } + bool CanBeCarried(APrimalCharacter * ByCarrier) { return NativeCall(this, "AShooterCharacter.CanBeCarried", ByCarrier); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AShooterCharacter.GetLifetimeReplicatedProps", OutLifetimeProps); } + bool IsTargeting() { return NativeCall(this, "AShooterCharacter.IsTargeting"); } + bool IsFirstPerson() { return NativeCall(this, "AShooterCharacter.IsFirstPerson"); } + void SetActorHiddenInGame(bool bNewHidden) { NativeCall(this, "AShooterCharacter.SetActorHiddenInGame", bNewHidden); } + bool AllowFirstPerson() { return NativeCall(this, "AShooterCharacter.AllowFirstPerson"); } + void SetCameraMode(bool bFirstperson, bool bIgnoreSettingFirstPersonRiding) { NativeCall(this, "AShooterCharacter.SetCameraMode", bFirstperson, bIgnoreSettingFirstPersonRiding); } + void PlaySpawnIntro() { NativeCall(this, "AShooterCharacter.PlaySpawnIntro"); } + void FinishSpawnIntro() { NativeCall(this, "AShooterCharacter.FinishSpawnIntro"); } + bool ValidToRestoreForPC(AShooterPlayerController * aPC) { return NativeCall(this, "AShooterCharacter.ValidToRestoreForPC", aPC); } + static AShooterCharacter * FindForPlayerController(AShooterPlayerController * aPC) { return NativeCall(nullptr, "AShooterCharacter.FindForPlayerController", aPC); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "AShooterCharacter.GetDescriptiveName", result); } + FString * GetShortName(FString * result) { return NativeCall(this, "AShooterCharacter.GetShortName", result); } + UPrimalPlayerData * GetPlayerData() { return NativeCall(this, "AShooterCharacter.GetPlayerData"); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "AShooterCharacter.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + bool IsUsingShield() { return NativeCall(this, "AShooterCharacter.IsUsingShield"); } + bool IsBlockingWithShield() { return NativeCall(this, "AShooterCharacter.IsBlockingWithShield"); } + bool AllowBlockingWithShield() { return NativeCall(this, "AShooterCharacter.AllowBlockingWithShield"); } + bool GetBlockingShieldOffsets(FVector * OutBlockingShieldFPVTranslation, FRotator * OutBlockingShieldFPVRotation) { return NativeCall(this, "AShooterCharacter.GetBlockingShieldOffsets", OutBlockingShieldFPVTranslation, OutBlockingShieldFPVRotation); } + void NetSimulatedForceUpdateAimedActors_Implementation(float OverrideMaxDistance) { NativeCall(this, "AShooterCharacter.NetSimulatedForceUpdateAimedActors_Implementation", OverrideMaxDistance); } + void ServerForceUpdatedAimedActors(float OverrideMaxDistance, bool bReplicateToSimulatedClients) { NativeCall(this, "AShooterCharacter.ServerForceUpdatedAimedActors", OverrideMaxDistance, bReplicateToSimulatedClients); } + void ServerSetBallistaNewRotation_Implementation(float Pitch, float Yaw) { NativeCall(this, "AShooterCharacter.ServerSetBallistaNewRotation_Implementation", Pitch, Yaw); } + void ServerNotifyBallistaShot_Implementation(FHitResult Impact, FVector_NetQuantizeNormal ShootDir) { NativeCall(this, "AShooterCharacter.ServerNotifyBallistaShot_Implementation", Impact, ShootDir); } + float GetMaxSpeedModifier() { return NativeCall(this, "AShooterCharacter.GetMaxSpeedModifier"); } + void SetRidingDino(APrimalDinoCharacter * aDino) { NativeCall(this, "AShooterCharacter.SetRidingDino", aDino); } + void ClearRidingDino(bool bFromDino, int OverrideUnboardDirection) { NativeCall(this, "AShooterCharacter.ClearRidingDino", bFromDino, OverrideUnboardDirection); } + void SetCarryingDino(APrimalDinoCharacter * aDino) { NativeCall(this, "AShooterCharacter.SetCarryingDino", aDino); } + void ClearCarryingDino(bool bFromDino, bool bCancelAnyCarryBuffs) { NativeCall(this, "AShooterCharacter.ClearCarryingDino", bFromDino, bCancelAnyCarryBuffs); } + void SetRidingDinoAsPassenger(APrimalDinoCharacter * aDino, FSaddlePassengerSeatDefinition * SeatDefinition) { NativeCall(this, "AShooterCharacter.SetRidingDinoAsPassenger", aDino, SeatDefinition); } + void ClearRidingDinoAsPassenger(bool bFromDino) { NativeCall(this, "AShooterCharacter.ClearRidingDinoAsPassenger", bFromDino); } + void ServerLaunchMountedDino_Implementation() { NativeCall(this, "AShooterCharacter.ServerLaunchMountedDino_Implementation"); } + void ClientPlayHarvestAnim_Implementation() { NativeCall(this, "AShooterCharacter.ClientPlayHarvestAnim_Implementation"); } + void LaunchMountedDino() { NativeCall(this, "AShooterCharacter.LaunchMountedDino"); } + void OnPrimalCharacterSleeped() { NativeCall(this, "AShooterCharacter.OnPrimalCharacterSleeped"); } + bool Die(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "AShooterCharacter.Die", KillingDamage, DamageEvent, Killer, DamageCauser); } + void ApplyDamageMomentum(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "AShooterCharacter.ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + bool CanJumpInternal_Implementation() { return NativeCall(this, "AShooterCharacter.CanJumpInternal_Implementation"); } + bool CanCrouchInternal() { return NativeCall(this, "AShooterCharacter.CanCrouchInternal"); } + bool CanProneInternal() { return NativeCall(this, "AShooterCharacter.CanProneInternal"); } + bool IsCrafting() { return NativeCall(this, "AShooterCharacter.IsCrafting"); } + void RemoveAttachments() { NativeCall(this, "AShooterCharacter.RemoveAttachments"); } + void NotifyEquippedItems() { NativeCall(this, "AShooterCharacter.NotifyEquippedItems"); } + void RefreshDefaultAttachments(AActor * UseOtherActor) { NativeCall(this, "AShooterCharacter.RefreshDefaultAttachments", UseOtherActor); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "AShooterCharacter.ClientMultiUse", ForPC, UseIndex); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "AShooterCharacter.TryMultiUse", ForPC, UseIndex); } + void RefreshTribeName() { NativeCall(this, "AShooterCharacter.RefreshTribeName"); } + void ChangeActorTeam(int NewTeam) { NativeCall(this, "AShooterCharacter.ChangeActorTeam", NewTeam); } + void ClientClearTribeRequest_Implementation() { NativeCall(this, "AShooterCharacter.ClientClearTribeRequest_Implementation"); } + void ClientNotifyTribeRequest_Implementation(FString * RequestTribeName, AShooterCharacter * PlayerCharacter) { NativeCall(this, "AShooterCharacter.ClientNotifyTribeRequest_Implementation", RequestTribeName, PlayerCharacter); } + void PlayDrinkingAnimation() { NativeCall(this, "AShooterCharacter.PlayDrinkingAnimation"); } + float GetCharacterAdditionalHypothermiaInsulationValue() { return NativeCall(this, "AShooterCharacter.GetCharacterAdditionalHypothermiaInsulationValue"); } + bool CalcIsIndoors() { return NativeCall(this, "AShooterCharacter.CalcIsIndoors"); } + static bool IsIndoorsAtLoc(UWorld * theWorld, FVector * actorLoc) { return NativeCall(nullptr, "AShooterCharacter.IsIndoorsAtLoc", theWorld, actorLoc); } + float GetInsulationFromItem(FHitResult * HitOut, EPrimalItemStat::Type TypeInsulation) { return NativeCall(this, "AShooterCharacter.GetInsulationFromItem", HitOut, TypeInsulation); } + float GetCharacterAdditionalInsulationValueFromStructure(UWorld * theWorld, FVector * actorLoc, EPrimalItemStat::Type TypeInsulation) { return NativeCall(this, "AShooterCharacter.GetCharacterAdditionalInsulationValueFromStructure", theWorld, actorLoc, TypeInsulation); } + float GetCharacterAdditionalHyperthermiaInsulationValue() { return NativeCall(this, "AShooterCharacter.GetCharacterAdditionalHyperthermiaInsulationValue"); } + void PreInitializeComponents() { NativeCall(this, "AShooterCharacter.PreInitializeComponents"); } + void OnMovementModeChanged(EMovementMode PrevMovementMode, char PreviousCustomMode) { NativeCall(this, "AShooterCharacter.OnMovementModeChanged", PrevMovementMode, PreviousCustomMode); } + void PreApplyAccumulatedForces(float DeltaSeconds, FVector * PendingImpulseToApply, FVector * PendingForceToApply) { NativeCall(this, "AShooterCharacter.PreApplyAccumulatedForces", DeltaSeconds, PendingImpulseToApply, PendingForceToApply); } + void OnBeginDrag_Implementation(APrimalCharacter * Dragged, int BoneIndex, bool bWithGrapHook) { NativeCall(this, "AShooterCharacter.OnBeginDrag_Implementation", Dragged, BoneIndex, bWithGrapHook); } + void OnEndDrag_Implementation() { NativeCall(this, "AShooterCharacter.OnEndDrag_Implementation"); } + bool IsSubmerged(bool bDontCheckSwimming, bool bUseHalfThreshold, bool bForceCheck, bool bFromVolumeChange) { return NativeCall(this, "AShooterCharacter.IsSubmerged", bDontCheckSwimming, bUseHalfThreshold, bForceCheck, bFromVolumeChange); } + void UpdateSwimmingState() { NativeCall(this, "AShooterCharacter.UpdateSwimmingState"); } + void SetCharacterMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall(this, "AShooterCharacter.SetCharacterMeshesMaterialScalarParamValue", ParamName, Value); } + float GetRidingDinoAnimSpeedRatio() { return NativeCall(this, "AShooterCharacter.GetRidingDinoAnimSpeedRatio"); } + UAnimSequence * GetDinoRidingAnimation() { return NativeCall(this, "AShooterCharacter.GetDinoRidingAnimation"); } + UAnimSequence * GetDinoRidingMoveAnimation() { return NativeCall(this, "AShooterCharacter.GetDinoRidingMoveAnimation"); } + UAnimSequence * GetSeatingAnimation() { return NativeCall(this, "AShooterCharacter.GetSeatingAnimation"); } + float GetBaseTargetingDesire(ITargetableInterface * Attacker) { return NativeCall(this, "AShooterCharacter.GetBaseTargetingDesire", Attacker); } + void ApplyBodyColors() { NativeCall(this, "AShooterCharacter.ApplyBodyColors"); } + void ApplyBoneModifiers() { NativeCall(this, "AShooterCharacter.ApplyBoneModifiers"); } + float GetTargetingDesirability(ITargetableInterface * Attacker) { return NativeCall(this, "AShooterCharacter.GetTargetingDesirability", Attacker); } + UAnimMontage * GetOverridenMontage(UAnimMontage * AnimMontage) { return NativeCall(this, "AShooterCharacter.GetOverridenMontage", AnimMontage); } + UAnimSequence * GetOverridenAnimSequence(UAnimSequence * AnimSeq) { return NativeCall(this, "AShooterCharacter.GetOverridenAnimSequence", AnimSeq); } + bool IsWatered() { return NativeCall(this, "AShooterCharacter.IsWatered"); } + void AdjustDamage(float * Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "AShooterCharacter.AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool IsBlockedByShield(FHitResult * HitInfo, FVector * ShotDirection, bool bBlockAllPointDamage) { return NativeCall(this, "AShooterCharacter.IsBlockedByShield", HitInfo, ShotDirection, bBlockAllPointDamage); } + void ClientNotifyLevelUp_Implementation() { NativeCall(this, "AShooterCharacter.ClientNotifyLevelUp_Implementation"); } + void StartedFiringWeapon(bool bPrimaryFire) { NativeCall(this, "AShooterCharacter.StartedFiringWeapon", bPrimaryFire); } + void OrbitCamOn() { NativeCall(this, "AShooterCharacter.OrbitCamOn"); } + void OrbitCamToggle() { NativeCall(this, "AShooterCharacter.OrbitCamToggle"); } + void SetRagdollPhysics(bool bUseRagdollLocationOffset, bool bForceRecreateBones, bool bForLoading) { NativeCall(this, "AShooterCharacter.SetRagdollPhysics", bUseRagdollLocationOffset, bForceRecreateBones, bForLoading); } + bool IsPlayingUpperBodyCallAnimation_Implementation() { return NativeCall(this, "AShooterCharacter.IsPlayingUpperBodyCallAnimation_Implementation"); } + void ServerCallFollow_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallFollow_Implementation"); } + void ServerCallFollowOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "AShooterCharacter.ServerCallFollowOne_Implementation", ForDinoChar); } + void ServerCallStay_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallStay_Implementation"); } + void ServerCallStayOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "AShooterCharacter.ServerCallStayOne_Implementation", ForDinoChar); } + void ServerCallFollowDistanceCycleOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "AShooterCharacter.ServerCallFollowDistanceCycleOne_Implementation", ForDinoChar); } + void ServerCallAggressive_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallAggressive_Implementation"); } + void ServerCallNeutral_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallNeutral_Implementation"); } + void ServerCallPassive_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallPassive_Implementation"); } + void ServerCallSetAggressive_Implementation() { NativeCall(this, "AShooterCharacter.ServerCallSetAggressive_Implementation"); } + void ServerCallAttackTarget_Implementation(AActor * TheTarget) { NativeCall(this, "AShooterCharacter.ServerCallAttackTarget_Implementation", TheTarget); } + void ClientOrderedMoveTo_Implementation(FVector MoveToLoc) { NativeCall(this, "AShooterCharacter.ClientOrderedMoveTo_Implementation", MoveToLoc); } + void ClientOrderedAttackTarget_Implementation(AActor * attackTarget) { NativeCall(this, "AShooterCharacter.ClientOrderedAttackTarget_Implementation", attackTarget); } + void ServerCallMoveTo_Implementation(FVector MoveToLoc) { NativeCall(this, "AShooterCharacter.ServerCallMoveTo_Implementation", MoveToLoc); } + bool TryAccessInventory() { return NativeCall(this, "AShooterCharacter.TryAccessInventory"); } + void PlayEmoteAnimation_Implementation(char EmoteIndex) { NativeCall(this, "AShooterCharacter.PlayEmoteAnimation_Implementation", EmoteIndex); } + void OnVoiceTalkingStateChanged(bool talking) { NativeCall(this, "AShooterCharacter.OnVoiceTalkingStateChanged", talking); } + void OnFailedJumped() { NativeCall(this, "AShooterCharacter.OnFailedJumped"); } + float GetRecoilMultiplier() { return NativeCall(this, "AShooterCharacter.GetRecoilMultiplier"); } + void StasisingCharacter() { NativeCall(this, "AShooterCharacter.StasisingCharacter"); } + UAnimSequence * GetAlternateStandingAnim(float * OutBlendInTime, float * OutBlendOutTime) { return NativeCall(this, "AShooterCharacter.GetAlternateStandingAnim", OutBlendInTime, OutBlendOutTime); } + bool UseAdditiveStandingAnim() { return NativeCall(this, "AShooterCharacter.UseAdditiveStandingAnim"); } + bool GetAdditiveStandingAnimNonAdditive() { return NativeCall(this, "AShooterCharacter.GetAdditiveStandingAnimNonAdditive"); } + UAnimSequence * GetAdditiveStandingAnim(float * OutBlendInTime, float * OutBlendOutTime) { return NativeCall(this, "AShooterCharacter.GetAdditiveStandingAnim", OutBlendInTime, OutBlendOutTime); } + void ClosedInventoryUI() { NativeCall(this, "AShooterCharacter.ClosedInventoryUI"); } + void ServerSetViewingInventory_Implementation(bool bIsViewing) { NativeCall(this, "AShooterCharacter.ServerSetViewingInventory_Implementation", bIsViewing); } + void ServerCheckDrinkingWater_Implementation() { NativeCall(this, "AShooterCharacter.ServerCheckDrinkingWater_Implementation"); } + void GameStateHandleEvent_Implementation(FName NameParam, FVector VecParam) { NativeCall(this, "AShooterCharacter.GameStateHandleEvent_Implementation", NameParam, VecParam); } + APrimalDinoCharacter * GetRidingDino() { return NativeCall(this, "AShooterCharacter.GetRidingDino"); } + void AttachToLadder_Implementation(USceneComponent * Parent) { NativeCall(this, "AShooterCharacter.AttachToLadder_Implementation", Parent); } + void DetachFromLadder_Implementation() { NativeCall(this, "AShooterCharacter.DetachFromLadder_Implementation"); } + bool IsValidForStatusRecovery() { return NativeCall(this, "AShooterCharacter.IsValidForStatusRecovery"); } + bool IsOnSeatingStructure() { return NativeCall(this, "AShooterCharacter.IsOnSeatingStructure"); } + bool IsControllingBallistaTurret() { return NativeCall(this, "AShooterCharacter.IsControllingBallistaTurret"); } + void OnAttachedToSeatingStructure() { NativeCall(this, "AShooterCharacter.OnAttachedToSeatingStructure"); } + void OnDetachedFromSeatingStructure(APrimalStructureSeating * InSeatingStructure) { NativeCall(this, "AShooterCharacter.OnDetachedFromSeatingStructure", InSeatingStructure); } + void TakeSeatingStructure(APrimalStructureSeating * InSeatingStructure, int SeatNumber, bool bLockedToSeat) { NativeCall(this, "AShooterCharacter.TakeSeatingStructure", InSeatingStructure, SeatNumber, bLockedToSeat); } + void ReleaseSeatingStructure(APrimalStructureSeating * InSeatingStructure) { NativeCall(this, "AShooterCharacter.ReleaseSeatingStructure", InSeatingStructure); } + bool ShouldReplicateRotPitch() { return NativeCall(this, "AShooterCharacter.ShouldReplicateRotPitch"); } + bool IsUsingClimbingPick() { return NativeCall(this, "AShooterCharacter.IsUsingClimbingPick"); } + void ServerPlayFireBallistaAnimation_Implementation() { NativeCall(this, "AShooterCharacter.ServerPlayFireBallistaAnimation_Implementation"); } + void ServerStopFireBallista_Implementation() { NativeCall(this, "AShooterCharacter.ServerStopFireBallista_Implementation"); } + void ServerToClientsPlayFireBallistaAnimation_Implementation() { NativeCall(this, "AShooterCharacter.ServerToClientsPlayFireBallistaAnimation_Implementation"); } + void ServerFireBallistaProjectile_Implementation(FVector Origin, FVector_NetQuantizeNormal ShootDir) { NativeCall(this, "AShooterCharacter.ServerFireBallistaProjectile_Implementation", Origin, ShootDir); } + void ServerSeatingStructureAction_Implementation(char ActionNumber) { NativeCall(this, "AShooterCharacter.ServerSeatingStructureAction_Implementation", ActionNumber); } + void WasPushed(ACharacter * ByOtherCharacter) { NativeCall(this, "AShooterCharacter.WasPushed", ByOtherCharacter); } + void NotifyBumpedPawn(APawn * BumpedPawn) { NativeCall(this, "AShooterCharacter.NotifyBumpedPawn", BumpedPawn); } + void ClientNetEndClimbingLadder_Implementation() { NativeCall(this, "AShooterCharacter.ClientNetEndClimbingLadder_Implementation"); } + void ServerNetEndClimbingLadder_Implementation(bool bIsClimbOver, FVector ClimbOverLoc, float RightDir) { NativeCall(this, "AShooterCharacter.ServerNetEndClimbingLadder_Implementation", bIsClimbOver, ClimbOverLoc, RightDir); } + void RenamePlayer_Implementation(FString * NewName) { NativeCall(this, "AShooterCharacter.RenamePlayer_Implementation", NewName); } + bool AllowDinoTargetingRange(FVector * AtLoc, float TargetingRange) { return NativeCall(this, "AShooterCharacter.AllowDinoTargetingRange", AtLoc, TargetingRange); } + FVector * GetPawnViewLocation(FVector * result, bool bAllTransforms) { return NativeCall(this, "AShooterCharacter.GetPawnViewLocation", result, bAllTransforms); } + FRotator * GetPassengerAttachedRotation(FRotator * result) { return NativeCall(this, "AShooterCharacter.GetPassengerAttachedRotation", result); } + void ClientInviteToAlliance_Implementation(int RequestingTeam, unsigned int AllianceID, FString * AllianceName, FString * InviteeName) { NativeCall(this, "AShooterCharacter.ClientInviteToAlliance_Implementation", RequestingTeam, AllianceID, AllianceName, InviteeName); } + void InviteToAlliance(int RequestingTeam, unsigned int AllianceID, FString AllianceName, FString InviteeName) { NativeCall(this, "AShooterCharacter.InviteToAlliance", RequestingTeam, AllianceID, AllianceName, InviteeName); } + bool CanDragCharacter(APrimalCharacter * Character) { return NativeCall(this, "AShooterCharacter.CanDragCharacter", Character); } + void GiveDefaultWeaponTimer() { NativeCall(this, "AShooterCharacter.GiveDefaultWeaponTimer"); } + bool IsCarryingSomething(bool bNotForRunning) { return NativeCall(this, "AShooterCharacter.IsCarryingSomething", bNotForRunning); } + void ForceGiveDefaultWeapon() { NativeCall(this, "AShooterCharacter.ForceGiveDefaultWeapon"); } + APrimalDinoCharacter * GetBasedOnDino() { return NativeCall(this, "AShooterCharacter.GetBasedOnDino"); } + void HideWeapon() { NativeCall(this, "AShooterCharacter.HideWeapon"); } + void ShowWeapon() { NativeCall(this, "AShooterCharacter.ShowWeapon"); } + void ServerStartSurfaceCameraForPassenger_Implementation(float yaw, float roll, float pitch, bool bShouldInvertInput) { NativeCall(this, "AShooterCharacter.ServerStartSurfaceCameraForPassenger_Implementation", yaw, roll, pitch, bShouldInvertInput); } + float ModifyAirControl(float AirControlIn) { return NativeCall(this, "AShooterCharacter.ModifyAirControl", AirControlIn); } + FVector * GetLastSweepLocation(FVector * result) { return NativeCall(this, "AShooterCharacter.GetLastSweepLocation", result); } + void NetSetHeadHairPercent_Implementation(float thePercent, int newHeadHairIndex) { NativeCall(this, "AShooterCharacter.NetSetHeadHairPercent_Implementation", thePercent, newHeadHairIndex); } + void NetSetFacialHairPercent_Implementation(float thePercent, int newFacialHairIndex) { NativeCall(this, "AShooterCharacter.NetSetFacialHairPercent_Implementation", thePercent, newFacialHairIndex); } + void UpdateHair() { NativeCall(this, "AShooterCharacter.UpdateHair"); } + void NetSetOverrideHeadHairColor_Implementation(FLinearColor HairColor) { NativeCall(this, "AShooterCharacter.NetSetOverrideHeadHairColor_Implementation", HairColor); } + void NetSetOverrideFacialHairColor_Implementation(FLinearColor HairColor) { NativeCall(this, "AShooterCharacter.NetSetOverrideFacialHairColor_Implementation", HairColor); } + void Unstasis() { NativeCall(this, "AShooterCharacter.Unstasis"); } + void RegisterActorTickFunctions(bool bRegister, bool bSaveAndRestoreTickState) { NativeCall(this, "AShooterCharacter.RegisterActorTickFunctions", bRegister, bSaveAndRestoreTickState); } + void OnRep_HatHidden() { NativeCall(this, "AShooterCharacter.OnRep_HatHidden"); } + float GetHeadHairMorphTargetValue() { return NativeCall(this, "AShooterCharacter.GetHeadHairMorphTargetValue"); } + float GetFacialHairMorphTargetValue() { return NativeCall(this, "AShooterCharacter.GetFacialHairMorphTargetValue"); } + void TempDampenInputAcceleration() { NativeCall(this, "AShooterCharacter.TempDampenInputAcceleration"); } + APrimalStructureExplosive * GetAttachedExplosive() { return NativeCall(this, "AShooterCharacter.GetAttachedExplosive"); } + AShooterPlayerController * GetSpawnedForController() { return NativeCall(this, "AShooterCharacter.GetSpawnedForController"); } + void Poop(bool bForcePoop) { NativeCall(this, "AShooterCharacter.Poop", bForcePoop); } + AActor * StructurePlacementUseAlternateOriginActor() { return NativeCall(this, "AShooterCharacter.StructurePlacementUseAlternateOriginActor"); } + USceneComponent * GetActorSoundAttachmentComponentOverride(USceneComponent * ForComponent) { return NativeCall(this, "AShooterCharacter.GetActorSoundAttachmentComponentOverride", ForComponent); } + bool IsNearTopOfLadder() { return NativeCall(this, "AShooterCharacter.IsNearTopOfLadder"); } + bool AllowGrappling_Implementation() { return NativeCall(this, "AShooterCharacter.AllowGrappling_Implementation"); } + void TryCutEnemyGrapplingCable() { NativeCall(this, "AShooterCharacter.TryCutEnemyGrapplingCable"); } + void FinalLoadedFromSaveGame() { NativeCall(this, "AShooterCharacter.FinalLoadedFromSaveGame"); } + AActor * GetSecondaryMountedActor() { return NativeCall(this, "AShooterCharacter.GetSecondaryMountedActor"); } + void FaceRotation(FRotator NewControlRotation, float DeltaTime, bool bFromController) { NativeCall(this, "AShooterCharacter.FaceRotation", NewControlRotation, DeltaTime, bFromController); } + bool IsGameInputAllowed() { return NativeCall(this, "AShooterCharacter.IsGameInputAllowed"); } + bool IsReadyToUpload(UWorld * theWorld) { return NativeCall(this, "AShooterCharacter.IsReadyToUpload", theWorld); } + void ServerClearSwitchingWeapon_Implementation(bool bOnlyIfDefaultWeapon, bool bClientRequestNextWeaponID) { NativeCall(this, "AShooterCharacter.ServerClearSwitchingWeapon_Implementation", bOnlyIfDefaultWeapon, bClientRequestNextWeaponID); } + void ClientReceiveNextWeaponID_Implementation(FItemNetID theItemID) { NativeCall(this, "AShooterCharacter.ClientReceiveNextWeaponID_Implementation", theItemID); } + void DoCharacterDetachment(bool bIncludeRiding, bool bIncludeCarrying, APrimalBuff * BuffToIgnore) { NativeCall(this, "AShooterCharacter.DoCharacterDetachment", bIncludeRiding, bIncludeCarrying, BuffToIgnore); } + bool IsCharacterHardAttached(bool bIgnoreRiding, bool bIgnoreCarried) { return NativeCall(this, "AShooterCharacter.IsCharacterHardAttached", bIgnoreRiding, bIgnoreCarried); } + bool IsGrapplingHardAttached() { return NativeCall(this, "AShooterCharacter.IsGrapplingHardAttached"); } + unsigned int GetUniqueNetIdTypeHash() { return NativeCall(this, "AShooterCharacter.GetUniqueNetIdTypeHash"); } + bool IsSitting(bool bIgnoreLockedToSeat) { return NativeCall(this, "AShooterCharacter.IsSitting", bIgnoreLockedToSeat); } + bool IsProneOrSitting(bool bIgnoreLockedToSeat) { return NativeCall(this, "AShooterCharacter.IsProneOrSitting", bIgnoreLockedToSeat); } + UPrimalItem * GetShieldItem() { return NativeCall(this, "AShooterCharacter.GetShieldItem"); } + static void StaticRegisterNativesAShooterCharacter() { NativeCall(nullptr, "AShooterCharacter.StaticRegisterNativesAShooterCharacter"); } + void ClientInviteToAlliance(int RequestingTeam, unsigned int AllianceID, FString * AllianceName, FString * InviteeName) { NativeCall(this, "AShooterCharacter.ClientInviteToAlliance", RequestingTeam, AllianceID, AllianceName, InviteeName); } + void ClientNetEndClimbingLadder() { NativeCall(this, "AShooterCharacter.ClientNetEndClimbingLadder"); } + void ClientNotifyTribeRequest(FString * RequestTribeName, AShooterCharacter * PlayerCharacter) { NativeCall(this, "AShooterCharacter.ClientNotifyTribeRequest", RequestTribeName, PlayerCharacter); } + void DetachFromLadder() { NativeCall(this, "AShooterCharacter.DetachFromLadder"); } + void DetachGrapHookCable() { NativeCall(this, "AShooterCharacter.DetachGrapHookCable"); } + void GameStateHandleEvent(FName NameParam, FVector VecParam) { NativeCall(this, "AShooterCharacter.GameStateHandleEvent", NameParam, VecParam); } + bool IsPlayingUpperBodyCallAnimation() { return NativeCall(this, "AShooterCharacter.IsPlayingUpperBodyCallAnimation"); } + void RenamePlayer(FString * NewName) { NativeCall(this, "AShooterCharacter.RenamePlayer", NewName); } + void ServerDetachGrapHookCable(bool bDoUpwardsJump, float UpwardsJumpYaw) { NativeCall(this, "AShooterCharacter.ServerDetachGrapHookCable", bDoUpwardsJump, UpwardsJumpYaw); } + void ServerLaunchMountedDino() { NativeCall(this, "AShooterCharacter.ServerLaunchMountedDino"); } + void ServerNotifyBallistaShot(FHitResult Impact, FVector_NetQuantizeNormal ShootDir) { NativeCall(this, "AShooterCharacter.ServerNotifyBallistaShot", Impact, ShootDir); } + void ServerPlayFireBallistaAnimation() { NativeCall(this, "AShooterCharacter.ServerPlayFireBallistaAnimation"); } + void ServerSeatingStructureAction(char ActionNumber) { NativeCall(this, "AShooterCharacter.ServerSeatingStructureAction", ActionNumber); } + void ServerSetBallistaNewRotation(float Pitch, float Yaw) { NativeCall(this, "AShooterCharacter.ServerSetBallistaNewRotation", Pitch, Yaw); } + void ServerStartSurfaceCameraForPassenger(float yaw, float pitch, float roll, bool bShouldInvertInput) { NativeCall(this, "AShooterCharacter.ServerStartSurfaceCameraForPassenger", yaw, pitch, roll, bShouldInvertInput); } + void ServerStopFireBallista() { NativeCall(this, "AShooterCharacter.ServerStopFireBallista"); } +}; + +struct FPrimalPersistentCharacterStatsStruct +{ + FieldValue CharacterStatusComponent_ExtraCharacterLevelField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_ExtraCharacterLevel" }; } + FieldValue CharacterStatusComponent_ExperiencePointsField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_ExperiencePoints" }; } + FieldValue PlayerState_TotalEngramPointsField() { return { this, "FPrimalPersistentCharacterStatsStruct.PlayerState_TotalEngramPoints" }; } + FieldValue CharacterStatusComponent_HighestExtraCharacterLevelField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_HighestExtraCharacterLevel" }; } + FieldValue CharacterStatusComponent_LastRespecAtExtraCharacterLevelField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_LastRespecAtExtraCharacterLevel" }; } + FieldValue> PerMapExplorerNoteUnlocksField() { return { this, "FPrimalPersistentCharacterStatsStruct.PerMapExplorerNoteUnlocks" }; } + FieldValue> EmoteUnlocksField() { return { this, "FPrimalPersistentCharacterStatsStruct.EmoteUnlocks" }; } + FieldValue>> PlayerState_EngramBlueprintsField() { return { this, "FPrimalPersistentCharacterStatsStruct.PlayerState_EngramBlueprints" }; } + FieldArray CharacterStatusComponent_NumberOfLevelUpPointsAppliedField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_NumberOfLevelUpPointsApplied" }; } + FieldArray, 10> PlayerState_DefaultItemSlotClassesField() { return { this, "FPrimalPersistentCharacterStatsStruct.PlayerState_DefaultItemSlotClasses" }; } + FieldArray PlayerState_DefaultItemSlotEngramsField() { return { this, "FPrimalPersistentCharacterStatsStruct.PlayerState_DefaultItemSlotEngrams" }; } + FieldArray DinoOrderGroupsField() { return { this, "FPrimalPersistentCharacterStatsStruct.DinoOrderGroups" }; } + FieldValue CurrentlySelectedDinoOrderGroupField() { return { this, "FPrimalPersistentCharacterStatsStruct.CurrentlySelectedDinoOrderGroup" }; } + FieldValue PercentageOfHeadHairGrowthField() { return { this, "FPrimalPersistentCharacterStatsStruct.PercentageOfHeadHairGrowth" }; } + FieldValue PercentageOfFacialHairGrowthField() { return { this, "FPrimalPersistentCharacterStatsStruct.PercentageOfFacialHairGrowth" }; } + FieldValue FacialHairIndexField() { return { this, "FPrimalPersistentCharacterStatsStruct.FacialHairIndex" }; } + FieldValue HeadHairIndexField() { return { this, "FPrimalPersistentCharacterStatsStruct.HeadHairIndex" }; } + + // Functions + + FPrimalPersistentCharacterStatsStruct * operator=(FPrimalPersistentCharacterStatsStruct * __that) { return NativeCall(this, "FPrimalPersistentCharacterStatsStruct.operator=", __that); } + bool IsPerMapExplorerNoteUnlocked(int ExplorerNoteIndex) { return NativeCall(this, "FPrimalPersistentCharacterStatsStruct.IsPerMapExplorerNoteUnlocked", ExplorerNoteIndex); } + void ApplyToPrimalCharacter(APrimalCharacter * aChar, AShooterPlayerController * forPC, bool bIgnoreStats) { NativeCall(this, "FPrimalPersistentCharacterStatsStruct.ApplyToPrimalCharacter", aChar, forPC, bIgnoreStats); } + void GiveEngramsToPlayerState(APrimalCharacter * aChar, AShooterPlayerController * forPC) { NativeCall(this, "FPrimalPersistentCharacterStatsStruct.GiveEngramsToPlayerState", aChar, forPC); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FPrimalPersistentCharacterStatsStruct.StaticStruct"); } +}; + +struct FPrimalPlayerDataStruct +{ + FieldValue PlayerDataIDField() { return { this, "FPrimalPlayerDataStruct.PlayerDataID" }; } + FieldValue UniqueIDField() { return { this, "FPrimalPlayerDataStruct.UniqueID" }; } + FieldValue SavedNetworkAddressField() { return { this, "FPrimalPlayerDataStruct.SavedNetworkAddress" }; } + FieldValue PlayerNameField() { return { this, "FPrimalPlayerDataStruct.PlayerName" }; } + FieldValue LocalPlayerIndexField() { return { this, "FPrimalPlayerDataStruct.LocalPlayerIndex" }; } + FieldValue MyPlayerCharacterConfigField() { return { this, "FPrimalPlayerDataStruct.MyPlayerCharacterConfig" }; } + FieldPointer MyPersistentCharacterStatsField() { return { this, "FPrimalPlayerDataStruct.MyPersistentCharacterStats" }; } + FieldValue NumPersonalDinosField() { return { this, "FPrimalPlayerDataStruct.NumPersonalDinos" }; } + FieldValue TribeIDField() { return { this, "FPrimalPlayerDataStruct.TribeID" }; } + FieldValue> AppIDSetField() { return { this, "FPrimalPlayerDataStruct.AppIDSet" }; } + FieldValue PlayerDataVersionField() { return { this, "FPrimalPlayerDataStruct.PlayerDataVersion" }; } + FieldValue NextAllowedRespawnTimeField() { return { this, "FPrimalPlayerDataStruct.NextAllowedRespawnTime" }; } + FieldValue LastTimeDiedToEnemyTeamField() { return { this, "FPrimalPlayerDataStruct.LastTimeDiedToEnemyTeam" }; } + FieldValue AllowedRespawnIntervalField() { return { this, "FPrimalPlayerDataStruct.AllowedRespawnInterval" }; } + FieldValue NumOfDeathsField() { return { this, "FPrimalPlayerDataStruct.NumOfDeaths" }; } + FieldValue SpawnDayNumberField() { return { this, "FPrimalPlayerDataStruct.SpawnDayNumber" }; } + FieldValue SpawnDayTimeField() { return { this, "FPrimalPlayerDataStruct.SpawnDayTime" }; } + + // Functions + + FPrimalPlayerDataStruct * operator=(FPrimalPlayerDataStruct * __that) { return NativeCall(this, "FPrimalPlayerDataStruct.operator=", __that); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FPrimalPlayerDataStruct.StaticStruct"); } +}; + +struct UPrimalPlayerData +{ + FieldPointer MyDataField() { return { this, "UPrimalPlayerData.MyData" }; } + FieldValue> MyPersistentBuffDatasField() { return { this, "UPrimalPlayerData.MyPersistentBuffDatas" }; } + FieldValue bIsLocalPlayerField() { return { this, "UPrimalPlayerData.bIsLocalPlayer" }; } + FieldValue LastXPWritePercentField() { return { this, "UPrimalPlayerData.LastXPWritePercent" }; } + + // Functions + + bool MatchesPlayer(AShooterPlayerState * aPlayerState, bool bCheckForExistingPlayer) { return NativeCall(this, "UPrimalPlayerData.MatchesPlayer", aPlayerState, bCheckForExistingPlayer); } + void InitForPlayer(AShooterPlayerState * aPlayerState, bool bDontSaveData) { NativeCall(this, "UPrimalPlayerData.InitForPlayer", aPlayerState, bDontSaveData); } + AShooterPlayerState * GetPlayerState(AShooterPlayerState * ignorePlayerState, bool bOnlyCheckExistingPlayers) { return NativeCall(this, "UPrimalPlayerData.GetPlayerState", ignorePlayerState, bOnlyCheckExistingPlayers); } + static UPrimalPlayerData * GetDataForID(unsigned __int64 PlayerDataID) { return NativeCall(nullptr, "UPrimalPlayerData.GetDataForID", PlayerDataID); } + void ApplyToPlayerState(AShooterPlayerState * aPlayerState) { NativeCall(this, "UPrimalPlayerData.ApplyToPlayerState", aPlayerState); } + void GiveInitialItems(int AppID, AShooterPlayerController * ForPC) { NativeCall(this, "UPrimalPlayerData.GiveInitialItems", AppID, ForPC); } + FString * GetUniqueIdString(FString * result) { return NativeCall(this, "UPrimalPlayerData.GetUniqueIdString", result); } + void SavePlayerData(UWorld * ForWorld) { NativeCall(this, "UPrimalPlayerData.SavePlayerData", ForWorld); } + void ApplyToPlayerCharacter(AShooterPlayerState * ForPlayerState, AShooterCharacter * NewPawn) { NativeCall(this, "UPrimalPlayerData.ApplyToPlayerCharacter", ForPlayerState, NewPawn); } + void RefreshPersistentBuffs(AShooterCharacter * theChar) { NativeCall(this, "UPrimalPlayerData.RefreshPersistentBuffs", theChar); } + void CreatedNewPlayerData() { NativeCall(this, "UPrimalPlayerData.CreatedNewPlayerData"); } + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "UPrimalPlayerData.GetPrivateStaticClass"); } +}; + +struct UPrimalCharacterStatusComponent +{ + FieldArray MaxStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.MaxStatusValues" }; } + FieldArray BaseLevelMaxStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.BaseLevelMaxStatusValues" }; } + FieldArray NumberOfLevelUpPointsAppliedField() { return { this, "UPrimalCharacterStatusComponent.NumberOfLevelUpPointsApplied" }; } + FieldArray NumberOfLevelUpPointsAppliedTamedField() { return { this, "UPrimalCharacterStatusComponent.NumberOfLevelUpPointsAppliedTamed" }; } + FieldValue TamedIneffectivenessModifierField() { return { this, "UPrimalCharacterStatusComponent.TamedIneffectivenessModifier" }; } + FieldValue MovingStaminaRecoveryRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.MovingStaminaRecoveryRateMultiplier" }; } + FieldArray RecoveryRateStatusValueField() { return { this, "UPrimalCharacterStatusComponent.RecoveryRateStatusValue" }; } + FieldArray TimeToRecoverAfterDepletionStatusValueField() { return { this, "UPrimalCharacterStatusComponent.TimeToRecoverAfterDepletionStatusValue" }; } + FieldArray TimeToRecoverAfterDecreaseStatusValueField() { return { this, "UPrimalCharacterStatusComponent.TimeToRecoverAfterDecreaseStatusValue" }; } + FieldArray AmountMaxGainedPerLevelUpValueField() { return { this, "UPrimalCharacterStatusComponent.AmountMaxGainedPerLevelUpValue" }; } + FieldArray AmountMaxGainedPerLevelUpValueTamedField() { return { this, "UPrimalCharacterStatusComponent.AmountMaxGainedPerLevelUpValueTamed" }; } + FieldArray MaxGainedPerLevelUpValueIsPercentField() { return { this, "UPrimalCharacterStatusComponent.MaxGainedPerLevelUpValueIsPercent" }; } + FieldArray RecoveryRateIsPercentField() { return { this, "UPrimalCharacterStatusComponent.RecoveryRateIsPercent" }; } + FieldArray TamingMaxStatMultipliersField() { return { this, "UPrimalCharacterStatusComponent.TamingMaxStatMultipliers" }; } + FieldArray TamingMaxStatAdditionsField() { return { this, "UPrimalCharacterStatusComponent.TamingMaxStatAdditions" }; } + FieldArray MaxLevelUpMultiplierField() { return { this, "UPrimalCharacterStatusComponent.MaxLevelUpMultiplier" }; } + FieldValue TamedLandDinoSwimSpeedLevelUpEffectivenessField() { return { this, "UPrimalCharacterStatusComponent.TamedLandDinoSwimSpeedLevelUpEffectiveness" }; } + FieldValue TamingIneffectivenessMultiplierField() { return { this, "UPrimalCharacterStatusComponent.TamingIneffectivenessMultiplier" }; } + FieldValue DinoRiderWeightMultiplierField() { return { this, "UPrimalCharacterStatusComponent.DinoRiderWeightMultiplier" }; } + FieldArray CanLevelUpValueField() { return { this, "UPrimalCharacterStatusComponent.CanLevelUpValue" }; } + FieldArray DontUseValueField() { return { this, "UPrimalCharacterStatusComponent.DontUseValue" }; } + FieldValue ExperienceAutomaticConsciousIncreaseSpeedField() { return { this, "UPrimalCharacterStatusComponent.ExperienceAutomaticConsciousIncreaseSpeed" }; } + FieldValue CheatMaxWeightField() { return { this, "UPrimalCharacterStatusComponent.CheatMaxWeight" }; } + FieldValue CharacterStatusComponentPriorityField() { return { this, "UPrimalCharacterStatusComponent.CharacterStatusComponentPriority" }; } + FieldValue SuffocationHealthPercentDecreaseSpeedField() { return { this, "UPrimalCharacterStatusComponent.SuffocationHealthPercentDecreaseSpeed" }; } + FieldValue UnsubmergedOxygenIncreaseSpeedField() { return { this, "UPrimalCharacterStatusComponent.UnsubmergedOxygenIncreaseSpeed" }; } + FieldValue SubmergedOxygenDecreaseSpeedField() { return { this, "UPrimalCharacterStatusComponent.SubmergedOxygenDecreaseSpeed" }; } + FieldValue RunningStaminaConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.RunningStaminaConsumptionRate" }; } + FieldValue WalkingStaminaConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.WalkingStaminaConsumptionRate" }; } + FieldValue SwimmingOrFlyingStaminaConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.SwimmingOrFlyingStaminaConsumptionRate" }; } + FieldValue JumpStaminaConsumptionField() { return { this, "UPrimalCharacterStatusComponent.JumpStaminaConsumption" }; } + FieldValue WindedSpeedModifierField() { return { this, "UPrimalCharacterStatusComponent.WindedSpeedModifier" }; } + FieldValue WindedSpeedModifierSwimmingOrFlyingField() { return { this, "UPrimalCharacterStatusComponent.WindedSpeedModifierSwimmingOrFlying" }; } + FieldValue InjuredSpeedModifierField() { return { this, "UPrimalCharacterStatusComponent.InjuredSpeedModifier" }; } + FieldValue HypothermicHealthDecreaseRateBaseField() { return { this, "UPrimalCharacterStatusComponent.HypothermicHealthDecreaseRateBase" }; } + FieldValue HypothermicHealthDecreaseRatePerDegreeField() { return { this, "UPrimalCharacterStatusComponent.HypothermicHealthDecreaseRatePerDegree" }; } + FieldValue HyperthermicHealthDecreaseRateBaseField() { return { this, "UPrimalCharacterStatusComponent.HyperthermicHealthDecreaseRateBase" }; } + FieldValue HyperthermicHealthDecreaseRatePerDegreeField() { return { this, "UPrimalCharacterStatusComponent.HyperthermicHealthDecreaseRatePerDegree" }; } + FieldValue XPEarnedPerStaminaConsumedField() { return { this, "UPrimalCharacterStatusComponent.XPEarnedPerStaminaConsumed" }; } + FieldValue KillXPMultiplierPerCharacterLevelField() { return { this, "UPrimalCharacterStatusComponent.KillXPMultiplierPerCharacterLevel" }; } + FieldValue ShareXPWithTribeRangeField() { return { this, "UPrimalCharacterStatusComponent.ShareXPWithTribeRange" }; } + FieldValue BaseCharacterLevelField() { return { this, "UPrimalCharacterStatusComponent.BaseCharacterLevel" }; } + FieldValue ExtraCharacterLevelField() { return { this, "UPrimalCharacterStatusComponent.ExtraCharacterLevel" }; } + FieldValue ExperiencePointsField() { return { this, "UPrimalCharacterStatusComponent.ExperiencePoints" }; } + FieldValue ReplicatedExperiencePointsField() { return { this, "UPrimalCharacterStatusComponent.ReplicatedExperiencePoints" }; } + FieldValue> LevelExperienceRampTypeField() { return { this, "UPrimalCharacterStatusComponent.LevelExperienceRampType" }; } + FieldValue MaxExperiencePointsField() { return { this, "UPrimalCharacterStatusComponent.MaxExperiencePoints" }; } + FieldValue BaseFoodConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.BaseFoodConsumptionRate" }; } + FieldValue BaseWaterConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.BaseWaterConsumptionRate" }; } + FieldValue FortitudeTorpidityDecreaseMultiplierField() { return { this, "UPrimalCharacterStatusComponent.FortitudeTorpidityDecreaseMultiplier" }; } + FieldValue FortitudeTorpidityIncreaseResistanceField() { return { this, "UPrimalCharacterStatusComponent.FortitudeTorpidityIncreaseResistance" }; } + FieldValue SubmergedWaterIncreaseRateField() { return { this, "UPrimalCharacterStatusComponent.SubmergedWaterIncreaseRate" }; } + FieldValue CrouchedWaterFoodConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.CrouchedWaterFoodConsumptionMultiplier" }; } + FieldValue ProneWaterFoodConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ProneWaterFoodConsumptionMultiplier" }; } + FieldValue StaminaRecoveryDecreaseFoodMultiplierField() { return { this, "UPrimalCharacterStatusComponent.StaminaRecoveryDecreaseFoodMultiplier" }; } + FieldValue StaminaRecoveryDecreaseWaterMultiplierField() { return { this, "UPrimalCharacterStatusComponent.StaminaRecoveryDecreaseWaterMultiplier" }; } + FieldValue HealthRecoveryDecreaseFoodMultiplierField() { return { this, "UPrimalCharacterStatusComponent.HealthRecoveryDecreaseFoodMultiplier" }; } + FieldValue BabyDinoConsumingFoodRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.BabyDinoConsumingFoodRateMultiplier" }; } + FieldValue DinoTamedAdultConsumingFoodRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.DinoTamedAdultConsumingFoodRateMultiplier" }; } + FieldValue BabyGestationConsumingFoodRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.BabyGestationConsumingFoodRateMultiplier" }; } + FieldValue BabyDinoStarvationHealthDecreaseRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.BabyDinoStarvationHealthDecreaseRateMultiplier" }; } + FieldValue BabyMaxHealthPercentField() { return { this, "UPrimalCharacterStatusComponent.BabyMaxHealthPercent" }; } + FieldValue CrouchedStaminaConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.CrouchedStaminaConsumptionMultiplier" }; } + FieldValue ProneStaminaConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ProneStaminaConsumptionMultiplier" }; } + FieldValue StarvationHealthConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.StarvationHealthConsumptionRate" }; } + FieldValue DehyrdationHealthConsumptionRateField() { return { this, "UPrimalCharacterStatusComponent.DehyrdationHealthConsumptionRate" }; } + FieldValue StaminaConsumptionDecreaseWaterMultiplierField() { return { this, "UPrimalCharacterStatusComponent.StaminaConsumptionDecreaseWaterMultiplier" }; } + FieldValue StaminaConsumptionDecreaseFoodMultiplierField() { return { this, "UPrimalCharacterStatusComponent.StaminaConsumptionDecreaseFoodMultiplier" }; } + FieldValue HypothermiaDecreaseFoodMultiplierBaseField() { return { this, "UPrimalCharacterStatusComponent.HypothermiaDecreaseFoodMultiplierBase" }; } + FieldValue HypothermiaDecreaseFoodMultiplierPerDegreeField() { return { this, "UPrimalCharacterStatusComponent.HypothermiaDecreaseFoodMultiplierPerDegree" }; } + FieldValue HyperthermiaDecreaseWaterMultiplierBaseField() { return { this, "UPrimalCharacterStatusComponent.HyperthermiaDecreaseWaterMultiplierBase" }; } + FieldValue HyperthermiaDecreaseWaterMultiplierPerDegreeField() { return { this, "UPrimalCharacterStatusComponent.HyperthermiaDecreaseWaterMultiplierPerDegree" }; } + FieldValue HyperthermiaTemperatureThresholdField() { return { this, "UPrimalCharacterStatusComponent.HyperthermiaTemperatureThreshold" }; } + FieldValue HypothermiaTemperatureThresholdField() { return { this, "UPrimalCharacterStatusComponent.HypothermiaTemperatureThreshold" }; } + FieldValue TorporExitPercentThresholdField() { return { this, "UPrimalCharacterStatusComponent.TorporExitPercentThreshold" }; } + FieldValue KnockedOutTorpidityRecoveryRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.KnockedOutTorpidityRecoveryRateMultiplier" }; } + FieldValue DehydrationTorpidityMultiplierField() { return { this, "UPrimalCharacterStatusComponent.DehydrationTorpidityMultiplier" }; } + FieldValue StarvationTorpidityMultuplierField() { return { this, "UPrimalCharacterStatusComponent.StarvationTorpidityMultuplier" }; } + FieldValue StarvationTorpidityIncreaseRateField() { return { this, "UPrimalCharacterStatusComponent.StarvationTorpidityIncreaseRate" }; } + FieldValue DehyrdationTorpidityIncreaseRateField() { return { this, "UPrimalCharacterStatusComponent.DehyrdationTorpidityIncreaseRate" }; } + FieldValue InjuredTorpidityIncreaseMultiplierField() { return { this, "UPrimalCharacterStatusComponent.InjuredTorpidityIncreaseMultiplier" }; } + FieldValue WeightSpeedDecreasePowerField() { return { this, "UPrimalCharacterStatusComponent.WeightSpeedDecreasePower" }; } + FieldValue WeightJumpDecreasePowerField() { return { this, "UPrimalCharacterStatusComponent.WeightJumpDecreasePower" }; } + FieldValue PoopItemMinFoodConsumptionIntervalField() { return { this, "UPrimalCharacterStatusComponent.PoopItemMinFoodConsumptionInterval" }; } + FieldValue PoopItemMaxFoodConsumptionIntervalField() { return { this, "UPrimalCharacterStatusComponent.PoopItemMaxFoodConsumptionInterval" }; } + FieldValue TheMaxTorporIncreasePerBaseLevelField() { return { this, "UPrimalCharacterStatusComponent.TheMaxTorporIncreasePerBaseLevel" }; } + FieldValue CurrentStatusValuesReplicationIntervalField() { return { this, "UPrimalCharacterStatusComponent.CurrentStatusValuesReplicationInterval" }; } + FieldValue InsulationHyperthermiaOffsetExponentField() { return { this, "UPrimalCharacterStatusComponent.InsulationHyperthermiaOffsetExponent" }; } + FieldValue InsulationHyperthermiaOffsetScalerField() { return { this, "UPrimalCharacterStatusComponent.InsulationHyperthermiaOffsetScaler" }; } + FieldValue InsulationHypothermiaOffsetExponentField() { return { this, "UPrimalCharacterStatusComponent.InsulationHypothermiaOffsetExponent" }; } + FieldValue InsulationHypothermiaOffsetScalerField() { return { this, "UPrimalCharacterStatusComponent.InsulationHypothermiaOffsetScaler" }; } + FieldValue HypoCharacterInsulationValueField() { return { this, "UPrimalCharacterStatusComponent.HypoCharacterInsulationValue" }; } + FieldValue HyperCharacterInsulationValueField() { return { this, "UPrimalCharacterStatusComponent.HyperCharacterInsulationValue" }; } + FieldValue PoopItemFoodConsumptionCacheField() { return { this, "UPrimalCharacterStatusComponent.PoopItemFoodConsumptionCache" }; } + FieldValue LastHypothermalCharacterInsulationValueField() { return { this, "UPrimalCharacterStatusComponent.LastHypothermalCharacterInsulationValue" }; } + FieldValue LastHyperthermalCharacterInsulationValueField() { return { this, "UPrimalCharacterStatusComponent.LastHyperthermalCharacterInsulationValue" }; } + FieldValue> MaxStatusValueToAutoUpdateField() { return { this, "UPrimalCharacterStatusComponent.MaxStatusValueToAutoUpdate" }; } + FieldValue GenericXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.GenericXPMultiplier" }; } + FieldValue CraftEarnXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.CraftEarnXPMultiplier" }; } + FieldValue KillEarnXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.KillEarnXPMultiplier" }; } + FieldValue GenericEarnXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.GenericEarnXPMultiplier" }; } + FieldValue SpecialEarnXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.SpecialEarnXPMultiplier" }; } + FieldValue HarvestEarnXPMultiplierField() { return { this, "UPrimalCharacterStatusComponent.HarvestEarnXPMultiplier" }; } + FieldValue DefaultHyperthermicInsulationField() { return { this, "UPrimalCharacterStatusComponent.DefaultHyperthermicInsulation" }; } + FieldValue DefaultHypothermicInsulationField() { return { this, "UPrimalCharacterStatusComponent.DefaultHypothermicInsulation" }; } + FieldValue MaxTamingEffectivenessBaseLevelMultiplierField() { return { this, "UPrimalCharacterStatusComponent.MaxTamingEffectivenessBaseLevelMultiplier" }; } + FieldValue> StatusValueModifiersField() { return { this, "UPrimalCharacterStatusComponent.StatusValueModifiers" }; } + FieldValue> StatusValueModifierDescriptionIndicesField() { return { this, "UPrimalCharacterStatusComponent.StatusValueModifierDescriptionIndices" }; } + FieldArray CurrentStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.CurrentStatusValues" }; } + FieldArray AdditionalStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.AdditionalStatusValues" }; } + FieldArray ReplicatedCurrentStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.ReplicatedCurrentStatusValues" }; } + FieldArray ReplicatedGlobalMaxStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.ReplicatedGlobalMaxStatusValues" }; } + FieldArray ReplicatedBaseLevelMaxStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.ReplicatedBaseLevelMaxStatusValues" }; } + FieldArray ReplicatedGlobalCurrentStatusValuesField() { return { this, "UPrimalCharacterStatusComponent.ReplicatedGlobalCurrentStatusValues" }; } + FieldArray CurrentStatusStatesField() { return { this, "UPrimalCharacterStatusComponent.CurrentStatusStates" }; } + FieldArray LastDecreasedStatusValuesTimesField() { return { this, "UPrimalCharacterStatusComponent.LastDecreasedStatusValuesTimes" }; } + FieldArray LastIncreasedStatusValuesTimesField() { return { this, "UPrimalCharacterStatusComponent.LastIncreasedStatusValuesTimes" }; } + FieldArray LastMaxedStatusValuesTimesField() { return { this, "UPrimalCharacterStatusComponent.LastMaxedStatusValuesTimes" }; } + FieldArray LastDepletedStatusValuesTimesField() { return { this, "UPrimalCharacterStatusComponent.LastDepletedStatusValuesTimes" }; } + FieldValue StaminaRecoveryExtraResourceDecreaseMultiplierField() { return { this, "UPrimalCharacterStatusComponent.StaminaRecoveryExtraResourceDecreaseMultiplier" }; } + FieldValue DehydrationStaminaRecoveryRateField() { return { this, "UPrimalCharacterStatusComponent.DehydrationStaminaRecoveryRate" }; } + FieldValue WaterConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.WaterConsumptionMultiplier" }; } + FieldValue FoodConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.FoodConsumptionMultiplier" }; } + FieldValue> EnteredStatusStateSoundsField() { return { this, "UPrimalCharacterStatusComponent.EnteredStatusStateSounds" }; } + FieldValue> ExitStatusStateSoundsField() { return { this, "UPrimalCharacterStatusComponent.ExitStatusStateSounds" }; } + FieldValue ExtraOxygenSpeedStatMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraOxygenSpeedStatMultiplier" }; } + FieldValue ExtraTamedHealthMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraTamedHealthMultiplier" }; } + FieldValue WakingTameFoodConsumptionRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.WakingTameFoodConsumptionRateMultiplier" }; } + FieldValue SwimmingStaminaRecoveryRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.SwimmingStaminaRecoveryRateMultiplier" }; } + FieldValue ExtraWaterConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraWaterConsumptionMultiplier" }; } + FieldValue ExtraFoodConsumptionMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraFoodConsumptionMultiplier" }; } + FieldValue DefaultMaxOxygenField() { return { this, "UPrimalCharacterStatusComponent.DefaultMaxOxygen" }; } + FieldValue LastReplicatedCurrentStatusValuesTimeField() { return { this, "UPrimalCharacterStatusComponent.LastReplicatedCurrentStatusValuesTime" }; } + FieldValue OriginalMaxTorporField() { return { this, "UPrimalCharacterStatusComponent.OriginalMaxTorpor" }; } + FieldValue MountedDinoDinoWeightMultiplierField() { return { this, "UPrimalCharacterStatusComponent.MountedDinoDinoWeightMultiplier" }; } + FieldValue ExtraWildDinoDamageMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraWildDinoDamageMultiplier" }; } + FieldValue ExtraTamedDinoDamageMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraTamedDinoDamageMultiplier" }; } + FieldValue WeightMultiplierForCarriedPassengersField() { return { this, "UPrimalCharacterStatusComponent.WeightMultiplierForCarriedPassengers" }; } + FieldValue WeightMultiplierForPlatformPassengersInventoryField() { return { this, "UPrimalCharacterStatusComponent.WeightMultiplierForPlatformPassengersInventory" }; } + FieldArray DinoMaxStatAddMultiplierImprintingField() { return { this, "UPrimalCharacterStatusComponent.DinoMaxStatAddMultiplierImprinting" }; } + FieldValue DinoImprintingQualityField() { return { this, "UPrimalCharacterStatusComponent.DinoImprintingQuality" }; } + FieldValue TamedBaseHealthMultiplierField() { return { this, "UPrimalCharacterStatusComponent.TamedBaseHealthMultiplier" }; } + FieldValue ExtraBabyDinoConsumingFoodRateMultiplierField() { return { this, "UPrimalCharacterStatusComponent.ExtraBabyDinoConsumingFoodRateMultiplier" }; } + FieldValue> StatusValueNameOverridesField() { return { this, "UPrimalCharacterStatusComponent.StatusValueNameOverrides" }; } + FieldValue> RegainOxygenDamageTypeField() { return { this, "UPrimalCharacterStatusComponent.RegainOxygenDamageType" }; } + FieldValue bInWeightLockField() { return { this, "UPrimalCharacterStatusComponent.bInWeightLock" }; } + FieldValue LastReplicatedXPTimeField() { return { this, "UPrimalCharacterStatusComponent.LastReplicatedXPTime" }; } + FieldValue bHasUnlockedMaxPlayerLevelAchievementThisSessionField() { return { this, "UPrimalCharacterStatusComponent.bHasUnlockedMaxPlayerLevelAchievementThisSession" }; } + FieldValue bHasUnlockedMaxDinoLevelAchievementThisSessionField() { return { this, "UPrimalCharacterStatusComponent.bHasUnlockedMaxDinoLevelAchievementThisSession" }; } + + // Functions + + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "UPrimalCharacterStatusComponent.GetLifetimeReplicatedProps", OutLifetimeProps); } + void InitializeComponent() { NativeCall(this, "UPrimalCharacterStatusComponent.InitializeComponent"); } + float GetTotalStatusModifierDescriptionIndex(int StatusValueModifierDescriptionIndex) { return NativeCall(this, "UPrimalCharacterStatusComponent.GetTotalStatusModifierDescriptionIndex", StatusValueModifierDescriptionIndex); } + void AddStatusValueModifier(EPrimalCharacterStatusValue::Type ValueType, float Amount, float Speed, bool bContinueOnUnchangedValue, bool bSetValue, int StatusValueModifierDescriptionIndex, bool bResetExistingModifierDescriptionIndex, float LimitExistingModifierDescriptionToMaxAmount, bool bSetAdditionalValue, EPrimalCharacterStatusValue::Type StopAtValueNearMax, bool bMakeUntameable, TSubclassOf ScaleValueByCharacterDamageType) { NativeCall>(this, "UPrimalCharacterStatusComponent.AddStatusValueModifier", ValueType, Amount, Speed, bContinueOnUnchangedValue, bSetValue, StatusValueModifierDescriptionIndex, bResetExistingModifierDescriptionIndex, LimitExistingModifierDescriptionToMaxAmount, bSetAdditionalValue, StopAtValueNearMax, bMakeUntameable, ScaleValueByCharacterDamageType); } + void ApplyStatusValueModifiers(float DeltaTime) { NativeCall(this, "UPrimalCharacterStatusComponent.ApplyStatusValueModifiers", DeltaTime); } + void TickStatus(float DeltaTime, bool bForceStatusUpdate) { NativeCall(this, "UPrimalCharacterStatusComponent.TickStatus", DeltaTime, bForceStatusUpdate); } + void UpdateStatusValue(EPrimalCharacterStatusValue::Type valueType, float DeltaTime, bool bManualUpdate) { NativeCall(this, "UPrimalCharacterStatusComponent.UpdateStatusValue", valueType, DeltaTime, bManualUpdate); } + void UpdateWeightStat(bool bForceSetValue) { NativeCall(this, "UPrimalCharacterStatusComponent.UpdateWeightStat", bForceSetValue); } + void AdjustStatusValueModification(EPrimalCharacterStatusValue::Type valueType, float * Amount, TSubclassOf DamageTypeClass, bool bManualModification) { NativeCall, bool>(this, "UPrimalCharacterStatusComponent.AdjustStatusValueModification", valueType, Amount, DamageTypeClass, bManualModification); } + void GetDinoFoodConsumptionRateMultiplier(float * Amount) { NativeCall(this, "UPrimalCharacterStatusComponent.GetDinoFoodConsumptionRateMultiplier", Amount); } + float ModifyCurrentStatusValue(EPrimalCharacterStatusValue::Type valueType, float Amount, bool bPercentOfMax, bool bPercentOfCurrent, bool bManualModification, bool bSetValue, TSubclassOf DamageTypeClass, bool bDamageDontKill, bool bForceSetValue) { return NativeCall, bool, bool>(this, "UPrimalCharacterStatusComponent.ModifyCurrentStatusValue", valueType, Amount, bPercentOfMax, bPercentOfCurrent, bManualModification, bSetValue, DamageTypeClass, bDamageDontKill, bForceSetValue); } + void ChangedStatusState(EPrimalCharacterStatusState::Type valueType, bool bEnteredState) { NativeCall(this, "UPrimalCharacterStatusComponent.ChangedStatusState", valueType, bEnteredState); } + void CharacterUpdatedInventory(bool bEquippedOrUneqippedItem) { NativeCall(this, "UPrimalCharacterStatusComponent.CharacterUpdatedInventory", bEquippedOrUneqippedItem); } + void RefreshInsulation() { NativeCall(this, "UPrimalCharacterStatusComponent.RefreshInsulation"); } + void RescaleMaxStat(EPrimalCharacterStatusValue::Type LevelUpValueType, float TargetValue, bool bIsPercentOfTrueValue) { NativeCall(this, "UPrimalCharacterStatusComponent.RescaleMaxStat", LevelUpValueType, TargetValue, bIsPercentOfTrueValue); } + void RefreshTemperature() { NativeCall(this, "UPrimalCharacterStatusComponent.RefreshTemperature"); } + void UpdatedCurrentStatusValue(EPrimalCharacterStatusValue::Type valueType, float Amount, bool bManualModification, TSubclassOf DamageTypeClass, bool bDamageDontKill, bool bDontAdjustOtherStats) { NativeCall, bool, bool>(this, "UPrimalCharacterStatusComponent.UpdatedCurrentStatusValue", valueType, Amount, bManualModification, DamageTypeClass, bDamageDontKill, bDontAdjustOtherStats); } + float GetStatusValueRecoveryRate(EPrimalCharacterStatusValue::Type valueType) { return NativeCall(this, "UPrimalCharacterStatusComponent.GetStatusValueRecoveryRate", valueType); } + void DrawLocalPlayerHUD(AShooterHUD * HUD, float ScaleMult, bool bFromBottomRight) { NativeCall(this, "UPrimalCharacterStatusComponent.DrawLocalPlayerHUD", HUD, ScaleMult, bFromBottomRight); } + void DrawLocalPlayerHUDDescriptions(AShooterHUD * HUD, long double TheTimeSeconds, float ScaleMult, bool bDrawBottomRight) { NativeCall(this, "UPrimalCharacterStatusComponent.DrawLocalPlayerHUDDescriptions", HUD, TheTimeSeconds, ScaleMult, bDrawBottomRight); } + bool IsInStatusState(EPrimalCharacterStatusState::Type StateType) { return NativeCall(this, "UPrimalCharacterStatusComponent.IsInStatusState", StateType); } + void OnJumped() { NativeCall(this, "UPrimalCharacterStatusComponent.OnJumped"); } + float GetMeleeDamageModifier() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetMeleeDamageModifier"); } + float GetMovementSpeedModifier() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetMovementSpeedModifier"); } + float GetJumpZModifier() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetJumpZModifier"); } + void ServerSyncReplicatedValues() { NativeCall(this, "UPrimalCharacterStatusComponent.ServerSyncReplicatedValues"); } + bool CanLevelUp(EPrimalCharacterStatusValue::Type LevelUpValueType) { return NativeCall(this, "UPrimalCharacterStatusComponent.CanLevelUp", LevelUpValueType); } + void ServerApplyLevelUp(EPrimalCharacterStatusValue::Type LevelUpValueType, AShooterPlayerController * ByPC) { NativeCall(this, "UPrimalCharacterStatusComponent.ServerApplyLevelUp", LevelUpValueType, ByPC); } + void SetBaseLevel(int Level, bool bDontCurrentSetToMax) { NativeCall(this, "UPrimalCharacterStatusComponent.SetBaseLevel", Level, bDontCurrentSetToMax); } + void SetTameable(bool bTameable) { NativeCall(this, "UPrimalCharacterStatusComponent.SetTameable", bTameable); } + void SetTamed(float TameIneffectivenessModifier) { NativeCall(this, "UPrimalCharacterStatusComponent.SetTamed", TameIneffectivenessModifier); } + void ApplyTamingStatModifiers(float TameIneffectivenessModifier) { NativeCall(this, "UPrimalCharacterStatusComponent.ApplyTamingStatModifiers", TameIneffectivenessModifier); } + FString * GetStatusValueString(FString * result, EPrimalCharacterStatusValue::Type ValueType, bool bValueOnly) { return NativeCall(this, "UPrimalCharacterStatusComponent.GetStatusValueString", result, ValueType, bValueOnly); } + FString * GetStatusMaxValueString(FString * result, EPrimalCharacterStatusValue::Type ValueType, bool bValueOnly) { return NativeCall(this, "UPrimalCharacterStatusComponent.GetStatusMaxValueString", result, ValueType, bValueOnly); } + void AddExperience(float HowMuch, bool bShareWithTribe, EXPType::Type XPType) { NativeCall(this, "UPrimalCharacterStatusComponent.AddExperience", HowMuch, bShareWithTribe, XPType); } + int GetNumLevelUpsAvailable() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetNumLevelUpsAvailable"); } + float GetExperienceRequiredForNextLevelUp() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetExperienceRequiredForNextLevelUp"); } + float GetExperienceRequiredForPreviousLevelUp() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetExperienceRequiredForPreviousLevelUp"); } + bool IsAtMaxLevel() { return NativeCall(this, "UPrimalCharacterStatusComponent.IsAtMaxLevel"); } + bool HasExperienceForLevelUp() { return NativeCall(this, "UPrimalCharacterStatusComponent.HasExperienceForLevelUp"); } + float GetExperiencePercent() { return NativeCall(this, "UPrimalCharacterStatusComponent.GetExperiencePercent"); } + void NetSyncMaxStatusValues_Implementation(TArray * NetMaxStatusValues, TArray * NetBaseMaxStatusValues) { NativeCall *, TArray *>(this, "UPrimalCharacterStatusComponent.NetSyncMaxStatusValues_Implementation", NetMaxStatusValues, NetBaseMaxStatusValues); } + void ClientSyncMaxStatusValues_Implementation(TArray * NetMaxStatusValues, TArray * NetBaseMaxStatusValues) { NativeCall *, TArray *>(this, "UPrimalCharacterStatusComponent.ClientSyncMaxStatusValues_Implementation", NetMaxStatusValues, NetBaseMaxStatusValues); } + void SetMaxStatusValue(EPrimalCharacterStatusValue::Type StatType, float newValue) { NativeCall(this, "UPrimalCharacterStatusComponent.SetMaxStatusValue", StatType, newValue); } + void RescaleAllStats() { NativeCall(this, "UPrimalCharacterStatusComponent.RescaleAllStats"); } + float BPModifyMaxExperiencePoints(float InMaxExperiencePoints) { return NativeCall(this, "UPrimalCharacterStatusComponent.BPModifyMaxExperiencePoints", InMaxExperiencePoints); } + int BPModifyMaxLevel(int InMaxLevel) { return NativeCall(this, "UPrimalCharacterStatusComponent.BPModifyMaxLevel", InMaxLevel); } +}; + +struct APrimalDinoCharacter : APrimalCharacter +{ + FieldValue> ForcedMasterTargetField() { return { this, "APrimalDinoCharacter.ForcedMasterTarget" }; } + FieldValue MountCharacterSocketNameField() { return { this, "APrimalDinoCharacter.MountCharacterSocketName" }; } + FieldValue> MountCharacterField() { return { this, "APrimalDinoCharacter.MountCharacter" }; } + FieldValue MeshOriginalCollisionChannelField() { return { this, "APrimalDinoCharacter.MeshOriginalCollisionChannel" }; } + FieldValue ColorizationIntensityField() { return { this, "APrimalDinoCharacter.ColorizationIntensity" }; } + FieldValue RidingAttackExtraVelocityField() { return { this, "APrimalDinoCharacter.RidingAttackExtraVelocity" }; } + FieldValue StartChargeAnimationField() { return { this, "APrimalDinoCharacter.StartChargeAnimation" }; } + FieldValue> AttackAnimationsField() { return { this, "APrimalDinoCharacter.AttackAnimations" }; } + FieldValue> AttackAnimationWeightsField() { return { this, "APrimalDinoCharacter.AttackAnimationWeights" }; } + FieldValue> AttackAnimationsTimeFromEndToConsiderFinishedField() { return { this, "APrimalDinoCharacter.AttackAnimationsTimeFromEndToConsiderFinished" }; } + FieldValue> FemaleMaterialOverridesField() { return { this, "APrimalDinoCharacter.FemaleMaterialOverrides" }; } + FieldValue PaintConsumptionMultiplierField() { return { this, "APrimalDinoCharacter.PaintConsumptionMultiplier" }; } + FieldValue ChargingBlockedStopTimeThresholdField() { return { this, "APrimalDinoCharacter.ChargingBlockedStopTimeThreshold" }; } + FieldValue> MeleeSwingSocketsField() { return { this, "APrimalDinoCharacter.MeleeSwingSockets" }; } + FieldValue MeleeDamageAmountField() { return { this, "APrimalDinoCharacter.MeleeDamageAmount" }; } + FieldValue MeleeDamageImpulseField() { return { this, "APrimalDinoCharacter.MeleeDamageImpulse" }; } + FieldValue MeleeSwingRadiusField() { return { this, "APrimalDinoCharacter.MeleeSwingRadius" }; } + FieldValue CurrentAttackIndexField() { return { this, "APrimalDinoCharacter.CurrentAttackIndex" }; } + FieldValue LastAttackIndexField() { return { this, "APrimalDinoCharacter.LastAttackIndex" }; } + FieldValue> MeleeDamageTypeField() { return { this, "APrimalDinoCharacter.MeleeDamageType" }; } + FieldValue> StepActorDamageTypeOverrideField() { return { this, "APrimalDinoCharacter.StepActorDamageTypeOverride" }; } + FieldValue AttackOffsetField() { return { this, "APrimalDinoCharacter.AttackOffset" }; } + FieldValue FleeHealthPercentageField() { return { this, "APrimalDinoCharacter.FleeHealthPercentage" }; } + FieldValue BreakFleeHealthPercentageField() { return { this, "APrimalDinoCharacter.BreakFleeHealthPercentage" }; } + FieldValue TamerStringField() { return { this, "APrimalDinoCharacter.TamerString" }; } + FieldValue TamedNameField() { return { this, "APrimalDinoCharacter.TamedName" }; } + FieldValue OverlayTooltipPaddingField() { return { this, "APrimalDinoCharacter.OverlayTooltipPadding" }; } + FieldValue OverlayTooltipScaleField() { return { this, "APrimalDinoCharacter.OverlayTooltipScale" }; } + FieldValue RiderFPVCameraOffsetField() { return { this, "APrimalDinoCharacter.RiderFPVCameraOffset" }; } + FieldValue LandingLocationField() { return { this, "APrimalDinoCharacter.LandingLocation" }; } + FieldValue StartLandingTimeField() { return { this, "APrimalDinoCharacter.StartLandingTime" }; } + FieldValue LastAxisStartPressTimeField() { return { this, "APrimalDinoCharacter.LastAxisStartPressTime" }; } + FieldValue LastMoveForwardTimeField() { return { this, "APrimalDinoCharacter.LastMoveForwardTime" }; } + FieldValue LandingTraceMaxDistanceField() { return { this, "APrimalDinoCharacter.LandingTraceMaxDistance" }; } + FieldValue FlyingWanderFixedDistanceAmountField() { return { this, "APrimalDinoCharacter.FlyingWanderFixedDistanceAmount" }; } + FieldValue FlyingWanderRandomDistanceAmountField() { return { this, "APrimalDinoCharacter.FlyingWanderRandomDistanceAmount" }; } + FieldValue AcceptableLandingRadiusField() { return { this, "APrimalDinoCharacter.AcceptableLandingRadius" }; } + FieldValue MaxLandingTimeField() { return { this, "APrimalDinoCharacter.MaxLandingTime" }; } + FieldArray GenderSpeedMultipliersField() { return { this, "APrimalDinoCharacter.GenderSpeedMultipliers" }; } + FieldValue ChargeSpeedMultiplierField() { return { this, "APrimalDinoCharacter.ChargeSpeedMultiplier" }; } + FieldValue ChargingAnimField() { return { this, "APrimalDinoCharacter.ChargingAnim" }; } + FieldValue ChargingStaminaPerSecondDrainField() { return { this, "APrimalDinoCharacter.ChargingStaminaPerSecondDrain" }; } + FieldValue ChargingStopDotTresholdField() { return { this, "APrimalDinoCharacter.ChargingStopDotTreshold" }; } + FieldValue LastChargeLocationField() { return { this, "APrimalDinoCharacter.LastChargeLocation" }; } + FieldValue LastStartChargingTimeField() { return { this, "APrimalDinoCharacter.LastStartChargingTime" }; } + FieldValue> RiderField() { return { this, "APrimalDinoCharacter.Rider" }; } + FieldValue> PreviousRiderField() { return { this, "APrimalDinoCharacter.PreviousRider" }; } + FieldValue> SaddleItemClassField() { return { this, "APrimalDinoCharacter.SaddleItemClass" }; } + FieldValue> NoSaddlePassengerSeatsField() { return { this, "APrimalDinoCharacter.NoSaddlePassengerSeats" }; } + FieldValue> CarriedCharacterField() { return { this, "APrimalDinoCharacter.CarriedCharacter" }; } + FieldValue> PreviousCarriedCharacterField() { return { this, "APrimalDinoCharacter.PreviousCarriedCharacter" }; } + FieldValue DinoWithPassengerAnimField() { return { this, "APrimalDinoCharacter.DinoWithPassengerAnim" }; } + FieldValue>> PassengerPerSeatField() { return { this, "APrimalDinoCharacter.PassengerPerSeat" }; } + FieldValue>> PrevPassengerPerSeatField() { return { this, "APrimalDinoCharacter.PrevPassengerPerSeat" }; } + FieldValue LastClientCameraRotationServerUpdateField() { return { this, "APrimalDinoCharacter.LastClientCameraRotationServerUpdate" }; } + FieldValue LastPlayedAttackAnimationField() { return { this, "APrimalDinoCharacter.LastPlayedAttackAnimation" }; } + FieldValue AttackIndexOfPlayedAnimationField() { return { this, "APrimalDinoCharacter.AttackIndexOfPlayedAnimation" }; } + FieldValue> DinoBaseLevelWeightEntriesField() { return { this, "APrimalDinoCharacter.DinoBaseLevelWeightEntries" }; } + FieldValue OriginalCapsuleHalfHeightField() { return { this, "APrimalDinoCharacter.OriginalCapsuleHalfHeight" }; } + FieldValue> LastSocketPositionsField() { return { this, "APrimalDinoCharacter.LastSocketPositions" }; } + FieldValue, FDefaultSetAllocator>> MeleeSwingHurtListField() { return { this, "APrimalDinoCharacter.MeleeSwingHurtList" }; } + FieldValue EndAttackTargetTimeField() { return { this, "APrimalDinoCharacter.EndAttackTargetTime" }; } + FieldValue RidingFirstPersonViewLocationOffsetField() { return { this, "APrimalDinoCharacter.RidingFirstPersonViewLocationOffset" }; } + FieldValue BabyChanceOfTwinsField() { return { this, "APrimalDinoCharacter.BabyChanceOfTwins" }; } + FieldValue BabyGestationSpeedField() { return { this, "APrimalDinoCharacter.BabyGestationSpeed" }; } + FieldValue ExtraBabyGestationSpeedMultiplierField() { return { this, "APrimalDinoCharacter.ExtraBabyGestationSpeedMultiplier" }; } + FieldValue LastEggBoostedTimeField() { return { this, "APrimalDinoCharacter.LastEggBoostedTime" }; } + FieldValue WildPercentageChanceOfBabyField() { return { this, "APrimalDinoCharacter.WildPercentageChanceOfBaby" }; } + FieldValue WildBabyAgeWeightField() { return { this, "APrimalDinoCharacter.WildBabyAgeWeight" }; } + FieldValue BabyGestationProgressField() { return { this, "APrimalDinoCharacter.BabyGestationProgress" }; } + FieldValue LastBabyAgeField() { return { this, "APrimalDinoCharacter.LastBabyAge" }; } + FieldValue LastBabyGestationProgressField() { return { this, "APrimalDinoCharacter.LastBabyGestationProgress" }; } + FieldValue BabyChanceOfTripletsField() { return { this, "APrimalDinoCharacter.BabyChanceOfTriplets" }; } + FieldValue BabyAgeField() { return { this, "APrimalDinoCharacter.BabyAge" }; } + FieldValue MaxPercentOfCapsulHeightAllowedForIKField() { return { this, "APrimalDinoCharacter.MaxPercentOfCapsulHeightAllowedForIK" }; } + FieldValue SlopeBiasForMaxCapsulePercentField() { return { this, "APrimalDinoCharacter.SlopeBiasForMaxCapsulePercent" }; } + FieldValue AutoFadeOutAfterTameTimeField() { return { this, "APrimalDinoCharacter.AutoFadeOutAfterTameTime" }; } + FieldValue FlyingForceRotationRateModifierField() { return { this, "APrimalDinoCharacter.FlyingForceRotationRateModifier" }; } + FieldValue> HideBoneNamesField() { return { this, "APrimalDinoCharacter.HideBoneNames" }; } + FieldValue HideBonesStringField() { return { this, "APrimalDinoCharacter.HideBonesString" }; } + FieldValue WaterSurfaceExtraJumpVectorField() { return { this, "APrimalDinoCharacter.WaterSurfaceExtraJumpVector" }; } + FieldValue FlyerTakeOffAdditionalVelocityField() { return { this, "APrimalDinoCharacter.FlyerTakeOffAdditionalVelocity" }; } + FieldValue OpenDoorDelayField() { return { this, "APrimalDinoCharacter.OpenDoorDelay" }; } + FieldValue TamedWanderHarvestIntervalField() { return { this, "APrimalDinoCharacter.TamedWanderHarvestInterval" }; } + FieldValue TamedWanderHarvestSearchRangeField() { return { this, "APrimalDinoCharacter.TamedWanderHarvestSearchRange" }; } + FieldValue TamedWanderHarvestCollectRadiusField() { return { this, "APrimalDinoCharacter.TamedWanderHarvestCollectRadius" }; } + FieldValue TamedWanderHarvestCollectOffsetField() { return { this, "APrimalDinoCharacter.TamedWanderHarvestCollectOffset" }; } + FieldValue RootLocSwimOffsetField() { return { this, "APrimalDinoCharacter.RootLocSwimOffset" }; } + FieldValue PlayAnimBelowHealthPercentField() { return { this, "APrimalDinoCharacter.PlayAnimBelowHealthPercent" }; } + FieldValue LeavePlayAnimBelowHealthPercentField() { return { this, "APrimalDinoCharacter.LeavePlayAnimBelowHealthPercent" }; } + FieldValue PlatformSaddleMaxStructureBuildDistance2DField() { return { this, "APrimalDinoCharacter.PlatformSaddleMaxStructureBuildDistance2D" }; } + FieldValue PlayAnimBelowHealthField() { return { this, "APrimalDinoCharacter.PlayAnimBelowHealth" }; } + FieldValue LowHealthExitSoundField() { return { this, "APrimalDinoCharacter.LowHealthExitSound" }; } + FieldValue LowHealthEnterSoundField() { return { this, "APrimalDinoCharacter.LowHealthEnterSound" }; } + FieldValue SwimOffsetInterpSpeedField() { return { this, "APrimalDinoCharacter.SwimOffsetInterpSpeed" }; } + FieldValue CurrentRootLocSwimOffsetField() { return { this, "APrimalDinoCharacter.CurrentRootLocSwimOffset" }; } + FieldValue AIRangeMultiplierField() { return { this, "APrimalDinoCharacter.AIRangeMultiplier" }; } + FieldArray PreventColorizationRegionsField() { return { this, "APrimalDinoCharacter.PreventColorizationRegions" }; } + FieldArray ColorSetIndicesField() { return { this, "APrimalDinoCharacter.ColorSetIndices" }; } + FieldArray ColorSetIntensityMultipliersField() { return { this, "APrimalDinoCharacter.ColorSetIntensityMultipliers" }; } + FieldValue MeleeAttackStaminaCostField() { return { this, "APrimalDinoCharacter.MeleeAttackStaminaCost" }; } + FieldValue WakingTameAnimationField() { return { this, "APrimalDinoCharacter.WakingTameAnimation" }; } + FieldValue> TargetField() { return { this, "APrimalDinoCharacter.Target" }; } + FieldValue> TamedFollowTargetField() { return { this, "APrimalDinoCharacter.TamedFollowTarget" }; } + FieldValue PercentChanceFemaleField() { return { this, "APrimalDinoCharacter.PercentChanceFemale" }; } + FieldValue>> DeathGiveItemClassesField() { return { this, "APrimalDinoCharacter.DeathGiveItemClasses" }; } + FieldValue> DeathGiveItemChanceToBeBlueprintField() { return { this, "APrimalDinoCharacter.DeathGiveItemChanceToBeBlueprint" }; } + FieldValue DeathGiveItemQualityMinField() { return { this, "APrimalDinoCharacter.DeathGiveItemQualityMin" }; } + FieldValue DeathGiveItemQualityMaxField() { return { this, "APrimalDinoCharacter.DeathGiveItemQualityMax" }; } + FieldValue DeathGiveItemRangeField() { return { this, "APrimalDinoCharacter.DeathGiveItemRange" }; } + FieldValue DeathGiveAchievementField() { return { this, "APrimalDinoCharacter.DeathGiveAchievement" }; } + FieldValue OverrideAreaMusicField() { return { this, "APrimalDinoCharacter.OverrideAreaMusic" }; } + FieldValue UnboardLocationOffsetField() { return { this, "APrimalDinoCharacter.UnboardLocationOffset" }; } + FieldValue LastTimeWhileHeadingToGoalField() { return { this, "APrimalDinoCharacter.LastTimeWhileHeadingToGoal" }; } + FieldValue RidingNetUpdateFequencyField() { return { this, "APrimalDinoCharacter.RidingNetUpdateFequency" }; } + FieldValue RiderMaxSpeedModifierField() { return { this, "APrimalDinoCharacter.RiderMaxSpeedModifier" }; } + FieldValue RiderExtraMaxSpeedModifierField() { return { this, "APrimalDinoCharacter.RiderExtraMaxSpeedModifier" }; } + FieldValue RiderMaxRunSpeedModifierField() { return { this, "APrimalDinoCharacter.RiderMaxRunSpeedModifier" }; } + FieldValue RiderRotationRateModifierField() { return { this, "APrimalDinoCharacter.RiderRotationRateModifier" }; } + FieldValue SwimmingRotationRateModifierField() { return { this, "APrimalDinoCharacter.SwimmingRotationRateModifier" }; } + FieldValue chargingRotationRateModifierField() { return { this, "APrimalDinoCharacter.chargingRotationRateModifier" }; } + FieldValue EnterFlightAnimField() { return { this, "APrimalDinoCharacter.EnterFlightAnim" }; } + FieldValue ExitFlightAnimField() { return { this, "APrimalDinoCharacter.ExitFlightAnim" }; } + FieldValue SleepConsumeFoodAnimField() { return { this, "APrimalDinoCharacter.SleepConsumeFoodAnim" }; } + FieldValue WakingConsumeFoodAnimField() { return { this, "APrimalDinoCharacter.WakingConsumeFoodAnim" }; } + FieldValue FallAsleepAnimField() { return { this, "APrimalDinoCharacter.FallAsleepAnim" }; } + FieldValue TamedUnsleepAnimField() { return { this, "APrimalDinoCharacter.TamedUnsleepAnim" }; } + FieldValue WildUnsleepAnimField() { return { this, "APrimalDinoCharacter.WildUnsleepAnim" }; } + FieldValue OpenDoorAnimField() { return { this, "APrimalDinoCharacter.OpenDoorAnim" }; } + FieldValue ControlFacePitchInterpSpeedField() { return { this, "APrimalDinoCharacter.ControlFacePitchInterpSpeed" }; } + FieldValue TamedWalkableFloorZField() { return { this, "APrimalDinoCharacter.TamedWalkableFloorZ" }; } + FieldValue CurrentMovementAnimRateField() { return { this, "APrimalDinoCharacter.CurrentMovementAnimRate" }; } + FieldValue MinPlayerLevelForWakingTameField() { return { this, "APrimalDinoCharacter.MinPlayerLevelForWakingTame" }; } + FieldValue ForceNextAttackIndexField() { return { this, "APrimalDinoCharacter.ForceNextAttackIndex" }; } + FieldValue> TamedInventoryComponentTemplateField() { return { this, "APrimalDinoCharacter.TamedInventoryComponentTemplate" }; } + FieldValue DeathInventoryChanceToUseField() { return { this, "APrimalDinoCharacter.DeathInventoryChanceToUse" }; } + FieldValue WakingTameFeedIntervalField() { return { this, "APrimalDinoCharacter.WakingTameFeedInterval" }; } + FieldValue LastWakingTameFedTimeField() { return { this, "APrimalDinoCharacter.LastWakingTameFedTime" }; } + FieldValue DeathInventoryQualityPerLevelMultiplierField() { return { this, "APrimalDinoCharacter.DeathInventoryQualityPerLevelMultiplier" }; } + FieldValue RequiredTameAffinityField() { return { this, "APrimalDinoCharacter.RequiredTameAffinity" }; } + FieldValue RequiredTameAffinityPerBaseLevelField() { return { this, "APrimalDinoCharacter.RequiredTameAffinityPerBaseLevel" }; } + FieldValue TamedAITargetingRangeField() { return { this, "APrimalDinoCharacter.TamedAITargetingRange" }; } + FieldValue CurrentTameAffinityField() { return { this, "APrimalDinoCharacter.CurrentTameAffinity" }; } + FieldValue TameIneffectivenessModifierField() { return { this, "APrimalDinoCharacter.TameIneffectivenessModifier" }; } + FieldValue TameIneffectivenessByAffinityField() { return { this, "APrimalDinoCharacter.TameIneffectivenessByAffinity" }; } + FieldValue LastFrameUseLowQualityAnimationTickField() { return { this, "APrimalDinoCharacter.LastFrameUseLowQualityAnimationTick" }; } + FieldValue MaxSaddleStructuresHeightField() { return { this, "APrimalDinoCharacter.MaxSaddleStructuresHeight" }; } + FieldValue SaddlePivotOffsetField() { return { this, "APrimalDinoCharacter.SaddlePivotOffset" }; } + FieldValue MaxSaddleStructuresNumField() { return { this, "APrimalDinoCharacter.MaxSaddleStructuresNum" }; } + FieldValue TamingFoodConsumeIntervalField() { return { this, "APrimalDinoCharacter.TamingFoodConsumeInterval" }; } + FieldValue DediForceAttackAnimTimeField() { return { this, "APrimalDinoCharacter.DediForceAttackAnimTime" }; } + FieldValue DediForceStartAttackAfterAnimTimeField() { return { this, "APrimalDinoCharacter.DediForceStartAttackAfterAnimTime" }; } + FieldValue WakingTameFoodIncreaseMultiplierField() { return { this, "APrimalDinoCharacter.WakingTameFoodIncreaseMultiplier" }; } + FieldValue TamingTeamIDField() { return { this, "APrimalDinoCharacter.TamingTeamID" }; } + FieldValue OwningPlayerIDField() { return { this, "APrimalDinoCharacter.OwningPlayerID" }; } + FieldValue OwningPlayerNameField() { return { this, "APrimalDinoCharacter.OwningPlayerName" }; } + FieldValue TamingLastFoodConsumptionTimeField() { return { this, "APrimalDinoCharacter.TamingLastFoodConsumptionTime" }; } + FieldValue DinoID1Field() { return { this, "APrimalDinoCharacter.DinoID1" }; } + FieldValue DinoID2Field() { return { this, "APrimalDinoCharacter.DinoID2" }; } + FieldValue PreviousAimRotField() { return { this, "APrimalDinoCharacter.PreviousAimRot" }; } + FieldValue TamedAggressionLevelField() { return { this, "APrimalDinoCharacter.TamedAggressionLevel" }; } + FieldValue TamingIneffectivenessModifierIncreaseByDamagePercentField() { return { this, "APrimalDinoCharacter.TamingIneffectivenessModifierIncreaseByDamagePercent" }; } + FieldValue NPCSpawnerExtraLevelOffsetField() { return { this, "APrimalDinoCharacter.NPCSpawnerExtraLevelOffset" }; } + FieldValue NPCSpawnerLevelMultiplierField() { return { this, "APrimalDinoCharacter.NPCSpawnerLevelMultiplier" }; } + FieldValue> LinkedSupplyCrateField() { return { this, "APrimalDinoCharacter.LinkedSupplyCrate" }; } + FieldValue UntamedPoopTimeMinIntervalField() { return { this, "APrimalDinoCharacter.UntamedPoopTimeMinInterval" }; } + FieldValue UntamedPoopTimeMaxIntervalField() { return { this, "APrimalDinoCharacter.UntamedPoopTimeMaxInterval" }; } + FieldValue MeleeHarvestDamageMultiplierField() { return { this, "APrimalDinoCharacter.MeleeHarvestDamageMultiplier" }; } + FieldValue AllowRidingMaxDistanceField() { return { this, "APrimalDinoCharacter.AllowRidingMaxDistance" }; } + FieldValue UntamedPoopTimeCacheField() { return { this, "APrimalDinoCharacter.UntamedPoopTimeCache" }; } + FieldValue> BaseEggClassField() { return { this, "APrimalDinoCharacter.BaseEggClass" }; } + FieldValue>> EggItemsToSpawnField() { return { this, "APrimalDinoCharacter.EggItemsToSpawn" }; } + FieldValue> EggWeightsToSpawnField() { return { this, "APrimalDinoCharacter.EggWeightsToSpawn" }; } + FieldValue>> FertilizedEggItemsToSpawnField() { return { this, "APrimalDinoCharacter.FertilizedEggItemsToSpawn" }; } + FieldValue> FertilizedEggWeightsToSpawnField() { return { this, "APrimalDinoCharacter.FertilizedEggWeightsToSpawn" }; } + FieldValue EggChanceToSpawnUnstasisField() { return { this, "APrimalDinoCharacter.EggChanceToSpawnUnstasis" }; } + FieldValue EggIntervalBetweenUnstasisChancesField() { return { this, "APrimalDinoCharacter.EggIntervalBetweenUnstasisChances" }; } + FieldValue EggRangeMaximumNumberFromSameDinoTypeField() { return { this, "APrimalDinoCharacter.EggRangeMaximumNumberFromSameDinoType" }; } + FieldValue EggMaximumNumberFromSameDinoTypeField() { return { this, "APrimalDinoCharacter.EggMaximumNumberFromSameDinoType" }; } + FieldValue EggRangeMaximumNumberField() { return { this, "APrimalDinoCharacter.EggRangeMaximumNumber" }; } + FieldValue EggMaximumNumberField() { return { this, "APrimalDinoCharacter.EggMaximumNumber" }; } + FieldValue UntamedWalkingSpeedModifierField() { return { this, "APrimalDinoCharacter.UntamedWalkingSpeedModifier" }; } + FieldValue TamedWalkingSpeedModifierField() { return { this, "APrimalDinoCharacter.TamedWalkingSpeedModifier" }; } + FieldValue UntamedRunningSpeedModifierField() { return { this, "APrimalDinoCharacter.UntamedRunningSpeedModifier" }; } + FieldValue TamedRunningSpeedModifierField() { return { this, "APrimalDinoCharacter.TamedRunningSpeedModifier" }; } + FieldValue RiderAnimOverrideField() { return { this, "APrimalDinoCharacter.RiderAnimOverride" }; } + FieldValue TurningRightRiderAnimOverrideField() { return { this, "APrimalDinoCharacter.TurningRightRiderAnimOverride" }; } + FieldValue TurningLeftRiderAnimOverrideField() { return { this, "APrimalDinoCharacter.TurningLeftRiderAnimOverride" }; } + FieldValue LatchedRiderAnimOverrideField() { return { this, "APrimalDinoCharacter.LatchedRiderAnimOverride" }; } + FieldValue RiderMoveAnimOverrideField() { return { this, "APrimalDinoCharacter.RiderMoveAnimOverride" }; } + FieldValue RidingAnimSpeedFactorField() { return { this, "APrimalDinoCharacter.RidingAnimSpeedFactor" }; } + FieldValue StartRidingAnimOverrideField() { return { this, "APrimalDinoCharacter.StartRidingAnimOverride" }; } + FieldValue StopRidingAnimOverrideField() { return { this, "APrimalDinoCharacter.StopRidingAnimOverride" }; } + FieldValue TargetingTeamNameOverrideField() { return { this, "APrimalDinoCharacter.TargetingTeamNameOverride" }; } + FieldValue ExtraTamedSpeedMultiplierField() { return { this, "APrimalDinoCharacter.ExtraTamedSpeedMultiplier" }; } + FieldValue ExtraUnTamedSpeedMultiplierField() { return { this, "APrimalDinoCharacter.ExtraUnTamedSpeedMultiplier" }; } + FieldValue LastEggSpawnChanceTimeField() { return { this, "APrimalDinoCharacter.LastEggSpawnChanceTime" }; } + FieldValue OriginalNPCVolumeNameField() { return { this, "APrimalDinoCharacter.OriginalNPCVolumeName" }; } + FieldValue OutsideOriginalNPCVolumeStasisDestroyIntervalField() { return { this, "APrimalDinoCharacter.OutsideOriginalNPCVolumeStasisDestroyInterval" }; } + FieldValue StasisedDestroyIntervalField() { return { this, "APrimalDinoCharacter.StasisedDestroyInterval" }; } + FieldValue TamedAllowNamingTimeField() { return { this, "APrimalDinoCharacter.TamedAllowNamingTime" }; } + FieldValue MovementSpeedScalingRotationRatePowerField() { return { this, "APrimalDinoCharacter.MovementSpeedScalingRotationRatePower" }; } + FieldValue AttackNoStaminaTorpidityMultiplierField() { return { this, "APrimalDinoCharacter.AttackNoStaminaTorpidityMultiplier" }; } + FieldValue DecayDestructionPeriodField() { return { this, "APrimalDinoCharacter.DecayDestructionPeriod" }; } + FieldValue TamedAtTimeField() { return { this, "APrimalDinoCharacter.TamedAtTime" }; } + FieldValue LastInAllyRangeTimeField() { return { this, "APrimalDinoCharacter.LastInAllyRangeTime" }; } + FieldValue> LatchedOnStructuresField() { return { this, "APrimalDinoCharacter.LatchedOnStructures" }; } + FieldValue OriginalTargetingTeamField() { return { this, "APrimalDinoCharacter.OriginalTargetingTeam" }; } + FieldValue PreviousRootYawSpeedField() { return { this, "APrimalDinoCharacter.PreviousRootYawSpeed" }; } + FieldValue LastTimeFallingField() { return { this, "APrimalDinoCharacter.LastTimeFalling" }; } + FieldValue TamedCorpseLifespanField() { return { this, "APrimalDinoCharacter.TamedCorpseLifespan" }; } + FieldValue MateBoostDamageReceiveMultiplierField() { return { this, "APrimalDinoCharacter.MateBoostDamageReceiveMultiplier" }; } + FieldValue MateBoostDamageGiveMultiplierField() { return { this, "APrimalDinoCharacter.MateBoostDamageGiveMultiplier" }; } + FieldValue MateBoostRangeField() { return { this, "APrimalDinoCharacter.MateBoostRange" }; } + FieldValue DinoNameTagField() { return { this, "APrimalDinoCharacter.DinoNameTag" }; } + FieldValue AttackMyTargetForPlayerControllerField() { return { this, "APrimalDinoCharacter.AttackMyTargetForPlayerController" }; } + FieldValue RidingAttackExtraVelocityDelayField() { return { this, "APrimalDinoCharacter.RidingAttackExtraVelocityDelay" }; } + FieldValue StepDamageRadialDamageIntervalField() { return { this, "APrimalDinoCharacter.StepDamageRadialDamageInterval" }; } + FieldValue StepDamageRadialDamageExtraRadiusField() { return { this, "APrimalDinoCharacter.StepDamageRadialDamageExtraRadius" }; } + FieldValue StepDamageRadialDamageAmountGeneralField() { return { this, "APrimalDinoCharacter.StepDamageRadialDamageAmountGeneral" }; } + FieldValue StepDamageRadialDamageAmountHarvestableField() { return { this, "APrimalDinoCharacter.StepDamageRadialDamageAmountHarvestable" }; } + FieldValue LastRadialStepDamageTimeField() { return { this, "APrimalDinoCharacter.LastRadialStepDamageTime" }; } + FieldValue> StepHarvestableDamageTypeField() { return { this, "APrimalDinoCharacter.StepHarvestableDamageType" }; } + FieldValue StepDamageFootDamageIntervalField() { return { this, "APrimalDinoCharacter.StepDamageFootDamageInterval" }; } + FieldValue StepDamageFootDamageRadiusField() { return { this, "APrimalDinoCharacter.StepDamageFootDamageRadius" }; } + FieldValue StepDamageFootDamageAmountField() { return { this, "APrimalDinoCharacter.StepDamageFootDamageAmount" }; } + FieldValue> StepDamageFootDamageSocketsField() { return { this, "APrimalDinoCharacter.StepDamageFootDamageSockets" }; } + FieldValue DurationBeforeMovingStuckPawnField() { return { this, "APrimalDinoCharacter.DurationBeforeMovingStuckPawn" }; } + FieldValue LastCheckedLocationField() { return { this, "APrimalDinoCharacter.LastCheckedLocation" }; } + FieldValue LastValidNotStuckTimeField() { return { this, "APrimalDinoCharacter.LastValidNotStuckTime" }; } + FieldValue StartledAnimationRightDefaultField() { return { this, "APrimalDinoCharacter.StartledAnimationRightDefault" }; } + FieldValue StartledAnimationLeftField() { return { this, "APrimalDinoCharacter.StartledAnimationLeft" }; } + FieldValue> StartledAnimationsField() { return { this, "APrimalDinoCharacter.StartledAnimations" }; } + FieldValue FlyingStartledAnimationField() { return { this, "APrimalDinoCharacter.FlyingStartledAnimation" }; } + FieldValue RandomPlayStartledAnimIntervalMinField() { return { this, "APrimalDinoCharacter.RandomPlayStartledAnimIntervalMin" }; } + FieldValue RandomPlayStartledAnimIntervalMaxField() { return { this, "APrimalDinoCharacter.RandomPlayStartledAnimIntervalMax" }; } + FieldValue StartledAnimationCooldownField() { return { this, "APrimalDinoCharacter.StartledAnimationCooldown" }; } + FieldValue DefaultActivateAttackRangeOffsetField() { return { this, "APrimalDinoCharacter.DefaultActivateAttackRangeOffset" }; } + FieldValue CorpseTargetingMultiplierField() { return { this, "APrimalDinoCharacter.CorpseTargetingMultiplier" }; } + FieldValue LastFootStepDamageTimeField() { return { this, "APrimalDinoCharacter.LastFootStepDamageTime" }; } + FieldValue LastStartledTimeField() { return { this, "APrimalDinoCharacter.LastStartledTime" }; } + FieldValue CorpseLifespanNonRelevantField() { return { this, "APrimalDinoCharacter.CorpseLifespanNonRelevant" }; } + FieldValue MinStaminaForRiderField() { return { this, "APrimalDinoCharacter.MinStaminaForRider" }; } + FieldValue LoseStaminaWithRiderRateField() { return { this, "APrimalDinoCharacter.LoseStaminaWithRiderRate" }; } + FieldValue FollowingRunDistanceField() { return { this, "APrimalDinoCharacter.FollowingRunDistance" }; } + FieldValue MaxDinoKillerTransferWeightPercentField() { return { this, "APrimalDinoCharacter.MaxDinoKillerTransferWeightPercent" }; } + FieldValue NPCZoneVolumeCountWeightField() { return { this, "APrimalDinoCharacter.NPCZoneVolumeCountWeight" }; } + FieldValue NPCLerpToMaxRandomBaseLevelField() { return { this, "APrimalDinoCharacter.NPCLerpToMaxRandomBaseLevel" }; } + FieldValue FloatingHUDTextWorldOffsetField() { return { this, "APrimalDinoCharacter.FloatingHUDTextWorldOffset" }; } + FieldValue LastAttackedTargetTimeField() { return { this, "APrimalDinoCharacter.LastAttackedTargetTime" }; } + FieldValue LastForcedLandingCheckTimeField() { return { this, "APrimalDinoCharacter.LastForcedLandingCheckTime" }; } + FieldValue LastAllyTargetLookTimeField() { return { this, "APrimalDinoCharacter.LastAllyTargetLookTime" }; } + FieldValue LastAttackedTimeField() { return { this, "APrimalDinoCharacter.LastAttackedTime" }; } + FieldValue LastPlayerDinoOverlapRelevantTimeField() { return { this, "APrimalDinoCharacter.LastPlayerDinoOverlapRelevantTime" }; } + FieldValue DinoAimRotationOffsetField() { return { this, "APrimalDinoCharacter.DinoAimRotationOffset" }; } + FieldValue LastDinoAllyLookInterpTimeField() { return { this, "APrimalDinoCharacter.LastDinoAllyLookInterpTime" }; } + FieldValue LastRiderOverlappedPositionField() { return { this, "APrimalDinoCharacter.LastRiderOverlappedPosition" }; } + FieldValue> AutoDragByPawnField() { return { this, "APrimalDinoCharacter.AutoDragByPawn" }; } + FieldValue NextRidingFlyerUndergroundCheckField() { return { this, "APrimalDinoCharacter.NextRidingFlyerUndergroundCheck" }; } + FieldValue LastSetRiderTimeField() { return { this, "APrimalDinoCharacter.LastSetRiderTime" }; } + FieldValue> RepairRequirementsItemField() { return { this, "APrimalDinoCharacter.RepairRequirementsItem" }; } + FieldValue RepairAmountRemainingField() { return { this, "APrimalDinoCharacter.RepairAmountRemaining" }; } + FieldValue RepairCheckIntervalField() { return { this, "APrimalDinoCharacter.RepairCheckInterval" }; } + FieldValue RepairPercentPerIntervalField() { return { this, "APrimalDinoCharacter.RepairPercentPerInterval" }; } + FieldValue RiderCheckTraceOffsetField() { return { this, "APrimalDinoCharacter.RiderCheckTraceOffset" }; } + FieldValue RiderEjectionImpulseField() { return { this, "APrimalDinoCharacter.RiderEjectionImpulse" }; } + FieldValue WakingTameAffinityDecreaseFoodPercentageField() { return { this, "APrimalDinoCharacter.WakingTameAffinityDecreaseFoodPercentage" }; } + FieldValue WakingTameAllowFeedingFoodPercentageField() { return { this, "APrimalDinoCharacter.WakingTameAllowFeedingFoodPercentage" }; } + FieldValue WakingTameFoodAffinityMultiplierField() { return { this, "APrimalDinoCharacter.WakingTameFoodAffinityMultiplier" }; } + FieldValue CheckForWildAmbientHarvestingIntervalMinField() { return { this, "APrimalDinoCharacter.CheckForWildAmbientHarvestingIntervalMin" }; } + FieldValue CheckForWildAmbientHarvestingIntervalMaxField() { return { this, "APrimalDinoCharacter.CheckForWildAmbientHarvestingIntervalMax" }; } + FieldValue WildAmbientHarvestingTimerField() { return { this, "APrimalDinoCharacter.WildAmbientHarvestingTimer" }; } + FieldValue WildAmbientHarvestingAnimationField() { return { this, "APrimalDinoCharacter.WildAmbientHarvestingAnimation" }; } + FieldValue> WildAmbientHarvestingAnimationsField() { return { this, "APrimalDinoCharacter.WildAmbientHarvestingAnimations" }; } + FieldValue WildAmbientHarvestingRadiusField() { return { this, "APrimalDinoCharacter.WildAmbientHarvestingRadius" }; } + FieldValue FlyerNumUnderGroundFailField() { return { this, "APrimalDinoCharacter.FlyerNumUnderGroundFail" }; } + FieldValue AbsoluteBaseLevelField() { return { this, "APrimalDinoCharacter.AbsoluteBaseLevel" }; } + FieldValue> TamedHarvestDamageTypeField() { return { this, "APrimalDinoCharacter.TamedHarvestDamageType" }; } + FieldValue> DraggedRagdollsField() { return { this, "APrimalDinoCharacter.DraggedRagdolls" }; } + FieldValue LastOverrodeRandomWanderLocationField() { return { this, "APrimalDinoCharacter.LastOverrodeRandomWanderLocation" }; } + FieldValue ChargeBumpDamageField() { return { this, "APrimalDinoCharacter.ChargeBumpDamage" }; } + FieldValue> ChargeBumpDamageTypeField() { return { this, "APrimalDinoCharacter.ChargeBumpDamageType" }; } + FieldValue ChargeBumpImpulseField() { return { this, "APrimalDinoCharacter.ChargeBumpImpulse" }; } + FieldValue MinChargeIntervalField() { return { this, "APrimalDinoCharacter.MinChargeInterval" }; } + FieldValue PlayerMountedLaunchFowardSpeedField() { return { this, "APrimalDinoCharacter.PlayerMountedLaunchFowardSpeed" }; } + FieldValue PlayerMountedLaunchUpSpeedField() { return { this, "APrimalDinoCharacter.PlayerMountedLaunchUpSpeed" }; } + FieldValue AttackOnLaunchMaximumTargetDistanceField() { return { this, "APrimalDinoCharacter.AttackOnLaunchMaximumTargetDistance" }; } + FieldValue KeepFlightRemainingTimeField() { return { this, "APrimalDinoCharacter.KeepFlightRemainingTime" }; } + FieldValue MountCharacterAnimationField() { return { this, "APrimalDinoCharacter.MountCharacterAnimation" }; } + FieldValue UnmountCharacterAnimationField() { return { this, "APrimalDinoCharacter.UnmountCharacterAnimation" }; } + FieldValue EndChargingAnimationField() { return { this, "APrimalDinoCharacter.EndChargingAnimation" }; } + FieldValue FlyingRunSpeedModifierField() { return { this, "APrimalDinoCharacter.FlyingRunSpeedModifier" }; } + FieldValue ChargingAnimDelayField() { return { this, "APrimalDinoCharacter.ChargingAnimDelay" }; } + FieldValue RiderSocketNameField() { return { this, "APrimalDinoCharacter.RiderSocketName" }; } + FieldValue ChargingActivationRequiresStaminaField() { return { this, "APrimalDinoCharacter.ChargingActivationRequiresStamina" }; } + FieldValue ChargingActivationConsumesStaminaField() { return { this, "APrimalDinoCharacter.ChargingActivationConsumesStamina" }; } + FieldValue FlyerHardBreakingOverrideField() { return { this, "APrimalDinoCharacter.FlyerHardBreakingOverride" }; } + FieldValue BabyScaleField() { return { this, "APrimalDinoCharacter.BabyScale" }; } + FieldValue BabySpeedMultiplierField() { return { this, "APrimalDinoCharacter.BabySpeedMultiplier" }; } + FieldValue BabyPitchMultiplierField() { return { this, "APrimalDinoCharacter.BabyPitchMultiplier" }; } + FieldValue BabyVolumeMultiplierField() { return { this, "APrimalDinoCharacter.BabyVolumeMultiplier" }; } + FieldValue> WanderAroundActorField() { return { this, "APrimalDinoCharacter.WanderAroundActor" }; } + FieldValue WanderAroundActorMaxDistanceField() { return { this, "APrimalDinoCharacter.WanderAroundActorMaxDistance" }; } + FieldValue ChargingStartBlockedTimeField() { return { this, "APrimalDinoCharacter.ChargingStartBlockedTime" }; } + FieldValue LastChargeEndTimeField() { return { this, "APrimalDinoCharacter.LastChargeEndTime" }; } + FieldValue> SaddledStructuresField() { return { this, "APrimalDinoCharacter.SaddledStructures" }; } + FieldValue LastTamedFlyerNearbyAllyCheckTimeField() { return { this, "APrimalDinoCharacter.LastTamedFlyerNearbyAllyCheckTime" }; } + FieldValue LastUpdatedBabyAgeAtTimeField() { return { this, "APrimalDinoCharacter.LastUpdatedBabyAgeAtTime" }; } + FieldValue LastUpdatedGestationAtTimeField() { return { this, "APrimalDinoCharacter.LastUpdatedGestationAtTime" }; } + FieldValue LastUpdatedMatingAtTimeField() { return { this, "APrimalDinoCharacter.LastUpdatedMatingAtTime" }; } + FieldValue BabyAgeSpeedField() { return { this, "APrimalDinoCharacter.BabyAgeSpeed" }; } + FieldValue ExtraBabyAgeSpeedMultiplierField() { return { this, "APrimalDinoCharacter.ExtraBabyAgeSpeedMultiplier" }; } + FieldValue FemaleMatingRangeAdditionField() { return { this, "APrimalDinoCharacter.FemaleMatingRangeAddition" }; } + FieldValue FemaleMatingTimeField() { return { this, "APrimalDinoCharacter.FemaleMatingTime" }; } + FieldValue NextAllowedMatingTimeField() { return { this, "APrimalDinoCharacter.NextAllowedMatingTime" }; } + FieldValue MatingProgressField() { return { this, "APrimalDinoCharacter.MatingProgress" }; } + FieldValue LastMatingNotificationTimeField() { return { this, "APrimalDinoCharacter.LastMatingNotificationTime" }; } + FieldValue MatingWithDinoField() { return { this, "APrimalDinoCharacter.MatingWithDino" }; } + FieldValue MatingAnimationMaleField() { return { this, "APrimalDinoCharacter.MatingAnimationMale" }; } + FieldArray GestationEggNumberOfLevelUpPointsAppliedField() { return { this, "APrimalDinoCharacter.GestationEggNumberOfLevelUpPointsApplied" }; } + FieldValue GestationEggTamedIneffectivenessModifierField() { return { this, "APrimalDinoCharacter.GestationEggTamedIneffectivenessModifier" }; } + FieldArray GestationEggColorSetIndicesField() { return { this, "APrimalDinoCharacter.GestationEggColorSetIndices" }; } + FieldValue NewFemaleMinTimeBetweenMatingField() { return { this, "APrimalDinoCharacter.NewFemaleMinTimeBetweenMating" }; } + FieldValue NewFemaleMaxTimeBetweenMatingField() { return { this, "APrimalDinoCharacter.NewFemaleMaxTimeBetweenMating" }; } + FieldValue>> DefaultTamedBuffsField() { return { this, "APrimalDinoCharacter.DefaultTamedBuffs" }; } + FieldValue InterpolatedVelocityField() { return { this, "APrimalDinoCharacter.InterpolatedVelocity" }; } + FieldValue OldInterpolatedLocationField() { return { this, "APrimalDinoCharacter.OldInterpolatedLocation" }; } + FieldValue HyperThermiaInsulationField() { return { this, "APrimalDinoCharacter.HyperThermiaInsulation" }; } + FieldValue HypoThermiaInsulationField() { return { this, "APrimalDinoCharacter.HypoThermiaInsulation" }; } + FieldValue InsulationRangeField() { return { this, "APrimalDinoCharacter.InsulationRange" }; } + FieldValue GangOverlapRangeField() { return { this, "APrimalDinoCharacter.GangOverlapRange" }; } + FieldValue GangDamageResistanceField() { return { this, "APrimalDinoCharacter.GangDamageResistance" }; } + FieldValue GangDamageField() { return { this, "APrimalDinoCharacter.GangDamage" }; } + FieldValue MaxGangCountField() { return { this, "APrimalDinoCharacter.MaxGangCount" }; } + FieldValue GangCountField() { return { this, "APrimalDinoCharacter.GangCount" }; } + FieldValue LastGangCheckTimeField() { return { this, "APrimalDinoCharacter.LastGangCheckTime" }; } + FieldValue LastGangCheckPositionField() { return { this, "APrimalDinoCharacter.LastGangCheckPosition" }; } + FieldValue PreviousTargetingTeamField() { return { this, "APrimalDinoCharacter.PreviousTargetingTeam" }; } + FieldValue LastRiderExitFrameCounterField() { return { this, "APrimalDinoCharacter.LastRiderExitFrameCounter" }; } + FieldValue WildRandomScaleField() { return { this, "APrimalDinoCharacter.WildRandomScale" }; } + FieldValue HeldJumpSlowFallingGravityZScaleField() { return { this, "APrimalDinoCharacter.HeldJumpSlowFallingGravityZScale" }; } + FieldValue SlowFallingAnimField() { return { this, "APrimalDinoCharacter.SlowFallingAnim" }; } + FieldValue SlowFallingStaminaCostPerSecondField() { return { this, "APrimalDinoCharacter.SlowFallingStaminaCostPerSecond" }; } + FieldValue NoRiderRotationModifierField() { return { this, "APrimalDinoCharacter.NoRiderRotationModifier" }; } + FieldValue RiderFPVCameraUseSocketNameField() { return { this, "APrimalDinoCharacter.RiderFPVCameraUseSocketName" }; } + FieldValue RiderLatchedFPVCameraUseSocketNameField() { return { this, "APrimalDinoCharacter.RiderLatchedFPVCameraUseSocketName" }; } + FieldValue PassengerFPVCameraRootSocketField() { return { this, "APrimalDinoCharacter.PassengerFPVCameraRootSocket" }; } + FieldValue> FPVRiderBoneNamesToHideField() { return { this, "APrimalDinoCharacter.FPVRiderBoneNamesToHide" }; } + FieldValue ExtraRunningSpeedModifierField() { return { this, "APrimalDinoCharacter.ExtraRunningSpeedModifier" }; } + FieldValue ScaleExtraRunningSpeedModifierMinField() { return { this, "APrimalDinoCharacter.ScaleExtraRunningSpeedModifierMin" }; } + FieldValue ScaleExtraRunningSpeedModifierMaxField() { return { this, "APrimalDinoCharacter.ScaleExtraRunningSpeedModifierMax" }; } + FieldValue ScaleExtraRunningSpeedModifierSpeedField() { return { this, "APrimalDinoCharacter.ScaleExtraRunningSpeedModifierSpeed" }; } + FieldValue LastHigherScaleExtraRunningSpeedValueField() { return { this, "APrimalDinoCharacter.LastHigherScaleExtraRunningSpeedValue" }; } + FieldValue LastHigherScaleExtraRunningSpeedTimeField() { return { this, "APrimalDinoCharacter.LastHigherScaleExtraRunningSpeedTime" }; } + FieldValue RiderMovementSpeedScalingRotationRatePowerMultiplierField() { return { this, "APrimalDinoCharacter.RiderMovementSpeedScalingRotationRatePowerMultiplier" }; } + FieldValue LoadDestroyWildDinosUnderVersionField() { return { this, "APrimalDinoCharacter.LoadDestroyWildDinosUnderVersion" }; } + FieldValue SaveDestroyWildDinosUnderVersionField() { return { this, "APrimalDinoCharacter.SaveDestroyWildDinosUnderVersion" }; } + FieldValue AllowWaterSurfaceExtraJumpStaminaCostField() { return { this, "APrimalDinoCharacter.AllowWaterSurfaceExtraJumpStaminaCost" }; } + FieldValue PlayKillLocalSoundField() { return { this, "APrimalDinoCharacter.PlayKillLocalSound" }; } + FieldValue> RiderAttackTargetField() { return { this, "APrimalDinoCharacter.RiderAttackTarget" }; } + FieldValue RiderAttackLocationField() { return { this, "APrimalDinoCharacter.RiderAttackLocation" }; } + FieldValue TribeGroupPetOrderingRankField() { return { this, "APrimalDinoCharacter.TribeGroupPetOrderingRank" }; } + FieldValue TribeGroupPetRidingRankField() { return { this, "APrimalDinoCharacter.TribeGroupPetRidingRank" }; } + FieldValue FollowStoppingDistanceField() { return { this, "APrimalDinoCharacter.FollowStoppingDistance" }; } + FieldValue ImprinterNameField() { return { this, "APrimalDinoCharacter.ImprinterName" }; } + FieldValue ImprinterPlayerDataIDField() { return { this, "APrimalDinoCharacter.ImprinterPlayerDataID" }; } + FieldValue BabyMinCuddleIntervalField() { return { this, "APrimalDinoCharacter.BabyMinCuddleInterval" }; } + FieldValue BabyMaxCuddleIntervalField() { return { this, "APrimalDinoCharacter.BabyMaxCuddleInterval" }; } + FieldValue BabyCuddleGracePeriodField() { return { this, "APrimalDinoCharacter.BabyCuddleGracePeriod" }; } + FieldValue BabyCuddleLoseImpringQualityPerSecondField() { return { this, "APrimalDinoCharacter.BabyCuddleLoseImpringQualityPerSecond" }; } + FieldValue BabyCuddleWalkDistanceField() { return { this, "APrimalDinoCharacter.BabyCuddleWalkDistance" }; } + FieldValue BabyCuddleWalkStartingLocationField() { return { this, "APrimalDinoCharacter.BabyCuddleWalkStartingLocation" }; } + FieldValue BabyNextCuddleTimeField() { return { this, "APrimalDinoCharacter.BabyNextCuddleTime" }; } + FieldValue> BabyCuddleTypeField() { return { this, "APrimalDinoCharacter.BabyCuddleType" }; } + FieldValue> BabyCuddleFoodField() { return { this, "APrimalDinoCharacter.BabyCuddleFood" }; } + FieldValue BabyCuddledAnimationField() { return { this, "APrimalDinoCharacter.BabyCuddledAnimation" }; } + FieldValue>> MyBabyCuddleFoodTypesField() { return { this, "APrimalDinoCharacter.MyBabyCuddleFoodTypes" }; } + FieldValue RiderMaxImprintingQualityDamageReductionField() { return { this, "APrimalDinoCharacter.RiderMaxImprintingQualityDamageReduction" }; } + FieldValue RiderMaxImprintingQualityDamageMultiplierField() { return { this, "APrimalDinoCharacter.RiderMaxImprintingQualityDamageMultiplier" }; } + FieldValue BabyImprintingQualityTotalMaturationTimeField() { return { this, "APrimalDinoCharacter.BabyImprintingQualityTotalMaturationTime" }; } + FieldValue WakingTameMaxDistanceField() { return { this, "APrimalDinoCharacter.WakingTameMaxDistance" }; } + FieldValue TimeBetweenTamedWakingEatAnimationsField() { return { this, "APrimalDinoCharacter.TimeBetweenTamedWakingEatAnimations" }; } + FieldValue LastEatAnimationTimeField() { return { this, "APrimalDinoCharacter.LastEatAnimationTime" }; } + FieldValue StepDamageFootDamageRunningMultiplierField() { return { this, "APrimalDinoCharacter.StepDamageFootDamageRunningMultiplier" }; } + FieldValue maxRangeForWeaponTriggeredTooltipField() { return { this, "APrimalDinoCharacter.maxRangeForWeaponTriggeredTooltip" }; } + FieldValue StepRadialDamageOffsetField() { return { this, "APrimalDinoCharacter.StepRadialDamageOffset" }; } + FieldValue ForcePawnBigPushingForTimeField() { return { this, "APrimalDinoCharacter.ForcePawnBigPushingForTime" }; } + FieldValue AIDinoForceActiveUntasisingRangeField() { return { this, "APrimalDinoCharacter.AIDinoForceActiveUntasisingRange" }; } + FieldValue WildRunningRotationRateModifierField() { return { this, "APrimalDinoCharacter.WildRunningRotationRateModifier" }; } + FieldValue TamedRunningRotationRateModifierField() { return { this, "APrimalDinoCharacter.TamedRunningRotationRateModifier" }; } + FieldValue TamedSwimmingRotationRateModifierField() { return { this, "APrimalDinoCharacter.TamedSwimmingRotationRateModifier" }; } + FieldValue WildSwimmingRotationRateModifierField() { return { this, "APrimalDinoCharacter.WildSwimmingRotationRateModifier" }; } + FieldValue RiderFlyingRotationRateModifierField() { return { this, "APrimalDinoCharacter.RiderFlyingRotationRateModifier" }; } + FieldValue NoRiderFlyingRotationRateModifierField() { return { this, "APrimalDinoCharacter.NoRiderFlyingRotationRateModifier" }; } + FieldValue AICombatRotationRateModifierField() { return { this, "APrimalDinoCharacter.AICombatRotationRateModifier" }; } + FieldValue WalkingRotationRateModifierField() { return { this, "APrimalDinoCharacter.WalkingRotationRateModifier" }; } + FieldValue SetAttackTargetTraceDistanceField() { return { this, "APrimalDinoCharacter.SetAttackTargetTraceDistance" }; } + FieldValue SetAttackTargetTraceWidthField() { return { this, "APrimalDinoCharacter.SetAttackTargetTraceWidth" }; } + FieldValue WanderRadiusMultiplierField() { return { this, "APrimalDinoCharacter.WanderRadiusMultiplier" }; } + FieldValue RepeatPrimaryAttackLastSendTimeField() { return { this, "APrimalDinoCharacter.RepeatPrimaryAttackLastSendTime" }; } + FieldValue NextTamedDinoCharacterStatusTickTimeField() { return { this, "APrimalDinoCharacter.NextTamedDinoCharacterStatusTickTime" }; } + FieldValue LastTamedDinoCharacterStatusTickTimeField() { return { this, "APrimalDinoCharacter.LastTamedDinoCharacterStatusTickTime" }; } + FieldValue PlayerMountedCarryAnimationField() { return { this, "APrimalDinoCharacter.PlayerMountedCarryAnimation" }; } + FieldValue HealthBarOffsetYField() { return { this, "APrimalDinoCharacter.HealthBarOffsetY" }; } + FieldValue LimitRiderYawOnLatchedRangeField() { return { this, "APrimalDinoCharacter.LimitRiderYawOnLatchedRange" }; } + FieldValue LatchingDistanceLimitField() { return { this, "APrimalDinoCharacter.LatchingDistanceLimit" }; } + FieldValue LatchingInitialYawField() { return { this, "APrimalDinoCharacter.LatchingInitialYaw" }; } + FieldValue LatchingInitialPitchField() { return { this, "APrimalDinoCharacter.LatchingInitialPitch" }; } + FieldValue LatchingInterpolatedPitchField() { return { this, "APrimalDinoCharacter.LatchingInterpolatedPitch" }; } + FieldValue LatchedFirstPersonViewAngleField() { return { this, "APrimalDinoCharacter.LatchedFirstPersonViewAngle" }; } + FieldValue LatchingCameraInterpolationSpeedField() { return { this, "APrimalDinoCharacter.LatchingCameraInterpolationSpeed" }; } + FieldValue TargetLatchingInitialYawField() { return { this, "APrimalDinoCharacter.TargetLatchingInitialYaw" }; } + FieldValue CurrentStrafeMagnitudeField() { return { this, "APrimalDinoCharacter.CurrentStrafeMagnitude" }; } + FieldValue GainStaminaWhenLatchedRateField() { return { this, "APrimalDinoCharacter.GainStaminaWhenLatchedRate" }; } + FieldValue LastFrameMoveRightField() { return { this, "APrimalDinoCharacter.LastFrameMoveRight" }; } + FieldValue LastFrameMoveLeftField() { return { this, "APrimalDinoCharacter.LastFrameMoveLeft" }; } + FieldValue LastRiderMountedWeaponRotationField() { return { this, "APrimalDinoCharacter.LastRiderMountedWeaponRotation" }; } + FieldValue LastRiderMountedWeaponRotationSentTimeField() { return { this, "APrimalDinoCharacter.LastRiderMountedWeaponRotationSentTime" }; } + FieldValue DeathGivesDossierIndexField() { return { this, "APrimalDinoCharacter.DeathGivesDossierIndex" }; } + FieldValue DeathGivesDossierDelayField() { return { this, "APrimalDinoCharacter.DeathGivesDossierDelay" }; } + FieldValue SaddleRiderMovementTraceThruSocketNameField() { return { this, "APrimalDinoCharacter.SaddleRiderMovementTraceThruSocketName" }; } + FieldValue SwimmingRunSpeedModifierField() { return { this, "APrimalDinoCharacter.SwimmingRunSpeedModifier" }; } + FieldValue RidingSwimmingRunSpeedModifierField() { return { this, "APrimalDinoCharacter.RidingSwimmingRunSpeedModifier" }; } + FieldValue DinoDownloadedAtTimeField() { return { this, "APrimalDinoCharacter.DinoDownloadedAtTime" }; } + FieldValue UploadedFromServerNameField() { return { this, "APrimalDinoCharacter.UploadedFromServerName" }; } + FieldValue LatestUploadedFromServerNameField() { return { this, "APrimalDinoCharacter.LatestUploadedFromServerName" }; } + FieldValue PreviousUploadedFromServerNameField() { return { this, "APrimalDinoCharacter.PreviousUploadedFromServerName" }; } + FieldValue TamedOnServerNameField() { return { this, "APrimalDinoCharacter.TamedOnServerName" }; } + FieldValue> DinoAncestorsField() { return { this, "APrimalDinoCharacter.DinoAncestors" }; } + FieldValue> DinoAncestorsMaleField() { return { this, "APrimalDinoCharacter.DinoAncestorsMale" }; } + FieldValue> NextBabyDinoAncestorsField() { return { this, "APrimalDinoCharacter.NextBabyDinoAncestors" }; } + FieldValue> NextBabyDinoAncestorsMaleField() { return { this, "APrimalDinoCharacter.NextBabyDinoAncestorsMale" }; } + FieldValue MaxAllowedRandomMutationsField() { return { this, "APrimalDinoCharacter.MaxAllowedRandomMutations" }; } + FieldValue RandomMutationRollsField() { return { this, "APrimalDinoCharacter.RandomMutationRolls" }; } + FieldValue RandomMutationChanceField() { return { this, "APrimalDinoCharacter.RandomMutationChance" }; } + FieldValue RandomMutationGivePointsField() { return { this, "APrimalDinoCharacter.RandomMutationGivePoints" }; } + FieldValue RandomMutationsMaleField() { return { this, "APrimalDinoCharacter.RandomMutationsMale" }; } + FieldValue RandomMutationsFemaleField() { return { this, "APrimalDinoCharacter.RandomMutationsFemale" }; } + FieldValue GestationEggRandomMutationsFemaleField() { return { this, "APrimalDinoCharacter.GestationEggRandomMutationsFemale" }; } + FieldValue GestationEggRandomMutationsMaleField() { return { this, "APrimalDinoCharacter.GestationEggRandomMutationsMale" }; } + FieldValue WakingTameDistanceSocketNameField() { return { this, "APrimalDinoCharacter.WakingTameDistanceSocketName" }; } + FieldValue WakingTameConsumeEntireStackMaxQuantityField() { return { this, "APrimalDinoCharacter.WakingTameConsumeEntireStackMaxQuantity" }; } + FieldValue AttackPlayerDesirabilityMultiplierField() { return { this, "APrimalDinoCharacter.AttackPlayerDesirabilityMultiplier" }; } + FieldValue LastAutoHealingItemUseField() { return { this, "APrimalDinoCharacter.LastAutoHealingItemUse" }; } + FieldValue LastStartedCarryingCharacterTimeField() { return { this, "APrimalDinoCharacter.LastStartedCarryingCharacterTime" }; } + FieldValue FlyerAttachedExplosiveSpeedMultiplierField() { return { this, "APrimalDinoCharacter.FlyerAttachedExplosiveSpeedMultiplier" }; } + FieldValue> DinoExtraDefaultInventoryItemsField() { return { this, "APrimalDinoCharacter.DinoExtraDefaultInventoryItems" }; } + FieldValue>> DeathGiveEngramClassesField() { return { this, "APrimalDinoCharacter.DeathGiveEngramClasses" }; } + FieldValue SinglePlayerOutgoingDamageModifierField() { return { this, "APrimalDinoCharacter.SinglePlayerOutgoingDamageModifier" }; } + FieldValue SinglePlayerIncomingDamageModifierField() { return { this, "APrimalDinoCharacter.SinglePlayerIncomingDamageModifier" }; } + FieldValue LastTickDelayFrameCountField() { return { this, "APrimalDinoCharacter.LastTickDelayFrameCount" }; } + FieldValue NextTickDelayAllowTimeField() { return { this, "APrimalDinoCharacter.NextTickDelayAllowTime" }; } + FieldValue TickStatusTimeAccumulationField() { return { this, "APrimalDinoCharacter.TickStatusTimeAccumulation" }; } + FieldValue LastServerTamedTickField() { return { this, "APrimalDinoCharacter.LastServerTamedTick" }; } + FieldValue LastTempDampenMovementInputAccelerationFrameField() { return { this, "APrimalDinoCharacter.LastTempDampenMovementInputAccelerationFrame" }; } + FieldValue DinoLevelUpAnimationOverrideField() { return { this, "APrimalDinoCharacter.DinoLevelUpAnimationOverride" }; } + FieldValue>> DamageVictimClassesIgnoreBlockingGeomtryTraceField() { return { this, "APrimalDinoCharacter.DamageVictimClassesIgnoreBlockingGeomtryTrace" }; } + FieldValue LastVacuumSpaceCheckTimeField() { return { this, "APrimalDinoCharacter.LastVacuumSpaceCheckTime" }; } + FieldValue LastGrappledTimeField() { return { this, "APrimalDinoCharacter.LastGrappledTime" }; } + FieldValue CloneBaseElementCostField() { return { this, "APrimalDinoCharacter.CloneBaseElementCost" }; } + FieldValue CloneElementCostPerLevelField() { return { this, "APrimalDinoCharacter.CloneElementCostPerLevel" }; } + FieldValue NonDedicatedFreezeWildDinoPhysicsIfLevelUnloadedField() { return { this, "APrimalDinoCharacter.NonDedicatedFreezeWildDinoPhysicsIfLevelUnloaded" }; } + FieldValue> NonDedicatedFreezeWildDinoPhysicsIfLevelsUnloadedField() { return { this, "APrimalDinoCharacter.NonDedicatedFreezeWildDinoPhysicsIfLevelsUnloaded" }; } + FieldValue UnboardLocationTraceOffsetField() { return { this, "APrimalDinoCharacter.UnboardLocationTraceOffset" }; } + FieldValue AttackLineOfSightMeshSocketNameField() { return { this, "APrimalDinoCharacter.AttackLineOfSightMeshSocketName" }; } + FieldValue AttackForceWalkDistanceMultiplierField() { return { this, "APrimalDinoCharacter.AttackForceWalkDistanceMultiplier" }; } + FieldValue AttackForceWalkRotationRateMultiplierField() { return { this, "APrimalDinoCharacter.AttackForceWalkRotationRateMultiplier" }; } + FieldValue OverrideDinoTameSoundIndexField() { return { this, "APrimalDinoCharacter.OverrideDinoTameSoundIndex" }; } + FieldValue SwimSoundField() { return { this, "APrimalDinoCharacter.SwimSound" }; } + FieldValue SwimSoundIntervalPerHundredSpeedField() { return { this, "APrimalDinoCharacter.SwimSoundIntervalPerHundredSpeed" }; } + FieldValue SwimSoundTimeCacheField() { return { this, "APrimalDinoCharacter.SwimSoundTimeCache" }; } + FieldValue> TamedAIControllerOverrideField() { return { this, "APrimalDinoCharacter.TamedAIControllerOverride" }; } + FieldValue PersonalTamedDinoCostField() { return { this, "APrimalDinoCharacter.PersonalTamedDinoCost" }; } + FieldValue UploadEarliestValidTimeField() { return { this, "APrimalDinoCharacter.UploadEarliestValidTime" }; } + FieldValue StasisAutoDestroyIntervalField() { return { this, "APrimalDinoCharacter.StasisAutoDestroyInterval" }; } + FieldValue CarryCameraYawOffsetField() { return { this, "APrimalDinoCharacter.CarryCameraYawOffset" }; } + FieldValue ExtraDamageMultiplierField() { return { this, "APrimalDinoCharacter.ExtraDamageMultiplier" }; } + FieldValue ExtraTamedBaseHealthMultiplierField() { return { this, "APrimalDinoCharacter.ExtraTamedBaseHealthMultiplier" }; } + FieldValue AttackRangeOffsetField() { return { this, "APrimalDinoCharacter.AttackRangeOffset" }; } + FieldValue CurrentPassengerSeatIndexField() { return { this, "APrimalDinoCharacter.CurrentPassengerSeatIndex" }; } + + // Functions + + static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalDinoCharacter.GetPrivateStaticClass"); } + void CheckAndHandleBasedPlayersBeingPushedThroughWalls() { NativeCall(this, "APrimalDinoCharacter.CheckAndHandleBasedPlayersBeingPushedThroughWalls"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APrimalDinoCharacter.Tick", DeltaSeconds); } + void PlayHardEndChargingShake_Implementation() { NativeCall(this, "APrimalDinoCharacter.PlayHardEndChargingShake_Implementation"); } + void SetForcedAggro(ITargetableInterface * Targetable, float AggroAmount, float ForcedAggroTime) { NativeCall(this, "APrimalDinoCharacter.SetForcedAggro", Targetable, AggroAmount, ForcedAggroTime); } + float GetAttackRangeOffset() { return NativeCall(this, "APrimalDinoCharacter.GetAttackRangeOffset"); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalDinoCharacter.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void AutoDrag() { NativeCall(this, "APrimalDinoCharacter.AutoDrag"); } + bool CanRide(AShooterCharacter * byPawn, char * bOutHasSaddle, char * bOutCanRideOtherThanSaddle, bool bDontCheckDistance) { return NativeCall(this, "APrimalDinoCharacter.CanRide", byPawn, bOutHasSaddle, bOutCanRideOtherThanSaddle, bDontCheckDistance); } + void Stasis() { NativeCall(this, "APrimalDinoCharacter.Stasis"); } + void Unstasis() { NativeCall(this, "APrimalDinoCharacter.Unstasis"); } + void HandleUnstasised(bool bWasFromHibernation) { NativeCall(this, "APrimalDinoCharacter.HandleUnstasised", bWasFromHibernation); } + void PostInitializeComponents() { NativeCall(this, "APrimalDinoCharacter.PostInitializeComponents"); } + void RegisterAllComponents() { NativeCall(this, "APrimalDinoCharacter.RegisterAllComponents"); } + int GetRandomBaseLevel() { return NativeCall(this, "APrimalDinoCharacter.GetRandomBaseLevel"); } + bool AllowZoneAutoKill() { return NativeCall(this, "APrimalDinoCharacter.AllowZoneAutoKill"); } + void StopActiveState(bool bShouldResetAttackIndex) { NativeCall(this, "APrimalDinoCharacter.StopActiveState", bShouldResetAttackIndex); } + bool DoAttack(int AttackIndex, bool bSetCurrentAttack) { return NativeCall(this, "APrimalDinoCharacter.DoAttack", AttackIndex, bSetCurrentAttack); } + void ApplyRidingAttackExtraVelocity() { NativeCall(this, "APrimalDinoCharacter.ApplyRidingAttackExtraVelocity"); } + bool HasReachedDestination(FVector * Goal) { return NativeCall(this, "APrimalDinoCharacter.HasReachedDestination", Goal); } + bool IsDamageOccludedByStructures(AActor * DamageCauser) { return NativeCall(this, "APrimalDinoCharacter.IsDamageOccludedByStructures", DamageCauser); } + float TakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APrimalDinoCharacter.TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool CanAttack(int AttackIndex) { return NativeCall(this, "APrimalDinoCharacter.CanAttack", AttackIndex); } + bool IsAttacking() { return NativeCall(this, "APrimalDinoCharacter.IsAttacking"); } + void PlayAttackAnimationOfAnimationArray(int AnimationIndex, TArray attackAnimations) { NativeCall>(this, "APrimalDinoCharacter.PlayAttackAnimationOfAnimationArray", AnimationIndex, attackAnimations); } + void PlayWeightedAttackAnimation() { NativeCall(this, "APrimalDinoCharacter.PlayWeightedAttackAnimation"); } + bool IsCurrentlyPlayingAttackAnimation() { return NativeCall(this, "APrimalDinoCharacter.IsCurrentlyPlayingAttackAnimation"); } + bool AddToMeleeSwingHurtList(AActor * AnActor) { return NativeCall(this, "APrimalDinoCharacter.AddToMeleeSwingHurtList", AnActor); } + bool ShouldDealDamage(AActor * TestActor) { return NativeCall(this, "APrimalDinoCharacter.ShouldDealDamage", TestActor); } + void DealDamage(FHitResult * Impact, FVector * ShootDir, int DamageAmount, TSubclassOf DamageType, float Impulse) { NativeCall, float>(this, "APrimalDinoCharacter.DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } + bool CanCarryCharacter(APrimalCharacter * CanCarryPawn) { return NativeCall(this, "APrimalDinoCharacter.CanCarryCharacter", CanCarryPawn); } + bool AllowCarryCharacter(APrimalCharacter * CanCarryPawn) { return NativeCall(this, "APrimalDinoCharacter.AllowCarryCharacter", CanCarryPawn); } + bool CarryCharacter(APrimalCharacter * character, bool byPassCanCarryCheck) { return NativeCall(this, "APrimalDinoCharacter.CarryCharacter", character, byPassCanCarryCheck); } + void ClearCarriedCharacter(bool fromCarriedCharacter, bool bCancelAnyCarryBuffs) { NativeCall(this, "APrimalDinoCharacter.ClearCarriedCharacter", fromCarriedCharacter, bCancelAnyCarryBuffs); } + void ClearPassengers() { NativeCall(this, "APrimalDinoCharacter.ClearPassengers"); } + bool AddPassenger(APrimalCharacter * Character, int PassengerSeatIndex, bool bForcePassenger) { return NativeCall(this, "APrimalDinoCharacter.AddPassenger", Character, PassengerSeatIndex, bForcePassenger); } + void RemovePassenger(APrimalCharacter * Character, bool bFromCharacter, bool bFromPlayerController) { NativeCall(this, "APrimalDinoCharacter.RemovePassenger", Character, bFromCharacter, bFromPlayerController); } + bool CheckLocalPassengers() { return NativeCall(this, "APrimalDinoCharacter.CheckLocalPassengers"); } + bool CanTakePassenger(APrimalCharacter * Character, int PassengerSeatIndex, bool bForcePassenger) { return NativeCall(this, "APrimalDinoCharacter.CanTakePassenger", Character, PassengerSeatIndex, bForcePassenger); } + int GetNumPassengerSeats(bool bOnlyManualPassengerSeats) { return NativeCall(this, "APrimalDinoCharacter.GetNumPassengerSeats", bOnlyManualPassengerSeats); } + FSaddlePassengerSeatDefinition * GetPassengerSeatDefinition(char SeatIndex) { return NativeCall(this, "APrimalDinoCharacter.GetPassengerSeatDefinition", SeatIndex); } + void OnRep_PassengerPerSeat() { NativeCall(this, "APrimalDinoCharacter.OnRep_PassengerPerSeat"); } + void ServerToggleCharging_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerToggleCharging_Implementation"); } + void StartCharging(bool bForce) { NativeCall(this, "APrimalDinoCharacter.StartCharging", bForce); } + void PlayChargingAnim() { NativeCall(this, "APrimalDinoCharacter.PlayChargingAnim"); } + void EndCharging(bool bForce) { NativeCall(this, "APrimalDinoCharacter.EndCharging", bForce); } + bool AllowHurtAnimation() { return NativeCall(this, "APrimalDinoCharacter.AllowHurtAnimation"); } + void SetRider(AShooterCharacter * aRider) { NativeCall(this, "APrimalDinoCharacter.SetRider", aRider); } + void OnRep_Rider() { NativeCall(this, "APrimalDinoCharacter.OnRep_Rider"); } + void OnRep_CarriedCharacter() { NativeCall(this, "APrimalDinoCharacter.OnRep_CarriedCharacter"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalDinoCharacter.GetLifetimeReplicatedProps", OutLifetimeProps); } + void ForceUpdateColorSets_Implementation(int ColorRegion, int ColorSet) { NativeCall(this, "APrimalDinoCharacter.ForceUpdateColorSets_Implementation", ColorRegion, ColorSet); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "APrimalDinoCharacter.GetDescriptiveName", result); } + FString * GetShortName(FString * result) { return NativeCall(this, "APrimalDinoCharacter.GetShortName", result); } + void ForceClearRider() { NativeCall(this, "APrimalDinoCharacter.ForceClearRider"); } + void ClearRider(bool FromRider, bool bCancelForceLand, bool SpawnDinoDefaultController, int OverrideUnboardDirection) { NativeCall(this, "APrimalDinoCharacter.ClearRider", FromRider, bCancelForceLand, SpawnDinoDefaultController, OverrideUnboardDirection); } + void ControllerLeavingGame(AShooterPlayerController * theController) { NativeCall(this, "APrimalDinoCharacter.ControllerLeavingGame", theController); } + FString * GetEntryString(FString * result) { return NativeCall(this, "APrimalDinoCharacter.GetEntryString", result); } + UTexture2D * GetEntryIcon(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "APrimalDinoCharacter.GetEntryIcon", AssociatedDataObject, bIsEnabled); } + UMaterialInterface * GetEntryIconMaterial(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "APrimalDinoCharacter.GetEntryIconMaterial", AssociatedDataObject, bIsEnabled); } + UObject * GetUObjectInterfaceDataListEntryInterface() { return NativeCall(this, "APrimalDinoCharacter.GetUObjectInterfaceDataListEntryInterface"); } + FString * GetEntryDescription(FString * result) { return NativeCall(this, "APrimalDinoCharacter.GetEntryDescription", result); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalDinoCharacter.DrawHUD", HUD); } + bool CanOrder(APrimalCharacter * FromCharacter, bool bBuildingStructures) { return NativeCall(this, "APrimalDinoCharacter.CanOrder", FromCharacter, bBuildingStructures); } + bool TamedProcessOrder(APrimalCharacter * FromCharacter, EDinoTamedOrder::Type OrderType, bool bForce, AActor * enemyTarget) { return NativeCall(this, "APrimalDinoCharacter.TamedProcessOrder", FromCharacter, OrderType, bForce, enemyTarget); } + void ServerSleepingTick() { NativeCall(this, "APrimalDinoCharacter.ServerSleepingTick"); } + float GetAffinityIncreaseForFoodItem(UPrimalItem * foodItem) { return NativeCall(this, "APrimalDinoCharacter.GetAffinityIncreaseForFoodItem", foodItem); } + void ServerTamedTick() { NativeCall(this, "APrimalDinoCharacter.ServerTamedTick"); } + UPrimalItem * GetBestInventoryFoodItem(float * FoodIncrease, bool bLookForAffinity, bool bFoodItemRequiresLivePlayerCharacter, UPrimalItem ** foundFoodItem, bool bLookForWorstFood) { return NativeCall(this, "APrimalDinoCharacter.GetBestInventoryFoodItem", FoodIncrease, bLookForAffinity, bFoodItemRequiresLivePlayerCharacter, foundFoodItem, bLookForWorstFood); } + AShooterCharacter * ConsumeInventoryFoodItem(UPrimalItem * foodItem, float * AffinityIncrease, bool bDontDecrementItem, float * FoodIncrease, float FoodAmountMultiplier, bool bConsumeEntireStack) { return NativeCall(this, "APrimalDinoCharacter.ConsumeInventoryFoodItem", foodItem, AffinityIncrease, bDontDecrementItem, FoodIncrease, FoodAmountMultiplier, bConsumeEntireStack); } + AShooterCharacter * FindFirstFoodItemPlayerCharacter() { return NativeCall(this, "APrimalDinoCharacter.FindFirstFoodItemPlayerCharacter"); } + int GetFoodItemEffectivenessMultipliersIndex(UPrimalItem * foodItem) { return NativeCall(this, "APrimalDinoCharacter.GetFoodItemEffectivenessMultipliersIndex", foodItem); } + TSubclassOf * GetFirstAffinityFoodItemClass(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "APrimalDinoCharacter.GetFirstAffinityFoodItemClass", result); } + int GetExtraFoodItemEffectivenessMultipliersIndex(UPrimalItem * foodItem) { return NativeCall(this, "APrimalDinoCharacter.GetExtraFoodItemEffectivenessMultipliersIndex", foodItem); } + void ServerClearRider_Implementation(int OverrideUnboardDirection) { NativeCall(this, "APrimalDinoCharacter.ServerClearRider_Implementation", OverrideUnboardDirection); } + void OnElevateDino(float Val) { NativeCall(this, "APrimalDinoCharacter.OnElevateDino", Val); } + void OnLowerDino(float Val) { NativeCall(this, "APrimalDinoCharacter.OnLowerDino", Val); } + void OnBrake() { NativeCall(this, "APrimalDinoCharacter.OnBrake"); } + void OffBrake() { NativeCall(this, "APrimalDinoCharacter.OffBrake"); } + void ServerRequestBraking_Implementation(bool bWantsToBrake) { NativeCall(this, "APrimalDinoCharacter.ServerRequestBraking_Implementation", bWantsToBrake); } + void OnStartFire(bool bFromGamepadRight) { NativeCall(this, "APrimalDinoCharacter.OnStartFire", bFromGamepadRight); } + void OnStopFire(bool bFromGamepadRight) { NativeCall(this, "APrimalDinoCharacter.OnStopFire", bFromGamepadRight); } + void OnStartTargeting(bool bFromGamepadLeft) { NativeCall(this, "APrimalDinoCharacter.OnStartTargeting", bFromGamepadLeft); } + void OnControllerInitiatedAttack(int AttackIndex) { NativeCall(this, "APrimalDinoCharacter.OnControllerInitiatedAttack", AttackIndex); } + void UpdateAttackTargets() { NativeCall(this, "APrimalDinoCharacter.UpdateAttackTargets"); } + void ServerUpdateAttackTargets_Implementation(AActor * AttackTarget, FVector AttackLocation) { NativeCall(this, "APrimalDinoCharacter.ServerUpdateAttackTargets_Implementation", AttackTarget, AttackLocation); } + void GetAttackTargets(AActor ** attackActor, FVector * attackLoc) { NativeCall(this, "APrimalDinoCharacter.GetAttackTargets", attackActor, attackLoc); } + void ServerRequestAttack_Implementation(int attackIndex) { NativeCall(this, "APrimalDinoCharacter.ServerRequestAttack_Implementation", attackIndex); } + void OnPrimalCharacterSleeped() { NativeCall(this, "APrimalDinoCharacter.OnPrimalCharacterSleeped"); } + void UnPossessed() { NativeCall(this, "APrimalDinoCharacter.UnPossessed"); } + FRotator * ProcessRootRotAndLoc(FRotator * result, float DeltaTime, FVector * RootLocOffset, FRotator * RootRotOffset, float * RootYawSpeed, float MaxYawAimClamp, float CurrentAimBlending, FRotator * TargetAimRot, float * RootRot) { return NativeCall(this, "APrimalDinoCharacter.ProcessRootRotAndLoc", result, DeltaTime, RootLocOffset, RootRotOffset, RootYawSpeed, MaxYawAimClamp, CurrentAimBlending, TargetAimRot, RootRot); } + FRotator * GetAimOffsets(FRotator * result, float DeltaTime, FRotator * RootRotOffset, float * RootYawSpeed, float MaxYawAimClamp, FVector * RootLocOffset) { return NativeCall(this, "APrimalDinoCharacter.GetAimOffsets", result, DeltaTime, RootRotOffset, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } + FRotator * GetAimOffsetsTransform(FRotator * result, float DeltaTime, FTransform * RootRotOffsetTransform, float * RootYawSpeed, float MaxYawAimClamp, FVector * RootLocOffset) { return NativeCall(this, "APrimalDinoCharacter.GetAimOffsetsTransform", result, DeltaTime, RootRotOffsetTransform, RootYawSpeed, MaxYawAimClamp, RootLocOffset); } + void TempDampenInputAcceleration() { NativeCall(this, "APrimalDinoCharacter.TempDampenInputAcceleration"); } + bool ModifyInputAcceleration(FVector * InputAcceleration) { return NativeCall(this, "APrimalDinoCharacter.ModifyInputAcceleration", InputAcceleration); } + float GetMaxSpeedModifier() { return NativeCall(this, "APrimalDinoCharacter.GetMaxSpeedModifier"); } + float GetSpeedModifier() { return NativeCall(this, "APrimalDinoCharacter.GetSpeedModifier"); } + float GetRotationRateModifier() { return NativeCall(this, "APrimalDinoCharacter.GetRotationRateModifier"); } + bool IsFleeing() { return NativeCall(this, "APrimalDinoCharacter.IsFleeing"); } + void FaceRotation(FRotator NewControlRotation, float DeltaTime, bool bFromController) { NativeCall(this, "APrimalDinoCharacter.FaceRotation", NewControlRotation, DeltaTime, bFromController); } + void MoveForward(float Val) { NativeCall(this, "APrimalDinoCharacter.MoveForward", Val); } + void MoveRight(float Val) { NativeCall(this, "APrimalDinoCharacter.MoveRight", Val); } + void MoveUp(float Val) { NativeCall(this, "APrimalDinoCharacter.MoveUp", Val); } + void SetCurrentAttackIndex(char index) { NativeCall(this, "APrimalDinoCharacter.SetCurrentAttackIndex", index); } + char GetWiegthedAttack(float distance, float attackRangeOffset, AActor * OtherTarget) { return NativeCall(this, "APrimalDinoCharacter.GetWiegthedAttack", distance, attackRangeOffset, OtherTarget); } + void FireProjectileLocal(FVector Origin, FVector_NetQuantizeNormal ShootDir, bool bScaleProjDamageByDinoDamage) { NativeCall(this, "APrimalDinoCharacter.FireProjectileLocal", Origin, ShootDir, bScaleProjDamageByDinoDamage); } + void FireProjectile_Implementation(FVector Origin, FVector_NetQuantizeNormal ShootDir, bool bScaleProjDamageByDinoDamage) { NativeCall(this, "APrimalDinoCharacter.FireProjectile_Implementation", Origin, ShootDir, bScaleProjDamageByDinoDamage); } + void ServerToClientsPlayAttackAnimation_Implementation(char AttackinfoIndex, char AnimationIndex, float InPlayRate, FName StartSectionName, bool bForceTickPoseAndServerUpdateMesh, bool bForceTickPoseOnServer, AActor * MyTarget) { NativeCall(this, "APrimalDinoCharacter.ServerToClientsPlayAttackAnimation_Implementation", AttackinfoIndex, AnimationIndex, InPlayRate, StartSectionName, bForceTickPoseAndServerUpdateMesh, bForceTickPoseOnServer, MyTarget); } + void ServerRequestToggleFlight_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerRequestToggleFlight_Implementation"); } + void CalcCapsuleHalfHeight() { NativeCall(this, "APrimalDinoCharacter.CalcCapsuleHalfHeight"); } + void ClientStartLanding_Implementation(FVector loc) { NativeCall(this, "APrimalDinoCharacter.ClientStartLanding_Implementation", loc); } + void StartLanding(FVector OverrideLandingLocation) { NativeCall(this, "APrimalDinoCharacter.StartLanding", OverrideLandingLocation); } + void ServerInterruptLanding_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerInterruptLanding_Implementation"); } + void InterruptLanding() { NativeCall(this, "APrimalDinoCharacter.InterruptLanding"); } + void ClientInterruptLanding_Implementation() { NativeCall(this, "APrimalDinoCharacter.ClientInterruptLanding_Implementation"); } + void ServerFinishedLanding_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerFinishedLanding_Implementation"); } + void FinishedLanding() { NativeCall(this, "APrimalDinoCharacter.FinishedLanding"); } + void ClientShouldNotifyLanded_Implementation() { NativeCall(this, "APrimalDinoCharacter.ClientShouldNotifyLanded_Implementation"); } + FVector * GetLandingLocation(FVector * result) { return NativeCall(this, "APrimalDinoCharacter.GetLandingLocation", result); } + void SetFlight(bool bFly, bool bCancelForceLand) { NativeCall(this, "APrimalDinoCharacter.SetFlight", bFly, bCancelForceLand); } + void KeepFlightTimer() { NativeCall(this, "APrimalDinoCharacter.KeepFlightTimer"); } + void DidLand() { NativeCall(this, "APrimalDinoCharacter.DidLand"); } + void AddFlyerTakeOffImpulse() { NativeCall(this, "APrimalDinoCharacter.AddFlyerTakeOffImpulse"); } + void OnStartJump() { NativeCall(this, "APrimalDinoCharacter.OnStartJump"); } + void ServerRequestWaterSurfaceJump_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerRequestWaterSurfaceJump_Implementation"); } + bool IsUpdatingComponentTransforms(USceneComponent * InSceneComponent) { return NativeCall(this, "APrimalDinoCharacter.IsUpdatingComponentTransforms", InSceneComponent); } + bool UseLowQualityMovementTick() { return NativeCall(this, "APrimalDinoCharacter.UseLowQualityMovementTick"); } + bool UseLowQualityAnimationTick() { return NativeCall(this, "APrimalDinoCharacter.UseLowQualityAnimationTick"); } + bool UseLowQualityBehaviorTreeTick() { return NativeCall(this, "APrimalDinoCharacter.UseLowQualityBehaviorTreeTick"); } + bool CanTame(AShooterPlayerController * ForPC, bool bIgnoreMaxTamedDinos) { return NativeCall(this, "APrimalDinoCharacter.CanTame", ForPC, bIgnoreMaxTamedDinos); } + void SetupTamed(bool bWasJustTamed) { NativeCall(this, "APrimalDinoCharacter.SetupTamed", bWasJustTamed); } + void TameDino(AShooterPlayerController * ForPC, bool bIgnoreMaxTameLimit, int OverrideTamingTeamID) { NativeCall(this, "APrimalDinoCharacter.TameDino", ForPC, bIgnoreMaxTameLimit, OverrideTamingTeamID); } + void SetCharacterStatusTameable(bool bSetTameable, bool bCreateInventory, bool keepInventoryForWakingTame) { NativeCall(this, "APrimalDinoCharacter.SetCharacterStatusTameable", bSetTameable, bCreateInventory, keepInventoryForWakingTame); } + void OnPrimalCharacterUnsleeped() { NativeCall(this, "APrimalDinoCharacter.OnPrimalCharacterUnsleeped"); } + bool IsValidForStatusUpdate() { return NativeCall(this, "APrimalDinoCharacter.IsValidForStatusUpdate"); } + AActor * GetOtherActorToIgnore() { return NativeCall(this, "APrimalDinoCharacter.GetOtherActorToIgnore"); } + long double GetForceClaimTime() { return NativeCall(this, "APrimalDinoCharacter.GetForceClaimTime"); } + void UnclaimDino(bool bDestroyAI) { NativeCall(this, "APrimalDinoCharacter.UnclaimDino", bDestroyAI); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalDinoCharacter.TryMultiUse", ForPC, UseIndex); } + bool SetTurretMode_Implementation(bool enabled) { return NativeCall(this, "APrimalDinoCharacter.SetTurretMode_Implementation", enabled); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "APrimalDinoCharacter.ClientMultiUse", ForPC, UseIndex); } + void ChangeActorTeam(int NewTeam) { NativeCall(this, "APrimalDinoCharacter.ChangeActorTeam", NewTeam); } + void LinkedSupplyCrateDestroyed(APrimalStructureItemContainer_SupplyCrate * aCrate) { NativeCall(this, "APrimalDinoCharacter.LinkedSupplyCrateDestroyed", aCrate); } + bool AllowNewEggAtLocation(FVector * AtLocation) { return NativeCall(this, "APrimalDinoCharacter.AllowNewEggAtLocation", AtLocation); } + void SpawnEgg() { NativeCall(this, "APrimalDinoCharacter.SpawnEgg"); } + float GetRunningSpeedModifier(bool bIsForDefaultSpeed) { return NativeCall(this, "APrimalDinoCharacter.GetRunningSpeedModifier", bIsForDefaultSpeed); } + void BeginPlay() { NativeCall(this, "APrimalDinoCharacter.BeginPlay"); } + void ForceRefreshTransform() { NativeCall(this, "APrimalDinoCharacter.ForceRefreshTransform"); } + void AutoTame() { NativeCall(this, "APrimalDinoCharacter.AutoTame"); } + void SetupColorization() { NativeCall(this, "APrimalDinoCharacter.SetupColorization"); } + void RefreshColorization() { NativeCall(this, "APrimalDinoCharacter.RefreshColorization"); } + bool CanTarget(ITargetableInterface * Victim) { return NativeCall(this, "APrimalDinoCharacter.CanTarget", Victim); } + int GetOriginalTargetingTeam() { return NativeCall(this, "APrimalDinoCharacter.GetOriginalTargetingTeam"); } + float GetTargetingDesirability(ITargetableInterface * Attacker) { return NativeCall(this, "APrimalDinoCharacter.GetTargetingDesirability", Attacker); } + bool ShouldReplicateRotPitch() { return NativeCall(this, "APrimalDinoCharacter.ShouldReplicateRotPitch"); } + void NetUpdateDinoNameStrings_Implementation(FString * NewTamerString, FString * NewTamedName) { NativeCall(this, "APrimalDinoCharacter.NetUpdateDinoNameStrings_Implementation", NewTamerString, NewTamedName); } + void ProcessEditText(AShooterPlayerController * ForPC, FString * TextToUse, bool checkedBox) { NativeCall(this, "APrimalDinoCharacter.ProcessEditText", ForPC, TextToUse, checkedBox); } + static APrimalDinoCharacter * FindDinoWithID(UWorld * aWorld, unsigned int DinoID1, unsigned int DinoID2) { return NativeCall(nullptr, "APrimalDinoCharacter.FindDinoWithID", aWorld, DinoID1, DinoID2); } + void TargetingTeamChanged() { NativeCall(this, "APrimalDinoCharacter.TargetingTeamChanged"); } + void Destroyed() { NativeCall(this, "APrimalDinoCharacter.Destroyed"); } + void DrawFloatingHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalDinoCharacter.DrawFloatingHUD", HUD); } + void DrawDinoFloatingHUD(AShooterHUD * HUD, bool bDrawDinoOrderIcon) { NativeCall(this, "APrimalDinoCharacter.DrawDinoFloatingHUD", HUD, bDrawDinoOrderIcon); } + bool IsNearFeed(AShooterPlayerState * ForPlayer) { return NativeCall(this, "APrimalDinoCharacter.IsNearFeed", ForPlayer); } + void DeathHarvestingFadeOut_Implementation() { NativeCall(this, "APrimalDinoCharacter.DeathHarvestingFadeOut_Implementation"); } + void NotifyItemAdded(UPrimalItem * anItem, bool bEquipItem) { NativeCall(this, "APrimalDinoCharacter.NotifyItemAdded", anItem, bEquipItem); } + FString * GetDinoDescriptiveName(FString * result) { return NativeCall(this, "APrimalDinoCharacter.GetDinoDescriptiveName", result); } + void ServerGiveDefaultWeapon_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerGiveDefaultWeapon_Implementation"); } + void ServerCallFollow_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallFollow_Implementation"); } + void ServerCallFollowOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "APrimalDinoCharacter.ServerCallFollowOne_Implementation", ForDinoChar); } + void ServerCallStay_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallStay_Implementation"); } + void ServerCallStayOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "APrimalDinoCharacter.ServerCallStayOne_Implementation", ForDinoChar); } + void ServerCallFollowDistanceCycleOne_Implementation(APrimalDinoCharacter * ForDinoChar) { NativeCall(this, "APrimalDinoCharacter.ServerCallFollowDistanceCycleOne_Implementation", ForDinoChar); } + void ServerCallAggressive_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallAggressive_Implementation"); } + void ServerCallSetAggressive_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallSetAggressive_Implementation"); } + void ServerCallNeutral_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallNeutral_Implementation"); } + void ServerCallPassive_Implementation() { NativeCall(this, "APrimalDinoCharacter.ServerCallPassive_Implementation"); } + void ServerCallAttackTarget_Implementation(AActor * TheTarget) { NativeCall(this, "APrimalDinoCharacter.ServerCallAttackTarget_Implementation", TheTarget); } + void ServerCallMoveTo_Implementation(FVector MoveToLoc) { NativeCall(this, "APrimalDinoCharacter.ServerCallMoveTo_Implementation", MoveToLoc); } + void NotifyItemRemoved(UPrimalItem * anItem) { NativeCall(this, "APrimalDinoCharacter.NotifyItemRemoved", anItem); } + float GetCorpseLifespan() { return NativeCall(this, "APrimalDinoCharacter.GetCorpseLifespan"); } + void UpdateMateBoost() { NativeCall(this, "APrimalDinoCharacter.UpdateMateBoost"); } + void AdjustDamage(float * Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalDinoCharacter.AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + void SpawnDefaultController() { NativeCall(this, "APrimalDinoCharacter.SpawnDefaultController"); } + bool AllowFallDamage() { return NativeCall(this, "APrimalDinoCharacter.AllowFallDamage"); } + void ApplyDamageMomentum(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalDinoCharacter.ApplyDamageMomentum", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void UpdateIK() { NativeCall(this, "APrimalDinoCharacter.UpdateIK"); } + bool AllowIKFreeze() { return NativeCall(this, "APrimalDinoCharacter.AllowIKFreeze"); } + void SetSleeping(bool bSleeping, bool bUseRagdollLocationOffset) { NativeCall(this, "APrimalDinoCharacter.SetSleeping", bSleeping, bUseRagdollLocationOffset); } + bool Die(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "APrimalDinoCharacter.Die", KillingDamage, DamageEvent, Killer, DamageCauser); } + bool AllowPenetrationCheck(AActor * OtherActor) { return NativeCall(this, "APrimalDinoCharacter.AllowPenetrationCheck", OtherActor); } + bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall(this, "APrimalDinoCharacter.PreventCharacterBasing", OtherActor, BasedOnComponent); } + void LoadedFromSaveGame() { NativeCall(this, "APrimalDinoCharacter.LoadedFromSaveGame"); } + float GetCorpseTargetingMultiplier() { return NativeCall(this, "APrimalDinoCharacter.GetCorpseTargetingMultiplier"); } + void UpdateStatusComponent(float DeltaSeconds) { NativeCall(this, "APrimalDinoCharacter.UpdateStatusComponent", DeltaSeconds); } + void TamedDinoUnstasisConsumeFood(long double ForceTimeSinceStasis) { NativeCall(this, "APrimalDinoCharacter.TamedDinoUnstasisConsumeFood", ForceTimeSinceStasis); } + AActor * GetTamedFollowTarget() { return NativeCall(this, "APrimalDinoCharacter.GetTamedFollowTarget"); } + void DinoKillerTransferItemsToInventory(UPrimalInventoryComponent * FromInventory) { NativeCall(this, "APrimalDinoCharacter.DinoKillerTransferItemsToInventory", FromInventory); } + bool FlyingUseHighQualityCollision() { return NativeCall(this, "APrimalDinoCharacter.FlyingUseHighQualityCollision"); } + bool AllowWalkableSlopeOverride() { return NativeCall(this, "APrimalDinoCharacter.AllowWalkableSlopeOverride"); } + float GetCarryingSocketYaw(bool RefreshBones) { return NativeCall(this, "APrimalDinoCharacter.GetCarryingSocketYaw", RefreshBones); } + void GetRidingCarryingIgnoreList(TArray * IgnoreList) { NativeCall *>(this, "APrimalDinoCharacter.GetRidingCarryingIgnoreList", IgnoreList); } + void SetCarryingDino(APrimalDinoCharacter * aDino) { NativeCall(this, "APrimalDinoCharacter.SetCarryingDino", aDino); } + void ClearCarryingDino(bool bFromDino, bool bCancelAnyCarryBuffs) { NativeCall(this, "APrimalDinoCharacter.ClearCarryingDino", bFromDino, bCancelAnyCarryBuffs); } + void UpdateCarriedLocationAndRotation(float DeltaSeconds) { NativeCall(this, "APrimalDinoCharacter.UpdateCarriedLocationAndRotation", DeltaSeconds); } + bool CanBeCarried(APrimalCharacter * ByCarrier) { return NativeCall(this, "APrimalDinoCharacter.CanBeCarried", ByCarrier); } + void SetMountCharacter(APrimalCharacter * aCharacter) { NativeCall(this, "APrimalDinoCharacter.SetMountCharacter", aCharacter); } + void StartForceSkelUpdate(float ForTime, bool bForceUpdateMesh, bool bServerOnly) { NativeCall(this, "APrimalDinoCharacter.StartForceSkelUpdate", ForTime, bForceUpdateMesh, bServerOnly); } + void ClearMountCharacter(bool bFromMountCharacter) { NativeCall(this, "APrimalDinoCharacter.ClearMountCharacter", bFromMountCharacter); } + bool CanMount(APrimalCharacter * aCharacter) { return NativeCall(this, "APrimalDinoCharacter.CanMount", aCharacter); } + static APrimalDinoCharacter * SpawnDino(UWorld * World, TSubclassOf DinoClass, FVector SpawnLoc, FRotator SpawnRot, float LevelMultiplier, int ExtraLevelOffset, bool AddLevelOffsetBeforeMultiplier, bool bOverrideBaseNPCLevel, int BaseLevelOverrideValue, bool bNPCDontWander, float NPCAIRangeMultiplier, int NPCAbsoluteBaseLevel, bool bSpawnWithoutCapsuleOffset) { return NativeCall, FVector, FRotator, float, int, bool, bool, int, bool, float, int, bool>(nullptr, "APrimalDinoCharacter.SpawnDino", World, DinoClass, SpawnLoc, SpawnRot, LevelMultiplier, ExtraLevelOffset, AddLevelOffsetBeforeMultiplier, bOverrideBaseNPCLevel, BaseLevelOverrideValue, bNPCDontWander, NPCAIRangeMultiplier, NPCAbsoluteBaseLevel, bSpawnWithoutCapsuleOffset); } + void InitDownloadedTamedDino(AShooterPlayerController * TamerController, int AltTeam) { NativeCall(this, "APrimalDinoCharacter.InitDownloadedTamedDino", TamerController, AltTeam); } + void NetUpdateDinoOwnerData_Implementation(FString * NewOwningPlayerName, int NewOwningPlayerID) { NativeCall(this, "APrimalDinoCharacter.NetUpdateDinoOwnerData_Implementation", NewOwningPlayerName, NewOwningPlayerID); } + bool RemoveInventoryAllowViewing(APlayerController * ForPC) { return NativeCall(this, "APrimalDinoCharacter.RemoveInventoryAllowViewing", ForPC); } + bool ForceAllowBackwardsMovement() { return NativeCall(this, "APrimalDinoCharacter.ForceAllowBackwardsMovement"); } + bool CanDragCharacter(APrimalCharacter * Character) { return NativeCall(this, "APrimalDinoCharacter.CanDragCharacter", Character); } + bool IsTaming() { return NativeCall(this, "APrimalDinoCharacter.IsTaming"); } + void UpdateWakingTame(float DeltaTime) { NativeCall(this, "APrimalDinoCharacter.UpdateWakingTame", DeltaTime); } + void FedWakingTameDino_Implementation() { NativeCall(this, "APrimalDinoCharacter.FedWakingTameDino_Implementation"); } + void AddStructure(APrimalStructure * Structure, FVector RelLoc, FRotator RelRot, FName BoneName) { NativeCall(this, "APrimalDinoCharacter.AddStructure", Structure, RelLoc, RelRot, BoneName); } + void RemoveStructure(APrimalStructure * Structure) { NativeCall(this, "APrimalDinoCharacter.RemoveStructure", Structure); } + void OnRep_Saddle() { NativeCall(this, "APrimalDinoCharacter.OnRep_Saddle"); } + void ServerUploadCharacter(AShooterPlayerController * UploadedBy) { NativeCall(this, "APrimalDinoCharacter.ServerUploadCharacter", UploadedBy); } + void EmitPoop() { NativeCall(this, "APrimalDinoCharacter.EmitPoop"); } + void CheckForWildAmbientHarvesting() { NativeCall(this, "APrimalDinoCharacter.CheckForWildAmbientHarvesting"); } + void OverrideRandomWanderLocation_Implementation(FVector * originalDestination, FVector * inVec) { NativeCall(this, "APrimalDinoCharacter.OverrideRandomWanderLocation_Implementation", originalDestination, inVec); } + bool AllowEquippingItemType(EPrimalEquipmentType::Type equipmentType) { return NativeCall(this, "APrimalDinoCharacter.AllowEquippingItemType", equipmentType); } + void OnPressReload() { NativeCall(this, "APrimalDinoCharacter.OnPressReload"); } + void OnPressCrouch() { NativeCall(this, "APrimalDinoCharacter.OnPressCrouch"); } + void NotifyBumpedPawn(APawn * BumpedPawn) { NativeCall(this, "APrimalDinoCharacter.NotifyBumpedPawn", BumpedPawn); } + void NotifyBumpedStructure(AActor * BumpedStructure) { NativeCall(this, "APrimalDinoCharacter.NotifyBumpedStructure", BumpedStructure); } + void StartRepair() { NativeCall(this, "APrimalDinoCharacter.StartRepair"); } + void RepairCheckTimer() { NativeCall(this, "APrimalDinoCharacter.RepairCheckTimer"); } + bool InitializeForReplicatedBasing() { return NativeCall(this, "APrimalDinoCharacter.InitializeForReplicatedBasing"); } + void RemoveBasedPawn(AActor * anPawn) { NativeCall(this, "APrimalDinoCharacter.RemoveBasedPawn", anPawn); } + bool AllowMovementMode(EMovementMode NewMovementMode, char NewCustomMode) { return NativeCall(this, "APrimalDinoCharacter.AllowMovementMode", NewMovementMode, NewCustomMode); } + void OnRep_bBonesHidden() { NativeCall(this, "APrimalDinoCharacter.OnRep_bBonesHidden"); } + void SetBabyAge(float TheAge) { NativeCall(this, "APrimalDinoCharacter.SetBabyAge", TheAge); } + void ApplyBoneModifiers(bool bForce) { NativeCall(this, "APrimalDinoCharacter.ApplyBoneModifiers", bForce); } + void ApplyGestationBoneModifiers() { NativeCall(this, "APrimalDinoCharacter.ApplyGestationBoneModifiers"); } + float GetAttachedSoundPitchMultiplier() { return NativeCall(this, "APrimalDinoCharacter.GetAttachedSoundPitchMultiplier"); } + float GetAttachedSoundVolumeMultiplier() { return NativeCall(this, "APrimalDinoCharacter.GetAttachedSoundVolumeMultiplier"); } + void Poop(bool bForcePoop) { NativeCall(this, "APrimalDinoCharacter.Poop", bForcePoop); } + float GetBaseDragWeight() { return NativeCall(this, "APrimalDinoCharacter.GetBaseDragWeight"); } + void ServerUpdateBabyAge(float overrideAgePercent) { NativeCall(this, "APrimalDinoCharacter.ServerUpdateBabyAge", overrideAgePercent); } + void ServerUpdateGestation() { NativeCall(this, "APrimalDinoCharacter.ServerUpdateGestation"); } + float GetHealthPercentage() { return NativeCall(this, "APrimalDinoCharacter.GetHealthPercentage"); } + void UpdateMating() { NativeCall(this, "APrimalDinoCharacter.UpdateMating"); } + void DoMate(APrimalDinoCharacter * WithMate) { NativeCall(this, "APrimalDinoCharacter.DoMate", WithMate); } + ADroppedItem * CreateCloneFertilizedEgg(FVector AtLoc, FRotator AtRot) { return NativeCall(this, "APrimalDinoCharacter.CreateCloneFertilizedEgg", AtLoc, AtRot); } + FVector * GetInterpolatedLocation(FVector * result) { return NativeCall(this, "APrimalDinoCharacter.GetInterpolatedLocation", result); } + static APrimalDinoCharacter * BPStaticCreateBabyDinoNoAncestors(UWorld * TheWorld, TSubclassOf EggDinoClassToSpawn, FVector * theGroundLoc, float actorRotationYaw, TArray EggColorSetIndices, TArray EggNumberOfLevelUpPointsApplied, float EggTamedIneffectivenessModifier, int NotifyTeamOverride, int EggRandomMutationsFemale, int EggRandomMutationsMale) { return NativeCall, FVector *, float, TArray, TArray, float, int, int, int>(nullptr, "APrimalDinoCharacter.BPStaticCreateBabyDinoNoAncestors", TheWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, NotifyTeamOverride, EggRandomMutationsFemale, EggRandomMutationsMale); } + static APrimalDinoCharacter * BPStaticCreateBabyDino(UWorld * TheWorld, TSubclassOf EggDinoClassToSpawn, FVector * theGroundLoc, float actorRotationYaw, TArray EggColorSetIndices, TArray EggNumberOfLevelUpPointsApplied, float EggTamedIneffectivenessModifier, TArray EggDinoAncestors, TArray EggDinoAncestorsMale, int NotifyTeamOverride, int EggRandomMutationsFemale, int EggRandomMutationsMale) { return NativeCall, FVector *, float, TArray, TArray, float, TArray, TArray, int, int, int>(nullptr, "APrimalDinoCharacter.BPStaticCreateBabyDino", TheWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, EggDinoAncestors, EggDinoAncestorsMale, NotifyTeamOverride, EggRandomMutationsFemale, EggRandomMutationsMale); } + static APrimalDinoCharacter * StaticCreateBabyDino(UWorld * theWorld, TSubclassOf EggDinoClassToSpawn, FVector * theGroundLoc, float actorRotationYaw, char * EggColorSetIndices, char * EggNumberOfLevelUpPointsApplied, float EggTamedIneffectivenessModifier, int NotifyTeamOverride, TArray * EggDinoAncestors, TArray * EggDinoAncestorsMale, int EggRandomMutationsFemale, int EggRandomMutationsMale) { return NativeCall, FVector *, float, char *, char *, float, int, TArray *, TArray *, int, int>(nullptr, "APrimalDinoCharacter.StaticCreateBabyDino", theWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, NotifyTeamOverride, EggDinoAncestors, EggDinoAncestorsMale, EggRandomMutationsFemale, EggRandomMutationsMale); } + void UpdateGang() { NativeCall(this, "APrimalDinoCharacter.UpdateGang"); } + TSubclassOf * BlueprintOverrideHarvestDamageType_Implementation(TSubclassOf * result, float * OutHarvestDamageMultiplier) { return NativeCall *, TSubclassOf *, float *>(this, "APrimalDinoCharacter.BlueprintOverrideHarvestDamageType_Implementation", result, OutHarvestDamageMultiplier); } + float GetGravityZScale() { return NativeCall(this, "APrimalDinoCharacter.GetGravityZScale"); } + bool ForceAllowAccelerationRotationWhenFalling() { return NativeCall(this, "APrimalDinoCharacter.ForceAllowAccelerationRotationWhenFalling"); } + bool ShouldDisableControllerDesiredRotation() { return NativeCall(this, "APrimalDinoCharacter.ShouldDisableControllerDesiredRotation"); } + bool AllowExtendedCraftingFunctionality() { return NativeCall(this, "APrimalDinoCharacter.AllowExtendedCraftingFunctionality"); } + void UpdateTribeGroupRanks_Implementation(char NewTribeGroupPetOrderingRank, char NewTribeGroupPetRidingRank) { NativeCall(this, "APrimalDinoCharacter.UpdateTribeGroupRanks_Implementation", NewTribeGroupPetOrderingRank, NewTribeGroupPetRidingRank); } + FVector * GetFloatingHUDLocation(FVector * result) { return NativeCall(this, "APrimalDinoCharacter.GetFloatingHUDLocation", result); } + void WasPushed(ACharacter * ByOtherCharacter) { NativeCall(this, "APrimalDinoCharacter.WasPushed", ByOtherCharacter); } + void UpdateImprintingDetails_Implementation(FString * NewImprinterName, unsigned __int64 NewImprinterPlayerDataID) { NativeCall(this, "APrimalDinoCharacter.UpdateImprintingDetails_Implementation", NewImprinterName, NewImprinterPlayerDataID); } + void UpdateImprintingQuality_Implementation(float NewImprintingQuality) { NativeCall(this, "APrimalDinoCharacter.UpdateImprintingQuality_Implementation", NewImprintingQuality); } + void UpdateBabyCuddling_Implementation(long double NewBabyNextCuddleTime, char NewBabyCuddleType, TSubclassOf NewBabyCuddleFood) { NativeCall>(this, "APrimalDinoCharacter.UpdateBabyCuddling_Implementation", NewBabyNextCuddleTime, NewBabyCuddleType, NewBabyCuddleFood); } + TSubclassOf * GetBabyCuddleFood(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "APrimalDinoCharacter.GetBabyCuddleFood", result); } + void IncrementImprintingQuality() { NativeCall(this, "APrimalDinoCharacter.IncrementImprintingQuality"); } + void AddedImprintingQuality_Implementation(float Amount) { NativeCall(this, "APrimalDinoCharacter.AddedImprintingQuality_Implementation", Amount); } + bool AllowWakingTame_Implementation(APlayerController * ForPC) { return NativeCall(this, "APrimalDinoCharacter.AllowWakingTame_Implementation", ForPC); } + float GetBaseTargetingDesire(ITargetableInterface * Attacker) { return NativeCall(this, "APrimalDinoCharacter.GetBaseTargetingDesire", Attacker); } + void PostNetReceiveLocationAndRotation() { NativeCall(this, "APrimalDinoCharacter.PostNetReceiveLocationAndRotation"); } + void ResetTakingOff() { NativeCall(this, "APrimalDinoCharacter.ResetTakingOff"); } + void FireMultipleProjectiles_Implementation(TArray * Locations, TArray * Directions, bool bScaleProjectileDamageByDinoDamage) { NativeCall *, TArray *, bool>(this, "APrimalDinoCharacter.FireMultipleProjectiles_Implementation", Locations, Directions, bScaleProjectileDamageByDinoDamage); } + void CycleAttackWeightsForAttackAtIndex(int attackIndex) { NativeCall(this, "APrimalDinoCharacter.CycleAttackWeightsForAttackAtIndex", attackIndex); } + void SetAnimWeightsForAttackAtIndex(int attackIndex, TArray newWeights) { NativeCall>(this, "APrimalDinoCharacter.SetAnimWeightsForAttackAtIndex", attackIndex, newWeights); } + void AddDinoReferenceInLatchingStructure(APrimalStructure * Structure) { NativeCall(this, "APrimalDinoCharacter.AddDinoReferenceInLatchingStructure", Structure); } + void RemoveDinoReferenceFromLatchingStructure() { NativeCall(this, "APrimalDinoCharacter.RemoveDinoReferenceFromLatchingStructure"); } + void StartSurfaceCameraForPassengers(float yaw, float pitch, float roll) { NativeCall(this, "APrimalDinoCharacter.StartSurfaceCameraForPassengers", yaw, pitch, roll); } + TArray * GetPassengers(TArray * result) { return NativeCall *, TArray *>(this, "APrimalDinoCharacter.GetPassengers", result); } + void GetPassengersAndSeatIndexes(TArray * Passengers, TArray * Indexes) { NativeCall *, TArray *>(this, "APrimalDinoCharacter.GetPassengersAndSeatIndexes", Passengers, Indexes); } + bool ShouldIgnoreMoveCombiningOverlap() { return NativeCall(this, "APrimalDinoCharacter.ShouldIgnoreMoveCombiningOverlap"); } + bool AllowMountedWeaponry(bool bIgnoreCurrentWeapon, bool bWeaponForcesMountedWeaponry) { return NativeCall(this, "APrimalDinoCharacter.AllowMountedWeaponry", bIgnoreCurrentWeapon, bWeaponForcesMountedWeaponry); } + void ModifyDesiredRotation(FRotator * InDesiredRotation) { NativeCall(this, "APrimalDinoCharacter.ModifyDesiredRotation", InDesiredRotation); } + void GiveDeathDossier() { NativeCall(this, "APrimalDinoCharacter.GiveDeathDossier"); } + void ServerSetRiderMountedWeaponRotation_Implementation(FRotator InVal) { NativeCall(this, "APrimalDinoCharacter.ServerSetRiderMountedWeaponRotation_Implementation", InVal); } + void DoNeuter_Implementation() { NativeCall(this, "APrimalDinoCharacter.DoNeuter_Implementation"); } + bool OverrideForcePreventExitingWater() { return NativeCall(this, "APrimalDinoCharacter.OverrideForcePreventExitingWater"); } + APrimalStructureExplosive * GetAttachedExplosive() { return NativeCall(this, "APrimalDinoCharacter.GetAttachedExplosive"); } + void OnStopTargeting(bool bFromGamepadLeft) { NativeCall(this, "APrimalDinoCharacter.OnStopTargeting", bFromGamepadLeft); } + void SetDynamicMusic(USoundBase * newMusic) { NativeCall(this, "APrimalDinoCharacter.SetDynamicMusic", newMusic); } + FLinearColor * GetDinoColor(FLinearColor * result, int ColorRegionIndex) { return NativeCall(this, "APrimalDinoCharacter.GetDinoColor", result, ColorRegionIndex); } + bool SpecialActorWantsPerFrameTicking() { return NativeCall(this, "APrimalDinoCharacter.SpecialActorWantsPerFrameTicking"); } + int IsActorTickAllowed() { return NativeCall(this, "APrimalDinoCharacter.IsActorTickAllowed"); } + void IncrementNumTamedDinos() { NativeCall(this, "APrimalDinoCharacter.IncrementNumTamedDinos"); } + bool ShouldStillAllowRequestedMoveAcceleration() { return NativeCall(this, "APrimalDinoCharacter.ShouldStillAllowRequestedMoveAcceleration"); } + bool AreSpawnerSublevelsLoaded() { return NativeCall(this, "APrimalDinoCharacter.AreSpawnerSublevelsLoaded"); } + void SetLastMovementDesiredRotation(FRotator * InRotation) { NativeCall(this, "APrimalDinoCharacter.SetLastMovementDesiredRotation", InRotation); } + USoundBase * GetDinoTameSound_Implementation() { return NativeCall(this, "APrimalDinoCharacter.GetDinoTameSound_Implementation"); } + bool AllowTickPhysics() { return NativeCall(this, "APrimalDinoCharacter.AllowTickPhysics"); } + void CheckForTamedFoodConsumption() { NativeCall(this, "APrimalDinoCharacter.CheckForTamedFoodConsumption"); } + bool ShouldIgnoreHitResult(UWorld * InWorld, FHitResult * TestHit, FVector * MovementDirDenormalized) { return NativeCall(this, "APrimalDinoCharacter.ShouldIgnoreHitResult", InWorld, TestHit, MovementDirDenormalized); } + bool WalkingAllowCheckFall(FVector * DeltaWalk) { return NativeCall(this, "APrimalDinoCharacter.WalkingAllowCheckFall", DeltaWalk); } + float GetGestationTimeRemaining() { return NativeCall(this, "APrimalDinoCharacter.GetGestationTimeRemaining"); } + int GetTamedDinoCountCost() { return NativeCall(this, "APrimalDinoCharacter.GetTamedDinoCountCost"); } + void ClearAllSaddleStructures() { NativeCall(this, "APrimalDinoCharacter.ClearAllSaddleStructures"); } + bool IsReadyToUpload(UWorld * theWorld) { return NativeCall(this, "APrimalDinoCharacter.IsReadyToUpload", theWorld); } + void ImprintOnPlayerTarget(AShooterPlayerController * ForPC, bool bIgnoreMaxTameLimit) { NativeCall(this, "APrimalDinoCharacter.ImprintOnPlayerTarget", ForPC, bIgnoreMaxTameLimit); } + void BPNotifyNameEditText(AShooterPlayerController * ForPC) { NativeCall(this, "APrimalDinoCharacter.BPNotifyNameEditText", ForPC); } + void SetRidingDinoAsPassenger(APrimalDinoCharacter * aDino, FSaddlePassengerSeatDefinition * SeatDefinition) { NativeCall(this, "APrimalDinoCharacter.SetRidingDinoAsPassenger", aDino, SeatDefinition); } + void ClearRidingDinoAsPassenger(bool bFromDino) { NativeCall(this, "APrimalDinoCharacter.ClearRidingDinoAsPassenger", bFromDino); } + APrimalCharacter * GetPassengerPerSeat(int SeatIndex) { return NativeCall(this, "APrimalDinoCharacter.GetPassengerPerSeat", SeatIndex); } + void SpawnNewAIController(TSubclassOf NewAIController) { NativeCall>(this, "APrimalDinoCharacter.SpawnNewAIController", NewAIController); } + int GetSeatIndexForPassenger(APrimalCharacter * PassengerChar) { return NativeCall(this, "APrimalDinoCharacter.GetSeatIndexForPassenger", PassengerChar); } + float GetXPMultiplier() { return NativeCall(this, "APrimalDinoCharacter.GetXPMultiplier"); } + bool UseHighQualityMovement() { return NativeCall(this, "APrimalDinoCharacter.UseHighQualityMovement"); } + bool AllowPushOthers() { return NativeCall(this, "APrimalDinoCharacter.AllowPushOthers"); } + bool IsVehicle() { return NativeCall(this, "APrimalDinoCharacter.IsVehicle"); } + static void StaticRegisterNativesAPrimalDinoCharacter() { NativeCall(nullptr, "APrimalDinoCharacter.StaticRegisterNativesAPrimalDinoCharacter"); } + bool AllowWakingTame(APlayerController * ForPC) { return NativeCall(this, "APrimalDinoCharacter.AllowWakingTame", ForPC); } + float BlueprintAdjustOutputDamage(int AttackIndex, float OriginalDamageAmount, AActor * HitActor, TSubclassOf * OutDamageType, float * OutDamageImpulse) { return NativeCall *, float *>(this, "APrimalDinoCharacter.BlueprintAdjustOutputDamage", AttackIndex, OriginalDamageAmount, HitActor, OutDamageType, OutDamageImpulse); } + void BlueprintDrawFloatingHUD(AShooterHUD * HUD, float CenterX, float CenterY, float DrawScale) { NativeCall(this, "APrimalDinoCharacter.BlueprintDrawFloatingHUD", HUD, CenterX, CenterY, DrawScale); } + float BlueprintGetAttackWeight(int AttackIndex, float inputWeight, float distance, float attackRangeOffset, AActor * OtherTarget) { return NativeCall(this, "APrimalDinoCharacter.BlueprintGetAttackWeight", AttackIndex, inputWeight, distance, attackRangeOffset, OtherTarget); } + bool BlueprintOverrideWantsToRun(bool bInputWantsToRun) { return NativeCall(this, "APrimalDinoCharacter.BlueprintOverrideWantsToRun", bInputWantsToRun); } + void BlueprintPlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalDinoCharacter.BlueprintPlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void BP_OnStartLandingNotify() { NativeCall(this, "APrimalDinoCharacter.BP_OnStartLandingNotify"); } + bool BPAllowClaiming(AShooterPlayerController * forPlayer) { return NativeCall(this, "APrimalDinoCharacter.BPAllowClaiming", forPlayer); } + bool BPCanAutodrag(APrimalCharacter * characterToDrag) { return NativeCall(this, "APrimalDinoCharacter.BPCanAutodrag", characterToDrag); } + bool BPCanTargetCorpse() { return NativeCall(this, "APrimalDinoCharacter.BPCanTargetCorpse"); } + bool BPDesiredRotationIsLocalSpace() { return NativeCall(this, "APrimalDinoCharacter.BPDesiredRotationIsLocalSpace"); } + void BPDinoARKDownloadedBegin() { NativeCall(this, "APrimalDinoCharacter.BPDinoARKDownloadedBegin"); } + void BPDinoARKDownloadedEnd() { NativeCall(this, "APrimalDinoCharacter.BPDinoARKDownloadedEnd"); } + void BPDoHarvestAttack(int harvestIndex) { NativeCall(this, "APrimalDinoCharacter.BPDoHarvestAttack", harvestIndex); } + void BPFedWakingTameEvent(APlayerController * ForPC) { NativeCall(this, "APrimalDinoCharacter.BPFedWakingTameEvent", ForPC); } + FVector * BPGetHealthBarColor(FVector * result) { return NativeCall(this, "APrimalDinoCharacter.BPGetHealthBarColor", result); } + bool BPHandleUseButtonPress(AShooterPlayerController * RiderController) { return NativeCall(this, "APrimalDinoCharacter.BPHandleUseButtonPress", RiderController); } + bool BPModifyDesiredRotation(FRotator * InDesiredRotation, FRotator * OutDesiredRotation) { return NativeCall(this, "APrimalDinoCharacter.BPModifyDesiredRotation", InDesiredRotation, OutDesiredRotation); } + float BPModifyHarvestingQuantity(float originalQuantity, TSubclassOf resourceSelected) { return NativeCall>(this, "APrimalDinoCharacter.BPModifyHarvestingQuantity", originalQuantity, resourceSelected); } + void BPModifyHarvestingWeightsArray(TArray * resourceWeightsIn, TArray * resourceItems, TArray * resourceWeightsOut) { NativeCall *, TArray *, TArray *>(this, "APrimalDinoCharacter.BPModifyHarvestingWeightsArray", resourceWeightsIn, resourceItems, resourceWeightsOut); } + void BPNotifyStructurePlacedNearby(APrimalStructure * NewStructure) { NativeCall(this, "APrimalDinoCharacter.BPNotifyStructurePlacedNearby", NewStructure); } + void BPOnClearMountedDino() { NativeCall(this, "APrimalDinoCharacter.BPOnClearMountedDino"); } + bool BPPreventRiding(AShooterCharacter * byPawn, bool bDontCheckDistance) { return NativeCall(this, "APrimalDinoCharacter.BPPreventRiding", byPawn, bDontCheckDistance); } + void FireProjectile(FVector Origin, FVector_NetQuantizeNormal ShootDir, bool bScaleProjDamageByDinoDamage) { NativeCall(this, "APrimalDinoCharacter.FireProjectile", Origin, ShootDir, bScaleProjDamageByDinoDamage); } + void InterruptLatching() { NativeCall(this, "APrimalDinoCharacter.InterruptLatching"); } + void NetUpdateDinoNameStrings(FString * NewTamerString, FString * NewTamedName) { NativeCall(this, "APrimalDinoCharacter.NetUpdateDinoNameStrings", NewTamerString, NewTamedName); } + void NetUpdateDinoOwnerData(FString * NewOwningPlayerName, int NewOwningPlayerID) { NativeCall(this, "APrimalDinoCharacter.NetUpdateDinoOwnerData", NewOwningPlayerName, NewOwningPlayerID); } + void OverrideRandomWanderLocation(FVector * originalDestination, FVector * inVec) { NativeCall(this, "APrimalDinoCharacter.OverrideRandomWanderLocation", originalDestination, inVec); } + void PlayHardEndChargingShake() { NativeCall(this, "APrimalDinoCharacter.PlayHardEndChargingShake"); } + void RidingTick() { NativeCall(this, "APrimalDinoCharacter.RidingTick"); } + void ServerClearRider(int OverrideUnboardDirection) { NativeCall(this, "APrimalDinoCharacter.ServerClearRider", OverrideUnboardDirection); } + void ServerRequestAttack(int attackIndex) { NativeCall(this, "APrimalDinoCharacter.ServerRequestAttack", attackIndex); } + void UpdateBabyCuddling(long double NewBabyNextCuddleTime, char NewBabyCuddleType, TSubclassOf NewBabyCuddleFood) { NativeCall>(this, "APrimalDinoCharacter.UpdateBabyCuddling", NewBabyNextCuddleTime, NewBabyCuddleType, NewBabyCuddleFood); } + void UpdateImprintingDetails(FString * NewImprinterName, unsigned __int64 NewImprinterPlayerDataID) { NativeCall(this, "APrimalDinoCharacter.UpdateImprintingDetails", NewImprinterName, NewImprinterPlayerDataID); } + void UpdateImprintingQuality(float NewImprintingQuality) { NativeCall(this, "APrimalDinoCharacter.UpdateImprintingQuality", NewImprintingQuality); } +}; + +struct AShooterWeapon : AActor +{ + FieldValue EquipTimeField() { return { this, "AShooterWeapon.EquipTime" }; } + FieldValue OverrideProneInAnimField() { return { this, "AShooterWeapon.OverrideProneInAnim" }; } + FieldValue OverrideProneOutAnimField() { return { this, "AShooterWeapon.OverrideProneOutAnim" }; } + FieldValue OverrideJumpAnimField() { return { this, "AShooterWeapon.OverrideJumpAnim" }; } + FieldValue OverrideLandedAnimField() { return { this, "AShooterWeapon.OverrideLandedAnim" }; } + FieldValue> OverrideRiderAnimSequenceFromField() { return { this, "AShooterWeapon.OverrideRiderAnimSequenceFrom" }; } + FieldValue> OverrideRiderAnimSequenceToField() { return { this, "AShooterWeapon.OverrideRiderAnimSequenceTo" }; } + FieldValue ItemDurabilityToConsumePerMeleeHitField() { return { this, "AShooterWeapon.ItemDurabilityToConsumePerMeleeHit" }; } + FieldValue AmmoIconsCountField() { return { this, "AShooterWeapon.AmmoIconsCount" }; } + FieldValue TargetingTooltipCheckRangeField() { return { this, "AShooterWeapon.TargetingTooltipCheckRange" }; } + FieldValue PrimaryClipIconOffsetField() { return { this, "AShooterWeapon.PrimaryClipIconOffset" }; } + FieldValue SecondaryClipIconOffsetField() { return { this, "AShooterWeapon.SecondaryClipIconOffset" }; } + FieldValue TargetingInfoTooltipPaddingField() { return { this, "AShooterWeapon.TargetingInfoTooltipPadding" }; } + FieldValue TargetingInfoTooltipScaleField() { return { this, "AShooterWeapon.TargetingInfoTooltipScale" }; } + FieldValue bOnlyPassiveDurabilityWhenAccessoryActiveField() { return { this, "AShooterWeapon.bOnlyPassiveDurabilityWhenAccessoryActive" }; } + FieldValue bDisableShooterOnElectricStormField() { return { this, "AShooterWeapon.bDisableShooterOnElectricStorm" }; } + FieldValue OverrideAttachPointField() { return { this, "AShooterWeapon.OverrideAttachPoint" }; } + FieldValue FPVRelativeLocationField() { return { this, "AShooterWeapon.FPVRelativeLocation" }; } + FieldValue FPVRelativeRotationField() { return { this, "AShooterWeapon.FPVRelativeRotation" }; } + FieldValue FPVRelativeLocation_TargetingField() { return { this, "AShooterWeapon.FPVRelativeLocation_Targeting" }; } + FieldValue FPVRelativeRotation_TargetingField() { return { this, "AShooterWeapon.FPVRelativeRotation_Targeting" }; } + FieldValue FPVEnterTargetingInterpSpeedField() { return { this, "AShooterWeapon.FPVEnterTargetingInterpSpeed" }; } + FieldValue FPVExitTargetingInterpSpeedField() { return { this, "AShooterWeapon.FPVExitTargetingInterpSpeed" }; } + FieldValue EndDoMeleeSwingTimeField() { return { this, "AShooterWeapon.EndDoMeleeSwingTime" }; } + FieldValue FPVLookAtMaximumOffsetField() { return { this, "AShooterWeapon.FPVLookAtMaximumOffset" }; } + FieldValue FPVLookAtSpeedBaseField() { return { this, "AShooterWeapon.FPVLookAtSpeedBase" }; } + FieldValue FPVLookAtInterpSpeedField() { return { this, "AShooterWeapon.FPVLookAtInterpSpeed" }; } + FieldValue FPVLookAtMaximumOffset_TargetingField() { return { this, "AShooterWeapon.FPVLookAtMaximumOffset_Targeting" }; } + FieldValue FPVLookAtSpeedBase_TargetingField() { return { this, "AShooterWeapon.FPVLookAtSpeedBase_Targeting" }; } + FieldValue FPVLookAtInterpSpeed_TargetingField() { return { this, "AShooterWeapon.FPVLookAtInterpSpeed_Targeting" }; } + FieldValue FPVImmobilizedLocationOffsetField() { return { this, "AShooterWeapon.FPVImmobilizedLocationOffset" }; } + FieldValue FPVImmobilizedRotationOffsetField() { return { this, "AShooterWeapon.FPVImmobilizedRotationOffset" }; } + FieldValue FPVImmobilizedInterpSpeedField() { return { this, "AShooterWeapon.FPVImmobilizedInterpSpeed" }; } + FieldValue bUseBlueprintAnimNotificationsField() { return { this, "AShooterWeapon.bUseBlueprintAnimNotifications" }; } + FieldValue> MeleeSwingSocketsField() { return { this, "AShooterWeapon.MeleeSwingSockets" }; } + FieldValue AllowMeleeTimeBeforeAnimationEndField() { return { this, "AShooterWeapon.AllowMeleeTimeBeforeAnimationEnd" }; } + FieldValue AssociatedPrimalItemField() { return { this, "AShooterWeapon.AssociatedPrimalItem" }; } + FieldValue bCanBeUsedAsEquipmentField() { return { this, "AShooterWeapon.bCanBeUsedAsEquipment" }; } + FieldValue AssociatedItemNetInfoField() { return { this, "AShooterWeapon.AssociatedItemNetInfo" }; } + FieldValue WeaponConfigField() { return { this, "AShooterWeapon.WeaponConfig" }; } + FieldValue> WeaponAmmoItemTemplateField() { return { this, "AShooterWeapon.WeaponAmmoItemTemplate" }; } + FieldValue NextAllowedMeleeTimeField() { return { this, "AShooterWeapon.NextAllowedMeleeTime" }; } + FieldValue> LastSocketPositionsField() { return { this, "AShooterWeapon.LastSocketPositions" }; } + FieldValue> MeleeSwingHurtListField() { return { this, "AShooterWeapon.MeleeSwingHurtList" }; } + FieldValue LastFPVRenderTimeField() { return { this, "AShooterWeapon.LastFPVRenderTime" }; } + FieldValue LastCameraRotationField() { return { this, "AShooterWeapon.LastCameraRotation" }; } + FieldValue FPVAdditionalLookRotOffsetField() { return { this, "AShooterWeapon.FPVAdditionalLookRotOffset" }; } + FieldValue FPVLastLocOffsetField() { return { this, "AShooterWeapon.FPVLastLocOffset" }; } + FieldValue FPVLastVROffsetField() { return { this, "AShooterWeapon.FPVLastVROffset" }; } + FieldValue FPVRelativeLocationOffscreenOffsetField() { return { this, "AShooterWeapon.FPVRelativeLocationOffscreenOffset" }; } + FieldValue FPVLastRotOffsetField() { return { this, "AShooterWeapon.FPVLastRotOffset" }; } + FieldValue MyPawnField() { return { this, "AShooterWeapon.MyPawn" }; } + FieldValue FireACField() { return { this, "AShooterWeapon.FireAC" }; } + FieldValue MuzzleAttachPointField() { return { this, "AShooterWeapon.MuzzleAttachPoint" }; } + FieldValue FireSoundField() { return { this, "AShooterWeapon.FireSound" }; } + FieldValue AltFireSoundField() { return { this, "AShooterWeapon.AltFireSound" }; } + FieldValue FireFinishSoundField() { return { this, "AShooterWeapon.FireFinishSound" }; } + FieldValue OutOfAmmoSoundField() { return { this, "AShooterWeapon.OutOfAmmoSound" }; } + FieldValue MeleeDamageAmountField() { return { this, "AShooterWeapon.MeleeDamageAmount" }; } + FieldValue TheMeleeSwingRadiusField() { return { this, "AShooterWeapon.TheMeleeSwingRadius" }; } + FieldValue MeleeDamageImpulseField() { return { this, "AShooterWeapon.MeleeDamageImpulse" }; } + FieldValue WeaponMesh3PReloadAnimField() { return { this, "AShooterWeapon.WeaponMesh3PReloadAnim" }; } + FieldValue EquipSoundField() { return { this, "AShooterWeapon.EquipSound" }; } + FieldValue WeaponMesh3PFireAnimField() { return { this, "AShooterWeapon.WeaponMesh3PFireAnim" }; } + FieldValue FPVMoveOffscreenWhenTurningMaxMoveWeaponSpeedField() { return { this, "AShooterWeapon.FPVMoveOffscreenWhenTurningMaxMoveWeaponSpeed" }; } + FieldValue FPVMoveOffscreenWhenTurningMinMoveWeaponSpeedField() { return { this, "AShooterWeapon.FPVMoveOffscreenWhenTurningMinMoveWeaponSpeed" }; } + FieldValue FPVMoveOffscreenWhenTurningMinViewRotSpeedField() { return { this, "AShooterWeapon.FPVMoveOffscreenWhenTurningMinViewRotSpeed" }; } + FieldValue FPVMoveOffscreenWhenTurningMaxViewRotSpeedField() { return { this, "AShooterWeapon.FPVMoveOffscreenWhenTurningMaxViewRotSpeed" }; } + FieldValue FPVMoveOffscreenIdleRestoreIntervalField() { return { this, "AShooterWeapon.FPVMoveOffscreenIdleRestoreInterval" }; } + FieldValue FPVMoveOffscreenIdleRestoreSpeedField() { return { this, "AShooterWeapon.FPVMoveOffscreenIdleRestoreSpeed" }; } + FieldValue FPVMoveOffscreenWhenTurningMaxOffsetField() { return { this, "AShooterWeapon.FPVMoveOffscreenWhenTurningMaxOffset" }; } + FieldValue FPVStoppedTurningTimeField() { return { this, "AShooterWeapon.FPVStoppedTurningTime" }; } + FieldValue ItemDestructionUnequipWeaponDelayField() { return { this, "AShooterWeapon.ItemDestructionUnequipWeaponDelay" }; } + FieldValue CurrentStateField() { return { this, "AShooterWeapon.CurrentState" }; } + FieldValue LastFireTimeField() { return { this, "AShooterWeapon.LastFireTime" }; } + FieldValue CurrentAmmoField() { return { this, "AShooterWeapon.CurrentAmmo" }; } + FieldValue CurrentAmmoInClipField() { return { this, "AShooterWeapon.CurrentAmmoInClip" }; } + FieldValue bReplicateCurrentAmmoInClipToNonOwnersField() { return { this, "AShooterWeapon.bReplicateCurrentAmmoInClipToNonOwners" }; } + FieldValue bUseBPAdjustAmmoPerShotField() { return { this, "AShooterWeapon.bUseBPAdjustAmmoPerShot" }; } + FieldValue FPVAccessoryToggleComponentField() { return { this, "AShooterWeapon.FPVAccessoryToggleComponent" }; } + FieldValue TPVAccessoryToggleComponentField() { return { this, "AShooterWeapon.TPVAccessoryToggleComponent" }; } + FieldValue TimeToAutoReloadField() { return { this, "AShooterWeapon.TimeToAutoReload" }; } + FieldValue ToggleAccessorySoundField() { return { this, "AShooterWeapon.ToggleAccessorySound" }; } + FieldValue FiredLastNoAmmoShotField() { return { this, "AShooterWeapon.FiredLastNoAmmoShot" }; } + FieldValue LastNotifyShotTimeField() { return { this, "AShooterWeapon.LastNotifyShotTime" }; } + FieldValue> MeleeDamageTypeField() { return { this, "AShooterWeapon.MeleeDamageType" }; } + FieldValue VRTargetingModelOffsetField() { return { this, "AShooterWeapon.VRTargetingModelOffset" }; } + FieldValue VRTargetingAimOriginOffsetField() { return { this, "AShooterWeapon.VRTargetingAimOriginOffset" }; } + FieldValue ScopeOverlayMIField() { return { this, "AShooterWeapon.ScopeOverlayMI" }; } + FieldValue ScopeCrosshairMIField() { return { this, "AShooterWeapon.ScopeCrosshairMI" }; } + FieldValue ScopeCrosshairSizeField() { return { this, "AShooterWeapon.ScopeCrosshairSize" }; } + FieldValue ScopeCrosshairColorParameterField() { return { this, "AShooterWeapon.ScopeCrosshairColorParameter" }; } + FieldValue MinItemDurabilityPercentageForShotField() { return { this, "AShooterWeapon.MinItemDurabilityPercentageForShot" }; } + FieldValue OverrideTargetingFOVField() { return { this, "AShooterWeapon.OverrideTargetingFOV" }; } + FieldValue TargetingDelayTimeField() { return { this, "AShooterWeapon.TargetingDelayTime" }; } + FieldValue TargetingFOVInterpSpeedField() { return { this, "AShooterWeapon.TargetingFOVInterpSpeed" }; } + FieldValue AimDriftYawAngleField() { return { this, "AShooterWeapon.AimDriftYawAngle" }; } + FieldValue AimDriftPitchAngleField() { return { this, "AShooterWeapon.AimDriftPitchAngle" }; } + FieldValue AimDriftYawFrequencyField() { return { this, "AShooterWeapon.AimDriftYawFrequency" }; } + FieldValue AimDriftPitchFrequencyField() { return { this, "AShooterWeapon.AimDriftPitchFrequency" }; } + FieldValue AlternateInventoryEquipAnimField() { return { this, "AShooterWeapon.AlternateInventoryEquipAnim" }; } + FieldValue MeleeHitRandomChanceToDestroyItemField() { return { this, "AShooterWeapon.MeleeHitRandomChanceToDestroyItem" }; } + FieldValue GlobalFireCameraShakeScaleField() { return { this, "AShooterWeapon.GlobalFireCameraShakeScale" }; } + FieldValue DurabilityCostToEquipField() { return { this, "AShooterWeapon.DurabilityCostToEquip" }; } + FieldValue PassiveDurabilityCostPerIntervalField() { return { this, "AShooterWeapon.PassiveDurabilityCostPerInterval" }; } + FieldValue PassiveDurabilityCostIntervalField() { return { this, "AShooterWeapon.PassiveDurabilityCostInterval" }; } + FieldValue GlobalFireCameraShakeScaleTargetingField() { return { this, "AShooterWeapon.GlobalFireCameraShakeScaleTargeting" }; } + FieldValue MeleeCameraShakeSpeedScaleField() { return { this, "AShooterWeapon.MeleeCameraShakeSpeedScale" }; } + FieldValue ReloadCameraShakeSpeedScaleField() { return { this, "AShooterWeapon.ReloadCameraShakeSpeedScale" }; } + FieldValue MeleeConsumesStaminaField() { return { this, "AShooterWeapon.MeleeConsumesStamina" }; } + FieldValue HypoThermiaInsulationField() { return { this, "AShooterWeapon.HypoThermiaInsulation" }; } + FieldValue HyperThermiaInsulationField() { return { this, "AShooterWeapon.HyperThermiaInsulation" }; } + FieldValue InsulationRangeField() { return { this, "AShooterWeapon.InsulationRange" }; } + FieldValue LastDurabilityConsumptionTimeField() { return { this, "AShooterWeapon.LastDurabilityConsumptionTime" }; } + FieldValue bLastMeleeHitField() { return { this, "AShooterWeapon.bLastMeleeHit" }; } + FieldValue bLastMeleeHitStationaryField() { return { this, "AShooterWeapon.bLastMeleeHitStationary" }; } + FieldValue bClientAlreadyReloadedField() { return { this, "AShooterWeapon.bClientAlreadyReloaded" }; } + FieldValue AutoReloadTimerField() { return { this, "AShooterWeapon.AutoReloadTimer" }; } + FieldValue bConsumedDurabilityForThisMeleeHitField() { return { this, "AShooterWeapon.bConsumedDurabilityForThisMeleeHit" }; } + FieldValue TargetingSoundField() { return { this, "AShooterWeapon.TargetingSound" }; } + FieldValue UntargetingSoundField() { return { this, "AShooterWeapon.UntargetingSound" }; } + FieldValue FPVMeleeTraceFXRangeField() { return { this, "AShooterWeapon.FPVMeleeTraceFXRange" }; } + FieldValue MeleeAttackHarvetUsableComponentsRadiusField() { return { this, "AShooterWeapon.MeleeAttackHarvetUsableComponentsRadius" }; } + FieldValue MeleeAttackUsableHarvestDamageMultiplierField() { return { this, "AShooterWeapon.MeleeAttackUsableHarvestDamageMultiplier" }; } + FieldArray bColorizeRegionsField() { return { this, "AShooterWeapon.bColorizeRegions" }; } + FieldValue TPVForcePlayAnimField() { return { this, "AShooterWeapon.TPVForcePlayAnim" }; } + FieldValue bPreventOpeningInventoryField() { return { this, "AShooterWeapon.bPreventOpeningInventory" }; } + FieldValue bAllowUseOnSeatingStructureField() { return { this, "AShooterWeapon.bAllowUseOnSeatingStructure" }; } + FieldValue bOnlyUseOnSeatingStructureField() { return { this, "AShooterWeapon.bOnlyUseOnSeatingStructure" }; } + FieldValue bBPDoClientCheckCanFireField() { return { this, "AShooterWeapon.bBPDoClientCheckCanFire" }; } + FieldValue bRestrictTPVCameraYawField() { return { this, "AShooterWeapon.bRestrictTPVCameraYaw" }; } + FieldValue TPVCameraYawRangeField() { return { this, "AShooterWeapon.TPVCameraYawRange" }; } + FieldValue bFoceSimulatedTickField() { return { this, "AShooterWeapon.bFoceSimulatedTick" }; } + FieldValue bWasLastFireFromGamePadField() { return { this, "AShooterWeapon.bWasLastFireFromGamePad" }; } + FieldValue bDisableWeaponCrosshairField() { return { this, "AShooterWeapon.bDisableWeaponCrosshair" }; } + FieldValue bBPOverrideAspectRatioField() { return { this, "AShooterWeapon.bBPOverrideAspectRatio" }; } + FieldValue bForceAllowMountedWeaponryField() { return { this, "AShooterWeapon.bForceAllowMountedWeaponry" }; } + FieldValue FireCameraShakeSpreadScaleExponentField() { return { this, "AShooterWeapon.FireCameraShakeSpreadScaleExponent" }; } + FieldValue FireCameraShakeSpreadScaleExponentLessThanField() { return { this, "AShooterWeapon.FireCameraShakeSpreadScaleExponentLessThan" }; } + FieldValue FireCameraShakeSpreadScaleMultiplierLessThanField() { return { this, "AShooterWeapon.FireCameraShakeSpreadScaleMultiplierLessThan" }; } + FieldValue FireCameraShakeSpreadScaleMultiplierField() { return { this, "AShooterWeapon.FireCameraShakeSpreadScaleMultiplier" }; } + FieldValue bUseFireCameraShakeScaleField() { return { this, "AShooterWeapon.bUseFireCameraShakeScale" }; } + FieldValue bForceTickWithNoControllerField() { return { this, "AShooterWeapon.bForceTickWithNoController" }; } + FieldValue CurrentFiringSpreadField() { return { this, "AShooterWeapon.CurrentFiringSpread" }; } + FieldValue> ScopedBuffField() { return { this, "AShooterWeapon.ScopedBuff" }; } + FieldValue> MyScopedBuffField() { return { this, "AShooterWeapon.MyScopedBuff" }; } + FieldValue OverrideTPVShieldAnimationField() { return { this, "AShooterWeapon.OverrideTPVShieldAnimation" }; } + FieldValue bAllowTargetingDuringMeleeSwingField() { return { this, "AShooterWeapon.bAllowTargetingDuringMeleeSwing" }; } + FieldValue FPVMuzzleLocationOffsetField() { return { this, "AShooterWeapon.FPVMuzzleLocationOffset" }; } + FieldValue TPVMuzzleLocationOffsetField() { return { this, "AShooterWeapon.TPVMuzzleLocationOffset" }; } + FieldValue bForceTPV_EquippedWhileRidingField() { return { this, "AShooterWeapon.bForceTPV_EquippedWhileRiding" }; } + FieldValue bCutsEnemyGrapplingCableField() { return { this, "AShooterWeapon.bCutsEnemyGrapplingCable" }; } + FieldValue FPVInventoryReequipOffsetField() { return { this, "AShooterWeapon.FPVInventoryReequipOffset" }; } + FieldValue LocalInventoryViewingSkippedEquipAnimTimeField() { return { this, "AShooterWeapon.LocalInventoryViewingSkippedEquipAnimTime" }; } + FieldValue DraggingOffsetInterpField() { return { this, "AShooterWeapon.DraggingOffsetInterp" }; } + FieldValue bForceTPVCameraOffsetField() { return { this, "AShooterWeapon.bForceTPVCameraOffset" }; } + + // Functions + + static UClass * StaticClass() { return NativeCall(nullptr, "AShooterWeapon.StaticClass"); } + USceneComponent * FindComponentByName(FName ComponentName) { return NativeCall(this, "AShooterWeapon.FindComponentByName", ComponentName); } + void ZoomOut() { NativeCall(this, "AShooterWeapon.ZoomOut"); } + void ZoomIn() { NativeCall(this, "AShooterWeapon.ZoomIn"); } + void PostInitializeComponents() { NativeCall(this, "AShooterWeapon.PostInitializeComponents"); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "AShooterWeapon.DrawHUD", HUD); } + void UpdateFirstPersonMeshes(bool bIsFirstPerson) { NativeCall(this, "AShooterWeapon.UpdateFirstPersonMeshes", bIsFirstPerson); } + void Destroyed() { NativeCall(this, "AShooterWeapon.Destroyed"); } + void OnEquip() { NativeCall(this, "AShooterWeapon.OnEquip"); } + void OnEquipFinished() { NativeCall(this, "AShooterWeapon.OnEquipFinished"); } + void StartUnequip_Implementation() { NativeCall(this, "AShooterWeapon.StartUnequip_Implementation"); } + void PlayUnequipAnimation() { NativeCall(this, "AShooterWeapon.PlayUnequipAnimation"); } + void AttachMeshToPawn() { NativeCall(this, "AShooterWeapon.AttachMeshToPawn"); } + void ApplyPrimalItemSettingsToWeapon(bool bShallowUpdate) { NativeCall(this, "AShooterWeapon.ApplyPrimalItemSettingsToWeapon", bShallowUpdate); } + void DetachMeshFromPawn() { NativeCall(this, "AShooterWeapon.DetachMeshFromPawn"); } + void StartFire(bool bFromGamepad) { NativeCall(this, "AShooterWeapon.StartFire", bFromGamepad); } + void StopFire() { NativeCall(this, "AShooterWeapon.StopFire"); } + void StartAltFire() { NativeCall(this, "AShooterWeapon.StartAltFire"); } + void StartSecondaryAction() { NativeCall(this, "AShooterWeapon.StartSecondaryAction"); } + bool CanToggleAccessory() { return NativeCall(this, "AShooterWeapon.CanToggleAccessory"); } + void ToggleAccessory() { NativeCall(this, "AShooterWeapon.ToggleAccessory"); } + void RefreshToggleAccessory() { NativeCall(this, "AShooterWeapon.RefreshToggleAccessory"); } + bool CanMeleeAttack() { return NativeCall(this, "AShooterWeapon.CanMeleeAttack"); } + void DoMeleeAttack() { NativeCall(this, "AShooterWeapon.DoMeleeAttack"); } + void StopAltFire() { NativeCall(this, "AShooterWeapon.StopAltFire"); } + void CheckForMeleeAttack() { NativeCall(this, "AShooterWeapon.CheckForMeleeAttack"); } + void StopCheckForMeleeAttack() { NativeCall(this, "AShooterWeapon.StopCheckForMeleeAttack"); } + bool CanRun() { return NativeCall(this, "AShooterWeapon.CanRun"); } + void StartReload(bool bFromReplication) { NativeCall(this, "AShooterWeapon.StartReload", bFromReplication); } + void ClearClientReload() { NativeCall(this, "AShooterWeapon.ClearClientReload"); } + float PlayReloadAnimation() { return NativeCall(this, "AShooterWeapon.PlayReloadAnimation"); } + void StopReloadAnimation() { NativeCall(this, "AShooterWeapon.StopReloadAnimation"); } + void ServerStartFire_Implementation() { NativeCall(this, "AShooterWeapon.ServerStartFire_Implementation"); } + void ServerStopFire_Implementation() { NativeCall(this, "AShooterWeapon.ServerStopFire_Implementation"); } + void ServerStartAltFire_Implementation() { NativeCall(this, "AShooterWeapon.ServerStartAltFire_Implementation"); } + void ServerStopAltFire_Implementation() { NativeCall(this, "AShooterWeapon.ServerStopAltFire_Implementation"); } + void ServerStartSecondaryAction_Implementation() { NativeCall(this, "AShooterWeapon.ServerStartSecondaryAction_Implementation"); } + void ServerStopSecondaryAction_Implementation() { NativeCall(this, "AShooterWeapon.ServerStopSecondaryAction_Implementation"); } + void ServerToggleAccessory_Implementation() { NativeCall(this, "AShooterWeapon.ServerToggleAccessory_Implementation"); } + void ServerStartReload_Implementation() { NativeCall(this, "AShooterWeapon.ServerStartReload_Implementation"); } + void ClientStartReload_Implementation() { NativeCall(this, "AShooterWeapon.ClientStartReload_Implementation"); } + bool CanFire(bool bForceAllowSubmergedFiring) { return NativeCall(this, "AShooterWeapon.CanFire", bForceAllowSubmergedFiring); } + bool AllowFiring() { return NativeCall(this, "AShooterWeapon.AllowFiring"); } + bool CanReload() { return NativeCall(this, "AShooterWeapon.CanReload"); } + void UseAmmo(int UseAmmoAmountOverride) { NativeCall(this, "AShooterWeapon.UseAmmo", UseAmmoAmountOverride); } + float GetFireCameraShakeScale() { return NativeCall(this, "AShooterWeapon.GetFireCameraShakeScale"); } + void HandleFiring(bool bSentFromClient) { NativeCall(this, "AShooterWeapon.HandleFiring", bSentFromClient); } + bool CanTarget() { return NativeCall(this, "AShooterWeapon.CanTarget"); } + float GetConsumeDurabilityPerShot() { return NativeCall(this, "AShooterWeapon.GetConsumeDurabilityPerShot"); } + void ReloadWeapon() { NativeCall(this, "AShooterWeapon.ReloadWeapon"); } + void RefreshAmmoItemQuantity() { NativeCall(this, "AShooterWeapon.RefreshAmmoItemQuantity"); } + void ConsumeAmmoItem(int Quantity) { NativeCall(this, "AShooterWeapon.ConsumeAmmoItem", Quantity); } + void SetWeaponState(EWeaponState::Type NewState) { NativeCall(this, "AShooterWeapon.SetWeaponState", NewState); } + void DetermineWeaponState() { NativeCall(this, "AShooterWeapon.DetermineWeaponState"); } + void SetAutoReload() { NativeCall(this, "AShooterWeapon.SetAutoReload"); } + void OnBurstStarted() { NativeCall(this, "AShooterWeapon.OnBurstStarted"); } + void OnBurstFinished() { NativeCall(this, "AShooterWeapon.OnBurstFinished"); } + void ClientStopSimulatingWeaponFire_Implementation() { NativeCall(this, "AShooterWeapon.ClientStopSimulatingWeaponFire_Implementation"); } + void ClientSimulateWeaponFire_Implementation() { NativeCall(this, "AShooterWeapon.ClientSimulateWeaponFire_Implementation"); } + UAudioComponent * PlayWeaponSound(USoundCue * Sound) { return NativeCall(this, "AShooterWeapon.PlayWeaponSound", Sound); } + float PlayCameraAnimationFPV(UAnimMontage * Animation1P) { return NativeCall(this, "AShooterWeapon.PlayCameraAnimationFPV", Animation1P); } + void StopCameraAnimationFPV() { NativeCall(this, "AShooterWeapon.StopCameraAnimationFPV"); } + void ClientPlayShieldHitAnim_Implementation() { NativeCall(this, "AShooterWeapon.ClientPlayShieldHitAnim_Implementation"); } + FVector * GetAdjustedAim(FVector * result) { return NativeCall(this, "AShooterWeapon.GetAdjustedAim", result); } + FVector * GetCameraDamageStartLocation(FVector * result, FVector * AimDir) { return NativeCall(this, "AShooterWeapon.GetCameraDamageStartLocation", result, AimDir); } + FVector * GetShootingCameraLocation(FVector * result) { return NativeCall(this, "AShooterWeapon.GetShootingCameraLocation", result); } + FVector * GetMuzzleLocation(FVector * result) { return NativeCall(this, "AShooterWeapon.GetMuzzleLocation", result); } + FHitResult * WeaponTrace(FHitResult * result, FVector * StartTrace, FVector * EndTrace) { return NativeCall(this, "AShooterWeapon.WeaponTrace", result, StartTrace, EndTrace); } + void WeaponTraceHits(TArray * HitResults, FVector * StartTrace, FVector * EndTrace) { NativeCall *, FVector *, FVector *>(this, "AShooterWeapon.WeaponTraceHits", HitResults, StartTrace, EndTrace); } + void SetOwningPawn(AShooterCharacter * NewOwner) { NativeCall(this, "AShooterWeapon.SetOwningPawn", NewOwner); } + void OnCameraUpdate(FVector * CameraLocation, FRotator * CameraRotation, FVector * WeaponBob) { NativeCall(this, "AShooterWeapon.OnCameraUpdate", CameraLocation, CameraRotation, WeaponBob); } + void SimulateWeaponFire() { NativeCall(this, "AShooterWeapon.SimulateWeaponFire"); } + void StartMuzzleFX() { NativeCall(this, "AShooterWeapon.StartMuzzleFX"); } + void StopMuzzleFX() { NativeCall(this, "AShooterWeapon.StopMuzzleFX"); } + void PlayFireAnimation() { NativeCall(this, "AShooterWeapon.PlayFireAnimation"); } + void StopSimulatingWeaponFire() { NativeCall(this, "AShooterWeapon.StopSimulatingWeaponFire"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AShooterWeapon.GetLifetimeReplicatedProps", OutLifetimeProps); } + bool HasInfiniteAmmo() { return NativeCall(this, "AShooterWeapon.HasInfiniteAmmo"); } + void StartMeleeSwing() { NativeCall(this, "AShooterWeapon.StartMeleeSwing"); } + void EndMeleeSwing() { NativeCall(this, "AShooterWeapon.EndMeleeSwing"); } + void EndDoMeleeSwing() { NativeCall(this, "AShooterWeapon.EndDoMeleeSwing"); } + bool AddToMeleeSwingHurtList(AActor * AnActor) { return NativeCall(this, "AShooterWeapon.AddToMeleeSwingHurtList", AnActor); } + bool ShouldDealDamage(AActor * TestActor) { return NativeCall(this, "AShooterWeapon.ShouldDealDamage", TestActor); } + void DealDamage(FHitResult * Impact, FVector * ShootDir, int DamageAmount, TSubclassOf DamageType, float Impulse) { NativeCall, float>(this, "AShooterWeapon.DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } + void TickMeleeSwing(float DeltaTime) { NativeCall(this, "AShooterWeapon.TickMeleeSwing", DeltaTime); } + void ClientStartMuzzleFX_Implementation() { NativeCall(this, "AShooterWeapon.ClientStartMuzzleFX_Implementation"); } + void CosumeMeleeHitDurability(float DurabilityConsumptionMultiplier) { NativeCall(this, "AShooterWeapon.CosumeMeleeHitDurability", DurabilityConsumptionMultiplier); } + void PlayWeaponBreakAnimation_Implementation() { NativeCall(this, "AShooterWeapon.PlayWeaponBreakAnimation_Implementation"); } + void Tick(float DeltaSeconds) { NativeCall(this, "AShooterWeapon.Tick", DeltaSeconds); } + void BeginPlay() { NativeCall(this, "AShooterWeapon.BeginPlay"); } + void LocalPossessed() { NativeCall(this, "AShooterWeapon.LocalPossessed"); } + bool IsLocallyOwned() { return NativeCall(this, "AShooterWeapon.IsLocallyOwned"); } + void CheckItemAssocation() { NativeCall(this, "AShooterWeapon.CheckItemAssocation"); } + void OnRep_CurrentAmmoInClip() { NativeCall(this, "AShooterWeapon.OnRep_CurrentAmmoInClip"); } + void LoadedFromSaveGame() { NativeCall(this, "AShooterWeapon.LoadedFromSaveGame"); } + void PlayUseHarvestAnimation_Implementation() { NativeCall(this, "AShooterWeapon.PlayUseHarvestAnimation_Implementation"); } + void OwnerDied() { NativeCall(this, "AShooterWeapon.OwnerDied"); } + void OnRep_NetLoopedWeaponFire() { NativeCall(this, "AShooterWeapon.OnRep_NetLoopedWeaponFire"); } + void ClientSetClipAmmo_Implementation(int newClipAmmo, bool bOnlyUpdateItem) { NativeCall(this, "AShooterWeapon.ClientSetClipAmmo_Implementation", newClipAmmo, bOnlyUpdateItem); } + void DoHandleFiring() { NativeCall(this, "AShooterWeapon.DoHandleFiring"); } + bool IsFirstPersonMeshVisible() { return NativeCall(this, "AShooterWeapon.IsFirstPersonMeshVisible"); } + void ServerSetColorizeRegion_Implementation(int theRegion, bool bValToUse) { NativeCall(this, "AShooterWeapon.ServerSetColorizeRegion_Implementation", theRegion, bValToUse); } + void DoReregisterAllComponents() { NativeCall(this, "AShooterWeapon.DoReregisterAllComponents"); } + bool ForceTPVTargetingAnimation() { return NativeCall(this, "AShooterWeapon.ForceTPVTargetingAnimation"); } + void FireWeapon() { NativeCall(this, "AShooterWeapon.FireWeapon"); } + bool PreventSwitchingWeapon() { return NativeCall(this, "AShooterWeapon.PreventSwitchingWeapon"); } + bool ForceFirstPerson() { return NativeCall(this, "AShooterWeapon.ForceFirstPerson"); } + bool TryFireWeapon() { return NativeCall(this, "AShooterWeapon.TryFireWeapon"); } + bool ForcesTPVCameraOffset_Implementation() { return NativeCall(this, "AShooterWeapon.ForcesTPVCameraOffset_Implementation"); } + static void StaticRegisterNativesAShooterWeapon() { NativeCall(nullptr, "AShooterWeapon.StaticRegisterNativesAShooterWeapon"); } + bool BPConstrainAspectRatio(float * OutAspectRatio) { return NativeCall(this, "AShooterWeapon.BPConstrainAspectRatio", OutAspectRatio); } + bool BPWeaponCanFire() { return NativeCall(this, "AShooterWeapon.BPWeaponCanFire"); } + int BPWeaponDealDamage(FHitResult * Impact, FVector * ShootDir, int DamageAmount, TSubclassOf DamageType, float Impulse) { return NativeCall, float>(this, "AShooterWeapon.BPWeaponDealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } + void ClientStartMuzzleFX() { NativeCall(this, "AShooterWeapon.ClientStartMuzzleFX"); } + bool ForcesTPVCameraOffset() { return NativeCall(this, "AShooterWeapon.ForcesTPVCameraOffset"); } + UAnimSequence * GetStandingAnimation(float * OutBlendInTime, float * OutBlendOutTime) { return NativeCall(this, "AShooterWeapon.GetStandingAnimation", OutBlendInTime, OutBlendOutTime); } + void PlayWeaponBreakAnimation() { NativeCall(this, "AShooterWeapon.PlayWeaponBreakAnimation"); } + void ServerSetColorizeRegion(int theRegion, bool bValToUse) { NativeCall(this, "AShooterWeapon.ServerSetColorizeRegion", theRegion, bValToUse); } + void ServerStartFire() { NativeCall(this, "AShooterWeapon.ServerStartFire"); } + void StartUnequip() { NativeCall(this, "AShooterWeapon.StartUnequip"); } +}; + +struct AAIController : AController +{ + FieldValue MoveTowardTargetOffsetField() { return { this, "AAIController.MoveTowardTargetOffset" }; } + FieldValue TargetFocalPositionOffsetField() { return { this, "AAIController.TargetFocalPositionOffset" }; } + FieldValue ReachedDestinationThresholdOffsetField() { return { this, "AAIController.ReachedDestinationThresholdOffset" }; } + FieldValue MovementGoalHeightField() { return { this, "AAIController.MovementGoalHeight" }; } + FieldValue RequestMoveIDField() { return { this, "AAIController.RequestMoveID" }; } + FieldValue> CurrentGoalField() { return { this, "AAIController.CurrentGoal" }; } + FieldValue MoveSegmentDirectionField() { return { this, "AAIController.MoveSegmentDirection" }; } + FieldValue MoveSegmentStartIndexField() { return { this, "AAIController.MoveSegmentStartIndex" }; } + FieldValue MoveSegmentEndIndexField() { return { this, "AAIController.MoveSegmentEndIndex" }; } + FieldValue CurrentAcceptanceRadiusField() { return { this, "AAIController.CurrentAcceptanceRadius" }; } + + // Functions + + UField * StaticClass() { return NativeCall(this, "AAIController.StaticClass"); } + UObject * GetUObjectInterfaceAIPerceptionListenerInterface() { return NativeCall(this, "AAIController.GetUObjectInterfaceAIPerceptionListenerInterface"); } + void Tick(float DeltaTime) { NativeCall(this, "AAIController.Tick", DeltaTime); } + void PostInitializeComponents() { NativeCall(this, "AAIController.PostInitializeComponents"); } + void PostRegisterAllComponents() { NativeCall(this, "AAIController.PostRegisterAllComponents"); } + void Reset() { NativeCall(this, "AAIController.Reset"); } + void GetPlayerViewPoint(FVector * out_Location, FRotator * out_Rotation) { NativeCall(this, "AAIController.GetPlayerViewPoint", out_Location, out_Rotation); } + void SetFocalPoint(FVector FP, bool bOffsetFromBase, char InPriority) { NativeCall(this, "AAIController.SetFocalPoint", FP, bOffsetFromBase, InPriority); } + FVector * GetFocalPoint(FVector * result) { return NativeCall(this, "AAIController.GetFocalPoint", result); } + AActor * GetFocusActor() { return NativeCall(this, "AAIController.GetFocusActor"); } + void SetFocus(AActor * NewFocus, char InPriority) { NativeCall(this, "AAIController.SetFocus", NewFocus, InPriority); } + void ClearFocus(char InPriority) { NativeCall(this, "AAIController.ClearFocus", InPriority); } + bool LineOfSightTo(AActor * Other, FVector ViewPoint, bool bAlternateChecks) { return NativeCall(this, "AAIController.LineOfSightTo", Other, ViewPoint, bAlternateChecks); } + void UpdateControlRotation(float DeltaTime, bool bUpdatePawn) { NativeCall(this, "AAIController.UpdateControlRotation", DeltaTime, bUpdatePawn); } + void Possess(APawn * InPawn) { NativeCall(this, "AAIController.Possess", InPawn); } + void UnPossess() { NativeCall(this, "AAIController.UnPossess"); } + EPathFollowingRequestResult::Type MoveToActor(AActor * Goal, float AcceptanceRadius, bool bStopOnOverlap, bool bUsePathfinding, bool bCanStrafe, TSubclassOf FilterClass) { return NativeCall>(this, "AAIController.MoveToActor", Goal, AcceptanceRadius, bStopOnOverlap, bUsePathfinding, bCanStrafe, FilterClass); } + EPathFollowingRequestResult::Type MoveToLocation(FVector * Dest, float AcceptanceRadius, bool bStopOnOverlap, bool bUsePathfinding, bool bProjectDestinationToNavigation, bool bCanStrafe, TSubclassOf FilterClass, bool WasPlayerCommand) { return NativeCall, bool>(this, "AAIController.MoveToLocation", Dest, AcceptanceRadius, bStopOnOverlap, bUsePathfinding, bProjectDestinationToNavigation, bCanStrafe, FilterClass, WasPlayerCommand); } + bool HasReached(FVector * TestPoint, float InAcceptanceRadius, bool bExactSpot) { return NativeCall(this, "AAIController.HasReached", TestPoint, InAcceptanceRadius, bExactSpot); } + bool HasReached(AActor * TestGoal, float InAcceptanceRadius, bool bExactSpot) { return NativeCall(this, "AAIController.HasReached", TestGoal, InAcceptanceRadius, bExactSpot); } + bool HasReachedDestination(FVector * CurrentLocation) { return NativeCall(this, "AAIController.HasReachedDestination", CurrentLocation); } + bool HasReachedCurrentTarget(FVector * CurrentLocation) { return NativeCall(this, "AAIController.HasReachedCurrentTarget", CurrentLocation); } + bool HasReachedInternal(FVector * Goal, float GoalRadius, float GoalHalfHeight, FVector * AgentLocation, float RadiusThreshold, bool bUseAgentRadius) { return NativeCall(this, "AAIController.HasReachedInternal", Goal, GoalRadius, GoalHalfHeight, AgentLocation, RadiusThreshold, bUseAgentRadius); } + void AbortMove(FString * Reason, FAIRequestID RequestID, bool bResetVelocity, bool bSilent, char MessageFlags) { NativeCall(this, "AAIController.AbortMove", Reason, RequestID, bResetVelocity, bSilent, MessageFlags); } + void UpdatePathSegment() { NativeCall(this, "AAIController.UpdatePathSegment"); } + void FollowPathSegment(float DeltaTime) { NativeCall(this, "AAIController.FollowPathSegment", DeltaTime); } + void ResetMovement() { NativeCall(this, "AAIController.ResetMovement"); } + void OnPathFinished(EPathFollowingResult::Type Result) { NativeCall(this, "AAIController.OnPathFinished", Result); } + FVector * GetMoveFocus(FVector * result) { return NativeCall(this, "AAIController.GetMoveFocus", result); } + void UpdateMoveFocus() { NativeCall(this, "AAIController.UpdateMoveFocus"); } + void SetMoveSegment(int SegmentStartIndex) { NativeCall(this, "AAIController.SetMoveSegment", SegmentStartIndex); } + void StopMovement() { NativeCall(this, "AAIController.StopMovement"); } + void OnMoveCompleted(FAIRequestID RequestID, EPathFollowingResult::Type Result) { NativeCall(this, "AAIController.OnMoveCompleted", RequestID, Result); } +}; + +struct APrimalDinoAIController : AAIController +{ + FieldValue DieIfLeftWaterWanderMinimumWaterHeightMultiplierField() { return { this, "APrimalDinoAIController.DieIfLeftWaterWanderMinimumWaterHeightMultiplier" }; } + FieldValue DieIfLeftWaterReachedRadiusDistanceCheckMultiplierField() { return { this, "APrimalDinoAIController.DieIfLeftWaterReachedRadiusDistanceCheckMultiplier" }; } + FieldValue DieIfLeftWaterTargetUnsubmergedTimeoutField() { return { this, "APrimalDinoAIController.DieIfLeftWaterTargetUnsubmergedTimeout" }; } + FieldValue LandDinoMaxWaterTargetDepthCapsuleMultiplierField() { return { this, "APrimalDinoAIController.LandDinoMaxWaterTargetDepthCapsuleMultiplier" }; } + FieldValue ExtraCorpseTargetingRangeField() { return { this, "APrimalDinoAIController.ExtraCorpseTargetingRange" }; } + FieldValue FleeFromAttackCoolDownTimeField() { return { this, "APrimalDinoAIController.FleeFromAttackCoolDownTime" }; } + FieldValue FleeFromAttackTimeLimitField() { return { this, "APrimalDinoAIController.FleeFromAttackTimeLimit" }; } + FieldValue ForceFleeUnderHealthPercentageField() { return { this, "APrimalDinoAIController.ForceFleeUnderHealthPercentage" }; } + FieldValue bFleeOnCriticalHealthField() { return { this, "APrimalDinoAIController.bFleeOnCriticalHealth" }; } + FieldValue DieIfLeftWaterTargetingRequiresFreeDepthField() { return { this, "APrimalDinoAIController.DieIfLeftWaterTargetingRequiresFreeDepth" }; } + FieldValue LastBlockadeCheckTimeField() { return { this, "APrimalDinoAIController.LastBlockadeCheckTime" }; } + FieldValue LastMovingAroundBlockadeTimeField() { return { this, "APrimalDinoAIController.LastMovingAroundBlockadeTime" }; } + FieldValue MovingAroundBlockadeDirectionField() { return { this, "APrimalDinoAIController.MovingAroundBlockadeDirection" }; } + FieldValue MovingAroundBlockadePointField() { return { this, "APrimalDinoAIController.MovingAroundBlockadePoint" }; } + FieldValue LastBlockadeWidthField() { return { this, "APrimalDinoAIController.LastBlockadeWidth" }; } + FieldValue LastBlockadeHitNormalField() { return { this, "APrimalDinoAIController.LastBlockadeHitNormal" }; } + FieldValue LastBlockadeHitLocationField() { return { this, "APrimalDinoAIController.LastBlockadeHitLocation" }; } + FieldValue StartMovingAroundBlockadeLocationField() { return { this, "APrimalDinoAIController.StartMovingAroundBlockadeLocation" }; } + FieldValue LastMovingAroundBlockadeActorField() { return { this, "APrimalDinoAIController.LastMovingAroundBlockadeActor" }; } + FieldValue TargetField() { return { this, "APrimalDinoAIController.Target" }; } + FieldValue AttackDestinationOffsetField() { return { this, "APrimalDinoAIController.AttackDestinationOffset" }; } + FieldValue bUseOverlapTargetCheckField() { return { this, "APrimalDinoAIController.bUseOverlapTargetCheck" }; } + FieldValue bNotifyNeighborsWithoutDamageField() { return { this, "APrimalDinoAIController.bNotifyNeighborsWithoutDamage" }; } + FieldValue bUseBPShouldNotifyNeighborField() { return { this, "APrimalDinoAIController.bUseBPShouldNotifyNeighbor" }; } + FieldValue bRequireAbsoluteDamageForNeighborNotificationField() { return { this, "APrimalDinoAIController.bRequireAbsoluteDamageForNeighborNotification" }; } + FieldValue AboveDeltaZAttackRangeField() { return { this, "APrimalDinoAIController.AboveDeltaZAttackRange" }; } + FieldValue BelowDeltaZAttackRangeField() { return { this, "APrimalDinoAIController.BelowDeltaZAttackRange" }; } + FieldValue WildAboveDeltaZTargetingRangeField() { return { this, "APrimalDinoAIController.WildAboveDeltaZTargetingRange" }; } + FieldValue WildBelowDeltaZTargetingRangeField() { return { this, "APrimalDinoAIController.WildBelowDeltaZTargetingRange" }; } + FieldValue bWildUseDeltaZTargetingForFlyerPawnOrBigDinoField() { return { this, "APrimalDinoAIController.bWildUseDeltaZTargetingForFlyerPawnOrBigDino" }; } + FieldValue bDontWanderField() { return { this, "APrimalDinoAIController.bDontWander" }; } + FieldValue bOnlyOverlapTargetCorpsesUnlessHasTargetField() { return { this, "APrimalDinoAIController.bOnlyOverlapTargetCorpsesUnlessHasTarget" }; } + FieldValue NaturalTargetingRangeField() { return { this, "APrimalDinoAIController.NaturalTargetingRange" }; } + FieldValue TamedTargetingRangeField() { return { this, "APrimalDinoAIController.TamedTargetingRange" }; } + FieldValue TamedCorpseFoodTargetingRangeField() { return { this, "APrimalDinoAIController.TamedCorpseFoodTargetingRange" }; } + FieldValue WanderRandomDistanceAmountField() { return { this, "APrimalDinoAIController.WanderRandomDistanceAmount" }; } + FieldValue FlyingWanderFixedDistanceAmountField() { return { this, "APrimalDinoAIController.FlyingWanderFixedDistanceAmount" }; } + FieldValue FlyingWanderRandomDistanceAmountField() { return { this, "APrimalDinoAIController.FlyingWanderRandomDistanceAmount" }; } + FieldValue MaxFlyingTargetDeltaZField() { return { this, "APrimalDinoAIController.MaxFlyingTargetDeltaZ" }; } + FieldValue WanderFlyingZScalerField() { return { this, "APrimalDinoAIController.WanderFlyingZScaler" }; } + FieldValue WanderFlyingClampZHeightAboveGroundField() { return { this, "APrimalDinoAIController.WanderFlyingClampZHeightAboveGround" }; } + FieldValue WanderFlyingMinZHeightAboveGroundField() { return { this, "APrimalDinoAIController.WanderFlyingMinZHeightAboveGround" }; } + FieldValue WanderFixedDistanceAmountField() { return { this, "APrimalDinoAIController.WanderFixedDistanceAmount" }; } + FieldValue bUseAggroField() { return { this, "APrimalDinoAIController.bUseAggro" }; } + FieldValue MinAggroValueField() { return { this, "APrimalDinoAIController.MinAggroValue" }; } + FieldValue AggroToAddUponRemovingTargetField() { return { this, "APrimalDinoAIController.AggroToAddUponRemovingTarget" }; } + FieldValue AggroToAddUponAcquiringTargetField() { return { this, "APrimalDinoAIController.AggroToAddUponAcquiringTarget" }; } + FieldValue AggroFactorDecreaseSpeedField() { return { this, "APrimalDinoAIController.AggroFactorDecreaseSpeed" }; } + FieldValue AggroFactorDecreaseGracePeriodField() { return { this, "APrimalDinoAIController.AggroFactorDecreaseGracePeriod" }; } + FieldValue AggroFactorDamagePercentageMultiplierField() { return { this, "APrimalDinoAIController.AggroFactorDamagePercentageMultiplier" }; } + FieldValue AggroNotifyNeighborsMultiplierField() { return { this, "APrimalDinoAIController.AggroNotifyNeighborsMultiplier" }; } + FieldValue AggroNotifyNeighborsRangeField() { return { this, "APrimalDinoAIController.AggroNotifyNeighborsRange" }; } + FieldValue AggroNotifyNeighborsRangeFalloffField() { return { this, "APrimalDinoAIController.AggroNotifyNeighborsRangeFalloff" }; } + FieldValue TargetingDistanceReductionFactorLinearField() { return { this, "APrimalDinoAIController.TargetingDistanceReductionFactorLinear" }; } + FieldValue TargetingDistanceReductionFactorExponentField() { return { this, "APrimalDinoAIController.TargetingDistanceReductionFactorExponent" }; } + FieldValue BeyondTargetingRangeAggroAdditionField() { return { this, "APrimalDinoAIController.BeyondTargetingRangeAggroAddition" }; } + FieldValue AggroFactorDesirabilityMultiplierField() { return { this, "APrimalDinoAIController.AggroFactorDesirabilityMultiplier" }; } + FieldValue AttackRangeField() { return { this, "APrimalDinoAIController.AttackRange" }; } + FieldValue AttackIntervalField() { return { this, "APrimalDinoAIController.AttackInterval" }; } + FieldValue AttackRotationRangeDegreesField() { return { this, "APrimalDinoAIController.AttackRotationRangeDegrees" }; } + FieldValue AttackRotationGroundSpeedMultiplierField() { return { this, "APrimalDinoAIController.AttackRotationGroundSpeedMultiplier" }; } + FieldValue RangeTargetWildDinosMultiplierField() { return { this, "APrimalDinoAIController.RangeTargetWildDinosMultiplier" }; } + FieldValue AttackRotationRateField() { return { this, "APrimalDinoAIController.AttackRotationRate" }; } + FieldValue bFocusOnTargetDuringAttackField() { return { this, "APrimalDinoAIController.bFocusOnTargetDuringAttack" }; } + FieldValue FlyingMoveTowardsTargetOffsetField() { return { this, "APrimalDinoAIController.FlyingMoveTowardsTargetOffset" }; } + FieldValue CombatFlyingMoveTowardsTargetOffsetField() { return { this, "APrimalDinoAIController.CombatFlyingMoveTowardsTargetOffset" }; } + FieldValue FlyingTargetFocalPositionOffsetField() { return { this, "APrimalDinoAIController.FlyingTargetFocalPositionOffset" }; } + FieldValue FlyingReachedDestinationThresholdOffsetField() { return { this, "APrimalDinoAIController.FlyingReachedDestinationThresholdOffset" }; } + FieldValue SeekingIntervalCheckToFlyField() { return { this, "APrimalDinoAIController.SeekingIntervalCheckToFly" }; } + FieldValue SeekingPercentChanceToFlyField() { return { this, "APrimalDinoAIController.SeekingPercentChanceToFly" }; } + FieldValue SeekingIntervalCheckToLandField() { return { this, "APrimalDinoAIController.SeekingIntervalCheckToLand" }; } + FieldValue SeekingPercentChanceToLandField() { return { this, "APrimalDinoAIController.SeekingPercentChanceToLand" }; } + FieldValue MinimumWanderGroundNormalZField() { return { this, "APrimalDinoAIController.MinimumWanderGroundNormalZ" }; } + FieldValue FollowStoppingDistanceField() { return { this, "APrimalDinoAIController.FollowStoppingDistance" }; } + FieldValue bUseOverlapTargetCheckTracesField() { return { this, "APrimalDinoAIController.bUseOverlapTargetCheckTraces" }; } + FieldValue bUseAlternateMovePointField() { return { this, "APrimalDinoAIController.bUseAlternateMovePoint" }; } + FieldValue bTotallyIgnoreWaterTargetsField() { return { this, "APrimalDinoAIController.bTotallyIgnoreWaterTargets" }; } + FieldValue bWaterDinoAllowUnsubmergedTargetsField() { return { this, "APrimalDinoAIController.bWaterDinoAllowUnsubmergedTargets" }; } + FieldValue LastCheckAttackRangePawnLocationField() { return { this, "APrimalDinoAIController.LastCheckAttackRangePawnLocation" }; } + FieldValue LastCheckAttackRangeClosestPointField() { return { this, "APrimalDinoAIController.LastCheckAttackRangeClosestPoint" }; } + FieldValue LastCheckAttackRangeTargetLocationField() { return { this, "APrimalDinoAIController.LastCheckAttackRangeTargetLocation" }; } + FieldValue LastCheckAttackRangeTargetField() { return { this, "APrimalDinoAIController.LastCheckAttackRangeTarget" }; } + FieldValue> TamedAITargetingRangeMultipliersField() { return { this, "APrimalDinoAIController.TamedAITargetingRangeMultipliers" }; } + FieldValue MateBoostAggroNotifyNeighborsMultiplierField() { return { this, "APrimalDinoAIController.MateBoostAggroNotifyNeighborsMultiplier" }; } + FieldValue>> AggroNotifyNeighborsClassesField() { return { this, "APrimalDinoAIController.AggroNotifyNeighborsClasses" }; } + FieldValue MoveAroundBlockadeAdditionalWidthField() { return { this, "APrimalDinoAIController.MoveAroundBlockadeAdditionalWidth" }; } + FieldValue MoveAroundObjectMaxVelocityField() { return { this, "APrimalDinoAIController.MoveAroundObjectMaxVelocity" }; } + FieldValue ForcedAggroTimeCounterField() { return { this, "APrimalDinoAIController.ForcedAggroTimeCounter" }; } + FieldValue TamedMaxFollowDistanceField() { return { this, "APrimalDinoAIController.TamedMaxFollowDistance" }; } + FieldValue LandDinoMaxFlyerTargetDeltaZField() { return { this, "APrimalDinoAIController.LandDinoMaxFlyerTargetDeltaZ" }; } + FieldValue NaturalMaxDepthZField() { return { this, "APrimalDinoAIController.NaturalMaxDepthZ" }; } + FieldValue> ForcedAttackTargetField() { return { this, "APrimalDinoAIController.ForcedAttackTarget" }; } + FieldValue ForcedAttackEnemyTeamField() { return { this, "APrimalDinoAIController.ForcedAttackEnemyTeam" }; } + FieldValue LastForcedAttackEnemyTeamTimeField() { return { this, "APrimalDinoAIController.LastForcedAttackEnemyTeamTime" }; } + FieldValue LastCharacterTargetTeamField() { return { this, "APrimalDinoAIController.LastCharacterTargetTeam" }; } + FieldValue ForcedFleeDurationField() { return { this, "APrimalDinoAIController.ForcedFleeDuration" }; } + FieldValue MinAttackIntervalForFleeingField() { return { this, "APrimalDinoAIController.MinAttackIntervalForFleeing" }; } + FieldValue MinLocChangeIntervalForFleeingField() { return { this, "APrimalDinoAIController.MinLocChangeIntervalForFleeing" }; } + FieldValue PercentageTorporForFleeingField() { return { this, "APrimalDinoAIController.PercentageTorporForFleeing" }; } + FieldValue DamagedForceAggroIntervalField() { return { this, "APrimalDinoAIController.DamagedForceAggroInterval" }; } + FieldValue ForceAggroUntilTimeField() { return { this, "APrimalDinoAIController.ForceAggroUntilTime" }; } + FieldValue LastExecutedAttackTimeField() { return { this, "APrimalDinoAIController.LastExecutedAttackTime" }; } + FieldValue LastForcedFleeTimeField() { return { this, "APrimalDinoAIController.LastForcedFleeTime" }; } + FieldValue LastFleeLocCheckTimeField() { return { this, "APrimalDinoAIController.LastFleeLocCheckTime" }; } + FieldValue LastFleeLocCheckField() { return { this, "APrimalDinoAIController.LastFleeLocCheck" }; } + FieldValue NumAlliesToAttackField() { return { this, "APrimalDinoAIController.NumAlliesToAttack" }; } + FieldValue FindLandingPositionZOffsetField() { return { this, "APrimalDinoAIController.FindLandingPositionZOffset" }; } + FieldValue TamedFollowAcceptanceRadiusOffsetField() { return { this, "APrimalDinoAIController.TamedFollowAcceptanceRadiusOffset" }; } + FieldValue TamedFollowAcceptanceHeightOffsetField() { return { this, "APrimalDinoAIController.TamedFollowAcceptanceHeightOffset" }; } + FieldValue AIFlightMaxLandingZDistanceField() { return { this, "APrimalDinoAIController.AIFlightMaxLandingZDistance" }; } + FieldValue ForcedMoveToUntilTimeField() { return { this, "APrimalDinoAIController.ForcedMoveToUntilTime" }; } + FieldValue LastHadAggroEntriesTimeField() { return { this, "APrimalDinoAIController.LastHadAggroEntriesTime" }; } + FieldValue>> WildTargetingDesireMultiplierClassesField() { return { this, "APrimalDinoAIController.WildTargetingDesireMultiplierClasses" }; } + FieldValue> WildTargetingDesireMultiplierValuesField() { return { this, "APrimalDinoAIController.WildTargetingDesireMultiplierValues" }; } + FieldValue>> TamedTargetingDesireMultiplierClassesField() { return { this, "APrimalDinoAIController.TamedTargetingDesireMultiplierClasses" }; } + FieldValue> TamedTargetingDesireMultiplierValuesField() { return { this, "APrimalDinoAIController.TamedTargetingDesireMultiplierValues" }; } + + // Functions + + void ForceLand() { NativeCall(this, "APrimalDinoAIController.ForceLand"); } + FVector * GetRandomWanderDestination(FVector * result, FVector LocOverride, float RandomOffsetMultiplier, bool bUseRandomNegativeXDir, bool bOrientRandOffsetByRotation, FRotator OrientRandOffsetByRotation) { return NativeCall(this, "APrimalDinoAIController.GetRandomWanderDestination", result, LocOverride, RandomOffsetMultiplier, bUseRandomNegativeXDir, bOrientRandOffsetByRotation, OrientRandOffsetByRotation); } + static FVector * StaticGetRandomWanderDestination(FVector * result, APrimalDinoCharacter * TargetCharacter, APrimalDinoAIController * TargetAIController, FVector LocOverride, float RandomOffsetMultiplier, bool bUseRandomNegativeXDir, bool bOrientRandOffsetByRotation, FRotator OrientRandOffsetByRotation, float GroundCheckSpreadOverride) { return NativeCall(nullptr, "APrimalDinoAIController.StaticGetRandomWanderDestination", result, TargetCharacter, TargetAIController, LocOverride, RandomOffsetMultiplier, bUseRandomNegativeXDir, bOrientRandOffsetByRotation, OrientRandOffsetByRotation, GroundCheckSpreadOverride); } + void Unstasis() { NativeCall(this, "APrimalDinoAIController.Unstasis"); } + AActor * GetCorpseFoodTarget() { return NativeCall(this, "APrimalDinoAIController.GetCorpseFoodTarget"); } + AActor * FindTarget(bool bDontSet) { return NativeCall(this, "APrimalDinoAIController.FindTarget", bDontSet); } + float GetTargetingDesire(AActor * InTarget) { return NativeCall(this, "APrimalDinoAIController.GetTargetingDesire", InTarget); } + void SetTarget(AActor * InTarget, bool bDontAddAggro, bool bOverlapFoundTarget) { NativeCall(this, "APrimalDinoAIController.SetTarget", InTarget, bDontAddAggro, bOverlapFoundTarget); } + void AddToAggro(AActor * Attacker, float DamagePercent, bool bNotifyNeighbors, bool SetValue, bool bIsFromDamage, bool skipTeamCheck) { NativeCall(this, "APrimalDinoAIController.AddToAggro", Attacker, DamagePercent, bNotifyNeighbors, SetValue, bIsFromDamage, skipTeamCheck); } + void UpdateAggro() { NativeCall(this, "APrimalDinoAIController.UpdateAggro"); } + bool IsWithinAttackRange(AActor * Other, bool bForceUseLastAttackIndex) { return NativeCall(this, "APrimalDinoAIController.IsWithinAttackRange", Other, bForceUseLastAttackIndex); } + FVector * GetWanderAroundActorDestination(FVector * result, APrimalDinoCharacter * dinoCharacter, FVector originalDestination) { return NativeCall(this, "APrimalDinoAIController.GetWanderAroundActorDestination", result, dinoCharacter, originalDestination); } + bool IsWithinAttackRangeAndCalculateBestAttack(AActor * Other, bool * bAttackChanged) { return NativeCall(this, "APrimalDinoAIController.IsWithinAttackRangeAndCalculateBestAttack", Other, bAttackChanged); } + bool CalculateAndSetWonderingAIState(bool * StateChanged) { return NativeCall(this, "APrimalDinoAIController.CalculateAndSetWonderingAIState", StateChanged); } + float GetAggroDesirability(AActor * InTarget) { return NativeCall(this, "APrimalDinoAIController.GetAggroDesirability", InTarget); } + void NotifyTakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalDinoAIController.NotifyTakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool CheckMoveAroundBlockadePoint(FVector moveToPoint) { return NativeCall(this, "APrimalDinoAIController.CheckMoveAroundBlockadePoint", moveToPoint); } + bool MoveAroundBlockade(FVector PreBumpLocation, AActor * BlockadeActor, UPrimitiveComponent * OtherComp, float BlockadeWidth, FVector HitNormal, FVector HitLocation, bool SkipBlockingCheck) { return NativeCall(this, "APrimalDinoAIController.MoveAroundBlockade", PreBumpLocation, BlockadeActor, OtherComp, BlockadeWidth, HitNormal, HitLocation, SkipBlockingCheck); } + void NotifyBump(FVector PreBumpLocation, AActor * Other, UPrimitiveComponent * OtherComp, FVector * HitNormal, FVector * HitLocation) { NativeCall(this, "APrimalDinoAIController.NotifyBump", PreBumpLocation, Other, OtherComp, HitNormal, HitLocation); } + void RecoverMovement() { NativeCall(this, "APrimalDinoAIController.RecoverMovement"); } + void PlayStartledAnim() { NativeCall(this, "APrimalDinoAIController.PlayStartledAnim"); } + void Destroyed() { NativeCall(this, "APrimalDinoAIController.Destroyed"); } + bool CanLand() { return NativeCall(this, "APrimalDinoAIController.CanLand"); } + FVector * GetLandingLocation(FVector * result) { return NativeCall(this, "APrimalDinoAIController.GetLandingLocation", result); } + void ResetRotationRate() { NativeCall(this, "APrimalDinoAIController.ResetRotationRate"); } + void SetAttackGroundSpeed() { NativeCall(this, "APrimalDinoAIController.SetAttackGroundSpeed"); } + void AvoidOutOfWater() { NativeCall(this, "APrimalDinoAIController.AvoidOutOfWater"); } + bool UseLowQualityBehaviorTreeTick() { return NativeCall(this, "APrimalDinoAIController.UseLowQualityBehaviorTreeTick"); } + void Possess(APawn * InPawn) { NativeCall(this, "APrimalDinoAIController.Possess", InPawn); } + bool ShouldForceFlee() { return NativeCall(this, "APrimalDinoAIController.ShouldForceFlee"); } + AActor * GetAggroEntriesAttackerAtIndex(int Index) { return NativeCall(this, "APrimalDinoAIController.GetAggroEntriesAttackerAtIndex", Index); } + bool ShouldForceRunWhenAttacking() { return NativeCall(this, "APrimalDinoAIController.ShouldForceRunWhenAttacking"); } + float GetAcceptanceHeightOffset() { return NativeCall(this, "APrimalDinoAIController.GetAcceptanceHeightOffset"); } + float GetAcceptanceRadiusOffset() { return NativeCall(this, "APrimalDinoAIController.GetAcceptanceRadiusOffset"); } + void OnMoveCompleted(FAIRequestID RequestID, EPathFollowingResult::Type Result) { NativeCall(this, "APrimalDinoAIController.OnMoveCompleted", RequestID, Result); } + void StopBrainComponent(FString reason) { NativeCall(this, "APrimalDinoAIController.StopBrainComponent", reason); } + float GetAggroNotifyNeighborsRange_Implementation() { return NativeCall(this, "APrimalDinoAIController.GetAggroNotifyNeighborsRange_Implementation"); } + bool IsForceTargetDinoRider(AShooterCharacter * playerTarget) { return NativeCall(this, "APrimalDinoAIController.IsForceTargetDinoRider", playerTarget); } + float BPGetTargetingDesire(AActor * ForTarget, float ForTargetingDesireValue) { return NativeCall(this, "APrimalDinoAIController.BPGetTargetingDesire", ForTarget, ForTargetingDesireValue); } + void BPOnFleeEvent() { NativeCall(this, "APrimalDinoAIController.BPOnFleeEvent"); } + AActor * BPUpdateBestTarget(AActor * bestTarget, bool dontSetIn, bool * dontSetOut) { return NativeCall(this, "APrimalDinoAIController.BPUpdateBestTarget", bestTarget, dontSetIn, dontSetOut); } + void ChangedAITarget() { NativeCall(this, "APrimalDinoAIController.ChangedAITarget"); } +}; + +struct ADroppedItem : AActor +{ + FieldValue MyItemInfoField() { return { this, "ADroppedItem.MyItemInfo" }; } + FieldValue MyItemField() { return { this, "ADroppedItem.MyItem" }; } + FieldValue ImpulseMagnitudeField() { return { this, "ADroppedItem.ImpulseMagnitude" }; } + FieldValue ForceSleepTimerField() { return { this, "ADroppedItem.ForceSleepTimer" }; } + FieldValue DroppedItemScaleField() { return { this, "ADroppedItem.DroppedItemScale" }; } + FieldValue OverlayTooltipPaddingField() { return { this, "ADroppedItem.OverlayTooltipPadding" }; } + FieldValue OverlayTooltipScaleField() { return { this, "ADroppedItem.OverlayTooltipScale" }; } + FieldValue DroppedByNameField() { return { this, "ADroppedItem.DroppedByName" }; } + FieldValue DroppedByPlayerIDField() { return { this, "ADroppedItem.DroppedByPlayerID" }; } + FieldValue DroppedItemDestructionTimeField() { return { this, "ADroppedItem.DroppedItemDestructionTime" }; } + FieldValue bClientDisablePhysicsField() { return { this, "ADroppedItem.bClientDisablePhysics" }; } + FieldValue NetDroppedMeshMaterialOverrideField() { return { this, "ADroppedItem.NetDroppedMeshMaterialOverride" }; } + FieldValue NetDroppedMeshOverrideScale3DField() { return { this, "ADroppedItem.NetDroppedMeshOverrideScale3D" }; } + FieldValue MaxPickUpDistanceField() { return { this, "ADroppedItem.MaxPickUpDistance" }; } + FieldValue PrevLinearDampingField() { return { this, "ADroppedItem.PrevLinearDamping" }; } + FieldValue PrevAngularDampingField() { return { this, "ADroppedItem.PrevAngularDamping" }; } + FieldValue SpawnDropSoundTimeField() { return { this, "ADroppedItem.SpawnDropSoundTime" }; } + FieldValue PreviousLocationField() { return { this, "ADroppedItem.PreviousLocation" }; } + FieldValue> DroppedByActorField() { return { this, "ADroppedItem.DroppedByActor" }; } + FieldValue FreezePhysicsAfterTimeField() { return { this, "ADroppedItem.FreezePhysicsAfterTime" }; } + FieldValue DroppedLifeSpanOverrideField() { return { this, "ADroppedItem.DroppedLifeSpanOverride" }; } + + // Functions + + void Tick(float DeltaSeconds) { NativeCall(this, "ADroppedItem.Tick", DeltaSeconds); } + void Stasis() { NativeCall(this, "ADroppedItem.Stasis"); } + float GetDroppedItemLifeTime(bool bIgnoreTrueBlack, bool bUseGrayscale) { return NativeCall(this, "ADroppedItem.GetDroppedItemLifeTime", bIgnoreTrueBlack, bUseGrayscale); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "ADroppedItem.TryMultiUse", ForPC, UseIndex); } + void BeginPlay() { NativeCall(this, "ADroppedItem.BeginPlay"); } + void FreezePhysics() { NativeCall(this, "ADroppedItem.FreezePhysics"); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "ADroppedItem.DrawHUD", HUD); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "ADroppedItem.GetLifetimeReplicatedProps", OutLifetimeProps); } + void ForceSleep() { NativeCall(this, "ADroppedItem.ForceSleep"); } + void SetupVisuals() { NativeCall(this, "ADroppedItem.SetupVisuals"); } + void PreInitializeComponents() { NativeCall(this, "ADroppedItem.PreInitializeComponents"); } + static void StaticRegisterNativesADroppedItem() { NativeCall(nullptr, "ADroppedItem.StaticRegisterNativesADroppedItem"); } +}; + +struct AMatineeActor : AActor +{ + FieldValue MatineeControllerNameField() { return { this, "AMatineeActor.MatineeControllerName" }; } + FieldValue PlayRateField() { return { this, "AMatineeActor.PlayRate" }; } + FieldValue ForceStartPositionField() { return { this, "AMatineeActor.ForceStartPosition" }; } + FieldValue MatineeManagerPriorityField() { return { this, "AMatineeActor.MatineeManagerPriority" }; } + FieldValue PreferredSplitScreenNumField() { return { this, "AMatineeActor.PreferredSplitScreenNum" }; } + FieldValue InterpPositionField() { return { this, "AMatineeActor.InterpPosition" }; } + FieldValue ClientSidePositionErrorToleranceField() { return { this, "AMatineeActor.ClientSidePositionErrorTolerance" }; } + FieldValue ReplicationForceIsPlayingField() { return { this, "AMatineeActor.ReplicationForceIsPlaying" }; } + + // Functions + + void AddActorToGroup(FName GroupName, AActor * TheGroupActor) { NativeCall(this, "AMatineeActor.AddActorToGroup", GroupName, TheGroupActor); } + FName * GetFunctionNameForEvent(FName * result, FName EventName) { return NativeCall(this, "AMatineeActor.GetFunctionNameForEvent", result, EventName); } + void NotifyEventTriggered(FName EventName, float EventTime) { NativeCall(this, "AMatineeActor.NotifyEventTriggered", EventName, EventTime); } + void Play(float OverrideSetPosition, bool bOverridePositionJump) { NativeCall(this, "AMatineeActor.Play", OverrideSetPosition, bOverridePositionJump); } + void Reverse() { NativeCall(this, "AMatineeActor.Reverse"); } + void Stop() { NativeCall(this, "AMatineeActor.Stop"); } + void Pause() { NativeCall(this, "AMatineeActor.Pause"); } + void ChangePlaybackDirection() { NativeCall(this, "AMatineeActor.ChangePlaybackDirection"); } + void SetLoopingState(bool bNewLooping) { NativeCall(this, "AMatineeActor.SetLoopingState", bNewLooping); } + void SetPosition(float NewPosition, bool bJump, bool bForceJumpFromBeginningForEvents, bool bSkipMatineeUpdate) { NativeCall(this, "AMatineeActor.SetPosition", NewPosition, bJump, bForceJumpFromBeginningForEvents, bSkipMatineeUpdate); } + void AddPlayerToDirectorTracks(APlayerController * PC) { NativeCall(this, "AMatineeActor.AddPlayerToDirectorTracks", PC); } + void Tick(float DeltaTime) { NativeCall(this, "AMatineeActor.Tick", DeltaTime); } + void UpdateStreamingForCameraCuts(float CurrentTime, bool bPreview) { NativeCall(this, "AMatineeActor.UpdateStreamingForCameraCuts", CurrentTime, bPreview); } + void UpdateInterp(float NewPosition, bool bPreview, bool bJump, bool bSkipMatineeUpdate) { NativeCall(this, "AMatineeActor.UpdateInterp", NewPosition, bPreview, bJump, bSkipMatineeUpdate); } + void InitInterp() { NativeCall(this, "AMatineeActor.InitInterp"); } + void TermInterp() { NativeCall(this, "AMatineeActor.TermInterp"); } + void SetupCameraCuts() { NativeCall(this, "AMatineeActor.SetupCameraCuts"); } + bool IsMatineeCompatibleWithPlayer(APlayerController * InPC) { return NativeCall(this, "AMatineeActor.IsMatineeCompatibleWithPlayer", InPC); } + void StepInterp(float DeltaTime, bool bPreview) { NativeCall(this, "AMatineeActor.StepInterp", DeltaTime, bPreview); } + void EnableCinematicMode(bool bEnable) { NativeCall(this, "AMatineeActor.EnableCinematicMode", bEnable); } + void PostLoadSubobjects(FObjectInstancingGraph * OuterInstanceGraph) { NativeCall(this, "AMatineeActor.PostLoadSubobjects", OuterInstanceGraph); } + void UpdateReplicatedData(bool bIsBeginningPlay) { NativeCall(this, "AMatineeActor.UpdateReplicatedData", bIsBeginningPlay); } + void BeginPlay() { NativeCall(this, "AMatineeActor.BeginPlay"); } + void ApplyWorldOffset(FVector * InOffset, bool bWorldShift) { NativeCall(this, "AMatineeActor.ApplyWorldOffset", InOffset, bWorldShift); } + void CheckPriorityRefresh() { NativeCall(this, "AMatineeActor.CheckPriorityRefresh"); } + void PostInitializeComponents() { NativeCall(this, "AMatineeActor.PostInitializeComponents"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AMatineeActor.GetLifetimeReplicatedProps", OutLifetimeProps); } + void PreNetReceive() { NativeCall(this, "AMatineeActor.PreNetReceive"); } + void PostNetReceive() { NativeCall(this, "AMatineeActor.PostNetReceive"); } + void InitClientMatinee() { NativeCall(this, "AMatineeActor.InitClientMatinee"); } + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "AMatineeActor.GetPrivateStaticClass"); } +}; + +struct ABrush : AActor +{ + +}; + +struct AVolume : ABrush +{ + +}; + +struct ANPCZoneVolume : AVolume +{ + // Fields + /*unsigned __int32 bOnlyCountWaterDinos : 1; + unsigned __int32 bOnlyCountLandDinos : 1; + unsigned __int32 bCountTamedDinos : 1; + TArray, FDefaultAllocator> OnlyCountDinoClasses; + TArray, FDefaultAllocator> IgnoreDinoClasses; + TArray HibernatedEntities; + float HibernatedCountWeights; + TArray OverlappedDinos; + float CountWeights;*/ +}; + +struct ANPCZoneSpawnVolume : AVolume +{ +}; + +struct FLinkedZoneSpawnVolumeEntry +{ + ANPCZoneSpawnVolume * GetLinkedLinkedZoneSpawnVolumeField() const { return GetNativeField(this, "FLinkedZoneSpawnVolumeEntry.LinkedZoneSpawnVolume"); } + // Fields + /*ANPCZoneSpawnVolume *LinkedZoneSpawnVolume; + TArray ZoneSpawnVolumeFloors; + TArray ZoneSpawnVolumeFloorTags; + float EntryWeight;*/ +}; + +struct AInfo : AActor +{ + +}; + +struct AWorldSettings : AInfo +{ +}; + +struct APrimalWorldSettings : AWorldSettings +{ + TArray GetNPCRandomSpawnClassWeightsField() const { return GetNativeField>(this, "APrimalWorldSettings.NPCRandomSpawnClassWeights"); } +}; + +struct ANPCZoneManager : AInfo +{ + FieldValue> LinkedZoneSpawnVolumeEntriesField() { return { this, "ANPCZoneManager.LinkedZoneSpawnVolumeEntries" }; } + FieldValue> DefaultZoneSpawnVolumeFloorsField() { return { this, "ANPCZoneManager.DefaultZoneSpawnVolumeFloors" }; } + FieldValue> DefaultZoneSpawnVolumeFloorTagsField() { return { this, "ANPCZoneManager.DefaultZoneSpawnVolumeFloorTags" }; } + FieldValue> NPCSpawnEntriesContainerObjectField() { return { this, "ANPCZoneManager.NPCSpawnEntriesContainerObject" }; } + FieldValue bEnabledField() { return { this, "ANPCZoneManager.bEnabled" }; } + FieldValue bForceInEditorField() { return { this, "ANPCZoneManager.bForceInEditor" }; } + FieldValue bNeverSpawnInWaterField() { return { this, "ANPCZoneManager.bNeverSpawnInWater" }; } + FieldValue bOnlySpawnInWaterField() { return { this, "ANPCZoneManager.bOnlySpawnInWater" }; } + FieldValue bAllowExtentTestField() { return { this, "ANPCZoneManager.bAllowExtentTest" }; } + FieldValue bOnlyCheckMySublevelWaterField() { return { this, "ANPCZoneManager.bOnlyCheckMySublevelWater" }; } + FieldValue MinDesiredNumberOfNPCField() { return { this, "ANPCZoneManager.MinDesiredNumberOfNPC" }; } + FieldValue SP_MinDesiredNumberOfNPCField() { return { this, "ANPCZoneManager.SP_MinDesiredNumberOfNPC" }; } + FieldValue MaxNumberOfNPCField() { return { this, "ANPCZoneManager.MaxNumberOfNPC" }; } + FieldValue DesiredNumberOfNPCMultiplierField() { return { this, "ANPCZoneManager.DesiredNumberOfNPCMultiplier" }; } + FieldValue TheSpawnPointMinimumFloorNormalField() { return { this, "ANPCZoneManager.TheSpawnPointMinimumFloorNormal" }; } + FieldValue TheNewNewEditorNumberOfNPCMultiplierField() { return { this, "ANPCZoneManager.TheNewNewEditorNumberOfNPCMultiplier" }; } + FieldValue KillOffOverweightNPCStasisTimeField() { return { this, "ANPCZoneManager.KillOffOverweightNPCStasisTime" }; } + FieldValue TheMaximumWorldTimeForFullIncreaseField() { return { this, "ANPCZoneManager.TheMaximumWorldTimeForFullIncrease" }; } + FieldValue TheMinimumPlayerDistanceFromSpawnPointField() { return { this, "ANPCZoneManager.TheMinimumPlayerDistanceFromSpawnPoint" }; } + FieldValue TheIncreaseNPCIntervalField() { return { this, "ANPCZoneManager.TheIncreaseNPCInterval" }; } + FieldValue SP_TheIncreaseNPCIntervalField() { return { this, "ANPCZoneManager.SP_TheIncreaseNPCInterval" }; } + FieldValue TheIncreaseNPCIntervalMaxField() { return { this, "ANPCZoneManager.TheIncreaseNPCIntervalMax" }; } + FieldValue TheDecreaseNPCIntervalField() { return { this, "ANPCZoneManager.TheDecreaseNPCInterval" }; } + FieldValue NPCAIRangeMultiplierField() { return { this, "ANPCZoneManager.NPCAIRangeMultiplier" }; } + FieldValue bNPCDontWanderField() { return { this, "ANPCZoneManager.bNPCDontWander" }; } + FieldValue bNPCWildIgnoreWildField() { return { this, "ANPCZoneManager.bNPCWildIgnoreWild" }; } + FieldValue bNPCNoKillXPField() { return { this, "ANPCZoneManager.bNPCNoKillXP" }; } + FieldValue bNPCPreventSavingField() { return { this, "ANPCZoneManager.bNPCPreventSaving" }; } + FieldValue bForceUntameableField() { return { this, "ANPCZoneManager.bForceUntameable" }; } + FieldValue bUsesManualSpawningField() { return { this, "ANPCZoneManager.bUsesManualSpawning" }; } + FieldValue bIgnoreVolumeEcompassingCheckField() { return { this, "ANPCZoneManager.bIgnoreVolumeEcompassingCheck" }; } + FieldValue bSpawnAllNPCEntriesField() { return { this, "ANPCZoneManager.bSpawnAllNPCEntries" }; } + FieldValue bOnlyUseInSingleplayerField() { return { this, "ANPCZoneManager.bOnlyUseInSingleplayer" }; } + FieldValue bOnlyUseInDedicatedServerField() { return { this, "ANPCZoneManager.bOnlyUseInDedicatedServer" }; } + FieldValue NPCWanderRadiusMultiplierField() { return { this, "ANPCZoneManager.NPCWanderRadiusMultiplier" }; } + FieldValue MaxNumberSpawnZoneRandomPointChecksField() { return { this, "ANPCZoneManager.MaxNumberSpawnZoneRandomPointChecks" }; } + FieldValue TheNPCFullIncreaseMaximumIterationsField() { return { this, "ANPCZoneManager.TheNPCFullIncreaseMaximumIterations" }; } + FieldValue TheMinimumTamedDinoDistanceFromSpawnPointField() { return { this, "ANPCZoneManager.TheMinimumTamedDinoDistanceFromSpawnPoint" }; } + FieldValue TheMinimumStructureDistanceFromSpawnPointField() { return { this, "ANPCZoneManager.TheMinimumStructureDistanceFromSpawnPoint" }; } + FieldValue NPCLerpToMaxRandomBaseLevelField() { return { this, "ANPCZoneManager.NPCLerpToMaxRandomBaseLevel" }; } + FieldValue ManualSpawningNPCLerpToMaxRandomBaseLevelField() { return { this, "ANPCZoneManager.ManualSpawningNPCLerpToMaxRandomBaseLevel" }; } + FieldValue MaximumNumberNearbyCoreStructuresField() { return { this, "ANPCZoneManager.MaximumNumberNearbyCoreStructures" }; } + FieldValue AbsoluteMaximumNumberNearbyCoreStructuresField() { return { this, "ANPCZoneManager.AbsoluteMaximumNumberNearbyCoreStructures" }; } + FieldValue bAutoKillUseGlobalStasisArrayField() { return { this, "ANPCZoneManager.bAutoKillUseGlobalStasisArray" }; } + FieldValue bTraceForSpawnAgainstWaterField() { return { this, "ANPCZoneManager.bTraceForSpawnAgainstWater" }; } + FieldValue bNPCForcePreventExitingWaterField() { return { this, "ANPCZoneManager.bNPCForcePreventExitingWater" }; } + FieldValue bUseSpawnPointOverrideRotationField() { return { this, "ANPCZoneManager.bUseSpawnPointOverrideRotation" }; } + FieldValue NPCLevelMultiplierField() { return { this, "ANPCZoneManager.NPCLevelMultiplier" }; } + FieldValue ForceOverrideNPCBaseLevelField() { return { this, "ANPCZoneManager.ForceOverrideNPCBaseLevel" }; } + FieldValue> NPCSpawnEntriesField() { return { this, "ANPCZoneManager.NPCSpawnEntries" }; } + FieldValue> NPCSpawnLimitsField() { return { this, "ANPCZoneManager.NPCSpawnLimits" }; } + FieldValue UseDesiredNumberOfNPCField() { return { this, "ANPCZoneManager.UseDesiredNumberOfNPC" }; } + FieldValue NumNPCSpawnedField() { return { this, "ANPCZoneManager.NumNPCSpawned" }; } + FieldValue NumSpawnFailuresField() { return { this, "ANPCZoneManager.NumSpawnFailures" }; } + FieldValue LastIncreaseNPCTimeField() { return { this, "ANPCZoneManager.LastIncreaseNPCTime" }; } + FieldValue LastDecreaseNPCTimeField() { return { this, "ANPCZoneManager.LastDecreaseNPCTime" }; } + FieldValue bForceRespawnDinosField() { return { this, "ANPCZoneManager.bForceRespawnDinos" }; } + FieldValue bTriedFullIncreaseField() { return { this, "ANPCZoneManager.bTriedFullIncrease" }; } + FieldValue bSpawnsWaterDinosField() { return { this, "ANPCZoneManager.bSpawnsWaterDinos" }; } + FieldValue bSpawnsAmphibiousDinosField() { return { this, "ANPCZoneManager.bSpawnsAmphibiousDinos" }; } + FieldValue TheNextIncreaseNPCIntervalField() { return { this, "ANPCZoneManager.TheNextIncreaseNPCInterval" }; } + FieldValue CloseStructureDistanceFromSpawnPointField() { return { this, "ANPCZoneManager.CloseStructureDistanceFromSpawnPoint" }; } + FieldValue> SpawnPointOverridesField() { return { this, "ANPCZoneManager.SpawnPointOverrides" }; } + FieldValue NonDedicatedFreezeWildDinoPhysicsIfLevelUnloadedField() { return { this, "ANPCZoneManager.NonDedicatedFreezeWildDinoPhysicsIfLevelUnloaded" }; } + FieldValue> NonDedicatedFreezeWildDinoPhysicsIfLevelsUnloadedField() { return { this, "ANPCZoneManager.NonDedicatedFreezeWildDinoPhysicsIfLevelsUnloaded" }; } + FieldValue MinimumManualSpawnIntervalField() { return { this, "ANPCZoneManager.MinimumManualSpawnInterval" }; } + FieldValue LastManuallySpawnedTimeField() { return { this, "ANPCZoneManager.LastManuallySpawnedTime" }; } + FieldValue bIgnoreNPCRandomClassReplacementsField() { return { this, "ANPCZoneManager.bIgnoreNPCRandomClassReplacements" }; } + FieldValue TheNPCDynamicIncreaseMaximumIterationsField() { return { this, "ANPCZoneManager.TheNPCDynamicIncreaseMaximumIterations" }; } + + // Functions + + static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "ANPCZoneManager.GetPrivateStaticClass", 0, nullptr, nullptr); } + void BeginPlay() { NativeCall(this, "ANPCZoneManager.BeginPlay"); } + int GetNumberOfNPCTouching() { return NativeCall(this, "ANPCZoneManager.GetNumberOfNPCTouching"); } + int GetNumberOfClassNPCTouching(TSubclassOf ADinoClass) { return NativeCall>(this, "ANPCZoneManager.GetNumberOfClassNPCTouching", ADinoClass); } + void CheckDecreaseNPC() { NativeCall(this, "ANPCZoneManager.CheckDecreaseNPC"); } + void CheckIncreaseNPC() { NativeCall(this, "ANPCZoneManager.CheckIncreaseNPC"); } + bool SpawnNPCs() { return NativeCall(this, "ANPCZoneManager.SpawnNPCs"); } + bool IsValidNPCEntry(FNPCSpawnEntry * NPCEntry) { return NativeCall(this, "ANPCZoneManager.IsValidNPCEntry", NPCEntry); } + APrimalDinoCharacter * SpawnFromEntries(int SpawnVolumeEntry, TArray * spawnEntries, FVector * AtSpawnPoint, TArray * AllSpawnedNPCs, float OverrideYaw) { return NativeCall *, FVector *, TArray *, float>(this, "ANPCZoneManager.SpawnFromEntries", SpawnVolumeEntry, spawnEntries, AtSpawnPoint, AllSpawnedNPCs, OverrideYaw); } + int FindLinkedSpawnVolumeEntryContainingPoint(FVector AtPoint) { return NativeCall(this, "ANPCZoneManager.FindLinkedSpawnVolumeEntryContainingPoint", AtPoint); } + bool GetValidSpawnPoint(int volumeEntryIndex, FVector extentCheck, FVector * ValidSpawnPoint, FVector * OverrideStartPoint, float OverrideStartPointExpansionRadius, float WaterOnlySpawnMinimumWaterHeight, float MaximumWaterHeight, float SpawnMinDistanceFromStructuresMultiplier, float SpawnMinDistanceFromPlayersMultiplier, float SpawnMinDistanceFromTamedDinosMultiplier, float * OverrideYawOut) { return NativeCall(this, "ANPCZoneManager.GetValidSpawnPoint", volumeEntryIndex, extentCheck, ValidSpawnPoint, OverrideStartPoint, OverrideStartPointExpansionRadius, WaterOnlySpawnMinimumWaterHeight, MaximumWaterHeight, SpawnMinDistanceFromStructuresMultiplier, SpawnMinDistanceFromPlayersMultiplier, SpawnMinDistanceFromTamedDinosMultiplier, OverrideYawOut); } + APrimalDinoCharacter * SpawnNPC(TSubclassOf PawnTemplate, FVector SpawnLoc, bool bOverrideNPCLevel, int NPCLevelOffset, float NPCLevelMultiplier, bool bAddLevelOffsetBeforeMultiplier, float WaterOnlySpawnMinimumWaterHeight, float SpawnVolumeStartExtentZ, float OverrideYaw, float MaximumWaterHeight) { return NativeCall, FVector, bool, int, float, bool, float, float, float, float>(this, "ANPCZoneManager.SpawnNPC", PawnTemplate, SpawnLoc, bOverrideNPCLevel, NPCLevelOffset, NPCLevelMultiplier, bAddLevelOffsetBeforeMultiplier, WaterOnlySpawnMinimumWaterHeight, SpawnVolumeStartExtentZ, OverrideYaw, MaximumWaterHeight); } + APrimalDinoCharacter * GetBestNPCToAutoKill() { return NativeCall(this, "ANPCZoneManager.GetBestNPCToAutoKill"); } + void EndPlay(EEndPlayReason::Type EndPlayReason) { NativeCall(this, "ANPCZoneManager.EndPlay", EndPlayReason); } + static TArray * StaticSpawnNPCs(TArray * result, UObject * WorldContext, ANPCZoneManager * AtZoneManager, TSubclassOf TheNPCSpawnEntries, FVector AtSpawnPoint, FRotator AtRotation, int UseSpawnVolumeIndex) { return NativeCall *, TArray *, UObject *, ANPCZoneManager *, TSubclassOf, FVector, FRotator, int>(nullptr, "ANPCZoneManager.StaticSpawnNPCs", result, WorldContext, AtZoneManager, TheNPCSpawnEntries, AtSpawnPoint, AtRotation, UseSpawnVolumeIndex); } + static void StaticRegisterNativesANPCZoneManager() { NativeCall(nullptr, "ANPCZoneManager.StaticRegisterNativesANPCZoneManager"); } +}; + diff --git a/version/Core/Public/API/ARK/Ark.h b/version/Core/Public/API/ARK/Ark.h new file mode 100644 index 0000000..4a6a125 --- /dev/null +++ b/version/Core/Public/API/ARK/Ark.h @@ -0,0 +1,27 @@ +#pragma once + +#define _CRT_SECURE_NO_WARNINGS + +#include "../Base.h" + +#include "../UE/Math/Vector.h" +#include "../UE/Math/Rotator.h" +#include "../UE/NetSerialization.h" +#include "../Enums.h" +#include "../UE/UE.h" +#include "Inventory.h" +#include "GameMode.h" +#include "GameState.h" +#include "Other.h" +#include "Tribe.h" +#include "Actor.h" +#include "PrimalStructure.h" + +#include "IApiUtils.h" +#include "ICommands.h" +#include "IHooks.h" +#include "Tools.h" + +#define DECLARE_HOOK(name, returnType, ...) typedef returnType(__fastcall * name ## _Func)(__VA_ARGS__); \ +name ## _Func name ## _original; \ +returnType __fastcall Hook_ ## name(__VA_ARGS__) diff --git a/version/Core/Public/API/ARK/GameMode.h b/version/Core/Public/API/ARK/GameMode.h new file mode 100644 index 0000000..b276414 --- /dev/null +++ b/version/Core/Public/API/ARK/GameMode.h @@ -0,0 +1,1000 @@ +#pragma once + +#include "API/UE/UE.h" +#include "API/Enums.h" + +#include "API/UE/Containers/Map.h" + +struct UWorld : UObject +{ + struct InitializationValues + { + unsigned __int32 bInitializeScenes : 1; + unsigned __int32 bAllowAudioPlayback : 1; + unsigned __int32 bRequiresHitProxies : 1; + unsigned __int32 bCreatePhysicsScene : 1; + unsigned __int32 bCreateNavigation : 1; + unsigned __int32 bCreateAISystem : 1; + unsigned __int32 bShouldSimulatePhysics : 1; + unsigned __int32 bEnableTraceCollision : 1; + unsigned __int32 bTransactional : 1; + unsigned __int32 bCreateFXSystem : 1; + }; + + FieldValue>> ActorsClassesAllowedToSaveField() { return { this, "UWorld.ActorsClassesAllowedToSave" }; } + FieldValue bIsIdleField() { return { this, "UWorld.bIsIdle" }; } + FieldValue>> LocalStasisActorsField() { return { this, "UWorld.LocalStasisActors" }; } + FieldValue, FDefaultSetAllocator>> LevelNameHashField() { return { this, "UWorld.LevelNameHash" }; } + FieldValue PersistentLevelField() { return { this, "UWorld.PersistentLevel" }; } + FieldValue GameStateField() { return { this, "UWorld.GameState" }; } + FieldValue> ExtraReferencedObjectsField() { return { this, "UWorld.ExtraReferencedObjects" }; } + FieldValue StreamingLevelsPrefixField() { return { this, "UWorld.StreamingLevelsPrefix" }; } + FieldValue CurrentLevelPendingVisibilityField() { return { this, "UWorld.CurrentLevelPendingVisibility" }; } + FieldValue> ViewLocationsRenderedLastFrameField() { return { this, "UWorld.ViewLocationsRenderedLastFrame" }; } + FieldValue AuthorityGameModeField() { return { this, "UWorld.AuthorityGameMode" }; } + FieldValue> LevelsField() { return { this, "UWorld.Levels" }; } + FieldValue> NetworkActorsField() { return { this, "UWorld.NetworkActors" }; } + FieldValue CurrentLevelField() { return { this, "UWorld.CurrentLevel" }; } + FieldValue FrameCounterField() { return { this, "UWorld.FrameCounter" }; } + FieldValue GamePreviewField() { return { this, "UWorld.GamePreview" }; } + FieldValue>>, FDefaultSetAllocator, TDefaultMapKeyFuncs>>, 0> >> LocalInstancedStaticMeshComponentInstancesVisibilityStateField() { return { this, "UWorld.LocalInstancedStaticMeshComponentInstancesVisibilityState" }; } + FieldValue, FDefaultSetAllocator, TDefaultMapKeyFuncs, 0> >> PrioritizedObjectMapField() { return { this, "UWorld.PrioritizedObjectMap" }; } + FieldValue>> ControllerListField() { return { this, "UWorld.ControllerList" }; } + FieldValue>> PlayerControllerListField() { return { this, "UWorld.PlayerControllerList" }; } + FieldValue>> PawnListField() { return { this, "UWorld.PawnList" }; } + FieldValue, DefaultKeyFuncs, 0>, FDefaultSetAllocator>> ComponentsThatNeedEndOfFrameUpdateField() { return { this, "UWorld.ComponentsThatNeedEndOfFrameUpdate" }; } + FieldValue, DefaultKeyFuncs, 0>, FDefaultSetAllocator>> ComponentsThatNeedEndOfFrameUpdate_OnGameThreadField() { return { this, "UWorld.ComponentsThatNeedEndOfFrameUpdate_OnGameThread" }; } + FieldValue, TWeakObjectPtr, FDefaultSetAllocator, TDefaultMapKeyFuncs, TWeakObjectPtr, 0> >> BlueprintObjectsBeingDebuggedField() { return { this, "UWorld.BlueprintObjectsBeingDebugged" }; } + FieldValue bRequiresHitProxiesField() { return { this, "UWorld.bRequiresHitProxies" }; } + FieldValue BuildStreamingDataTimerField() { return { this, "UWorld.BuildStreamingDataTimer" }; } + FieldValue bInTickField() { return { this, "UWorld.bInTick" }; } + FieldValue bIsBuiltField() { return { this, "UWorld.bIsBuilt" }; } + FieldValue bTickNewlySpawnedField() { return { this, "UWorld.bTickNewlySpawned" }; } + FieldValue bPostTickComponentUpdateField() { return { this, "UWorld.bPostTickComponentUpdate" }; } + FieldValue PlayerNumField() { return { this, "UWorld.PlayerNum" }; } + FieldValue TimeSinceLastPendingKillPurgeField() { return { this, "UWorld.TimeSinceLastPendingKillPurge" }; } + FieldValue FullPurgeTriggeredField() { return { this, "UWorld.FullPurgeTriggered" }; } + FieldValue bShouldDelayGarbageCollectField() { return { this, "UWorld.bShouldDelayGarbageCollect" }; } + FieldValue bIsWorldInitializedField() { return { this, "UWorld.bIsWorldInitialized" }; } + FieldValue AllowLevelLoadOverrideField() { return { this, "UWorld.AllowLevelLoadOverride" }; } + FieldValue StreamingVolumeUpdateDelayField() { return { this, "UWorld.StreamingVolumeUpdateDelay" }; } + FieldValue bIsLevelStreamingFrozenField() { return { this, "UWorld.bIsLevelStreamingFrozen" }; } + FieldValue bShouldForceUnloadStreamingLevelsField() { return { this, "UWorld.bShouldForceUnloadStreamingLevels" }; } + FieldValue bShouldForceVisibleStreamingLevelsField() { return { this, "UWorld.bShouldForceVisibleStreamingLevels" }; } + FieldValue bDoDelayedUpdateCullDistanceVolumesField() { return { this, "UWorld.bDoDelayedUpdateCullDistanceVolumes" }; } + FieldValue> WorldTypeField() { return { this, "UWorld.WorldType" }; } + FieldValue bIsRunningConstructionScriptField() { return { this, "UWorld.bIsRunningConstructionScript" }; } + FieldValue bShouldSimulatePhysicsField() { return { this, "UWorld.bShouldSimulatePhysics" }; } + FieldValue DebugDrawTraceTagField() { return { this, "UWorld.DebugDrawTraceTag" }; } + FieldValue LastTimeUnbuiltLightingWasEncounteredField() { return { this, "UWorld.LastTimeUnbuiltLightingWasEncountered" }; } + FieldValue TimeSecondsField() { return { this, "UWorld.TimeSeconds" }; } + FieldValue LoadedAtTimeSecondsField() { return { this, "UWorld.LoadedAtTimeSeconds" }; } + FieldValue RealTimeSecondsField() { return { this, "UWorld.RealTimeSeconds" }; } + FieldValue AudioTimeSecondsField() { return { this, "UWorld.AudioTimeSeconds" }; } + FieldValue DeltaTimeSecondsField() { return { this, "UWorld.DeltaTimeSeconds" }; } + FieldValue PauseDelayField() { return { this, "UWorld.PauseDelay" }; } + FieldValue StasisThisFrameField() { return { this, "UWorld.StasisThisFrame" }; } + FieldValue UnStasisThisFrameField() { return { this, "UWorld.UnStasisThisFrame" }; } + FieldValue StasisOssilationThisFrameField() { return { this, "UWorld.StasisOssilationThisFrame" }; } + FieldValue StasisThisFrameMaxField() { return { this, "UWorld.StasisThisFrameMax" }; } + FieldValue UnStasisThisFrameMaxField() { return { this, "UWorld.UnStasisThisFrameMax" }; } + FieldValue StasisOssilationThisFrameMaxField() { return { this, "UWorld.StasisOssilationThisFrameMax" }; } + FieldValue StasisThisFrameAvgField() { return { this, "UWorld.StasisThisFrameAvg" }; } + FieldValue UnStasisThisFrameAvgField() { return { this, "UWorld.UnStasisThisFrameAvg" }; } + FieldValue StasisOssilationThisFrameAvgField() { return { this, "UWorld.StasisOssilationThisFrameAvg" }; } + FieldValue StasisMaxResetTimerField() { return { this, "UWorld.StasisMaxResetTimer" }; } + FieldValue LastUnstasisCountField() { return { this, "UWorld.LastUnstasisCount" }; } + FieldValue LoadedSaveIncrementorField() { return { this, "UWorld.LoadedSaveIncrementor" }; } + FieldValue CurrentSaveIncrementorField() { return { this, "UWorld.CurrentSaveIncrementor" }; } + FieldValue bBlockAllOnNextLevelStreamingProcessField() { return { this, "UWorld.bBlockAllOnNextLevelStreamingProcess" }; } + FieldValue OriginLocationField() { return { this, "UWorld.OriginLocation" }; } + FieldValue RequestedOriginLocationField() { return { this, "UWorld.RequestedOriginLocation" }; } + FieldValue bOriginOffsetThisFrameField() { return { this, "UWorld.bOriginOffsetThisFrame" }; } + FieldValue bFlushingLevelStreamingField() { return { this, "UWorld.bFlushingLevelStreaming" }; } + FieldValue ForceBlockLoadTimeoutField() { return { this, "UWorld.ForceBlockLoadTimeout" }; } + FieldValue NextURLField() { return { this, "UWorld.NextURL" }; } + FieldValue NextSwitchCountdownField() { return { this, "UWorld.NextSwitchCountdown" }; } + FieldValue> PreparingLevelNamesField() { return { this, "UWorld.PreparingLevelNames" }; } + FieldValue CommittedPersistentLevelNameField() { return { this, "UWorld.CommittedPersistentLevelName" }; } + FieldValue CurrentDayTimeField() { return { this, "UWorld.CurrentDayTime" }; } + FieldValue NumLightingUnbuiltObjectsField() { return { this, "UWorld.NumLightingUnbuiltObjects" }; } + + // Functions + + AActor * SpawnActor(UClass * Class, FVector * Location, FRotator * Rotation, FActorSpawnParameters * SpawnParameters) { return NativeCall(this, "UWorld.SpawnActor", Class, Location, Rotation, SpawnParameters); } + bool DestroyActor(AActor * ThisActor, bool bNetForce, bool bShouldModifyLevel) { return NativeCall(this, "UWorld.DestroyActor", ThisActor, bNetForce, bShouldModifyLevel); } + bool FindTeleportSpot(AActor * TestActor, FVector * TestLocation, FRotator TestRotation, FVector * TraceWorldGeometryFromLocation) { return NativeCall(this, "UWorld.FindTeleportSpot", TestActor, TestLocation, TestRotation, TraceWorldGeometryFromLocation); } + bool EncroachingBlockingGeometry(AActor * TestActor, FVector TestLocation, FRotator TestRotation, FVector * ProposedAdjustment, FVector * TraceWorldGeometryFromLocation) { return NativeCall(this, "UWorld.EncroachingBlockingGeometry", TestActor, TestLocation, TestRotation, ProposedAdjustment, TraceWorldGeometryFromLocation); } + void SetMapNeedsLightingFullyRebuilt(int InNumLightingUnbuiltObjects) { NativeCall(this, "UWorld.SetMapNeedsLightingFullyRebuilt", InNumLightingUnbuiltObjects); } + void TickNetClient(float DeltaSeconds) { NativeCall(this, "UWorld.TickNetClient", DeltaSeconds); } + bool IsPaused() { return NativeCall(this, "UWorld.IsPaused"); } + void ProcessLevelStreamingVolumes(FVector * OverrideViewLocation) { NativeCall(this, "UWorld.ProcessLevelStreamingVolumes", OverrideViewLocation); } + void MarkActorComponentForNeededEndOfFrameUpdate(UActorComponent * Component, bool bForceGameThread) { NativeCall(this, "UWorld.MarkActorComponentForNeededEndOfFrameUpdate", Component, bForceGameThread); } + void CleanupActors() { NativeCall(this, "UWorld.CleanupActors"); } + void UpdateAllReflectionCaptures() { NativeCall(this, "UWorld.UpdateAllReflectionCaptures"); } + void PostDuplicate(bool bDuplicateForPIE) { NativeCall(this, "UWorld.PostDuplicate", bDuplicateForPIE); } + void FinishDestroy() { NativeCall(this, "UWorld.FinishDestroy"); } + void PostLoad() { NativeCall(this, "UWorld.PostLoad"); } + bool PreSaveRoot(const wchar_t * Filename, TArray * AdditionalPackagesToCook) { return NativeCall *>(this, "UWorld.PreSaveRoot", Filename, AdditionalPackagesToCook); } + void PostSaveRoot(bool bCleanupIsRequired) { NativeCall(this, "UWorld.PostSaveRoot", bCleanupIsRequired); } + void SetupParameterCollectionInstances() { NativeCall(this, "UWorld.SetupParameterCollectionInstances"); } + void UpdateParameterCollectionInstances(bool bUpdateInstanceUniformBuffers) { NativeCall(this, "UWorld.UpdateParameterCollectionInstances", bUpdateInstanceUniformBuffers); } + void InitWorld(UWorld::InitializationValues IVS) { NativeCall(this, "UWorld.InitWorld", IVS); } + void InitializeNewWorld(UWorld::InitializationValues IVS) { NativeCall(this, "UWorld.InitializeNewWorld", IVS); } + void RemoveActor(AActor * Actor, bool bShouldModifyLevel) { NativeCall(this, "UWorld.RemoveActor", Actor, bShouldModifyLevel); } + bool AllowAudioPlayback() { return NativeCall(this, "UWorld.AllowAudioPlayback"); } + void ClearWorldComponents() { NativeCall(this, "UWorld.ClearWorldComponents"); } + void UpdateWorldComponents(bool bRerunConstructionScripts, bool bCurrentLevelOnly) { NativeCall(this, "UWorld.UpdateWorldComponents", bRerunConstructionScripts, bCurrentLevelOnly); } + void UpdateCullDistanceVolumes() { NativeCall(this, "UWorld.UpdateCullDistanceVolumes"); } + void EnsureCollisionTreeIsBuilt() { NativeCall(this, "UWorld.EnsureCollisionTreeIsBuilt"); } + void AddToWorld(ULevel * Level, FTransform * LevelTransform, bool bAlwaysConsiderTimeLimit) { NativeCall(this, "UWorld.AddToWorld", Level, LevelTransform, bAlwaysConsiderTimeLimit); } + void RemoveFromWorld(ULevel * Level) { NativeCall(this, "UWorld.RemoveFromWorld", Level); } + static FString * ConvertToPIEPackageName(FString * result, FString * PackageName, int PIEInstanceID) { return NativeCall(nullptr, "UWorld.ConvertToPIEPackageName", result, PackageName, PIEInstanceID); } + static FString * StripPIEPrefixFromPackageName(FString * result, FString * PrefixedName, FString * Prefix) { return NativeCall(nullptr, "UWorld.StripPIEPrefixFromPackageName", result, PrefixedName, Prefix); } + static UWorld * DuplicateWorldForPIE(FString * PackageName, UWorld * OwningWorld) { return NativeCall(nullptr, "UWorld.DuplicateWorldForPIE", PackageName, OwningWorld); } + bool AreAlwaysLoadedLevelsLoaded() { return NativeCall(this, "UWorld.AreAlwaysLoadedLevelsLoaded"); } + bool AllowLevelLoadRequests() { return NativeCall(this, "UWorld.AllowLevelLoadRequests"); } + void CleanupWorld(bool bSessionEnded, bool bCleanupResources, UWorld * NewWorld) { NativeCall(this, "UWorld.CleanupWorld", bSessionEnded, bCleanupResources, NewWorld); } + APlayerController * GetFirstPlayerController() { return NativeCall(this, "UWorld.GetFirstPlayerController"); } + ULocalPlayer * GetFirstLocalPlayerFromController() { return NativeCall(this, "UWorld.GetFirstLocalPlayerFromController"); } + void AddController(AController * Controller) { NativeCall(this, "UWorld.AddController", Controller); } + void RemoveController(AController * Controller) { NativeCall(this, "UWorld.RemoveController", Controller); } + void AddNetworkActor(AActor * Actor) { NativeCall(this, "UWorld.AddNetworkActor", Actor); } + void RemoveNetworkActor(AActor * Actor) { NativeCall(this, "UWorld.RemoveNetworkActor", Actor); } + AWorldSettings * GetWorldSettings(bool bCheckStreamingPesistent, bool bChecked) { return NativeCall(this, "UWorld.GetWorldSettings", bCheckStreamingPesistent, bChecked); } + float GetDefaultGravityZ() { return NativeCall(this, "UWorld.GetDefaultGravityZ"); } + FString * GetMapName(FString * result) { return NativeCall(this, "UWorld.GetMapName", result); } + void WelcomePlayer(UNetConnection * Connection) { NativeCall(this, "UWorld.WelcomePlayer", Connection); } + bool DestroySwappedPC(UNetConnection * Connection) { return NativeCall(this, "UWorld.DestroySwappedPC", Connection); } + bool IsPreparingMapChange() { return NativeCall(this, "UWorld.IsPreparingMapChange"); } + bool SetNewWorldOrigin(FIntVector InNewOriginLocation) { return NativeCall(this, "UWorld.SetNewWorldOrigin", InNewOriginLocation); } + void NavigateTo(FIntVector InLocation) { NativeCall(this, "UWorld.NavigateTo", InLocation); } + void GetMatineeActors(TArray * OutMatineeActors) { NativeCall *>(this, "UWorld.GetMatineeActors", OutMatineeActors); } + void SeamlessTravel(FString * SeamlessTravelURL, bool bAbsolute, FGuid MapPackageGuid) { NativeCall(this, "UWorld.SeamlessTravel", SeamlessTravelURL, bAbsolute, MapPackageGuid); } + bool IsInSeamlessTravel() { return NativeCall(this, "UWorld.IsInSeamlessTravel"); } + void UpdateConstraintActors() { NativeCall(this, "UWorld.UpdateConstraintActors"); } + int GetActorCount() { return NativeCall(this, "UWorld.GetActorCount"); } + int GetNetRelevantActorCount() { return NativeCall(this, "UWorld.GetNetRelevantActorCount"); } + bool ContainsLevel(ULevel * InLevel) { return NativeCall(this, "UWorld.ContainsLevel", InLevel); } + void BroadcastLevelsChanged() { NativeCall(this, "UWorld.BroadcastLevelsChanged"); } + bool IsLevelLoadedByName(FName * LevelName) { return NativeCall(this, "UWorld.IsLevelLoadedByName", LevelName); } + FString * GetLocalURL(FString * result) { return NativeCall(this, "UWorld.GetLocalURL", result); } + FString * GetAddressURL(FString * result) { return NativeCall(this, "UWorld.GetAddressURL", result); } + static FString * RemovePIEPrefix(FString * result, FString * Source) { return NativeCall(nullptr, "UWorld.RemovePIEPrefix", result, Source); } + void ServerTravel(FString * FURL, bool bAbsolute, bool bShouldSkipGameNotify) { NativeCall(this, "UWorld.ServerTravel", FURL, bAbsolute, bShouldSkipGameNotify); } + UClass * GetModPrioritizedClass(FName * NameIn) { return NativeCall(this, "UWorld.GetModPrioritizedClass", NameIn); } + bool LoadFromFile(FString * filename) { return NativeCall(this, "UWorld.LoadFromFile", filename); } + void UpdateMemoryState(FName PackageName, bool bSave, ULevel * Level) { NativeCall(this, "UWorld.UpdateMemoryState", PackageName, bSave, Level); } + void AddToInternalOctree(UPrimitiveComponent * InComponent) { NativeCall(this, "UWorld.AddToInternalOctree", InComponent); } + void RemoveFromInternalOctree(UPrimitiveComponent * InComponent) { NativeCall(this, "UWorld.RemoveFromInternalOctree", InComponent); } + bool LineTraceSingle(FHitResult * OutHit, FVector * Start, FVector * End, FCollisionQueryParams * Params, FCollisionObjectQueryParams * ObjectQueryParams) { return NativeCall(this, "UWorld.LineTraceSingle", OutHit, Start, End, Params, ObjectQueryParams); } + void StartAsyncTrace() { NativeCall(this, "UWorld.StartAsyncTrace"); } + void FinishAsyncTrace() { NativeCall(this, "UWorld.FinishAsyncTrace"); } + void FinishPhysicsSim() { NativeCall(this, "UWorld.FinishPhysicsSim"); } + static void StaticRegisterNativesUWorld() { NativeCall(nullptr, "UWorld.StaticRegisterNativesUWorld"); } +}; + +// Level + +struct ULevelBase +{ + //TTransArray GetActorsField() const { return GetNativeField>(this, "ULevelBase.Actors"); } +}; + +struct ULevel : ULevelBase +{ +}; + +// Game Mode + +struct AGameMode +{ + FieldValue MatchStateField() { return { this, "AGameMode.MatchState" }; } + FieldValue OptionsStringField() { return { this, "AGameMode.OptionsString" }; } + FieldValue> DefaultPawnClassField() { return { this, "AGameMode.DefaultPawnClass" }; } + FieldValue> HUDClassField() { return { this, "AGameMode.HUDClass" }; } + FieldValue NumSpectatorsField() { return { this, "AGameMode.NumSpectators" }; } + FieldValue NumPlayersField() { return { this, "AGameMode.NumPlayers" }; } + FieldValue NumBotsField() { return { this, "AGameMode.NumBots" }; } + FieldValue MinRespawnDelayField() { return { this, "AGameMode.MinRespawnDelay" }; } + FieldValue GameSessionField() { return { this, "AGameMode.GameSession" }; } + FieldValue NumTravellingPlayersField() { return { this, "AGameMode.NumTravellingPlayers" }; } + FieldValue CurrentIDField() { return { this, "AGameMode.CurrentID" }; } + FieldValue DefaultPlayerNameField() { return { this, "AGameMode.DefaultPlayerName" }; } + FieldValue> PlayerStartsField() { return { this, "AGameMode.PlayerStarts" }; } + FieldValue> PlayerControllerClassField() { return { this, "AGameMode.PlayerControllerClass" }; } + FieldValue> SpectatorClassField() { return { this, "AGameMode.SpectatorClass" }; } + FieldValue> PlayerStateClassField() { return { this, "AGameMode.PlayerStateClass" }; } + FieldValue> GameStateClassField() { return { this, "AGameMode.GameStateClass" }; } + FieldValue GameStateField() { return { this, "AGameMode.GameState" }; } + FieldValue> InactivePlayerArrayField() { return { this, "AGameMode.InactivePlayerArray" }; } + FieldValue AntiDupeTransactionLogField() { return { this, "AGameMode.AntiDupeTransactionLog" }; } + FieldValue InactivePlayerStateLifeSpanField() { return { this, "AGameMode.InactivePlayerStateLifeSpan" }; } + FieldValue> UsedPlayerStartsField() { return { this, "AGameMode.UsedPlayerStarts" }; } + + // Functions + + FString * GetNetworkNumber(FString * result) { return NativeCall(this, "AGameMode.GetNetworkNumber", result); } + void SwapPlayerControllers(APlayerController * OldPC, APlayerController * NewPC) { NativeCall(this, "AGameMode.SwapPlayerControllers", OldPC, NewPC); } + void ForceClearUnpauseDelegates(AActor * PauseActor) { NativeCall(this, "AGameMode.ForceClearUnpauseDelegates", PauseActor); } + void InitGame(FString * MapName, FString * Options, FString * ErrorMessage) { NativeCall(this, "AGameMode.InitGame", MapName, Options, ErrorMessage); } + void RestartGame() { NativeCall(this, "AGameMode.RestartGame"); } + void ReturnToMainMenuHost() { NativeCall(this, "AGameMode.ReturnToMainMenuHost"); } + void PostLogin(APlayerController * NewPlayer) { NativeCall(this, "AGameMode.PostLogin", NewPlayer); } + bool ShouldStartInCinematicMode(bool * OutHidePlayer, bool * OutHideHUD, bool * OutDisableMovement, bool * OutDisableTurning) { return NativeCall(this, "AGameMode.ShouldStartInCinematicMode", OutHidePlayer, OutHideHUD, OutDisableMovement, OutDisableTurning); } + void SetPlayerDefaults(APawn * PlayerPawn) { NativeCall(this, "AGameMode.SetPlayerDefaults", PlayerPawn); } + void Logout(AController * Exiting) { NativeCall(this, "AGameMode.Logout", Exiting); } + void InitGameState() { NativeCall(this, "AGameMode.InitGameState"); } + AActor * FindPlayerStart(AController * Player, FString * IncomingName) { return NativeCall(this, "AGameMode.FindPlayerStart", Player, IncomingName); } + void PreInitializeComponents() { NativeCall(this, "AGameMode.PreInitializeComponents"); } + void RestartPlayer(AController * NewPlayer) { NativeCall(this, "AGameMode.RestartPlayer", NewPlayer); } + void StartPlay() { NativeCall(this, "AGameMode.StartPlay"); } + void HandleMatchIsWaitingToStart() { NativeCall(this, "AGameMode.HandleMatchIsWaitingToStart"); } + bool ReadyToStartMatch() { return NativeCall(this, "AGameMode.ReadyToStartMatch"); } + void StartMatch() { NativeCall(this, "AGameMode.StartMatch"); } + void HandleMatchHasStarted() { NativeCall(this, "AGameMode.HandleMatchHasStarted"); } + void EndMatch() { NativeCall(this, "AGameMode.EndMatch"); } + void HandleMatchHasEnded() { NativeCall(this, "AGameMode.HandleMatchHasEnded"); } + void StartToLeaveMap() { NativeCall(this, "AGameMode.StartToLeaveMap"); } + void AbortMatch() { NativeCall(this, "AGameMode.AbortMatch"); } + bool HasMatchStarted() { return NativeCall(this, "AGameMode.HasMatchStarted"); } + bool IsMatchInProgress() { return NativeCall(this, "AGameMode.IsMatchInProgress"); } + bool HasMatchEnded() { return NativeCall(this, "AGameMode.HasMatchEnded"); } + void SetMatchState(FName NewState) { NativeCall(this, "AGameMode.SetMatchState", NewState); } + void Tick(float DeltaSeconds) { NativeCall(this, "AGameMode.Tick", DeltaSeconds); } + void ResetLevel() { NativeCall(this, "AGameMode.ResetLevel"); } + void HandleSeamlessTravelPlayer(AController ** C) { NativeCall(this, "AGameMode.HandleSeamlessTravelPlayer", C); } + void SetSeamlessTravelViewTarget(APlayerController * PC) { NativeCall(this, "AGameMode.SetSeamlessTravelViewTarget", PC); } + void ProcessServerTravel(FString * URL, bool bAbsolute) { NativeCall(this, "AGameMode.ProcessServerTravel", URL, bAbsolute); } + void GetSeamlessTravelActorList(bool bToEntry, TArray * ActorList) { NativeCall *>(this, "AGameMode.GetSeamlessTravelActorList", bToEntry, ActorList); } + void SetBandwidthLimit(float AsyncIOBandwidthLimit) { NativeCall(this, "AGameMode.SetBandwidthLimit", AsyncIOBandwidthLimit); } + FString * InitNewPlayer(FString * result, APlayerController * NewPlayerController, TSharedPtr * UniqueId, FString * Options, FString * Portal) { return NativeCall *, FString *, FString *>(this, "AGameMode.InitNewPlayer", result, NewPlayerController, UniqueId, Options, Portal); } + bool MustSpectate(APlayerController * NewPlayerController) { return NativeCall(this, "AGameMode.MustSpectate", NewPlayerController); } + APlayerController * Login(UPlayer * NewPlayer, FString * Portal, FString * Options, TSharedPtr * UniqueId, FString * ErrorMessage) { return NativeCall *, FString *>(this, "AGameMode.Login", NewPlayer, Portal, Options, UniqueId, ErrorMessage); } + void Reset() { NativeCall(this, "AGameMode.Reset"); } + void RemovePlayerControllerFromPlayerCount(APlayerController * PC) { NativeCall(this, "AGameMode.RemovePlayerControllerFromPlayerCount", PC); } + int GetNumPlayers() { return NativeCall(this, "AGameMode.GetNumPlayers"); } + void ClearPause() { NativeCall(this, "AGameMode.ClearPause"); } + bool GrabOption(FString * Options, FString * Result) { return NativeCall(this, "AGameMode.GrabOption", Options, Result); } + void GetKeyValue(FString * Pair, FString * Key, FString * Value) { NativeCall(this, "AGameMode.GetKeyValue", Pair, Key, Value); } + FString * ParseOption(FString * result, FString * Options, FString * InKey) { return NativeCall(this, "AGameMode.ParseOption", result, Options, InKey); } + bool HasOption(FString * Options, FString * InKey) { return NativeCall(this, "AGameMode.HasOption", Options, InKey); } + FString * GetDefaultGameClassPath(FString * result, FString * MapName, FString * Options, FString * Portal) { return NativeCall(this, "AGameMode.GetDefaultGameClassPath", result, MapName, Options, Portal); } + TSubclassOf * GetGameSessionClass(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "AGameMode.GetGameSessionClass", result); } + APlayerController * ProcessClientTravel(FString * FURL, FGuid NextMapGuid, bool bSeamless, bool bAbsolute) { return NativeCall(this, "AGameMode.ProcessClientTravel", FURL, NextMapGuid, bSeamless, bAbsolute); } + void PreLogin(FString * Options, FString * Address, TSharedPtr * UniqueId, FString * authToken, FString * ErrorMessage) { NativeCall *, FString *, FString *>(this, "AGameMode.PreLogin", Options, Address, UniqueId, authToken, ErrorMessage); } + void RemoveConnectedPlayer(TSharedPtr * UniqueNetId) { NativeCall *>(this, "AGameMode.RemoveConnectedPlayer", UniqueNetId); } + APlayerController * SpawnPlayerController(FVector * SpawnLocation, FRotator * SpawnRotation) { return NativeCall(this, "AGameMode.SpawnPlayerController", SpawnLocation, SpawnRotation); } + TSubclassOf * GetDefaultPawnClassForController_Implementation(TSubclassOf * result, AController * InController) { return NativeCall *, TSubclassOf *, AController *>(this, "AGameMode.GetDefaultPawnClassForController_Implementation", result, InController); } + APawn * SpawnDefaultPawnFor(AController * NewPlayer, AActor * StartSpot) { return NativeCall(this, "AGameMode.SpawnDefaultPawnFor", NewPlayer, StartSpot); } + void GenericPlayerInitialization(AController * C) { NativeCall(this, "AGameMode.GenericPlayerInitialization", C); } + void StartNewPlayer(APlayerController * NewPlayer) { NativeCall(this, "AGameMode.StartNewPlayer", NewPlayer); } + void ChangeName(AController * Other, FString * S, bool bNameChange) { NativeCall(this, "AGameMode.ChangeName", Other, S, bNameChange); } + void SendPlayer(APlayerController * aPlayer, FString * FURL) { NativeCall(this, "AGameMode.SendPlayer", aPlayer, FURL); } + void Broadcast(AActor * Sender, FString * Msg, FName Type) { NativeCall(this, "AGameMode.Broadcast", Sender, Msg, Type); } + bool ShouldSpawnAtStartSpot_Implementation(AController * Player) { return NativeCall(this, "AGameMode.ShouldSpawnAtStartSpot_Implementation", Player); } + void AddPlayerStart(APlayerStart * NewPlayerStart) { NativeCall(this, "AGameMode.AddPlayerStart", NewPlayerStart); } + void RemovePlayerStart(APlayerStart * RemovedPlayerStart) { NativeCall(this, "AGameMode.RemovePlayerStart", RemovedPlayerStart); } + AActor * ChoosePlayerStart_Implementation(AController * Player) { return NativeCall(this, "AGameMode.ChoosePlayerStart_Implementation", Player); } + bool PlayerCanRestart(APlayerController * Player) { return NativeCall(this, "AGameMode.PlayerCanRestart", Player); } + void UpdateGameplayMuteList(APlayerController * aPlayer) { NativeCall(this, "AGameMode.UpdateGameplayMuteList", aPlayer); } + bool AllowCheats(APlayerController * P) { return NativeCall(this, "AGameMode.AllowCheats", P); } + bool AllowPausing(APlayerController * PC) { return NativeCall(this, "AGameMode.AllowPausing", PC); } + void AddInactivePlayer(APlayerState * PlayerState, APlayerController * PC) { NativeCall(this, "AGameMode.AddInactivePlayer", PlayerState, PC); } + bool FindInactivePlayer(APlayerController * PC) { return NativeCall(this, "AGameMode.FindInactivePlayer", PC); } + void OverridePlayerState(APlayerController * PC, APlayerState * OldPlayerState) { NativeCall(this, "AGameMode.OverridePlayerState", PC, OldPlayerState); } + void PostSeamlessTravel() { NativeCall(this, "AGameMode.PostSeamlessTravel"); } + static FString * StaticGetFullGameClassName(FString * result, FString * Str) { return NativeCall(nullptr, "AGameMode.StaticGetFullGameClassName", result, Str); } + static void StaticRegisterNativesAGameMode() { NativeCall(nullptr, "AGameMode.StaticRegisterNativesAGameMode"); } + AActor * ChoosePlayerStart(AController * Player) { return NativeCall(this, "AGameMode.ChoosePlayerStart", Player); } + void K2_PostLogin(APlayerController * NewPlayer) { NativeCall(this, "AGameMode.K2_PostLogin", NewPlayer); } +}; + +struct AShooterGameMode : AGameMode +{ + FieldValue LastRepopulationIndexToCheckField() { return { this, "AShooterGameMode.LastRepopulationIndexToCheck" }; } + FieldValue AlarmNotificationKeyField() { return { this, "AShooterGameMode.AlarmNotificationKey" }; } + FieldValue AlarmNotificationURLField() { return { this, "AShooterGameMode.AlarmNotificationURL" }; } + FieldValue BanFileNameField() { return { this, "AShooterGameMode.BanFileName" }; } + FieldValue >> BannedMapField() { return { this, "AShooterGameMode.BannedMap" }; } + FieldValue LastTimeCheckedForSaveBackupField() { return { this, "AShooterGameMode.LastTimeCheckedForSaveBackup" }; } + FieldValue LastDayOfYearBackedUpField() { return { this, "AShooterGameMode.LastDayOfYearBackedUp" }; } + FieldValue TimeLastStartedDoingRemoteBackupField() { return { this, "AShooterGameMode.TimeLastStartedDoingRemoteBackup" }; } + FieldValue InitiatedArkTributeAvailabilityCheckField() { return { this, "AShooterGameMode.InitiatedArkTributeAvailabilityCheck" }; } + FieldValue RCONSocketField() { return { this, "AShooterGameMode.RCONSocket" }; } + FieldValue PlayersJoinNoCheckFilenameField() { return { this, "AShooterGameMode.PlayersJoinNoCheckFilename" }; } + FieldValue PlayersExclusiveCheckFilenameField() { return { this, "AShooterGameMode.PlayersExclusiveCheckFilename" }; } + FieldValue TerrainGeneratorVersionField() { return { this, "AShooterGameMode.TerrainGeneratorVersion" }; } + FieldValue> PlayersJoinNoCheckField() { return { this, "AShooterGameMode.PlayersJoinNoCheck" }; } + FieldValue> PlayersExclusiveListField() { return { this, "AShooterGameMode.PlayersExclusiveList" }; } + FieldValue GameBackupPipeReadField() { return { this, "AShooterGameMode.GameBackupPipeRead" }; } + FieldValue GameBackupPipeWriteField() { return { this, "AShooterGameMode.GameBackupPipeWrite" }; } + FieldValue, FDefaultSetAllocator>> TribesIdsField() { return { this, "AShooterGameMode.TribesIds" }; } + FieldValue >> PlayersIdsField() { return { this, "AShooterGameMode.PlayersIds" }; } + FieldValue >> SteamIdsField() { return { this, "AShooterGameMode.SteamIds" }; } + FieldValue LaunchOptionsField() { return { this, "AShooterGameMode.LaunchOptions" }; } + FieldValue> TribesDataField() { return { this, "AShooterGameMode.TribesData" }; } + FieldValue PGMapNameField() { return { this, "AShooterGameMode.PGMapName" }; } + FieldValue PGTerrainPropertiesStringField() { return { this, "AShooterGameMode.PGTerrainPropertiesString" }; } + FieldValue bAutoCreateNewPlayerDataField() { return { this, "AShooterGameMode.bAutoCreateNewPlayerData" }; } + FieldValue bIsRestartingField() { return { this, "AShooterGameMode.bIsRestarting" }; } + FieldValue bProximityVoiceChatField() { return { this, "AShooterGameMode.bProximityVoiceChat" }; } + FieldValue bProximityChatField() { return { this, "AShooterGameMode.bProximityChat" }; } + FieldValue bAutoRestoreBackupsField() { return { this, "AShooterGameMode.bAutoRestoreBackups" }; } + FieldValue DifficultyValueField() { return { this, "AShooterGameMode.DifficultyValue" }; } + FieldValue DifficultyValueMinField() { return { this, "AShooterGameMode.DifficultyValueMin" }; } + FieldValue DifficultyValueMaxField() { return { this, "AShooterGameMode.DifficultyValueMax" }; } + FieldValue ProximityRadiusField() { return { this, "AShooterGameMode.ProximityRadius" }; } + FieldValue ProximityRadiusUnconsiousScaleField() { return { this, "AShooterGameMode.ProximityRadiusUnconsiousScale" }; } + FieldValue> CheatClassField() { return { this, "AShooterGameMode.CheatClass" }; } + FieldValue bIsOfficialServerField() { return { this, "AShooterGameMode.bIsOfficialServer" }; } + FieldValue bServerAllowArkDownloadField() { return { this, "AShooterGameMode.bServerAllowArkDownload" }; } + FieldValue bServerAllowThirdPersonPlayerField() { return { this, "AShooterGameMode.bServerAllowThirdPersonPlayer" }; } + FieldValue bUseExclusiveListField() { return { this, "AShooterGameMode.bUseExclusiveList" }; } + FieldValue bAlwaysNotifyPlayerLeftField() { return { this, "AShooterGameMode.bAlwaysNotifyPlayerLeft" }; } + FieldValue bAlwaysNotifyPlayerJoinedField() { return { this, "AShooterGameMode.bAlwaysNotifyPlayerJoined" }; } + FieldValue bServerHardcoreField() { return { this, "AShooterGameMode.bServerHardcore" }; } + FieldValue bServerPVEField() { return { this, "AShooterGameMode.bServerPVE" }; } + FieldValue bServerCrosshairField() { return { this, "AShooterGameMode.bServerCrosshair" }; } + FieldValue bServerForceNoHUDField() { return { this, "AShooterGameMode.bServerForceNoHUD" }; } + FieldValue bMapPlayerLocationField() { return { this, "AShooterGameMode.bMapPlayerLocation" }; } + FieldValue bAllowFlyerCarryPvEField() { return { this, "AShooterGameMode.bAllowFlyerCarryPvE" }; } + FieldValue bDisableStructureDecayPvEField() { return { this, "AShooterGameMode.bDisableStructureDecayPvE" }; } + FieldValue bDisableDinoDecayPvEField() { return { this, "AShooterGameMode.bDisableDinoDecayPvE" }; } + FieldValue bEnablePvPGammaField() { return { this, "AShooterGameMode.bEnablePvPGamma" }; } + FieldValue bDisablePvEGammaField() { return { this, "AShooterGameMode.bDisablePvEGamma" }; } + FieldValue bClampResourceHarvestDamageField() { return { this, "AShooterGameMode.bClampResourceHarvestDamage" }; } + FieldValue bPreventStructurePaintingField() { return { this, "AShooterGameMode.bPreventStructurePainting" }; } + FieldValue bAllowCaveBuildingPvEField() { return { this, "AShooterGameMode.bAllowCaveBuildingPvE" }; } + FieldValue bAdminLoggingField() { return { this, "AShooterGameMode.bAdminLogging" }; } + FieldValue bPvPStructureDecayField() { return { this, "AShooterGameMode.bPvPStructureDecay" }; } + FieldValue bAutoDestroyStructuresField() { return { this, "AShooterGameMode.bAutoDestroyStructures" }; } + FieldValue bForceAllStructureLockingField() { return { this, "AShooterGameMode.bForceAllStructureLocking" }; } + FieldValue bAllowDeprecatedStructuresField() { return { this, "AShooterGameMode.bAllowDeprecatedStructures" }; } + FieldValue bPreventTribeAlliancesField() { return { this, "AShooterGameMode.bPreventTribeAlliances" }; } + FieldValue bAllowHitMarkersField() { return { this, "AShooterGameMode.bAllowHitMarkers" }; } + FieldValue bOnlyAutoDestroyCoreStructuresField() { return { this, "AShooterGameMode.bOnlyAutoDestroyCoreStructures" }; } + FieldValue bPreventMateBoostField() { return { this, "AShooterGameMode.bPreventMateBoost" }; } + FieldValue bTribeLogDestroyedEnemyStructuresField() { return { this, "AShooterGameMode.bTribeLogDestroyedEnemyStructures" }; } + FieldValue bPvEAllowStructuresAtSupplyDropsField() { return { this, "AShooterGameMode.bPvEAllowStructuresAtSupplyDrops" }; } + FieldValue bServerGameLogIncludeTribeLogsField() { return { this, "AShooterGameMode.bServerGameLogIncludeTribeLogs" }; } + FieldValue bServerRCONOutputTribeLogsField() { return { this, "AShooterGameMode.bServerRCONOutputTribeLogs" }; } + FieldValue bUseOptimizedHarvestingHealthField() { return { this, "AShooterGameMode.bUseOptimizedHarvestingHealth" }; } + FieldValue bClampItemSpoilingTimesField() { return { this, "AShooterGameMode.bClampItemSpoilingTimes" }; } + FieldValue bClampItemStatsField() { return { this, "AShooterGameMode.bClampItemStats" }; } + FieldValue bAutoDestroyDecayedDinosField() { return { this, "AShooterGameMode.bAutoDestroyDecayedDinos" }; } + FieldValue bAllowMultipleAttachedC4Field() { return { this, "AShooterGameMode.bAllowMultipleAttachedC4" }; } + FieldValue bAllowFlyingStaminaRecoveryField() { return { this, "AShooterGameMode.bAllowFlyingStaminaRecovery" }; } + FieldValue bCrossARKAllowForeignDinoDownloadsField() { return { this, "AShooterGameMode.bCrossARKAllowForeignDinoDownloads" }; } + FieldValue bPreventSpawnAnimationsField() { return { this, "AShooterGameMode.bPreventSpawnAnimations" }; } + FieldValue bIsLegacyServerField() { return { this, "AShooterGameMode.bIsLegacyServer" }; } + FieldValue bIdlePlayerKickAllowedField() { return { this, "AShooterGameMode.bIdlePlayerKickAllowed" }; } + FieldValue TheMaxStructuresInRangeField() { return { this, "AShooterGameMode.TheMaxStructuresInRange" }; } + FieldValue MaxStructuresInSmallRadiusField() { return { this, "AShooterGameMode.MaxStructuresInSmallRadius" }; } + FieldValue RCONPortField() { return { this, "AShooterGameMode.RCONPort" }; } + FieldValue DayCycleSpeedScaleField() { return { this, "AShooterGameMode.DayCycleSpeedScale" }; } + FieldValue NightTimeSpeedScaleField() { return { this, "AShooterGameMode.NightTimeSpeedScale" }; } + FieldValue DayTimeSpeedScaleField() { return { this, "AShooterGameMode.DayTimeSpeedScale" }; } + FieldValue PvEStructureDecayPeriodMultiplierField() { return { this, "AShooterGameMode.PvEStructureDecayPeriodMultiplier" }; } + FieldValue StructurePreventResourceRadiusMultiplierField() { return { this, "AShooterGameMode.StructurePreventResourceRadiusMultiplier" }; } + FieldValue PvEDinoDecayPeriodMultiplierField() { return { this, "AShooterGameMode.PvEDinoDecayPeriodMultiplier" }; } + FieldValue ResourcesRespawnPeriodMultiplierField() { return { this, "AShooterGameMode.ResourcesRespawnPeriodMultiplier" }; } + FieldValue MaxTamedDinosField() { return { this, "AShooterGameMode.MaxTamedDinos" }; } + FieldValue ListenServerTetherDistanceMultiplierField() { return { this, "AShooterGameMode.ListenServerTetherDistanceMultiplier" }; } + FieldValue PerPlatformMaxStructuresMultiplierField() { return { this, "AShooterGameMode.PerPlatformMaxStructuresMultiplier" }; } + FieldValue AutoDestroyOldStructuresMultiplierField() { return { this, "AShooterGameMode.AutoDestroyOldStructuresMultiplier" }; } + FieldValue RCONServerGameLogBufferField() { return { this, "AShooterGameMode.RCONServerGameLogBuffer" }; } + FieldValue OxygenSwimSpeedStatMultiplierField() { return { this, "AShooterGameMode.OxygenSwimSpeedStatMultiplier" }; } + FieldValue ServerAutoForceRespawnWildDinosIntervalField() { return { this, "AShooterGameMode.ServerAutoForceRespawnWildDinosInterval" }; } + FieldValue RadiusStructuresInSmallRadiusField() { return { this, "AShooterGameMode.RadiusStructuresInSmallRadius" }; } + FieldValue EnableAFKKickPlayerCountPercentField() { return { this, "AShooterGameMode.EnableAFKKickPlayerCountPercent" }; } + FieldValue KickIdlePlayersPeriodField() { return { this, "AShooterGameMode.KickIdlePlayersPeriod" }; } + FieldValue MateBoostEffectMultiplierField() { return { this, "AShooterGameMode.MateBoostEffectMultiplier" }; } + FieldValue AutoSavePeriodMinutesField() { return { this, "AShooterGameMode.AutoSavePeriodMinutes" }; } + FieldValue XPMultiplierField() { return { this, "AShooterGameMode.XPMultiplier" }; } + FieldValue KillXPMultiplierField() { return { this, "AShooterGameMode.KillXPMultiplier" }; } + FieldValue HarvestXPMultiplierField() { return { this, "AShooterGameMode.HarvestXPMultiplier" }; } + FieldValue CraftXPMultiplierField() { return { this, "AShooterGameMode.CraftXPMultiplier" }; } + FieldValue GenericXPMultiplierField() { return { this, "AShooterGameMode.GenericXPMultiplier" }; } + FieldValue SpecialXPMultiplierField() { return { this, "AShooterGameMode.SpecialXPMultiplier" }; } + FieldValue RandomAutoSaveSpreadField() { return { this, "AShooterGameMode.RandomAutoSaveSpread" }; } + FieldValue SteamAPIKeyField() { return { this, "AShooterGameMode.SteamAPIKey" }; } + FieldValue LastServerNotificationMessageField() { return { this, "AShooterGameMode.LastServerNotificationMessage" }; } + FieldValue LastServerNotificationRecievedAtField() { return { this, "AShooterGameMode.LastServerNotificationRecievedAt" }; } + FieldValue LastExecSaveTimeField() { return { this, "AShooterGameMode.LastExecSaveTime" }; } + FieldValue LastTimeSavedWorldField() { return { this, "AShooterGameMode.LastTimeSavedWorld" }; } + FieldValue LastClaimedGameCodeField() { return { this, "AShooterGameMode.LastClaimedGameCode" }; } + FieldValue> ArkGameCodesField() { return { this, "AShooterGameMode.ArkGameCodes" }; } + FieldValue bIsCurrentlyRequestingKeyField() { return { this, "AShooterGameMode.bIsCurrentlyRequestingKey" }; } + FieldValue SaveDirectoryNameField() { return { this, "AShooterGameMode.SaveDirectoryName" }; } + FieldValue> PlayerDatasField() { return { this, "AShooterGameMode.PlayerDatas" }; } + FieldValue NPCZoneManagerModField() { return { this, "AShooterGameMode.NPCZoneManagerMod" }; } + FieldValue bPopulatingSpawnZonesField() { return { this, "AShooterGameMode.bPopulatingSpawnZones" }; } + FieldValue bRestartedAPlayerField() { return { this, "AShooterGameMode.bRestartedAPlayer" }; } + FieldValue bForceRespawnDinosField() { return { this, "AShooterGameMode.bForceRespawnDinos" }; } + FieldValue bFirstSaveWorldField() { return { this, "AShooterGameMode.bFirstSaveWorld" }; } + FieldValue bAllowRaidDinoFeedingField() { return { this, "AShooterGameMode.bAllowRaidDinoFeeding" }; } + FieldValue LastBackupTimeField() { return { this, "AShooterGameMode.LastBackupTime" }; } + FieldValue LastSaveWorldTimeField() { return { this, "AShooterGameMode.LastSaveWorldTime" }; } + FieldValue TamedDinoDamageMultiplierField() { return { this, "AShooterGameMode.TamedDinoDamageMultiplier" }; } + FieldValue DinoDamageMultiplierField() { return { this, "AShooterGameMode.DinoDamageMultiplier" }; } + FieldValue PlayerDamageMultiplierField() { return { this, "AShooterGameMode.PlayerDamageMultiplier" }; } + FieldValue StructureDamageMultiplierField() { return { this, "AShooterGameMode.StructureDamageMultiplier" }; } + FieldValue PlayerResistanceMultiplierField() { return { this, "AShooterGameMode.PlayerResistanceMultiplier" }; } + FieldValue DinoResistanceMultiplierField() { return { this, "AShooterGameMode.DinoResistanceMultiplier" }; } + FieldValue TamedDinoResistanceMultiplierField() { return { this, "AShooterGameMode.TamedDinoResistanceMultiplier" }; } + FieldValue StructureResistanceMultiplierField() { return { this, "AShooterGameMode.StructureResistanceMultiplier" }; } + FieldValue bJoinInProgressGamesAsSpectatorField() { return { this, "AShooterGameMode.bJoinInProgressGamesAsSpectator" }; } + FieldValue TamingSpeedMultiplierField() { return { this, "AShooterGameMode.TamingSpeedMultiplier" }; } + FieldValue HarvestAmountMultiplierField() { return { this, "AShooterGameMode.HarvestAmountMultiplier" }; } + FieldValue HarvestHealthMultiplierField() { return { this, "AShooterGameMode.HarvestHealthMultiplier" }; } + FieldValue PlayerCharacterWaterDrainMultiplierField() { return { this, "AShooterGameMode.PlayerCharacterWaterDrainMultiplier" }; } + FieldValue PlayerCharacterFoodDrainMultiplierField() { return { this, "AShooterGameMode.PlayerCharacterFoodDrainMultiplier" }; } + FieldValue DinoCharacterFoodDrainMultiplierField() { return { this, "AShooterGameMode.DinoCharacterFoodDrainMultiplier" }; } + FieldValue RaidDinoCharacterFoodDrainMultiplierField() { return { this, "AShooterGameMode.RaidDinoCharacterFoodDrainMultiplier" }; } + FieldValue PlayerCharacterStaminaDrainMultiplierField() { return { this, "AShooterGameMode.PlayerCharacterStaminaDrainMultiplier" }; } + FieldValue DinoCharacterStaminaDrainMultiplierField() { return { this, "AShooterGameMode.DinoCharacterStaminaDrainMultiplier" }; } + FieldValue PlayerCharacterHealthRecoveryMultiplierField() { return { this, "AShooterGameMode.PlayerCharacterHealthRecoveryMultiplier" }; } + FieldValue DinoCharacterHealthRecoveryMultiplierField() { return { this, "AShooterGameMode.DinoCharacterHealthRecoveryMultiplier" }; } + FieldValue CarnivoreNaturalTargetingRangeMultiplierField() { return { this, "AShooterGameMode.CarnivoreNaturalTargetingRangeMultiplier" }; } + FieldValue CarnivorePlayerAggroMultiplierField() { return { this, "AShooterGameMode.CarnivorePlayerAggroMultiplier" }; } + FieldValue HerbivoreNaturalTargetingRangeMultiplierField() { return { this, "AShooterGameMode.HerbivoreNaturalTargetingRangeMultiplier" }; } + FieldValue HerbivorePlayerAggroMultiplierField() { return { this, "AShooterGameMode.HerbivorePlayerAggroMultiplier" }; } + FieldValue AIForceTargetPlayersField() { return { this, "AShooterGameMode.AIForceTargetPlayers" }; } + FieldValue AIForceOverlapCheckField() { return { this, "AShooterGameMode.AIForceOverlapCheck" }; } + FieldValue DinoCountMultiplierField() { return { this, "AShooterGameMode.DinoCountMultiplier" }; } + FieldValue bDisableSaveLoadField() { return { this, "AShooterGameMode.bDisableSaveLoad" }; } + FieldValue bDisableXPField() { return { this, "AShooterGameMode.bDisableXP" }; } + FieldValue bDisableDynamicMusicField() { return { this, "AShooterGameMode.bDisableDynamicMusic" }; } + FieldValue> PlayerDeathReasonsField() { return { this, "AShooterGameMode.PlayerDeathReasons" }; } + FieldValue> LevelExperienceRampOverridesField() { return { this, "AShooterGameMode.LevelExperienceRampOverrides" }; } + FieldValue> OverridePlayerLevelEngramPointsField() { return { this, "AShooterGameMode.OverridePlayerLevelEngramPoints" }; } + FieldValue> ExcludeItemIndicesField() { return { this, "AShooterGameMode.ExcludeItemIndices" }; } + //FieldValue> OverrideEngramEntriesField() { return { this, "AShooterGameMode.OverrideEngramEntries" }; } + //FieldValue> OverrideNamedEngramEntriesField() { return { this, "AShooterGameMode.OverrideNamedEngramEntries" }; } + //FieldValue> EngramEntryAutoUnlocksField() { return { this, "AShooterGameMode.EngramEntryAutoUnlocks" }; } + FieldValue> PreventDinoTameClassNamesField() { return { this, "AShooterGameMode.PreventDinoTameClassNames" }; } + //FieldValue> DinoSpawnWeightMultipliersField() { return { this, "AShooterGameMode.DinoSpawnWeightMultipliers" }; } + //FieldValue> DinoClassResistanceMultipliersField() { return { this, "AShooterGameMode.DinoClassResistanceMultipliers" }; } + //FieldValue> TamedDinoClassResistanceMultipliersField() { return { this, "AShooterGameMode.TamedDinoClassResistanceMultipliers" }; } + //FieldValue> DinoClassDamageMultipliersField() { return { this, "AShooterGameMode.DinoClassDamageMultipliers" }; } + //FieldValue> TamedDinoClassDamageMultipliersField() { return { this, "AShooterGameMode.TamedDinoClassDamageMultipliers" }; } + //FieldValue> HarvestResourceItemAmountClassMultipliersField() { return { this, "AShooterGameMode.HarvestResourceItemAmountClassMultipliers" }; } + //FieldValue> NPCReplacementsField() { return { this, "AShooterGameMode.NPCReplacements" }; } + FieldValue PvPZoneStructureDamageMultiplierField() { return { this, "AShooterGameMode.PvPZoneStructureDamageMultiplier" }; } + FieldValue bOnlyAllowSpecifiedEngramsField() { return { this, "AShooterGameMode.bOnlyAllowSpecifiedEngrams" }; } + FieldValue OverrideMaxExperiencePointsPlayerField() { return { this, "AShooterGameMode.OverrideMaxExperiencePointsPlayer" }; } + FieldValue OverrideMaxExperiencePointsDinoField() { return { this, "AShooterGameMode.OverrideMaxExperiencePointsDino" }; } + FieldValue GlobalSpoilingTimeMultiplierField() { return { this, "AShooterGameMode.GlobalSpoilingTimeMultiplier" }; } + FieldValue GlobalItemDecompositionTimeMultiplierField() { return { this, "AShooterGameMode.GlobalItemDecompositionTimeMultiplier" }; } + FieldValue GlobalCorpseDecompositionTimeMultiplierField() { return { this, "AShooterGameMode.GlobalCorpseDecompositionTimeMultiplier" }; } + FieldValue MaxFallSpeedMultiplierField() { return { this, "AShooterGameMode.MaxFallSpeedMultiplier" }; } + FieldValue bAutoPvETimerField() { return { this, "AShooterGameMode.bAutoPvETimer" }; } + FieldValue bAutoPvEUseSystemTimeField() { return { this, "AShooterGameMode.bAutoPvEUseSystemTime" }; } + FieldValue bUsingStructureDestructionTagField() { return { this, "AShooterGameMode.bUsingStructureDestructionTag" }; } + FieldValue StructureDestructionTagField() { return { this, "AShooterGameMode.StructureDestructionTag" }; } + FieldValue AutoPvEStartTimeSecondsField() { return { this, "AShooterGameMode.AutoPvEStartTimeSeconds" }; } + FieldValue AutoPvEStopTimeSecondsField() { return { this, "AShooterGameMode.AutoPvEStopTimeSeconds" }; } + FieldValue TributeItemExpirationSecondsField() { return { this, "AShooterGameMode.TributeItemExpirationSeconds" }; } + FieldValue TributeDinoExpirationSecondsField() { return { this, "AShooterGameMode.TributeDinoExpirationSeconds" }; } + FieldValue TributeCharacterExpirationSecondsField() { return { this, "AShooterGameMode.TributeCharacterExpirationSeconds" }; } + FieldValue PreventDownloadSurvivorsField() { return { this, "AShooterGameMode.PreventDownloadSurvivors" }; } + FieldValue PreventDownloadItemsField() { return { this, "AShooterGameMode.PreventDownloadItems" }; } + FieldValue PreventDownloadDinosField() { return { this, "AShooterGameMode.PreventDownloadDinos" }; } + FieldValue bPreventUploadSurvivorsField() { return { this, "AShooterGameMode.bPreventUploadSurvivors" }; } + FieldValue bPreventUploadItemsField() { return { this, "AShooterGameMode.bPreventUploadItems" }; } + FieldValue bPreventUploadDinosField() { return { this, "AShooterGameMode.bPreventUploadDinos" }; } + FieldValue MaxTributeItemsField() { return { this, "AShooterGameMode.MaxTributeItems" }; } + FieldValue MaxTributeDinosField() { return { this, "AShooterGameMode.MaxTributeDinos" }; } + FieldValue MaxTributeCharactersField() { return { this, "AShooterGameMode.MaxTributeCharacters" }; } + FieldValue bIncreasePvPRespawnIntervalField() { return { this, "AShooterGameMode.bIncreasePvPRespawnInterval" }; } + FieldValue IncreasePvPRespawnIntervalCheckPeriodField() { return { this, "AShooterGameMode.IncreasePvPRespawnIntervalCheckPeriod" }; } + FieldValue IncreasePvPRespawnIntervalMultiplierField() { return { this, "AShooterGameMode.IncreasePvPRespawnIntervalMultiplier" }; } + FieldValue IncreasePvPRespawnIntervalBaseAmountField() { return { this, "AShooterGameMode.IncreasePvPRespawnIntervalBaseAmount" }; } + FieldValue ResourceNoReplenishRadiusStructuresField() { return { this, "AShooterGameMode.ResourceNoReplenishRadiusStructures" }; } + FieldValue ResourceNoReplenishRadiusPlayersField() { return { this, "AShooterGameMode.ResourceNoReplenishRadiusPlayers" }; } + FieldValue CropGrowthSpeedMultiplierField() { return { this, "AShooterGameMode.CropGrowthSpeedMultiplier" }; } + FieldValue LayEggIntervalMultiplierField() { return { this, "AShooterGameMode.LayEggIntervalMultiplier" }; } + FieldValue PoopIntervalMultiplierField() { return { this, "AShooterGameMode.PoopIntervalMultiplier" }; } + FieldValue CropDecaySpeedMultiplierField() { return { this, "AShooterGameMode.CropDecaySpeedMultiplier" }; } + FieldValue bAllowChatFromDeadNonAdminsField() { return { this, "AShooterGameMode.bAllowChatFromDeadNonAdmins" }; } + FieldValue bAllowDisablingSpectatorField() { return { this, "AShooterGameMode.bAllowDisablingSpectator" }; } + FieldValue bPvEDisableFriendlyFireField() { return { this, "AShooterGameMode.bPvEDisableFriendlyFire" }; } + FieldValue bFlyerPlatformAllowUnalignedDinoBasingField() { return { this, "AShooterGameMode.bFlyerPlatformAllowUnalignedDinoBasing" }; } + FieldValue MaxPerTribePlatformSaddleStructureLimitField() { return { this, "AShooterGameMode.MaxPerTribePlatformSaddleStructureLimit" }; } + FieldValue MaxPlatformSaddleStructureLimitField() { return { this, "AShooterGameMode.MaxPlatformSaddleStructureLimit" }; } + FieldValue MaxDinoBaseLevelField() { return { this, "AShooterGameMode.MaxDinoBaseLevel" }; } + FieldValue MaxNumberOfPlayersInTribeField() { return { this, "AShooterGameMode.MaxNumberOfPlayersInTribe" }; } + FieldValue MatingIntervalMultiplierField() { return { this, "AShooterGameMode.MatingIntervalMultiplier" }; } + FieldValue EggHatchSpeedMultiplierField() { return { this, "AShooterGameMode.EggHatchSpeedMultiplier" }; } + FieldValue BabyMatureSpeedMultiplierField() { return { this, "AShooterGameMode.BabyMatureSpeedMultiplier" }; } + FieldValue BabyFoodConsumptionSpeedMultiplierField() { return { this, "AShooterGameMode.BabyFoodConsumptionSpeedMultiplier" }; } + FieldValue CurrentPlatformSaddleStructuresField() { return { this, "AShooterGameMode.CurrentPlatformSaddleStructures" }; } + FieldArray PerLevelStatsMultiplier_PlayerField() { return { this, "AShooterGameMode.PerLevelStatsMultiplier_Player" }; } + FieldArray PerLevelStatsMultiplier_DinoTamedField() { return { this, "AShooterGameMode.PerLevelStatsMultiplier_DinoTamed" }; } + FieldArray PerLevelStatsMultiplier_DinoTamed_AddField() { return { this, "AShooterGameMode.PerLevelStatsMultiplier_DinoTamed_Add" }; } + FieldArray PerLevelStatsMultiplier_DinoTamed_AffinityField() { return { this, "AShooterGameMode.PerLevelStatsMultiplier_DinoTamed_Affinity" }; } + FieldArray PerLevelStatsMultiplier_DinoWildField() { return { this, "AShooterGameMode.PerLevelStatsMultiplier_DinoWild" }; } + FieldArray ItemStatClampsField() { return { this, "AShooterGameMode.ItemStatClamps" }; } + FieldValue bCustomGameModeAllowSpectatorJoinAfterMatchStartField() { return { this, "AShooterGameMode.bCustomGameModeAllowSpectatorJoinAfterMatchStart" }; } + FieldValue bGameplayLogEnabledField() { return { this, "AShooterGameMode.bGameplayLogEnabled" }; } + FieldValue bServerGameLogEnabledField() { return { this, "AShooterGameMode.bServerGameLogEnabled" }; } + FieldValue> BonusSupplyCrateItemClassField() { return { this, "AShooterGameMode.BonusSupplyCrateItemClass" }; } + FieldValue BonusSupplyCrateItemGiveIntervalField() { return { this, "AShooterGameMode.BonusSupplyCrateItemGiveInterval" }; } + FieldValue StructureDamageRepairCooldownField() { return { this, "AShooterGameMode.StructureDamageRepairCooldown" }; } + FieldValue CustomRecipeEffectivenessMultiplierField() { return { this, "AShooterGameMode.CustomRecipeEffectivenessMultiplier" }; } + FieldValue CustomRecipeSkillMultiplierField() { return { this, "AShooterGameMode.CustomRecipeSkillMultiplier" }; } + FieldValue BonusSupplyCrateItemStringField() { return { this, "AShooterGameMode.BonusSupplyCrateItemString" }; } + FieldValue bPvEAllowTribeWarField() { return { this, "AShooterGameMode.bPvEAllowTribeWar" }; } + FieldValue bPvEAllowTribeWarCancelField() { return { this, "AShooterGameMode.bPvEAllowTribeWarCancel" }; } + FieldValue bAllowCustomRecipesField() { return { this, "AShooterGameMode.bAllowCustomRecipes" }; } + FieldValue bPassiveDefensesDamageRiderlessDinosField() { return { this, "AShooterGameMode.bPassiveDefensesDamageRiderlessDinos" }; } + FieldValue LastBonusSupplyCrateItemGiveTimeField() { return { this, "AShooterGameMode.LastBonusSupplyCrateItemGiveTime" }; } + FieldValue bEnableDeathTeamSpectatorField() { return { this, "AShooterGameMode.bEnableDeathTeamSpectator" }; } + FieldValue bTribeStoreCharacterConfigurationField() { return { this, "AShooterGameMode.bTribeStoreCharacterConfiguration" }; } + FieldValue, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0> >> PvEActiveTribeWarsField() { return { this, "AShooterGameMode.PvEActiveTribeWars" }; } + FieldValue, FDefaultSetAllocator>, FDefaultSetAllocator, TDefaultMapKeyFuncs, FDefaultSetAllocator>, 0> >> TribeAlliesField() { return { this, "AShooterGameMode.TribeAllies" }; } + FieldValue >> IDtoPlayerDatasField() { return { this, "AShooterGameMode.IDtoPlayerDatas" }; } + FieldValue MaxTribeLogsField() { return { this, "AShooterGameMode.MaxTribeLogs" }; } + FieldValue MaxPersonalTamedDinosField() { return { this, "AShooterGameMode.MaxPersonalTamedDinos" }; } + FieldValue PersonalTamedDinosSaddleStructureCostField() { return { this, "AShooterGameMode.PersonalTamedDinosSaddleStructureCost" }; } + FieldValue> CachedGameLogField() { return { this, "AShooterGameMode.CachedGameLog" }; } + FieldValue bDisableFriendlyFireField() { return { this, "AShooterGameMode.bDisableFriendlyFire" }; } + FieldValue bAllowInactiveTribesField() { return { this, "AShooterGameMode.bAllowInactiveTribes" }; } + FieldValue bForceMapPlayerLocationField() { return { this, "AShooterGameMode.bForceMapPlayerLocation" }; } + FieldValue DinoHarvestingDamageMultiplierField() { return { this, "AShooterGameMode.DinoHarvestingDamageMultiplier" }; } + FieldValue PlayerHarvestingDamageMultiplierField() { return { this, "AShooterGameMode.PlayerHarvestingDamageMultiplier" }; } + FieldValue DinoTurretDamageMultiplierField() { return { this, "AShooterGameMode.DinoTurretDamageMultiplier" }; } + FieldValue bDisableLootCratesField() { return { this, "AShooterGameMode.bDisableLootCrates" }; } + FieldValue ExtinctionEventTimeIntervalField() { return { this, "AShooterGameMode.ExtinctionEventTimeInterval" }; } + FieldValue bEnableExtraStructurePreventionVolumesField() { return { this, "AShooterGameMode.bEnableExtraStructurePreventionVolumes" }; } + FieldValue NextExtinctionEventUTCField() { return { this, "AShooterGameMode.NextExtinctionEventUTC" }; } + FieldValue bForceAllowCaveFlyersField() { return { this, "AShooterGameMode.bForceAllowCaveFlyers" }; } + FieldValue bDoExtinctionEventField() { return { this, "AShooterGameMode.bDoExtinctionEvent" }; } + FieldValue bPreventOfflinePvPField() { return { this, "AShooterGameMode.bPreventOfflinePvP" }; } + FieldValue bPvPDinoDecayField() { return { this, "AShooterGameMode.bPvPDinoDecay" }; } + FieldValue bOverideStructurePlatformPreventionField() { return { this, "AShooterGameMode.bOverideStructurePlatformPrevention" }; } + FieldValue bAllowAnyoneBabyImprintCuddleField() { return { this, "AShooterGameMode.bAllowAnyoneBabyImprintCuddle" }; } + FieldValue bDisableImprintDinoBuffField() { return { this, "AShooterGameMode.bDisableImprintDinoBuff" }; } + FieldValue bShowFloatingDamageTextField() { return { this, "AShooterGameMode.bShowFloatingDamageText" }; } + FieldValue bOnlyDecayUnsnappedCoreStructuresField() { return { this, "AShooterGameMode.bOnlyDecayUnsnappedCoreStructures" }; } + FieldValue bFastDecayUnsnappedCoreStructuresField() { return { this, "AShooterGameMode.bFastDecayUnsnappedCoreStructures" }; } + FieldValue bDestroyUnconnectedWaterPipesField() { return { this, "AShooterGameMode.bDestroyUnconnectedWaterPipes" }; } + FieldValue bAllowCrateSpawnsOnTopOfStructuresField() { return { this, "AShooterGameMode.bAllowCrateSpawnsOnTopOfStructures" }; } + FieldValue bNotifyAdminCommandsInChatField() { return { this, "AShooterGameMode.bNotifyAdminCommandsInChat" }; } + FieldValue PreventOfflinePvPIntervalField() { return { this, "AShooterGameMode.PreventOfflinePvPInterval" }; } + //FieldValue> OverrideItemCraftingCostsField() { return { this, "AShooterGameMode.OverrideItemCraftingCosts" }; } + //FieldValue> ConfigOverrideItemCraftingCostsField() { return { this, "AShooterGameMode.ConfigOverrideItemCraftingCosts" }; } + //FieldValue> ConfigOverrideSupplyCrateItemsField() { return { this, "AShooterGameMode.ConfigOverrideSupplyCrateItems" }; } + //FieldValue> ConfigOverrideNPCSpawnEntriesContainerField() { return { this, "AShooterGameMode.ConfigOverrideNPCSpawnEntriesContainer" }; } + //FieldValue> ConfigAddNPCSpawnEntriesContainerField() { return { this, "AShooterGameMode.ConfigAddNPCSpawnEntriesContainer" }; } + //FieldValue> ConfigSubtractNPCSpawnEntriesContainerField() { return { this, "AShooterGameMode.ConfigSubtractNPCSpawnEntriesContainer" }; } + FieldValue BabyImprintingStatScaleMultiplierField() { return { this, "AShooterGameMode.BabyImprintingStatScaleMultiplier" }; } + FieldValue BabyCuddleIntervalMultiplierField() { return { this, "AShooterGameMode.BabyCuddleIntervalMultiplier" }; } + FieldValue BabyCuddleGracePeriodMultiplierField() { return { this, "AShooterGameMode.BabyCuddleGracePeriodMultiplier" }; } + FieldValue BabyCuddleLoseImprintQualitySpeedMultiplierField() { return { this, "AShooterGameMode.BabyCuddleLoseImprintQualitySpeedMultiplier" }; } + FieldValue HairGrowthSpeedMultiplierField() { return { this, "AShooterGameMode.HairGrowthSpeedMultiplier" }; } + FieldValue bPreventDiseasesField() { return { this, "AShooterGameMode.bPreventDiseases" }; } + FieldValue bNonPermanentDiseasesField() { return { this, "AShooterGameMode.bNonPermanentDiseases" }; } + //FieldValue AllClustersInventoryField() { return { this, "AShooterGameMode.AllClustersInventory" }; } + FieldValue SaveForceRespawnDinosVersionField() { return { this, "AShooterGameMode.SaveForceRespawnDinosVersion" }; } + FieldValue ServerIDField() { return { this, "AShooterGameMode.ServerID" }; } + FieldValue LoadForceRespawnDinosVersionField() { return { this, "AShooterGameMode.LoadForceRespawnDinosVersion" }; } + FieldValue bIsLoadedServerField() { return { this, "AShooterGameMode.bIsLoadedServer" }; } + //FieldValue >> TributePlayerTribeInfosField() { return { this, "AShooterGameMode.TributePlayerTribeInfos" }; } + FieldValue> SupportedSpawnRegionsField() { return { this, "AShooterGameMode.SupportedSpawnRegions" }; } + FieldValue bServerUseDinoListField() { return { this, "AShooterGameMode.bServerUseDinoList" }; } + FieldValue MaxAllowedRespawnIntervalField() { return { this, "AShooterGameMode.MaxAllowedRespawnInterval" }; } + FieldValue bUseDinoLevelUpAnimationsField() { return { this, "AShooterGameMode.bUseDinoLevelUpAnimations" }; } + FieldValue bDisableDinoTamingField() { return { this, "AShooterGameMode.bDisableDinoTaming" }; } + FieldValue bDisableDinoRidingField() { return { this, "AShooterGameMode.bDisableDinoRiding" }; } + FieldValue MinimumDinoReuploadIntervalField() { return { this, "AShooterGameMode.MinimumDinoReuploadInterval" }; } + FieldValue SaveGameCustomVersionField() { return { this, "AShooterGameMode.SaveGameCustomVersion" }; } + FieldValue OverrideOfficialDifficultyField() { return { this, "AShooterGameMode.OverrideOfficialDifficulty" }; } + FieldArray PlayerBaseStatMultipliersField() { return { this, "AShooterGameMode.PlayerBaseStatMultipliers" }; } + FieldValue NPCActiveCountTamedField() { return { this, "AShooterGameMode.NPCActiveCountTamed" }; } + FieldValue NPCActiveCountField() { return { this, "AShooterGameMode.NPCActiveCount" }; } + FieldValue NPCCountField() { return { this, "AShooterGameMode.NPCCount" }; } + FieldValue MatingSpeedMultiplierField() { return { this, "AShooterGameMode.MatingSpeedMultiplier" }; } + FieldValue FastDecayIntervalField() { return { this, "AShooterGameMode.FastDecayInterval" }; } + FieldValue bUseSingleplayerSettingsField() { return { this, "AShooterGameMode.bUseSingleplayerSettings" }; } + FieldValue bUseCorpseLocatorField() { return { this, "AShooterGameMode.bUseCorpseLocator" }; } + FieldValue bDisableStructurePlacementCollisionField() { return { this, "AShooterGameMode.bDisableStructurePlacementCollision" }; } + FieldValue bForceUseInventoryAppendsField() { return { this, "AShooterGameMode.bForceUseInventoryAppends" }; } + FieldValue SupplyCrateLootQualityMultiplierField() { return { this, "AShooterGameMode.SupplyCrateLootQualityMultiplier" }; } + FieldValue FishingLootQualityMultiplierField() { return { this, "AShooterGameMode.FishingLootQualityMultiplier" }; } + FieldValue CraftingSkillBonusMultiplierField() { return { this, "AShooterGameMode.CraftingSkillBonusMultiplier" }; } + FieldValue bAllowPlatformSaddleMultiFloorsField() { return { this, "AShooterGameMode.bAllowPlatformSaddleMultiFloors" }; } + FieldValue bAllowUnlimitedRespecsField() { return { this, "AShooterGameMode.bAllowUnlimitedRespecs" }; } + FieldValue FuelConsumptionIntervalMultiplierField() { return { this, "AShooterGameMode.FuelConsumptionIntervalMultiplier" }; } + FieldValue DestroyTamesOverLevelClampField() { return { this, "AShooterGameMode.DestroyTamesOverLevelClamp" }; } + FieldValue MaxAlliancesPerTribeField() { return { this, "AShooterGameMode.MaxAlliancesPerTribe" }; } + FieldValue MaxTribesPerAllianceField() { return { this, "AShooterGameMode.MaxTribesPerAlliance" }; } + FieldValue bDisableDinoDecayClaimingField() { return { this, "AShooterGameMode.bDisableDinoDecayClaiming" }; } + FieldValue bUseTameLimitForStructuresOnlyField() { return { this, "AShooterGameMode.bUseTameLimitForStructuresOnly" }; } + FieldValue bLimitTurretsInRangeField() { return { this, "AShooterGameMode.bLimitTurretsInRange" }; } + FieldValue LimitTurretsRangeField() { return { this, "AShooterGameMode.LimitTurretsRange" }; } + FieldValue LimitTurretsNumField() { return { this, "AShooterGameMode.LimitTurretsNum" }; } + FieldValue bAutoUnlockAllEngramsField() { return { this, "AShooterGameMode.bAutoUnlockAllEngrams" }; } + FieldValue ServerLastForceRespawnWildDinosTimeField() { return { this, "AShooterGameMode.ServerLastForceRespawnWildDinosTime" }; } + FieldValue UseStructurePreventionVolumeTagStringField() { return { this, "AShooterGameMode.UseStructurePreventionVolumeTagString" }; } + FieldValue BaseTemperatureMultiplierField() { return { this, "AShooterGameMode.BaseTemperatureMultiplier" }; } + FieldValue bForceAllowAllStructuresField() { return { this, "AShooterGameMode.bForceAllowAllStructures" }; } + FieldValue bForceAllowAscensionItemDownloadsField() { return { this, "AShooterGameMode.bForceAllowAscensionItemDownloads" }; } + FieldValue GlobalPoweredBatteryDurabilityDecreasePerSecondField() { return { this, "AShooterGameMode.GlobalPoweredBatteryDurabilityDecreasePerSecond" }; } + FieldValue SingleplayerSettingsCorpseLifespanMultiplierField() { return { this, "AShooterGameMode.SingleplayerSettingsCorpseLifespanMultiplier" }; } + FieldValue UseCorpseLifeSpanMultiplierField() { return { this, "AShooterGameMode.UseCorpseLifeSpanMultiplier" }; } + FieldValue UseStructurePreventionVolumeTagField() { return { this, "AShooterGameMode.UseStructurePreventionVolumeTag" }; } + FieldValue bHasCovertedToStoreField() { return { this, "AShooterGameMode.bHasCovertedToStore" }; } + FieldValue bAllowStoredDatasField() { return { this, "AShooterGameMode.bAllowStoredDatas" }; } + //FieldValue> TribeDataStoreField() { return { this, "AShooterGameMode.TribeDataStore" }; } + //FieldValue> PlayerDataStoreField() { return { this, "AShooterGameMode.PlayerDataStore" }; } + + // Functions + + bool AllowAddXP(UPrimalCharacterStatusComponent * forComp) { return NativeCall(this, "AShooterGameMode.AllowAddXP", forComp); } + void CheckArkTributeAvailability() { NativeCall(this, "AShooterGameMode.CheckArkTributeAvailability"); } + void InitGame(FString * MapName, FString * Options, FString * ErrorMessage) { NativeCall(this, "AShooterGameMode.InitGame", MapName, Options, ErrorMessage); } + void InitOptionBool(FString Commandline, FString Section, FString Option, bool bDefaultValue) { NativeCall(this, "AShooterGameMode.InitOptionBool", Commandline, Section, Option, bDefaultValue); } + void InitOptionString(FString Commandline, FString Section, FString Option) { NativeCall(this, "AShooterGameMode.InitOptionString", Commandline, Section, Option); } + void InitOptionFloat(FString Commandline, FString Section, FString Option, float CurrentValue) { NativeCall(this, "AShooterGameMode.InitOptionFloat", Commandline, Section, Option, CurrentValue); } + bool GetServerSettingsFloat(FString * Keyvalue, float * OutFloat) { return NativeCall(this, "AShooterGameMode.GetServerSettingsFloat", Keyvalue, OutFloat); } + void SingleplayerSetupValues() { NativeCall(this, "AShooterGameMode.SingleplayerSetupValues"); } + void InitOptionInteger(FString Commandline, FString Section, FString Option, int CurrentValue) { NativeCall(this, "AShooterGameMode.InitOptionInteger", Commandline, Section, Option, CurrentValue); } + bool GetBoolOption(FString * Options, FString * ParseString, bool CurrentValue) { return NativeCall(this, "AShooterGameMode.GetBoolOption", Options, ParseString, CurrentValue); } + float GetFloatOption(FString * Options, FString * ParseString, float CurrentValue) { return NativeCall(this, "AShooterGameMode.GetFloatOption", Options, ParseString, CurrentValue); } + int GetIntOption(FString * Options, FString * ParseString, int CurrentValue) { return NativeCall(this, "AShooterGameMode.GetIntOption", Options, ParseString, CurrentValue); } + void InitOptions(FString Options) { NativeCall(this, "AShooterGameMode.InitOptions", Options); } + bool GetBoolOptionIni(FString Section, FString OptionName) { return NativeCall(this, "AShooterGameMode.GetBoolOptionIni", Section, OptionName); } + float GetFloatOptionIni(FString Section, FString OptionName) { return NativeCall(this, "AShooterGameMode.GetFloatOptionIni", Section, OptionName); } + int GetIntOptionIni(FString Section, FString OptionName) { return NativeCall(this, "AShooterGameMode.GetIntOptionIni", Section, OptionName); } + FString * GetStringOption(FString * result, FString Section, FString OptionName) { return NativeCall(this, "AShooterGameMode.GetStringOption", result, Section, OptionName); } + void SaveWorld() { NativeCall(this, "AShooterGameMode.SaveWorld"); } + void ClearSavesAndRestart() { NativeCall(this, "AShooterGameMode.ClearSavesAndRestart"); } + bool LoadWorld() { return NativeCall(this, "AShooterGameMode.LoadWorld"); } + TSubclassOf * GetGameSessionClass(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "AShooterGameMode.GetGameSessionClass", result); } + void HandleMatchHasStarted() { NativeCall(this, "AShooterGameMode.HandleMatchHasStarted"); } + void HandleLeavingMap() { NativeCall(this, "AShooterGameMode.HandleLeavingMap"); } + void PreLogin(FString * Options, FString * Address, TSharedPtr * UniqueId, FString * authToken, FString * ErrorMessage) { NativeCall *, FString *, FString *>(this, "AShooterGameMode.PreLogin", Options, Address, UniqueId, authToken, ErrorMessage); } + void PostLogin(APlayerController * NewPlayer) { NativeCall(this, "AShooterGameMode.PostLogin", NewPlayer); } + TArray * GetWhiteListedMap(TArray * result) { return NativeCall *, TArray *>(this, "AShooterGameMode.GetWhiteListedMap", result); } + void Killed(AController * Killer, AController * KilledPlayer, APawn * KilledPawn, UDamageType * DamageType) { NativeCall(this, "AShooterGameMode.Killed", Killer, KilledPlayer, KilledPawn, DamageType); } + TSubclassOf * GetDefaultPawnClassForController_Implementation(TSubclassOf * result, AController * InController) { return NativeCall *, TSubclassOf *, AController *>(this, "AShooterGameMode.GetDefaultPawnClassForController_Implementation", result, InController); } + AActor * ChoosePlayerStart_Implementation(AController * Player) { return NativeCall(this, "AShooterGameMode.ChoosePlayerStart_Implementation", Player); } + bool IsSpawnpointPreferred(APlayerStart * SpawnPoint, AController * Player) { return NativeCall(this, "AShooterGameMode.IsSpawnpointPreferred", SpawnPoint, Player); } + bool IsFirstPlayerSpawn(APlayerController * NewPlayer) { return NativeCall(this, "AShooterGameMode.IsFirstPlayerSpawn", NewPlayer); } + void StartNewPlayer(APlayerController * NewPlayer) { NativeCall(this, "AShooterGameMode.StartNewPlayer", NewPlayer); } + void StartNewShooterPlayer(APlayerController * NewPlayer, bool bForceCreateNewPlayerData, bool bIsFromLogin, FPrimalPlayerCharacterConfigStruct * charConfig, UPrimalPlayerData * ArkPlayerData) { NativeCall(this, "AShooterGameMode.StartNewShooterPlayer", NewPlayer, bForceCreateNewPlayerData, bIsFromLogin, charConfig, ArkPlayerData); } + void HandleTransferCharacterDialogResult(bool bAccept, AShooterPlayerController * NewPlayer) { NativeCall(this, "AShooterGameMode.HandleTransferCharacterDialogResult", bAccept, NewPlayer); } + void Logout(AController * Exiting) { NativeCall(this, "AShooterGameMode.Logout", Exiting); } + FVector * GetTracedSpawnLocation(FVector * result, FVector * SpawnLoc, float CharHalfHeight) { return NativeCall(this, "AShooterGameMode.GetTracedSpawnLocation", result, SpawnLoc, CharHalfHeight); } + void SetMessageOfTheDay(FString * Message) { NativeCall(this, "AShooterGameMode.SetMessageOfTheDay", Message); } + void ShowMessageOfTheDay() { NativeCall(this, "AShooterGameMode.ShowMessageOfTheDay"); } + APawn * SpawnDefaultPawnFor(AController * NewPlayer, AActor * StartSpot) { return NativeCall(this, "AShooterGameMode.SpawnDefaultPawnFor", NewPlayer, StartSpot); } + FPrimalPlayerCharacterConfigStruct * ValidateCharacterConfig(FPrimalPlayerCharacterConfigStruct * result, FPrimalPlayerCharacterConfigStruct * charConfig) { return NativeCall(this, "AShooterGameMode.ValidateCharacterConfig", result, charConfig); } + FString * GenerateProfileFileName(FString * result, FUniqueNetIdRepl * UniqueId, FString * NetworkAddresss, FString * PlayerName) { return NativeCall(this, "AShooterGameMode.GenerateProfileFileName", result, UniqueId, NetworkAddresss, PlayerName); } + UPrimalPlayerData * LoadPlayerData(AShooterPlayerState * PlayerState, bool bIsLoadingBackup) { return NativeCall(this, "AShooterGameMode.LoadPlayerData", PlayerState, bIsLoadingBackup); } + void DeletePlayerData(AShooterPlayerState * PlayerState) { NativeCall(this, "AShooterGameMode.DeletePlayerData", PlayerState); } + bool GetOrLoadTribeData(int TribeID, FTribeData * LoadedTribeData) { return NativeCall(this, "AShooterGameMode.GetOrLoadTribeData", TribeID, LoadedTribeData); } + bool LoadTribeData(int TribeID, FTribeData * LoadedTribeData, bool bIsLoadingBackup, bool bDontCheckDirtyTribeWar) { return NativeCall(this, "AShooterGameMode.LoadTribeData", TribeID, LoadedTribeData, bIsLoadingBackup, bDontCheckDirtyTribeWar); } + UPrimalPlayerData * GetPlayerDataFor(AShooterPlayerController * PC, bool * bCreatedNewPlayerData, bool bForceCreateNewPlayerData, FPrimalPlayerCharacterConfigStruct * charConfig, bool bAutoCreateNewData, bool bDontSaveNewData) { return NativeCall(this, "AShooterGameMode.GetPlayerDataFor", PC, bCreatedNewPlayerData, bForceCreateNewPlayerData, charConfig, bAutoCreateNewData, bDontSaveNewData); } + void CheckForRepopulation() { NativeCall(this, "AShooterGameMode.CheckForRepopulation"); } + void Tick(float DeltaSeconds) { NativeCall(this, "AShooterGameMode.Tick", DeltaSeconds); } + bool StartSaveBackup() { return NativeCall(this, "AShooterGameMode.StartSaveBackup"); } + void SendDatadogMetricEvent(FString * Title, FString * Message) { NativeCall(this, "AShooterGameMode.SendDatadogMetricEvent", Title, Message); } + void TickSaveBackup() { NativeCall(this, "AShooterGameMode.TickSaveBackup"); } + unsigned __int64 AddNewTribe(AShooterPlayerState * PlayerOwner, FString * TribeName, FTribeGovernment * TribeGovernment) { return NativeCall(this, "AShooterGameMode.AddNewTribe", PlayerOwner, TribeName, TribeGovernment); } + void RemoveTribe(unsigned __int64 TribeID) { NativeCall(this, "AShooterGameMode.RemoveTribe", TribeID); } + void RemovePlayerFromTribe(unsigned __int64 TribeID, unsigned __int64 PlayerDataID, bool bDontUpdatePlayerState) { NativeCall(this, "AShooterGameMode.RemovePlayerFromTribe", TribeID, PlayerDataID, bDontUpdatePlayerState); } + int GetTribeIDOfPlayerID(unsigned __int64 PlayerDataID) { return NativeCall(this, "AShooterGameMode.GetTribeIDOfPlayerID", PlayerDataID); } + FTribeData * GetTribeData(FTribeData * result, unsigned __int64 TribeID) { return NativeCall(this, "AShooterGameMode.GetTribeData", result, TribeID); } + void BeginPlay() { NativeCall(this, "AShooterGameMode.BeginPlay"); } + void GetActorSaveGameTypes(TArray> * saveGameTypes) { NativeCall> *>(this, "AShooterGameMode.GetActorSaveGameTypes", saveGameTypes); } + FString * InitNewPlayer(FString * result, APlayerController * NewPlayerController, TSharedPtr * UniqueId, FString * Options, FString * Portal) { return NativeCall *, FString *, FString *>(this, "AShooterGameMode.InitNewPlayer", result, NewPlayerController, UniqueId, Options, Portal); } + void SendServerDirectMessage(FString * PlayerSteamID, FString * MessageText, FLinearColor MessageColor, bool bIsBold, int ReceiverTeamId, int ReceiverPlayerID, FString * PlayerName) { NativeCall(this, "AShooterGameMode.SendServerDirectMessage", PlayerSteamID, MessageText, MessageColor, bIsBold, ReceiverTeamId, ReceiverPlayerID, PlayerName); } + void SendServerChatMessage(FString * MessageText, FLinearColor MessageColor, bool bIsBold, int ReceiverTeamId, int ReceiverPlayerID) { NativeCall(this, "AShooterGameMode.SendServerChatMessage", MessageText, MessageColor, bIsBold, ReceiverTeamId, ReceiverPlayerID); } + void SendServerNotification(FString * MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D * MessageIcon, USoundBase * SoundToPlay, int ReceiverTeamId, int ReceiverPlayerID, bool bDoBillboard) { NativeCall(this, "AShooterGameMode.SendServerNotification", MessageText, MessageColor, DisplayScale, DisplayTime, MessageIcon, SoundToPlay, ReceiverTeamId, ReceiverPlayerID, bDoBillboard); } + void RemovePlayerData(AShooterPlayerState * PlayerState) { NativeCall(this, "AShooterGameMode.RemovePlayerData", PlayerState); } + void InitGameState() { NativeCall(this, "AShooterGameMode.InitGameState"); } + void PreInitializeComponents() { NativeCall(this, "AShooterGameMode.PreInitializeComponents"); } + void CheckIsOfficialServer() { NativeCall(this, "AShooterGameMode.CheckIsOfficialServer"); } + void BeginUnloadingWorld() { NativeCall(this, "AShooterGameMode.BeginUnloadingWorld"); } + void GetServerNotification() { NativeCall(this, "AShooterGameMode.GetServerNotification"); } + void GetDynamicConfig() { NativeCall(this, "AShooterGameMode.GetDynamicConfig"); } + void PostAlarmNotification(FUniqueNetId * SteamID, FString * Title, FString * Message) { NativeCall(this, "AShooterGameMode.PostAlarmNotification", SteamID, Title, Message); } + void PostAlarmNotification(FString SteamID, FString * Title, FString * Message) { NativeCall(this, "AShooterGameMode.PostAlarmNotification", SteamID, Title, Message); } + void PostServerMetrics() { NativeCall(this, "AShooterGameMode.PostServerMetrics"); } + void SavePlayersJoinNoCheckList() { NativeCall(this, "AShooterGameMode.SavePlayersJoinNoCheckList"); } + void LoadPlayersJoinNoCheckList() { NativeCall(this, "AShooterGameMode.LoadPlayersJoinNoCheckList"); } + bool IsPlayerAllowedToJoinNoCheck(FUniqueNetIdUInt64 * PlayerId) { return NativeCall(this, "AShooterGameMode.IsPlayerAllowedToJoinNoCheck", PlayerId); } + bool IsPlayerControllerAllowedToJoinNoCheck(AShooterPlayerController * ForPlayer) { return NativeCall(this, "AShooterGameMode.IsPlayerControllerAllowedToJoinNoCheck", ForPlayer); } + bool IsPlayerControllerAllowedToExclusiveJoin(AShooterPlayerController * ForPlayer) { return NativeCall(this, "AShooterGameMode.IsPlayerControllerAllowedToExclusiveJoin", ForPlayer); } + bool KickPlayer(FString PlayerSteamName, FString PlayerSteamID) { return NativeCall(this, "AShooterGameMode.KickPlayer", PlayerSteamName, PlayerSteamID); } + void KickPlayerController(APlayerController * thePC, FString * KickMessage) { NativeCall(this, "AShooterGameMode.KickPlayerController", thePC, KickMessage); } + bool BanPlayer(FString PlayerSteamName, FString PlayerSteamID) { return NativeCall(this, "AShooterGameMode.BanPlayer", PlayerSteamName, PlayerSteamID); } + bool UnbanPlayer(FString PlayerSteamName, FString PlayerSteamID) { return NativeCall(this, "AShooterGameMode.UnbanPlayer", PlayerSteamName, PlayerSteamID); } + void SaveBannedList() { NativeCall(this, "AShooterGameMode.SaveBannedList"); } + void LoadBannedList() { NativeCall(this, "AShooterGameMode.LoadBannedList"); } + FString * GetMapName(FString * result) { return NativeCall(this, "AShooterGameMode.GetMapName", result); } + void UpdateSaveBackupFiles() { NativeCall(this, "AShooterGameMode.UpdateSaveBackupFiles"); } + void LoadTribeIds_Process(unsigned int theTribeID) { NativeCall(this, "AShooterGameMode.LoadTribeIds_Process", theTribeID); } + void LoadTribeIds() { NativeCall(this, "AShooterGameMode.LoadTribeIds"); } + void LoadPlayerIds_Process(unsigned __int64 InPlayerID, TArray * ReadBytes) { NativeCall *>(this, "AShooterGameMode.LoadPlayerIds_Process", InPlayerID, ReadBytes); } + void LoadPlayerDataIds() { NativeCall(this, "AShooterGameMode.LoadPlayerDataIds"); } + void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID) { NativeCall(this, "AShooterGameMode.AddPlayerID", playerDataID, netUniqueID); } + unsigned __int64 GetSteamIDForPlayerID(int playerDataID) { return NativeCall(this, "AShooterGameMode.GetSteamIDForPlayerID", playerDataID); } + int GetPlayerIDForSteamID(unsigned __int64 steamID) { return NativeCall(this, "AShooterGameMode.GetPlayerIDForSteamID", steamID); } + unsigned int GenerateTribeId() { return NativeCall(this, "AShooterGameMode.GenerateTribeId"); } + unsigned int GeneratePlayerDataId(unsigned __int64 NetUniqueID) { return NativeCall(this, "AShooterGameMode.GeneratePlayerDataId", NetUniqueID); } + float ModifyNPCSpawnLimits(FName DinoNameTag, float CurrentLimit) { return NativeCall(this, "AShooterGameMode.ModifyNPCSpawnLimits", DinoNameTag, CurrentLimit); } + float GetHarvestResourceItemAmountMultiplier(TSubclassOf HarvestItemClass) { return NativeCall>(this, "AShooterGameMode.GetHarvestResourceItemAmountMultiplier", HarvestItemClass); } + float GetDinoDamageMultiplier(APrimalDinoCharacter * ForDino) { return NativeCall(this, "AShooterGameMode.GetDinoDamageMultiplier", ForDino); } + float GetDinoResistanceMultiplier(APrimalDinoCharacter * ForDino) { return NativeCall(this, "AShooterGameMode.GetDinoResistanceMultiplier", ForDino); } + bool IsEngramClassHidden(TSubclassOf ForItemClass) { return NativeCall>(this, "AShooterGameMode.IsEngramClassHidden", ForItemClass); } + bool IsEngramClassGiveToPlayer(TSubclassOf ForItemClass) { return NativeCall>(this, "AShooterGameMode.IsEngramClassGiveToPlayer", ForItemClass); } + void ListenServerClampPlayerLocations() { NativeCall(this, "AShooterGameMode.ListenServerClampPlayerLocations"); } + FString * ValidateTribeName(FString * result, FString theTribeName) { return NativeCall(this, "AShooterGameMode.ValidateTribeName", result, theTribeName); } + void AdjustDamage(AActor * Victim, float * Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "AShooterGameMode.AdjustDamage", Victim, Damage, DamageEvent, EventInstigator, DamageCauser); } + void SetTimeOfDay(FString * timeString) { NativeCall(this, "AShooterGameMode.SetTimeOfDay", timeString); } + void KickAllPlayersAndReload() { NativeCall(this, "AShooterGameMode.KickAllPlayersAndReload"); } + bool PlayerCanRestart(APlayerController * Player) { return NativeCall(this, "AShooterGameMode.PlayerCanRestart", Player); } + bool HandleNewPlayer_Implementation(AShooterPlayerController * NewPlayer, UPrimalPlayerData * PlayerData, AShooterCharacter * PlayerCharacter, bool bIsFromLogin) { return NativeCall(this, "AShooterGameMode.HandleNewPlayer_Implementation", NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); } + bool IsPlayerAllowedToCheat(AShooterPlayerController * ForPlayer) { return NativeCall(this, "AShooterGameMode.IsPlayerAllowedToCheat", ForPlayer); } + void PrintToGameplayLog(FString * InString) { NativeCall(this, "AShooterGameMode.PrintToGameplayLog", InString); } + void PrintToServerGameLog(FString * InString, bool bSendChatToAllAdmins) { NativeCall(this, "AShooterGameMode.PrintToServerGameLog", InString, bSendChatToAllAdmins); } + void LoadedFromSaveGame() { NativeCall(this, "AShooterGameMode.LoadedFromSaveGame"); } + void RemoveInactivePlayersAndTribes() { NativeCall(this, "AShooterGameMode.RemoveInactivePlayersAndTribes"); } + void DDoSDetected() { NativeCall(this, "AShooterGameMode.DDoSDetected"); } + FString * GetSessionTimeString_Implementation(FString * result) { return NativeCall(this, "AShooterGameMode.GetSessionTimeString_Implementation", result); } + static bool AllowDamage(UWorld * ForWorld, int TargetingTeam1, int TargetingTeam2, bool bIgnoreDamageIfAllied) { return NativeCall(nullptr, "AShooterGameMode.AllowDamage", ForWorld, TargetingTeam1, TargetingTeam2, bIgnoreDamageIfAllied); } + bool IsTribeWar(int TribeID1, int TribeID2) { return NativeCall(this, "AShooterGameMode.IsTribeWar", TribeID1, TribeID2); } + void UpdateTribeWars() { NativeCall(this, "AShooterGameMode.UpdateTribeWars"); } + void AddToTribeLog(int TribeId, FString * NewLog) { NativeCall(this, "AShooterGameMode.AddToTribeLog", TribeId, NewLog); } + TArray * GetOverlappingDinoCharactersOfTeamAndClass(TArray * result, FVector * AtLocation, float OverlapRange, TSubclassOf DinoClass, int DinoTeam, bool bExactClassMatch, bool bIgnoreClass) { return NativeCall *, TArray *, FVector *, float, TSubclassOf, int, bool, bool>(this, "AShooterGameMode.GetOverlappingDinoCharactersOfTeamAndClass", result, AtLocation, OverlapRange, DinoClass, DinoTeam, bExactClassMatch, bIgnoreClass); } + int CountOverlappingDinoCharactersOfTeamAndClass(FVector * AtLocation, float OverlapRange, TSubclassOf DinoClass, int DinoTeam, bool bExactClassMatch, bool bIgnoreClass) { return NativeCall, int, bool, bool>(this, "AShooterGameMode.CountOverlappingDinoCharactersOfTeamAndClass", AtLocation, OverlapRange, DinoClass, DinoTeam, bExactClassMatch, bIgnoreClass); } + void IncrementNumDinos(int ForTeam, int ByAmount) { NativeCall(this, "AShooterGameMode.IncrementNumDinos", ForTeam, ByAmount); } + int GetNumDinosOnTeam(int OnTeam) { return NativeCall(this, "AShooterGameMode.GetNumDinosOnTeam", OnTeam); } + bool AllowTaming(int ForTeam) { return NativeCall(this, "AShooterGameMode.AllowTaming", ForTeam); } + int ForceAddPlayerToTribe(AShooterPlayerState * ForPlayerState, FString * TribeName) { return NativeCall(this, "AShooterGameMode.ForceAddPlayerToTribe", ForPlayerState, TribeName); } + int ForceCreateTribe(FString * TribeName, int TeamOverride) { return NativeCall(this, "AShooterGameMode.ForceCreateTribe", TribeName, TeamOverride); } + int GetNumberOfLivePlayersOnTribe(FString * TribeName) { return NativeCall(this, "AShooterGameMode.GetNumberOfLivePlayersOnTribe", TribeName); } + static bool TriggerLevelCustomEvents(UWorld * InWorld, FString * EventName) { return NativeCall(nullptr, "AShooterGameMode.TriggerLevelCustomEvents", InWorld, EventName); } + void UpdateTribeAllianceData(FTribeAlliance * TribeAllianceData, TArray * OldMembersArray, bool bIsAdd) { NativeCall *, bool>(this, "AShooterGameMode.UpdateTribeAllianceData", TribeAllianceData, OldMembersArray, bIsAdd); } + bool AreTribesAllied(int TribeID1, int TribeID2) { return NativeCall(this, "AShooterGameMode.AreTribesAllied", TribeID1, TribeID2); } + void AddTribeWar(int MyTribeID, int EnemyTeamID, int StartDayNum, int EndDayNumber, float WarStartTime, float WarEndTime, bool bForceApprove) { NativeCall(this, "AShooterGameMode.AddTribeWar", MyTribeID, EnemyTeamID, StartDayNum, EndDayNumber, WarStartTime, WarEndTime, bForceApprove); } + void PostAlarmNotificationTribe(int TribeID, FString Title, FString Message) { NativeCall(this, "AShooterGameMode.PostAlarmNotificationTribe", TribeID, Title, Message); } + void SpawnedPawnFor(AController * PC, APawn * SpawnedPawn) { NativeCall(this, "AShooterGameMode.SpawnedPawnFor", PC, SpawnedPawn); } + void SaveTributePlayerDatas(FString UniqueID) { NativeCall(this, "AShooterGameMode.SaveTributePlayerDatas", UniqueID); } + void LoadTributePlayerDatas(FString UniqueID) { NativeCall(this, "AShooterGameMode.LoadTributePlayerDatas", UniqueID); } + void DownloadTransferredPlayer(AShooterPlayerController * NewPlayer) { NativeCall(this, "AShooterGameMode.DownloadTransferredPlayer", NewPlayer); } + void CheckForDupedDinos() { NativeCall(this, "AShooterGameMode.CheckForDupedDinos"); } +}; + +struct ACustomGameMode : AShooterGameMode +{ +}; + +// Game Data + +struct UPrimalGameData : UObject +{ + FieldValue ModNameField() { return { this, "UPrimalGameData.ModName" }; } + FieldValue ModDescriptionField() { return { this, "UPrimalGameData.ModDescription" }; } + //FieldArray StatusValueDefinitionsField() { return { this, "UPrimalGameData.StatusValueDefinitions" }; } + //FieldArray StatusStateDefinitionsField() { return { this, "UPrimalGameData.StatusStateDefinitions" }; } + //FieldArray ItemStatDefinitionsField() { return { this, "UPrimalGameData.ItemStatDefinitions" }; } + //FieldArray ItemTypeDefinitionsField() { return { this, "UPrimalGameData.ItemTypeDefinitions" }; } + //FieldArray EquipmentTypeDefinitionsField() { return { this, "UPrimalGameData.EquipmentTypeDefinitions" }; } + FieldValue>> MasterItemListField() { return { this, "UPrimalGameData.MasterItemList" }; } + //FieldValue> ItemQualityDefinitionsField() { return { this, "UPrimalGameData.ItemQualityDefinitions" }; } + //FieldValue>> EngramBlueprintClassesField() { return { this, "UPrimalGameData.EngramBlueprintClasses" }; } + //FieldValue>> AdditionalEngramBlueprintClassesField() { return { this, "UPrimalGameData.AdditionalEngramBlueprintClasses" }; } + //FieldValue>> RemoveEngramBlueprintClassesField() { return { this, "UPrimalGameData.RemoveEngramBlueprintClasses" }; } + //FieldValue> StatusValueModifierDescriptionsField() { return { this, "UPrimalGameData.StatusValueModifierDescriptions" }; } + FieldValue> PlayerSpawnRegionsField() { return { this, "UPrimalGameData.PlayerSpawnRegions" }; } + FieldValue TutorialDisplaySoundField() { return { this, "UPrimalGameData.TutorialDisplaySound" }; } + FieldValue Sound_StartItemDragField() { return { this, "UPrimalGameData.Sound_StartItemDrag" }; } + FieldValue Sound_StopItemDragField() { return { this, "UPrimalGameData.Sound_StopItemDrag" }; } + FieldValue Sound_CancelPlacingStructureField() { return { this, "UPrimalGameData.Sound_CancelPlacingStructure" }; } + FieldValue Sound_ChooseStructureRotationField() { return { this, "UPrimalGameData.Sound_ChooseStructureRotation" }; } + FieldValue Sound_FailPlacingStructureField() { return { this, "UPrimalGameData.Sound_FailPlacingStructure" }; } + FieldValue Sound_ConfirmPlacingStructureField() { return { this, "UPrimalGameData.Sound_ConfirmPlacingStructure" }; } + FieldValue Sound_StartPlacingStructureField() { return { this, "UPrimalGameData.Sound_StartPlacingStructure" }; } + FieldValue Sound_CorpseDecomposeField() { return { this, "UPrimalGameData.Sound_CorpseDecompose" }; } + FieldValue Sound_ApplyLevelUpField() { return { this, "UPrimalGameData.Sound_ApplyLevelUp" }; } + FieldValue Sound_ApplyLevelPointField() { return { this, "UPrimalGameData.Sound_ApplyLevelPoint" }; } + FieldValue Sound_LearnedEngramField() { return { this, "UPrimalGameData.Sound_LearnedEngram" }; } + FieldValue Sound_ReconnectToCharacterField() { return { this, "UPrimalGameData.Sound_ReconnectToCharacter" }; } + FieldValue Sound_DropAllItemsField() { return { this, "UPrimalGameData.Sound_DropAllItems" }; } + FieldValue Sound_TransferAllItemsToRemoteField() { return { this, "UPrimalGameData.Sound_TransferAllItemsToRemote" }; } + FieldValue Sound_TransferAllItemsFromRemoteField() { return { this, "UPrimalGameData.Sound_TransferAllItemsFromRemote" }; } + FieldValue Sound_TransferItemToRemoteField() { return { this, "UPrimalGameData.Sound_TransferItemToRemote" }; } + FieldValue Sound_TransferItemFromRemoteField() { return { this, "UPrimalGameData.Sound_TransferItemFromRemote" }; } + FieldValue Sound_AddItemToSlotField() { return { this, "UPrimalGameData.Sound_AddItemToSlot" }; } + FieldValue Sound_RemoveItemFromSlotField() { return { this, "UPrimalGameData.Sound_RemoveItemFromSlot" }; } + FieldValue Sound_ClearCraftQueueField() { return { this, "UPrimalGameData.Sound_ClearCraftQueue" }; } + FieldValue Sound_AddToCraftQueueField() { return { this, "UPrimalGameData.Sound_AddToCraftQueue" }; } + FieldValue Sound_SetRadioFrequencyField() { return { this, "UPrimalGameData.Sound_SetRadioFrequency" }; } + FieldValue Sound_AddPinToMapField() { return { this, "UPrimalGameData.Sound_AddPinToMap" }; } + FieldValue Sound_RemovePinFromMapField() { return { this, "UPrimalGameData.Sound_RemovePinFromMap" }; } + FieldValue Sound_ApplyDyeField() { return { this, "UPrimalGameData.Sound_ApplyDye" }; } + FieldValue Sound_ApplyPaintField() { return { this, "UPrimalGameData.Sound_ApplyPaint" }; } + FieldValue Sound_SetTextGenericField() { return { this, "UPrimalGameData.Sound_SetTextGeneric" }; } + FieldValue Sound_SplitItemStackField() { return { this, "UPrimalGameData.Sound_SplitItemStack" }; } + FieldValue Sound_MergeItemStackField() { return { this, "UPrimalGameData.Sound_MergeItemStack" }; } + FieldValue Sound_InputPinDigitField() { return { this, "UPrimalGameData.Sound_InputPinDigit" }; } + FieldValue Sound_PinValidatedField() { return { this, "UPrimalGameData.Sound_PinValidated" }; } + FieldValue Sound_PinRejectedField() { return { this, "UPrimalGameData.Sound_PinRejected" }; } + FieldValue Sound_TribeWarBeginField() { return { this, "UPrimalGameData.Sound_TribeWarBegin" }; } + FieldValue Sound_TribeWarEndField() { return { this, "UPrimalGameData.Sound_TribeWarEnd" }; } + FieldValue Sound_DropInventoryItemField() { return { this, "UPrimalGameData.Sound_DropInventoryItem" }; } + FieldValue Sound_RefillWaterContainerField() { return { this, "UPrimalGameData.Sound_RefillWaterContainer" }; } + FieldValue> StarterNoteItemField() { return { this, "UPrimalGameData.StarterNoteItem" }; } + FieldValue>> PrimaryResourcesField() { return { this, "UPrimalGameData.PrimaryResources" }; } + FieldValue> GenericDroppedItemTemplateField() { return { this, "UPrimalGameData.GenericDroppedItemTemplate" }; } + FieldValue PostProcess_KnockoutBlurField() { return { this, "UPrimalGameData.PostProcess_KnockoutBlur" }; } + FieldValue> BuffPostProcessEffectsField() { return { this, "UPrimalGameData.BuffPostProcessEffects" }; } + FieldValue> AdditionalBuffPostProcessEffectsField() { return { this, "UPrimalGameData.AdditionalBuffPostProcessEffects" }; } + FieldValue UnknownIconField() { return { this, "UPrimalGameData.UnknownIcon" }; } + FieldValue UnknownMaterialField() { return { this, "UPrimalGameData.UnknownMaterial" }; } + FieldValue WhiteTextureField() { return { this, "UPrimalGameData.WhiteTexture" }; } + FieldValue BlueprintBackgroundField() { return { this, "UPrimalGameData.BlueprintBackground" }; } + FieldValue BabyCuddleIconField() { return { this, "UPrimalGameData.BabyCuddleIcon" }; } + FieldValue ImprintedRiderIconField() { return { this, "UPrimalGameData.ImprintedRiderIcon" }; } + FieldValue WeaponAccessoryActivatedIconField() { return { this, "UPrimalGameData.WeaponAccessoryActivatedIcon" }; } + FieldValue EngramBackgroundField() { return { this, "UPrimalGameData.EngramBackground" }; } + FieldValue VoiceChatIconField() { return { this, "UPrimalGameData.VoiceChatIcon" }; } + FieldValue ItemButtonRecentlySelectedBackgroundField() { return { this, "UPrimalGameData.ItemButtonRecentlySelectedBackground" }; } + FieldValue GlobalGeneralArmorDegradationMultiplierField() { return { this, "UPrimalGameData.GlobalGeneralArmorDegradationMultiplier" }; } + FieldValue GlobalSpecificArmorDegradationMultiplierField() { return { this, "UPrimalGameData.GlobalSpecificArmorDegradationMultiplier" }; } + FieldValue GlobalSpecificArmorRatingMultiplierField() { return { this, "UPrimalGameData.GlobalSpecificArmorRatingMultiplier" }; } + FieldValue GlobalGeneralArmorRatingMultiplierField() { return { this, "UPrimalGameData.GlobalGeneralArmorRatingMultiplier" }; } + FieldValue EnemyFoundationPreventionRadiusField() { return { this, "UPrimalGameData.EnemyFoundationPreventionRadius" }; } + FieldValue> ExtraResourcesField() { return { this, "UPrimalGameData.ExtraResources" }; } + FieldValue> BaseExtraResourcesField() { return { this, "UPrimalGameData.BaseExtraResources" }; } + FieldValue> BaseExtraResourcesContainerField() { return { this, "UPrimalGameData.BaseExtraResourcesContainer" }; } + FieldValue CombatMusicDayField() { return { this, "UPrimalGameData.CombatMusicDay" }; } + FieldValue CombatMusicNightField() { return { this, "UPrimalGameData.CombatMusicNight" }; } + FieldValue CombatMusicDay_HeavyField() { return { this, "UPrimalGameData.CombatMusicDay_Heavy" }; } + FieldValue CombatMusicNight_HeavyField() { return { this, "UPrimalGameData.CombatMusicNight_Heavy" }; } + FieldValue LevelUpStingerSoundField() { return { this, "UPrimalGameData.LevelUpStingerSound" }; } + FieldValue> DefaultGameModeField() { return { this, "UPrimalGameData.DefaultGameMode" }; } + FieldArray LevelExperienceRampsField() { return { this, "UPrimalGameData.LevelExperienceRamps" }; } + FieldArray SinglePlayerLevelExperienceRampsField() { return { this, "UPrimalGameData.SinglePlayerLevelExperienceRamps" }; } + FieldValue> PlayerLevelEngramPointsField() { return { this, "UPrimalGameData.PlayerLevelEngramPoints" }; } + FieldValue> PlayerLevelEngramPointsSPField() { return { this, "UPrimalGameData.PlayerLevelEngramPointsSP" }; } + FieldValue> PreventBuildStructureReasonStringsField() { return { this, "UPrimalGameData.PreventBuildStructureReasonStrings" }; } + //FieldValue> Remap_NPCField() { return { this, "UPrimalGameData.Remap_NPC" }; } + //FieldValue> Remap_SupplyCratesField() { return { this, "UPrimalGameData.Remap_SupplyCrates" }; } + //FieldValue> Remap_ResourceComponentsField() { return { this, "UPrimalGameData.Remap_ResourceComponents" }; } + //FieldValue> Remap_NPCSpawnEntriesField() { return { this, "UPrimalGameData.Remap_NPCSpawnEntries" }; } + //FieldValue> Remap_EngramsField() { return { this, "UPrimalGameData.Remap_Engrams" }; } + //FieldValue> Remap_ItemsField() { return { this, "UPrimalGameData.Remap_Items" }; } + //FieldValue> AdditionalStructureEngramsField() { return { this, "UPrimalGameData.AdditionalStructureEngrams" }; } + //FieldValue> AdditionalDefaultBuffsField() { return { this, "UPrimalGameData.AdditionalDefaultBuffs" }; } + FieldValue> ActorToSpawnUponEnemyCoreStructureDeathField() { return { this, "UPrimalGameData.ActorToSpawnUponEnemyCoreStructureDeath" }; } + FieldValue>> AdditionalStructuresToPlaceField() { return { this, "UPrimalGameData.AdditionalStructuresToPlace" }; } + //FieldValue>> MasterDyeListField() { return { this, "UPrimalGameData.MasterDyeList" }; } + FieldValue> MasterColorTableField() { return { this, "UPrimalGameData.MasterColorTable" }; } + FieldValue EnemyCoreStructureDeathActorRadiusBuildCheckField() { return { this, "UPrimalGameData.EnemyCoreStructureDeathActorRadiusBuildCheck" }; } + FieldValue> DeathDestructionDepositInventoryClassField() { return { this, "UPrimalGameData.DeathDestructionDepositInventoryClass" }; } + FieldValue MateBoostIconField() { return { this, "UPrimalGameData.MateBoostIcon" }; } + FieldValue EggBoostIconField() { return { this, "UPrimalGameData.EggBoostIcon" }; } + FieldValue MatingIconField() { return { this, "UPrimalGameData.MatingIcon" }; } + FieldValue NearFeedIconField() { return { this, "UPrimalGameData.NearFeedIcon" }; } + FieldValue BuffedIconField() { return { this, "UPrimalGameData.BuffedIcon" }; } + FieldValue GamepadFaceButtonTopField() { return { this, "UPrimalGameData.GamepadFaceButtonTop" }; } + FieldValue GamepadFaceButtonBottomField() { return { this, "UPrimalGameData.GamepadFaceButtonBottom" }; } + FieldValue GamepadFaceButtonLeftField() { return { this, "UPrimalGameData.GamepadFaceButtonLeft" }; } + FieldValue GamepadFaceButtonRightField() { return { this, "UPrimalGameData.GamepadFaceButtonRight" }; } + FieldValue TribeXPSharePercentField() { return { this, "UPrimalGameData.TribeXPSharePercent" }; } + FieldValue OverrideServerPhysXSubstepsField() { return { this, "UPrimalGameData.OverrideServerPhysXSubsteps" }; } + FieldValue OverrideServerPhysXSubstepsDeltaTimeField() { return { this, "UPrimalGameData.OverrideServerPhysXSubstepsDeltaTime" }; } + FieldValue bInitializedField() { return { this, "UPrimalGameData.bInitialized" }; } + FieldArray Sound_TamedDinosField() { return { this, "UPrimalGameData.Sound_TamedDinos" }; } + FieldValue Sound_ItemStartCraftingField() { return { this, "UPrimalGameData.Sound_ItemStartCrafting" }; } + FieldValue Sound_ItemFinishCraftingField() { return { this, "UPrimalGameData.Sound_ItemFinishCrafting" }; } + FieldValue Sound_ItemStartRepairingField() { return { this, "UPrimalGameData.Sound_ItemStartRepairing" }; } + FieldValue Sound_ItemFinishRepairingField() { return { this, "UPrimalGameData.Sound_ItemFinishRepairing" }; } + FieldValue MinPaintDurationConsumptionField() { return { this, "UPrimalGameData.MinPaintDurationConsumption" }; } + FieldValue MaxPaintDurationConsumptionField() { return { this, "UPrimalGameData.MaxPaintDurationConsumption" }; } + FieldValue MinDinoRadiusForPaintConsumptionField() { return { this, "UPrimalGameData.MinDinoRadiusForPaintConsumption" }; } + FieldValue MaxDinoRadiusForPaintConsumptionField() { return { this, "UPrimalGameData.MaxDinoRadiusForPaintConsumption" }; } + //FieldValue> DinoBabySetupsField() { return { this, "UPrimalGameData.DinoBabySetups" }; } + //FieldValue> DinoGestationSetupsField() { return { this, "UPrimalGameData.DinoGestationSetups" }; } + FieldValue> SoapItemTemplateField() { return { this, "UPrimalGameData.SoapItemTemplate" }; } + FieldValue NameTagWildcardAdminField() { return { this, "UPrimalGameData.NameTagWildcardAdmin" }; } + FieldValue NameTagServerAdminField() { return { this, "UPrimalGameData.NameTagServerAdmin" }; } + FieldValue NameTagTribeAdminField() { return { this, "UPrimalGameData.NameTagTribeAdmin" }; } + FieldValue> BadgeGroupsNameTagField() { return { this, "UPrimalGameData.BadgeGroupsNameTag" }; } + FieldValue> AchievementIDsField() { return { this, "UPrimalGameData.AchievementIDs" }; } + FieldValue, FDefaultSetAllocator>> AchievementIDSetField() { return { this, "UPrimalGameData.AchievementIDSet" }; } + FieldValue> AdditionalEggWeightsToSpawnField() { return { this, "UPrimalGameData.AdditionalEggWeightsToSpawn" }; } + FieldValue>> AdditionalEggItemsToSpawnField() { return { this, "UPrimalGameData.AdditionalEggItemsToSpawn" }; } + FieldValue> FertilizedAdditionalEggWeightsToSpawnField() { return { this, "UPrimalGameData.FertilizedAdditionalEggWeightsToSpawn" }; } + FieldValue>> FertilizedAdditionalEggItemsToSpawnField() { return { this, "UPrimalGameData.FertilizedAdditionalEggItemsToSpawn" }; } + FieldValue ItemAchievementsNameField() { return { this, "UPrimalGameData.ItemAchievementsName" }; } + FieldValue>> ItemAchievementsListField() { return { this, "UPrimalGameData.ItemAchievementsList" }; } + FieldValue>> GlobalCuddleFoodListField() { return { this, "UPrimalGameData.GlobalCuddleFoodList" }; } + FieldValue DinoIncrementedImprintingSoundField() { return { this, "UPrimalGameData.DinoIncrementedImprintingSound" }; } + FieldValue HitMarkerCharacterSoundField() { return { this, "UPrimalGameData.HitMarkerCharacterSound" }; } + FieldValue HitMarkerStructureSoundField() { return { this, "UPrimalGameData.HitMarkerStructureSound" }; } + FieldValue PostProcess_ColorLUTField() { return { this, "UPrimalGameData.PostProcess_ColorLUT" }; } + FieldValue Sound_DossierUnlockedField() { return { this, "UPrimalGameData.Sound_DossierUnlocked" }; } + FieldValue Sound_ItemUseOnItemField() { return { this, "UPrimalGameData.Sound_ItemUseOnItem" }; } + FieldValue Sound_RemoveItemSkinField() { return { this, "UPrimalGameData.Sound_RemoveItemSkin" }; } + FieldValue Sound_RemoveClipAmmoField() { return { this, "UPrimalGameData.Sound_RemoveClipAmmo" }; } + FieldValue ExplorerNoteXPGainField() { return { this, "UPrimalGameData.ExplorerNoteXPGain" }; } + FieldArray BuffTypeBackgroundsField() { return { this, "UPrimalGameData.BuffTypeBackgrounds" }; } + FieldArray BuffTypeForegroundsField() { return { this, "UPrimalGameData.BuffTypeForegrounds" }; } + FieldValue> ExplorerNoteXPBuffField() { return { this, "UPrimalGameData.ExplorerNoteXPBuff" }; } + FieldValue PerMapExplorerNoteLockedIconField() { return { this, "UPrimalGameData.PerMapExplorerNoteLockedIcon" }; } + FieldValue TamedDinoUnlockedIconField() { return { this, "UPrimalGameData.TamedDinoUnlockedIcon" }; } + FieldValue TamedDinoLockedIconField() { return { this, "UPrimalGameData.TamedDinoLockedIcon" }; } + FieldValue DinoOrderIconField() { return { this, "UPrimalGameData.DinoOrderIcon" }; } + FieldValue>> ServerExtraWorldSingletonActorClassesField() { return { this, "UPrimalGameData.ServerExtraWorldSingletonActorClasses" }; } + FieldValue bForceServerUseDinoListField() { return { this, "UPrimalGameData.bForceServerUseDinoList" }; } + FieldValue>> ExtraStackedGameDataClassesField() { return { this, "UPrimalGameData.ExtraStackedGameDataClasses" }; } + FieldValue> ExtraEggItemField() { return { this, "UPrimalGameData.ExtraEggItem" }; } + FieldValue GenericWaterPostprocessAmbientSoundField() { return { this, "UPrimalGameData.GenericWaterPostprocessAmbientSound" }; } + FieldValue> OverridePlayerDataClassField() { return { this, "UPrimalGameData.OverridePlayerDataClass" }; } + FieldValue> AllDinosAchievementNameTagsField() { return { this, "UPrimalGameData.AllDinosAchievementNameTags" }; } + FieldValue GenericArrowPickedUpSoundField() { return { this, "UPrimalGameData.GenericArrowPickedUpSound" }; } + FieldValue UnlockIconField() { return { this, "UPrimalGameData.UnlockIcon" }; } + FieldValue WheelFolderColorField() { return { this, "UPrimalGameData.WheelFolderColor" }; } + FieldValue WheelBackColorField() { return { this, "UPrimalGameData.WheelBackColor" }; } + FieldValue MaxInventoryIconField() { return { this, "UPrimalGameData.MaxInventoryIcon" }; } + FieldValue ItemSkinIconField() { return { this, "UPrimalGameData.ItemSkinIcon" }; } + FieldValue>> SkeletalPhysCustomBodyAdditionalIgnoresField() { return { this, "UPrimalGameData.SkeletalPhysCustomBodyAdditionalIgnores" }; } + FieldValue ActionWheelClickSoundField() { return { this, "UPrimalGameData.ActionWheelClickSound" }; } + FieldValue Sound_GenericBoardPassengerField() { return { this, "UPrimalGameData.Sound_GenericBoardPassenger" }; } + FieldValue Sound_GenericUnboardPassengerField() { return { this, "UPrimalGameData.Sound_GenericUnboardPassenger" }; } + FieldValue Sound_CraftingTabToggleField() { return { this, "UPrimalGameData.Sound_CraftingTabToggle" }; } + FieldValue> GenericBatteryItemClassField() { return { this, "UPrimalGameData.GenericBatteryItemClass" }; } + //FieldValue >> ItemEngramMapField() { return { this, "UPrimalGameData.ItemEngramMap" }; } +}; + +struct UGameInstance : UObject //, FExec +{ + /*FWorldContext *WorldContext; + TArray LocalPlayers; + FString PIEMapName;*/ +}; + +struct UShooterGameInstance : UGameInstance +{ + /*FName CurrentState; + bool bCanUseUserGeneratedContent; + bool bHasCommunicationPrivilige; + TBaseDelegate_ThreeParams OnGetUserCommunicationPrivilegeCompleteDelegate; + FString WelcomeScreenMap; + FString MainMenuMap; + FName PendingState; + FShooterPendingMessage PendingMessage; + FShooterPendingInvite PendingInvite; + FString TravelURL; + bool bIsOnline; + bool bPendingEnableSplitscreen; + bool bIsLicensed; + int IgnorePairingChangeForControllerId; + EOnlineServerConnectionStatus::Type CurrentConnectionStatus; + TBaseDelegate_RetVal_OneParam TickDelegate; + TBaseDelegate_TwoParams OnEndSessionCompleteDelegate; + TWeakObjectPtr RagdollKinematicActor; + TWeakObjectPtr DayCycleManager; + TWeakObjectPtr SOTFNotificationManager; + int bOnReturnToMainMenuNotification; + FString OnReturnToMainMenuNotificationMessage; + FString OnReturnToMainMenuNotificationTitle; + FString GlobalMainMenuMessage; + FString GlobalMainMenuTitle; + TBaseDelegate_OneParam GlobalMainMenuDialogDelegate; + bool bHasReceivedNewsMessage; + bool bHasOfficialStatusMessage; + FString NewsMessage; + FString OfficialStatusMessage; + FWindowsCriticalSection TerrainGenerationMutex; + FString TerrainGenerationProgressBarMsg; + float SecondsSpentGeneratingTerrain; + bool TerrainIsGenerating;*/ +}; diff --git a/version/Core/Public/API/ARK/GameState.h b/version/Core/Public/API/ARK/GameState.h new file mode 100644 index 0000000..582e938 --- /dev/null +++ b/version/Core/Public/API/ARK/GameState.h @@ -0,0 +1,295 @@ +#pragma once + +struct AGameState +{ + FieldValue> GameModeClassField() { return { this, "AGameState.GameModeClass" }; } + FieldValue AuthorityGameModeField() { return { this, "AGameState.AuthorityGameMode" }; } + FieldValue> SpectatorClassField() { return { this, "AGameState.SpectatorClass" }; } + FieldValue MatchStateField() { return { this, "AGameState.MatchState" }; } + FieldValue PreviousMatchStateField() { return { this, "AGameState.PreviousMatchState" }; } + FieldValue ElapsedTimeField() { return { this, "AGameState.ElapsedTime" }; } + FieldValue> PlayerArrayField() { return { this, "AGameState.PlayerArray" }; } + FieldValue> InactivePlayerArrayField() { return { this, "AGameState.InactivePlayerArray" }; } + + // Functions + + bool TeleportTo(FVector * DestLocation, FRotator * DestRotation, bool bIsATest, bool bNoCheck) { return NativeCall(this, "AGameState.TeleportTo", DestLocation, DestRotation, bIsATest, bNoCheck); } + static UClass * GetPrivateStaticClass() { return NativeCall(nullptr, "AGameState.GetPrivateStaticClass"); } + void DefaultTimer() { NativeCall(this, "AGameState.DefaultTimer"); } + void PostInitializeComponents() { NativeCall(this, "AGameState.PostInitializeComponents"); } + void OnRep_GameModeClass() { NativeCall(this, "AGameState.OnRep_GameModeClass"); } + void OnRep_SpectatorClass() { NativeCall(this, "AGameState.OnRep_SpectatorClass"); } + void ReceivedGameModeClass() { NativeCall(this, "AGameState.ReceivedGameModeClass"); } + void ReceivedSpectatorClass() { NativeCall(this, "AGameState.ReceivedSpectatorClass"); } + void SeamlessTravelTransitionCheckpoint(bool bToTransitionMap) { NativeCall(this, "AGameState.SeamlessTravelTransitionCheckpoint", bToTransitionMap); } + void AddPlayerState(APlayerState * PlayerState) { NativeCall(this, "AGameState.AddPlayerState", PlayerState); } + void RemovePlayerState(APlayerState * PlayerState) { NativeCall(this, "AGameState.RemovePlayerState", PlayerState); } + void HandleMatchIsWaitingToStart() { NativeCall(this, "AGameState.HandleMatchIsWaitingToStart"); } + void HandleMatchHasStarted() { NativeCall(this, "AGameState.HandleMatchHasStarted"); } + bool HasMatchStarted() { return NativeCall(this, "AGameState.HasMatchStarted"); } + bool IsMatchInProgress() { return NativeCall(this, "AGameState.IsMatchInProgress"); } + bool HasMatchEnded() { return NativeCall(this, "AGameState.HasMatchEnded"); } + void OnRep_MatchState() { NativeCall(this, "AGameState.OnRep_MatchState"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AGameState.GetLifetimeReplicatedProps", OutLifetimeProps); } + void NetSpawnActorAtLocation(TSubclassOf AnActorClass, FVector_NetQuantize AtLocation, FRotator_NetQuantize AtRotation, AActor * EffectOwnerToIgnore, float MaxRangeToReplicate, USceneComponent * attachToComponent, int dataIndex, FName attachSocketName, bool bOnlySendToEffectOwner) { NativeCall, FVector_NetQuantize, FRotator_NetQuantize, AActor *, float, USceneComponent *, int, FName, bool>(this, "AGameState.NetSpawnActorAtLocation", AnActorClass, AtLocation, AtRotation, EffectOwnerToIgnore, MaxRangeToReplicate, attachToComponent, dataIndex, attachSocketName, bOnlySendToEffectOwner); } + bool Semaphore_TryGrab(FName SemaphoreName, AActor * InObject, float PriorityWeight, int MaxToAllocate) { return NativeCall(this, "AGameState.Semaphore_TryGrab", SemaphoreName, InObject, PriorityWeight, MaxToAllocate); } + bool Semaphore_Release(FName SemaphoreName, AActor * InObject) { return NativeCall(this, "AGameState.Semaphore_Release", SemaphoreName, InObject); } +}; + +struct AShooterGameState : AGameState +{ + FieldValue NumNPCField() { return { this, "AShooterGameState.NumNPC" }; } + FieldValue NumHibernatedNPCField() { return { this, "AShooterGameState.NumHibernatedNPC" }; } + FieldValue NumActiveNPCField() { return { this, "AShooterGameState.NumActiveNPC" }; } + FieldValue NumDeadNPCField() { return { this, "AShooterGameState.NumDeadNPC" }; } + FieldValue NumPlayerActorsField() { return { this, "AShooterGameState.NumPlayerActors" }; } + FieldValue NumPlayerConnectedField() { return { this, "AShooterGameState.NumPlayerConnected" }; } + FieldValue bServerUseLocalizedChatField() { return { this, "AShooterGameState.bServerUseLocalizedChat" }; } + FieldValue LocalizedChatRadiusField() { return { this, "AShooterGameState.LocalizedChatRadius" }; } + FieldValue LocalizedChatRadiusUnconsiousScaleField() { return { this, "AShooterGameState.LocalizedChatRadiusUnconsiousScale" }; } + FieldValue ServerFramerateField() { return { this, "AShooterGameState.ServerFramerate" }; } + FieldValue NewStructureDestructionTagField() { return { this, "AShooterGameState.NewStructureDestructionTag" }; } + FieldValue DayNumberField() { return { this, "AShooterGameState.DayNumber" }; } + FieldValue DayTimeField() { return { this, "AShooterGameState.DayTime" }; } + FieldValue NetworkTimeField() { return { this, "AShooterGameState.NetworkTime" }; } + FieldValue TimeUTCField() { return { this, "AShooterGameState.TimeUTC" }; } + FieldValue bIsOfficialServerField() { return { this, "AShooterGameState.bIsOfficialServer" }; } + FieldValue bIsListenServerField() { return { this, "AShooterGameState.bIsListenServer" }; } + FieldValue bIsDediServerField() { return { this, "AShooterGameState.bIsDediServer" }; } + FieldValue bIsArkTributeAvailableField() { return { this, "AShooterGameState.bIsArkTributeAvailable" }; } + FieldValue bIsArkDownloadsAllowedField() { return { this, "AShooterGameState.bIsArkDownloadsAllowed" }; } + FieldValue bAllowThirdPersonPlayerField() { return { this, "AShooterGameState.bAllowThirdPersonPlayer" }; } + FieldValue bServerHardcoreField() { return { this, "AShooterGameState.bServerHardcore" }; } + FieldValue bServerPVEField() { return { this, "AShooterGameState.bServerPVE" }; } + FieldValue bAutoPvEField() { return { this, "AShooterGameState.bAutoPvE" }; } + FieldValue bServerCrosshairField() { return { this, "AShooterGameState.bServerCrosshair" }; } + FieldValue bServerForceNoHUDField() { return { this, "AShooterGameState.bServerForceNoHUD" }; } + FieldValue bFlyerPlatformAllowUnalignedDinoBasingField() { return { this, "AShooterGameState.bFlyerPlatformAllowUnalignedDinoBasing" }; } + FieldValue bMapPlayerLocationField() { return { this, "AShooterGameState.bMapPlayerLocation" }; } + FieldValue bPvEDisableFriendlyFireField() { return { this, "AShooterGameState.bPvEDisableFriendlyFire" }; } + FieldValue bPvEAllowTribeWarField() { return { this, "AShooterGameState.bPvEAllowTribeWar" }; } + FieldValue bPvEAllowTribeWarCancelField() { return { this, "AShooterGameState.bPvEAllowTribeWarCancel" }; } + FieldValue bEnablePvPGammaField() { return { this, "AShooterGameState.bEnablePvPGamma" }; } + FieldValue bDisablePvEGammaField() { return { this, "AShooterGameState.bDisablePvEGamma" }; } + FieldValue NumTamedDinosField() { return { this, "AShooterGameState.NumTamedDinos" }; } + FieldValue MaxStructuresInRangeField() { return { this, "AShooterGameState.MaxStructuresInRange" }; } + FieldValue DayCycleSpeedScaleField() { return { this, "AShooterGameState.DayCycleSpeedScale" }; } + FieldValue DayTimeSpeedScaleField() { return { this, "AShooterGameState.DayTimeSpeedScale" }; } + FieldValue NightTimeSpeedScaleField() { return { this, "AShooterGameState.NightTimeSpeedScale" }; } + FieldValue PvEStructureDecayPeriodMultiplierField() { return { this, "AShooterGameState.PvEStructureDecayPeriodMultiplier" }; } + FieldValue PvEDinoDecayPeriodMultiplierField() { return { this, "AShooterGameState.PvEDinoDecayPeriodMultiplier" }; } + FieldValue PerPlatformMaxStructuresMultiplierField() { return { this, "AShooterGameState.PerPlatformMaxStructuresMultiplier" }; } + FieldValue bDisableStructureDecayPvEField() { return { this, "AShooterGameState.bDisableStructureDecayPvE" }; } + FieldValue bDisableDinoDecayPvEField() { return { this, "AShooterGameState.bDisableDinoDecayPvE" }; } + FieldValue bAllowCaveBuildingPvEField() { return { this, "AShooterGameState.bAllowCaveBuildingPvE" }; } + FieldValue bPreventDownloadSurvivorsField() { return { this, "AShooterGameState.bPreventDownloadSurvivors" }; } + FieldValue bReachedPlatformStructureLimitField() { return { this, "AShooterGameState.bReachedPlatformStructureLimit" }; } + FieldValue bAdminLoggingField() { return { this, "AShooterGameState.bAdminLogging" }; } + FieldValue bPvPStructureDecayField() { return { this, "AShooterGameState.bPvPStructureDecay" }; } + FieldValue bPreventDownloadDinosField() { return { this, "AShooterGameState.bPreventDownloadDinos" }; } + FieldValue bPreventDownloadItemsField() { return { this, "AShooterGameState.bPreventDownloadItems" }; } + FieldValue bPreventUploadDinosField() { return { this, "AShooterGameState.bPreventUploadDinos" }; } + FieldValue bPreventUploadItemsField() { return { this, "AShooterGameState.bPreventUploadItems" }; } + FieldValue bPreventUploadSurvivorsField() { return { this, "AShooterGameState.bPreventUploadSurvivors" }; } + FieldValue bPreventMateBoostField() { return { this, "AShooterGameState.bPreventMateBoost" }; } + FieldValue bPreventStructurePaintingField() { return { this, "AShooterGameState.bPreventStructurePainting" }; } + FieldValue bAllowCharacterCreationField() { return { this, "AShooterGameState.bAllowCharacterCreation" }; } + FieldValue bAllowSpawnPointSelectionField() { return { this, "AShooterGameState.bAllowSpawnPointSelection" }; } + FieldValue MaxTamedDinosField() { return { this, "AShooterGameState.MaxTamedDinos" }; } + FieldValue bDisableSpawnAnimationsField() { return { this, "AShooterGameState.bDisableSpawnAnimations" }; } + FieldValue PlayerListStringField() { return { this, "AShooterGameState.PlayerListString" }; } + FieldValue GlobalSpoilingTimeMultiplierField() { return { this, "AShooterGameState.GlobalSpoilingTimeMultiplier" }; } + FieldValue GlobalItemDecompositionTimeMultiplierField() { return { this, "AShooterGameState.GlobalItemDecompositionTimeMultiplier" }; } + FieldValue MaxNumberOfPlayersInTribeField() { return { this, "AShooterGameState.MaxNumberOfPlayersInTribe" }; } + FieldValue GlobalCorpseDecompositionTimeMultiplierField() { return { this, "AShooterGameState.GlobalCorpseDecompositionTimeMultiplier" }; } + FieldValue EggHatchSpeedMultiplierField() { return { this, "AShooterGameState.EggHatchSpeedMultiplier" }; } + FieldValue bAllowPaintingWithoutResourcesField() { return { this, "AShooterGameState.bAllowPaintingWithoutResources" }; } + FieldValue bEnableExtraStructurePreventionVolumesField() { return { this, "AShooterGameState.bEnableExtraStructurePreventionVolumes" }; } + //FieldValue> OverrideItemCraftingCostsField() { return { this, "AShooterGameState.OverrideItemCraftingCosts" }; } + FieldValue LastServerSaveTimeField() { return { this, "AShooterGameState.LastServerSaveTime" }; } + FieldValue ServerSaveIntervalField() { return { this, "AShooterGameState.ServerSaveInterval" }; } + FieldValue DynamicMusicAudioComponentField() { return { this, "AShooterGameState.DynamicMusicAudioComponent" }; } + FieldValue DynamicMusicAudioComponent2Field() { return { this, "AShooterGameState.DynamicMusicAudioComponent2" }; } + FieldValue bPlayingDynamicMusicField() { return { this, "AShooterGameState.bPlayingDynamicMusic" }; } + FieldValue bPlayingDynamicMusic1Field() { return { this, "AShooterGameState.bPlayingDynamicMusic1" }; } + FieldValue bPlayingDynamicMusic2Field() { return { this, "AShooterGameState.bPlayingDynamicMusic2" }; } + FieldValue LastHadMusicTimeField() { return { this, "AShooterGameState.LastHadMusicTime" }; } + FieldValue> LevelExperienceRampOverridesField() { return { this, "AShooterGameState.LevelExperienceRampOverrides" }; } + //FieldValue> OverrideEngramEntriesField() { return { this, "AShooterGameState.OverrideEngramEntries" }; } + FieldValue> PreventDinoTameClassNamesField() { return { this, "AShooterGameState.PreventDinoTameClassNames" }; } + FieldValue ListenServerTetherDistanceMultiplierField() { return { this, "AShooterGameState.ListenServerTetherDistanceMultiplier" }; } + FieldValue PGMapNameField() { return { this, "AShooterGameState.PGMapName" }; } + FieldValue> SupportedSpawnRegionsField() { return { this, "AShooterGameState.SupportedSpawnRegions" }; } + FieldValue StaticOverrideMusicField() { return { this, "AShooterGameState.StaticOverrideMusic" }; } + FieldValue bEnableDeathTeamSpectatorField() { return { this, "AShooterGameState.bEnableDeathTeamSpectator" }; } + FieldValue PlayerFloatingHUDOffsetField() { return { this, "AShooterGameState.PlayerFloatingHUDOffset" }; } + FieldValue PlayerFloatingHUDOffsetScreenYField() { return { this, "AShooterGameState.PlayerFloatingHUDOffsetScreenY" }; } + FieldValue StructureDamageRepairCooldownField() { return { this, "AShooterGameState.StructureDamageRepairCooldown" }; } + FieldValue bForceAllStructureLockingField() { return { this, "AShooterGameState.bForceAllStructureLocking" }; } + FieldValue bAllowCustomRecipesField() { return { this, "AShooterGameState.bAllowCustomRecipes" }; } + FieldValue bAllowRaidDinoFeedingField() { return { this, "AShooterGameState.bAllowRaidDinoFeeding" }; } + FieldValue CustomRecipeEffectivenessMultiplierField() { return { this, "AShooterGameState.CustomRecipeEffectivenessMultiplier" }; } + FieldValue CustomRecipeSkillMultiplierField() { return { this, "AShooterGameState.CustomRecipeSkillMultiplier" }; } + FieldValue OverrideAreaMusicField() { return { this, "AShooterGameState.OverrideAreaMusic" }; } + FieldValue OverrideAreaMusicPositionField() { return { this, "AShooterGameState.OverrideAreaMusicPosition" }; } + FieldValue OverrideAreaMusicRangeField() { return { this, "AShooterGameState.OverrideAreaMusicRange" }; } + FieldValue bAllowUnclaimDinosField() { return { this, "AShooterGameState.bAllowUnclaimDinos" }; } + FieldValue FloatingHUDRangeField() { return { this, "AShooterGameState.FloatingHUDRange" }; } + FieldValue FloatingChatRangeField() { return { this, "AShooterGameState.FloatingChatRange" }; } + FieldValue ExtinctionEventTimeIntervalField() { return { this, "AShooterGameState.ExtinctionEventTimeInterval" }; } + FieldValue ExtinctionEventPercentField() { return { this, "AShooterGameState.ExtinctionEventPercent" }; } + FieldValue ExtinctionEventSecondsRemainingField() { return { this, "AShooterGameState.ExtinctionEventSecondsRemaining" }; } + FieldValue bDoExtinctionEventField() { return { this, "AShooterGameState.bDoExtinctionEvent" }; } + FieldValue bPreventOfflinePvPField() { return { this, "AShooterGameState.bPreventOfflinePvP" }; } + FieldValue bPvPDinoDecayField() { return { this, "AShooterGameState.bPvPDinoDecay" }; } + FieldValue bForceUseInventoryAppendsField() { return { this, "AShooterGameState.bForceUseInventoryAppends" }; } + FieldValue bOverideStructurePlatformPreventionField() { return { this, "AShooterGameState.bOverideStructurePlatformPrevention" }; } + FieldValue> PreventOfflinePvPLiveTeamsField() { return { this, "AShooterGameState.PreventOfflinePvPLiveTeams" }; } + FieldValue> PreventOfflinePvPExpiringTeamsField() { return { this, "AShooterGameState.PreventOfflinePvPExpiringTeams" }; } + FieldValue> PreventOfflinePvPExpiringTimesField() { return { this, "AShooterGameState.PreventOfflinePvPExpiringTimes" }; } + FieldValue >> PreventOfflinePvPLiveTimesField() { return { this, "AShooterGameState.PreventOfflinePvPLiveTimes" }; } + FieldValue bAllowAnyoneBabyImprintCuddleField() { return { this, "AShooterGameState.bAllowAnyoneBabyImprintCuddle" }; } + FieldValue bDisableImprintDinoBuffField() { return { this, "AShooterGameState.bDisableImprintDinoBuff" }; } + FieldValue MaxPersonalTamedDinosField() { return { this, "AShooterGameState.MaxPersonalTamedDinos" }; } + FieldValue bIsCustomMapField() { return { this, "AShooterGameState.bIsCustomMap" }; } + FieldValue bIsClientField() { return { this, "AShooterGameState.bIsClient" }; } + FieldValue bIsDedicatedServerField() { return { this, "AShooterGameState.bIsDedicatedServer" }; } + FieldValue ClusterIdField() { return { this, "AShooterGameState.ClusterId" }; } + FieldValue AmazonS3AccessKeyIDField() { return { this, "AShooterGameState.AmazonS3AccessKeyID" }; } + FieldValue AmazonS3SecretAccessKeyField() { return { this, "AShooterGameState.AmazonS3SecretAccessKey" }; } + FieldValue AmazonS3BucketNameField() { return { this, "AShooterGameState.AmazonS3BucketName" }; } + FieldValue ServerSessionNameField() { return { this, "AShooterGameState.ServerSessionName" }; } + FieldValue bPreventTribeAlliancesField() { return { this, "AShooterGameState.bPreventTribeAlliances" }; } + FieldValue LoadForceRespawnDinosTagField() { return { this, "AShooterGameState.LoadForceRespawnDinosTag" }; } + FieldValue bOnlyDecayUnsnappedCoreStructuresField() { return { this, "AShooterGameState.bOnlyDecayUnsnappedCoreStructures" }; } + FieldValue bFastDecayUnsnappedCoreStructuresField() { return { this, "AShooterGameState.bFastDecayUnsnappedCoreStructures" }; } + FieldValue bServerUseDinoListField() { return { this, "AShooterGameState.bServerUseDinoList" }; } + FieldValue bPvEAllowStructuresAtSupplyDropsField() { return { this, "AShooterGameState.bPvEAllowStructuresAtSupplyDrops" }; } + FieldValue bAllowForceNetUpdateField() { return { this, "AShooterGameState.bAllowForceNetUpdate" }; } + FieldValue MinimumDinoReuploadIntervalField() { return { this, "AShooterGameState.MinimumDinoReuploadInterval" }; } + FieldValue HairGrowthSpeedMultiplierField() { return { this, "AShooterGameState.HairGrowthSpeedMultiplier" }; } + FieldValue FastDecayIntervalField() { return { this, "AShooterGameState.FastDecayInterval" }; } + FieldValue OxygenSwimSpeedStatMultiplierField() { return { this, "AShooterGameState.OxygenSwimSpeedStatMultiplier" }; } + FieldValue bAllowMultipleAttachedC4Field() { return { this, "AShooterGameState.bAllowMultipleAttachedC4" }; } + FieldValue bCrossARKAllowForeignDinoDownloadsField() { return { this, "AShooterGameState.bCrossARKAllowForeignDinoDownloads" }; } + FieldValue LastPlayedDynamicMusic1Field() { return { this, "AShooterGameState.LastPlayedDynamicMusic1" }; } + FieldValue LastPlayedDynamicMusic2Field() { return { this, "AShooterGameState.LastPlayedDynamicMusic2" }; } + FieldValue bUseCorpseLocatorField() { return { this, "AShooterGameState.bUseCorpseLocator" }; } + FieldValue bDisableStructurePlacementCollisionField() { return { this, "AShooterGameState.bDisableStructurePlacementCollision" }; } + FieldValue bUseSingleplayerSettingsField() { return { this, "AShooterGameState.bUseSingleplayerSettings" }; } + FieldValue bAllowPlatformSaddleMultiFloorsField() { return { this, "AShooterGameState.bAllowPlatformSaddleMultiFloors" }; } + FieldValue bPreventSpawnAnimationsField() { return { this, "AShooterGameState.bPreventSpawnAnimations" }; } + FieldValue MaxAlliancesPerTribeField() { return { this, "AShooterGameState.MaxAlliancesPerTribe" }; } + FieldValue MaxTribesPerAllianceField() { return { this, "AShooterGameState.MaxTribesPerAlliance" }; } + FieldValue bIsLegacyServerField() { return { this, "AShooterGameState.bIsLegacyServer" }; } + FieldValue bDisableDinoDecayClaimingField() { return { this, "AShooterGameState.bDisableDinoDecayClaiming" }; } + FieldValue UseStructurePreventionVolumeTagField() { return { this, "AShooterGameState.UseStructurePreventionVolumeTag" }; } + FieldValue MaxStructuresInSmallRadiusField() { return { this, "AShooterGameState.MaxStructuresInSmallRadius" }; } + FieldValue RadiusStructuresInSmallRadiusField() { return { this, "AShooterGameState.RadiusStructuresInSmallRadius" }; } + FieldValue bUseTameLimitForStructuresOnlyField() { return { this, "AShooterGameState.bUseTameLimitForStructuresOnly" }; } + FieldValue bLimitTurretsInRangeField() { return { this, "AShooterGameState.bLimitTurretsInRange" }; } + FieldValue LimitTurretsRangeField() { return { this, "AShooterGameState.LimitTurretsRange" }; } + FieldValue LimitTurretsNumField() { return { this, "AShooterGameState.LimitTurretsNum" }; } + FieldValue bForceAllowAllStructuresField() { return { this, "AShooterGameState.bForceAllowAllStructures" }; } + FieldValue AmbientSoundCheckIncrementField() { return { this, "AShooterGameState.AmbientSoundCheckIncrement" }; } + + // Functions + + UObject * GetUObjectInterfaceHUDInterface() { return NativeCall(this, "AShooterGameState.GetUObjectInterfaceHUDInterface"); } + TArray * BaseGetAllDinoCharactersOfTeam(TArray * result, int Team) { return NativeCall *, TArray *, int>(this, "AShooterGameState.BaseGetAllDinoCharactersOfTeam", result, Team); } + static APrimalBuff * BaseSpawnBuffAndAttachToCharacter(UClass * Buff, APrimalCharacter * PrimalCharacter, float ExperiencePoints) { return NativeCall(nullptr, "AShooterGameState.BaseSpawnBuffAndAttachToCharacter", Buff, PrimalCharacter, ExperiencePoints); } + void Destroyed() { NativeCall(this, "AShooterGameState.Destroyed"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "AShooterGameState.GetLifetimeReplicatedProps", OutLifetimeProps); } + void OnRep_SupportedSpawnRegions() { NativeCall(this, "AShooterGameState.OnRep_SupportedSpawnRegions"); } + void OnRep_ReplicateLocalizedChatRadius() { NativeCall(this, "AShooterGameState.OnRep_ReplicateLocalizedChatRadius"); } + void Tick(float DeltaSeconds) { NativeCall(this, "AShooterGameState.Tick", DeltaSeconds); } + void UpdateDynamicMusic(float DeltaSeconds) { NativeCall(this, "AShooterGameState.UpdateDynamicMusic", DeltaSeconds); } + void CreateCustomGameUI(AShooterPlayerController * SceneOwner) { NativeCall(this, "AShooterGameState.CreateCustomGameUI", SceneOwner); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "AShooterGameState.DrawHUD", HUD); } + void PostInitializeComponents() { NativeCall(this, "AShooterGameState.PostInitializeComponents"); } + float GetClientReplicationRateFor(UNetConnection * InConnection, AActor * InActor) { return NativeCall(this, "AShooterGameState.GetClientReplicationRateFor", InConnection, InActor); } + static long double GetNetworkTimeDelta(AShooterGameState * gameState, long double netTime, bool bTimeUntil) { return NativeCall(nullptr, "AShooterGameState.GetNetworkTimeDelta", gameState, netTime, bTimeUntil); } + void LoadedFromSaveGame() { NativeCall(this, "AShooterGameState.LoadedFromSaveGame"); } + void BeginPlay() { NativeCall(this, "AShooterGameState.BeginPlay"); } + float GetMatineePlayRate(AActor * forMatineeActor) { return NativeCall(this, "AShooterGameState.GetMatineePlayRate", forMatineeActor); } + void NotifyPlayerDied(AShooterCharacter * theShooterChar, AShooterPlayerController * prevController, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "AShooterGameState.NotifyPlayerDied", theShooterChar, prevController, InstigatingPawn, DamageCauser); } + bool AllowDinoTame(APrimalDinoCharacter * DinoChar, AShooterPlayerController * ForPC) { return NativeCall(this, "AShooterGameState.AllowDinoTame", DinoChar, ForPC); } + bool AllowDinoClassTame(TSubclassOf DinoCharClass, AShooterPlayerController * ForPC) { return NativeCall, AShooterPlayerController *>(this, "AShooterGameState.AllowDinoClassTame", DinoCharClass, ForPC); } + void InitializedGameState() { NativeCall(this, "AShooterGameState.InitializedGameState"); } + bool IsTeamIDInvincible(int TargetingTeamID) { return NativeCall(this, "AShooterGameState.IsTeamIDInvincible", TargetingTeamID); } + long double GetOfflineDamagePreventionTime(int TargetingTeamID) { return NativeCall(this, "AShooterGameState.GetOfflineDamagePreventionTime", TargetingTeamID); } + void NetUpdateOfflinePvPLiveTeams_Implementation(TArray * NewPreventOfflinePvPLiveTeams) { NativeCall *>(this, "AShooterGameState.NetUpdateOfflinePvPLiveTeams_Implementation", NewPreventOfflinePvPLiveTeams); } + void NetUpdateOfflinePvPExpiringTeams_Implementation(TArray * NewPreventOfflinePvPExpiringTeams, TArray * NewPreventOfflinePvPExpiringTimes) { NativeCall *, TArray *>(this, "AShooterGameState.NetUpdateOfflinePvPExpiringTeams_Implementation", NewPreventOfflinePvPExpiringTeams, NewPreventOfflinePvPExpiringTimes); } + void UpdatePreventOfflinePvPStatus() { NativeCall(this, "AShooterGameState.UpdatePreventOfflinePvPStatus"); } + void AddFloatingText(FVector AtLocation, FString FloatingTextString, FColor FloatingTextColor, float ScaleX, float ScaleY, float TextLifeSpan, FVector TextVelocity, float MinScale, float FadeInTime, float FadeOutTime) { NativeCall(this, "AShooterGameState.AddFloatingText", AtLocation, FloatingTextString, FloatingTextColor, ScaleX, ScaleY, TextLifeSpan, TextVelocity, MinScale, FadeInTime, FadeOutTime); } + void AddFloatingDamageText(FVector AtLocation, int DamageAmount, int FromTeamID) { NativeCall(this, "AShooterGameState.AddFloatingDamageText", AtLocation, DamageAmount, FromTeamID); } + void NetAddFloatingDamageText(FVector AtLocation, int DamageAmount, int FromTeamID, int OnlySendToTeamID) { NativeCall(this, "AShooterGameState.NetAddFloatingDamageText", AtLocation, DamageAmount, FromTeamID, OnlySendToTeamID); } + void NetAddFloatingText(FVector AtLocation, FString FloatingTextString, FColor FloatingTextColor, float ScaleX, float ScaleY, float TextLifeSpan, FVector TextVelocity, float MinScale, float FadeInTime, float FadeOutTime, int OnlySendToTeamID) { NativeCall(this, "AShooterGameState.NetAddFloatingText", AtLocation, FloatingTextString, FloatingTextColor, ScaleX, ScaleY, TextLifeSpan, TextVelocity, MinScale, FadeInTime, FadeOutTime, OnlySendToTeamID); } + FString * GetCleanServerSessionName(FString * result) { return NativeCall(this, "AShooterGameState.GetCleanServerSessionName", result); } + void ForceNetUpdate(bool bDormantDontReplicateProperties) { NativeCall(this, "AShooterGameState.ForceNetUpdate", bDormantDontReplicateProperties); } + void WorldCompositionRescan() { NativeCall(this, "AShooterGameState.WorldCompositionRescan"); } + void HTTPGetRequest(FString InURL) { NativeCall(this, "AShooterGameState.HTTPGetRequest", InURL); } + void HTTPPostRequest(FString InURL, FString Content) { NativeCall(this, "AShooterGameState.HTTPPostRequest", InURL, Content); } + void LevelAddedToWorld(ULevel * addedLevel) { NativeCall(this, "AShooterGameState.LevelAddedToWorld", addedLevel); } + bool AllowDownloadDino_Implementation(TSubclassOf TheDinoClass) { return NativeCall>(this, "AShooterGameState.AllowDownloadDino_Implementation", TheDinoClass); } + bool IsEngramClassHidden(TSubclassOf ForItemClass) { return NativeCall>(this, "AShooterGameState.IsEngramClassHidden", ForItemClass); } + static void StaticRegisterNativesAShooterGameState() { NativeCall(nullptr, "AShooterGameState.StaticRegisterNativesAShooterGameState"); } + bool AllowDownloadDino(TSubclassOf TheDinoClass) { return NativeCall>(this, "AShooterGameState.AllowDownloadDino", TheDinoClass); } + void NetUpdateOfflinePvPExpiringTeams(TArray * NewPreventOfflinePvPExpiringTeams, TArray * NewPreventOfflinePvPExpiringTimes) { NativeCall *, TArray *>(this, "AShooterGameState.NetUpdateOfflinePvPExpiringTeams", NewPreventOfflinePvPExpiringTeams, NewPreventOfflinePvPExpiringTimes); } + void NetUpdateOfflinePvPLiveTeams(TArray * NewPreventOfflinePvPLiveTeams) { NativeCall *>(this, "AShooterGameState.NetUpdateOfflinePvPLiveTeams", NewPreventOfflinePvPLiveTeams); } +}; + +struct AGameSession +{ + FieldValue MaxSpectatorsField() { return { this, "AGameSession.MaxSpectators" }; } + FieldValue MaxPlayersField() { return { this, "AGameSession.MaxPlayers" }; } + FieldValue MaxSplitscreensPerConnectionField() { return { this, "AGameSession.MaxSplitscreensPerConnection" }; } + FieldValue bRequiresPushToTalkField() { return { this, "AGameSession.bRequiresPushToTalk" }; } + FieldValue SessionNameField() { return { this, "AGameSession.SessionName" }; } + + // Functions + + bool RequiresPushToTalk() { return NativeCall(this, "AGameSession.RequiresPushToTalk"); } + void InitOptions(FString * Options) { NativeCall(this, "AGameSession.InitOptions", Options); } + bool ProcessAutoLogin() { return NativeCall(this, "AGameSession.ProcessAutoLogin"); } + void OnLoginComplete(int LocalUserNum, bool bWasSuccessful, FUniqueNetId * UserId, FString * Error) { NativeCall(this, "AGameSession.OnLoginComplete", LocalUserNum, bWasSuccessful, UserId, Error); } + FString * ApproveLogin(FString * result, FString * Options, FString * authToken) { return NativeCall(this, "AGameSession.ApproveLogin", result, Options, authToken); } + void RegisterPlayer(APlayerController * NewPlayer, TSharedPtr * UniqueId, bool bWasFromInvite) { NativeCall *, bool>(this, "AGameSession.RegisterPlayer", NewPlayer, UniqueId, bWasFromInvite); } + void UnregisterPlayer(APlayerController * ExitingPlayer) { NativeCall(this, "AGameSession.UnregisterPlayer", ExitingPlayer); } + bool AtCapacity(bool bSpectator, FString * AuthToken) { return NativeCall(this, "AGameSession.AtCapacity", bSpectator, AuthToken); } + void NotifyLogout(APlayerController * PC) { NativeCall(this, "AGameSession.NotifyLogout", PC); } + bool KickPlayer(APlayerController * KickedPlayer, FText * KickReason) { return NativeCall(this, "AGameSession.KickPlayer", KickedPlayer, KickReason); } + bool BanPlayer(APlayerController * BannedPlayer, FText * BanReason) { return NativeCall(this, "AGameSession.BanPlayer", BannedPlayer, BanReason); } + void ReturnToMainMenuHost() { NativeCall(this, "AGameSession.ReturnToMainMenuHost"); } + bool TravelToSession(int ControllerId, FName InSessionName) { return NativeCall(this, "AGameSession.TravelToSession", ControllerId, InSessionName); } + void UpdateSessionJoinability(FName InSessionName, bool bPublicSearchable, bool bAllowInvites, bool bJoinViaPresence, bool bJoinViaPresenceFriendsOnly) { NativeCall(this, "AGameSession.UpdateSessionJoinability", InSessionName, bPublicSearchable, bAllowInvites, bJoinViaPresence, bJoinViaPresenceFriendsOnly); } +}; + +struct AShooterGameSession : AGameSession +{ + FieldValue> FailedAuthTokenClientConnectionsField() { return { this, "AShooterGameSession.FailedAuthTokenClientConnections" }; } + FieldValue> FailedAuthTokenClientUniqueIDsField() { return { this, "AShooterGameSession.FailedAuthTokenClientUniqueIDs" }; } + FieldValue bFoundSessionField() { return { this, "AShooterGameSession.bFoundSession" }; } + + // Functions + + void OnStartOnlineGameComplete(FName SessionName, bool bWasSuccessful) { NativeCall(this, "AShooterGameSession.OnStartOnlineGameComplete", SessionName, bWasSuccessful); } + void HandleMatchHasStarted() { NativeCall(this, "AShooterGameSession.HandleMatchHasStarted"); } + void HandleMatchHasEnded() { NativeCall(this, "AShooterGameSession.HandleMatchHasEnded"); } + void OnCreateSessionComplete(FName SessionName, bool bWasSuccessful) { NativeCall(this, "AShooterGameSession.OnCreateSessionComplete", SessionName, bWasSuccessful); } + void OnDestroySessionComplete(FName SessionName, bool bWasSuccessful) { NativeCall(this, "AShooterGameSession.OnDestroySessionComplete", SessionName, bWasSuccessful); } + void DelayedSessionDelete() { NativeCall(this, "AShooterGameSession.DelayedSessionDelete"); } + void InitOptions(FString * Options) { NativeCall(this, "AShooterGameSession.InitOptions", Options); } + void RegisterServer() { NativeCall(this, "AShooterGameSession.RegisterServer"); } + void UpdatePublishedSession() { NativeCall(this, "AShooterGameSession.UpdatePublishedSession"); } + FString * ApproveLogin(FString * result, FString * Options, FString * authToken) { return NativeCall(this, "AShooterGameSession.ApproveLogin", result, Options, authToken); } + void OnCheckAuthTokenComplete(bool bWasSuccessful, FUniqueNetId * UserId) { NativeCall(this, "AShooterGameSession.OnCheckAuthTokenComplete", bWasSuccessful, UserId); } + void OnNumConnectedPlayersChanged(int NewPlayersCount) { NativeCall(this, "AShooterGameSession.OnNumConnectedPlayersChanged", NewPlayersCount); } + void Tick(float __formal) { NativeCall(this, "AShooterGameSession.Tick", __formal); } + void OnFindSessionsComplete(bool bWasSuccessful) { NativeCall(this, "AShooterGameSession.OnFindSessionsComplete", bWasSuccessful); } + void OnFoundSession() { NativeCall(this, "AShooterGameSession.OnFoundSession"); } + void CancelFindSessions() { NativeCall(this, "AShooterGameSession.CancelFindSessions"); } + bool JoinSession(TSharedPtr UserId, FName SessionName, int SessionIndexInSearchResults) { return NativeCall, FName, int>(this, "AShooterGameSession.JoinSession", UserId, SessionName, SessionIndexInSearchResults); } + bool TravelToSession(int ControllerId, FName SessionName) { return NativeCall(this, "AShooterGameSession.TravelToSession", ControllerId, SessionName); } + void Restart() { NativeCall(this, "AShooterGameSession.Restart"); } +}; diff --git a/version/Core/Public/API/ARK/Inventory.h b/version/Core/Public/API/ARK/Inventory.h new file mode 100644 index 0000000..2fc9752 --- /dev/null +++ b/version/Core/Public/API/ARK/Inventory.h @@ -0,0 +1,811 @@ +#pragma once + +struct UWorld; + +struct FItemNetID +{ + unsigned int ItemID1; + unsigned int ItemID2; +}; + +struct FCustomItemData +{ + FName CustomDataName; + TArray CustomDataStrings; + TArray CustomDataFloats; + TArray CustomDataObjects; + TArray CustomDataClasses; + TArray CustomDataNames; +}; + +struct FItemCraftQueueEntry +{ + FItemNetID ItemID; + int Quantity; + bool bIsRepair; + bool bIgnoreInventoryRequirement; + float RepairPercentage; + float RepairSpeedMultiplier; +}; + +struct FItemSpawnActorClassOverride +{ + TSubclassOf ItemClass; + TSubclassOf ActorClassOverride; +}; + +struct FLevelExperienceRamp +{ + TArray ExperiencePointsForLevel; +}; + +struct UAssetUserData : UObject +{ +}; + +struct UActorComponent : UObject +{ + FieldValue> ComponentTagsField() { return { this, "UActorComponent.ComponentTags" }; } + FieldValue CustomTagField() { return { this, "UActorComponent.CustomTag" }; } + FieldValue CustomDataField() { return { this, "UActorComponent.CustomData" }; } + FieldValue CachedOwnerField() { return { this, "UActorComponent.CachedOwner" }; } + FieldValue WorldField() { return { this, "UActorComponent.World" }; } + + // Functions + + void PostInitProperties() { NativeCall(this, "UActorComponent.PostInitProperties"); } + void PostRename(UObject * OldOuter, FName OldName) { NativeCall(this, "UActorComponent.PostRename", OldOuter, OldName); } + AActor * GetOwner() { return NativeCall(this, "UActorComponent.GetOwner"); } + UWorld * GetWorld() { return NativeCall(this, "UActorComponent.GetWorld"); } + ULevel * GetComponentLevel() { return NativeCall(this, "UActorComponent.GetComponentLevel"); } + FString * GetReadableName(FString * result) { return NativeCall(this, "UActorComponent.GetReadableName", result); } + void BeginDestroy() { NativeCall(this, "UActorComponent.BeginDestroy"); } + bool NeedsLoadForClient() { return NativeCall(this, "UActorComponent.NeedsLoadForClient"); } + bool NeedsLoadForServer() { return NativeCall(this, "UActorComponent.NeedsLoadForServer"); } + void OnRegister() { NativeCall(this, "UActorComponent.OnRegister"); } + void InitializeComponent() { NativeCall(this, "UActorComponent.InitializeComponent"); } + void UninitializeComponent() { NativeCall(this, "UActorComponent.UninitializeComponent"); } + void SetComponentTickEnabled(bool bEnabled) { NativeCall(this, "UActorComponent.SetComponentTickEnabled", bEnabled); } + void SetComponentTickEnabledAsync(bool bEnabled) { NativeCall(this, "UActorComponent.SetComponentTickEnabledAsync", bEnabled); } + void RegisterComponentTickFunctions(bool bRegister, bool bSaveAndRestoreComponentTickState) { NativeCall(this, "UActorComponent.RegisterComponentTickFunctions", bRegister, bSaveAndRestoreComponentTickState); } + void RegisterComponentWithWorld(UWorld * InWorld) { NativeCall(this, "UActorComponent.RegisterComponentWithWorld", InWorld); } + void RegisterComponent() { NativeCall(this, "UActorComponent.RegisterComponent"); } + void UnregisterComponent() { NativeCall(this, "UActorComponent.UnregisterComponent"); } + void DestroyComponent() { NativeCall(this, "UActorComponent.DestroyComponent"); } + void OnComponentCreated() { NativeCall(this, "UActorComponent.OnComponentCreated"); } + void OnComponentDestroyed() { NativeCall(this, "UActorComponent.OnComponentDestroyed"); } + void CreateRenderState_Concurrent() { NativeCall(this, "UActorComponent.CreateRenderState_Concurrent"); } + void SendRenderTransform_Concurrent() { NativeCall(this, "UActorComponent.SendRenderTransform_Concurrent"); } + void SendRenderDynamicData_Concurrent() { NativeCall(this, "UActorComponent.SendRenderDynamicData_Concurrent"); } + void DestroyRenderState_Concurrent() { NativeCall(this, "UActorComponent.DestroyRenderState_Concurrent"); } + void CreatePhysicsState() { NativeCall(this, "UActorComponent.CreatePhysicsState"); } + void DestroyPhysicsState() { NativeCall(this, "UActorComponent.DestroyPhysicsState"); } + void ExecuteRegisterEvents() { NativeCall(this, "UActorComponent.ExecuteRegisterEvents"); } + void ExecuteUnregisterEvents() { NativeCall(this, "UActorComponent.ExecuteUnregisterEvents"); } + void ReregisterComponent() { NativeCall(this, "UActorComponent.ReregisterComponent"); } + void RecreateRenderState_Concurrent() { NativeCall(this, "UActorComponent.RecreateRenderState_Concurrent"); } + void RecreatePhysicsState(bool bRestoreBoneTransforms) { NativeCall(this, "UActorComponent.RecreatePhysicsState", bRestoreBoneTransforms); } + void AddTickPrerequisiteActor(AActor * PrerequisiteActor) { NativeCall(this, "UActorComponent.AddTickPrerequisiteActor", PrerequisiteActor); } + void AddTickPrerequisiteComponent(UActorComponent * PrerequisiteComponent) { NativeCall(this, "UActorComponent.AddTickPrerequisiteComponent", PrerequisiteComponent); } + void RemoveTickPrerequisiteActor(AActor * PrerequisiteActor) { NativeCall(this, "UActorComponent.RemoveTickPrerequisiteActor", PrerequisiteActor); } + void RemoveTickPrerequisiteComponent(UActorComponent * PrerequisiteComponent) { NativeCall(this, "UActorComponent.RemoveTickPrerequisiteComponent", PrerequisiteComponent); } + void DoDeferredRenderUpdates_Concurrent() { NativeCall(this, "UActorComponent.DoDeferredRenderUpdates_Concurrent"); } + void MarkForNeededEndOfFrameUpdate() { NativeCall(this, "UActorComponent.MarkForNeededEndOfFrameUpdate"); } + void MarkForNeededEndOfFrameRecreate() { NativeCall(this, "UActorComponent.MarkForNeededEndOfFrameRecreate"); } + void Activate(bool bReset) { NativeCall(this, "UActorComponent.Activate", bReset); } + void Deactivate() { NativeCall(this, "UActorComponent.Deactivate"); } + bool ShouldActivate() { return NativeCall(this, "UActorComponent.ShouldActivate"); } + void SetActive(bool bNewActive, bool bReset) { NativeCall(this, "UActorComponent.SetActive", bNewActive, bReset); } + void ToggleActive() { NativeCall(this, "UActorComponent.ToggleActive"); } + bool IsActive() { return NativeCall(this, "UActorComponent.IsActive"); } + bool IsNameStableForNetworking() { return NativeCall(this, "UActorComponent.IsNameStableForNetworking"); } + bool IsSupportedForNetworking() { return NativeCall(this, "UActorComponent.IsSupportedForNetworking"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "UActorComponent.GetLifetimeReplicatedProps", OutLifetimeProps); } + bool AlwaysReplicatePropertyConditional(UProperty * forProperty) { return NativeCall(this, "UActorComponent.AlwaysReplicatePropertyConditional", forProperty); } +}; + +struct UPrimalInventoryComponent : UActorComponent +{ + FieldValue>> RemoteViewingInventoryPlayerControllersField() { return { this, "UPrimalInventoryComponent.RemoteViewingInventoryPlayerControllers" }; } + FieldValue> InventoryItemsField() { return { this, "UPrimalInventoryComponent.InventoryItems" }; } + FieldValue> EquippedItemsField() { return { this, "UPrimalInventoryComponent.EquippedItems" }; } + FieldValue> ItemSlotsField() { return { this, "UPrimalInventoryComponent.ItemSlots" }; } + FieldValue> ArkTributeItemsField() { return { this, "UPrimalInventoryComponent.ArkTributeItems" }; } + FieldValue> AllDyeColorItemsField() { return { this, "UPrimalInventoryComponent.AllDyeColorItems" }; } + FieldValue> ItemCraftQueueEntriesField() { return { this, "UPrimalInventoryComponent.ItemCraftQueueEntries" }; } + FieldValue OverrideInventoryDefaultTabField() { return { this, "UPrimalInventoryComponent.OverrideInventoryDefaultTab" }; } + FieldValue>> EquippableItemTypesField() { return { this, "UPrimalInventoryComponent.EquippableItemTypes" }; } + FieldValue CraftingItemSpeedField() { return { this, "UPrimalInventoryComponent.CraftingItemSpeed" }; } + FieldValue> ItemSpoilingTimeMultipliersField() { return { this, "UPrimalInventoryComponent.ItemSpoilingTimeMultipliers" }; } + FieldValue MaxInventoryItemsField() { return { this, "UPrimalInventoryComponent.MaxInventoryItems" }; } + FieldValue MaxInventoryWeightField() { return { this, "UPrimalInventoryComponent.MaxInventoryWeight" }; } + FieldValue TribeGroupInventoryRankField() { return { this, "UPrimalInventoryComponent.TribeGroupInventoryRank" }; } + FieldValue NumSlotsField() { return { this, "UPrimalInventoryComponent.NumSlots" }; } + FieldValue MaxItemCraftQueueEntriesField() { return { this, "UPrimalInventoryComponent.MaxItemCraftQueueEntries" }; } + FieldValue RemoteInventoryDescriptionStringField() { return { this, "UPrimalInventoryComponent.RemoteInventoryDescriptionString" }; } + FieldValue> EngramRequirementClassOverrideField() { return { this, "UPrimalInventoryComponent.EngramRequirementClassOverride" }; } + FieldValue>> RemoteAddItemOnlyAllowItemClassesField() { return { this, "UPrimalInventoryComponent.RemoteAddItemOnlyAllowItemClasses" }; } + FieldValue>> RemoteAddItemPreventItemClassesField() { return { this, "UPrimalInventoryComponent.RemoteAddItemPreventItemClasses" }; } + FieldValue>> DefaultInventoryItemsField() { return { this, "UPrimalInventoryComponent.DefaultInventoryItems" }; } + FieldValue>> DefaultInventoryItems2Field() { return { this, "UPrimalInventoryComponent.DefaultInventoryItems2" }; } + FieldValue>> DefaultInventoryItems3Field() { return { this, "UPrimalInventoryComponent.DefaultInventoryItems3" }; } + FieldValue>> DefaultInventoryItems4Field() { return { this, "UPrimalInventoryComponent.DefaultInventoryItems4" }; } + FieldValue> DefaultInventoryItemsRandomCustomStringsField() { return { this, "UPrimalInventoryComponent.DefaultInventoryItemsRandomCustomStrings" }; } + FieldValue> DefaultInventoryItemsRandomCustomStringsWeightsField() { return { this, "UPrimalInventoryComponent.DefaultInventoryItemsRandomCustomStringsWeights" }; } + FieldValue>> CheatInventoryItemsField() { return { this, "UPrimalInventoryComponent.CheatInventoryItems" }; } + FieldValue>> DefaultEquippedItemsField() { return { this, "UPrimalInventoryComponent.DefaultEquippedItems" }; } + FieldValue>> DefaultEquippedItemSkinsField() { return { this, "UPrimalInventoryComponent.DefaultEquippedItemSkins" }; } + FieldValue>> DefaultSlotItemsField() { return { this, "UPrimalInventoryComponent.DefaultSlotItems" }; } + FieldValue> ItemSpawnActorClassOverridesField() { return { this, "UPrimalInventoryComponent.ItemSpawnActorClassOverrides" }; } + FieldValue>> OnlyAllowCraftingItemClassesField() { return { this, "UPrimalInventoryComponent.OnlyAllowCraftingItemClasses" }; } + FieldValue> DefaultEngramsField() { return { this, "UPrimalInventoryComponent.DefaultEngrams" }; } + FieldValue> DefaultEngrams2Field() { return { this, "UPrimalInventoryComponent.DefaultEngrams2" }; } + FieldValue> DefaultEngrams3Field() { return { this, "UPrimalInventoryComponent.DefaultEngrams3" }; } + FieldValue> DefaultEngrams4Field() { return { this, "UPrimalInventoryComponent.DefaultEngrams4" }; } + FieldValue> DefaultInventoryQualitiesField() { return { this, "UPrimalInventoryComponent.DefaultInventoryQualities" }; } + FieldValue InventoryNameOverrideField() { return { this, "UPrimalInventoryComponent.InventoryNameOverride" }; } + FieldValue MaxRemoteInventoryViewingDistanceField() { return { this, "UPrimalInventoryComponent.MaxRemoteInventoryViewingDistance" }; } + FieldValue ActiveInventoryRefreshIntervalField() { return { this, "UPrimalInventoryComponent.ActiveInventoryRefreshInterval" }; } + FieldValue AbsoluteMaxInventoryItemsField() { return { this, "UPrimalInventoryComponent.AbsoluteMaxInventoryItems" }; } + FieldValue LastInventoryRefreshTimeField() { return { this, "UPrimalInventoryComponent.LastInventoryRefreshTime" }; } + FieldValue> DroppedItemTemplateOverrideField() { return { this, "UPrimalInventoryComponent.DroppedItemTemplateOverride" }; } + FieldValue>> ForceAllowItemStackingsField() { return { this, "UPrimalInventoryComponent.ForceAllowItemStackings" }; } + FieldValue DropItemRotationOffsetField() { return { this, "UPrimalInventoryComponent.DropItemRotationOffset" }; } + FieldValue> ItemCraftingConsumptionReplenishmentsField() { return { this, "UPrimalInventoryComponent.ItemCraftingConsumptionReplenishments" }; } + FieldValue MaxItemCooldownTimeClearField() { return { this, "UPrimalInventoryComponent.MaxItemCooldownTimeClear" }; } + FieldValue> MaxItemTemplateQuantitiesField() { return { this, "UPrimalInventoryComponent.MaxItemTemplateQuantities" }; } + FieldValue ItemCraftingSoundOverrideField() { return { this, "UPrimalInventoryComponent.ItemCraftingSoundOverride" }; } + FieldValue> WeaponAsEquipmentAttachmentInfosField() { return { this, "UPrimalInventoryComponent.WeaponAsEquipmentAttachmentInfos" }; } + FieldValue> CraftingItemsField() { return { this, "UPrimalInventoryComponent.CraftingItems" }; } + FieldValue DisplayDefaultItemInventoryCountField() { return { this, "UPrimalInventoryComponent.DisplayDefaultItemInventoryCount" }; } + FieldValue bHasBeenRegisteredField() { return { this, "UPrimalInventoryComponent.bHasBeenRegistered" }; } + FieldValue>> LastUsedItemClassesField() { return { this, "UPrimalInventoryComponent.LastUsedItemClasses" }; } + FieldValue> LastUsedItemTimesField() { return { this, "UPrimalInventoryComponent.LastUsedItemTimes" }; } + FieldValue InvUpdatedFrameField() { return { this, "UPrimalInventoryComponent.InvUpdatedFrame" }; } + FieldValue LastRefreshCheckItemTimeField() { return { this, "UPrimalInventoryComponent.LastRefreshCheckItemTime" }; } + FieldValue bLastPreventUseItemSpoilingTimeMultipliersField() { return { this, "UPrimalInventoryComponent.bLastPreventUseItemSpoilingTimeMultipliers" }; } + FieldValue NextItemSpoilingIDField() { return { this, "UPrimalInventoryComponent.NextItemSpoilingID" }; } + FieldValue NextItemConsumptionIDField() { return { this, "UPrimalInventoryComponent.NextItemConsumptionID" }; } + FieldValue MinItemSetsField() { return { this, "UPrimalInventoryComponent.MinItemSets" }; } + FieldValue MaxItemSetsField() { return { this, "UPrimalInventoryComponent.MaxItemSets" }; } + FieldValue NumItemSetsPowerField() { return { this, "UPrimalInventoryComponent.NumItemSetsPower" }; } + FieldValue> ItemSetsField() { return { this, "UPrimalInventoryComponent.ItemSets" }; } + FieldValue> AdditionalItemSetsField() { return { this, "UPrimalInventoryComponent.AdditionalItemSets" }; } + FieldValue> ItemSetsOverrideField() { return { this, "UPrimalInventoryComponent.ItemSetsOverride" }; } + FieldValue> SetQuantityWeightsField() { return { this, "UPrimalInventoryComponent.SetQuantityWeights" }; } + FieldValue> SetQuantityValuesField() { return { this, "UPrimalInventoryComponent.SetQuantityValues" }; } + FieldValue ItemRemovedBySoundField() { return { this, "UPrimalInventoryComponent.ItemRemovedBySound" }; } + FieldValue OpenInventorySoundField() { return { this, "UPrimalInventoryComponent.OpenInventorySound" }; } + FieldValue CloseInventorySoundField() { return { this, "UPrimalInventoryComponent.CloseInventorySound" }; } + FieldValue MaxInventoryAccessDistanceField() { return { this, "UPrimalInventoryComponent.MaxInventoryAccessDistance" }; } + FieldValue> ServerCustomFolderField() { return { this, "UPrimalInventoryComponent.ServerCustomFolder" }; } + FieldValue>> ForceAllowCraftingForInventoryComponentsField() { return { this, "UPrimalInventoryComponent.ForceAllowCraftingForInventoryComponents" }; } + FieldValue> ItemClassWeightMultipliersField() { return { this, "UPrimalInventoryComponent.ItemClassWeightMultipliers" }; } + FieldValue GenerateItemSetsQualityMultiplierMinField() { return { this, "UPrimalInventoryComponent.GenerateItemSetsQualityMultiplierMin" }; } + FieldValue GenerateItemSetsQualityMultiplierMaxField() { return { this, "UPrimalInventoryComponent.GenerateItemSetsQualityMultiplierMax" }; } + FieldValue DefaultCraftingRequirementsMultiplierField() { return { this, "UPrimalInventoryComponent.DefaultCraftingRequirementsMultiplier" }; } + FieldValue DefaultCraftingQuantityMultiplierField() { return { this, "UPrimalInventoryComponent.DefaultCraftingQuantityMultiplier" }; } + FieldValue SavedForceDefaultInventoryRefreshVersionField() { return { this, "UPrimalInventoryComponent.SavedForceDefaultInventoryRefreshVersion" }; } + FieldValue ForceDefaultInventoryRefreshVersionField() { return { this, "UPrimalInventoryComponent.ForceDefaultInventoryRefreshVersion" }; } + FieldValue>> TamedDinoForceConsiderFoodTypesField() { return { this, "UPrimalInventoryComponent.TamedDinoForceConsiderFoodTypes" }; } + FieldValue> DinoAutoHealingItemsField() { return { this, "UPrimalInventoryComponent.DinoAutoHealingItems" }; } + FieldValue OverrideCraftingFinishedSoundField() { return { this, "UPrimalInventoryComponent.OverrideCraftingFinishedSound" }; } + FieldValue LastAddToCraftQueueSoundTimeField() { return { this, "UPrimalInventoryComponent.LastAddToCraftQueueSoundTime" }; } + FieldValue ForceAddToFolderField() { return { this, "UPrimalInventoryComponent.ForceAddToFolder" }; } + FieldValue GroundDropTraceLocationOffsetField() { return { this, "UPrimalInventoryComponent.GroundDropTraceLocationOffset" }; } + + // Functions + + static UClass * StaticClass() { return NativeCall(nullptr, "UPrimalInventoryComponent.StaticClass"); } + void OnRegister() { NativeCall(this, "UPrimalInventoryComponent.OnRegister"); } + bool AllowEquippingItemType(EPrimalEquipmentType::Type equipmentType) { return NativeCall(this, "UPrimalInventoryComponent.AllowEquippingItemType", equipmentType); } + bool CanEquipItem(UPrimalItem * anItem) { return NativeCall(this, "UPrimalInventoryComponent.CanEquipItem", anItem); } + bool AllowAddInventoryItem(UPrimalItem * anItem, int * requestedQuantity, bool OnlyAddAll) { return NativeCall(this, "UPrimalInventoryComponent.AllowAddInventoryItem", anItem, requestedQuantity, OnlyAddAll); } + UPrimalItem * AddItem(FItemNetInfo * theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID * InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter * OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { return NativeCall(this, "UPrimalInventoryComponent.AddItem", theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); } + bool IsLocalInventoryViewer() { return NativeCall(this, "UPrimalInventoryComponent.IsLocalInventoryViewer"); } + void NotifyItemAdded(UPrimalItem * theItem, bool bEquippedItem) { NativeCall(this, "UPrimalInventoryComponent.NotifyItemAdded", theItem, bEquippedItem); } + void NotifyArkItemAdded() { NativeCall(this, "UPrimalInventoryComponent.NotifyArkItemAdded"); } + void NotifyItemRemoved(UPrimalItem * theItem) { NativeCall(this, "UPrimalInventoryComponent.NotifyItemRemoved", theItem); } + void RemoveItemSpoilingTimer(UPrimalItem * theItem) { NativeCall(this, "UPrimalInventoryComponent.RemoveItemSpoilingTimer", theItem); } + bool LoadAdditionalStructureEngrams() { return NativeCall(this, "UPrimalInventoryComponent.LoadAdditionalStructureEngrams"); } + bool RemoveItem(FItemNetID * itemID, bool bDoDrop, bool bSecondryAction, bool bForceRemoval, bool showHUDMessage) { return NativeCall(this, "UPrimalInventoryComponent.RemoveItem", itemID, bDoDrop, bSecondryAction, bForceRemoval, showHUDMessage); } + bool ServerEquipItem(FItemNetID * itemID) { return NativeCall(this, "UPrimalInventoryComponent.ServerEquipItem", itemID); } + void DropItem(FItemNetInfo * theInfo, bool bOverrideSpawnTransform, FVector * LocationOverride, FRotator * RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondryAction, bool bSetItemDropLocation) { NativeCall(this, "UPrimalInventoryComponent.DropItem", theInfo, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondryAction, bSetItemDropLocation); } + static ADroppedItem * StaticDropNewItem(AActor * forActor, TSubclassOf AnItemClass, float ItemQuality, bool bForceNoBlueprint, int QuantityOverride, bool bForceBlueprint, TSubclassOf TheDroppedTemplateOverride, FRotator * DroppedRotationOffset, bool bOverrideSpawnTransform, FVector * LocationOverride, FRotator * RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondaryAction, bool bSetItemDropLocation, UStaticMesh * DroppedMeshOverride, FVector DroppedScaleOverride, UMaterialInterface * DroppedMaterialOverride, float DroppedLifeSpanOverride) { return NativeCall, float, bool, int, bool, TSubclassOf, FRotator *, bool, FVector *, FRotator *, bool, bool, bool, bool, UStaticMesh *, FVector, UMaterialInterface *, float>(nullptr, "UPrimalInventoryComponent.StaticDropNewItem", forActor, AnItemClass, ItemQuality, bForceNoBlueprint, QuantityOverride, bForceBlueprint, TheDroppedTemplateOverride, DroppedRotationOffset, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondaryAction, bSetItemDropLocation, DroppedMeshOverride, DroppedScaleOverride, DroppedMaterialOverride, DroppedLifeSpanOverride); } + static ADroppedItem * StaticDropNewItemWithInfo(AActor * forActor, FItemNetInfo * ItemInfo, TSubclassOf TheDroppedTemplateOverride, FRotator * DroppedRotationOffset, bool bOverrideSpawnTransform, FVector * LocationOverride, FRotator * RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondaryAction, bool bSetItemDropLocation, UStaticMesh * DroppedMeshOverride, FVector DroppedScaleOverride, UMaterialInterface * DroppedMaterialOverride, float DroppedLifeSpanOverride) { return NativeCall, FRotator *, bool, FVector *, FRotator *, bool, bool, bool, bool, UStaticMesh *, FVector, UMaterialInterface *, float>(nullptr, "UPrimalInventoryComponent.StaticDropNewItemWithInfo", forActor, ItemInfo, TheDroppedTemplateOverride, DroppedRotationOffset, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondaryAction, bSetItemDropLocation, DroppedMeshOverride, DroppedScaleOverride, DroppedMaterialOverride, DroppedLifeSpanOverride); } + static ADroppedItem * StaticDropItem(AActor * forActor, FItemNetInfo * theInfo, TSubclassOf TheDroppedTemplateOverride, FRotator * DroppedRotationOffset, bool bOverrideSpawnTransform, FVector * LocationOverride, FRotator * RotationOverride, bool bPreventDropImpulse, bool bThrow, bool bSecondryAction, bool bSetItemDropLocation, UStaticMesh * DroppedMeshOverride, FVector * DroppedScaleOverride, UMaterialInterface * DroppedMaterialOverride, float DroppedLifeSpanOverride) { return NativeCall, FRotator *, bool, FVector *, FRotator *, bool, bool, bool, bool, UStaticMesh *, FVector *, UMaterialInterface *, float>(nullptr, "UPrimalInventoryComponent.StaticDropItem", forActor, theInfo, TheDroppedTemplateOverride, DroppedRotationOffset, bOverrideSpawnTransform, LocationOverride, RotationOverride, bPreventDropImpulse, bThrow, bSecondryAction, bSetItemDropLocation, DroppedMeshOverride, DroppedScaleOverride, DroppedMaterialOverride, DroppedLifeSpanOverride); } + AShooterPlayerController * GetOwnerController() { return NativeCall(this, "UPrimalInventoryComponent.GetOwnerController"); } + void InventoryViewersPlayLocalSound(USoundBase * aSound, bool bAttach) { NativeCall(this, "UPrimalInventoryComponent.InventoryViewersPlayLocalSound", aSound, bAttach); } + void InventoryViewersStopLocalSound(USoundBase * aSound) { NativeCall(this, "UPrimalInventoryComponent.InventoryViewersStopLocalSound", aSound); } + void UpdateNetWeaponClipAmmo(UPrimalItem * anItem, int ammo) { NativeCall(this, "UPrimalInventoryComponent.UpdateNetWeaponClipAmmo", anItem, ammo); } + void NotifyClientsItemStatus(UPrimalItem * anItem, bool bEquippedItem, bool bRemovedItem, bool bOnlyUpdateQuantity, bool bOnlyUpdateDurability, bool bOnlyNotifyItemSwap, UPrimalItem * anItem2, FItemNetID * InventoryInsertAfterItemID, bool bUsedItem, bool bNotifyCraftQueue, bool ShowHUDNotification) { NativeCall(this, "UPrimalInventoryComponent.NotifyClientsItemStatus", anItem, bEquippedItem, bRemovedItem, bOnlyUpdateQuantity, bOnlyUpdateDurability, bOnlyNotifyItemSwap, anItem2, InventoryInsertAfterItemID, bUsedItem, bNotifyCraftQueue, ShowHUDNotification); } + void NotifyClientItemArkTributeStatusChanged(UPrimalItem * anItem, bool bRemoved, bool bFromLoad) { NativeCall(this, "UPrimalInventoryComponent.NotifyClientItemArkTributeStatusChanged", anItem, bRemoved, bFromLoad); } + void ServerRequestItems(AShooterPlayerController * forPC, bool bEquippedItems, bool bIsFirstSpawn) { NativeCall(this, "UPrimalInventoryComponent.ServerRequestItems", forPC, bEquippedItems, bIsFirstSpawn); } + void ClientStartReceivingItems(bool bEquippedItems) { NativeCall(this, "UPrimalInventoryComponent.ClientStartReceivingItems", bEquippedItems); } + void ClientFinishReceivingItems(bool bEquippedItems) { NativeCall(this, "UPrimalInventoryComponent.ClientFinishReceivingItems", bEquippedItems); } + TArray * FindColorItem(TArray * result, FColor theColor, bool bEquippedItems) { return NativeCall *, TArray *, FColor, bool>(this, "UPrimalInventoryComponent.FindColorItem", result, theColor, bEquippedItems); } + TArray * FindBrushColorItem(TArray * result, __int16 ArchIndex) { return NativeCall *, TArray *, __int16>(this, "UPrimalInventoryComponent.FindBrushColorItem", result, ArchIndex); } + UPrimalItem * FindItem(FItemNetID * ItemID, bool bEquippedItems, bool bAllItems, int * itemIdx) { return NativeCall(this, "UPrimalInventoryComponent.FindItem", ItemID, bEquippedItems, bAllItems, itemIdx); } + void GiveInitialItems(bool SkipEngrams) { NativeCall(this, "UPrimalInventoryComponent.GiveInitialItems", SkipEngrams); } + void InitDefaultInventory() { NativeCall(this, "UPrimalInventoryComponent.InitDefaultInventory"); } + void InitializeInventory() { NativeCall(this, "UPrimalInventoryComponent.InitializeInventory"); } + void CheckRefreshDefaultInventoryItems() { NativeCall(this, "UPrimalInventoryComponent.CheckRefreshDefaultInventoryItems"); } + void SetEquippedItemsOwnerNoSee(bool bNewOwnerNoSee, bool bForceHideFirstPerson) { NativeCall(this, "UPrimalInventoryComponent.SetEquippedItemsOwnerNoSee", bNewOwnerNoSee, bForceHideFirstPerson); } + bool RemoteInventoryAllowViewing(AShooterPlayerController * PC) { return NativeCall(this, "UPrimalInventoryComponent.RemoteInventoryAllowViewing", PC); } + bool RemoteInventoryAllowAddItems(AShooterPlayerController * PC, UPrimalItem * anItem, int * anItemQuantityOverride, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalInventoryComponent.RemoteInventoryAllowAddItems", PC, anItem, anItemQuantityOverride, bRequestedByPlayer); } + bool RemoteInventoryAllowRemoveItems(AShooterPlayerController * PC, UPrimalItem * anItemToTransfer, int * requestedQuantity, bool bRequestedByPlayer, bool bRequestDropping) { return NativeCall(this, "UPrimalInventoryComponent.RemoteInventoryAllowRemoveItems", PC, anItemToTransfer, requestedQuantity, bRequestedByPlayer, bRequestDropping); } + bool RemoteInventoryAllowCraftingItems(AShooterPlayerController * PC, bool bIgnoreEnabled) { return NativeCall(this, "UPrimalInventoryComponent.RemoteInventoryAllowCraftingItems", PC, bIgnoreEnabled); } + bool RemoteInventoryAllowRepairingItems(AShooterPlayerController * PC, bool bIgnoreEnabled) { return NativeCall(this, "UPrimalInventoryComponent.RemoteInventoryAllowRepairingItems", PC, bIgnoreEnabled); } + void ServerViewRemoteInventory(AShooterPlayerController * ByPC) { NativeCall(this, "UPrimalInventoryComponent.ServerViewRemoteInventory", ByPC); } + void ServerCloseRemoteInventory(AShooterPlayerController * ByPC) { NativeCall(this, "UPrimalInventoryComponent.ServerCloseRemoteInventory", ByPC); } + void OnComponentDestroyed() { NativeCall(this, "UPrimalInventoryComponent.OnComponentDestroyed"); } + void SwapCustomFolder(FString CFolder1, FString CFolder2, int DataListType) { NativeCall(this, "UPrimalInventoryComponent.SwapCustomFolder", CFolder1, CFolder2, DataListType); } + bool AddToFolders(TArray * FoldersFound, UPrimalItem * anItem) { return NativeCall *, UPrimalItem *>(this, "UPrimalInventoryComponent.AddToFolders", FoldersFound, anItem); } + FString * GetInventoryName(FString * result, bool bIsEquipped) { return NativeCall(this, "UPrimalInventoryComponent.GetInventoryName", result, bIsEquipped); } + int GetFirstUnoccupiedSlot(AShooterPlayerState * forPlayerState, UPrimalItem * forItem) { return NativeCall(this, "UPrimalInventoryComponent.GetFirstUnoccupiedSlot", forPlayerState, forItem); } + void ServerMakeRecipeItem_Implementation(APrimalStructureItemContainer * Container, FItemNetID NoteToConsume, TSubclassOf RecipeItemTemplate, FString * CustomName, FString * CustomDescription, TArray * CustomColors, TArray * CustomRequirements) { NativeCall, FString *, FString *, TArray *, TArray *>(this, "UPrimalInventoryComponent.ServerMakeRecipeItem_Implementation", Container, NoteToConsume, RecipeItemTemplate, CustomName, CustomDescription, CustomColors, CustomRequirements); } + void ServerRemoveItemFromSlot_Implementation(FItemNetID ItemID) { NativeCall(this, "UPrimalInventoryComponent.ServerRemoveItemFromSlot_Implementation", ItemID); } + void ServerAddItemToSlot_Implementation(FItemNetID ItemID, int SlotIndex) { NativeCall(this, "UPrimalInventoryComponent.ServerAddItemToSlot_Implementation", ItemID, SlotIndex); } + UPrimalItem * GetEquippedItemOfType(EPrimalEquipmentType::Type aType) { return NativeCall(this, "UPrimalInventoryComponent.GetEquippedItemOfType", aType); } + UPrimalItem * GetEquippedItemOfClass(TSubclassOf ItemClass) { return NativeCall>(this, "UPrimalInventoryComponent.GetEquippedItemOfClass", ItemClass); } + int IncrementItemTemplateQuantity(TSubclassOf ItemTemplate, int amount, bool bReplicateToClient, bool bIsBlueprint, UPrimalItem ** UseSpecificItem, UPrimalItem ** IncrementedItem, bool bRequireExactClassMatch, bool bIsCraftingResourceConsumption, bool bIsFromUseConsumption, bool bIsArkTributeItem, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bDontExceedMaxItems) { return NativeCall, int, bool, bool, UPrimalItem **, UPrimalItem **, bool, bool, bool, bool, bool, bool, bool>(this, "UPrimalInventoryComponent.IncrementItemTemplateQuantity", ItemTemplate, amount, bReplicateToClient, bIsBlueprint, UseSpecificItem, IncrementedItem, bRequireExactClassMatch, bIsCraftingResourceConsumption, bIsFromUseConsumption, bIsArkTributeItem, ShowHUDNotification, bDontRecalcSpoilingTime, bDontExceedMaxItems); } + bool IncrementArkTributeItemQuantity(UPrimalItem * NewItem, UPrimalItem ** IncrementedItem) { return NativeCall(this, "UPrimalInventoryComponent.IncrementArkTributeItemQuantity", NewItem, IncrementedItem); } + UPrimalItem * GetItemOfTemplate(TSubclassOf ItemTemplate, bool bOnlyInventoryItems, bool bOnlyEquippedItems, bool IgnoreItemsWithFullQuantity, bool bFavorSlotItems, bool bIsBlueprint, UPrimalItem * CheckCanStackWithItem, bool bRequiresExactClassMatch, int * CheckCanStackWithItemQuantityOverride, bool bIgnoreSlotItems, bool bOnlyArkTributeItems, bool bPreferEngram, bool bIsForCraftingConsumption) { return NativeCall, bool, bool, bool, bool, bool, UPrimalItem *, bool, int *, bool, bool, bool, bool>(this, "UPrimalInventoryComponent.GetItemOfTemplate", ItemTemplate, bOnlyInventoryItems, bOnlyEquippedItems, IgnoreItemsWithFullQuantity, bFavorSlotItems, bIsBlueprint, CheckCanStackWithItem, bRequiresExactClassMatch, CheckCanStackWithItemQuantityOverride, bIgnoreSlotItems, bOnlyArkTributeItems, bPreferEngram, bIsForCraftingConsumption); } + int GetCraftQueueResourceCost(TSubclassOf ItemTemplate, UPrimalItem * IgnoreFirstItem) { return NativeCall, UPrimalItem *>(this, "UPrimalInventoryComponent.GetCraftQueueResourceCost", ItemTemplate, IgnoreFirstItem); } + int GetItemTemplateQuantity(TSubclassOf ItemTemplate, UPrimalItem * IgnoreItem, bool bIgnoreBlueprints, bool bCheckValidForCrafting, bool bRequireExactClassMatch) { return NativeCall, UPrimalItem *, bool, bool, bool>(this, "UPrimalInventoryComponent.GetItemTemplateQuantity", ItemTemplate, IgnoreItem, bIgnoreBlueprints, bCheckValidForCrafting, bRequireExactClassMatch); } + float GetTotalDurabilityOfTemplate(TSubclassOf ItemTemplate) { return NativeCall>(this, "UPrimalInventoryComponent.GetTotalDurabilityOfTemplate", ItemTemplate); } + void LocalUseItemSlot(int slotIndex, bool bForceCraft) { NativeCall(this, "UPrimalInventoryComponent.LocalUseItemSlot", slotIndex, bForceCraft); } + float GetTotalEquippedItemStat(EPrimalItemStat::Type statType) { return NativeCall(this, "UPrimalInventoryComponent.GetTotalEquippedItemStat", statType); } + float GetEquippedArmorRating(EPrimalEquipmentType::Type equipmentType) { return NativeCall(this, "UPrimalInventoryComponent.GetEquippedArmorRating", equipmentType); } + void ConsumeArmorDurability(float ConsumptionAmount, bool bAllArmorTypes, EPrimalEquipmentType::Type SpecificArmorType) { NativeCall(this, "UPrimalInventoryComponent.ConsumeArmorDurability", ConsumptionAmount, bAllArmorTypes, SpecificArmorType); } + void ServerCraftItem(FItemNetID * itemID, AShooterPlayerController * ByPC) { NativeCall(this, "UPrimalInventoryComponent.ServerCraftItem", itemID, ByPC); } + void AddToCraftQueue(UPrimalItem * anItem, AShooterPlayerController * ByPC, bool bIsRepair, bool bRepairIgnoreInventoryRequirement, float RepairPercentage, float RepairSpeedMultiplier) { NativeCall(this, "UPrimalInventoryComponent.AddToCraftQueue", anItem, ByPC, bIsRepair, bRepairIgnoreInventoryRequirement, RepairPercentage, RepairSpeedMultiplier); } + void ClearCraftQueue(bool bForceClearActiveCraftRepair) { NativeCall(this, "UPrimalInventoryComponent.ClearCraftQueue", bForceClearActiveCraftRepair); } + void ServerRepairItem(FItemNetID * itemID, AShooterPlayerController * ByPC, bool bRepairIgnoreInventoryRequirement, float RepairPercentage, float RepairSpeedMultiplier) { NativeCall(this, "UPrimalInventoryComponent.ServerRepairItem", itemID, ByPC, bRepairIgnoreInventoryRequirement, RepairPercentage, RepairSpeedMultiplier); } + void ServerUseInventoryItem(FItemNetID * itemID, AShooterPlayerController * ByPC) { NativeCall(this, "UPrimalInventoryComponent.ServerUseInventoryItem", itemID, ByPC); } + void ServerUseItemWithItem(FItemNetID * itemID1, FItemNetID * itemID2, int AdditionalData) { NativeCall(this, "UPrimalInventoryComponent.ServerUseItemWithItem", itemID1, itemID2, AdditionalData); } + void SwapInventoryItems(FItemNetID * itemID1, FItemNetID * itemID2) { NativeCall(this, "UPrimalInventoryComponent.SwapInventoryItems", itemID1, itemID2); } + void AddItemCrafting(UPrimalItem * craftingItem) { NativeCall(this, "UPrimalInventoryComponent.AddItemCrafting", craftingItem); } + void RemoveItemCrafting(UPrimalItem * craftingItem) { NativeCall(this, "UPrimalInventoryComponent.RemoveItemCrafting", craftingItem); } + void StopAllCraftingRepairing() { NativeCall(this, "UPrimalInventoryComponent.StopAllCraftingRepairing"); } + void TickCraftQueue(float DeltaTime, AShooterGameState * theGameState) { NativeCall(this, "UPrimalInventoryComponent.TickCraftQueue", DeltaTime, theGameState); } + float GetCraftingSpeed() { return NativeCall(this, "UPrimalInventoryComponent.GetCraftingSpeed"); } + AShooterHUD * GetLocalOwnerHUD() { return NativeCall(this, "UPrimalInventoryComponent.GetLocalOwnerHUD"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "UPrimalInventoryComponent.GetLifetimeReplicatedProps", OutLifetimeProps); } + bool IsLocal() { return NativeCall(this, "UPrimalInventoryComponent.IsLocal"); } + bool IsLocalToPlayer(AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalInventoryComponent.IsLocalToPlayer", ForPC); } + void Unstasised() { NativeCall(this, "UPrimalInventoryComponent.Unstasised"); } + void CheckForAutoCraftBlueprints() { NativeCall(this, "UPrimalInventoryComponent.CheckForAutoCraftBlueprints"); } + bool IsCraftingAllowed(UPrimalItem * anItem) { return NativeCall(this, "UPrimalInventoryComponent.IsCraftingAllowed", anItem); } + void SetCraftingEnabled(bool bEnable) { NativeCall(this, "UPrimalInventoryComponent.SetCraftingEnabled", bEnable); } + float GetInventoryWeight() { return NativeCall(this, "UPrimalInventoryComponent.GetInventoryWeight"); } + void ServerSplitItemStack_Implementation(FItemNetID ItemID, int AmountToSplit) { NativeCall(this, "UPrimalInventoryComponent.ServerSplitItemStack_Implementation", ItemID, AmountToSplit); } + void ServerMergeItemStack_Implementation(FItemNetID ItemID) { NativeCall(this, "UPrimalInventoryComponent.ServerMergeItemStack_Implementation", ItemID); } + void ServerForceMergeItemStack_Implementation(FItemNetID Item1ID, FItemNetID Item2ID) { NativeCall(this, "UPrimalInventoryComponent.ServerForceMergeItemStack_Implementation", Item1ID, Item2ID); } + void RemoteDeleteCustomFolder(FString * CFolderName, int InventoryCompType) { NativeCall(this, "UPrimalInventoryComponent.RemoteDeleteCustomFolder", CFolderName, InventoryCompType); } + void RemoteAddItemToCustomFolder(FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "UPrimalInventoryComponent.RemoteAddItemToCustomFolder", CFolderName, InventoryCompType, ItemId); } + void RemoteDeleteItemFromCustomFolder(AShooterPlayerController * PC, FString * CFolderName, int InventoryCompType, FItemNetID ItemId) { NativeCall(this, "UPrimalInventoryComponent.RemoteDeleteItemFromCustomFolder", PC, CFolderName, InventoryCompType, ItemId); } + UPrimalItem * FindInventoryStackableItemCompareQuantity(TSubclassOf ItemClass, bool bFindLeastQuantity, UPrimalItem * StacksWithAndIgnoreItem) { return NativeCall, bool, UPrimalItem *>(this, "UPrimalInventoryComponent.FindInventoryStackableItemCompareQuantity", ItemClass, bFindLeastQuantity, StacksWithAndIgnoreItem); } + UPrimalCharacterStatusComponent * GetCharacterStatusComponent() { return NativeCall(this, "UPrimalInventoryComponent.GetCharacterStatusComponent"); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex, int hitBodyIndex) { NativeCall(this, "UPrimalInventoryComponent.ClientMultiUse", ForPC, UseIndex, hitBodyIndex); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex, int hitBodyIndex) { return NativeCall(this, "UPrimalInventoryComponent.TryMultiUse", ForPC, UseIndex, hitBodyIndex); } + void ActivePlayerInventoryTick(float DeltaTime) { NativeCall(this, "UPrimalInventoryComponent.ActivePlayerInventoryTick", DeltaTime); } + void InventoryRefresh() { NativeCall(this, "UPrimalInventoryComponent.InventoryRefresh"); } + void RefreshItemSpoilingTimes() { NativeCall(this, "UPrimalInventoryComponent.RefreshItemSpoilingTimes"); } + void NotifyCraftingItemConsumption(TSubclassOf ItemTemplate, int amount) { NativeCall, int>(this, "UPrimalInventoryComponent.NotifyCraftingItemConsumption", ItemTemplate, amount); } + float GetSpoilingTimeMultiplier(UPrimalItem * anItem) { return NativeCall(this, "UPrimalInventoryComponent.GetSpoilingTimeMultiplier", anItem); } + void UsedItem(UPrimalItem * anItem) { NativeCall(this, "UPrimalInventoryComponent.UsedItem", anItem); } + void RegisterComponentTickFunctions(bool bRegister, bool bSaveAndRestoreComponentTickState) { NativeCall(this, "UPrimalInventoryComponent.RegisterComponentTickFunctions", bRegister, bSaveAndRestoreComponentTickState); } + void UpdatedCraftQueue() { NativeCall(this, "UPrimalInventoryComponent.UpdatedCraftQueue"); } + void LoadedFromSaveGame() { NativeCall(this, "UPrimalInventoryComponent.LoadedFromSaveGame"); } + void ClientItemMessageNotification_Implementation(FItemNetID ItemID, EPrimalItemMessage::Type ItemMessageType) { NativeCall(this, "UPrimalInventoryComponent.ClientItemMessageNotification_Implementation", ItemID, ItemMessageType); } + bool IsOwnedByPlayer() { return NativeCall(this, "UPrimalInventoryComponent.IsOwnedByPlayer"); } + bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf OverrideInventoryDepositClass, APrimalStructureItemContainer * CopyStructureValues, APrimalStructureItemContainer ** DepositStructureResult, AActor * GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter, unsigned __int64 DeathCacheCharacterID, float DropInventoryOnGroundTraceDistance, bool bForceDrop) { return NativeCall, APrimalStructureItemContainer *, APrimalStructureItemContainer **, AActor *, FString, FString, unsigned __int64, float, bool>(this, "UPrimalInventoryComponent.DropInventoryDeposit", DestroyAtTime, bDoPreventSendingData, bIgnorEquippedItems, OverrideInventoryDepositClass, CopyStructureValues, DepositStructureResult, GroundIgnoreActor, CurrentCustomFolderFilter, CurrentNameFilter, DeathCacheCharacterID, DropInventoryOnGroundTraceDistance, bForceDrop); } + bool DropNotReadyInventoryDeposit(long double DestroyAtTime) { return NativeCall(this, "UPrimalInventoryComponent.DropNotReadyInventoryDeposit", DestroyAtTime); } + bool GetGroundLocation(FVector * theGroundLoc, FVector * OffsetUp, FVector * OffsetDown, APrimalStructure ** LandedOnStructure, AActor * IgnoreActor, bool bCheckAnyStationary, UPrimitiveComponent ** LandedOnComponent) { return NativeCall(this, "UPrimalInventoryComponent.GetGroundLocation", theGroundLoc, OffsetUp, OffsetDown, LandedOnStructure, IgnoreActor, bCheckAnyStationary, LandedOnComponent); } + AActor * CraftedBlueprintSpawnActor(TSubclassOf ForItemClass, TSubclassOf ActorClassToSpawn) { return NativeCall, TSubclassOf>(this, "UPrimalInventoryComponent.CraftedBlueprintSpawnActor", ForItemClass, ActorClassToSpawn); } + bool GenerateCrateItems(float MinQualityMultiplier, float MaxQualityMultiplier, int NumPasses, float QuantityMultiplier, float SetPowerWeight, float MaxItemDifficultyClamp) { return NativeCall(this, "UPrimalInventoryComponent.GenerateCrateItems", MinQualityMultiplier, MaxQualityMultiplier, NumPasses, QuantityMultiplier, SetPowerWeight, MaxItemDifficultyClamp); } + UPrimalItem * FindArkTributeItem(FItemNetID * ItemID) { return NativeCall(this, "UPrimalInventoryComponent.FindArkTributeItem", ItemID); } + void SetNextItemSpoilingID_Implementation(FItemNetID NextItemID) { NativeCall(this, "UPrimalInventoryComponent.SetNextItemSpoilingID_Implementation", NextItemID); } + void SetNextItemConsumptionID_Implementation(FItemNetID NextItemID) { NativeCall(this, "UPrimalInventoryComponent.SetNextItemConsumptionID_Implementation", NextItemID); } + void CheckReplenishSlotIndex(int slotIndex, TSubclassOf ClassCheckOverride) { NativeCall>(this, "UPrimalInventoryComponent.CheckReplenishSlotIndex", slotIndex, ClassCheckOverride); } + void OnArkTributeItemsRemoved(bool Success, TArray * RemovedItems, TArray * NotFoundItems, int FailureResponseCode, FString * FailureResponseMessage, bool bAllowForcedItemDownload) { NativeCall *, TArray *, int, FString *, bool>(this, "UPrimalInventoryComponent.OnArkTributeItemsRemoved", Success, RemovedItems, NotFoundItems, FailureResponseCode, FailureResponseMessage, bAllowForcedItemDownload); } + void ClientOnArkTributeItemsAdded_Implementation() { NativeCall(this, "UPrimalInventoryComponent.ClientOnArkTributeItemsAdded_Implementation"); } + void OnArkTributeItemsAdded(bool Success, TArray * AddedItems) { NativeCall *>(this, "UPrimalInventoryComponent.OnArkTributeItemsAdded", Success, AddedItems); } + bool RemoveArkTributeItem(FItemNetID * itemID, unsigned int Quantity) { return NativeCall(this, "UPrimalInventoryComponent.RemoveArkTributeItem", itemID, Quantity); } + bool ServerAddToArkTributeInventory(FItemNetID * itemID, TArray SteamItemUserIds, FItemNetInfo * AlternateItemInfo) { return NativeCall, FItemNetInfo *>(this, "UPrimalInventoryComponent.ServerAddToArkTributeInventory", itemID, SteamItemUserIds, AlternateItemInfo); } + UPrimalItem * AddAfterRemovingFromArkTributeInventory(UPrimalItem * Item, FItemNetInfo * MyItem, bool bAllowForcedItemDownload) { return NativeCall(this, "UPrimalInventoryComponent.AddAfterRemovingFromArkTributeInventory", Item, MyItem, bAllowForcedItemDownload); } + bool ServerAddFromArkTributeInventory(FItemNetID * itemID, int Quantity) { return NativeCall(this, "UPrimalInventoryComponent.ServerAddFromArkTributeInventory", itemID, Quantity); } + void RequestAddArkTributeItem(FItemNetInfo * theItemInfo, bool bFromLoad) { NativeCall(this, "UPrimalInventoryComponent.RequestAddArkTributeItem", theItemInfo, bFromLoad); } + void AddArkTributeItem(FItemNetInfo * theItemInfo, bool bFromLoad) { NativeCall(this, "UPrimalInventoryComponent.AddArkTributeItem", theItemInfo, bFromLoad); } + void LoadArkTriuteItems(TArray * ItemInfos) { NativeCall *>(this, "UPrimalInventoryComponent.LoadArkTriuteItems", ItemInfos); } + void NotifyItemQuantityUpdated(UPrimalItem * anItem, int amount) { NativeCall(this, "UPrimalInventoryComponent.NotifyItemQuantityUpdated", anItem, amount); } + bool IsServerCustomFolder(int InventoryCompType) { return NativeCall(this, "UPrimalInventoryComponent.IsServerCustomFolder", InventoryCompType); } + void AddCustomFolder(FString CFolder, int InventoryCompType) { NativeCall(this, "UPrimalInventoryComponent.AddCustomFolder", CFolder, InventoryCompType); } + void RemoveCustomFolder(AShooterPlayerController * PC, FString FolderName, int InventoryCompType) { NativeCall(this, "UPrimalInventoryComponent.RemoveCustomFolder", PC, FolderName, InventoryCompType); } + TArray * GetCustomFolders(TArray * result, int InventoryCompType) { return NativeCall *, TArray *, int>(this, "UPrimalInventoryComponent.GetCustomFolders", result, InventoryCompType); } + void DeleteItemFromCustomFolder(AShooterPlayerController * PC, FString CFolder, FItemNetID ItemId, int InventoryCompType) { NativeCall(this, "UPrimalInventoryComponent.DeleteItemFromCustomFolder", PC, CFolder, ItemId, InventoryCompType); } + bool HasItemsEquipped(TArray> * ItemTemplates, bool bRequiresExactClassMatch, bool bOnlyArkItems, bool bEnsureAllItems) { return NativeCall> *, bool, bool, bool>(this, "UPrimalInventoryComponent.HasItemsEquipped", ItemTemplates, bRequiresExactClassMatch, bOnlyArkItems, bEnsureAllItems); } + bool OverrideBlueprintCraftingRequirement(TSubclassOf ItemTemplate, int ItemQuantity) { return NativeCall, int>(this, "UPrimalInventoryComponent.OverrideBlueprintCraftingRequirement", ItemTemplate, ItemQuantity); } + bool AllowCraftingResourceConsumption(TSubclassOf ItemTemplate, int ItemQuantity) { return NativeCall, int>(this, "UPrimalInventoryComponent.AllowCraftingResourceConsumption", ItemTemplate, ItemQuantity); } + float GetDamageTorpidityIncreaseMultiplierScale() { return NativeCall(this, "UPrimalInventoryComponent.GetDamageTorpidityIncreaseMultiplierScale"); } + float GetIndirectTorpidityIncreaseMultiplierScale() { return NativeCall(this, "UPrimalInventoryComponent.GetIndirectTorpidityIncreaseMultiplierScale"); } + float GetItemWeightMultiplier(UPrimalItem * anItem) { return NativeCall(this, "UPrimalInventoryComponent.GetItemWeightMultiplier", anItem); } + void UpdateTribeGroupInventoryRank_Implementation(char NewRank) { NativeCall(this, "UPrimalInventoryComponent.UpdateTribeGroupInventoryRank_Implementation", NewRank); } + float OverrideItemMinimumUseInterval(UPrimalItem * theItem) { return NativeCall(this, "UPrimalInventoryComponent.OverrideItemMinimumUseInterval", theItem); } + UPrimalItem * AddItemObject(UPrimalItem * anItem) { return NativeCall(this, "UPrimalInventoryComponent.AddItemObject", anItem); } + UPrimalItem * AddItemObjectEx(UPrimalItem * anItem, bool bEquipItem, bool AddToSlot, bool bDontStack, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter * OwnerPlayer) { return NativeCall(this, "UPrimalInventoryComponent.AddItemObjectEx", anItem, bEquipItem, AddToSlot, bDontStack, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer); } + UPrimalItem * BPFindItemWithID(int ItemID1, int ItemID2) { return NativeCall(this, "UPrimalInventoryComponent.BPFindItemWithID", ItemID1, ItemID2); } + bool IsValidCraftingResource(UPrimalItem * theItem) { return NativeCall(this, "UPrimalInventoryComponent.IsValidCraftingResource", theItem); } + void OnComponentCreated() { NativeCall(this, "UPrimalInventoryComponent.OnComponentCreated"); } + bool IsAtMaxInventoryItems() { return NativeCall(this, "UPrimalInventoryComponent.IsAtMaxInventoryItems"); } + void BPCraftingFinishedNotification(UPrimalItem * itemToBeCrafted) { NativeCall(this, "UPrimalInventoryComponent.BPCraftingFinishedNotification", itemToBeCrafted); } + bool BPCustomRemoteInventoryAllowAddItems(AShooterPlayerController * PC, UPrimalItem * anItem, int anItemQuantityOverride, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalInventoryComponent.BPCustomRemoteInventoryAllowAddItems", PC, anItem, anItemQuantityOverride, bRequestedByPlayer); } + bool BPCustomRemoteInventoryAllowRemoveItems(AShooterPlayerController * PC, UPrimalItem * anItemToTransfer, int requestedQuantity, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalInventoryComponent.BPCustomRemoteInventoryAllowRemoveItems", PC, anItemToTransfer, requestedQuantity, bRequestedByPlayer); } + bool BPRemoteInventoryAllowCrafting(AShooterPlayerController * PC) { return NativeCall(this, "UPrimalInventoryComponent.BPRemoteInventoryAllowCrafting", PC); } + void BPRequestedInventoryItems(AShooterPlayerController * forPC) { NativeCall(this, "UPrimalInventoryComponent.BPRequestedInventoryItems", forPC); } + void ClientItemMessageNotification(FItemNetID ItemID, EPrimalItemMessage::Type ItemMessageType) { NativeCall(this, "UPrimalInventoryComponent.ClientItemMessageNotification", ItemID, ItemMessageType); } + void ServerAddItemToSlot(FItemNetID ItemID, int SlotIndex) { NativeCall(this, "UPrimalInventoryComponent.ServerAddItemToSlot", ItemID, SlotIndex); } + void ServerForceMergeItemStack(FItemNetID Item1ID, FItemNetID Item2ID) { NativeCall(this, "UPrimalInventoryComponent.ServerForceMergeItemStack", Item1ID, Item2ID); } + void ServerRemoveItemFromSlot(FItemNetID ItemID) { NativeCall(this, "UPrimalInventoryComponent.ServerRemoveItemFromSlot", ItemID); } + void ServerSplitItemStack(FItemNetID ItemID, int AmountToSplit) { NativeCall(this, "UPrimalInventoryComponent.ServerSplitItemStack", ItemID, AmountToSplit); } + void UpdateTribeGroupInventoryRank(char NewRank) { NativeCall(this, "UPrimalInventoryComponent.UpdateTribeGroupInventoryRank", NewRank); } +}; + +struct UPrimalItem : UObject +{ + FieldValue DinoAutoHealingThresholdPercentField() { return { this, "UPrimalItem.DinoAutoHealingThresholdPercent" }; } + FieldValue DinoAutoHealingUseTimeIntervalField() { return { this, "UPrimalItem.DinoAutoHealingUseTimeInterval" }; } + FieldValue ArkTributeVersionField() { return { this, "UPrimalItem.ArkTributeVersion" }; } + FieldValue>> EquipRequiresExplicitOwnerClassesField() { return { this, "UPrimalItem.EquipRequiresExplicitOwnerClasses" }; } + FieldValue> EquipRequiresExplicitOwnerTagsField() { return { this, "UPrimalItem.EquipRequiresExplicitOwnerTags" }; } + FieldValue ExpirationTimeUTCField() { return { this, "UPrimalItem.ExpirationTimeUTC" }; } + FieldValue BlueprintAllowMaxCraftingsField() { return { this, "UPrimalItem.BlueprintAllowMaxCraftings" }; } + FieldValue AbstractItemCraftingDescriptionField() { return { this, "UPrimalItem.AbstractItemCraftingDescription" }; } + FieldValue>> ItemSkinUseOnItemClassesField() { return { this, "UPrimalItem.ItemSkinUseOnItemClasses" }; } + FieldValue>> ItemSkinPreventOnItemClassesField() { return { this, "UPrimalItem.ItemSkinPreventOnItemClasses" }; } + FieldValue ItemBrokenSoundField() { return { this, "UPrimalItem.ItemBrokenSound" }; } + FieldValue UseItemSoundField() { return { this, "UPrimalItem.UseItemSound" }; } + FieldValue EquipSoundField() { return { this, "UPrimalItem.EquipSound" }; } + FieldValue UnEquipSoundField() { return { this, "UPrimalItem.UnEquipSound" }; } + FieldValue UsedOnOtherItemSoundField() { return { this, "UPrimalItem.UsedOnOtherItemSound" }; } + FieldValue RemovedFromOtherItemSoundField() { return { this, "UPrimalItem.RemovedFromOtherItemSound" }; } + FieldValue RandomChanceToBeBlueprintField() { return { this, "UPrimalItem.RandomChanceToBeBlueprint" }; } + FieldValue> ActorClassAttachmentInfosField() { return { this, "UPrimalItem.ActorClassAttachmentInfos" }; } + FieldValue *> ItemAttachmentInfosField() { return { this, "UPrimalItem.ItemAttachmentInfos" }; } + FieldValue> DynamicItemAttachmentInfosField() { return { this, "UPrimalItem.DynamicItemAttachmentInfos" }; } + FieldValue> ItemSkinAddItemAttachmentsField() { return { this, "UPrimalItem.ItemSkinAddItemAttachments" }; } + FieldValue> MyItemTypeField() { return { this, "UPrimalItem.MyItemType" }; } + FieldValue> MyConsumableTypeField() { return { this, "UPrimalItem.MyConsumableType" }; } + FieldValue> MyEquipmentTypeField() { return { this, "UPrimalItem.MyEquipmentType" }; } + FieldValue ExtraItemCategoryFlagsField() { return { this, "UPrimalItem.ExtraItemCategoryFlags" }; } + FieldValue BlockingShieldFPVTranslationField() { return { this, "UPrimalItem.BlockingShieldFPVTranslation" }; } + FieldValue BlockingShieldFPVRotationField() { return { this, "UPrimalItem.BlockingShieldFPVRotation" }; } + FieldValue ShieldBlockDamagePercentageField() { return { this, "UPrimalItem.ShieldBlockDamagePercentage" }; } + FieldValue ShieldDamageToDurabilityRatioField() { return { this, "UPrimalItem.ShieldDamageToDurabilityRatio" }; } + FieldValue PlayAnimationOnUseField() { return { this, "UPrimalItem.PlayAnimationOnUse" }; } + FieldValue CraftingMinLevelRequirementField() { return { this, "UPrimalItem.CraftingMinLevelRequirement" }; } + FieldValue CraftingCooldownIntervalField() { return { this, "UPrimalItem.CraftingCooldownInterval" }; } + FieldValue> CraftingActorToSpawnField() { return { this, "UPrimalItem.CraftingActorToSpawn" }; } + FieldValue BlueprintBackgroundOverrideTextureField() { return { this, "UPrimalItem.BlueprintBackgroundOverrideTexture" }; } + FieldValue CraftItemButtonStringOverrideField() { return { this, "UPrimalItem.CraftItemButtonStringOverride" }; } + FieldValue> UseSpawnActorClassField() { return { this, "UPrimalItem.UseSpawnActorClass" }; } + FieldValue UseSpawnActorLocOffsetField() { return { this, "UPrimalItem.UseSpawnActorLocOffset" }; } + FieldValue SlotIndexField() { return { this, "UPrimalItem.SlotIndex" }; } + FieldValue ItemIDField() { return { this, "UPrimalItem.ItemID" }; } + FieldValue ItemCustomDataField() { return { this, "UPrimalItem.ItemCustomData" }; } + FieldValue> ItemCustomClassField() { return { this, "UPrimalItem.ItemCustomClass" }; } + FieldValue ItemSkinTemplateIndexField() { return { this, "UPrimalItem.ItemSkinTemplateIndex" }; } + FieldValue> ItemSkinTemplateField() { return { this, "UPrimalItem.ItemSkinTemplate" }; } + FieldValue ItemRatingField() { return { this, "UPrimalItem.ItemRating" }; } + FieldValue CraftQueueField() { return { this, "UPrimalItem.CraftQueue" }; } + FieldValue CraftingSkillField() { return { this, "UPrimalItem.CraftingSkill" }; } + FieldValue CustomItemNameField() { return { this, "UPrimalItem.CustomItemName" }; } + FieldValue CustomItemDescriptionField() { return { this, "UPrimalItem.CustomItemDescription" }; } + FieldValue> CustomColorsField() { return { this, "UPrimalItem.CustomColors" }; } + FieldValue> CustomResourceRequirementsField() { return { this, "UPrimalItem.CustomResourceRequirements" }; } + FieldValue NextCraftCompletionTimeField() { return { this, "UPrimalItem.NextCraftCompletionTime" }; } + FieldValue> OwnerInventoryField() { return { this, "UPrimalItem.OwnerInventory" }; } + FieldValue ItemQualityIndexField() { return { this, "UPrimalItem.ItemQualityIndex" }; } + FieldValue> SupportDragOntoItemClassField() { return { this, "UPrimalItem.SupportDragOntoItemClass" }; } + FieldValue>> SupportDragOntoItemClassesField() { return { this, "UPrimalItem.SupportDragOntoItemClasses" }; } + FieldValue>> SkinWeaponTemplatesField() { return { this, "UPrimalItem.SkinWeaponTemplates" }; } + FieldValue> AmmoSupportDragOntoWeaponItemWeaponTemplateField() { return { this, "UPrimalItem.AmmoSupportDragOntoWeaponItemWeaponTemplate" }; } + FieldValue>> AmmoSupportDragOntoWeaponItemWeaponTemplatesField() { return { this, "UPrimalItem.AmmoSupportDragOntoWeaponItemWeaponTemplates" }; } + FieldValue Ingredient_WeightIncreasePerQuantityField() { return { this, "UPrimalItem.Ingredient_WeightIncreasePerQuantity" }; } + FieldValue Ingredient_FoodIncreasePerQuantityField() { return { this, "UPrimalItem.Ingredient_FoodIncreasePerQuantity" }; } + FieldValue Ingredient_HealthIncreasePerQuantityField() { return { this, "UPrimalItem.Ingredient_HealthIncreasePerQuantity" }; } + FieldValue Ingredient_WaterIncreasePerQuantityField() { return { this, "UPrimalItem.Ingredient_WaterIncreasePerQuantity" }; } + FieldValue Ingredient_StaminaIncreasePerQuantityField() { return { this, "UPrimalItem.Ingredient_StaminaIncreasePerQuantity" }; } + FieldValue DescriptiveNameBaseField() { return { this, "UPrimalItem.DescriptiveNameBase" }; } + FieldValue ItemDescriptionField() { return { this, "UPrimalItem.ItemDescription" }; } + FieldValue DurabilityStringShortField() { return { this, "UPrimalItem.DurabilityStringShort" }; } + FieldValue DurabilityStringField() { return { this, "UPrimalItem.DurabilityString" }; } + FieldValue DroppedItemLifeSpanOverrideField() { return { this, "UPrimalItem.DroppedItemLifeSpanOverride" }; } + FieldValue DroppedMeshOverrideField() { return { this, "UPrimalItem.DroppedMeshOverride" }; } + FieldValue DroppedMeshMaterialOverrideField() { return { this, "UPrimalItem.DroppedMeshMaterialOverride" }; } + FieldValue DroppedMeshOverrideScale3DField() { return { this, "UPrimalItem.DroppedMeshOverrideScale3D" }; } + FieldValue> SpoilingItemField() { return { this, "UPrimalItem.SpoilingItem" }; } + FieldValue>> UseRequiresOwnerActorClassesField() { return { this, "UPrimalItem.UseRequiresOwnerActorClasses" }; } + FieldValue> PreservingItemClassField() { return { this, "UPrimalItem.PreservingItemClass" }; } + FieldValue PreservingItemSpoilingTimeMultiplierField() { return { this, "UPrimalItem.PreservingItemSpoilingTimeMultiplier" }; } + FieldValue SpoilingTimeField() { return { this, "UPrimalItem.SpoilingTime" }; } + FieldValue CraftingConsumesDurabilityField() { return { this, "UPrimalItem.CraftingConsumesDurability" }; } + FieldValue RepairResourceRequirementMultiplierField() { return { this, "UPrimalItem.RepairResourceRequirementMultiplier" }; } + FieldValue BaseItemWeightField() { return { this, "UPrimalItem.BaseItemWeight" }; } + FieldValue DurabilityIncreaseMultiplierField() { return { this, "UPrimalItem.DurabilityIncreaseMultiplier" }; } + FieldValue NewItemDurabilityOverrideField() { return { this, "UPrimalItem.NewItemDurabilityOverride" }; } + FieldValue DurabilityDecreaseMultiplierField() { return { this, "UPrimalItem.DurabilityDecreaseMultiplier" }; } + FieldValue UseDecreaseDurabilityField() { return { this, "UPrimalItem.UseDecreaseDurability" }; } + FieldValue AutoDurabilityDecreaseIntervalField() { return { this, "UPrimalItem.AutoDurabilityDecreaseInterval" }; } + FieldValue AutoDecreaseMinDurabilityField() { return { this, "UPrimalItem.AutoDecreaseMinDurability" }; } + FieldValue AutoDecreaseDurabilityAmountPerIntervalField() { return { this, "UPrimalItem.AutoDecreaseDurabilityAmountPerInterval" }; } + FieldValue UseDecreaseDurabilityMinField() { return { this, "UPrimalItem.UseDecreaseDurabilityMin" }; } + FieldValue UseMinDurabilityRequirementField() { return { this, "UPrimalItem.UseMinDurabilityRequirement" }; } + FieldValue ResourceRarityField() { return { this, "UPrimalItem.ResourceRarity" }; } + FieldValue BlueprintTimeToCraftField() { return { this, "UPrimalItem.BlueprintTimeToCraft" }; } + FieldValue MinBlueprintTimeToCraftField() { return { this, "UPrimalItem.MinBlueprintTimeToCraft" }; } + FieldValue BlueprintWeightField() { return { this, "UPrimalItem.BlueprintWeight" }; } + FieldValue MinimumUseIntervalField() { return { this, "UPrimalItem.MinimumUseInterval" }; } + FieldValue TimeForFullRepairField() { return { this, "UPrimalItem.TimeForFullRepair" }; } + FieldValue BaseCraftingXPField() { return { this, "UPrimalItem.BaseCraftingXP" }; } + FieldValue BaseRepairingXPField() { return { this, "UPrimalItem.BaseRepairingXP" }; } + FieldValue> BaseCraftingResourceRequirementsField() { return { this, "UPrimalItem.BaseCraftingResourceRequirements" }; } + FieldValue> OverrideRepairingRequirementsField() { return { this, "UPrimalItem.OverrideRepairingRequirements" }; } + FieldArray ItemStatInfosField() { return { this, "UPrimalItem.ItemStatInfos" }; } + FieldArray ItemStatValuesField() { return { this, "UPrimalItem.ItemStatValues" }; } + FieldValue WeaponClipAmmoField() { return { this, "UPrimalItem.WeaponClipAmmo" }; } + FieldValue WeaponFrequencyField() { return { this, "UPrimalItem.WeaponFrequency" }; } + FieldValue LastTimeToShowInfoField() { return { this, "UPrimalItem.LastTimeToShowInfo" }; } + FieldValue ItemVersionField() { return { this, "UPrimalItem.ItemVersion" }; } + FieldValue ItemDurabilityField() { return { this, "UPrimalItem.ItemDurability" }; } + FieldValue MinItemDurabilityField() { return { this, "UPrimalItem.MinItemDurability" }; } + FieldValue SavedDurabilityField() { return { this, "UPrimalItem.SavedDurability" }; } + FieldValue> WeaponTemplateField() { return { this, "UPrimalItem.WeaponTemplate" }; } + FieldValue BrokenIconField() { return { this, "UPrimalItem.BrokenIcon" }; } + FieldValue ItemIconField() { return { this, "UPrimalItem.ItemIcon" }; } + FieldValue AlternateItemIconBelowDurabilityField() { return { this, "UPrimalItem.AlternateItemIconBelowDurability" }; } + FieldValue AlternateItemIconBelowDurabilityValueField() { return { this, "UPrimalItem.AlternateItemIconBelowDurabilityValue" }; } + FieldValue ItemIconMaterialParentField() { return { this, "UPrimalItem.ItemIconMaterialParent" }; } + FieldArray<__int16, 6> ItemColorIDField() { return { this, "UPrimalItem.ItemColorID" }; } + FieldArray<__int16, 6> PreSkinItemColorIDField() { return { this, "UPrimalItem.PreSkinItemColorID" }; } + FieldArray bUseItemColorField() { return { this, "UPrimalItem.bUseItemColor" }; } + FieldValue ItemQuantityField() { return { this, "UPrimalItem.ItemQuantity" }; } + FieldValue MaxItemQuantityField() { return { this, "UPrimalItem.MaxItemQuantity" }; } + FieldValue> SteamItemUserIDsField() { return { this, "UPrimalItem.SteamItemUserIDs" }; } + FieldValue> StructureToBuildField() { return { this, "UPrimalItem.StructureToBuild" }; } + FieldValue> GiveItemWhenUsedField() { return { this, "UPrimalItem.GiveItemWhenUsed" }; } + FieldValue>> CraftingRequiresInventoryComponentField() { return { this, "UPrimalItem.CraftingRequiresInventoryComponent" }; } + FieldValue> DroppedItemTemplateOverrideField() { return { this, "UPrimalItem.DroppedItemTemplateOverride" }; } + FieldValue> DroppedItemTemplateForSecondryActionField() { return { this, "UPrimalItem.DroppedItemTemplateForSecondryAction" }; } + FieldValue> BuffToGiveOwnerCharacterField() { return { this, "UPrimalItem.BuffToGiveOwnerCharacter" }; } + FieldValue PreviewCameraRotationField() { return { this, "UPrimalItem.PreviewCameraRotation" }; } + FieldValue PreviewCameraPivotOffsetField() { return { this, "UPrimalItem.PreviewCameraPivotOffset" }; } + FieldValue PreviewCameraDistanceScaleFactorField() { return { this, "UPrimalItem.PreviewCameraDistanceScaleFactor" }; } + FieldValue PreviewCameraDefaultZoomMultiplierField() { return { this, "UPrimalItem.PreviewCameraDefaultZoomMultiplier" }; } + FieldValue PreviewCameraMaxZoomMultiplierField() { return { this, "UPrimalItem.PreviewCameraMaxZoomMultiplier" }; } + FieldValue PlayerMeshTextureMaskParamNameField() { return { this, "UPrimalItem.PlayerMeshTextureMaskParamName" }; } + FieldValue PlayerMeshTextureMaskField() { return { this, "UPrimalItem.PlayerMeshTextureMask" }; } + FieldValue PlayerMeshNoItemDefaultTextureMaskField() { return { this, "UPrimalItem.PlayerMeshNoItemDefaultTextureMask" }; } + FieldValue PlayerMeshTextureMaskMaterialIndexField() { return { this, "UPrimalItem.PlayerMeshTextureMaskMaterialIndex" }; } + FieldValue FPVHandsMeshTextureMaskParamNameField() { return { this, "UPrimalItem.FPVHandsMeshTextureMaskParamName" }; } + FieldValue FPVHandsMeshTextureMaskField() { return { this, "UPrimalItem.FPVHandsMeshTextureMask" }; } + FieldValue FPVHandsMeshTextureMaskMaterialIndexField() { return { this, "UPrimalItem.FPVHandsMeshTextureMaskMaterialIndex" }; } + FieldValue WeaponAmmoOverrideItemCDOField() { return { this, "UPrimalItem.WeaponAmmoOverrideItemCDO" }; } + FieldValue CreationTimeField() { return { this, "UPrimalItem.CreationTime" }; } + FieldValue LastAutoDurabilityDecreaseTimeField() { return { this, "UPrimalItem.LastAutoDurabilityDecreaseTime" }; } + FieldValue LastUseTimeField() { return { this, "UPrimalItem.LastUseTime" }; } + FieldValue LastLocalUseTimeField() { return { this, "UPrimalItem.LastLocalUseTime" }; } + FieldValue TempSlotIndexField() { return { this, "UPrimalItem.TempSlotIndex" }; } + FieldValue> AssociatedWeaponField() { return { this, "UPrimalItem.AssociatedWeapon" }; } + FieldValue MyItemSkinField() { return { this, "UPrimalItem.MyItemSkin" }; } + FieldValue> LastOwnerPlayerField() { return { this, "UPrimalItem.LastOwnerPlayer" }; } + FieldValue CropGrowingFertilizerConsumptionRateField() { return { this, "UPrimalItem.CropGrowingFertilizerConsumptionRate" }; } + FieldValue CropMaxFruitFertilizerConsumptionRateField() { return { this, "UPrimalItem.CropMaxFruitFertilizerConsumptionRate" }; } + FieldValue CropGrowingWaterConsumptionRateField() { return { this, "UPrimalItem.CropGrowingWaterConsumptionRate" }; } + FieldValue CropMaxFruitWaterConsumptionRateField() { return { this, "UPrimalItem.CropMaxFruitWaterConsumptionRate" }; } + FieldValue CropMaxFruitsField() { return { this, "UPrimalItem.CropMaxFruits" }; } + FieldValue CropNoFertilizerOrWaterCacheReductionRateField() { return { this, "UPrimalItem.CropNoFertilizerOrWaterCacheReductionRate" }; } + FieldValue FertilizerEffectivenessMultiplierField() { return { this, "UPrimalItem.FertilizerEffectivenessMultiplier" }; } + FieldValue EggAlertDinosAggroAmountField() { return { this, "UPrimalItem.EggAlertDinosAggroAmount" }; } + FieldValue EggAlertDinosAggroRadiusField() { return { this, "UPrimalItem.EggAlertDinosAggroRadius" }; } + FieldValue> EggAlertDinosAggroTagsField() { return { this, "UPrimalItem.EggAlertDinosAggroTags" }; } + FieldValue EggAlertDinosForcedAggroTimeField() { return { this, "UPrimalItem.EggAlertDinosForcedAggroTime" }; } + FieldValue EggMaximumDistanceFromOriginalDropToAlertDinosField() { return { this, "UPrimalItem.EggMaximumDistanceFromOriginalDropToAlertDinos" }; } + FieldValue> BrokenGiveItemClassField() { return { this, "UPrimalItem.BrokenGiveItemClass" }; } + FieldValue ClearColorDurabilityThresholdField() { return { this, "UPrimalItem.ClearColorDurabilityThreshold" }; } + FieldValue> ItemClassToUseAsInitialCustomDataField() { return { this, "UPrimalItem.ItemClassToUseAsInitialCustomData" }; } + FieldValue OriginalItemDropLocationField() { return { this, "UPrimalItem.OriginalItemDropLocation" }; } + FieldValue DurabilityBarColorForegroundField() { return { this, "UPrimalItem.DurabilityBarColorForeground" }; } + FieldValue DurabilityBarColorBackgroundField() { return { this, "UPrimalItem.DurabilityBarColorBackground" }; } + FieldValue> OverrideCooldownTimeItemClassField() { return { this, "UPrimalItem.OverrideCooldownTimeItemClass" }; } + FieldValue MinDurabilityForCraftingResourceField() { return { this, "UPrimalItem.MinDurabilityForCraftingResource" }; } + FieldValue ResourceRequirementIncreaseRatingPowerField() { return { this, "UPrimalItem.ResourceRequirementIncreaseRatingPower" }; } + FieldValue ResourceRequirementRatingScaleField() { return { this, "UPrimalItem.ResourceRequirementRatingScale" }; } + FieldValue ResourceRequirementRatingIncreasePercentageField() { return { this, "UPrimalItem.ResourceRequirementRatingIncreasePercentage" }; } + FieldValue NextSpoilingTimeField() { return { this, "UPrimalItem.NextSpoilingTime" }; } + FieldValue LastSpoilingTimeField() { return { this, "UPrimalItem.LastSpoilingTime" }; } + FieldValue> DefaultFolderPathsField() { return { this, "UPrimalItem.DefaultFolderPaths" }; } + FieldValue ItemRatingStringField() { return { this, "UPrimalItem.ItemRatingString" }; } + FieldValue DefaultWeaponMeshNameField() { return { this, "UPrimalItem.DefaultWeaponMeshName" }; } + FieldValue LastCalculatedTotalAmmoInvUpdatedFrameField() { return { this, "UPrimalItem.LastCalculatedTotalAmmoInvUpdatedFrame" }; } + FieldValue WeaponTotalAmmoField() { return { this, "UPrimalItem.WeaponTotalAmmo" }; } + FieldValue> EngramRequirementItemClassOverrideField() { return { this, "UPrimalItem.EngramRequirementItemClassOverride" }; } + FieldValue> CraftingResourceRequirementsField() { return { this, "UPrimalItem.CraftingResourceRequirements" }; } + FieldValue ExtraThrowItemSoundField() { return { this, "UPrimalItem.ExtraThrowItemSound" }; } + FieldValue SpawnOnWaterEncroachmentBoxExtentField() { return { this, "UPrimalItem.SpawnOnWaterEncroachmentBoxExtent" }; } + FieldValue>> OnlyUsableOnSpecificClassesField() { return { this, "UPrimalItem.OnlyUsableOnSpecificClasses" }; } + FieldValue> SaddlePassengerSeatsField() { return { this, "UPrimalItem.SaddlePassengerSeats" }; } + FieldValue SaddleOverrideRiderSocketNameField() { return { this, "UPrimalItem.SaddleOverrideRiderSocketName" }; } + FieldValue> EggDinoClassToSpawnField() { return { this, "UPrimalItem.EggDinoClassToSpawn" }; } + FieldArray EggNumberOfLevelUpPointsAppliedField() { return { this, "UPrimalItem.EggNumberOfLevelUpPointsApplied" }; } + FieldValue EggTamedIneffectivenessModifierField() { return { this, "UPrimalItem.EggTamedIneffectivenessModifier" }; } + FieldArray EggColorSetIndicesField() { return { this, "UPrimalItem.EggColorSetIndices" }; } + FieldValue EggLoseDurabilityPerSecondField() { return { this, "UPrimalItem.EggLoseDurabilityPerSecond" }; } + FieldValue ExtraEggLoseDurabilityPerSecondMultiplierField() { return { this, "UPrimalItem.ExtraEggLoseDurabilityPerSecondMultiplier" }; } + FieldValue EggMinTemperatureField() { return { this, "UPrimalItem.EggMinTemperature" }; } + FieldValue EggMaxTemperatureField() { return { this, "UPrimalItem.EggMaxTemperature" }; } + FieldValue EggDroppedInvalidTempLoseItemRatingSpeedField() { return { this, "UPrimalItem.EggDroppedInvalidTempLoseItemRatingSpeed" }; } + FieldValue ShieldHitSoundField() { return { this, "UPrimalItem.ShieldHitSound" }; } + FieldValue RecipeCraftingSkillScaleField() { return { this, "UPrimalItem.RecipeCraftingSkillScale" }; } + FieldValue CustomItemIDField() { return { this, "UPrimalItem.CustomItemID" }; } + FieldValue AddDinoTargetingRangeField() { return { this, "UPrimalItem.AddDinoTargetingRange" }; } + FieldValue DamageTorpidityArmorRatingField() { return { this, "UPrimalItem.DamageTorpidityArmorRating" }; } + FieldValue IndirectTorpidityArmorRatingField() { return { this, "UPrimalItem.IndirectTorpidityArmorRating" }; } + FieldValue UseParticleEffectSocketNameField() { return { this, "UPrimalItem.UseParticleEffectSocketName" }; } + FieldValue UseGiveDinoTameAffinityPercentField() { return { this, "UPrimalItem.UseGiveDinoTameAffinityPercent" }; } + FieldValue>> CraftingAdditionalItemsToGiveField() { return { this, "UPrimalItem.CraftingAdditionalItemsToGive" }; } + FieldValue LastValidItemVersionField() { return { this, "UPrimalItem.LastValidItemVersion" }; } + FieldValue GlobalTameAffinityMultiplierField() { return { this, "UPrimalItem.GlobalTameAffinityMultiplier" }; } + FieldValue CraftingGiveItemCountField() { return { this, "UPrimalItem.CraftingGiveItemCount" }; } + FieldValue CraftingGivesItemQuantityOverrideField() { return { this, "UPrimalItem.CraftingGivesItemQuantityOverride" }; } + FieldValue UseItemOnItemSoundField() { return { this, "UPrimalItem.UseItemOnItemSound" }; } + FieldValue UseUnlocksEmoteNameField() { return { this, "UPrimalItem.UseUnlocksEmoteName" }; } + FieldValue ClusterSpoilingTimeUTCField() { return { this, "UPrimalItem.ClusterSpoilingTimeUTC" }; } + FieldValue> EggDinoAncestorsField() { return { this, "UPrimalItem.EggDinoAncestors" }; } + FieldValue> EggDinoAncestorsMaleField() { return { this, "UPrimalItem.EggDinoAncestorsMale" }; } + FieldValue EggRandomMutationsFemaleField() { return { this, "UPrimalItem.EggRandomMutationsFemale" }; } + FieldValue EggRandomMutationsMaleField() { return { this, "UPrimalItem.EggRandomMutationsMale" }; } + FieldValue>> EquippingRequiresEngramsField() { return { this, "UPrimalItem.EquippingRequiresEngrams" }; } + FieldValue> CustomItemDatasField() { return { this, "UPrimalItem.CustomItemDatas" }; } + FieldValue OverrideUseStringField() { return { this, "UPrimalItem.OverrideUseString" }; } + FieldValue> SendToClientClassOverrideField() { return { this, "UPrimalItem.SendToClientClassOverride" }; } + FieldValue CrafterCharacterNameField() { return { this, "UPrimalItem.CrafterCharacterName" }; } + FieldValue CrafterTribeNameField() { return { this, "UPrimalItem.CrafterTribeName" }; } + FieldValue CraftedSkillBonusField() { return { this, "UPrimalItem.CraftedSkillBonus" }; } + FieldValue CraftingSkillQualityMultiplierMinField() { return { this, "UPrimalItem.CraftingSkillQualityMultiplierMin" }; } + FieldValue CraftingSkillQualityMultiplierMaxField() { return { this, "UPrimalItem.CraftingSkillQualityMultiplierMax" }; } + FieldValue SinglePlayerCraftingSpeedMultiplierField() { return { this, "UPrimalItem.SinglePlayerCraftingSpeedMultiplier" }; } + FieldValue NoLevelEngramSortingPriorityField() { return { this, "UPrimalItem.NoLevelEngramSortingPriority" }; } + FieldValue CustomFlagsField() { return { this, "UPrimalItem.CustomFlags" }; } + FieldValue CustomTagField() { return { this, "UPrimalItem.CustomTag" }; } + FieldValue EquippedReduceDurabilityIntervalField() { return { this, "UPrimalItem.EquippedReduceDurabilityInterval" }; } + FieldValue LastEquippedReduceDurabilityTimeField() { return { this, "UPrimalItem.LastEquippedReduceDurabilityTime" }; } + FieldValue EquippedReduceDurabilityPerIntervalField() { return { this, "UPrimalItem.EquippedReduceDurabilityPerInterval" }; } + FieldValue MaxDurabiltiyOverrideField() { return { this, "UPrimalItem.MaxDurabiltiyOverride" }; } + FieldValue LastItemAdditionTimeField() { return { this, "UPrimalItem.LastItemAdditionTime" }; } + FieldValue UploadEarliestValidTimeField() { return { this, "UPrimalItem.UploadEarliestValidTime" }; } + FieldValue NextRepairPercentageField() { return { this, "UPrimalItem.NextRepairPercentage" }; } + + // Functions + + static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "UPrimalItem.GetPrivateStaticClass"); } + FItemNetInfo * GetItemNetInfo(FItemNetInfo * result, bool bIsForSendingToClient) { return NativeCall(this, "UPrimalItem.GetItemNetInfo", result, bIsForSendingToClient); } + void InitFromNetInfo(FItemNetInfo * theInfo) { NativeCall(this, "UPrimalItem.InitFromNetInfo", theInfo); } + void AddItemDurability(float durabilityToAdd) { NativeCall(this, "UPrimalItem.AddItemDurability", durabilityToAdd); } + void InitNewItem(float ItemQuality, UPrimalInventoryComponent * toInventory, float MaxItemDifficultyClamp) { NativeCall(this, "UPrimalItem.InitNewItem", ItemQuality, toInventory, MaxItemDifficultyClamp); } + bool AllowEquipItem(UPrimalInventoryComponent * toInventory) { return NativeCall(this, "UPrimalItem.AllowEquipItem", toInventory); } + bool AllowInventoryItem(UPrimalInventoryComponent * toInventory) { return NativeCall(this, "UPrimalItem.AllowInventoryItem", toInventory); } + void AddToInventory(UPrimalInventoryComponent * toInventory, bool bEquipItem, bool AddToSlotItems, FItemNetID * InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bIgnoreAbsoluteMaxInventory) { NativeCall(this, "UPrimalItem.AddToInventory", toInventory, bEquipItem, AddToSlotItems, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bIgnoreAbsoluteMaxInventory); } + bool RemoveItemFromArkTributeInventory() { return NativeCall(this, "UPrimalItem.RemoveItemFromArkTributeInventory"); } + bool RemoveItemFromInventory(bool bForceRemoval, bool showHUDMessage) { return NativeCall(this, "UPrimalItem.RemoveItemFromInventory", bForceRemoval, showHUDMessage); } + float GetSpoilingTime() { return NativeCall(this, "UPrimalItem.GetSpoilingTime"); } + static UPrimalItem * AddNewItem(TSubclassOf ItemArchetype, UPrimalInventoryComponent * GiveToInventory, bool bEquipItem, bool bDontStack, float ItemQuality, bool bForceNoBlueprint, int quantityOverride, bool bForceBlueprint, float MaxItemDifficultyClamp, bool CreateOnClient, TSubclassOf ApplyItemSkin) { return NativeCall, UPrimalInventoryComponent *, bool, bool, float, bool, int, bool, float, bool, TSubclassOf>(nullptr, "UPrimalItem.AddNewItem", ItemArchetype, GiveToInventory, bEquipItem, bDontStack, ItemQuality, bForceNoBlueprint, quantityOverride, bForceBlueprint, MaxItemDifficultyClamp, CreateOnClient, ApplyItemSkin); } + static UPrimalItem * CreateItemFromNetInfo(FItemNetInfo * newItemInfo) { return NativeCall(nullptr, "UPrimalItem.CreateItemFromNetInfo", newItemInfo); } + FString * GetItemName(FString * result, bool bIncludeQuantity, bool bShortName, AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.GetItemName", result, bIncludeQuantity, bShortName, ForPC); } + FLinearColor * GetItemQualityColor(FLinearColor * result) { return NativeCall(this, "UPrimalItem.GetItemQualityColor", result); } + FString * GetItemDescription(FString * result, bool bGetLongDescription, AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.GetItemDescription", result, bGetLongDescription, ForPC); } + UTexture2D * GetItemIcon(AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.GetItemIcon", ForPC); } + void EquippedItem() { NativeCall(this, "UPrimalItem.EquippedItem"); } + void UnequippedItem() { NativeCall(this, "UPrimalItem.UnequippedItem"); } + void UpdatedItem() { NativeCall(this, "UPrimalItem.UpdatedItem"); } + void SetOwnerNoSee(bool bNoSee, bool bForceHideFirstPerson) { NativeCall(this, "UPrimalItem.SetOwnerNoSee", bNoSee, bForceHideFirstPerson); } + void RemoveAttachments(AActor * UseOtherActor, bool bRefreshDefaultAttachments) { NativeCall(this, "UPrimalItem.RemoveAttachments", UseOtherActor, bRefreshDefaultAttachments); } + UActorComponent * GetAttachedComponent(int attachmentIndex, AActor * UseOtherActor) { return NativeCall(this, "UPrimalItem.GetAttachedComponent", attachmentIndex, UseOtherActor); } + UActorComponent * GetComponentToAttach(int attachmentIndex, AActor * UseOtherActor) { return NativeCall(this, "UPrimalItem.GetComponentToAttach", attachmentIndex, UseOtherActor); } + AActor * GetOwnerActor() { return NativeCall(this, "UPrimalItem.GetOwnerActor"); } + UTexture2D * GetEntryIcon(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "UPrimalItem.GetEntryIcon", AssociatedDataObject, bIsEnabled); } + FString * GetEntryString(FString * result) { return NativeCall(this, "UPrimalItem.GetEntryString", result); } + float GetItemWeight(bool bJustOneQuantity, bool bForceNotBlueprintWeight) { return NativeCall(this, "UPrimalItem.GetItemWeight", bJustOneQuantity, bForceNotBlueprintWeight); } + void AddToSlot(int theSlotIndex, bool bForce) { NativeCall(this, "UPrimalItem.AddToSlot", theSlotIndex, bForce); } + void RemoveFromSlot(bool bForce) { NativeCall(this, "UPrimalItem.RemoveFromSlot", bForce); } + bool AllowSlotting(UPrimalInventoryComponent * toInventory, bool bForce) { return NativeCall(this, "UPrimalItem.AllowSlotting", toInventory, bForce); } + bool IsBroken() { return NativeCall(this, "UPrimalItem.IsBroken"); } + int GetExplicitEntryIndexType() { return NativeCall(this, "UPrimalItem.GetExplicitEntryIndexType"); } + float GetUseItemAddCharacterStatusValue(EPrimalCharacterStatusValue::Type valueType) { return NativeCall(this, "UPrimalItem.GetUseItemAddCharacterStatusValue", valueType); } + void Use(bool bOverridePlayerInput) { NativeCall(this, "UPrimalItem.Use", bOverridePlayerInput); } + float GetRemainingCooldownTime() { return NativeCall(this, "UPrimalItem.GetRemainingCooldownTime"); } + bool CanSpawnOverWater(AActor * ownerActor, FTransform * SpawnTransform) { return NativeCall(this, "UPrimalItem.CanSpawnOverWater", ownerActor, SpawnTransform); } + bool IsCooldownReadyForUse() { return NativeCall(this, "UPrimalItem.IsCooldownReadyForUse"); } + bool CanUse(bool bIgnoreCooldown) { return NativeCall(this, "UPrimalItem.CanUse", bIgnoreCooldown); } + void LocalUse(AShooterPlayerController * ForPC) { NativeCall(this, "UPrimalItem.LocalUse", ForPC); } + void UnequipWeapon(bool bDelayedUnequip) { NativeCall(this, "UPrimalItem.UnequipWeapon", bDelayedUnequip); } + FString * GetEntryDescription(FString * result) { return NativeCall(this, "UPrimalItem.GetEntryDescription", result); } + void AddedToInventory() { NativeCall(this, "UPrimalItem.AddedToInventory"); } + void InitializeItem(bool bForceReinit, UWorld * OptionalInitWorld) { NativeCall(this, "UPrimalItem.InitializeItem", bForceReinit, OptionalInitWorld); } + void InitItemIcon() { NativeCall(this, "UPrimalItem.InitItemIcon"); } + FLinearColor * GetColorForItemColorID(FLinearColor * result, int SetNum, int ID) { return NativeCall(this, "UPrimalItem.GetColorForItemColorID", result, SetNum, ID); } + static FLinearColor * StaticGetColorForItemColorID(FLinearColor * result, int ID) { return NativeCall(nullptr, "UPrimalItem.StaticGetColorForItemColorID", result, ID); } + UMaterialInterface * GetEntryIconMaterial(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "UPrimalItem.GetEntryIconMaterial", AssociatedDataObject, bIsEnabled); } + int GetItemQuantity() { return NativeCall(this, "UPrimalItem.GetItemQuantity"); } + float GetMiscInfoFontScale() { return NativeCall(this, "UPrimalItem.GetMiscInfoFontScale"); } + FString * GetMiscInfoString(FString * result) { return NativeCall(this, "UPrimalItem.GetMiscInfoString", result); } + int IncrementItemQuantity(int amount, bool bReplicateToClient, bool bDontUpdateWeight, bool bIsFromUseConsumption, bool bIsArkTributeItem, bool bIsFromCraftingConsumption) { return NativeCall(this, "UPrimalItem.IncrementItemQuantity", amount, bReplicateToClient, bDontUpdateWeight, bIsFromUseConsumption, bIsArkTributeItem, bIsFromCraftingConsumption); } + FString * GetItemTypeString(FString * result) { return NativeCall(this, "UPrimalItem.GetItemTypeString", result); } + FString * GetItemSubtypeString(FString * result) { return NativeCall(this, "UPrimalItem.GetItemSubtypeString", result); } + FString * GetItemStatsString(FString * result) { return NativeCall(this, "UPrimalItem.GetItemStatsString", result); } + bool MeetBlueprintCraftingRequirements(UPrimalInventoryComponent * compareInventoryComp, int CraftAmountOverride, AShooterPlayerController * ForPlayer, bool bIsForCraftQueueAddition, bool bTestFullQueue) { return NativeCall(this, "UPrimalItem.MeetBlueprintCraftingRequirements", compareInventoryComp, CraftAmountOverride, ForPlayer, bIsForCraftQueueAddition, bTestFullQueue); } + bool TestMeetsCraftingRequirementsPercent(UPrimalInventoryComponent * invComp, float Percent) { return NativeCall(this, "UPrimalItem.TestMeetsCraftingRequirementsPercent", invComp, Percent); } + void ConsumeCraftingRequirementsPercent(UPrimalInventoryComponent * invComp, float Percent) { NativeCall(this, "UPrimalItem.ConsumeCraftingRequirementsPercent", invComp, Percent); } + FString * GetCraftingRequirementsString(FString * result, UPrimalInventoryComponent * compareInventoryComp) { return NativeCall(this, "UPrimalItem.GetCraftingRequirementsString", result, compareInventoryComp); } + bool MeetRepairingRequirements(UPrimalInventoryComponent * compareInventoryComp, bool bIsForCraftQueueAddition) { return NativeCall(this, "UPrimalItem.MeetRepairingRequirements", compareInventoryComp, bIsForCraftQueueAddition); } + FString * GetRepairingRequirementsString(FString * result, UPrimalInventoryComponent * compareInventoryComp, bool bUseBaseRequeriments, float OverrideRepairPercent) { return NativeCall(this, "UPrimalItem.GetRepairingRequirementsString", result, compareInventoryComp, bUseBaseRequeriments, OverrideRepairPercent); } + float GetItemStatModifier(EPrimalItemStat::Type statType) { return NativeCall(this, "UPrimalItem.GetItemStatModifier", statType); } + FString * GetItemStatString(FString * result, EPrimalItemStat::Type statType) { return NativeCall(this, "UPrimalItem.GetItemStatString", result, statType); } + bool UsesDurability() { return NativeCall(this, "UPrimalItem.UsesDurability"); } + bool CanRepair(bool bIgnoreInventoryRequirement) { return NativeCall(this, "UPrimalItem.CanRepair", bIgnoreInventoryRequirement); } + bool CanRepairInInventory(UPrimalInventoryComponent * invComp) { return NativeCall(this, "UPrimalItem.CanRepairInInventory", invComp); } + float GetDurabilityPercentage() { return NativeCall(this, "UPrimalItem.GetDurabilityPercentage"); } + void CraftBlueprint() { NativeCall(this, "UPrimalItem.CraftBlueprint"); } + bool CanFullyCraft() { return NativeCall(this, "UPrimalItem.CanFullyCraft"); } + void StopCraftingRepairing(bool bCheckIfCraftingOrRepairing) { NativeCall(this, "UPrimalItem.StopCraftingRepairing", bCheckIfCraftingOrRepairing); } + UPrimalItem * FinishCraftingBlueprint() { return NativeCall(this, "UPrimalItem.FinishCraftingBlueprint"); } + float GetTimeToCraftBlueprint() { return NativeCall(this, "UPrimalItem.GetTimeToCraftBlueprint"); } + float GetTimeForFullRepair() { return NativeCall(this, "UPrimalItem.GetTimeForFullRepair"); } + static void GenerateItemID(FItemNetID * TheItemID) { NativeCall(nullptr, "UPrimalItem.GenerateItemID", TheItemID); } + void TickCraftingItem(float DeltaTime, AShooterGameState * theGameState) { NativeCall(this, "UPrimalItem.TickCraftingItem", DeltaTime, theGameState); } + float GetCraftingPercent() { return NativeCall(this, "UPrimalItem.GetCraftingPercent"); } + float GetRepairingPercent() { return NativeCall(this, "UPrimalItem.GetRepairingPercent"); } + void SetQuantity(int NewQuantity, bool ShowHUDNotification) { NativeCall(this, "UPrimalItem.SetQuantity", NewQuantity, ShowHUDNotification); } + void RepairItem(bool bIgnoreInventoryRequirement, float UseNextRepairPercentage, float RepairSpeedMultiplier) { NativeCall(this, "UPrimalItem.RepairItem", bIgnoreInventoryRequirement, UseNextRepairPercentage, RepairSpeedMultiplier); } + void FinishRepairing() { NativeCall(this, "UPrimalItem.FinishRepairing"); } + void Used(UPrimalItem * DestinationItem, int AdditionalData) { NativeCall(this, "UPrimalItem.Used", DestinationItem, AdditionalData); } + void RemoveWeaponAccessory() { NativeCall(this, "UPrimalItem.RemoveWeaponAccessory"); } + void ServerRemoveItemSkin() { NativeCall(this, "UPrimalItem.ServerRemoveItemSkin"); } + void ServerRemoveItemSkinOnly() { NativeCall(this, "UPrimalItem.ServerRemoveItemSkinOnly"); } + void ServerRemoveWeaponAccessoryOnly() { NativeCall(this, "UPrimalItem.ServerRemoveWeaponAccessoryOnly"); } + void RemoveClipAmmo(bool bDontUpdateItem) { NativeCall(this, "UPrimalItem.RemoveClipAmmo", bDontUpdateItem); } + bool CanStackWithItem(UPrimalItem * otherItem, int * QuantityOverride) { return NativeCall(this, "UPrimalItem.CanStackWithItem", otherItem, QuantityOverride); } + bool CheckAutoCraftBlueprint() { return NativeCall(this, "UPrimalItem.CheckAutoCraftBlueprint"); } + bool CanCraft() { return NativeCall(this, "UPrimalItem.CanCraft"); } + bool CanCraftInInventory(UPrimalInventoryComponent * invComp) { return NativeCall(this, "UPrimalItem.CanCraftInInventory", invComp); } + FString * GetCraftRepairInvReqString(FString * result) { return NativeCall(this, "UPrimalItem.GetCraftRepairInvReqString", result); } + bool AllowUseInInventory(bool bIsRemoteInventory, AShooterPlayerController * ByPC, bool DontCheckActor) { return NativeCall(this, "UPrimalItem.AllowUseInInventory", bIsRemoteInventory, ByPC, DontCheckActor); } + bool CanBeArkTributeItem() { return NativeCall(this, "UPrimalItem.CanBeArkTributeItem"); } + void SetEngramBlueprint() { NativeCall(this, "UPrimalItem.SetEngramBlueprint"); } + bool CanSpoil() { return NativeCall(this, "UPrimalItem.CanSpoil"); } + void RecalcSpoilingTime(long double TimeSeconds, float SpoilPercent, UPrimalInventoryComponent * forComp) { NativeCall(this, "UPrimalItem.RecalcSpoilingTime", TimeSeconds, SpoilPercent, forComp); } + void InventoryRefreshCheckItem() { NativeCall(this, "UPrimalItem.InventoryRefreshCheckItem"); } + bool IsValidForCrafting() { return NativeCall(this, "UPrimalItem.IsValidForCrafting"); } + bool IsOwnerInWater() { return NativeCall(this, "UPrimalItem.IsOwnerInWater"); } + bool IsOwnerInNoPainWater() { return NativeCall(this, "UPrimalItem.IsOwnerInNoPainWater"); } + bool AllowRemoteAddToInventory(UPrimalInventoryComponent * invComp, AShooterPlayerController * ByPC, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalItem.AllowRemoteAddToInventory", invComp, ByPC, bRequestedByPlayer); } + bool CanDrop() { return NativeCall(this, "UPrimalItem.CanDrop"); } + void PickupAlertDinos(AActor * groundItem) { NativeCall(this, "UPrimalItem.PickupAlertDinos", groundItem); } + void GetItemAttachmentInfos(AActor * OwnerActor) { NativeCall(this, "UPrimalItem.GetItemAttachmentInfos", OwnerActor); } + void SetAttachedMeshesMaterialScalarParamValue(FName ParamName, float Value) { NativeCall(this, "UPrimalItem.SetAttachedMeshesMaterialScalarParamValue", ParamName, Value); } + bool CanUseWithItemSource(UPrimalItem * DestinationItem) { return NativeCall(this, "UPrimalItem.CanUseWithItemSource", DestinationItem); } + bool CanUseWithItemDestination(UPrimalItem * SourceItem) { return NativeCall(this, "UPrimalItem.CanUseWithItemDestination", SourceItem); } + bool UseItemOntoItem(UPrimalItem * DestinationItem, int AdditionalData) { return NativeCall(this, "UPrimalItem.UseItemOntoItem", DestinationItem, AdditionalData); } + void LocalUseItemOntoItem(AShooterPlayerController * ForPC, UPrimalItem * DestinationItem) { NativeCall(this, "UPrimalItem.LocalUseItemOntoItem", ForPC, DestinationItem); } + FString * GetPrimaryColorName(FString * result) { return NativeCall(this, "UPrimalItem.GetPrimaryColorName", result); } + bool ProcessEditText(AShooterPlayerController * ForPC, FString * TextToUse, bool __formal) { return NativeCall(this, "UPrimalItem.ProcessEditText", ForPC, TextToUse, __formal); } + void NotifyEditText(AShooterPlayerController * PC) { NativeCall(this, "UPrimalItem.NotifyEditText", PC); } + void AddToArkTributeInvenroty(UPrimalInventoryComponent * toInventory, bool bFromLoad) { NativeCall(this, "UPrimalItem.AddToArkTributeInvenroty", toInventory, bFromLoad); } + int GetMaximumAdditionalCrafting(UPrimalInventoryComponent * forComp, AShooterPlayerController * PC) { return NativeCall(this, "UPrimalItem.GetMaximumAdditionalCrafting", forComp, PC); } + void EquippedTick(float DeltaSeconds) { NativeCall(this, "UPrimalItem.EquippedTick", DeltaSeconds); } + float GetWeaponTemplateMeleeDamageAmount() { return NativeCall(this, "UPrimalItem.GetWeaponTemplateMeleeDamageAmount"); } + float GetWeaponTemplateDurabilityToConsumePerMeleeHit() { return NativeCall(this, "UPrimalItem.GetWeaponTemplateDurabilityToConsumePerMeleeHit"); } + TSubclassOf * GetWeaponTemplateMeleeDamageType(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "UPrimalItem.GetWeaponTemplateMeleeDamageType", result); } + TSubclassOf * GetWeaponTemplateHarvestDamageType(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "UPrimalItem.GetWeaponTemplateHarvestDamageType", result); } + float GetWeaponTemplateHarvestDamageMultiplier() { return NativeCall(this, "UPrimalItem.GetWeaponTemplateHarvestDamageMultiplier"); } + void CalcRecipeStats() { NativeCall(this, "UPrimalItem.CalcRecipeStats"); } + bool IsUsableConsumable() { return NativeCall(this, "UPrimalItem.IsUsableConsumable"); } + bool CanEquipWeapon() { return NativeCall(this, "UPrimalItem.CanEquipWeapon"); } + void RemoveCustomItemData(FName CustomDataName) { NativeCall(this, "UPrimalItem.RemoveCustomItemData", CustomDataName); } + bool GetCustomItemData(FName CustomDataName, FCustomItemData * OutData) { return NativeCall(this, "UPrimalItem.GetCustomItemData", CustomDataName, OutData); } + void SetCustomItemData(FCustomItemData * InData) { NativeCall(this, "UPrimalItem.SetCustomItemData", InData); } + int GetEngramRequirementLevel() { return NativeCall(this, "UPrimalItem.GetEngramRequirementLevel"); } + void BPSetWeaponClipAmmo(int NewClipAmmo) { NativeCall(this, "UPrimalItem.BPSetWeaponClipAmmo", NewClipAmmo); } + void Crafted_Implementation(bool bWasCraftedFromEngram) { NativeCall(this, "UPrimalItem.Crafted_Implementation", bWasCraftedFromEngram); } + UMaterialInterface * GetHUDIconMaterial() { return NativeCall(this, "UPrimalItem.GetHUDIconMaterial"); } + float GetEggHatchTimeRemaining(UWorld * theWorld) { return NativeCall(this, "UPrimalItem.GetEggHatchTimeRemaining", theWorld); } + bool IsReadyToUpload(UWorld * theWorld) { return NativeCall(this, "UPrimalItem.IsReadyToUpload", theWorld); } + float GetTimeUntilUploadAllowed(UWorld * theWorld) { return NativeCall(this, "UPrimalItem.GetTimeUntilUploadAllowed", theWorld); } + float HandleShieldDamageBlocking_Implementation(AShooterCharacter * ForShooterCharacter, float DamageIn, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "UPrimalItem.HandleShieldDamageBlocking_Implementation", ForShooterCharacter, DamageIn, DamageEvent, EventInstigator, DamageCauser); } + TArray * GetItemDyeColors(TArray * result) { return NativeCall *, TArray *>(this, "UPrimalItem.GetItemDyeColors", result); } + static void StaticRegisterNativesUPrimalItem() { NativeCall(nullptr, "UPrimalItem.StaticRegisterNativesUPrimalItem"); } + void BlueprintEquipped(bool bIsFromSaveGame) { NativeCall(this, "UPrimalItem.BlueprintEquipped", bIsFromSaveGame); } + FString * BPAllowCrafting(FString * result, AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.BPAllowCrafting", result, ForPC); } + bool BPAllowRemoteAddToInventory(UPrimalInventoryComponent * invComp, AShooterPlayerController * ByPC, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalItem.BPAllowRemoteAddToInventory", invComp, ByPC, bRequestedByPlayer); } + bool BPAllowRemoteRemoveFromInventory(UPrimalInventoryComponent * invComp, AShooterPlayerController * ByPC, bool bRequestedByPlayer) { return NativeCall(this, "UPrimalItem.BPAllowRemoteRemoveFromInventory", invComp, ByPC, bRequestedByPlayer); } + bool BPCanAddToInventory(UPrimalInventoryComponent * toInventory) { return NativeCall(this, "UPrimalItem.BPCanAddToInventory", toInventory); } + FString * BPGetCustomInventoryWidgetText(FString * result) { return NativeCall(this, "UPrimalItem.BPGetCustomInventoryWidgetText", result); } + FString * BPGetItemDescription(FString * result, FString * InDescription, bool bGetLongDescription, AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.BPGetItemDescription", result, InDescription, bGetLongDescription, ForPC); } + FString * BPGetItemName(FString * result, FString * ItemNameIn, AShooterPlayerController * ForPC) { return NativeCall(this, "UPrimalItem.BPGetItemName", result, ItemNameIn, ForPC); } + FString * BPGetSkinnedCustomInventoryWidgetText(FString * result) { return NativeCall(this, "UPrimalItem.BPGetSkinnedCustomInventoryWidgetText", result); } + float HandleShieldDamageBlocking(AShooterCharacter * ForShooterCharacter, float DamageIn, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "UPrimalItem.HandleShieldDamageBlocking", ForShooterCharacter, DamageIn, DamageEvent, EventInstigator, DamageCauser); } + USoundBase * OverrideCrouchingSound(USoundBase * InSound, bool bIsProne, int soundState) { return NativeCall(this, "UPrimalItem.OverrideCrouchingSound", InSound, bIsProne, soundState); } +}; + +struct FItemNetInfo +{ + FieldValue> ItemArchetypeField() { return { this, "FItemNetInfo.ItemArchetype" }; } + FieldValue ItemIDField() { return { this, "FItemNetInfo.ItemID" }; } + FieldValue ExpirationTimeUTCField() { return { this, "FItemNetInfo.ExpirationTimeUTC" }; } + FieldValue> CustomItemDatasField() { return { this, "FItemNetInfo.CustomItemDatas" }; } + FieldValue OwnerPlayerDataIdField() { return { this, "FItemNetInfo.OwnerPlayerDataId" }; } + FieldValue SlotIndexField() { return { this, "FItemNetInfo.SlotIndex" }; } + FieldValue WeaponClipAmmoField() { return { this, "FItemNetInfo.WeaponClipAmmo" }; } + FieldValue CreationTimeField() { return { this, "FItemNetInfo.CreationTime" }; } + FieldValue ItemDurabilityField() { return { this, "FItemNetInfo.ItemDurability" }; } + FieldValue ItemRatingField() { return { this, "FItemNetInfo.ItemRating" }; } + FieldValue ItemQualityIndexField() { return { this, "FItemNetInfo.ItemQualityIndex" }; } + FieldValue ItemQuantityField() { return { this, "FItemNetInfo.ItemQuantity" }; } + FieldValue CraftQueueField() { return { this, "FItemNetInfo.CraftQueue" }; } + FieldValue NextCraftCompletionTimeField() { return { this, "FItemNetInfo.NextCraftCompletionTime" }; } + FieldArray ItemStatValuesField() { return { this, "FItemNetInfo.ItemStatValues" }; } + FieldArray<__int16, 6> ItemColorIDField() { return { this, "FItemNetInfo.ItemColorID" }; } + FieldValue> ItemCustomClassField() { return { this, "FItemNetInfo.ItemCustomClass" }; } + FieldValue> ItemSkinTemplateField() { return { this, "FItemNetInfo.ItemSkinTemplate" }; } + FieldValue CraftingSkillField() { return { this, "FItemNetInfo.CraftingSkill" }; } + FieldValue CustomItemNameField() { return { this, "FItemNetInfo.CustomItemName" }; } + FieldValue CustomItemDescriptionField() { return { this, "FItemNetInfo.CustomItemDescription" }; } + FieldValue> CustomItemColorsField() { return { this, "FItemNetInfo.CustomItemColors" }; } + FieldValue> CustomResourceRequirementsField() { return { this, "FItemNetInfo.CustomResourceRequirements" }; } + FieldValue NextSpoilingTimeField() { return { this, "FItemNetInfo.NextSpoilingTime" }; } + FieldValue LastSpoilingTimeField() { return { this, "FItemNetInfo.LastSpoilingTime" }; } + FieldValue UploadEarliestValidTimeField() { return { this, "FItemNetInfo.UploadEarliestValidTime" }; } + FieldValue> LastOwnerPlayerField() { return { this, "FItemNetInfo.LastOwnerPlayer" }; } + FieldValue LastAutoDurabilityDecreaseTimeField() { return { this, "FItemNetInfo.LastAutoDurabilityDecreaseTime" }; } + FieldValue OriginalItemDropLocationField() { return { this, "FItemNetInfo.OriginalItemDropLocation" }; } + FieldArray<__int16, 6> PreSkinItemColorIDField() { return { this, "FItemNetInfo.PreSkinItemColorID" }; } + FieldArray EggNumberOfLevelUpPointsAppliedField() { return { this, "FItemNetInfo.EggNumberOfLevelUpPointsApplied" }; } + FieldValue EggTamedIneffectivenessModifierField() { return { this, "FItemNetInfo.EggTamedIneffectivenessModifier" }; } + FieldArray EggColorSetIndicesField() { return { this, "FItemNetInfo.EggColorSetIndices" }; } + FieldValue ItemVersionField() { return { this, "FItemNetInfo.ItemVersion" }; } + FieldValue CustomItemIDField() { return { this, "FItemNetInfo.CustomItemID" }; } + FieldValue> SteamUserItemIDField() { return { this, "FItemNetInfo.SteamUserItemID" }; } + FieldValue ClusterSpoilingTimeUTCField() { return { this, "FItemNetInfo.ClusterSpoilingTimeUTC" }; } + FieldValue> EggDinoAncestorsField() { return { this, "FItemNetInfo.EggDinoAncestors" }; } + FieldValue> EggDinoAncestorsMaleField() { return { this, "FItemNetInfo.EggDinoAncestorsMale" }; } + FieldValue EggRandomMutationsFemaleField() { return { this, "FItemNetInfo.EggRandomMutationsFemale" }; } + FieldValue EggRandomMutationsMaleField() { return { this, "FItemNetInfo.EggRandomMutationsMale" }; } + FieldValue ItemProfileVersionField() { return { this, "FItemNetInfo.ItemProfileVersion" }; } + FieldValue CrafterCharacterNameField() { return { this, "FItemNetInfo.CrafterCharacterName" }; } + FieldValue CrafterTribeNameField() { return { this, "FItemNetInfo.CrafterTribeName" }; } + FieldValue CraftedSkillBonusField() { return { this, "FItemNetInfo.CraftedSkillBonus" }; } + + // Functions + + FItemNetInfo * operator=(FItemNetInfo * __that) { return NativeCall(this, "FItemNetInfo.operator=", __that); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FItemNetInfo.StaticStruct"); } +}; + +struct FItemStatInfo +{ + FieldValue DefaultModifierValueField() { return { this, "FItemStatInfo.DefaultModifierValue" }; } + FieldValue RandomizerRangeOverrideField() { return { this, "FItemStatInfo.RandomizerRangeOverride" }; } + FieldValue RandomizerRangeMultiplierField() { return { this, "FItemStatInfo.RandomizerRangeMultiplier" }; } + FieldValue TheRandomizerPowerField() { return { this, "FItemStatInfo.TheRandomizerPower" }; } + FieldValue StateModifierScaleField() { return { this, "FItemStatInfo.StateModifierScale" }; } + FieldValue InitialValueConstantField() { return { this, "FItemStatInfo.InitialValueConstant" }; } + FieldValue RatingValueMultiplierField() { return { this, "FItemStatInfo.RatingValueMultiplier" }; } + FieldValue AbsoluteMaxValueField() { return { this, "FItemStatInfo.AbsoluteMaxValue" }; } + + // Functions + + float GetItemStatModifier(unsigned __int16 ItemStatValue) { return NativeCall(this, "FItemStatInfo.GetItemStatModifier", ItemStatValue); } + unsigned __int16 GetRandomValue(float QualityLevel, float * outRandonMultiplier) { return NativeCall(this, "FItemStatInfo.GetRandomValue", QualityLevel, outRandonMultiplier); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FItemStatInfo.StaticStruct"); } +}; diff --git a/version/Core/Public/API/ARK/Other.h b/version/Core/Public/API/ARK/Other.h new file mode 100644 index 0000000..30d6a6e --- /dev/null +++ b/version/Core/Public/API/ARK/Other.h @@ -0,0 +1,262 @@ +#pragma once + +struct FDamageEvent +{ + FieldValue ImpulseField() { return { this, "FDamageEvent.Impulse" }; } + FieldValue OriginalDamageField() { return { this, "FDamageEvent.OriginalDamage" }; } + FieldValue InstanceBodyIndexField() { return { this, "FDamageEvent.InstanceBodyIndex" }; } + FieldValue> DamageTypeClassField() { return { this, "FDamageEvent.DamageTypeClass" }; } + + // Functions + + void GetBestHitInfo(AActor * HitActor, AActor * HitInstigator, FHitResult * OutHitInfo, FVector * OutImpulseDir) { NativeCall(this, "FDamageEvent.GetBestHitInfo", HitActor, HitInstigator, OutHitInfo, OutImpulseDir); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FDamageEvent.StaticStruct"); } +}; + +struct FHitResult +{ + FieldValue TimeField() { return { this, "FHitResult.Time" }; } + FieldValue LocationField() { return { this, "FHitResult.Location" }; } + FieldValue NormalField() { return { this, "FHitResult.Normal" }; } + FieldValue ImpactPointField() { return { this, "FHitResult.ImpactPoint" }; } + FieldValue ImpactNormalField() { return { this, "FHitResult.ImpactNormal" }; } + FieldValue TraceStartField() { return { this, "FHitResult.TraceStart" }; } + FieldValue TraceEndField() { return { this, "FHitResult.TraceEnd" }; } + FieldValue PenetrationDepthField() { return { this, "FHitResult.PenetrationDepth" }; } + FieldValue ItemField() { return { this, "FHitResult.Item" }; } + //FieldValue> PhysMaterialField() { return { this, "FHitResult.PhysMaterial" }; } + FieldValue> ActorField() { return { this, "FHitResult.Actor" }; } + FieldValue> ComponentField() { return { this, "FHitResult.Component" }; } + //FieldValue BodyInstanceField() { return { this, "FHitResult.BodyInstance" }; } + FieldValue BoneNameField() { return { this, "FHitResult.BoneName" }; } + FieldValue FaceIndexField() { return { this, "FHitResult.FaceIndex" }; } + + // Functions + + void operator=(FHitResult * __that) { NativeCall(this, "FHitResult.operator=", __that); } + AActor * GetActor() { return NativeCall(this, "FHitResult.GetActor"); } + UPrimitiveComponent * GetComponent() { return NativeCall(this, "FHitResult.GetComponent"); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FHitResult.StaticStruct"); } +}; + +struct RCONClientConnection +{ + //FieldValue SocketField() { return { this, "RCONClientConnection.Socket" }; } + FieldValue CheatManagerField() { return { this, "RCONClientConnection.CheatManager" }; } + FieldValue IsAuthenticatedField() { return { this, "RCONClientConnection.IsAuthenticated" }; } + FieldValue IsClosedField() { return { this, "RCONClientConnection.IsClosed" }; } + FieldValue> DataBufferField() { return { this, "RCONClientConnection.DataBuffer" }; } + FieldValue CurrentPacketSizeField() { return { this, "RCONClientConnection.CurrentPacketSize" }; } + FieldValue LastReceiveTimeField() { return { this, "RCONClientConnection.LastReceiveTime" }; } + FieldValue LastSendKeepAliveTimeField() { return { this, "RCONClientConnection.LastSendKeepAliveTime" }; } + FieldValue ServerPasswordField() { return { this, "RCONClientConnection.ServerPassword" }; } + + // Functions + + void Tick(long double WorldTime, UWorld * InWorld) { NativeCall(this, "RCONClientConnection.Tick", WorldTime, InWorld); } + void ProcessRCONPacket(RCONPacket * Packet, UWorld * InWorld) { NativeCall(this, "RCONClientConnection.ProcessRCONPacket", Packet, InWorld); } + void SendMessageW(int Id, int Type, FString * OutGoingMessage) { NativeCall(this, "RCONClientConnection.SendMessageW", Id, Type, OutGoingMessage); } + void Close() { NativeCall(this, "RCONClientConnection.Close"); } +}; + +struct RCONPacket +{ + int Length; + int Id; + int Type; + FString Body; +}; + +struct UGameplayStatics +{ + static APlayerController * GetPlayerController(UObject * WorldContextObject, int PlayerIndex) { return NativeCall(nullptr, "UGameplayStatics.GetPlayerController", WorldContextObject, PlayerIndex); } + static APlayerController * CreatePlayer(UObject * WorldContextObject, int ControllerId, bool bSpawnPawn) { return NativeCall(nullptr, "UGameplayStatics.CreatePlayer", WorldContextObject, ControllerId, bSpawnPawn); } + static void SetGlobalTimeDilation(UObject * WorldContextObject, float TimeDilation) { NativeCall(nullptr, "UGameplayStatics.SetGlobalTimeDilation", WorldContextObject, TimeDilation); } + static bool SetGamePaused(UObject * WorldContextObject, bool bPaused) { return NativeCall(nullptr, "UGameplayStatics.SetGamePaused", WorldContextObject, bPaused); } + static bool ApplyRadialDamage(UObject * WorldContextObject, float BaseDamage, FVector * Origin, float DamageRadius, TSubclassOf DamageTypeClass, TArray * IgnoreActors, AActor * DamageCauser, AController * InstigatedByController, bool bDoFullDamage, ECollisionChannel DamagePreventionChannel, float Impulse) { return NativeCall, TArray *, AActor *, AController *, bool, ECollisionChannel, float>(nullptr, "UGameplayStatics.ApplyRadialDamage", WorldContextObject, BaseDamage, Origin, DamageRadius, DamageTypeClass, IgnoreActors, DamageCauser, InstigatedByController, bDoFullDamage, DamagePreventionChannel, Impulse); } + static bool ApplyRadialDamageIgnoreDamageActors(UObject * WorldContextObject, float BaseDamage, FVector * Origin, float DamageRadius, TSubclassOf DamageTypeClass, TArray * IgnoreActors, TArray * IgnoreDamageActors, AActor * DamageCauser, AController * InstigatedByController, bool bDoFullDamage, ECollisionChannel DamagePreventionChannel, float Impulse) { return NativeCall, TArray *, TArray *, AActor *, AController *, bool, ECollisionChannel, float>(nullptr, "UGameplayStatics.ApplyRadialDamageIgnoreDamageActors", WorldContextObject, BaseDamage, Origin, DamageRadius, DamageTypeClass, IgnoreActors, IgnoreDamageActors, DamageCauser, InstigatedByController, bDoFullDamage, DamagePreventionChannel, Impulse); } + static bool ApplyRadialDamageWithFalloff(UObject * WorldContextObject, float BaseDamage, float MinimumDamage, FVector * Origin, float DamageInnerRadius, float DamageOuterRadius, float DamageFalloff, TSubclassOf DamageTypeClass, TArray * IgnoreActors, AActor * DamageCauser, AController * InstigatedByController, ECollisionChannel DamagePreventionChannel, float Impulse, TArray * IgnoreDamageActors, int NumAdditionalAttempts) { return NativeCall, TArray *, AActor *, AController *, ECollisionChannel, float, TArray *, int>(nullptr, "UGameplayStatics.ApplyRadialDamageWithFalloff", WorldContextObject, BaseDamage, MinimumDamage, Origin, DamageInnerRadius, DamageOuterRadius, DamageFalloff, DamageTypeClass, IgnoreActors, DamageCauser, InstigatedByController, DamagePreventionChannel, Impulse, IgnoreDamageActors, NumAdditionalAttempts); } + static void ApplyPointDamage(AActor * DamagedActor, float BaseDamage, FVector * HitFromDirection, FHitResult * HitInfo, AController * EventInstigator, AActor * DamageCauser, TSubclassOf DamageTypeClass, float Impulse, bool bForceCollisionCheck, ECollisionChannel ForceCollisionCheckTraceChannel) { NativeCall, float, bool, ECollisionChannel>(nullptr, "UGameplayStatics.ApplyPointDamage", DamagedActor, BaseDamage, HitFromDirection, HitInfo, EventInstigator, DamageCauser, DamageTypeClass, Impulse, bForceCollisionCheck, ForceCollisionCheckTraceChannel); } + static void ApplyDamage(AActor * DamagedActor, float BaseDamage, AController * EventInstigator, AActor * DamageCauser, TSubclassOf DamageTypeClass, float Impulse) { NativeCall, float>(nullptr, "UGameplayStatics.ApplyDamage", DamagedActor, BaseDamage, EventInstigator, DamageCauser, DamageTypeClass, Impulse); } + static AActor * BeginSpawningActorFromBlueprint(UObject * WorldContextObject, UBlueprint * Blueprint, FTransform * SpawnTransform, bool bNoCollisionFail) { return NativeCall(nullptr, "UGameplayStatics.BeginSpawningActorFromBlueprint", WorldContextObject, Blueprint, SpawnTransform, bNoCollisionFail); } + static AActor * BeginSpawningActorFromClass(UObject * WorldContextObject, TSubclassOf ActorClass, FTransform * SpawnTransform, bool bNoCollisionFail) { return NativeCall, FTransform *, bool>(nullptr, "UGameplayStatics.BeginSpawningActorFromClass", WorldContextObject, ActorClass, SpawnTransform, bNoCollisionFail); } + static void OpenLevel(UObject * WorldContextObject, FName LevelName, bool bAbsolute, FString Options) { NativeCall(nullptr, "UGameplayStatics.OpenLevel", WorldContextObject, LevelName, bAbsolute, Options); } + static FVector * GetActorArrayAverageLocation(FVector * result, TArray * Actors) { return NativeCall *>(nullptr, "UGameplayStatics.GetActorArrayAverageLocation", result, Actors); } + static void GetActorArrayBounds(TArray * Actors, bool bOnlyCollidingComponents, FVector * Center, FVector * BoxExtent) { NativeCall *, bool, FVector *, FVector *>(nullptr, "UGameplayStatics.GetActorArrayBounds", Actors, bOnlyCollidingComponents, Center, BoxExtent); } + static void GetAllActorsOfClass(UObject * WorldContextObject, TSubclassOf ActorClass, TArray * OutActors) { NativeCall, TArray *>(nullptr, "UGameplayStatics.GetAllActorsOfClass", WorldContextObject, ActorClass, OutActors); } + //static void GetAllActorsWithInterface(UObject * WorldContextObject, TSubclassOf Interface, TArray * OutActors) { NativeCall, TArray *>(nullptr, "UGameplayStatics.GetAllActorsWithInterface", WorldContextObject, Interface, OutActors); } + static EPhysicalSurface GetSurfaceType(FHitResult * Hit) { return NativeCall(nullptr, "UGameplayStatics.GetSurfaceType", Hit); } + static bool AreAnyListenersWithinRange(FVector Location, float MaximumRange) { return NativeCall(nullptr, "UGameplayStatics.AreAnyListenersWithinRange", Location, MaximumRange); } + static void PlaySound(UObject * WorldContextObject, USoundCue * InSoundCue, USceneComponent * AttachComponent, FName AttachName, bool bFollow, float VolumeMultiplier, float PitchMultiplier) { NativeCall(nullptr, "UGameplayStatics.PlaySound", WorldContextObject, InSoundCue, AttachComponent, AttachName, bFollow, VolumeMultiplier, PitchMultiplier); } + static void GetAccurateRealTime(UObject * WorldContextObject, int * Seconds, float * PartialSeconds) { NativeCall(nullptr, "UGameplayStatics.GetAccurateRealTime", WorldContextObject, Seconds, PartialSeconds); } +}; + +struct FItemMultiplier +{ + TSubclassOf ItemClass; + float ItemMultiplier; +}; + +struct APrimalBuff +{ + FieldValue DeactivationLifespanField() { return { this, "APrimalBuff.DeactivationLifespan" }; } + FieldValue InstigatorAttachmentSocketField() { return { this, "APrimalBuff.InstigatorAttachmentSocket" }; } + FieldValue AoETraceToTargetsStartOffsetField() { return { this, "APrimalBuff.AoETraceToTargetsStartOffset" }; } + FieldValue> TargetField() { return { this, "APrimalBuff.Target" }; } + FieldValue> InstigatorItemField() { return { this, "APrimalBuff.InstigatorItem" }; } + FieldValue SlowInstigatorFallingAddZVelocityField() { return { this, "APrimalBuff.SlowInstigatorFallingAddZVelocity" }; } + FieldValue SlowInstigatorFallingDampenZVelocityField() { return { this, "APrimalBuff.SlowInstigatorFallingDampenZVelocity" }; } + FieldValue DeactivateAfterTimeField() { return { this, "APrimalBuff.DeactivateAfterTime" }; } + FieldValue WeaponRecoilMultiplierField() { return { this, "APrimalBuff.WeaponRecoilMultiplier" }; } + FieldValue ReceiveDamageMultiplierField() { return { this, "APrimalBuff.ReceiveDamageMultiplier" }; } + FieldValue MeleeDamageMultiplierField() { return { this, "APrimalBuff.MeleeDamageMultiplier" }; } + FieldValue DepleteInstigatorItemDurabilityPerSecondField() { return { this, "APrimalBuff.DepleteInstigatorItemDurabilityPerSecond" }; } + FieldArray ValuesToAddPerSecondField() { return { this, "APrimalBuff.ValuesToAddPerSecond" }; } + //FieldValue BuffDescriptionField() { return { this, "APrimalBuff.BuffDescription" }; } + FieldValue CharacterAdd_DefaultHyperthermicInsulationField() { return { this, "APrimalBuff.CharacterAdd_DefaultHyperthermicInsulation" }; } + FieldValue CharacterAdd_DefaultHypothermicInsulationField() { return { this, "APrimalBuff.CharacterAdd_DefaultHypothermicInsulation" }; } + FieldValue CharacterMultiplier_ExtraWaterConsumptionMultiplierField() { return { this, "APrimalBuff.CharacterMultiplier_ExtraWaterConsumptionMultiplier" }; } + FieldValue CharacterMultiplier_ExtraFoodConsumptionMultiplierField() { return { this, "APrimalBuff.CharacterMultiplier_ExtraFoodConsumptionMultiplier" }; } + FieldValue CharacterMultiplier_SubmergedOxygenDecreaseSpeedField() { return { this, "APrimalBuff.CharacterMultiplier_SubmergedOxygenDecreaseSpeed" }; } + FieldValue ViewMinExposureMultiplierField() { return { this, "APrimalBuff.ViewMinExposureMultiplier" }; } + FieldValue ViewMaxExposureMultiplierField() { return { this, "APrimalBuff.ViewMaxExposureMultiplier" }; } + FieldValue XPtoAddField() { return { this, "APrimalBuff.XPtoAdd" }; } + FieldValue XPtoAddRateField() { return { this, "APrimalBuff.XPtoAddRate" }; } + FieldValue bDeactivateAfterAddingXPField() { return { this, "APrimalBuff.bDeactivateAfterAddingXP" }; } + FieldValue SubmergedMaxSpeedModifierField() { return { this, "APrimalBuff.SubmergedMaxSpeedModifier" }; } + FieldValue UnsubmergedMaxSpeedModifierField() { return { this, "APrimalBuff.UnsubmergedMaxSpeedModifier" }; } + //FieldValue> CharacterStatusValueModifiersField() { return { this, "APrimalBuff.CharacterStatusValueModifiers" }; } + FieldValue BuffStartTimeField() { return { this, "APrimalBuff.BuffStartTime" }; } + FieldValue BuffPostProcessEffectField() { return { this, "APrimalBuff.BuffPostProcessEffect" }; } + FieldValue>> PreventActorClassesTargetingField() { return { this, "APrimalBuff.PreventActorClassesTargeting" }; } + FieldValue> PreventActorClassesTargetingRangesField() { return { this, "APrimalBuff.PreventActorClassesTargetingRanges" }; } + FieldValue> AOEOtherBuffToApplyField() { return { this, "APrimalBuff.AOEOtherBuffToApply" }; } + FieldValue AOEBuffRangeField() { return { this, "APrimalBuff.AOEBuffRange" }; } + FieldValue CharacterAOEBuffDamageField() { return { this, "APrimalBuff.CharacterAOEBuffDamage" }; } + FieldValue CharacterAOEBuffResistanceField() { return { this, "APrimalBuff.CharacterAOEBuffResistance" }; } + FieldValue Maximum2DVelocityForStaminaRecoveryField() { return { this, "APrimalBuff.Maximum2DVelocityForStaminaRecovery" }; } + FieldValue> PostprocessBlendablesToExcludeField() { return { this, "APrimalBuff.PostprocessBlendablesToExclude" }; } + FieldValue>> BuffedCharactersField() { return { this, "APrimalBuff.BuffedCharacters" }; } + FieldValue LastItemDurabilityDepletionTimeField() { return { this, "APrimalBuff.LastItemDurabilityDepletionTime" }; } + FieldValue> BuffToGiveOnDeactivationField() { return { this, "APrimalBuff.BuffToGiveOnDeactivation" }; } + FieldValue>> BuffClassesToCancelOnActivationField() { return { this, "APrimalBuff.BuffClassesToCancelOnActivation" }; } + FieldValue>> ActivePreventsBuffClassesField() { return { this, "APrimalBuff.ActivePreventsBuffClasses" }; } + FieldValue>> BuffRequiresOwnerClassField() { return { this, "APrimalBuff.BuffRequiresOwnerClass" }; } + FieldValue>> BuffPreventsOwnerClassField() { return { this, "APrimalBuff.BuffPreventsOwnerClass" }; } + FieldValue XPEarningMultiplierField() { return { this, "APrimalBuff.XPEarningMultiplier" }; } + FieldValue bUseBPSetupForInstigatorField() { return { this, "APrimalBuff.bUseBPSetupForInstigator" }; } + FieldValue bUseBPDeactivatedField() { return { this, "APrimalBuff.bUseBPDeactivated" }; } + FieldValue bUseBPCustomAllowAddBuffField() { return { this, "APrimalBuff.bUseBPCustomAllowAddBuff" }; } + FieldValue staticPathingDestinationField() { return { this, "APrimalBuff.staticPathingDestination" }; } + FieldValue TickingDeactivationTimeField() { return { this, "APrimalBuff.TickingDeactivationTime" }; } + //FieldValue MyBuffPersistentDataField() { return { this, "APrimalBuff.MyBuffPersistentData" }; } + //FieldValue> BuffPersistentDataClassField() { return { this, "APrimalBuff.BuffPersistentDataClass" }; } + //FieldValue> MaxStatScalersField() { return { this, "APrimalBuff.MaxStatScalers" }; } + FieldValue> DamageCauserField() { return { this, "APrimalBuff.DamageCauser" }; } + FieldValue ExtraActivationSoundToPlayField() { return { this, "APrimalBuff.ExtraActivationSoundToPlay" }; } + FieldValue bPersistentBuffSurvivesLevelUpField() { return { this, "APrimalBuff.bPersistentBuffSurvivesLevelUp" }; } + FieldValue AoEApplyDamageField() { return { this, "APrimalBuff.AoEApplyDamage" }; } + FieldValue AoEApplyDamageIntervalField() { return { this, "APrimalBuff.AoEApplyDamageInterval" }; } + FieldValue> AoEApplyDamageTypeField() { return { this, "APrimalBuff.AoEApplyDamageType" }; } + FieldValue> ForceNetworkSpatializationMaxLimitBuffTypeField() { return { this, "APrimalBuff.ForceNetworkSpatializationMaxLimitBuffType" }; } + FieldValue ForceNetworkSpatializationBuffMaxLimitNumField() { return { this, "APrimalBuff.ForceNetworkSpatializationBuffMaxLimitNum" }; } + FieldValue ForceNetworkSpatializationBuffMaxLimitRangeField() { return { this, "APrimalBuff.ForceNetworkSpatializationBuffMaxLimitRange" }; } + FieldValue InsulationRangeField() { return { this, "APrimalBuff.InsulationRange" }; } + FieldValue HyperThermiaInsulationField() { return { this, "APrimalBuff.HyperThermiaInsulation" }; } + FieldValue HypoThermiaInsulationField() { return { this, "APrimalBuff.HypoThermiaInsulation" }; } + FieldValue AoEBuffLocOffsetField() { return { this, "APrimalBuff.AoEBuffLocOffset" }; } + FieldValue>> AoEClassesToIncludeField() { return { this, "APrimalBuff.AoEClassesToInclude" }; } + FieldValue>> AoEClassesToExcludeField() { return { this, "APrimalBuff.AoEClassesToExclude" }; } + FieldValue bUseBPExcludeAoEActorField() { return { this, "APrimalBuff.bUseBPExcludeAoEActor" }; } + FieldValue bOverrideBuffDescriptionField() { return { this, "APrimalBuff.bOverrideBuffDescription" }; } + FieldValue bOnlyTickWhenPossessedField() { return { this, "APrimalBuff.bOnlyTickWhenPossessed" }; } + FieldValue bDestroyWhenUnpossessedField() { return { this, "APrimalBuff.bDestroyWhenUnpossessed" }; } + FieldValue LastAoEApplyDamageTimeField() { return { this, "APrimalBuff.LastAoEApplyDamageTime" }; } + FieldValue OnlyForInstigatorSoundFadeInTimeField() { return { this, "APrimalBuff.OnlyForInstigatorSoundFadeInTime" }; } + FieldValue bUseBuffTickServerField() { return { this, "APrimalBuff.bUseBuffTickServer" }; } + FieldValue bUseBuffTickClientField() { return { this, "APrimalBuff.bUseBuffTickClient" }; } + FieldValue BuffTickServerMaxTimeField() { return { this, "APrimalBuff.BuffTickServerMaxTime" }; } + FieldValue BuffTickServerMinTimeField() { return { this, "APrimalBuff.BuffTickServerMinTime" }; } + FieldValue BuffTickClientMaxTimeField() { return { this, "APrimalBuff.BuffTickClientMaxTime" }; } + FieldValue BuffTickClientMinTimeField() { return { this, "APrimalBuff.BuffTickClientMinTime" }; } + FieldValue LastBuffTickTimeServerField() { return { this, "APrimalBuff.LastBuffTickTimeServer" }; } + FieldValue LastBuffTickTimeClientField() { return { this, "APrimalBuff.LastBuffTickTimeClient" }; } + FieldValue NextBuffTickTimeServerField() { return { this, "APrimalBuff.NextBuffTickTimeServer" }; } + FieldValue NextBuffTickTimeClientField() { return { this, "APrimalBuff.NextBuffTickTimeClient" }; } + FieldValue bTickFunctionDisabledField() { return { this, "APrimalBuff.bTickFunctionDisabled" }; } + FieldValue bWasStasisedField() { return { this, "APrimalBuff.bWasStasised" }; } + FieldValue AddBuffMaxNumStacksField() { return { this, "APrimalBuff.AddBuffMaxNumStacks" }; } + FieldValue DeactivatedSoundField() { return { this, "APrimalBuff.DeactivatedSound" }; } + FieldValue bDeactivatedSoundOnlyLocalField() { return { this, "APrimalBuff.bDeactivatedSoundOnlyLocal" }; } + FieldValue bDisableBloomField() { return { this, "APrimalBuff.bDisableBloom" }; } + FieldValue bBPOverrideCharacterNewFallVelocityField() { return { this, "APrimalBuff.bBPOverrideCharacterNewFallVelocity" }; } + FieldValue bBPModifyCharacterFOVField() { return { this, "APrimalBuff.bBPModifyCharacterFOV" }; } + FieldValue bDisableLightShaftsField() { return { this, "APrimalBuff.bDisableLightShafts" }; } + FieldValue PostProcessInterpSpeedDownField() { return { this, "APrimalBuff.PostProcessInterpSpeedDown" }; } + FieldValue PostProcessInterpSpeedUpField() { return { this, "APrimalBuff.PostProcessInterpSpeedUp" }; } + FieldValue TPVCameraSpeedInterpolationMultiplierField() { return { this, "APrimalBuff.TPVCameraSpeedInterpolationMultiplier" }; } + FieldValue bIsCarryBuffField() { return { this, "APrimalBuff.bIsCarryBuff" }; } + FieldValue TimeForNextAOECheckField() { return { this, "APrimalBuff.TimeForNextAOECheck" }; } + FieldValue AOEBuffIntervalMinField() { return { this, "APrimalBuff.AOEBuffIntervalMin" }; } + FieldValue AOEBuffIntervalMaxField() { return { this, "APrimalBuff.AOEBuffIntervalMax" }; } + FieldValue MaximumVelocityZForSlowingFallField() { return { this, "APrimalBuff.MaximumVelocityZForSlowingFall" }; } + FieldValue FNameIntField() { return { this, "APrimalBuff.FNameInt" }; } + + // Functions + + bool TemplateAllowActorSpawn(UWorld * World, FVector * AtLocation, FRotator * AtRotation, FActorSpawnParameters * SpawnParameters) { return NativeCall(this, "APrimalBuff.TemplateAllowActorSpawn", World, AtLocation, AtRotation, SpawnParameters); } + void Deactivate() { NativeCall(this, "APrimalBuff.Deactivate"); } + void NetDeactivate_Implementation() { NativeCall(this, "APrimalBuff.NetDeactivate_Implementation"); } + void BeginPlay() { NativeCall(this, "APrimalBuff.BeginPlay"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalBuff.GetLifetimeReplicatedProps", OutLifetimeProps); } + void AddDamageStatusValueModifier(APrimalCharacter * addToCharacter, EPrimalCharacterStatusValue::Type ValueType, bool bSpeedToAddInSeconds, bool bContinueOnUnchangedValue, bool bResetExistingModifierDescriptionIndex, bool bSetValue, bool bSetAdditionalValue, float LimitExistingModifierDescriptionToMaxAmount, float damageMultiplierAmountToAdd, float speedToAdd, int StatusValueModifierDescriptionIndex, bool bUsePercentualDamage, bool bMakeUntameable, float percentualDamage, TSubclassOf ScaleValueByCharacterDamageType) { NativeCall>(this, "APrimalBuff.AddDamageStatusValueModifier", addToCharacter, ValueType, bSpeedToAddInSeconds, bContinueOnUnchangedValue, bResetExistingModifierDescriptionIndex, bSetValue, bSetAdditionalValue, LimitExistingModifierDescriptionToMaxAmount, damageMultiplierAmountToAdd, speedToAdd, StatusValueModifierDescriptionIndex, bUsePercentualDamage, bMakeUntameable, percentualDamage, ScaleValueByCharacterDamageType); } + void SetupForInstigator() { NativeCall(this, "APrimalBuff.SetupForInstigator"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APrimalBuff.Tick", DeltaSeconds); } + void ProcessStaticPathing(bool triggerRunning) { NativeCall(this, "APrimalBuff.ProcessStaticPathing", triggerRunning); } + FVector * UpdateStaticPathingDestination(FVector * result, FVector locOverride, float randomOffsetMultiplier, bool useRandomNegativeXDir, bool orientRandOffsetByRotation, FRotator randOffsetByRotation, float GroundCheckSpreadOverride) { return NativeCall(this, "APrimalBuff.UpdateStaticPathingDestination", result, locOverride, randomOffsetMultiplier, useRandomNegativeXDir, orientRandOffsetByRotation, randOffsetByRotation, GroundCheckSpreadOverride); } + void EnableTickFunction() { NativeCall(this, "APrimalBuff.EnableTickFunction"); } + bool AOEBuffCanAffect(APrimalCharacter * forChar) { return NativeCall(this, "APrimalBuff.AOEBuffCanAffect", forChar); } + void InstigatorJumped() { NativeCall(this, "APrimalBuff.InstigatorJumped"); } + void Destroyed() { NativeCall(this, "APrimalBuff.Destroyed"); } + void NetResetBuffStart_Implementation() { NativeCall(this, "APrimalBuff.NetResetBuffStart_Implementation"); } + bool ResetBuffStart() { return NativeCall(this, "APrimalBuff.ResetBuffStart"); } + APrimalBuff * AddBuff(APrimalCharacter * ForCharacter, AActor * DamageCauser) { return NativeCall(this, "APrimalBuff.AddBuff", ForCharacter, DamageCauser); } + static APrimalBuff * StaticAddBuff(TSubclassOf BuffClass, APrimalCharacter * ForCharacter, UPrimalItem * AssociatedItem, AActor * DamageCauser, bool bForceOnClient) { return NativeCall, APrimalCharacter *, UPrimalItem *, AActor *, bool>(nullptr, "APrimalBuff.StaticAddBuff", BuffClass, ForCharacter, AssociatedItem, DamageCauser, bForceOnClient); } + bool ExcludePostProcessBlendableMaterial(UMaterialInterface * BlendableMaterialInterface) { return NativeCall(this, "APrimalBuff.ExcludePostProcessBlendableMaterial", BlendableMaterialInterface); } + bool PreventActorTargeting_Implementation(AActor * ByActor) { return NativeCall(this, "APrimalBuff.PreventActorTargeting_Implementation", ByActor); } + bool PreventRunning() { return NativeCall(this, "APrimalBuff.PreventRunning"); } + bool ExcludeAoEActor(AActor * ActorToConsider) { return NativeCall(this, "APrimalBuff.ExcludeAoEActor", ActorToConsider); } + bool HideBuffFromHUD_Implementation() { return NativeCall(this, "APrimalBuff.HideBuffFromHUD_Implementation"); } + void Stasis() { NativeCall(this, "APrimalBuff.Stasis"); } + void Unstasis() { NativeCall(this, "APrimalBuff.Unstasis"); } + bool ExtendBuffTime(float AmountOfAdditionalTime) { return NativeCall(this, "APrimalBuff.ExtendBuffTime", AmountOfAdditionalTime); } + int GetBuffType_Implementation() { return NativeCall(this, "APrimalBuff.GetBuffType_Implementation"); } + bool ReduceBuffTime(float AmountOfTimeToReduce) { return NativeCall(this, "APrimalBuff.ReduceBuffTime", AmountOfTimeToReduce); } + static UClass * StaticClass() { return NativeCall(nullptr, "APrimalBuff.StaticClass"); } + static void StaticRegisterNativesAPrimalBuff() { NativeCall(nullptr, "APrimalBuff.StaticRegisterNativesAPrimalBuff"); } + void BPDrawBuffStatusHUD(AShooterHUD * HUD, float XPos, float YPos, float ScaleMult) { NativeCall(this, "APrimalBuff.BPDrawBuffStatusHUD", HUD, XPos, YPos, ScaleMult); } + float BuffAdjustDamage(float Damage, FHitResult * HitInfo, AController * EventInstigator, AActor * DamageCauser, TSubclassOf TheDamgeType) { return NativeCall>(this, "APrimalBuff.BuffAdjustDamage", Damage, HitInfo, EventInstigator, DamageCauser, TheDamgeType); } + void BuffTickClient(float DeltaTime) { NativeCall(this, "APrimalBuff.BuffTickClient", DeltaTime); } + void BuffTickServer(float DeltaTime) { NativeCall(this, "APrimalBuff.BuffTickServer", DeltaTime); } + void DrawBuffFloatingHUD(int BuffIndex, AShooterHUD * HUD, float CenterX, float CenterY, float DrawScale) { NativeCall(this, "APrimalBuff.DrawBuffFloatingHUD", BuffIndex, HUD, CenterX, CenterY, DrawScale); } + void NotifyDamage(float DamageAmount, TSubclassOf DamageClass, AController * EventInstigator, AActor * TheDamageCauser) { NativeCall, AController *, AActor *>(this, "APrimalBuff.NotifyDamage", DamageAmount, DamageClass, EventInstigator, TheDamageCauser); } + bool PreventActorTargeting(AActor * ByActor) { return NativeCall(this, "APrimalBuff.PreventActorTargeting", ByActor); } + void SetBuffCauser(AActor * CausedBy) { NativeCall(this, "APrimalBuff.SetBuffCauser", CausedBy); } +}; + +struct FDinoAncestorsEntry +{ + FString MaleName; + unsigned int MaleDinoID1; + unsigned int MaleDinoID2; + FString FemaleName; + unsigned int FemaleDinoID1; + unsigned int FemaleDinoID2; +}; + +struct FCraftingResourceRequirement +{ + float BaseResourceRequirement; + TSubclassOf ResourceItemType; + bool bCraftingRequireExactResourceType; +}; \ No newline at end of file diff --git a/version/Core/Public/API/ARK/PrimalStructure.h b/version/Core/Public/API/ARK/PrimalStructure.h new file mode 100644 index 0000000..0840e3e --- /dev/null +++ b/version/Core/Public/API/ARK/PrimalStructure.h @@ -0,0 +1,566 @@ +#pragma once + +struct APrimalTargetableActor : AActor +{ + FieldValue LowHealthPercentageField() { return { this, "APrimalTargetableActor.LowHealthPercentage" }; } + FieldValue> DestructionActorTemplateField() { return { this, "APrimalTargetableActor.DestructionActorTemplate" }; } + FieldValue LifeSpanAfterDeathField() { return { this, "APrimalTargetableActor.LifeSpanAfterDeath" }; } + FieldValue DeathSoundField() { return { this, "APrimalTargetableActor.DeathSound" }; } + FieldValue PassiveDamageHealthReplicationPercentIntervalField() { return { this, "APrimalTargetableActor.PassiveDamageHealthReplicationPercentInterval" }; } + FieldValue DamageNotifyTeamAggroMultiplierField() { return { this, "APrimalTargetableActor.DamageNotifyTeamAggroMultiplier" }; } + FieldValue DamageNotifyTeamAggroRangeField() { return { this, "APrimalTargetableActor.DamageNotifyTeamAggroRange" }; } + FieldValue DamageNotifyTeamAggroRangeFalloffField() { return { this, "APrimalTargetableActor.DamageNotifyTeamAggroRangeFalloff" }; } + FieldValue DestructibleMeshLocationOffsetField() { return { this, "APrimalTargetableActor.DestructibleMeshLocationOffset" }; } + FieldValue DestructibleMeshScaleOverrideField() { return { this, "APrimalTargetableActor.DestructibleMeshScaleOverride" }; } + FieldValue DestructibleMeshRotationOffsetField() { return { this, "APrimalTargetableActor.DestructibleMeshRotationOffset" }; } + FieldValue DescriptiveNameField() { return { this, "APrimalTargetableActor.DescriptiveName" }; } + FieldValue ReplicatedHealthField() { return { this, "APrimalTargetableActor.ReplicatedHealth" }; } + FieldValue HealthField() { return { this, "APrimalTargetableActor.Health" }; } + FieldValue MaxHealthField() { return { this, "APrimalTargetableActor.MaxHealth" }; } + FieldValue DestructibleMeshDeathImpulseScaleField() { return { this, "APrimalTargetableActor.DestructibleMeshDeathImpulseScale" }; } + FieldValue LastReplicatedHealthValueField() { return { this, "APrimalTargetableActor.LastReplicatedHealthValue" }; } + FieldValue> TargetableDamageFXDefaultPhysMaterialField() { return { this, "APrimalTargetableActor.TargetableDamageFXDefaultPhysMaterial" }; } + FieldValue LastHealthBeforeTakeDamageField() { return { this, "APrimalTargetableActor.LastHealthBeforeTakeDamage" }; } + FieldValue NextAllowRepairTimeField() { return { this, "APrimalTargetableActor.NextAllowRepairTime" }; } + FieldValue LastPreBlueprintAdjustmentActualDamageField() { return { this, "APrimalTargetableActor.LastPreBlueprintAdjustmentActualDamage" }; } + FieldValue LastReplicatedHealthField() { return { this, "APrimalTargetableActor.LastReplicatedHealth" }; } + + // Functions + + static UField* StaticClass() { return NativeCall(nullptr, "APrimalTargetableActor.StaticClass"); } + UObject * GetUObjectInterfaceTargetableInterface() { return NativeCall(this, "APrimalTargetableActor.GetUObjectInterfaceTargetableInterface"); } + void PostInitializeComponents() { NativeCall(this, "APrimalTargetableActor.PostInitializeComponents"); } + void Destroyed() { NativeCall(this, "APrimalTargetableActor.Destroyed"); } + void BeginPlay() { NativeCall(this, "APrimalTargetableActor.BeginPlay"); } + void FellOutOfWorld(UDamageType * dmgType) { NativeCall(this, "APrimalTargetableActor.FellOutOfWorld", dmgType); } + bool IsDead() { return NativeCall(this, "APrimalTargetableActor.IsDead"); } + void AdjustDamage(float * Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.AdjustDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + float TakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APrimalTargetableActor.TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool Die(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "APrimalTargetableActor.Die", KillingDamage, DamageEvent, Killer, DamageCauser); } + void PlayDyingGeneric_Implementation(float KillingDamage, FPointDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayDyingGeneric_Implementation", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayDyingRadial_Implementation(float KillingDamage, FRadialDamageEvent DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayDyingRadial_Implementation", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void GetDestructionEffectTransform(FVector * OutLocation, FRotator * OutRotation) { NativeCall(this, "APrimalTargetableActor.GetDestructionEffectTransform", OutLocation, OutRotation); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void PlayHitEffectPoint_Implementation(float DamageTaken, FPointDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayHitEffectPoint_Implementation", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void PlayHitEffectRadial_Implementation(float DamageTaken, FRadialDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayHitEffectRadial_Implementation", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + void PlayHitEffect(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser, bool bIsLocalPath) { NativeCall(this, "APrimalTargetableActor.PlayHitEffect", DamageTaken, DamageEvent, PawnInstigator, DamageCauser, bIsLocalPath); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalTargetableActor.DrawHUD", HUD); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalTargetableActor.GetLifetimeReplicatedProps", OutLifetimeProps); } + float GetMaxHealth() { return NativeCall(this, "APrimalTargetableActor.GetMaxHealth"); } + float GetLowHealthPercentage() { return NativeCall(this, "APrimalTargetableActor.GetLowHealthPercentage"); } + bool IsAlive() { return NativeCall(this, "APrimalTargetableActor.IsAlive"); } + FString * GetShortName(FString * result) { return NativeCall(this, "APrimalTargetableActor.GetShortName", result); } + float GetHealth() { return NativeCall(this, "APrimalTargetableActor.GetHealth"); } + float GetHealthPercentage() { return NativeCall(this, "APrimalTargetableActor.GetHealthPercentage"); } + float SetHealth(float newHealth) { return NativeCall(this, "APrimalTargetableActor.SetHealth", newHealth); } + void SetMaxHealth(float newMaxHealth) { NativeCall(this, "APrimalTargetableActor.SetMaxHealth", newMaxHealth); } + bool IsOfTribe(int ID) { return NativeCall(this, "APrimalTargetableActor.IsOfTribe", ID); } + void NetUpdatedHealth_Implementation(int NewHealth) { NativeCall(this, "APrimalTargetableActor.NetUpdatedHealth_Implementation", NewHealth); } + bool IsTargetableDead() { return NativeCall(this, "APrimalTargetableActor.IsTargetableDead"); } + EShooterPhysMaterialType::Type GetTargetableDamageFXDefaultPhysMaterial() { return NativeCall(this, "APrimalTargetableActor.GetTargetableDamageFXDefaultPhysMaterial"); } + void Suicide() { NativeCall(this, "APrimalTargetableActor.Suicide"); } + bool NetExecCommand(FName CommandName, FNetExecParams * ExecParams) { return NativeCall(this, "APrimalTargetableActor.NetExecCommand", CommandName, ExecParams); } + void UpdatedHealth(bool bDoReplication) { NativeCall(this, "APrimalTargetableActor.UpdatedHealth", bDoReplication); } + bool AllowRadialDamageWithoutVisiblityTrace() { return NativeCall(this, "APrimalTargetableActor.AllowRadialDamageWithoutVisiblityTrace"); } + bool IsInvincible() { return NativeCall(this, "APrimalTargetableActor.IsInvincible"); } + void PlayHitEffectGeneric(float DamageTaken, FDamageEvent DamageEvent, APawn * PawnInstigator, AActor * DamageCauser) { NativeCall(this, "APrimalTargetableActor.PlayHitEffectGeneric", DamageTaken, DamageEvent, PawnInstigator, DamageCauser); } + bool BPSupressImpactEffects(float DamageTaken, FDamageEvent * DamageEvent, APawn * PawnInstigator, AActor * DamageCauser, bool bIsLocalPath, UPrimitiveComponent * HitComponent) { return NativeCall(this, "APrimalTargetableActor.BPSupressImpactEffects", DamageTaken, DamageEvent, PawnInstigator, DamageCauser, bIsLocalPath, HitComponent); } +}; + +struct APrimalStructure : APrimalTargetableActor +{ + FieldValue OverlayTooltipPaddingField() { return { this, "APrimalStructure.OverlayTooltipPadding" }; } + FieldValue OverlayTooltipScaleField() { return { this, "APrimalStructure.OverlayTooltipScale" }; } + FieldValue> ConsumesPrimalItemField() { return { this, "APrimalStructure.ConsumesPrimalItem" }; } + FieldValue ScaleFactorField() { return { this, "APrimalStructure.ScaleFactor" }; } + FieldValue StructureSnapTypeFlagsField() { return { this, "APrimalStructure.StructureSnapTypeFlags" }; } + FieldValue PlacementOffsetForVerticalGroundField() { return { this, "APrimalStructure.PlacementOffsetForVerticalGround" }; } + FieldValue PlacementInitialTracePointOffsetForVerticalGroundField() { return { this, "APrimalStructure.PlacementInitialTracePointOffsetForVerticalGround" }; } + FieldValue>> StructuresAllowedToBeVerticalGroundField() { return { this, "APrimalStructure.StructuresAllowedToBeVerticalGround" }; } + FieldValue TraceDistanceFromActorToWallVerticalGroundField() { return { this, "APrimalStructure.TraceDistanceFromActorToWallVerticalGround" }; } + FieldValue PlacementHitLocOffsetField() { return { this, "APrimalStructure.PlacementHitLocOffset" }; } + FieldValue PlacementEncroachmentCheckOffsetField() { return { this, "APrimalStructure.PlacementEncroachmentCheckOffset" }; } + FieldValue PlacementEncroachmentBoxExtentField() { return { this, "APrimalStructure.PlacementEncroachmentBoxExtent" }; } + FieldValue PlacementTraceScaleField() { return { this, "APrimalStructure.PlacementTraceScale" }; } + FieldValue SnapAlternatePlacementTraceScaleField() { return { this, "APrimalStructure.SnapAlternatePlacementTraceScale" }; } + FieldValue PlacementRotOffsetField() { return { this, "APrimalStructure.PlacementRotOffset" }; } + FieldValue PlacementTraceRotOffsetField() { return { this, "APrimalStructure.PlacementTraceRotOffset" }; } + FieldValue SnappingRotationOffsetField() { return { this, "APrimalStructure.SnappingRotationOffset" }; } + FieldValue RepairAmountRemainingField() { return { this, "APrimalStructure.RepairAmountRemaining" }; } + FieldValue RepairCheckIntervalField() { return { this, "APrimalStructure.RepairCheckInterval" }; } + FieldValue PlacementFloorCheckZExtentUpField() { return { this, "APrimalStructure.PlacementFloorCheckZExtentUp" }; } + FieldValue RepairPercentPerIntervalField() { return { this, "APrimalStructure.RepairPercentPerInterval" }; } + FieldValue DecayDestructionPeriodField() { return { this, "APrimalStructure.DecayDestructionPeriod" }; } + FieldValue>> PreventPlacingOnFloorClassesField() { return { this, "APrimalStructure.PreventPlacingOnFloorClasses" }; } + FieldValue>> AllowPlacingOnFloorClassesField() { return { this, "APrimalStructure.AllowPlacingOnFloorClasses" }; } + FieldValue> MyRootTransformField() { return { this, "APrimalStructure.MyRootTransform" }; } + FieldValue TraceIgnoreStructuresWithTypeFlagsField() { return { this, "APrimalStructure.TraceIgnoreStructuresWithTypeFlags" }; } + FieldValue bTraceCheckOnlyUseStructuresWithTypeFlagsField() { return { this, "APrimalStructure.bTraceCheckOnlyUseStructuresWithTypeFlags" }; } + FieldArray AllowStructureColorSetsField() { return { this, "APrimalStructure.AllowStructureColorSets" }; } + FieldValue WaterVolumeCheckPointOffsetField() { return { this, "APrimalStructure.WaterVolumeCheckPointOffset" }; } + FieldValue WaterPlacementMinimumWaterHeightField() { return { this, "APrimalStructure.WaterPlacementMinimumWaterHeight" }; } + FieldValue PlacementMaxZDeltaField() { return { this, "APrimalStructure.PlacementMaxZDelta" }; } + FieldValue PlacementChooseRotationMaxRangeOverrideField() { return { this, "APrimalStructure.PlacementChooseRotationMaxRangeOverride" }; } + FieldValue PlacementMaxRangeField() { return { this, "APrimalStructure.PlacementMaxRange" }; } + FieldValue MaxSnapLocRangeField() { return { this, "APrimalStructure.MaxSnapLocRange" }; } + FieldValue SnapOverlapCheckRadiusField() { return { this, "APrimalStructure.SnapOverlapCheckRadius" }; } + FieldValue MaximumFoundationSupport2DBuildDistanceField() { return { this, "APrimalStructure.MaximumFoundationSupport2DBuildDistance" }; } + FieldValue PlacementFloorCheckZExtentField() { return { this, "APrimalStructure.PlacementFloorCheckZExtent" }; } + FieldValue LastHealthPercentageField() { return { this, "APrimalStructure.LastHealthPercentage" }; } + FieldValue TakeGroundNormalRotationOffsetField() { return { this, "APrimalStructure.TakeGroundNormalRotationOffset" }; } + FieldValue DemolishGiveItemCraftingResourcePercentageField() { return { this, "APrimalStructure.DemolishGiveItemCraftingResourcePercentage" }; } + FieldValue> AllowReplacementByStructureClassTypeField() { return { this, "APrimalStructure.AllowReplacementByStructureClassType" }; } + FieldValue> PreventReplacementOfStructureClassTypeField() { return { this, "APrimalStructure.PreventReplacementOfStructureClassType" }; } + FieldValue MaximumHeightAboveWorldGroundField() { return { this, "APrimalStructure.MaximumHeightAboveWorldGround" }; } + FieldValue MaximumHeightUnderWorldMaxKillZField() { return { this, "APrimalStructure.MaximumHeightUnderWorldMaxKillZ" }; } + FieldValue PreviewCameraRotationField() { return { this, "APrimalStructure.PreviewCameraRotation" }; } + FieldValue PreviewCameraPivotOffsetField() { return { this, "APrimalStructure.PreviewCameraPivotOffset" }; } + FieldValue PreviewCameraDistanceScaleFactorField() { return { this, "APrimalStructure.PreviewCameraDistanceScaleFactor" }; } + FieldValue PreviewCameraDefaultZoomMultiplierField() { return { this, "APrimalStructure.PreviewCameraDefaultZoomMultiplier" }; } + FieldValue PreviewCameraMaxZoomMultiplierField() { return { this, "APrimalStructure.PreviewCameraMaxZoomMultiplier" }; } + FieldValue ReturnDamageAmountField() { return { this, "APrimalStructure.ReturnDamageAmount" }; } + FieldValue StructureRangeTypeFlagField() { return { this, "APrimalStructure.StructureRangeTypeFlag" }; } + FieldValue LimitMaxStructuresInRangeTypeFlagField() { return { this, "APrimalStructure.LimitMaxStructuresInRangeTypeFlag" }; } + FieldValue ReturnDamageImpulseField() { return { this, "APrimalStructure.ReturnDamageImpulse" }; } + FieldValue> ReturnDamageTypeField() { return { this, "APrimalStructure.ReturnDamageType" }; } + FieldValue>> ReturnDamageExcludeIncomingTypesField() { return { this, "APrimalStructure.ReturnDamageExcludeIncomingTypes" }; } + FieldValue>> ReturnDamageOnlyForIncomingTypesField() { return { this, "APrimalStructure.ReturnDamageOnlyForIncomingTypes" }; } + FieldValue OwningPlayerIDField() { return { this, "APrimalStructure.OwningPlayerID" }; } + FieldValue OwningPlayerNameField() { return { this, "APrimalStructure.OwningPlayerName" }; } + FieldValue LastInAllyRangeTimeField() { return { this, "APrimalStructure.LastInAllyRangeTime" }; } + FieldValue DecayDestructionPeriodMultiplierField() { return { this, "APrimalStructure.DecayDestructionPeriodMultiplier" }; } + FieldValue> SaddleDinoField() { return { this, "APrimalStructure.SaddleDino" }; } + FieldValue> LatchedDinosField() { return { this, "APrimalStructure.LatchedDinos" }; } + FieldValue PreviewMaterialField() { return { this, "APrimalStructure.PreviewMaterial" }; } + FieldValue PreviewMaterialColorParamNameField() { return { this, "APrimalStructure.PreviewMaterialColorParamName" }; } + FieldValue> PlacementTraceDirectionsField() { return { this, "APrimalStructure.PlacementTraceDirections" }; } + FieldValue> LinkedStructuresField() { return { this, "APrimalStructure.LinkedStructures" }; } + FieldValue> LinkedStructuresIDField() { return { this, "APrimalStructure.LinkedStructuresID" }; } + FieldValue> StructuresPlacedOnFloorField() { return { this, "APrimalStructure.StructuresPlacedOnFloor" }; } + FieldValue>> SnapToStructureTypesToExcludeField() { return { this, "APrimalStructure.SnapToStructureTypesToExclude" }; } + FieldValue>> SnapFromStructureTypesToExcludeField() { return { this, "APrimalStructure.SnapFromStructureTypesToExclude" }; } + FieldValue PlacedOnFloorStructureField() { return { this, "APrimalStructure.PlacedOnFloorStructure" }; } + FieldValue PrimarySnappedStructureChildField() { return { this, "APrimalStructure.PrimarySnappedStructureChild" }; } + FieldValue PrimarySnappedStructureParentField() { return { this, "APrimalStructure.PrimarySnappedStructureParent" }; } + FieldValue OwnerNameField() { return { this, "APrimalStructure.OwnerName" }; } + FieldArray<__int16, 6> StructureColorsField() { return { this, "APrimalStructure.StructureColors" }; } + FieldValue AttachedToField() { return { this, "APrimalStructure.AttachedTo" }; } + FieldValue AttachedTransponderField() { return { this, "APrimalStructure.AttachedTransponder" }; } + FieldValue StructureIDField() { return { this, "APrimalStructure.StructureID" }; } + FieldValue AttachedToDinoID1Field() { return { this, "APrimalStructure.AttachedToDinoID1" }; } + FieldValue>> OnlyAllowStructureClassesToAttachField() { return { this, "APrimalStructure.OnlyAllowStructureClassesToAttach" }; } + FieldValue>> OnlyAllowStructureClassesFromAttachField() { return { this, "APrimalStructure.OnlyAllowStructureClassesFromAttach" }; } + FieldValue TaggedIndexField() { return { this, "APrimalStructure.TaggedIndex" }; } + FieldValue TaggedIndexTwoField() { return { this, "APrimalStructure.TaggedIndexTwo" }; } + FieldValue ProcessTreeTagField() { return { this, "APrimalStructure.ProcessTreeTag" }; } + FieldValue LastStructureStasisTimeField() { return { this, "APrimalStructure.LastStructureStasisTime" }; } + FieldValue LastColorizationTimeField() { return { this, "APrimalStructure.LastColorizationTime" }; } + FieldValue StructureIconMaterialField() { return { this, "APrimalStructure.StructureIconMaterial" }; } + FieldValue SpawnEmitterLocationOffsetField() { return { this, "APrimalStructure.SpawnEmitterLocationOffset" }; } + FieldValue SpawnEmitterRotationOffsetField() { return { this, "APrimalStructure.SpawnEmitterRotationOffset" }; } + FieldValue> PickupGivesItemField() { return { this, "APrimalStructure.PickupGivesItem" }; } + FieldValue ExcludeInStructuresRadiusField() { return { this, "APrimalStructure.ExcludeInStructuresRadius" }; } + FieldValue>> ExcludeInStructuresRadiusClassesField() { return { this, "APrimalStructure.ExcludeInStructuresRadiusClasses" }; } + FieldValue LastFadeOpacityField() { return { this, "APrimalStructure.LastFadeOpacity" }; } + FieldValue bClientAddedToStructuresArrayField() { return { this, "APrimalStructure.bClientAddedToStructuresArray" }; } + FieldValue LastFailedPinTimeField() { return { this, "APrimalStructure.LastFailedPinTime" }; } + FieldValue> PreventBuildStructureReasonStringOverridesField() { return { this, "APrimalStructure.PreventBuildStructureReasonStringOverrides" }; } + FieldValue FloatingHudLocTextOffsetField() { return { this, "APrimalStructure.FloatingHudLocTextOffset" }; } + FieldValue LastBumpedDamageTimeField() { return { this, "APrimalStructure.LastBumpedDamageTime" }; } + FieldValue ForceLimitStructuresInRangeField() { return { this, "APrimalStructure.ForceLimitStructuresInRange" }; } + FieldValue PlacementMaterialForwardDirIndexField() { return { this, "APrimalStructure.PlacementMaterialForwardDirIndex" }; } + FieldValue ForcePreventPlacingInOfflineRaidStructuresRadiusField() { return { this, "APrimalStructure.ForcePreventPlacingInOfflineRaidStructuresRadius" }; } + FieldValue AttachToStaticMeshSocketNameBaseField() { return { this, "APrimalStructure.AttachToStaticMeshSocketNameBase" }; } + FieldValue> ItemsUseAlternateActorClassAttachmentField() { return { this, "APrimalStructure.ItemsUseAlternateActorClassAttachment" }; } + FieldValue UnstasisAutoDestroyAfterTimeField() { return { this, "APrimalStructure.UnstasisAutoDestroyAfterTime" }; } + FieldValue TribeGroupStructureRankField() { return { this, "APrimalStructure.TribeGroupStructureRank" }; } + FieldValue TribeRankHUDYOffsetField() { return { this, "APrimalStructure.TribeRankHUDYOffset" }; } + FieldValue>> PreventSaddleDinoClassesField() { return { this, "APrimalStructure.PreventSaddleDinoClasses" }; } + FieldValue>> AllowSaddleDinoClassesField() { return { this, "APrimalStructure.AllowSaddleDinoClasses" }; } + FieldValue PlaceOnWallUseStaticMeshTagField() { return { this, "APrimalStructure.PlaceOnWallUseStaticMeshTag" }; } + FieldValue> SnapStructureClassField() { return { this, "APrimalStructure.SnapStructureClass" }; } + FieldValue DemolishActivationTimeField() { return { this, "APrimalStructure.DemolishActivationTime" }; } + FieldValue GroundEncroachmentCheckLocationOffsetField() { return { this, "APrimalStructure.GroundEncroachmentCheckLocationOffset" }; } + FieldValue StructureMinAllowedVersionField() { return { this, "APrimalStructure.StructureMinAllowedVersion" }; } + FieldValue SavedStructureMinAllowedVersionField() { return { this, "APrimalStructure.SavedStructureMinAllowedVersion" }; } + FieldValue OverrideEnemyFoundationPreventionRadiusField() { return { this, "APrimalStructure.OverrideEnemyFoundationPreventionRadius" }; } + FieldValue BedIDField() { return { this, "APrimalStructure.BedID" }; } + FieldValue>> ForceAllowWallAttachmentClassesField() { return { this, "APrimalStructure.ForceAllowWallAttachmentClasses" }; } + FieldValue LimitMaxStructuresInRangeRadiusField() { return { this, "APrimalStructure.LimitMaxStructuresInRangeRadius" }; } + FieldValue>> FastDecayLinkedStructureClassesField() { return { this, "APrimalStructure.FastDecayLinkedStructureClasses" }; } + FieldValue PlacementMaxZAbovePlayerHeightField() { return { this, "APrimalStructure.PlacementMaxZAbovePlayerHeight" }; } + + // Functions + + static UClass* GetPrivateStaticClass() { return NativeCall(nullptr, "APrimalStructure.GetPrivateStaticClass"); } + int GetHitPawnCollisionGroup() { return NativeCall(this, "APrimalStructure.GetHitPawnCollisionGroup"); } + void PreInitializeComponents() { NativeCall(this, "APrimalStructure.PreInitializeComponents"); } + void BeginPlay() { NativeCall(this, "APrimalStructure.BeginPlay"); } + void SetLinkedIDs() { NativeCall(this, "APrimalStructure.SetLinkedIDs"); } + void ApplyLinkedIDs(bool bRelinkParents) { NativeCall(this, "APrimalStructure.ApplyLinkedIDs", bRelinkParents); } + static APrimalStructure * GetFromID(UWorld * World, unsigned int TheStructureID) { return NativeCall(nullptr, "APrimalStructure.GetFromID", World, TheStructureID); } + void OnRep_AttachmentReplication() { NativeCall(this, "APrimalStructure.OnRep_AttachmentReplication"); } + void SetDinoSaddleAttachment(APrimalDinoCharacter * myDino, FName BoneName, FVector RelLoc, FRotator RelRot, bool bMaintainWorldPosition) { NativeCall(this, "APrimalStructure.SetDinoSaddleAttachment", myDino, BoneName, RelLoc, RelRot, bMaintainWorldPosition); } + void LoadedFromSaveGame() { NativeCall(this, "APrimalStructure.LoadedFromSaveGame"); } + void SetStructureCollisionChannels() { NativeCall(this, "APrimalStructure.SetStructureCollisionChannels"); } + void ApplyScale(bool bOnlyInitPhysics) { NativeCall(this, "APrimalStructure.ApplyScale", bOnlyInitPhysics); } + void PostSpawnInitialize(FVector * SpawnLocation, FRotator * SpawnRotation, AActor * InOwner, APawn * InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction, bool bDeferBeginPlay) { NativeCall(this, "APrimalStructure.PostSpawnInitialize", SpawnLocation, SpawnRotation, InOwner, InInstigator, bRemoteOwned, bNoFail, bDeferConstruction, bDeferBeginPlay); } + bool UseDynamicMobility() { return NativeCall(this, "APrimalStructure.UseDynamicMobility"); } + void SetStaticMobility() { NativeCall(this, "APrimalStructure.SetStaticMobility"); } + void PrepareAsPlacementPreview() { NativeCall(this, "APrimalStructure.PrepareAsPlacementPreview"); } + int IsAllowedToBuild(APlayerController * PC, FVector AtLocation, FRotator AtRotation, FPlacementData * OutPlacementData, bool bDontAdjustForMaxRange, FRotator PlayerViewRotation, bool bFinalPlacement) { return NativeCall(this, "APrimalStructure.IsAllowedToBuild", PC, AtLocation, AtRotation, OutPlacementData, bDontAdjustForMaxRange, PlayerViewRotation, bFinalPlacement); } + static bool IsPointNearSupplyCrateSpawn(UWorld * theWorld, FVector AtPoint) { return NativeCall(nullptr, "APrimalStructure.IsPointNearSupplyCrateSpawn", theWorld, AtPoint); } + TSubclassOf * GetBedFilterClass_Implementation(TSubclassOf * result) { return NativeCall *, TSubclassOf *>(this, "APrimalStructure.GetBedFilterClass_Implementation", result); } + void PostInitializeComponents() { NativeCall(this, "APrimalStructure.PostInitializeComponents"); } + bool AllowSpawnForPlayer(AShooterPlayerController * PC, bool bCheckCooldownTime, APrimalStructure * FromStructure) { return NativeCall(this, "APrimalStructure.AllowSpawnForPlayer", PC, bCheckCooldownTime, FromStructure); } + void NetUpdateOriginalOwnerNameAndID_Implementation(int NewOriginalOwnerID, FString * NewOriginalOwnerName) { NativeCall(this, "APrimalStructure.NetUpdateOriginalOwnerNameAndID_Implementation", NewOriginalOwnerID, NewOriginalOwnerName); } + void NonPlayerFinalStructurePlacement(int PlacementTargetingTeam, int PlacementOwningPlayerID, FString * PlacementOwningPlayerName, APrimalStructure * ForcePrimaryParent) { NativeCall(this, "APrimalStructure.NonPlayerFinalStructurePlacement", PlacementTargetingTeam, PlacementOwningPlayerID, PlacementOwningPlayerName, ForcePrimaryParent); } + bool FinalStructurePlacement(APlayerController * PC, FVector AtLocation, FRotator AtRotation, FRotator PlayerViewRotation, APawn * AttachToPawn, FName BoneName, bool bIsFlipped) { return NativeCall(this, "APrimalStructure.FinalStructurePlacement", PC, AtLocation, AtRotation, PlayerViewRotation, AttachToPawn, BoneName, bIsFlipped); } + FVector * GetSnapPointLocation(FVector * result, int SnapPointIndex, bool bOverrideTransform, FVector OverrideLoc, FRotator OverrideRot) { return NativeCall(this, "APrimalStructure.GetSnapPointLocation", result, SnapPointIndex, bOverrideTransform, OverrideLoc, OverrideRot); } + bool GetSnapToLocation(FVector * AtLoc, FRotator * AtRotation, FPlacementData * OutPlacementData, APrimalStructure ** OutParentStructure, int * OutSnapToIndex, APlayerController * PC, bool bFinalPlacement, int SnapPointCycle) { return NativeCall(this, "APrimalStructure.GetSnapToLocation", AtLoc, AtRotation, OutPlacementData, OutParentStructure, OutSnapToIndex, PC, bFinalPlacement, SnapPointCycle); } + void GetSnapToParentStructures(FVector AtLocation, FRotator AtRotation, int InitialMySnapIndex, APrimalStructure * InitialParent, TArray * SnapToParentStructures, APlayerController * PC) { NativeCall *, APlayerController *>(this, "APrimalStructure.GetSnapToParentStructures", AtLocation, AtRotation, InitialMySnapIndex, InitialParent, SnapToParentStructures, PC); } + bool GetPlacingGroundLocation(AActor ** OutHitActor, FPlacementData * OutPlacementData, APlayerController * PC, bool bFinalPlacement, int SnapPointCycle) { return NativeCall(this, "APrimalStructure.GetPlacingGroundLocation", OutHitActor, OutPlacementData, PC, bFinalPlacement, SnapPointCycle); } + bool ClampBuildLocation(FVector FromLocation, AActor ** OutHitActor, FPlacementData * OutPlacementData, bool bDontAdjustForMaxRange, APlayerController * PC) { return NativeCall(this, "APrimalStructure.ClampBuildLocation", FromLocation, OutHitActor, OutPlacementData, bDontAdjustForMaxRange, PC); } + bool CheckNotEncroaching(FVector PlacementLocation, FRotator PlacementRotation, AActor * DinoCharacter, APrimalStructure * SnappedToParentStructure, APrimalStructure * ReplacesStructure, bool bUseAlternatePlacementTraceScale) { return NativeCall(this, "APrimalStructure.CheckNotEncroaching", PlacementLocation, PlacementRotation, DinoCharacter, SnappedToParentStructure, ReplacesStructure, bUseAlternatePlacementTraceScale); } + APrimalStructure * GetNearbyFoundation(FPlacementData * PlacementData, APlayerController * ForPC) { return NativeCall(this, "APrimalStructure.GetNearbyFoundation", PlacementData, ForPC); } + void NetSpawnCoreStructureDeathActor_Implementation() { NativeCall(this, "APrimalStructure.NetSpawnCoreStructureDeathActor_Implementation"); } + float TakeDamage(float Damage, FDamageEvent * DamageEvent, AController * EventInstigator, AActor * DamageCauser) { return NativeCall(this, "APrimalStructure.TakeDamage", Damage, DamageEvent, EventInstigator, DamageCauser); } + bool Die(float KillingDamage, FDamageEvent * DamageEvent, AController * Killer, AActor * DamageCauser) { return NativeCall(this, "APrimalStructure.Die", KillingDamage, DamageEvent, Killer, DamageCauser); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalStructure.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + static void ReprocessTree(TArray * StartingStructures, AController * InstigatorController, AActor * DamageCauser) { NativeCall *, AController *, AActor *>(nullptr, "APrimalStructure.ReprocessTree", StartingStructures, InstigatorController, DamageCauser); } + static void FindFoundations(APrimalStructure * StartingStructure, TArray * Foundations) { NativeCall *>(nullptr, "APrimalStructure.FindFoundations", StartingStructure, Foundations); } + static void CullAgainstFoundations(APrimalStructure ** StartingStructure, TArray * Foundations) { NativeCall *>(nullptr, "APrimalStructure.CullAgainstFoundations", StartingStructure, Foundations); } + static void FlagReachable(TArray * Foundations) { NativeCall *>(nullptr, "APrimalStructure.FlagReachable", Foundations); } + static void FlagReachable(APrimalStructure * StartingStructure) { NativeCall(nullptr, "APrimalStructure.FlagReachable", StartingStructure); } + static void CleanUpTree(APrimalStructure * StartingStructure, AController * InstigatorController, AActor * DamageCauser) { NativeCall(nullptr, "APrimalStructure.CleanUpTree", StartingStructure, InstigatorController, DamageCauser); } + void RemoveLinkedStructure(APrimalStructure * Structure, AController * InstigatorController, AActor * DamageCauser) { NativeCall(this, "APrimalStructure.RemoveLinkedStructure", Structure, InstigatorController, DamageCauser); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalStructure.GetLifetimeReplicatedProps", OutLifetimeProps); } + void RefreshStructureColors() { NativeCall(this, "APrimalStructure.RefreshStructureColors"); } + FLinearColor * GetStructureColorForID(FLinearColor * result, int SetNum, int ID) { return NativeCall(this, "APrimalStructure.GetStructureColorForID", result, SetNum, ID); } + bool Internal_IsInSnapChain(APrimalStructure * theStructure) { return NativeCall(this, "APrimalStructure.Internal_IsInSnapChain", theStructure); } + void GetAllLinkedStructures(TArray * OutLinkedStructures) { NativeCall *>(this, "APrimalStructure.GetAllLinkedStructures", OutLinkedStructures); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalStructure.TryMultiUse", ForPC, UseIndex); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "APrimalStructure.ClientMultiUse", ForPC, UseIndex); } + void Demolish(APlayerController * ForPC) { NativeCall(this, "APrimalStructure.Demolish", ForPC); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalStructure.DrawHUD", HUD); } + bool DoAnyTribePermissionsRestrict(AShooterPlayerController * ForPC) { return NativeCall(this, "APrimalStructure.DoAnyTribePermissionsRestrict", ForPC); } + void DrawStructureTooltip(AShooterHUD * HUD, bool bForMultiUseSelector) { NativeCall(this, "APrimalStructure.DrawStructureTooltip", HUD, bForMultiUseSelector); } + void ChangeActorTeam(int NewTeam) { NativeCall(this, "APrimalStructure.ChangeActorTeam", NewTeam); } + void NetUpdateTeamAndOwnerName_Implementation(int NewTeam, FString * NewOwnerName) { NativeCall(this, "APrimalStructure.NetUpdateTeamAndOwnerName_Implementation", NewTeam, NewOwnerName); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "APrimalStructure.GetDescriptiveName", result); } + void UpdatedHealth(bool bDoReplication) { NativeCall(this, "APrimalStructure.UpdatedHealth", bDoReplication); } + void StartRepair() { NativeCall(this, "APrimalStructure.StartRepair"); } + void RepairCheckTimer() { NativeCall(this, "APrimalStructure.RepairCheckTimer"); } + void Stasis() { NativeCall(this, "APrimalStructure.Stasis"); } + void Destroyed() { NativeCall(this, "APrimalStructure.Destroyed"); } + void Unstasis() { NativeCall(this, "APrimalStructure.Unstasis"); } + UPrimitiveComponent * GetPrimaryHitComponent() { return NativeCall(this, "APrimalStructure.GetPrimaryHitComponent"); } + static void GetNearbyStructuresOfClass(UWorld * World, TSubclassOf StructureClass, FVector * Location, float Range, TArray * Structures) { NativeCall, FVector *, float, TArray *>(nullptr, "APrimalStructure.GetNearbyStructuresOfClass", World, StructureClass, Location, Range, Structures); } + void ClientUpdateLinkedStructures_Implementation(TArray * NewLinkedStructures) { NativeCall *>(this, "APrimalStructure.ClientUpdateLinkedStructures_Implementation", NewLinkedStructures); } + bool AllowColoringBy(APlayerController * ForPC, UObject * anItem) { return NativeCall(this, "APrimalStructure.AllowColoringBy", ForPC, anItem); } + void ServerRequestUseItemWithActor(APlayerController * ForPC, UObject * anItem, int AdditionalData) { NativeCall(this, "APrimalStructure.ServerRequestUseItemWithActor", ForPC, anItem, AdditionalData); } + void ApplyColorToRegions(__int16 CustomColorID, bool * ApplyToRegions) { NativeCall(this, "APrimalStructure.ApplyColorToRegions", CustomColorID, ApplyToRegions); } + bool IsNetRelevantFor(APlayerController * RealViewer, AActor * Viewer, FVector * SrcLocation) { return NativeCall(this, "APrimalStructure.IsNetRelevantFor", RealViewer, Viewer, SrcLocation); } + void NetDoSpawnEffects_Implementation() { NativeCall(this, "APrimalStructure.NetDoSpawnEffects_Implementation"); } + void FadeInEffectTick() { NativeCall(this, "APrimalStructure.FadeInEffectTick"); } + float AddAggroOnBump(APrimalDinoCharacter * BumpedBy) { return NativeCall(this, "APrimalStructure.AddAggroOnBump", BumpedBy); } + int GetNumStructuresInRange(FVector AtLocation, float WithinRange) { return NativeCall(this, "APrimalStructure.GetNumStructuresInRange", AtLocation, WithinRange); } + static void GetStructuresInRange(UWorld * theWorld, FVector AtLocation, float WithinRange, TSubclassOf StructureClass, TArray * StructuresOut) { NativeCall, TArray *>(nullptr, "APrimalStructure.GetStructuresInRange", theWorld, AtLocation, WithinRange, StructureClass, StructuresOut); } + static int GetNumStructuresInRangeStructureTypeFlag(UWorld * theWorld, FVector AtLocation, int TypeFlag, float WithinRange) { return NativeCall(nullptr, "APrimalStructure.GetNumStructuresInRangeStructureTypeFlag", theWorld, AtLocation, TypeFlag, WithinRange); } + bool AllowPickupForItem(AShooterPlayerController * ForPC) { return NativeCall(this, "APrimalStructure.AllowPickupForItem", ForPC); } + bool AllowSnappingWith(APrimalStructure * OtherStructure, APlayerController * ForPC) { return NativeCall(this, "APrimalStructure.AllowSnappingWith", OtherStructure, ForPC); } + bool AllowStructureAccess(APlayerController * ForPC) { return NativeCall(this, "APrimalStructure.AllowStructureAccess", ForPC); } + static bool IsPointObstructedByWorldGeometry(UWorld * ForWorld, FVector ThePoint, bool bIgnoreTerrain, bool bOnlyCheckTerrain, bool bIgnoreFoliage, float OBSTRUCTION_CHECK_DIST) { return NativeCall(nullptr, "APrimalStructure.IsPointObstructedByWorldGeometry", ForWorld, ThePoint, bIgnoreTerrain, bOnlyCheckTerrain, bIgnoreFoliage, OBSTRUCTION_CHECK_DIST); } + bool CanBePainted() { return NativeCall(this, "APrimalStructure.CanBePainted"); } + UPaintingTexture * GetPaintingTexture() { return NativeCall(this, "APrimalStructure.GetPaintingTexture"); } + APrimalStructureDoor * GetLinkedDoor() { return NativeCall(this, "APrimalStructure.GetLinkedDoor"); } + FString * GetEntryString(FString * result) { return NativeCall(this, "APrimalStructure.GetEntryString", result); } + UTexture2D * GetEntryIcon(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "APrimalStructure.GetEntryIcon", AssociatedDataObject, bIsEnabled); } + UMaterialInterface * GetEntryIconMaterial(UObject * AssociatedDataObject, bool bIsEnabled) { return NativeCall(this, "APrimalStructure.GetEntryIconMaterial", AssociatedDataObject, bIsEnabled); } + UObject * GetUObjectInterfaceDataListEntryInterface() { return NativeCall(this, "APrimalStructure.GetUObjectInterfaceDataListEntryInterface"); } + FString * GetEntryDescription(FString * result) { return NativeCall(this, "APrimalStructure.GetEntryDescription", result); } + bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall(this, "APrimalStructure.PreventCharacterBasing", OtherActor, BasedOnComponent); } + void ClearCustomColors_Implementation() { NativeCall(this, "APrimalStructure.ClearCustomColors_Implementation"); } + bool PreventPlacingOnFloorClass(TSubclassOf FloorClass) { return NativeCall>(this, "APrimalStructure.PreventPlacingOnFloorClass", FloorClass); } + void UpdateTribeGroupStructureRank_Implementation(char NewRank) { NativeCall(this, "APrimalStructure.UpdateTribeGroupStructureRank_Implementation", NewRank); } + bool AllowPlacingOnSaddleParentClass(APrimalDinoCharacter * theDino, bool bForcePrevent) { return NativeCall(this, "APrimalStructure.AllowPlacingOnSaddleParentClass", theDino, bForcePrevent); } + static APrimalStructure * GetClosestStructureToPoint(UWorld * ForWorld, FVector AtPoint, float OverlapRadius) { return NativeCall(nullptr, "APrimalStructure.GetClosestStructureToPoint", ForWorld, AtPoint, OverlapRadius); } + float GetStructureDemolishTime() { return NativeCall(this, "APrimalStructure.GetStructureDemolishTime"); } + bool IsOnlyLinkedToFastDecayStructures() { return NativeCall(this, "APrimalStructure.IsOnlyLinkedToFastDecayStructures"); } + USkeletalMeshComponent * GetSkeletalMeshComponent() { return NativeCall(this, "APrimalStructure.GetSkeletalMeshComponent"); } + bool CanAutoDemolish() { return NativeCall(this, "APrimalStructure.CanAutoDemolish"); } + void DelayedDisableSnapParent() { NativeCall(this, "APrimalStructure.DelayedDisableSnapParent"); } + void SetEnabledPrimarySnappedStructureParent_Implementation(bool bEnabled) { NativeCall(this, "APrimalStructure.SetEnabledPrimarySnappedStructureParent_Implementation", bEnabled); } + void SetEnabled(bool bEnabled) { NativeCall(this, "APrimalStructure.SetEnabled", bEnabled); } + bool AllowCreateDynamicMaterials() { return NativeCall(this, "APrimalStructure.AllowCreateDynamicMaterials"); } + void CreateDynamicMaterials() { NativeCall(this, "APrimalStructure.CreateDynamicMaterials"); } + void FinalLoadedFromSaveGame() { NativeCall(this, "APrimalStructure.FinalLoadedFromSaveGame"); } + void UpdateStencilValues() { NativeCall(this, "APrimalStructure.UpdateStencilValues"); } + FRotator * GetPlayerSpawnRotation(FRotator * result) { return NativeCall(this, "APrimalStructure.GetPlayerSpawnRotation", result); } + void BPPlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalStructure.BPPlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + static void StaticRegisterNativesAPrimalStructure() { NativeCall(nullptr, "APrimalStructure.StaticRegisterNativesAPrimalStructure"); } + bool BPAllowSnappingWith(APrimalStructure * OtherStructure, APlayerController * ForPC) { return NativeCall(this, "APrimalStructure.BPAllowSnappingWith", OtherStructure, ForPC); } + bool BPForceConsideredEnemyFoundation(APlayerController * PC, APrimalStructure * ForNewStructure, FVector * TestAtLocation) { return NativeCall(this, "APrimalStructure.BPForceConsideredEnemyFoundation", PC, ForNewStructure, TestAtLocation); } + bool BPImpactEffect(FHitResult * HitRes, FVector * ShootDirection) { return NativeCall(this, "APrimalStructure.BPImpactEffect", HitRes, ShootDirection); } + int BPIsAllowedToBuild(FPlacementData * OutPlacementData, int CurrentAllowedReason) { return NativeCall(this, "APrimalStructure.BPIsAllowedToBuild", OutPlacementData, CurrentAllowedReason); } + int BPIsAllowedToBuildEx(FPlacementData * OutPlacementData, int CurrentAllowedReason, APlayerController * PC, bool bFinalPlacement) { return NativeCall(this, "APrimalStructure.BPIsAllowedToBuildEx", OutPlacementData, CurrentAllowedReason, PC, bFinalPlacement); } + FString * BPOverrideCantBuildReasonString(FString * result, int CantBuildReason) { return NativeCall(this, "APrimalStructure.BPOverrideCantBuildReasonString", result, CantBuildReason); } + bool BPPreventPlacingOnFloorStructure(FPlacementData * theOutPlacementData, APrimalStructure * FloorStructure) { return NativeCall(this, "APrimalStructure.BPPreventPlacingOnFloorStructure", theOutPlacementData, FloorStructure); } + bool BPPreventPlacingStructureOntoMe(APlayerController * PC, APrimalStructure * ForNewStructure, FHitResult * ForHitResult) { return NativeCall(this, "APrimalStructure.BPPreventPlacingStructureOntoMe", PC, ForNewStructure, ForHitResult); } + bool BPPreventSpawnForPlayer(AShooterPlayerController * PC, bool bCheckCooldownTime, APrimalStructure * FromStructure) { return NativeCall(this, "APrimalStructure.BPPreventSpawnForPlayer", PC, bCheckCooldownTime, FromStructure); } + bool BPPreventUsingAsFloorForStructure(FPlacementData * theOutPlacementData, APrimalStructure * StructureToPlaceOnMe) { return NativeCall(this, "APrimalStructure.BPPreventUsingAsFloorForStructure", theOutPlacementData, StructureToPlaceOnMe); } + void BPRefreshedStructureColors() { NativeCall(this, "APrimalStructure.BPRefreshedStructureColors"); } + void ClientUpdateLinkedStructures(TArray * NewLinkedStructures) { NativeCall *>(this, "APrimalStructure.ClientUpdateLinkedStructures", NewLinkedStructures); } + void MultiAddStructuresPlacedOnFloor(APrimalStructure * structure) { NativeCall(this, "APrimalStructure.MultiAddStructuresPlacedOnFloor", structure); } + void NetDoSpawnEffects() { NativeCall(this, "APrimalStructure.NetDoSpawnEffects"); } + void NetUpdateOriginalOwnerNameAndID(int NewOriginalOwnerID, FString * NewOriginalOwnerName) { NativeCall(this, "APrimalStructure.NetUpdateOriginalOwnerNameAndID", NewOriginalOwnerID, NewOriginalOwnerName); } + void NetUpdateTeamAndOwnerName(int NewTeam, FString * NewOwnerName) { NativeCall(this, "APrimalStructure.NetUpdateTeamAndOwnerName", NewTeam, NewOwnerName); } +}; + +struct APrimalStructureDoor : APrimalStructure +{ + FieldValue> MyDoorTransformField() { return { this, "APrimalStructureDoor.MyDoorTransform" }; } + FieldValue RotationSpeedField() { return { this, "APrimalStructureDoor.RotationSpeed" }; } + FieldValue DoorOpenSoundField() { return { this, "APrimalStructureDoor.DoorOpenSound" }; } + FieldValue DoorCloseSoundField() { return { this, "APrimalStructureDoor.DoorCloseSound" }; } + FieldValue CurrentPinCodeField() { return { this, "APrimalStructureDoor.CurrentPinCode" }; } + FieldValue DoorStateChangeIgnoreEncroachmentIntervalField() { return { this, "APrimalStructureDoor.DoorStateChangeIgnoreEncroachmentInterval" }; } + FieldValue DoorOpenStateField() { return { this, "APrimalStructureDoor.DoorOpenState" }; } + FieldValue ClientPrevDoorOpenStateField() { return { this, "APrimalStructureDoor.ClientPrevDoorOpenState" }; } + FieldValue LastLockStateChangeTimeField() { return { this, "APrimalStructureDoor.LastLockStateChangeTime" }; } + FieldValue SecondDoorDefaultRotField() { return { this, "APrimalStructureDoor.SecondDoorDefaultRot" }; } + FieldValue CurrentDoorAngleField() { return { this, "APrimalStructureDoor.CurrentDoorAngle" }; } + FieldValue UnlockDoorSoundField() { return { this, "APrimalStructureDoor.UnlockDoorSound" }; } + FieldValue LockDoorSoundField() { return { this, "APrimalStructureDoor.LockDoorSound" }; } + FieldValue LockedSoundField() { return { this, "APrimalStructureDoor.LockedSound" }; } + FieldValue LastPinOpenSuccessTimeField() { return { this, "APrimalStructureDoor.LastPinOpenSuccessTime" }; } + FieldValue LastDoorStateChangeTimeField() { return { this, "APrimalStructureDoor.LastDoorStateChangeTime" }; } + FieldValue DelayedDoorStateField() { return { this, "APrimalStructureDoor.DelayedDoorState" }; } + + // Functions + + void BeginPlay() { NativeCall(this, "APrimalStructureDoor.BeginPlay"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APrimalStructureDoor.Tick", DeltaSeconds); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalStructureDoor.GetLifetimeReplicatedProps", OutLifetimeProps); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalStructureDoor.DrawHUD", HUD); } + void GotoDoorState(char DoorState) { NativeCall(this, "APrimalStructureDoor.GotoDoorState", DoorState); } + void DelayedGotoDoorState(char DoorState, float DelayTime) { NativeCall(this, "APrimalStructureDoor.DelayedGotoDoorState", DoorState, DelayTime); } + void DelayedGotoDoorStateTimer() { NativeCall(this, "APrimalStructureDoor.DelayedGotoDoorStateTimer"); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalStructureDoor.TryMultiUse", ForPC, UseIndex); } + bool CanOpen(APlayerController * ForPC) { return NativeCall(this, "APrimalStructureDoor.CanOpen", ForPC); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "APrimalStructureDoor.GetDescriptiveName", result); } + bool ApplyPinCode(AShooterPlayerController * ForPC, int appledPinCode, bool bIsSetting, int TheCustomIndex) { return NativeCall(this, "APrimalStructureDoor.ApplyPinCode", ForPC, appledPinCode, bIsSetting, TheCustomIndex); } + void SetStaticMobility() { NativeCall(this, "APrimalStructureDoor.SetStaticMobility"); } + void NetGotoDoorState_Implementation(char DoorState) { NativeCall(this, "APrimalStructureDoor.NetGotoDoorState_Implementation", DoorState); } + void PostInitializeComponents() { NativeCall(this, "APrimalStructureDoor.PostInitializeComponents"); } + bool AllowStructureAccess(APlayerController * ForPC) { return NativeCall(this, "APrimalStructureDoor.AllowStructureAccess", ForPC); } + bool PreventCharacterBasing(AActor * OtherActor, UPrimitiveComponent * BasedOnComponent) { return NativeCall(this, "APrimalStructureDoor.PreventCharacterBasing", OtherActor, BasedOnComponent); } + bool AllowPickupForItem(AShooterPlayerController * ForPC) { return NativeCall(this, "APrimalStructureDoor.AllowPickupForItem", ForPC); } + bool AllowIgnoreCharacterEncroachment_Implementation(UPrimitiveComponent * HitComponent, AActor * EncroachingCharacter) { return NativeCall(this, "APrimalStructureDoor.AllowIgnoreCharacterEncroachment_Implementation", HitComponent, EncroachingCharacter); } +}; + +struct APrimalStructureItemContainer : APrimalStructure +{ + FieldValue MyInventoryComponentField() { return { this, "APrimalStructureItemContainer.MyInventoryComponent" }; } + FieldValue> BatteryClassOverrideField() { return { this, "APrimalStructureItemContainer.BatteryClassOverride" }; } + FieldValue PoweredOverrideCounterField() { return { this, "APrimalStructureItemContainer.PoweredOverrideCounter" }; } + FieldValue NotifyNearbyPowerGeneratorDistanceField() { return { this, "APrimalStructureItemContainer.NotifyNearbyPowerGeneratorDistance" }; } + FieldValue NotifyNearbyPowerGeneratorOctreeGroupField() { return { this, "APrimalStructureItemContainer.NotifyNearbyPowerGeneratorOctreeGroup" }; } + FieldValue> ActivateMaterialsField() { return { this, "APrimalStructureItemContainer.ActivateMaterials" }; } + FieldValue> InActivateMaterialsField() { return { this, "APrimalStructureItemContainer.InActivateMaterials" }; } + FieldValue BoxNameField() { return { this, "APrimalStructureItemContainer.BoxName" }; } + FieldValue InsulationRangeField() { return { this, "APrimalStructureItemContainer.InsulationRange" }; } + FieldValue HyperThermiaInsulationField() { return { this, "APrimalStructureItemContainer.HyperThermiaInsulation" }; } + FieldValue HypoThermiaInsulationField() { return { this, "APrimalStructureItemContainer.HypoThermiaInsulation" }; } + FieldValue ContainerActiveDecreaseHealthSpeedField() { return { this, "APrimalStructureItemContainer.ContainerActiveDecreaseHealthSpeed" }; } + FieldValue FuelConsumptionIntervalsMultiplierField() { return { this, "APrimalStructureItemContainer.FuelConsumptionIntervalsMultiplier" }; } + FieldValue DropInventoryOnDestructionLifespanField() { return { this, "APrimalStructureItemContainer.DropInventoryOnDestructionLifespan" }; } + FieldValue ActivateContainerStringField() { return { this, "APrimalStructureItemContainer.ActivateContainerString" }; } + FieldValue DeactivateContainerStringField() { return { this, "APrimalStructureItemContainer.DeactivateContainerString" }; } + FieldValue> ContainerActiveHealthDecreaseDamageTypePassiveField() { return { this, "APrimalStructureItemContainer.ContainerActiveHealthDecreaseDamageTypePassive" }; } + FieldValue>> ActiveRequiresFuelItemsField() { return { this, "APrimalStructureItemContainer.ActiveRequiresFuelItems" }; } + FieldValue> FuelItemsConsumeIntervalField() { return { this, "APrimalStructureItemContainer.FuelItemsConsumeInterval" }; } + FieldValue>> FuelItemsConsumedGiveItemsField() { return { this, "APrimalStructureItemContainer.FuelItemsConsumedGiveItems" }; } + FieldValue NetDestructionTimeField() { return { this, "APrimalStructureItemContainer.NetDestructionTime" }; } + FieldValue CurrentPinCodeField() { return { this, "APrimalStructureItemContainer.CurrentPinCode" }; } + FieldValue CurrentFuelTimeCacheField() { return { this, "APrimalStructureItemContainer.CurrentFuelTimeCache" }; } + FieldValue LastCheckedFuelTimeField() { return { this, "APrimalStructureItemContainer.LastCheckedFuelTime" }; } + FieldValue LinkedPowerJunctionStructureIDField() { return { this, "APrimalStructureItemContainer.LinkedPowerJunctionStructureID" }; } + FieldValue CurrentItemCountField() { return { this, "APrimalStructureItemContainer.CurrentItemCount" }; } + FieldValue MaxItemCountField() { return { this, "APrimalStructureItemContainer.MaxItemCount" }; } + FieldValue> LinkedPowerJunctionStructureField() { return { this, "APrimalStructureItemContainer.LinkedPowerJunctionStructure" }; } + FieldValue> NextConsumeFuelGiveItemTypeField() { return { this, "APrimalStructureItemContainer.NextConsumeFuelGiveItemType" }; } + FieldValue LastLockStateChangeTimeField() { return { this, "APrimalStructureItemContainer.LastLockStateChangeTime" }; } + FieldValue LastActiveStateChangeTimeField() { return { this, "APrimalStructureItemContainer.LastActiveStateChangeTime" }; } + FieldValue LastPowerJunctionLinkIDField() { return { this, "APrimalStructureItemContainer.LastPowerJunctionLinkID" }; } + FieldValue BasedCharacterDamageIntervalField() { return { this, "APrimalStructureItemContainer.BasedCharacterDamageInterval" }; } + FieldValue BasedCharacterDamageAmountField() { return { this, "APrimalStructureItemContainer.BasedCharacterDamageAmount" }; } + FieldValue> BasedCharacterDamageTypeField() { return { this, "APrimalStructureItemContainer.BasedCharacterDamageType" }; } + FieldValue> EngramRequirementClassOverrideField() { return { this, "APrimalStructureItemContainer.EngramRequirementClassOverride" }; } + FieldValue LinkedBlueprintSpawnActorPointField() { return { this, "APrimalStructureItemContainer.LinkedBlueprintSpawnActorPoint" }; } + FieldValue> PoweredNearbyStructureTemplateField() { return { this, "APrimalStructureItemContainer.PoweredNearbyStructureTemplate" }; } + FieldValue PoweredNearbyStructureRangeField() { return { this, "APrimalStructureItemContainer.PoweredNearbyStructureRange" }; } + FieldValue OpenSceneActionNameField() { return { this, "APrimalStructureItemContainer.OpenSceneActionName" }; } + FieldValue DisabledOpenSceneActionNameField() { return { this, "APrimalStructureItemContainer.DisabledOpenSceneActionName" }; } + FieldValue> RequiresItemForOpenSceneActionField() { return { this, "APrimalStructureItemContainer.RequiresItemForOpenSceneAction" }; } + FieldValue DeathCacheCreationTimeField() { return { this, "APrimalStructureItemContainer.DeathCacheCreationTime" }; } + FieldValue LastBasedCharacterDamageTimeField() { return { this, "APrimalStructureItemContainer.LastBasedCharacterDamageTime" }; } + FieldValue LastBasedCharacterDamageFrameField() { return { this, "APrimalStructureItemContainer.LastBasedCharacterDamageFrame" }; } + FieldValue LastSignNamingTimeField() { return { this, "APrimalStructureItemContainer.LastSignNamingTime" }; } + FieldValue JunctionCableBeamOffsetStartField() { return { this, "APrimalStructureItemContainer.JunctionCableBeamOffsetStart" }; } + FieldValue JunctionCableBeamOffsetEndField() { return { this, "APrimalStructureItemContainer.JunctionCableBeamOffsetEnd" }; } + FieldValue ContainerActivatedSoundField() { return { this, "APrimalStructureItemContainer.ContainerActivatedSound" }; } + FieldValue ContainerDeactivatedSoundField() { return { this, "APrimalStructureItemContainer.ContainerDeactivatedSound" }; } + FieldValue> DemolishInventoryDepositClassField() { return { this, "APrimalStructureItemContainer.DemolishInventoryDepositClass" }; } + FieldValue> FuelItemTrueClassField() { return { this, "APrimalStructureItemContainer.FuelItemTrueClass" }; } + FieldValue> ReplicatedFuelItemClassField() { return { this, "APrimalStructureItemContainer.ReplicatedFuelItemClass" }; } + FieldValue<__int16> ReplicatedFuelItemColorIndexField() { return { this, "APrimalStructureItemContainer.ReplicatedFuelItemColorIndex" }; } + FieldValue DefaultAudioTemplateField() { return { this, "APrimalStructureItemContainer.DefaultAudioTemplate" }; } + FieldValue>> OverrideParticleTemplateItemClassesField() { return { this, "APrimalStructureItemContainer.OverrideParticleTemplateItemClasses" }; } + FieldValue> OverrideAudioTemplatesField() { return { this, "APrimalStructureItemContainer.OverrideAudioTemplates" }; } + FieldValue MaxActivationDistanceField() { return { this, "APrimalStructureItemContainer.MaxActivationDistance" }; } + FieldValue BoxNamePrefaceStringField() { return { this, "APrimalStructureItemContainer.BoxNamePrefaceString" }; } + FieldValue TribeGroupInventoryRankField() { return { this, "APrimalStructureItemContainer.TribeGroupInventoryRank" }; } + FieldValue> FuelConsumeDecreaseDurabilityAmountsField() { return { this, "APrimalStructureItemContainer.FuelConsumeDecreaseDurabilityAmounts" }; } + FieldValue RandomFuelUpdateTimeMinField() { return { this, "APrimalStructureItemContainer.RandomFuelUpdateTimeMin" }; } + FieldValue RandomFuelUpdateTimeMaxField() { return { this, "APrimalStructureItemContainer.RandomFuelUpdateTimeMax" }; } + FieldValue LastDeactivatedTimeField() { return { this, "APrimalStructureItemContainer.LastDeactivatedTime" }; } + FieldValue LastActivatedTimeField() { return { this, "APrimalStructureItemContainer.LastActivatedTime" }; } + FieldValue ValidCraftingResourceMaxDurabilityField() { return { this, "APrimalStructureItemContainer.ValidCraftingResourceMaxDurability" }; } + FieldValue ActivationCooldownTimeField() { return { this, "APrimalStructureItemContainer.ActivationCooldownTime" }; } + FieldValue UsablePriorityField() { return { this, "APrimalStructureItemContainer.UsablePriority" }; } + FieldValue DeathCacheCharacterIDField() { return { this, "APrimalStructureItemContainer.DeathCacheCharacterID" }; } + FieldValue SinglePlayerFuelConsumptionIntervalsMultiplierField() { return { this, "APrimalStructureItemContainer.SinglePlayerFuelConsumptionIntervalsMultiplier" }; } + FieldValue PoweredBatteryDurabilityToDecreasePerSecondField() { return { this, "APrimalStructureItemContainer.PoweredBatteryDurabilityToDecreasePerSecond" }; } + FieldValue DropInventoryDepositTraceDistanceField() { return { this, "APrimalStructureItemContainer.DropInventoryDepositTraceDistance" }; } + + // Functions + + void PostSpawnInitialize() { NativeCall(this, "APrimalStructureItemContainer.PostSpawnInitialize"); } + bool IsPowered() { return NativeCall(this, "APrimalStructureItemContainer.IsPowered"); } + bool CanBeActivated() { return NativeCall(this, "APrimalStructureItemContainer.CanBeActivated"); } + bool AllowToggleActivation(AShooterPlayerController * ForPC) { return NativeCall(this, "APrimalStructureItemContainer.AllowToggleActivation", ForPC); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalStructureItemContainer.TryMultiUse", ForPC, UseIndex); } + float SubtractWaterFromConnections(float Amount, bool bAllowNetworking) { return NativeCall(this, "APrimalStructureItemContainer.SubtractWaterFromConnections", Amount, bAllowNetworking); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "APrimalStructureItemContainer.ClientMultiUse", ForPC, UseIndex); } + void PreInitializeComponents() { NativeCall(this, "APrimalStructureItemContainer.PreInitializeComponents"); } + void BeginPlay() { NativeCall(this, "APrimalStructureItemContainer.BeginPlay"); } + void CheckForDeathCacheEmitter() { NativeCall(this, "APrimalStructureItemContainer.CheckForDeathCacheEmitter"); } + void PlacedStructureLocation() { NativeCall(this, "APrimalStructureItemContainer.PlacedStructureLocation"); } + void Stasis() { NativeCall(this, "APrimalStructureItemContainer.Stasis"); } + void Unstasis() { NativeCall(this, "APrimalStructureItemContainer.Unstasis"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalStructureItemContainer.GetLifetimeReplicatedProps", OutLifetimeProps); } + USoundBase * GetOverrideAudioTemplate() { return NativeCall(this, "APrimalStructureItemContainer.GetOverrideAudioTemplate"); } + void SetDelayedActivation() { NativeCall(this, "APrimalStructureItemContainer.SetDelayedActivation"); } + void TryActivation() { NativeCall(this, "APrimalStructureItemContainer.TryActivation"); } + void SetContainerActive(bool bNewActive) { NativeCall(this, "APrimalStructureItemContainer.SetContainerActive", bNewActive); } + bool CanOpen(APlayerController * ForPC) { return NativeCall(this, "APrimalStructureItemContainer.CanOpen", ForPC); } + FString * GetDescriptiveName(FString * result) { return NativeCall(this, "APrimalStructureItemContainer.GetDescriptiveName", result); } + bool ApplyPinCode(AShooterPlayerController * ForPC, int appledPinCode, bool bIsSetting, int TheCustomIndex) { return NativeCall(this, "APrimalStructureItemContainer.ApplyPinCode", ForPC, appledPinCode, bIsSetting, TheCustomIndex); } + bool RemoteInventoryAllowActivation(AShooterPlayerController * ForPC) { return NativeCall(this, "APrimalStructureItemContainer.RemoteInventoryAllowActivation", ForPC); } + void UpdateContainerActiveHealthDecrease() { NativeCall(this, "APrimalStructureItemContainer.UpdateContainerActiveHealthDecrease"); } + void CheckAutoReactivate() { NativeCall(this, "APrimalStructureItemContainer.CheckAutoReactivate"); } + void ConsumeFuel(bool bGiveItem) { NativeCall(this, "APrimalStructureItemContainer.ConsumeFuel", bGiveItem); } + void NotifyItemQuantityUpdated(UPrimalItem * anItem, int amount) { NativeCall(this, "APrimalStructureItemContainer.NotifyItemQuantityUpdated", anItem, amount); } + void NotifyItemAdded(UPrimalItem * anItem, bool bEquipItem) { NativeCall(this, "APrimalStructureItemContainer.NotifyItemAdded", anItem, bEquipItem); } + void CheckFuelSetActive() { NativeCall(this, "APrimalStructureItemContainer.CheckFuelSetActive"); } + void NotifyItemRemoved(UPrimalItem * anItem) { NativeCall(this, "APrimalStructureItemContainer.NotifyItemRemoved", anItem); } + void RefreshFuelState() { NativeCall(this, "APrimalStructureItemContainer.RefreshFuelState"); } + bool UseItemSpoilingTimeMultipliers() { return NativeCall(this, "APrimalStructureItemContainer.UseItemSpoilingTimeMultipliers"); } + void CharacterBasedOnUpdate(AActor * characterBasedOnMe, float DeltaSeconds) { NativeCall(this, "APrimalStructureItemContainer.CharacterBasedOnUpdate", characterBasedOnMe, DeltaSeconds); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalStructureItemContainer.DrawHUD", HUD); } + void ProcessEditText(AShooterPlayerController * ForPC, FString * TextToUse, bool __formal) { NativeCall(this, "APrimalStructureItemContainer.ProcessEditText", ForPC, TextToUse, __formal); } + void NetUpdateLocation_Implementation(FVector NewLocation) { NativeCall(this, "APrimalStructureItemContainer.NetUpdateLocation_Implementation", NewLocation); } + void NetSetContainerActive_Implementation(bool bSetActive, TSubclassOf NetReplicatedFuelItemClass, __int16 NetReplicatedFuelItemColorIndex) { NativeCall, __int16>(this, "APrimalStructureItemContainer.NetSetContainerActive_Implementation", bSetActive, NetReplicatedFuelItemClass, NetReplicatedFuelItemColorIndex); } + void NetUpdateBoxName_Implementation(FString * NewName) { NativeCall(this, "APrimalStructureItemContainer.NetUpdateBoxName_Implementation", NewName); } + void PlayDying(float KillingDamage, FDamageEvent * DamageEvent, APawn * InstigatingPawn, AActor * DamageCauser) { NativeCall(this, "APrimalStructureItemContainer.PlayDying", KillingDamage, DamageEvent, InstigatingPawn, DamageCauser); } + void SetDisabledTimer(float DisabledTime) { NativeCall(this, "APrimalStructureItemContainer.SetDisabledTimer", DisabledTime); } + void EnableActive() { NativeCall(this, "APrimalStructureItemContainer.EnableActive"); } + void GetBlueprintSpawnActorTransform(FVector * spawnLoc, FRotator * spawnRot) { NativeCall(this, "APrimalStructureItemContainer.GetBlueprintSpawnActorTransform", spawnLoc, spawnRot); } + bool OverrideHasWaterSource() { return NativeCall(this, "APrimalStructureItemContainer.OverrideHasWaterSource"); } + void RefreshPowered(APrimalStructureItemContainer * InDirectPower) { NativeCall(this, "APrimalStructureItemContainer.RefreshPowered", InDirectPower); } + void MovePowerJunctionLink() { NativeCall(this, "APrimalStructureItemContainer.MovePowerJunctionLink"); } + void RefreshPowerJunctionLink() { NativeCall(this, "APrimalStructureItemContainer.RefreshPowerJunctionLink"); } + void NotifyCraftedItem(UPrimalItem * anItem) { NativeCall(this, "APrimalStructureItemContainer.NotifyCraftedItem", anItem); } + void LoadedFromSaveGame() { NativeCall(this, "APrimalStructureItemContainer.LoadedFromSaveGame"); } + void CopyStructureValuesFrom(APrimalStructureItemContainer * otherItemContainer) { NativeCall(this, "APrimalStructureItemContainer.CopyStructureValuesFrom", otherItemContainer); } + void TargetingTeamChanged() { NativeCall(this, "APrimalStructureItemContainer.TargetingTeamChanged"); } + void SetPlayerConstructor(APlayerController * PC) { NativeCall(this, "APrimalStructureItemContainer.SetPlayerConstructor", PC); } + float GetUsablePriority() { return NativeCall(this, "APrimalStructureItemContainer.GetUsablePriority"); } + void RefreshInventoryItemCounts() { NativeCall(this, "APrimalStructureItemContainer.RefreshInventoryItemCounts"); } + void NetUpdateBoxName(FString * NewName) { NativeCall(this, "APrimalStructureItemContainer.NetUpdateBoxName", NewName); } + void PowerGeneratorBuiltNearbyPoweredStructure(APrimalStructureItemContainer * PoweredStructure) { NativeCall(this, "APrimalStructureItemContainer.PowerGeneratorBuiltNearbyPoweredStructure", PoweredStructure); } +}; + +struct APrimalStructureTurret : APrimalStructureItemContainer +{ + FieldValue> TargetField() { return { this, "APrimalStructureTurret.Target" }; } + FieldValue> AmmoItemTemplateField() { return { this, "APrimalStructureTurret.AmmoItemTemplate" }; } + FieldValue FireIntervalField() { return { this, "APrimalStructureTurret.FireInterval" }; } + FieldValue LastFireTimeField() { return { this, "APrimalStructureTurret.LastFireTime" }; } + FieldValue MaxFireYawDeltaField() { return { this, "APrimalStructureTurret.MaxFireYawDelta" }; } + FieldValue MaxFirePitchDeltaField() { return { this, "APrimalStructureTurret.MaxFirePitchDelta" }; } + FieldValue TargetingLocOffsetField() { return { this, "APrimalStructureTurret.TargetingLocOffset" }; } + FieldValue TargetingRotationInterpSpeedField() { return { this, "APrimalStructureTurret.TargetingRotationInterpSpeed" }; } + FieldArray TargetingRangesField() { return { this, "APrimalStructureTurret.TargetingRanges" }; } + FieldValue TargetingTraceOffsetField() { return { this, "APrimalStructureTurret.TargetingTraceOffset" }; } + FieldValue> FireDamageTypeField() { return { this, "APrimalStructureTurret.FireDamageType" }; } + FieldValue FireDamageAmountField() { return { this, "APrimalStructureTurret.FireDamageAmount" }; } + FieldValue FireDamageImpulseField() { return { this, "APrimalStructureTurret.FireDamageImpulse" }; } + FieldValue TurretAimRotOffsetField() { return { this, "APrimalStructureTurret.TurretAimRotOffset" }; } + FieldValue AimTargetLocOffsetField() { return { this, "APrimalStructureTurret.AimTargetLocOffset" }; } + FieldValue PlayerProneTargetOffsetField() { return { this, "APrimalStructureTurret.PlayerProneTargetOffset" }; } + FieldValue AimSpreadField() { return { this, "APrimalStructureTurret.AimSpread" }; } + FieldValue RangeSettingField() { return { this, "APrimalStructureTurret.RangeSetting" }; } + FieldValue AISettingField() { return { this, "APrimalStructureTurret.AISetting" }; } + FieldValue WarningSettingField() { return { this, "APrimalStructureTurret.WarningSetting" }; } + FieldValue NumBulletsField() { return { this, "APrimalStructureTurret.NumBullets" }; } + FieldValue NumBulletsPerShotField() { return { this, "APrimalStructureTurret.NumBulletsPerShot" }; } + FieldValue WarningExpirationTimeField() { return { this, "APrimalStructureTurret.WarningExpirationTime" }; } + FieldValue bWarnedField() { return { this, "APrimalStructureTurret.bWarned" }; } + FieldValue DefaultTurretAimRotOffsetField() { return { this, "APrimalStructureTurret.DefaultTurretAimRotOffset" }; } + FieldValue MuzzleLocOffsetField() { return { this, "APrimalStructureTurret.MuzzleLocOffset" }; } + FieldValue LastWarningTimeField() { return { this, "APrimalStructureTurret.LastWarningTime" }; } + + // Functions + + void BeginPlay() { NativeCall(this, "APrimalStructureTurret.BeginPlay"); } + void GetLifetimeReplicatedProps(TArray * OutLifetimeProps) { NativeCall *>(this, "APrimalStructureTurret.GetLifetimeReplicatedProps", OutLifetimeProps); } + AActor * FindTarget() { return NativeCall(this, "APrimalStructureTurret.FindTarget"); } + void SetTarget(AActor * aTarget) { NativeCall(this, "APrimalStructureTurret.SetTarget", aTarget); } + void WeaponTraceHits(TArray * HitResults, FVector * StartTrace, FVector * EndTrace) { NativeCall *, FVector *, FVector *>(this, "APrimalStructureTurret.WeaponTraceHits", HitResults, StartTrace, EndTrace); } + bool NetExecCommand(FName CommandName, FNetExecParams * ExecParams) { return NativeCall(this, "APrimalStructureTurret.NetExecCommand", CommandName, ExecParams); } + void DoFire(int RandomSeed) { NativeCall(this, "APrimalStructureTurret.DoFire", RandomSeed); } + void DoFireProjectile(FVector Origin, FVector ShootDir) { NativeCall(this, "APrimalStructureTurret.DoFireProjectile", Origin, ShootDir); } + void ClientsFireProjectile_Implementation(FVector Origin, FVector_NetQuantizeNormal ShootDir) { NativeCall(this, "APrimalStructureTurret.ClientsFireProjectile_Implementation", Origin, ShootDir); } + void SpawnImpactEffects(FHitResult * Impact, FVector * ShootDir) { NativeCall(this, "APrimalStructureTurret.SpawnImpactEffects", Impact, ShootDir); } + void SpawnTrailEffect(FVector * EndPoint) { NativeCall(this, "APrimalStructureTurret.SpawnTrailEffect", EndPoint); } + bool ShouldDealDamage(AActor * TestActor) { return NativeCall(this, "APrimalStructureTurret.ShouldDealDamage", TestActor); } + void DealDamage(FHitResult * Impact, FVector * ShootDir, int DamageAmount, TSubclassOf DamageType, float Impulse) { NativeCall, float>(this, "APrimalStructureTurret.DealDamage", Impact, ShootDir, DamageAmount, DamageType, Impulse); } + void StartWarning() { NativeCall(this, "APrimalStructureTurret.StartWarning"); } + void FinishWarning() { NativeCall(this, "APrimalStructureTurret.FinishWarning"); } + void Tick(float DeltaSeconds) { NativeCall(this, "APrimalStructureTurret.Tick", DeltaSeconds); } + void DrawHUD(AShooterHUD * HUD) { NativeCall(this, "APrimalStructureTurret.DrawHUD", HUD); } + bool IsValidToFire() { return NativeCall(this, "APrimalStructureTurret.IsValidToFire"); } + FRotator * GetMuzzleRotation(FRotator * result) { return NativeCall(this, "APrimalStructureTurret.GetMuzzleRotation", result); } + FVector * GetMuzzleLocation(FVector * result) { return NativeCall(this, "APrimalStructureTurret.GetMuzzleLocation", result); } + FVector * GetAttackingFromLocation(FVector * result) { return NativeCall(this, "APrimalStructureTurret.GetAttackingFromLocation", result); } + FVector * GetAimPivotLocation(FVector * result) { return NativeCall(this, "APrimalStructureTurret.GetAimPivotLocation", result); } + FName * GetMuzzleFlashSocketName(FName * result) { return NativeCall(this, "APrimalStructureTurret.GetMuzzleFlashSocketName", result); } + bool TryMultiUse(APlayerController * ForPC, int UseIndex) { return NativeCall(this, "APrimalStructureTurret.TryMultiUse", ForPC, UseIndex); } + void ClientMultiUse(APlayerController * ForPC, int UseIndex) { NativeCall(this, "APrimalStructureTurret.ClientMultiUse", ForPC, UseIndex); } + void NotifyItemRemoved(UPrimalItem * anItem) { NativeCall(this, "APrimalStructureTurret.NotifyItemRemoved", anItem); } + void NotifyItemAdded(UPrimalItem * anItem, bool bEquipItem) { NativeCall(this, "APrimalStructureTurret.NotifyItemAdded", anItem, bEquipItem); } + void NotifyItemQuantityUpdated(UPrimalItem * anItem, int amount) { NativeCall(this, "APrimalStructureTurret.NotifyItemQuantityUpdated", anItem, amount); } + void UpdateNumBullets() { NativeCall(this, "APrimalStructureTurret.UpdateNumBullets"); } + void PreInitializeComponents() { NativeCall(this, "APrimalStructureTurret.PreInitializeComponents"); } + void Stasis() { NativeCall(this, "APrimalStructureTurret.Stasis"); } + void Unstasis() { NativeCall(this, "APrimalStructureTurret.Unstasis"); } + void UpdatedTargeting() { NativeCall(this, "APrimalStructureTurret.UpdatedTargeting"); } + FVector * GetTargetAimAtLocation(FVector * result) { return NativeCall(this, "APrimalStructureTurret.GetTargetAimAtLocation", result); } + FVector * GetTargetFireAtLocation(FVector * result, APrimalCharacter * ForTarget) { return NativeCall(this, "APrimalStructureTurret.GetTargetFireAtLocation", result, ForTarget); } + bool CanFire() { return NativeCall(this, "APrimalStructureTurret.CanFire"); } + FName * GetTargetAltAimSocket(FName * result, APrimalCharacter * ForTarget) { return NativeCall(this, "APrimalStructureTurret.GetTargetAltAimSocket", result, ForTarget); } + USkeletalMeshComponent * GetSkeletalMeshComponent() { return NativeCall(this, "APrimalStructureTurret.GetSkeletalMeshComponent"); } + bool UseTurretFastTargeting() { return NativeCall(this, "APrimalStructureTurret.UseTurretFastTargeting"); } +}; diff --git a/version/Core/Public/API/ARK/Tribe.h b/version/Core/Public/API/ARK/Tribe.h new file mode 100644 index 0000000..727141b --- /dev/null +++ b/version/Core/Public/API/ARK/Tribe.h @@ -0,0 +1,129 @@ +#pragma once + +struct FTribeGovernment +{ + FTribeGovernment() + { + TribeGovern_PINCode = 0; + TribeGovern_DinoOwnership = 0; + TribeGovern_StructureOwnership = 0; + TribeGovern_DinoTaming = 0; + TribeGovern_DinoUnclaimAdminOnly = 0; + } + + int TribeGovern_PINCode; + int TribeGovern_DinoOwnership; + int TribeGovern_StructureOwnership; + int TribeGovern_DinoTaming; + int TribeGovern_DinoUnclaimAdminOnly; +}; + +struct FTribeData +{ + FTribeData() + { + OwnerPlayerDataID = 0; + TribeID = 0; + bSetGovernment = false; + LogIndex = 0; + NumTribeDinos = 0; + } + + FString TribeName; + unsigned int OwnerPlayerDataID; + int TribeID; + TArray MembersPlayerName; + TArray MembersPlayerDataID; + TArray MembersRankGroups; + TArray TribeAdmins; + TArray TribeAlliances; + bool bSetGovernment; + FTribeGovernment TribeGovernment; + TArray MembersConfigs; + TArray TribeWars; + TArray TribeLog; + int LogIndex; + TArray TribeRankGroups; + int NumTribeDinos; + TSet MembersPlayerDataIDSet_Server; + + // Functions + + FTribeData(FTribeData * __that) { NativeCall(this, "FTribeData.FTribeData", __that); } + bool IsTribeWarActive(int TribeID, UWorld * ForWorld, bool bIncludeUnstarted) { return NativeCall(this, "FTribeData.IsTribeWarActive", TribeID, ForWorld, bIncludeUnstarted); } + bool HasTribeWarRequest(int TribeID, UWorld * ForWorld) { return NativeCall(this, "FTribeData.HasTribeWarRequest", TribeID, ForWorld); } + void RefreshTribeWars(UWorld * ForWorld) { NativeCall(this, "FTribeData.RefreshTribeWars", ForWorld); } + FTribeAlliance * FindTribeAlliance(unsigned int AllianceID) { return NativeCall(this, "FTribeData.FindTribeAlliance", AllianceID); } + bool IsTribeAlliedWith(unsigned int OtherTribeID) { return NativeCall(this, "FTribeData.IsTribeAlliedWith", OtherTribeID); } + bool GetTribeRankGroupForPlayer(unsigned int PlayerDataID, FTribeRankGroup * outRankGroup) { return NativeCall(this, "FTribeData.GetTribeRankGroupForPlayer", PlayerDataID, outRankGroup); } + int GetBestRankGroupForRank(int Rank) { return NativeCall(this, "FTribeData.GetBestRankGroupForRank", Rank); } + int GetDefaultRankGroupIndex() { return NativeCall(this, "FTribeData.GetDefaultRankGroupIndex"); } + FTribeData * operator=(FTribeData * __that) { return NativeCall(this, "FTribeData.operator=", __that); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FTribeData.StaticStruct"); } +}; + +struct FTribeWar +{ + int EnemyTribeID; + int StartDayNumber; + int EndDayNumber; + float StartDayTime; + float EndDayTime; + bool bIsApproved; + int InitiatingTribeID; + FString EnemyTribeName; + + // Functions + + bool CanBeRejected(UWorld * ForWorld) { return NativeCall(this, "FTribeWar.CanBeRejected", ForWorld); } + bool IsCurrentlyActive(UWorld * ForWorld) { return NativeCall(this, "FTribeWar.IsCurrentlyActive", ForWorld); } + bool IsTribeWarOn(UWorld * ForWorld) { return NativeCall(this, "FTribeWar.IsTribeWarOn", ForWorld); } + FString * GetWarTimeString(FString * result, int DayNumber, float DayTime) { return NativeCall(this, "FTribeWar.GetWarTimeString", result, DayNumber, DayTime); } + bool operator==(FTribeWar * Other) { return NativeCall(this, "FTribeWar.operator==", Other); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FTribeWar.StaticStruct"); } +}; + +struct FTribeRankGroup +{ + FString RankGroupName; + char RankGroupRank; + char InventoryRank; + char StructureActivationRank; + char NewStructureActivationRank; + char NewStructureInventoryRank; + char PetOrderRank; + char PetRidingRank; + char InviteToGroupRank; + char MaxPromotionGroupRank; + char MaxDemotionGroupRank; + char MaxBanishmentGroupRank; + char NumInvitesRemaining; + unsigned __int32 bPreventStructureDemolish : 1; + unsigned __int32 bPreventStructureAttachment : 1; + unsigned __int32 bPreventStructureBuildInRange : 1; + unsigned __int32 bPreventUnclaiming : 1; + unsigned __int32 bAllowInvites : 1; + unsigned __int32 bLimitInvites : 1; + unsigned __int32 bAllowDemotions : 1; + unsigned __int32 bAllowPromotions : 1; + unsigned __int32 bAllowBanishments : 1; + unsigned __int32 bDefaultRank : 1; + + // Functions + + FTribeRankGroup(FTribeRankGroup * __that) { NativeCall(this, "FTribeRankGroup.FTribeRankGroup", __that); } + FTribeRankGroup * operator=(FTribeRankGroup * __that) { return NativeCall(this, "FTribeRankGroup.operator=", __that); } + void ValidateSettings() { NativeCall(this, "FTribeRankGroup.ValidateSettings"); } + bool operator==(FTribeRankGroup * Other) { return NativeCall(this, "FTribeRankGroup.operator==", Other); } + static UScriptStruct * StaticStruct() { return NativeCall(nullptr, "FTribeRankGroup.StaticStruct"); } + +}; + +struct FTribeAlliance +{ + FString AllianceName; + unsigned int AllianceID; + TArray MembersTribeName; + TArray MembersTribeID; + TArray AdminsTribeID; +}; \ No newline at end of file diff --git a/ArkApi/API/Base.h b/version/Core/Public/API/Base.h similarity index 61% rename from ArkApi/API/Base.h rename to version/Core/Public/API/Base.h index 6748fee..f2c2daf 100644 --- a/ArkApi/API/Base.h +++ b/version/Core/Public/API/Base.h @@ -1,15 +1,16 @@ -#ifndef H_BaseSdk -#define H_BaseSdk +#pragma once #include #include #ifdef ARK_EXPORTS -#define ARK_API __declspec(dllexport) +#define ARK_API __declspec(dllexport) #else #define ARK_API __declspec(dllimport) #endif +#define API_VERSION "2.0" + // Structs forward declaration struct AShooterPlayerController; @@ -99,30 +100,63 @@ struct UActorComponent; struct UMaterialInterface; struct FItemCraftQueueEntry; struct FItemSpawnActorClassOverride; -struct FItemCraftingConsumptionReplenishment; -struct FActorClassAttachmentInfo; -struct FSupplyCrateItemSet; +struct UNetConnection; +struct FRadialDamageEvent{}; +struct FMinimalViewInfo; +struct FItemCraftingConsumptionReplenishment{}; +struct FActorClassAttachmentInfo{}; +struct FSupplyCrateItemSet{}; struct UPrimalSupplyCrateItemSets; -struct FItemAttachmentInfo; +struct FItemAttachmentInfo{}; struct FItemStatInfo; -struct FSaddlePassengerSeatDefinition; +struct FSaddlePassengerSeatDefinition{}; struct APrimalStructureTurret; +struct FKey{}; +struct AWorldSettings; +struct UNetDriver; +struct FNetExecParams{}; +struct FLifetimeProperty{}; +struct AHUD; +struct FPointDamageEvent{}; +struct APrimalStructureExplosive; +struct UPaintingTexture; +struct APrimalStructureExplosiveTransGPS; +struct ITargetableInterface; +struct UAnimSequence; +struct APrimalStructureSeating; +struct UScriptStruct; +struct FTransponderInfo{}; +struct APrimalStructureItemContainer_SupplyCrate; +struct UAudioComponent; +struct FQuat; +struct FDinoOrderGroup{}; +struct FServerOptions{}; +struct ULocalPlayer; +struct ASpectatorPawn; +struct APlayerCameraManager; +struct UAntiDupeTransactionLog; +struct AMatineeActor; +struct ANPCZoneManager; +struct UStaticMesh; +struct UPrimalLocalProfile; +struct UPrimalBuffPersistentData; +struct UCharacterMovementComponent{}; +struct FDinoExtraDefaultItemList{}; +struct FWeaponData{}; +struct FAIRequestID{}; -// Address helpers +struct BitField +{ + DWORD64 offset; + DWORD bit_position; + ULONGLONG num_bits; + ULONGLONG length; //in bytes +}; -ARK_API DWORD64 GetAddress(const void* base, const std::string& structure, const std::string& offset); -ARK_API DWORD64 GetAddress(LPVOID base, const std::string& structure, const std::string& offset); -ARK_API LPVOID GetAddress(const std::string& structure, const std::string& offset); +// Address helpers -#include "Enums.h" -#include "UE.h" -#include "GameMode.h" -#include "GameState.h" -#include "Inventory.h" -#include "Other.h" -#include "Actor.h" -#include "Tribe.h" -#include "PrimalStructure.h" -#include "Ark.h" +ARK_API DWORD64 GetAddress(const void* base, const std::string& name); +ARK_API LPVOID GetAddress(const std::string& name); -#endif +ARK_API BitField GetBitField(const void* base, const std::string& name); +ARK_API BitField GetBitField(LPVOID base, const std::string& name); diff --git a/version/Core/Public/API/Enums.h b/version/Core/Public/API/Enums.h new file mode 100644 index 0000000..350aa50 --- /dev/null +++ b/version/Core/Public/API/Enums.h @@ -0,0 +1,904 @@ +#pragma once + +namespace EPrimalEquipmentType +{ + enum Type + { + Hat = 0x0, + Shirt = 0x1, + Pants = 0x2, + Boots = 0x3, + Gloves = 0x4, + DinoSaddle = 0x5, + Trophy = 0x6, + Costume = 0x7, + Shield = 0x8, + MAX = 0x9 + }; +} + +namespace EPrimalItemStat +{ + enum Type + { + GenericQuality, + Armor, + MaxDurability, + WeaponDamagePercent, + WeaponClipAmmo, + HypothermalInsulation, + Weight, + HyperthermalInsulation, + MAX + }; +} + +namespace EPrimalCharacterStatusValue +{ + enum Type + { + Health, + Stamina, + Torpidity, + Oxygen, + Food, + Water, + Temperature, + Weight, + MeleeDamageMultiplier, + SpeedMultiplier, + TemperatureFortitude, + CraftingSpeedMultiplier, + MAX + }; +} + +namespace EPrimalCharacterStatusState +{ + enum Type + { + Dead, + Winded, + Starvation, + Dehydration, + Suffocation, + Encumbered, + Hypothermia, + Hyperthermia, + Injured, + KnockedOut, + Sleeping, + Cold, + Hot, + Crafting, + MAX + }; +} + +namespace EPrimalItemType +{ + enum Type + { + MiscConsumable, + Equipment, + Weapon, + Ammo, + Structure, + Resource, + Skin, + WeaponAttachment, + Artifact, + MAX + }; +} + +namespace EPrimalConsumableType +{ + enum Type + { + Food, + Water, + Medicine, + Other, + MAX + }; +} + +namespace EPrimalItemMessage +{ + enum Type + { + Broken, + Repaired, + MAX + }; +} + +enum class ECollisionChannel +{ + ECC_WorldStatic = 0x0, + ECC_WorldDynamic = 0x1, + ECC_Visibility = 0x2, + ECC_PhysicsBody = 0x3, + ECC_Destructible = 0x4, + ECC_GameTraceChannel1 = 0x5, + ECC_GameTraceChannel2 = 0x6, + ECC_GameTraceChannel3 = 0x7, + ECC_GameTraceChannel4 = 0x8, + ECC_GameTraceChannel5 = 0x9, + ECC_GameTraceChannel6 = 0xA, + ECC_GameTraceChannel7 = 0xB, + ECC_GameTraceChannel8 = 0xC, + ECC_GameTraceChannel9 = 0xD, + ECC_GameTraceChannel10 = 0xE, + ECC_GameTraceChannel11 = 0xF, + ECC_GameTraceChannel12 = 0x10, + ECC_GameTraceChannel13 = 0x11, + ECC_GameTraceChannel14 = 0x12, + ECC_GameTraceChannel15 = 0x13, + ECC_GameTraceChannel16 = 0x14, + ECC_GameTraceChannel17 = 0x15, + ECC_GameTraceChannel18 = 0x16, + ECC_GameTraceChannel19 = 0x17, + ECC_GameTraceChannel20 = 0x18, + ECC_GameTraceChannel21 = 0x19, + ECC_GameTraceChannel22 = 0x1A, + ECC_GameTraceChannel23 = 0x1B, + ECC_GameTraceChannel24 = 0x1C, + ECC_GameTraceChannel25 = 0x1D, + ECC_GameTraceChannel26 = 0x1E, + ECC_GameTraceChannel27 = 0x1F, + ECC_OverlapAll_Deprecated = 0x20, + ECC_OverlapAllDynamic_Deprecated = 0x21, + ECC_OverlapAllStatic_Deprecated = 0x22, + ECC_MAX = 0x23, +}; + +namespace EXPType +{ + enum Type + { + XP_GENERIC, + XP_KILL, + XP_HARVEST, + XP_CRAFT, + XP_SPECIAL, + MAX + }; +} + +namespace EChatSendMode +{ + enum Type + { + GlobalChat, + GlobalTribeChat, + LocalChat, + AllianceChat, + MAX + }; +} + +namespace EChatType +{ + enum Type + { + GlobalChat, + ProximityChat, + RadioChat, + GlobalTribeChat, + AllianceChat, + MAX + }; +} + +namespace ETextComparisonLevel +{ + enum Type + { + Default, + // Locale-specific Default + Primary, + // Base + Secondary, + // Accent + Tertiary, + // Case + Quaternary, + // Punctuation + Quinary // Identical + }; +} + +enum class EFindName +{ + /** Find a name; return 0 if it doesn't exist. */ + FNAME_Find, + + /** Find a name or add it if it doesn't exist. */ + FNAME_Add, + + /** Finds a name and replaces it. Adds it if missing. This is only used by UHT and is generally not safe for threading. + * All this really is used for is correcting the case of names. In MT conditions you might get a half-changed name. + */ + FNAME_Replace_Not_Safe_For_Threading, +}; + +namespace EBabyCuddleType +{ + enum Type + { + Pet, + Food, + Walk, + MAX + }; +} + +namespace EAttachLocation +{ + enum Type + { + KeepRelativeOffset, + KeepWorldPosition, + SnapToTarget + }; +} + + +namespace EEndPlayReason +{ + enum Type + { + ActorDestroyed, + LevelTransition, + EndPlayInEditor, + RemovedFromWorld, + Quit + }; +} + +enum class ECollisionResponse +{ + ECR_Ignore, + ECR_Overlap, + ECR_Block, + ECR_MAX +}; + +enum class ENetMode +{ + NM_Standalone, + NM_DedicatedServer, + NM_ListenServer, + NM_Client, + NM_MAX +}; + +namespace ETouchIndex +{ + enum Type + { + Touch1, + Touch2, + Touch3, + Touch4, + Touch5, + Touch6, + Touch7, + Touch8, + Touch9, + Touch10 + }; +} + +namespace EPrimalARKTributeDataType +{ + enum Type + { + Items, + TamedDinos, + CharacterData, + MAX + }; +} + +namespace ESTOFNotificationType +{ + enum Type + { + Death, + TribeEliminated, + MatchVictory, + MatchDraw, + MAX + }; +} + +enum class EMovementMode +{ + MOVE_None, + MOVE_Walking, + MOVE_Falling, + MOVE_Swimming, + MOVE_Flying, + MOVE_Custom, + MOVE_MAX +}; + +namespace EDinoTamedOrder +{ + enum Type + { + SetAggressionPassive, + SetAggressionNeutral, + SetAggressionAggressive, + SetAggressionAttackTarget, + ToggleFollowMe, + FollowMe, + StopFollowing, + CycleFollowDistance, + MAX + }; +} + +namespace EPrimalCharacterInputType +{ + enum Type + { + PrimaryFire, + Targeting, + AltFire, + SwitchWeapon, + Reload, + Crouch, + Prone, + CrouchProneToggle, + SwitchMap, + DinoAttack + }; +} + +namespace EShooterPhysMaterialType +{ + enum Type + { + Unknown, + Concrete, + Dirt, + Water, + Metal, + Wood, + Grass, + Glass, + Flesh, + Leaves, + Rock, + Sand, + Snow, + MAX + }; +} + +enum class EPhysicalSurface +{ + SurfaceType_Default, + SurfaceType1, + SurfaceType2, + SurfaceType3, + SurfaceType4, + SurfaceType5, + SurfaceType6, + SurfaceType7, + SurfaceType8, + SurfaceType9, + SurfaceType10, + SurfaceType11, + SurfaceType12, + SurfaceType13, + SurfaceType14, + SurfaceType15, + SurfaceType16, + SurfaceType17, + SurfaceType18, + SurfaceType19, + SurfaceType20, + SurfaceType21, + SurfaceType22, + SurfaceType23, + SurfaceType24, + SurfaceType25, + SurfaceType26, + SurfaceType27, + SurfaceType28, + SurfaceType29, + SurfaceType30, + SurfaceType31, + SurfaceType32, + SurfaceType33, + SurfaceType34, + SurfaceType35, + SurfaceType36, + SurfaceType37, + SurfaceType38, + SurfaceType39, + SurfaceType40, + SurfaceType41, + SurfaceType42, + SurfaceType43, + SurfaceType44, + SurfaceType45, + SurfaceType46, + SurfaceType47, + SurfaceType48, + SurfaceType49, + SurfaceType50, + SurfaceType51, + SurfaceType52, + SurfaceType53, + SurfaceType54, + SurfaceType55, + SurfaceType56, + SurfaceType57, + SurfaceType58, + SurfaceType59, + SurfaceType60, + SurfaceType61, + SurfaceType62, + SurfaceType_Max +}; + +namespace EWeaponState +{ + enum Type + { + Idle, + Firing, + Reloading, + Equipping, + UnEquipping + }; +} + +namespace EPathFollowingRequestResult +{ + enum Type + { + Failed, + AlreadyAtGoal, + RequestSuccessful + }; +} + +namespace EPathFollowingResult +{ + enum Type + { + Success, + Blocked, + OffPath, + Aborted, + Skipped, + Invalid + }; +} + +namespace EComponentMobility +{ + enum Type + { + Static, + Stationary, + Movable + }; +} + +enum class ERelativeTransformSpace +{ + RTS_World, + RTS_Actor, + RTS_Component +}; + +enum class EMoveComponentFlags +{ + MOVECOMP_NoFlags, + MOVECOMP_IgnoreBases, + MOVECOMP_SkipPhysicsMove, + MOVECOMP_NeverIgnoreBlockingOverlaps, + MOVECOMP_DoCenterOfMassCheck +}; + +namespace ETribeGroupPermission +{ + enum Type + { + STRUCTUREACTIVATE, + INVENTORYACCESS, + PET_ORDER, + PET_RIDE, + GENERAL_STRUCTUREDEMOLISH, + GENERAL_STRUCTUREATTACHMENT, + GENERAL_BUILDSTRUCTUREINRANGE, + INVITEMEMBER, + PROMOTEMEMBER, + DEMOTEMEMBER, + BANISHMEMBER, + PET_UNCLAIM + }; +} + +enum class ETraceTypeQuery +{ + TraceTypeQuery1, + TraceTypeQuery2, + TraceTypeQuery3, + TraceTypeQuery4, + TraceTypeQuery5, + TraceTypeQuery6, + TraceTypeQuery7, + TraceTypeQuery8, + TraceTypeQuery9, + TraceTypeQuery10, + TraceTypeQuery11, + TraceTypeQuery12, + TraceTypeQuery13, + TraceTypeQuery14, + TraceTypeQuery15, + TraceTypeQuery16, + TraceTypeQuery17, + TraceTypeQuery18, + TraceTypeQuery19, + TraceTypeQuery20, + TraceTypeQuery21, + TraceTypeQuery22, + TraceTypeQuery23, + TraceTypeQuery24, + TraceTypeQuery25, + TraceTypeQuery26, + TraceTypeQuery27, + TraceTypeQuery28, + TraceTypeQuery29, + TraceTypeQuery30, + TraceTypeQuery31, + TraceTypeQuery32, + TraceTypeQuery_MAX +}; + +enum class EInputEvent +{ + IE_Pressed, + IE_Released, + IE_Repeat, + IE_DoubleClick, + IE_Axis, + IE_MAX +}; + +namespace ETouchType +{ + enum Type + { + Began, + Moved, + Stationary, + Ended, + NumTypes + }; +} + +namespace EMouseCursor +{ + enum Type + { + None, + Default, + TextEditBeam, + ResizeLeftRight, + ResizeUpDown, + ResizeSouthEast, + ResizeSouthWest, + CardinalCross, + Crosshairs, + Hand, + GrabHand, + GrabHandClosed, + SlashedCircle, + EyeDropper, + TotalCursorCount + }; +} + +namespace EWorldType +{ + enum Type + { + None, + Game, + Editor, + PIE, + Preview, + Inactive + }; +} + +enum class EObjectFlags +{ + RF_Public, + RF_Standalone, + RF_Native, + RF_Transactional, + RF_ClassDefaultObject, + RF_ArchetypeObject, + RF_Transient, + RF_RootSet, + RF_Unreachable, + RF_TagGarbageTemp, + RF_NeedLoad, + RF_AsyncLoading, + RF_NeedPostLoad, + RF_NeedPostLoadSubobjects, + RF_PendingKill, + RF_BeginDestroyed, + RF_FinishDestroyed, + RF_BeingRegenerated, + RF_DefaultSubObject, + RF_WasLoaded, + RF_TextExportTransient, + RF_LoadCompleted, + RF_WhiteListed, + RF_AsyncLoadingRef, + RF_MarkedByCooker, + RF_ForceTagExp, + RF_OlderObject, + RF_AllFlags, + RF_NoFlags, + RF_Load, + RF_PropagateToSubObjects +}; + +namespace EIncludeSuperFlag +{ + enum Type + { + ExcludeSuper, + IncludeSuper + }; +} + +namespace EAssetAvailability +{ + enum Type + { + DoesNotExist, + NotAvailable, + LocalSlow, + LocalFast + }; +} + +namespace EAssetAvailabilityProgressReportingType +{ + enum Type + { + ETA, + PercentageComplete + }; +} + +namespace ELevelExperienceRampType +{ + enum Type + { + Player, + DinoEasy, + DinoMedium, + DinoHard, + MAX + }; +} + +enum class ClassCastFlags : unsigned long long +{ + CASTCLASS_None = 0x0000000000000000, + CASTCLASS_UField = 0x0000000000000001, + CASTCLASS_UInt8Property = 0x0000000000000002, + CASTCLASS_UEnum = 0x0000000000000004, + CASTCLASS_UStruct = 0x0000000000000008, + CASTCLASS_UScriptStruct = 0x0000000000000010, + CASTCLASS_UClass = 0x0000000000000020, + CASTCLASS_UByteProperty = 0x0000000000000040, + CASTCLASS_UIntProperty = 0x0000000000000080, + CASTCLASS_UFloatProperty = 0x0000000000000100, + CASTCLASS_UUInt64Property = 0x0000000000000200, + CASTCLASS_UClassProperty = 0x0000000000000400, + CASTCLASS_UUInt32Property = 0x0000000000000800, + CASTCLASS_UInterfaceProperty = 0x0000000000001000, + CASTCLASS_UNameProperty = 0x0000000000002000, + CASTCLASS_UStrProperty = 0x0000000000004000, + CASTCLASS_UProperty = 0x0000000000008000, + CASTCLASS_UObjectProperty = 0x0000000000010000, + CASTCLASS_UBoolProperty = 0x0000000000020000, + CASTCLASS_UUInt16Property = 0x0000000000040000, + CASTCLASS_UFunction = 0x0000000000080000, + CASTCLASS_UStructProperty = 0x0000000000100000, + CASTCLASS_UArrayProperty = 0x0000000000200000, + CASTCLASS_UInt64Property = 0x0000000000400000, + CASTCLASS_UDelegateProperty = 0x0000000000800000, + CASTCLASS_UNumericProperty = 0x0000000001000000, + CASTCLASS_UMulticastDelegateProperty = 0x0000000002000000, + CASTCLASS_UObjectPropertyBase = 0x0000000004000000, + CASTCLASS_UWeakObjectProperty = 0x0000000008000000, + CASTCLASS_ULazyObjectProperty = 0x0000000010000000, + CASTCLASS_UAssetObjectProperty = 0x0000000020000000, + CASTCLASS_UTextProperty = 0x0000000040000000, + CASTCLASS_UInt16Property = 0x0000000080000000, + CASTCLASS_UDoubleProperty = 0x0000000100000000, + CASTCLASS_UAssetClassProperty = 0x0000000200000000, + CASTCLASS_UPackage = 0x0000000400000000, + CASTCLASS_ULevel = 0x0000000800000000, + CASTCLASS_AActor = 0x0000001000000000, + CASTCLASS_APlayerController = 0x0000002000000000, + CASTCLASS_APawn = 0x0000004000000000, + CASTCLASS_USceneComponent = 0x0000008000000000, + CASTCLASS_UPrimitiveComponent = 0x0000010000000000, + CASTCLASS_USkinnedMeshComponent = 0x0000020000000000, + CASTCLASS_USkeletalMeshComponent = 0x0000040000000000, + CASTCLASS_UBlueprint = 0x0000080000000000, + CASTCLASS_UDelegateFunction = 0x0000100000000000, + CASTCLASS_UStaticMeshComponent = 0x0000200000000000, + CASTCLASS_UMapProperty = 0x0000400000000000, + CASTCLASS_USetProperty = 0x0000800000000000, + CASTCLASS_UEnumProperty = 0x0001000000000000, + CASTCLASS_AllFlags = 0xFFFFFFFFFFFFFFFF +}; + +enum class EName +{ + NAME_None, + NAME_ByteProperty, + NAME_IntProperty, + NAME_BoolProperty, + NAME_FloatProperty, + NAME_ObjectProperty, + NAME_NameProperty, + NAME_DelegateProperty, + NAME_ClassProperty, + NAME_ArrayProperty, + NAME_StructProperty, + NAME_VectorProperty, + NAME_RotatorProperty, + NAME_StrProperty, + NAME_TextProperty, + NAME_InterfaceProperty, + NAME_MulticastDelegateProperty, + NAME_WeakObjectProperty, + NAME_LazyObjectProperty, + NAME_AssetObjectProperty, + NAME_UInt64Property, + NAME_UInt32Property, + NAME_UInt16Property, + NAME_Int64Property, + NAME_Int16Property, + NAME_Int8Property, + NAME_AssetSubclassOfProperty, + NAME_Core, + NAME_Engine, + NAME_Editor, + NAME_CoreUObject, + NAME_Cylinder, + NAME_BoxSphereBounds, + NAME_Sphere, + NAME_Box, + NAME_Vector2D, + NAME_IntRect, + NAME_IntPoint, + NAME_Vector4, + NAME_Name, + NAME_Vector, + NAME_Rotator, + NAME_SHVector, + NAME_Color, + NAME_Plane, + NAME_Matrix, + NAME_LinearColor, + NAME_AdvanceFrame, + NAME_Pointer, + NAME_Double, + NAME_Quat, + NAME_Self, + NAME_Transform, + NAME_Object, + NAME_Camera, + NAME_Actor, + NAME_ObjectRedirector, + NAME_ObjectArchetype, + NAME_Class, + NAME_State, + NAME_TRUE, + NAME_FALSE, + NAME_Enum, + NAME_Default, + NAME_Skip, + NAME_Input, + NAME_Package, + NAME_Groups, + NAME_Interface, + NAME_Components, + NAME_Global, + NAME_Super, + NAME_Outer, + NAME_Map, + NAME_Role, + NAME_RemoteRole, + NAME_PersistentLevel, + NAME_TheWorld, + NAME_PackageMetaData, + NAME_InitialState, + NAME_Game, + NAME_SelectionColor, + NAME_UI, + NAME_ExecuteUbergraph, + NAME_DeviceID, + NAME_RootStat, + NAME_MoveActor, + NAME_All, + NAME_MeshEmitterVertexColor, + NAME_TextureOffsetParameter, + NAME_TextureScaleParameter, + NAME_ImpactVel, + NAME_SlideVel, + NAME_TextureOffset1Parameter, + NAME_MeshEmitterDynamicParameter, + NAME_ExpressionInput, + NAME_Untitled, + NAME_Timer, + NAME_Team, + NAME_Low, + NAME_High, + NAME_NetworkGUID, + NAME_GameThread, + NAME_RenderThread, + NAME_OtherChildren, + NAME_Location, + NAME_Rotation, + NAME_BSP, + NAME_EditorGameAgnostic, + NAME_DGram, + NAME_Stream, + NAME_GameNetDriver, + NAME_PendingNetDriver, + NAME_BeaconNetDriver, + NAME_FlushNetDormancy, + NAME_Linear, + NAME_Point, + NAME_Aniso, + NAME_LightMapResolution, + NAME_UnGrouped, + NAME_VoiceChat, + NAME_Playing, + NAME_Spectating, + NAME_Inactive, + NAME_PerfWarning, + NAME_Info, + NAME_Init, + NAME_Exit, + NAME_Cmd, + NAME_Warning, + NAME_Error, + NAME_FontCharacter, + NAME_InitChild2StartBone, + NAME_SoundCueLocalized, + NAME_SoundCue, + NAME_RawDistributionFloat, + NAME_RawDistributionVector, + NAME_InterpCurveFloat, + NAME_InterpCurveVector2D, + NAME_InterpCurveVector, + NAME_InterpCurveTwoVectors, + NAME_InterpCurveQuat, + NAME_AI, + NAME_NavMesh, + NAME_PerformanceCapture, + NAME_MaxHardcodedNameIndex +}; diff --git a/version/Core/Public/API/Fields.h b/version/Core/Public/API/Fields.h new file mode 100644 index 0000000..560b214 --- /dev/null +++ b/version/Core/Public/API/Fields.h @@ -0,0 +1,164 @@ +#pragma once + +#include +#include + +#include "Base.h" + +template +RT NativeCall(void* _this, const std::string& func_name, Args&&... args) +{ + return static_cast(GetAddress(func_name))( + reinterpret_cast(_this), std::forward(args)...); +} + +template +RT NativeCall(nullptr_t, const std::string& funcName, Args&&... args) +{ + return static_cast(GetAddress(funcName))(std::forward(args)...); +} + +template +RT GetNativeField(const void* _this, const std::string& field_name) +{ + return *reinterpret_cast(GetAddress(_this, field_name)); +} + +template +RT GetNativePointerField(const void* _this, const std::string& field_name) +{ + return reinterpret_cast(GetAddress(_this, field_name)); +} + +template +RT GetNativeBitField(const void* _this, const std::string& field_name) +{ + const auto bf = GetBitField(_this, field_name); + T result = ((*reinterpret_cast(bf.offset)) >> bf.bit_position) & ~0ULL >> sizeof(unsigned long long) * 8 - bf. + num_bits; + + return static_cast(result); +} + +template +void SetNativeBitField(LPVOID _this, const std::string& field_name, T new_value) +{ + const auto bf = GetBitField(_this, field_name); + const auto mask = ~0ULL >> sizeof(unsigned long long) * 8 - bf.num_bits << bf.bit_position; + *reinterpret_cast(bf.offset) = (*reinterpret_cast(bf.offset) & ~mask) | ((new_value << bf.bit_position) & mask + ); +} + +template +class FieldValue +{ +public: + FieldValue(void* parent, const std::string& field_name) + : value_(GetNativePointerField(parent, field_name)) + { + } + + T& operator()() const + { + return *value_; + } + + T& operator=(const T& other) + { + *value_ = other; + return *value_; + } + + T& Get() const + { + return *value_; + } + + void Set(const T& other) + { + *value_ = other; + } + +private: + T* value_; +}; + +template +class FieldPointer +{ +public: + FieldPointer(void* parent, const std::string& field_name) + : value_(GetNativePointerField(parent, field_name)) + { + } + + T operator()() const + { + return value_; + } + + T operator=(const T& other) = delete; + +private: + T value_; +}; + +template +class FieldArray +{ +public: + FieldArray(void* parent, const std::string& field_name) + : value_(GetNativePointerField(parent, field_name)) + { + } + + T* operator()() + { + return value_; + } + + T& operator=(const T& other) = delete; + + static size_t GetSize() + { + return size; + } + +private: + T* value_; +}; + +template +class BitFieldValue +{ +public: + BitFieldValue(void* parent, const std::string& field_name) + : parent_(parent), field_name_(field_name) + { + } + + RT operator()() const + { + return GetNativeBitField(parent_, field_name_); + } + + RT operator=(const T& other) + { + SetNativeBitField(parent_, field_name_, other); + return operator()(); + } + + RT Get() const + { + return GetNativeBitField(parent_, field_name_); + } + + void Set(const T& other) + { + SetNativeBitField(parent_, field_name_, other); + } + +private: + void* parent_; + std::string field_name_; +}; \ No newline at end of file diff --git a/version/Core/Public/API/UE/BasicTypes.h b/version/Core/Public/API/UE/BasicTypes.h new file mode 100644 index 0000000..e033fc1 --- /dev/null +++ b/version/Core/Public/API/UE/BasicTypes.h @@ -0,0 +1,151 @@ +#pragma once + +#include + +#define RESTRICT __restrict /* no alias hint */ +#define FORCENOINLINE __declspec(noinline) /* Force code to NOT be inline */ +#define CONSTEXPR constexpr + +#define PLATFORM_HAS_64BIT_ATOMICS 1 +#define PLATFORM_64BITS 1 +#define PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS 1 +#define PLATFORM_LITTLE_ENDIAN 1 + +#define check(expr) {} +#define checkSlow(expr) {} +#define checkf(...) {} +#define CA_ASSUME( Expr ) {} +#define ASSUME( Expr ) {} +#define ensureMsgf( Expr, Expr2 ) {} + +#define MS_ALIGN(n) __declspec(align(n)) +#define GCC_ALIGN(n) + +//--------------------------------------------------------------------- +// Utility for automatically setting up the pointer-sized integer type +//--------------------------------------------------------------------- + +template +struct SelectIntPointerType +{ + // nothing here are is it an error if the partial specializations fail +}; + +template +struct SelectIntPointerType +{ + typedef T64BITS TIntPointer; // select the 64 bit type +}; + +template +struct SelectIntPointerType +{ + typedef T32BITS TIntPointer; // select the 32 bit type +}; + +/** +* Generic types for almost all compilers and platforms +**/ +struct FGenericPlatformTypes +{ + // Unsigned base types. + typedef unsigned char uint8; // 8-bit unsigned. + typedef unsigned short int uint16; // 16-bit unsigned. + typedef unsigned int uint32; // 32-bit unsigned. + typedef unsigned long long uint64; // 64-bit unsigned. + + // Signed base types. + typedef signed char int8; // 8-bit signed. + typedef signed short int int16; // 16-bit signed. + typedef signed int int32; // 32-bit signed. + typedef signed long long int64; // 64-bit signed. + + // Character types. + typedef char ANSICHAR; // An ANSI character - 8-bit fixed-width representation of 7-bit characters. + typedef wchar_t WIDECHAR; // A wide character - In-memory only. ?-bit fixed-width representation of the platform's natural wide character set. Could be different sizes on different platforms. + typedef uint8 CHAR8; // An 8-bit character type - In-memory only. 8-bit representation. Should really be char8_t but making this the generic option is easier for compilers which don't fully support C++11 yet (i.e. MSVC). + typedef uint16 CHAR16; // A 16-bit character type - In-memory only. 16-bit representation. Should really be char16_t but making this the generic option is easier for compilers which don't fully support C++11 yet (i.e. MSVC). + typedef uint32 CHAR32; // A 32-bit character type - In-memory only. 32-bit representation. Should really be char32_t but making this the generic option is easier for compilers which don't fully support C++11 yet (i.e. MSVC). + typedef WIDECHAR TCHAR; // A switchable character - In-memory only. Either ANSICHAR or WIDECHAR, depending on a licensee's requirements. + + typedef SelectIntPointerType::TIntPointer UPTRINT; // unsigned int the same size as a pointer + typedef SelectIntPointerType::TIntPointer PTRINT; // signed int the same size as a pointer + typedef UPTRINT SIZE_T; // unsigned int the same size as a pointer + typedef PTRINT SSIZE_T; // signed int the same size as a pointer + + typedef int32 TYPE_OF_NULL; + typedef decltype(nullptr) TYPE_OF_NULLPTR; +}; + +/** +* Windows specific types +**/ +struct FWindowsPlatformTypes : public FGenericPlatformTypes +{ +#ifdef _WIN64 + typedef unsigned __int64 SIZE_T; + typedef __int64 SSIZE_T; +#else + typedef unsigned long SIZE_T; + typedef long SSIZE_T; +#endif +}; + +typedef FWindowsPlatformTypes FPlatformTypes; + +typedef FPlatformTypes::uint8 uint8; +/// A 16-bit unsigned integer. +typedef FPlatformTypes::uint16 uint16; +/// A 32-bit unsigned integer. +typedef FPlatformTypes::uint32 uint32; +/// A 64-bit unsigned integer. +typedef FPlatformTypes::uint64 uint64; + +//~ Signed base types. +/// An 8-bit signed integer. +typedef FPlatformTypes::int8 int8; +/// A 16-bit signed integer. +typedef FPlatformTypes::int16 int16; +/// A 32-bit signed integer. +typedef FPlatformTypes::int32 int32; +/// A 64-bit signed integer. +typedef FPlatformTypes::int64 int64; + +//~ Character types. +/// An ANSI character. Normally a signed type. +typedef FPlatformTypes::ANSICHAR ANSICHAR; +/// A wide character. Normally a signed type. +typedef FPlatformTypes::WIDECHAR WIDECHAR; +/// Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requirements of the licensee. +typedef FPlatformTypes::TCHAR TCHAR; +/// An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit. +typedef FPlatformTypes::CHAR8 UTF8CHAR; +/// A 16-bit character containing a UCS2 (Unicode, 16-bit, fixed-width) code unit, used for compatibility with 'Windows TCHAR' across multiple platforms. +typedef FPlatformTypes::CHAR16 UCS2CHAR; +/// A 16-bit character containing a UTF16 (Unicode, 16-bit, variable-width) code unit. +typedef FPlatformTypes::CHAR16 UTF16CHAR; +/// A 32-bit character containing a UTF32 (Unicode, 32-bit, fixed-width) code unit. +typedef FPlatformTypes::CHAR32 UTF32CHAR; + +/// An unsigned integer the same size as a pointer +typedef FPlatformTypes::UPTRINT UPTRINT; +/// A signed integer the same size as a pointer +typedef FPlatformTypes::PTRINT PTRINT; +/// An unsigned integer the same size as a pointer, the same as UPTRINT +typedef FPlatformTypes::SIZE_T SIZE_T; +/// An integer the same size as a pointer, the same as PTRINT +typedef FPlatformTypes::SSIZE_T SSIZE_T; + +/// The type of the NULL constant. +typedef FPlatformTypes::TYPE_OF_NULL TYPE_OF_NULL; +/// The type of the C++ nullptr keyword. +typedef FPlatformTypes::TYPE_OF_NULLPTR TYPE_OF_NULLPTR; + +enum { INDEX_NONE = -1 }; + +enum EForceInit +{ + ForceInit, + ForceInitToZero +}; +enum ENoInit { NoInit }; \ No newline at end of file diff --git a/version/Core/Public/API/UE/Containers/Algo/BinarySearch.h b/version/Core/Public/API/UE/Containers/Algo/BinarySearch.h new file mode 100644 index 0000000..29d6621 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Algo/BinarySearch.h @@ -0,0 +1,222 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../../Templates/IdentityFunctor.h" +#include "../../Templates/Invoke.h" +#include "../../Templates/Less.h" + +namespace AlgoImpl +{ + /** + * Performs binary search, resulting in position of the first element >= Value + * + * @param First Pointer to array + * @param Num Number of elements in array + * @param Value Value to look for + * @param Projection Called on values in array to get type that can be compared to Value + * @param SortPredicate Predicate for sort comparison + * + * @returns Position of the first element >= Value, may be == Num + */ + template + FORCEINLINE SIZE_T LowerBoundInternal(RangeValueType* First, const SIZE_T Num, const PredicateValueType& Value, ProjectionType Projection, SortPredicateType SortPredicate) + { + // Current start of sequence to check + SIZE_T Start = 0; + // Size of sequence to check + SIZE_T Size = Num; + + // With this method, if Size is even it will do one more comparison than necessary, but because Size can be predicted by the CPU it is faster in practice + while (Size > 0) + { + const SIZE_T LeftoverSize = Size % 2; + Size = Size / 2; + + const SIZE_T CheckIndex = Start + Size; + const SIZE_T StartIfLess = CheckIndex + LeftoverSize; + + auto&& CheckValue = Invoke(Projection, First[CheckIndex]); + Start = SortPredicate(CheckValue, Value) ? StartIfLess : Start; + } + return Start; + } + + /** + * Performs binary search, resulting in position of the first element that is larger than the given value + * + * @param First Pointer to array + * @param Num Number of elements in array + * @param Value Value to look for + * @param SortPredicate Predicate for sort comparison + * + * @returns Position of the first element > Value, may be == Num + */ + template + FORCEINLINE SIZE_T UpperBoundInternal(RangeValueType* First, const SIZE_T Num, const PredicateValueType& Value, ProjectionType Projection, SortPredicateType SortPredicate) + { + // Current start of sequence to check + SIZE_T Start = 0; + // Size of sequence to check + SIZE_T Size = Num; + + // With this method, if Size is even it will do one more comparison than necessary, but because Size can be predicted by the CPU it is faster in practice + while (Size > 0) + { + const SIZE_T LeftoverSize = Size % 2; + Size = Size / 2; + + const SIZE_T CheckIndex = Start + Size; + const SIZE_T StartIfLess = CheckIndex + LeftoverSize; + + auto&& CheckValue = Invoke(Projection, First[CheckIndex]); + Start = !SortPredicate(Value, CheckValue) ? StartIfLess : Start; + } + + return Start; + } +} + +namespace Algo +{ + /** + * Performs binary search, resulting in position of the first element >= Value using predicate + * + * @param Range Range to search through, must be already sorted by SortPredicate + * @param Value Value to look for + * @param SortPredicate Predicate for sort comparison, defaults to < + * + * @returns Position of the first element >= Value, may be position after last element in range + */ + template + FORCEINLINE int32 LowerBound(RangeType& Range, const ValueType& Value, SortPredicateType SortPredicate) + { + return AlgoImpl::LowerBoundInternal(GetData(Range), GetNum(Range), Value, FIdentityFunctor(), SortPredicate); + } + template + FORCEINLINE int32 LowerBound(RangeType& Range, const ValueType& Value) + { + return AlgoImpl::LowerBoundInternal(GetData(Range), GetNum(Range), Value, FIdentityFunctor(), TLess<>()); + } + + /** + * Performs binary search, resulting in position of the first element with projected value >= Value using predicate + * + * @param Range Range to search through, must be already sorted by SortPredicate + * @param Value Value to look for + * @param Projection Functor or data member pointer, called via Invoke to compare to Value + * @param SortPredicate Predicate for sort comparison, defaults to < + * + * @returns Position of the first element >= Value, may be position after last element in range + */ + template + FORCEINLINE int32 LowerBoundBy(RangeType& Range, const ValueType& Value, ProjectionType Projection, SortPredicateType SortPredicate) + { + return AlgoImpl::LowerBoundInternal(GetData(Range), GetNum(Range), Value, Projection, SortPredicate); + } + template + FORCEINLINE int32 LowerBoundBy(RangeType& Range, const ValueType& Value, ProjectionType Projection) + { + return AlgoImpl::LowerBoundInternal(GetData(Range), GetNum(Range), Value, Projection, TLess<>()); + } + + /** + * Performs binary search, resulting in position of the first element > Value using predicate + * + * @param Range Range to search through, must be already sorted by SortPredicate + * @param Value Value to look for + * @param SortPredicate Predicate for sort comparison, defaults to < + * + * @returns Position of the first element > Value, may be past end of range + */ + template + FORCEINLINE int32 UpperBound(RangeType& Range, const ValueType& Value, SortPredicateType SortPredicate) + { + return AlgoImpl::UpperBoundInternal(GetData(Range), GetNum(Range), Value, FIdentityFunctor(), SortPredicate); + } + template + FORCEINLINE int32 UpperBound(RangeType& Range, const ValueType& Value) + { + return AlgoImpl::UpperBoundInternal(GetData(Range), GetNum(Range), Value, FIdentityFunctor(), TLess<>()); + } + + /** + * Performs binary search, resulting in position of the first element with projected value > Value using predicate + * + * @param Range Range to search through, must be already sorted by SortPredicate + * @param Value Value to look for + * @param Projection Functor or data member pointer, called via Invoke to compare to Value + * @param SortPredicate Predicate for sort comparison, defaults to < + * + * @returns Position of the first element > Value, may be past end of range + */ + template + FORCEINLINE int32 UpperBoundBy(RangeType& Range, const ValueType& Value, ProjectionType Projection, SortPredicateType SortPredicate) + { + return AlgoImpl::UpperBoundInternal(GetData(Range), GetNum(Range), Value, Projection, SortPredicate); + } + template + FORCEINLINE int32 UpperBoundBy(RangeType& Range, const ValueType& Value, ProjectionType Projection) + { + return AlgoImpl::UpperBoundInternal(GetData(Range), GetNum(Range), Value, Projection); + } + + /** + * Returns index to the first found element matching a value in a range, the range must be sorted by < + * + * @param Range The range to search, must be already sorted by SortPredicate + * @param Value The value to search for + * @param SortPredicate Predicate for sort comparison, defaults to < + * @return Index of found element, or INDEX_NONE + */ + template + FORCEINLINE int32 BinarySearch(RangeType& Range, const ValueType& Value, SortPredicateType SortPredicate) + { + SIZE_T CheckIndex = LowerBound(Range, Value, SortPredicate); + if (CheckIndex < GetNum(Range)) + { + auto&& CheckValue = GetData(Range)[CheckIndex]; + // Since we returned lower bound we already know Value <= CheckValue. So if Value is not < CheckValue, they must be equal + if (!SortPredicate(Value, CheckValue)) + { + return CheckIndex; + } + } + return INDEX_NONE; + } + template + FORCEINLINE int32 BinarySearch(RangeType& Range, const ValueType& Value) + { + return BinarySearch(Range, Value, TLess<>()); + } + + /** + * Returns index to the first found element with projected value matching Value in a range, the range must be sorted by predicate + * + * @param Range The range to search, must be already sorted by SortPredicate + * @param Value The value to search for + * @param Projection Functor or data member pointer, called via Invoke to compare to Value + * @param SortPredicate Predicate for sort comparison, defaults to < + * @return Index of found element, or INDEX_NONE + */ + template + FORCEINLINE int32 BinarySearchBy(RangeType& Range, const ValueType& Value, ProjectionType Projection, SortPredicateType SortPredicate) + { + SIZE_T CheckIndex = LowerBoundBy(Range, Value, Projection, SortPredicate); + if (CheckIndex < GetNum(Range)) + { + auto&& CheckValue = Invoke(Projection, GetData(Range)[CheckIndex]); + // Since we returned lower bound we already know Value <= CheckValue. So if Value is not < CheckValue, they must be equal + if (!SortPredicate(Value, CheckValue)) + { + return CheckIndex; + } + } + return INDEX_NONE; + } + template + FORCEINLINE int32 BinarySearchBy(RangeType& Range, const ValueType& Value, ProjectionType Projection) + { + return BinarySearchBy(Range, Value, Projection, TLess<>()); + } +} diff --git a/version/Core/Public/API/UE/Containers/Algo/Impl/BinaryHeap.h b/version/Core/Public/API/UE/Containers/Algo/Impl/BinaryHeap.h new file mode 100644 index 0000000..152eec5 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Algo/Impl/BinaryHeap.h @@ -0,0 +1,144 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../../../Templates/Invoke.h" +#include "../../../Templates/ReversePredicate.h" + +namespace AlgoImpl +{ + /** + * Gets the index of the left child of node at Index. + * + * @param Index Node for which the left child index is to be returned. + * @returns Index of the left child. + */ + FORCEINLINE int32 HeapGetLeftChildIndex(int32 Index) + { + return Index * 2 + 1; + } + + /** + * Checks if node located at Index is a leaf or not. + * + * @param Index Node index. + * @returns true if node is a leaf, false otherwise. + */ + FORCEINLINE bool HeapIsLeaf(int32 Index, int32 Count) + { + return HeapGetLeftChildIndex(Index) >= Count; + } + + /** + * Gets the parent index for node at Index. + * + * @param Index node index. + * @returns Parent index. + */ + FORCEINLINE int32 HeapGetParentIndex(int32 Index) + { + return (Index - 1) / 2; + } + + /** + * Fixes a possible violation of order property between node at Index and a child. + * + * @param Heap Pointer to the first element of a binary heap. + * @param Index Node index. + * @param Count Size of the heap. + * @param Projection The projection to apply to the elements. + * @param Predicate A binary predicate object used to specify if one element should precede another. + */ + template + FORCEINLINE void HeapSiftDown(RangeValueType* Heap, int32 Index, const int32 Count, const ProjectionType& Projection, const PredicateType& Predicate) + { + while (!HeapIsLeaf(Index, Count)) + { + const int32 LeftChildIndex = HeapGetLeftChildIndex(Index); + const int32 RightChildIndex = LeftChildIndex + 1; + + int32 MinChildIndex = LeftChildIndex; + if (RightChildIndex < Count) + { + MinChildIndex = Predicate( Invoke(Projection, Heap[LeftChildIndex]), Invoke(Projection, Heap[RightChildIndex]) ) ? LeftChildIndex : RightChildIndex; + } + + if (!Predicate( Invoke(Projection, Heap[MinChildIndex]), Invoke(Projection, Heap[Index]) )) + { + break; + } + + Swap(Heap[Index], Heap[MinChildIndex]); + Index = MinChildIndex; + } + } + + /** + * Fixes a possible violation of order property between node at NodeIndex and a parent. + * + * @param Heap Pointer to the first element of a binary heap. + * @param RootIndex How far to go up? + * @param NodeIndex Node index. + * @param Projection The projection to apply to the elements. + * @param Predicate A binary predicate object used to specify if one element should precede another. + * + * @return The new index of the node that was at NodeIndex + */ + template + FORCEINLINE int32 HeapSiftUp(RangeValueType* Heap, int32 RootIndex, int32 NodeIndex, const ProjectionType& Projection, const PredicateType& Predicate) + { + while (NodeIndex > RootIndex) + { + int32 ParentIndex = HeapGetParentIndex(NodeIndex); + if (!Predicate( Invoke(Projection, Heap[NodeIndex]), Invoke(Projection, Heap[ParentIndex]) )) + { + break; + } + + Swap(Heap[NodeIndex], Heap[ParentIndex]); + NodeIndex = ParentIndex; + } + + return NodeIndex; + } + + /** + * Builds an implicit min-heap from a range of elements. + * This is the internal function used by Heapify overrides. + * + * @param First pointer to the first element to heapify + * @param Num the number of items to heapify + * @param Projection The projection to apply to the elements. + * @param Predicate A binary predicate object used to specify if one element should precede another. + */ + template + FORCEINLINE void HeapifyInternal(RangeValueType* First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) + { + for (int32 Index = HeapGetParentIndex(Num - 1); Index >= 0; Index--) + { + HeapSiftDown(First, Index, Num, Projection, Predicate); + } + } + + /** + * Performs heap sort on the elements. + * This is the internal sorting function used by HeapSort overrides. + * + * @param First pointer to the first element to sort + * @param Num the number of elements to sort + * @param Predicate predicate class + */ + template + void HeapSortInternal(RangeValueType* First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) + { + TReversePredicate< PredicateType > ReversePredicateWrapper(Predicate); // Reverse the predicate to build a max-heap instead of a min-heap + HeapifyInternal(First, Num, Projection, ReversePredicateWrapper); + + for(int32 Index = Num - 1; Index > 0; Index--) + { + Swap(First[0], First[Index]); + + HeapSiftDown(First, 0, Index, Projection, ReversePredicateWrapper); + } + } +} diff --git a/version/Core/Public/API/UE/Containers/Algo/IntroSort.h b/version/Core/Public/API/UE/Containers/Algo/IntroSort.h new file mode 100644 index 0000000..21cad78 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Algo/IntroSort.h @@ -0,0 +1,178 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "Impl/BinaryHeap.h" +#include "../../Math/UnrealMathUtility.h" +#include "../../Templates/IdentityFunctor.h" +#include "../../Templates/Invoke.h" +#include "../../Templates/Less.h" +#include "../../Templates/UnrealTemplate.h" // For GetData, GetNum + + +namespace AlgoImpl +{ + /** + * Implementation of an introspective sort. Starts with quick sort and switches to heap sort when the iteration depth is too big. + * The sort is unstable, meaning that the ordering of equal items is not necessarily preserved. + * This is the internal sorting function used by IntroSort overrides. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Projection The projection to sort by when applied to the element. + * @param Predicate predicate class + */ + template + void IntroSortInternal(T* First, SIZE_T Num, ProjectionType Projection, PredicateType Predicate) + { + struct FStack + { + T* Min; + T* Max; + uint32 MaxDepth; + }; + + if( Num < 2 ) + { + return; + } + + FStack RecursionStack[32]={{First, First+Num-1, (uint32)(FMath::Loge(Num) * 2.f)}}, Current, Inner; + for( FStack* StackTop=RecursionStack; StackTop>=RecursionStack; --StackTop ) //-V625 + { + Current = *StackTop; + + Loop: + PTRINT Count = Current.Max - Current.Min + 1; + + if ( Current.MaxDepth == 0 ) + { + // We're too deep into quick sort, switch to heap sort + HeapSortInternal( Current.Min, Count, Projection, Predicate ); + continue; + } + + if( Count <= 8 ) + { + // Use simple bubble-sort. + while( Current.Max > Current.Min ) + { + T *Max, *Item; + for( Max=Current.Min, Item=Current.Min+1; Item<=Current.Max; Item++ ) + { + if( Predicate( Invoke( Projection, *Max ), Invoke( Projection, *Item ) ) ) + { + Max = Item; + } + } + Swap( *Max, *Current.Max-- ); + } + } + else + { + // Grab middle element so sort doesn't exhibit worst-cast behavior with presorted lists. + Swap( Current.Min[Count/2], Current.Min[0] ); + + // Divide list into two halves, one with items <=Current.Min, the other with items >Current.Max. + Inner.Min = Current.Min; + Inner.Max = Current.Max+1; + for( ; ; ) + { + while( ++Inner.Min<=Current.Max && !Predicate( Invoke( Projection, *Current.Min ), Invoke( Projection, *Inner.Min ) ) ); + while( --Inner.Max> Current.Min && !Predicate( Invoke( Projection, *Inner.Max ), Invoke( Projection, *Current.Min ) ) ); + if( Inner.Min>Inner.Max ) + { + break; + } + Swap( *Inner.Min, *Inner.Max ); + } + Swap( *Current.Min, *Inner.Max ); + + --Current.MaxDepth; + + // Save big half and recurse with small half. + if( Inner.Max-1-Current.Min >= Current.Max-Inner.Min ) + { + if( Current.Min+1 < Inner.Max ) + { + StackTop->Min = Current.Min; + StackTop->Max = Inner.Max - 1; + StackTop->MaxDepth = Current.MaxDepth; + StackTop++; + } + if( Current.Max>Inner.Min ) + { + Current.Min = Inner.Min; + goto Loop; + } + } + else + { + if( Current.Max>Inner.Min ) + { + StackTop->Min = Inner .Min; + StackTop->Max = Current.Max; + StackTop->MaxDepth = Current.MaxDepth; + StackTop++; + } + if( Current.Min+1 + FORCEINLINE void IntroSort(RangeType& Range) + { + AlgoImpl::IntroSortInternal(GetData(Range), GetNum(Range), FIdentityFunctor(), TLess<>()); + } + + /** + * Sort a range of elements using a user-defined predicate class. The sort is unstable. + * + * @param Range The range to sort. + * @param Predicate A binary predicate object used to specify if one element should precede another. + */ + template + FORCEINLINE void IntroSort(RangeType& Range, PredicateType Predicate) + { + AlgoImpl::IntroSortInternal(GetData(Range), GetNum(Range), FIdentityFunctor(), MoveTemp(Predicate)); + } + + /** + * Sort a range of elements by a projection using the projection's operator<. The sort is unstable. + * + * @param Range The range to sort. + * @param Projection The projection to sort by when applied to the element. + */ + template + FORCEINLINE void IntroSortBy(RangeType& Range, ProjectionType Projection) + { + AlgoImpl::IntroSortInternal(GetData(Range), GetNum(Range), MoveTemp(Projection), TLess<>()); + } + + /** + * Sort a range of elements by a projection using a user-defined predicate class. The sort is unstable. + * + * @param Range The range to sort. + * @param Projection The projection to sort by when applied to the element. + * @param Predicate A binary predicate object, applied to the projection, used to specify if one element should precede another. + */ + template + FORCEINLINE void IntroSortBy(RangeType& Range, ProjectionType Projection, PredicateType Predicate) + { + AlgoImpl::IntroSortInternal(GetData(Range), GetNum(Range), MoveTemp(Projection), MoveTemp(Predicate)); + } +} diff --git a/version/Core/Public/API/UE/Containers/Algo/Reverse.h b/version/Core/Public/API/UE/Containers/Algo/Reverse.h new file mode 100644 index 0000000..387aa40 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Algo/Reverse.h @@ -0,0 +1,54 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../../BasicTypes.h" + +namespace AlgoImpl +{ + template + FORCEINLINE void Reverse(T* Array, int32 ArraySize) + { + for (int32 i = 0, i2 = ArraySize - 1; i < ArraySize / 2 /*rounding down*/; ++i, --i2) + { + Swap(Array[i], Array[i2]); + } + } +} + +namespace Algo +{ + /** + * Reverses a range + * + * @param Array The array to reverse. + */ + template + FORCEINLINE void Reverse(T (&Array)[ArraySize]) + { + return AlgoImpl::Reverse((T*)Array, ArraySize); + } + + /** + * Reverses a range + * + * @param Array A pointer to the array to reverse + * @param ArraySize The number of elements in the array. + */ + template + FORCEINLINE void Reverse(T* Array, int32 ArraySize) + { + return AlgoImpl::Reverse(Array, ArraySize); + } + + /** + * Reverses a range + * + * @param Container The container to reverse + */ + template + FORCEINLINE void Reverse(ContainerType& Container) + { + return AlgoImpl::Reverse(Container.GetData(), Container.Num()); + } +} diff --git a/version/Core/Public/API/UE/Containers/Algo/Sort.h b/version/Core/Public/API/UE/Containers/Algo/Sort.h new file mode 100644 index 0000000..2d9535c --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Algo/Sort.h @@ -0,0 +1,57 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "IntroSort.h" + + +namespace Algo +{ + /** + * Sort a range of elements using its operator<. The sort is unstable. + * + * @param Range The range to sort. + */ + template + FORCEINLINE void Sort(RangeType& Range) + { + IntroSort(Range); + } + + /** + * Sort a range of elements using a user-defined predicate class. The sort is unstable. + * + * @param Range The range to sort. + * @param Predicate A binary predicate object used to specify if one element should precede another. + */ + template + FORCEINLINE void Sort(RangeType& Range, PredicateType Pred) + { + IntroSort(Range, MoveTemp(Pred)); + } + + /** + * Sort a range of elements by a projection using the projection's operator<. The sort is unstable. + * + * @param Range The range to sort. + * @param Proj The projection to sort by when applied to the element. + */ + template + FORCEINLINE void SortBy(RangeType& Range, ProjectionType Proj) + { + IntroSortBy(Range, MoveTemp(Proj)); + } + + /** + * Sort a range of elements by a projection using a user-defined predicate class. The sort is unstable. + * + * @param Range The range to sort. + * @param Proj The projection to sort by when applied to the element. + * @param Predicate A binary predicate object, applied to the projection, used to specify if one element should precede another. + */ + template + FORCEINLINE void SortBy(RangeType& Range, ProjectionType Proj, PredicateType Pred) + { + IntroSortBy(Range, MoveTemp(Proj), MoveTemp(Pred)); + } +} diff --git a/version/Core/Public/API/UE/Containers/BitArray.h b/version/Core/Public/API/UE/Containers/BitArray.h new file mode 100644 index 0000000..6b6e310 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/BitArray.h @@ -0,0 +1,1093 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "../Templates/UnrealTypeTraits.h" +#include "../Templates/UnrealTemplate.h" +#include "ContainerAllocationPolicies.h" +#include "../Math/UnrealMathUtility.h" + +template class TBitArray; + +// Functions for manipulating bit sets. +struct FBitSet +{ + /** Clears the next set bit in the mask and returns its index. */ + static FORCEINLINE uint32 GetAndClearNextBit(uint32& Mask) + { + const uint32 LowestBitMask = (Mask) & (-(int32)Mask); + const uint32 BitIndex = FMath::FloorLog2(LowestBitMask); + Mask ^= LowestBitMask; + return BitIndex; + } +}; + + +// Forward declaration. +template +class TBitArray; + +template +class TConstSetBitIterator; + +template +class TConstDualSetBitIterator; + +class FScriptBitArray; + +/** Used to read/write a bit in the array as a bool. */ +class FBitReference +{ +public: + + FORCEINLINE FBitReference(uint32& InData,uint32 InMask) + : Data(InData) + , Mask(InMask) + {} + + FORCEINLINE operator bool() const + { + return (Data & Mask) != 0; + } + FORCEINLINE void operator=(const bool NewValue) + { + if(NewValue) + { + Data |= Mask; + } + else + { + Data &= ~Mask; + } + } + /*FORCEINLINE void AtomicSet(const bool NewValue) + { + if(NewValue) + { + if (!(Data & Mask)) + { + while (1) + { + uint32 Current = Data; + uint32 Desired = Current | Mask; + if (Current == Desired || FPlatformAtomics::InterlockedCompareExchange((volatile int32*)&Data, (int32)Desired, (int32)Current) == (int32)Current) + { + return; + } + } + } + } + else + { + if (Data & Mask) + { + while (1) + { + uint32 Current = Data; + uint32 Desired = Current & ~Mask; + if (Current == Desired || FPlatformAtomics::InterlockedCompareExchange((volatile int32*)&Data, (int32)Desired, (int32)Current) == (int32)Current) + { + return; + } + } + } + } + }*/ + FORCEINLINE FBitReference& operator=(const FBitReference& Copy) + { + // As this is emulating a reference, assignment should not rebind, + // it should write to the referenced bit. + *this = (bool)Copy; + return *this; + } + +private: + uint32& Data; + uint32 Mask; +}; + + +/** Used to read a bit in the array as a bool. */ +class FConstBitReference +{ +public: + + FORCEINLINE FConstBitReference(const uint32& InData,uint32 InMask) + : Data(InData) + , Mask(InMask) + {} + + FORCEINLINE operator bool() const + { + return (Data & Mask) != 0; + } + +private: + const uint32& Data; + uint32 Mask; +}; + + +/** Used to reference a bit in an unspecified bit array. */ +class FRelativeBitReference +{ +public: + FORCEINLINE explicit FRelativeBitReference(int32 BitIndex) + : DWORDIndex(BitIndex >> NumBitsPerDWORDLogTwo) + , Mask(1 << (BitIndex & (NumBitsPerDWORD - 1))) + { + } + + int32 DWORDIndex; + uint32 Mask; +}; + + +/** + * A dynamically sized bit array. + * An array of Booleans. They stored in one bit/Boolean. There are iterators that efficiently iterate over only set bits. + */ +template +class TBitArray +{ + friend class FScriptBitArray; + +public: + + template + friend class TConstSetBitIterator; + + template + friend class TConstDualSetBitIterator; + + /** + * Minimal initialization constructor. + * @param Value - The value to initial the bits to. + * @param InNumBits - The initial number of bits in the array. + */ + explicit TBitArray( const bool Value = false, const int32 InNumBits = 0 ) + : NumBits(0) + , MaxBits(0) + { + Init(Value,InNumBits); + } + + /** + * Move constructor. + */ + FORCEINLINE TBitArray(TBitArray&& Other) + { + MoveOrCopy(*this, Other); + } + + /** + * Copy constructor. + */ + FORCEINLINE TBitArray(const TBitArray& Copy) + : NumBits(0) + , MaxBits(0) + { + *this = Copy; + } + + /** + * Move assignment. + */ + FORCEINLINE TBitArray& operator=(TBitArray&& Other) + { + if (this != &Other) + { + MoveOrCopy(*this, Other); + } + + return *this; + } + + /** + * Assignment operator. + */ + FORCEINLINE TBitArray& operator=(const TBitArray& Copy) + { + // check for self assignment since we don't use swap() mechanic + if( this == &Copy ) + { + return *this; + } + + Empty(Copy.Num()); + NumBits = MaxBits = Copy.NumBits; + if(NumBits) + { + const int32 NumDWORDs = FMath::DivideAndRoundUp(MaxBits, NumBitsPerDWORD); + Realloc(0); + FMemory::Memcpy(GetData(),Copy.GetData(),NumDWORDs * sizeof(uint32)); + } + return *this; + } + +private: + template + static FORCEINLINE typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(BitArrayType& ToArray, BitArrayType& FromArray) + { + ToArray.AllocatorInstance.MoveToEmpty(FromArray.AllocatorInstance); + + ToArray .NumBits = FromArray.NumBits; + ToArray .MaxBits = FromArray.MaxBits; + FromArray.NumBits = 0; + FromArray.MaxBits = 0; + } + + template + static FORCEINLINE typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(BitArrayType& ToArray, BitArrayType& FromArray) + { + ToArray = FromArray; + } + +public: + + /** + * Adds a bit to the array with the given value. + * @return The index of the added bit. + */ + int32 Add(const bool Value) + { + const int32 Index = NumBits; + const bool bReallocate = (NumBits + 1) > MaxBits; + + NumBits++; + + if(bReallocate) + { + // Allocate memory for the new bits. + const uint32 MaxDWORDs = AllocatorInstance.CalculateSlackGrow( + FMath::DivideAndRoundUp(NumBits, NumBitsPerDWORD), + FMath::DivideAndRoundUp(MaxBits, NumBitsPerDWORD), + sizeof(uint32) + ); + MaxBits = MaxDWORDs * NumBitsPerDWORD; + Realloc(NumBits - 1); + } + + (*this)[Index] = Value; + + return Index; + } + + /** + * Removes all bits from the array, potentially leaving space allocated for an expected number of bits about to be added. + * @param ExpectedNumBits - The expected number of bits about to be added. + */ + void Empty(int32 ExpectedNumBits = 0) + { + NumBits = 0; + + ExpectedNumBits = FMath::DivideAndRoundUp(ExpectedNumBits, NumBitsPerDWORD) * NumBitsPerDWORD; + // If the expected number of bits doesn't match the allocated number of bits, reallocate. + if(MaxBits != ExpectedNumBits) + { + MaxBits = ExpectedNumBits; + Realloc(0); + } + } + + /** + * Removes all bits from the array retaining any space already allocated. + */ + void Reset() + { + // We need this because iterators often use whole DWORDs when masking, which includes off-the-end elements + FMemory::Memset(GetData(), 0, FMath::DivideAndRoundUp(NumBits, NumBitsPerDWORD) * sizeof(uint32)); + + NumBits = 0; + } + + /** + * Resets the array's contents. + * @param Value - The value to initial the bits to. + * @param NumBits - The number of bits in the array. + */ + void Init(bool Value,int32 InNumBits) + { + Empty(InNumBits); + if(InNumBits) + { + NumBits = InNumBits; + FMemory::Memset(GetData(),Value ? 0xff : 0, FMath::DivideAndRoundUp(NumBits, NumBitsPerDWORD) * sizeof(uint32)); + } + } + + /** + * Sets or unsets a range of bits within the array. + * @param Index The index of the first bit to set. + * @param Num The number of bits to set. + * @param Value The value to set the bits to. + */ + FORCENOINLINE void SetRange(int32 Index, int32 Num, bool Value) + { + check(Index >= 0 && Num >= 0 && Index + Num <= NumBits); + + if (Num == 0) + { + return; + } + + // Work out which uint32 index to set from, and how many + uint32 StartIndex = Index / 32; + uint32 Count = (Index + Num + 31) / 32 - StartIndex; + + // Work out masks for the start/end of the sequence + uint32 StartMask = 0xFFFFFFFFu << (Index % 32); + uint32 EndMask = 0xFFFFFFFFu >> (32 - (Index + Num) % 32) % 32; + + uint32* Data = GetData() + StartIndex; + if (Value) + { + if (Count == 1) + { + *Data |= StartMask & EndMask; + } + else + { + *Data++ |= StartMask; + Count -= 2; + while (Count != 0) + { + *Data++ = ~0; + --Count; + } + *Data |= EndMask; + } + } + else + { + if (Count == 1) + { + *Data &= ~(StartMask & EndMask); + } + else + { + *Data++ &= ~StartMask; + Count -= 2; + while (Count != 0) + { + *Data++ = 0; + --Count; + } + *Data &= ~EndMask; + } + } + } + + /** + * Removes bits from the array. + * @param BaseIndex - The index of the first bit to remove. + * @param NumBitsToRemove - The number of consecutive bits to remove. + */ + void RemoveAt(int32 BaseIndex,int32 NumBitsToRemove = 1) + { + check(BaseIndex >= 0 && NumBitsToRemove >= 0 && BaseIndex + NumBitsToRemove <= NumBits); + + if (BaseIndex + NumBitsToRemove != NumBits) + { + // Until otherwise necessary, this is an obviously correct implementation rather than an efficient implementation. + FIterator WriteIt(*this); + for(FConstIterator ReadIt(*this);ReadIt;++ReadIt) + { + // If this bit isn't being removed, write it back to the array at its potentially new index. + if(ReadIt.GetIndex() < BaseIndex || ReadIt.GetIndex() >= BaseIndex + NumBitsToRemove) + { + if(WriteIt.GetIndex() != ReadIt.GetIndex()) + { + WriteIt.GetValue() = (bool)ReadIt.GetValue(); + } + ++WriteIt; + } + } + } + NumBits -= NumBitsToRemove; + } + + /* Removes bits from the array by swapping them with bits at the end of the array. + * This is mainly implemented so that other code using TArray::RemoveSwap will have + * matching indices. + * @param BaseIndex - The index of the first bit to remove. + * @param NumBitsToRemove - The number of consecutive bits to remove. + */ + void RemoveAtSwap( int32 BaseIndex, int32 NumBitsToRemove=1 ) + { + check(BaseIndex >= 0 && NumBitsToRemove >= 0 && BaseIndex + NumBitsToRemove <= NumBits); + if( BaseIndex < NumBits - NumBitsToRemove ) + { + // Copy bits from the end to the region we are removing + for( int32 Index=0;Index= 0 && InIndex < NumBits; + } + + FORCEINLINE int32 Num() const { return NumBits; } + FORCEINLINE FBitReference operator[](int32 Index) + { + check(Index>=0 && Index=0 && Index= 0); + checkSlow(((uint32)RelativeReference.DWORDIndex + 1) * NumBitsPerDWORD - 1 - FMath::CountLeadingZeros(RelativeReference.Mask) < (uint32)NumBits); + return FBitReference( + GetData()[RelativeReference.DWORDIndex], + RelativeReference.Mask + ); + } + FORCEINLINE const FConstBitReference AccessCorrespondingBit(const FRelativeBitReference& RelativeReference) const + { + checkSlow(RelativeReference.Mask); + checkSlow(RelativeReference.DWORDIndex >= 0); + checkSlow(((uint32)RelativeReference.DWORDIndex + 1) * NumBitsPerDWORD - 1 - FMath::CountLeadingZeros(RelativeReference.Mask) < (uint32)NumBits); + return FConstBitReference( + GetData()[RelativeReference.DWORDIndex], + RelativeReference.Mask + ); + } + + /** BitArray iterator. */ + class FIterator : public FRelativeBitReference + { + public: + FORCEINLINE FIterator(TBitArray& InArray,int32 StartIndex = 0) + : FRelativeBitReference(StartIndex) + , Array(InArray) + , Index(StartIndex) + { + } + FORCEINLINE FIterator& operator++() + { + ++Index; + this->Mask <<= 1; + if(!this->Mask) + { + // Advance to the next uint32. + this->Mask = 1; + ++this->DWORDIndex; + } + return *this; + } + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return Index < Array.Num(); + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE FBitReference GetValue() const { return FBitReference(Array.GetData()[this->DWORDIndex],this->Mask); } + FORCEINLINE int32 GetIndex() const { return Index; } + private: + TBitArray& Array; + int32 Index; + }; + + /** Const BitArray iterator. */ + class FConstIterator : public FRelativeBitReference + { + public: + FORCEINLINE FConstIterator(const TBitArray& InArray,int32 StartIndex = 0) + : FRelativeBitReference(StartIndex) + , Array(InArray) + , Index(StartIndex) + { + } + FORCEINLINE FConstIterator& operator++() + { + ++Index; + this->Mask <<= 1; + if(!this->Mask) + { + // Advance to the next uint32. + this->Mask = 1; + ++this->DWORDIndex; + } + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return Index < Array.Num(); + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE FConstBitReference GetValue() const { return FConstBitReference(Array.GetData()[this->DWORDIndex],this->Mask); } + FORCEINLINE int32 GetIndex() const { return Index; } + private: + const TBitArray& Array; + int32 Index; + }; + + /** Const reverse iterator. */ + class FConstReverseIterator : public FRelativeBitReference + { + public: + FORCEINLINE FConstReverseIterator(const TBitArray& InArray) + : FRelativeBitReference(InArray.Num() - 1) + , Array(InArray) + , Index(InArray.Num() - 1) + { + } + FORCEINLINE FConstReverseIterator& operator++() + { + --Index; + this->Mask >>= 1; + if(!this->Mask) + { + // Advance to the next uint32. + this->Mask = (1 << (NumBitsPerDWORD-1)); + --this->DWORDIndex; + } + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return Index >= 0; + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE FConstBitReference GetValue() const { return FConstBitReference(Array.GetData()[this->DWORDIndex],this->Mask); } + FORCEINLINE int32 GetIndex() const { return Index; } + private: + const TBitArray& Array; + int32 Index; + }; + + FORCEINLINE const uint32* GetData() const + { + return (uint32*)AllocatorInstance.GetAllocation(); + } + + FORCEINLINE uint32* GetData() + { + return (uint32*)AllocatorInstance.GetAllocation(); + } + +private: + typedef typename Allocator::template ForElementType AllocatorType; + + AllocatorType AllocatorInstance; + int32 NumBits; + int32 MaxBits; + + FORCENOINLINE void Realloc(int32 PreviousNumBits) + { + const int32 PreviousNumDWORDs = FMath::DivideAndRoundUp(PreviousNumBits, NumBitsPerDWORD); + const int32 MaxDWORDs = FMath::DivideAndRoundUp(MaxBits, NumBitsPerDWORD); + + AllocatorInstance.ResizeAllocation(PreviousNumDWORDs,MaxDWORDs,sizeof(uint32)); + + if(MaxDWORDs) + { + // Reset the newly allocated slack DWORDs. + FMemory::Memzero((uint32*)AllocatorInstance.GetAllocation() + PreviousNumDWORDs,(MaxDWORDs - PreviousNumDWORDs) * sizeof(uint32)); + } + } +}; + + +template +struct TContainerTraits > : public TContainerTraitsBase > +{ + enum { MoveWillEmptyContainer = TAllocatorTraits::SupportsMove }; +}; + + +/** An iterator which only iterates over set bits. */ +template +class TConstSetBitIterator : public FRelativeBitReference +{ +public: + + /** Constructor. */ + TConstSetBitIterator(const TBitArray& InArray,int32 StartIndex = 0) + : FRelativeBitReference(StartIndex) + , Array (InArray) + , UnvisitedBitMask ((~0U) << (StartIndex & (NumBitsPerDWORD - 1))) + , CurrentBitIndex (StartIndex) + , BaseBitIndex (StartIndex & ~(NumBitsPerDWORD - 1)) + { + check(StartIndex >= 0 && StartIndex <= Array.Num()); + if (StartIndex != Array.Num()) + { + FindFirstSetBit(); + } + } + + /** Forwards iteration operator. */ + FORCEINLINE TConstSetBitIterator& operator++() + { + // Mark the current bit as visited. + UnvisitedBitMask &= ~this->Mask; + + // Find the first set bit that hasn't been visited yet. + FindFirstSetBit(); + + return *this; + } + + FORCEINLINE friend bool operator==(const TConstSetBitIterator& Lhs, const TConstSetBitIterator& Rhs) + { + // We only need to compare the bit index and the array... all the rest of the state is unobservable. + return Lhs.CurrentBitIndex == Rhs.CurrentBitIndex && &Lhs.Array == &Rhs.Array; + } + + FORCEINLINE friend bool operator!=(const TConstSetBitIterator& Lhs, const TConstSetBitIterator& Rhs) + { + return !(Lhs == Rhs); + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return CurrentBitIndex < Array.Num(); + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + /** Index accessor. */ + FORCEINLINE int32 GetIndex() const + { + return CurrentBitIndex; + } + +private: + + const TBitArray& Array; + + uint32 UnvisitedBitMask; + int32 CurrentBitIndex; + int32 BaseBitIndex; + + /** Find the first set bit starting with the current bit, inclusive. */ + void FindFirstSetBit() + { + const uint32* ArrayData = Array.GetData(); + const int32 ArrayNum = Array.Num(); + const int32 LastDWORDIndex = (ArrayNum - 1) / NumBitsPerDWORD; + + // Advance to the next non-zero uint32. + uint32 RemainingBitMask = ArrayData[this->DWORDIndex] & UnvisitedBitMask; + while (!RemainingBitMask) + { + ++this->DWORDIndex; + BaseBitIndex += NumBitsPerDWORD; + if (this->DWORDIndex > LastDWORDIndex) + { + // We've advanced past the end of the array. + CurrentBitIndex = ArrayNum; + return; + } + + RemainingBitMask = ArrayData[this->DWORDIndex]; + UnvisitedBitMask = ~0; + } + + // This operation has the effect of unsetting the lowest set bit of BitMask + const uint32 NewRemainingBitMask = RemainingBitMask & (RemainingBitMask - 1); + + // This operation XORs the above mask with the original mask, which has the effect + // of returning only the bits which differ; specifically, the lowest bit + this->Mask = NewRemainingBitMask ^ RemainingBitMask; + + // If the Nth bit was the lowest set bit of BitMask, then this gives us N + CurrentBitIndex = BaseBitIndex + NumBitsPerDWORD - 1 - FMath::CountLeadingZeros(this->Mask); + + // If we've accidentally iterated off the end of an array but still within the same DWORD + // then set the index to the last index of the array + if (CurrentBitIndex > ArrayNum) + { + CurrentBitIndex = ArrayNum; + } + } +}; + + +/** An iterator which only iterates over the bits which are set in both of two bit-arrays. */ +template +class TConstDualSetBitIterator : public FRelativeBitReference +{ +public: + + /** Constructor. */ + FORCEINLINE TConstDualSetBitIterator( + const TBitArray& InArrayA, + const TBitArray& InArrayB, + int32 StartIndex = 0 + ) + : FRelativeBitReference(StartIndex) + , ArrayA(InArrayA) + , ArrayB(InArrayB) + , UnvisitedBitMask((~0U) << (StartIndex & (NumBitsPerDWORD - 1))) + , CurrentBitIndex(StartIndex) + , BaseBitIndex(StartIndex & ~(NumBitsPerDWORD - 1)) + { + check(ArrayA.Num() == ArrayB.Num()); + + FindFirstSetBit(); + } + + /** Advancement operator. */ + FORCEINLINE TConstDualSetBitIterator& operator++() + { + checkSlow(ArrayA.Num() == ArrayB.Num()); + + // Mark the current bit as visited. + UnvisitedBitMask &= ~this->Mask; + + // Find the first set bit that hasn't been visited yet. + FindFirstSetBit(); + + return *this; + + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return CurrentBitIndex < ArrayA.Num(); + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + /** Index accessor. */ + FORCEINLINE int32 GetIndex() const + { + return CurrentBitIndex; + } + +private: + + const TBitArray& ArrayA; + const TBitArray& ArrayB; + + uint32 UnvisitedBitMask; + int32 CurrentBitIndex; + int32 BaseBitIndex; + + /** Find the first bit that is set in both arrays, starting with the current bit, inclusive. */ + void FindFirstSetBit() + { + static const uint32 EmptyArrayData = 0; + const uint32* ArrayDataA = IfAThenAElseB(ArrayA.GetData(),&EmptyArrayData); + const uint32* ArrayDataB = IfAThenAElseB(ArrayB.GetData(),&EmptyArrayData); + + // Advance to the next non-zero uint32. + uint32 RemainingBitMask = ArrayDataA[this->DWORDIndex] & ArrayDataB[this->DWORDIndex] & UnvisitedBitMask; + while(!RemainingBitMask) + { + this->DWORDIndex++; + BaseBitIndex += NumBitsPerDWORD; + const int32 LastDWORDIndex = (ArrayA.Num() - 1) / NumBitsPerDWORD; + if(this->DWORDIndex <= LastDWORDIndex) + { + RemainingBitMask = ArrayDataA[this->DWORDIndex] & ArrayDataB[this->DWORDIndex]; + UnvisitedBitMask = ~0; + } + else + { + // We've advanced past the end of the array. + CurrentBitIndex = ArrayA.Num(); + return; + } + }; + + // We can assume that RemainingBitMask!=0 here. + checkSlow(RemainingBitMask); + + // This operation has the effect of unsetting the lowest set bit of BitMask + const uint32 NewRemainingBitMask = RemainingBitMask & (RemainingBitMask - 1); + + // This operation XORs the above mask with the original mask, which has the effect + // of returning only the bits which differ; specifically, the lowest bit + this->Mask = NewRemainingBitMask ^ RemainingBitMask; + + // If the Nth bit was the lowest set bit of BitMask, then this gives us N + CurrentBitIndex = BaseBitIndex + NumBitsPerDWORD - 1 - FMath::CountLeadingZeros(this->Mask); + } +}; + + +// Untyped bit array type for accessing TBitArray data, like FScriptArray for TArray. +// Must have the same memory representation as a TBitArray. +class FScriptBitArray +{ +public: + /** + * Minimal initialization constructor. + * @param Value - The value to initial the bits to. + * @param InNumBits - The initial number of bits in the array. + */ + FScriptBitArray() + : NumBits(0) + , MaxBits(0) + { + } + + bool IsValidIndex(int32 Index) const + { + return Index >= 0 && Index < NumBits; + } + + FBitReference operator[](int32 Index) + { + check(IsValidIndex(Index)); + return FBitReference(GetData()[Index / NumBitsPerDWORD], 1 << (Index & (NumBitsPerDWORD - 1))); + } + + FConstBitReference operator[](int32 Index) const + { + check(IsValidIndex(Index)); + return FConstBitReference(GetData()[Index / NumBitsPerDWORD], 1 << (Index & (NumBitsPerDWORD - 1))); + } + + void Empty(int32 Slack = 0) + { + NumBits = 0; + + Slack = FMath::DivideAndRoundUp(Slack, NumBitsPerDWORD) * NumBitsPerDWORD; + // If the expected number of bits doesn't match the allocated number of bits, reallocate. + if (MaxBits != Slack) + { + MaxBits = Slack; + Realloc(0); + } + } + + int32 Add(const bool Value) + { + const int32 Index = NumBits; + NumBits++; + if (NumBits > MaxBits) + { + ReallocGrow(NumBits - 1); + } + (*this)[Index] = Value; + return Index; + } + +private: + typedef FDefaultBitArrayAllocator::ForElementType AllocatorType; + + AllocatorType AllocatorInstance; + int32 NumBits; + int32 MaxBits; + + // This function isn't intended to be called, just to be compiled to validate the correctness of the type. + static void CheckConstraints() + { + typedef FScriptBitArray ScriptType; + typedef TBitArray<> RealType; + + // Check that the class footprint is the same + static_assert(sizeof (ScriptType) == sizeof (RealType), "FScriptBitArray's size doesn't match TBitArray"); + static_assert(alignof(ScriptType) == alignof(RealType), "FScriptBitArray's alignment doesn't match TBitArray"); + + // Check member sizes + static_assert(sizeof(DeclVal().AllocatorInstance) == sizeof(DeclVal().AllocatorInstance), "FScriptBitArray's AllocatorInstance member size does not match TBitArray's"); + static_assert(sizeof(DeclVal().NumBits) == sizeof(DeclVal().NumBits), "FScriptBitArray's NumBits member size does not match TBitArray's"); + static_assert(sizeof(DeclVal().MaxBits) == sizeof(DeclVal().MaxBits), "FScriptBitArray's MaxBits member size does not match TBitArray's"); + + // Check member offsets + static_assert(STRUCT_OFFSET(ScriptType, AllocatorInstance) == STRUCT_OFFSET(RealType, AllocatorInstance), "FScriptBitArray's AllocatorInstance member offset does not match TBitArray's"); + static_assert(STRUCT_OFFSET(ScriptType, NumBits) == STRUCT_OFFSET(RealType, NumBits), "FScriptBitArray's NumBits member offset does not match TBitArray's"); + static_assert(STRUCT_OFFSET(ScriptType, MaxBits) == STRUCT_OFFSET(RealType, MaxBits), "FScriptBitArray's MaxBits member offset does not match TBitArray's"); + } + + FORCEINLINE uint32* GetData() + { + return (uint32*)AllocatorInstance.GetAllocation(); + } + + FORCEINLINE const uint32* GetData() const + { + return (const uint32*)AllocatorInstance.GetAllocation(); + } + + FORCENOINLINE void Realloc(int32 PreviousNumBits) + { + const uint32 MaxDWORDs = AllocatorInstance.CalculateSlackReserve( + FMath::DivideAndRoundUp(MaxBits, NumBitsPerDWORD), + sizeof(uint32) + ); + MaxBits = MaxDWORDs * NumBitsPerDWORD; + const uint32 PreviousNumDWORDs = FMath::DivideAndRoundUp(PreviousNumBits, NumBitsPerDWORD); + + AllocatorInstance.ResizeAllocation(PreviousNumDWORDs, MaxDWORDs, sizeof(uint32)); + + if (MaxDWORDs && MaxDWORDs > PreviousNumDWORDs) + { + // Reset the newly allocated slack DWORDs. + FMemory::Memzero((uint32*)AllocatorInstance.GetAllocation() + PreviousNumDWORDs, (MaxDWORDs - PreviousNumDWORDs) * sizeof(uint32)); + } + } + FORCENOINLINE void ReallocGrow(int32 PreviousNumBits) + { + // Allocate memory for the new bits. + const uint32 MaxDWORDs = AllocatorInstance.CalculateSlackGrow( + FMath::DivideAndRoundUp(NumBits, NumBitsPerDWORD), + FMath::DivideAndRoundUp(MaxBits, NumBitsPerDWORD), + sizeof(uint32) + ); + MaxBits = MaxDWORDs * NumBitsPerDWORD; + const uint32 PreviousNumDWORDs = FMath::DivideAndRoundUp(PreviousNumBits, NumBitsPerDWORD); + AllocatorInstance.ResizeAllocation(PreviousNumDWORDs, MaxDWORDs, sizeof(uint32)); + if (MaxDWORDs && MaxDWORDs > PreviousNumDWORDs) + { + // Reset the newly allocated slack DWORDs. + FMemory::Memzero((uint32*)AllocatorInstance.GetAllocation() + PreviousNumDWORDs, (MaxDWORDs - PreviousNumDWORDs) * sizeof(uint32)); + } + } + +public: + // These should really be private, because they shouldn't be called, but there's a bunch of code + // that needs to be fixed first. + FScriptBitArray(const FScriptBitArray&) { check(false); } + void operator=(const FScriptBitArray&) { check(false); } +}; + +template <> +struct TIsZeroConstructType +{ + enum { Value = true }; +}; diff --git a/version/Core/Public/API/UE/Containers/ContainerAllocationPolicies.h b/version/Core/Public/API/UE/Containers/ContainerAllocationPolicies.h new file mode 100644 index 0000000..427a231 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/ContainerAllocationPolicies.h @@ -0,0 +1,803 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "../Templates/TypeCompatibleBytes.h" +#include "../GenericPlatform/GenericPlatformMath.h" +#include "../Templates/MemoryOps.h" + +class FDefaultBitArrayAllocator; + +/** branchless pointer selection +* return A ? A : B; +**/ +template +ReferencedType* IfAThenAElseB(ReferencedType* A,ReferencedType* B); + +/** branchless pointer selection based on predicate +* return PTRINT(Predicate) ? A : B; +**/ +template +ReferencedType* IfPThenAElseB(PredicateType Predicate,ReferencedType* A,ReferencedType* B); + +#pragma warning(push) +#pragma warning(disable : 4244) + +FORCEINLINE int32 DefaultCalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment = DEFAULT_ALIGNMENT) +{ + int32 Retval; + checkSlow(NumElements < NumAllocatedElements); + + // If the container has too much slack, shrink it to exactly fit the number of elements. + const uint32 CurrentSlackElements = NumAllocatedElements - NumElements; + const SIZE_T CurrentSlackBytes = (NumAllocatedElements - NumElements)*BytesPerElement; + const bool bTooManySlackBytes = CurrentSlackBytes >= 16384; + const bool bTooManySlackElements = 3 * NumElements < 2 * NumAllocatedElements; + if ((bTooManySlackBytes || bTooManySlackElements) && (CurrentSlackElements > 64 || !NumElements)) // hard coded 64 :-( + { + Retval = NumElements; + if (Retval > 0) + { + if (bAllowQuantize) + { + Retval = FMemory::QuantizeSize(Retval * BytesPerElement, Alignment) / BytesPerElement; + } + } + } + else + { + Retval = NumAllocatedElements; + } + + return Retval; +} + +FORCEINLINE int32 DefaultCalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment = DEFAULT_ALIGNMENT) +{ + int32 Retval; + checkSlow(NumElements > NumAllocatedElements && NumElements > 0); + + SIZE_T Grow = 4; // this is the amount for the first alloc + if (NumAllocatedElements || SIZE_T(NumElements) > Grow) + { + // Allocate slack for the array proportional to its size. + Grow = SIZE_T(NumElements) + 3 * SIZE_T(NumElements) / 8 + 16; + } + if (bAllowQuantize) + { + Retval = FMemory::QuantizeSize(Grow * BytesPerElement, Alignment) / BytesPerElement; + } + else + { + Retval = Grow; + } + // NumElements and MaxElements are stored in 32 bit signed integers so we must be careful not to overflow here. + if (NumElements > Retval) + { + Retval = INT_MAX; + } + + return Retval; +} + +FORCEINLINE int32 DefaultCalculateSlackReserve(int32 NumElements, SIZE_T BytesPerElement, bool bAllowQuantize, uint32 Alignment = DEFAULT_ALIGNMENT) +{ + int32 Retval = NumElements; + checkSlow(NumElements > 0); + if (bAllowQuantize) + { + Retval = FMemory::QuantizeSize(SIZE_T(Retval) * SIZE_T(BytesPerElement), Alignment) / BytesPerElement; + // NumElements and MaxElements are stored in 32 bit signed integers so we must be careful not to overflow here. + if (NumElements > Retval) + { + Retval = INT_MAX; + } + } + + return Retval; +} + +/** A type which is used to represent a script type that is unknown at compile time. */ +struct FScriptContainerElement +{ +}; + +template +struct TAllocatorTraitsBase +{ + enum { SupportsMove = false }; + enum { IsZeroConstruct = false }; +}; + +template +struct TAllocatorTraits : TAllocatorTraitsBase +{ +}; + +/** This is the allocation policy interface; it exists purely to document the policy's interface, and should not be used. */ +class FContainerAllocatorInterface +{ +public: + + /** Determines whether the user of the allocator may use the ForAnyElementType inner class. */ + enum { NeedsElementType = true }; + enum { RequireRangeCheck = true }; + + /** + * A class that receives both the explicit allocation policy template parameters specified by the user of the container, + * but also the implicit ElementType template parameter from the container type. + */ + template + class ForElementType + { + /** + * Moves the state of another allocator into this one. + * Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary). + * @param Other - The allocator to move the state from. This allocator should be left in a valid empty state. + */ + void MoveToEmpty(ForElementType& Other); + + /** Accesses the container's current data. */ + ElementType* GetAllocation() const; + + /** + * Resizes the container's allocation. + * @param PreviousNumElements - The number of elements that were stored in the previous allocation. + * @param NumElements - The number of elements to allocate space for. + * @param NumBytesPerElement - The number of bytes/element. + */ + void ResizeAllocation( + int32 PreviousNumElements, + int32 NumElements, + SIZE_T NumBytesPerElement + ); + + /** + * Calculates the amount of slack to allocate for an array that has just grown or shrunk to a given number of elements. + * @param NumElements - The number of elements to allocate space for. + * @param CurrentNumSlackElements - The current number of elements allocated. + * @param NumBytesPerElement - The number of bytes/element. + */ + int32 CalculateSlack( + int32 NumElements, + int32 CurrentNumSlackElements, + SIZE_T NumBytesPerElement + ) const; + + /** + * Calculates the amount of slack to allocate for an array that has just shrunk to a given number of elements. + * @param NumElements - The number of elements to allocate space for. + * @param CurrentNumSlackElements - The current number of elements allocated. + * @param NumBytesPerElement - The number of bytes/element. + */ + int32 CalculateSlackShrink( + int32 NumElements, + int32 CurrentNumSlackElements, + SIZE_T NumBytesPerElement + ) const; + + /** + * Calculates the amount of slack to allocate for an array that has just grown to a given number of elements. + * @param NumElements - The number of elements to allocate space for. + * @param CurrentNumSlackElements - The current number of elements allocated. + * @param NumBytesPerElement - The number of bytes/element. + */ + int32 CalculateSlackGrow( + int32 NumElements, + int32 CurrentNumSlackElements, + SIZE_T NumBytesPerElement + ) const; + + SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const; + }; + + /** + * A class that may be used when NeedsElementType=false is specified. + * If NeedsElementType=true, then this must be present but will not be used, and so can simply be a typedef to void + */ + typedef ForElementType ForAnyElementType; +}; + +/** The indirect allocation policy always allocates the elements indirectly. */ +template +class TAlignedHeapAllocator +{ +public: + + enum { NeedsElementType = false }; + enum { RequireRangeCheck = true }; + + class ForAnyElementType + { + public: + + /** Default constructor. */ + ForAnyElementType() + : Data(nullptr) + {} + + /** + * Moves the state of another allocator into this one. + * Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary). + * @param Other - The allocator to move the state from. This allocator should be left in a valid empty state. + */ + FORCEINLINE void MoveToEmpty(ForAnyElementType& Other) + { + checkSlow(this != &Other); + + if (Data) + { + FMemory::Free(Data); + } + + Data = Other.Data; + Other.Data = nullptr; + } + + /** Destructor. */ + FORCEINLINE ~ForAnyElementType() + { + if(Data) + { + FMemory::Free(Data); + } + } + + // FContainerAllocatorInterface + FORCEINLINE FScriptContainerElement* GetAllocation() const + { + return Data; + } + void ResizeAllocation( + int32 PreviousNumElements, + int32 NumElements, + SIZE_T NumBytesPerElement + ) + { + // Avoid calling FMemory::Realloc( nullptr, 0 ) as ANSI C mandates returning a valid pointer which is not what we want. + if (Data || NumElements) + { + //checkSlow(((uint64)NumElements*(uint64)ElementTypeInfo.GetSize() < (uint64)INT_MAX)); + Data = (FScriptContainerElement*)FMemory::Realloc( Data, NumElements*NumBytesPerElement, Alignment ); + } + } + FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackReserve(NumElements, NumBytesPerElement, true, Alignment); + } + FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackShrink(NumElements, NumAllocatedElements, NumBytesPerElement, true, Alignment); + } + FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackGrow(NumElements, NumAllocatedElements, NumBytesPerElement, true, Alignment); + } + + SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const + { + return NumAllocatedElements * NumBytesPerElement; + } + + bool HasAllocation() + { + return !!Data; + } + + private: + ForAnyElementType(const ForAnyElementType&); + ForAnyElementType& operator=(const ForAnyElementType&); + + /** A pointer to the container's elements. */ + FScriptContainerElement* Data; + }; + + template + class ForElementType : public ForAnyElementType + { + public: + + /** Default constructor. */ + ForElementType() + {} + + FORCEINLINE ElementType* GetAllocation() const + { + return (ElementType*)ForAnyElementType::GetAllocation(); + } + }; +}; + +template +struct TAllocatorTraits> : TAllocatorTraitsBase> +{ + enum { SupportsMove = true }; + enum { IsZeroConstruct = true }; +}; + +/** The indirect allocation policy always allocates the elements indirectly. */ +class FHeapAllocator +{ +public: + + enum { NeedsElementType = false }; + enum { RequireRangeCheck = true }; + + class ForAnyElementType + { + public: + /** Default constructor. */ + ForAnyElementType() + : Data(nullptr) + {} + + /** + * Moves the state of another allocator into this one. + * Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary). + * @param Other - The allocator to move the state from. This allocator should be left in a valid empty state. + */ + FORCEINLINE void MoveToEmpty(ForAnyElementType& Other) + { + checkSlow(this != &Other); + + if (Data) + { + FMemory::Free(Data); + } + + Data = Other.Data; + Other.Data = nullptr; + } + + /** Destructor. */ + FORCEINLINE ~ForAnyElementType() + { + if(Data) + { + FMemory::Free(Data); + } + } + + // FContainerAllocatorInterface + FORCEINLINE FScriptContainerElement* GetAllocation() const + { + return Data; + } + FORCEINLINE void ResizeAllocation(int32 PreviousNumElements, int32 NumElements, SIZE_T NumBytesPerElement) + { + // Avoid calling FMemory::Realloc( nullptr, 0 ) as ANSI C mandates returning a valid pointer which is not what we want. + if (Data || NumElements) + { + //checkSlow(((uint64)NumElements*(uint64)ElementTypeInfo.GetSize() < (uint64)INT_MAX)); + Data = (FScriptContainerElement*)FMemory::Realloc( Data, NumElements*NumBytesPerElement ); + } + } + FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackReserve(NumElements, NumBytesPerElement, true); + } + FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackShrink(NumElements, NumAllocatedElements, NumBytesPerElement, true); + } + FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + return DefaultCalculateSlackGrow(NumElements, NumAllocatedElements, NumBytesPerElement, true); + } + + SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const + { + return NumAllocatedElements * NumBytesPerElement; + } + + bool HasAllocation() + { + return !!Data; + } + + private: + ForAnyElementType(const ForAnyElementType&); + ForAnyElementType& operator=(const ForAnyElementType&); + + /** A pointer to the container's elements. */ + FScriptContainerElement* Data; + }; + + template + class ForElementType : public ForAnyElementType + { + public: + + /** Default constructor. */ + ForElementType() + {} + + FORCEINLINE ElementType* GetAllocation() const + { + return (ElementType*)ForAnyElementType::GetAllocation(); + } + }; +}; + +template <> +struct TAllocatorTraits : TAllocatorTraitsBase +{ + enum { SupportsMove = true }; + enum { IsZeroConstruct = true }; +}; + +class FDefaultAllocator; + +/** + * The inline allocation policy allocates up to a specified number of elements in the same allocation as the container. + * Any allocation needed beyond that causes all data to be moved into an indirect allocation. + * It always uses DEFAULT_ALIGNMENT. + */ +template +class TInlineAllocator +{ +public: + + enum { NeedsElementType = true }; + enum { RequireRangeCheck = true }; + + template + class ForElementType + { + public: + + /** Default constructor. */ + ForElementType() + { + } + + /** + * Moves the state of another allocator into this one. + * Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary). + * @param Other - The allocator to move the state from. This allocator should be left in a valid empty state. + */ + FORCEINLINE void MoveToEmpty(ForElementType& Other) + { + checkSlow(this != &Other); + + if (!Other.SecondaryData.GetAllocation()) + { + // Relocate objects from other inline storage only if it was stored inline in Other + RelocateConstructItems((void*)InlineData, Other.GetInlineElements(), NumInlineElements); + } + + // Move secondary storage in any case. + // This will move secondary storage if it exists but will also handle the case where secondary storage is used in Other but not in *this. + SecondaryData.MoveToEmpty(Other.SecondaryData); + } + + // FContainerAllocatorInterface + FORCEINLINE ElementType* GetAllocation() const + { + return IfAThenAElseB(SecondaryData.GetAllocation(),GetInlineElements()); + } + + void ResizeAllocation(int32 PreviousNumElements,int32 NumElements,SIZE_T NumBytesPerElement) + { + // Check if the new allocation will fit in the inline data area. + if(NumElements <= NumInlineElements) + { + // If the old allocation wasn't in the inline data area, relocate it into the inline data area. + if(SecondaryData.GetAllocation()) + { + RelocateConstructItems((void*)InlineData, (ElementType*)SecondaryData.GetAllocation(), PreviousNumElements); + + // Free the old indirect allocation. + SecondaryData.ResizeAllocation(0,0,NumBytesPerElement); + } + } + else + { + if(!SecondaryData.GetAllocation()) + { + // Allocate new indirect memory for the data. + SecondaryData.ResizeAllocation(0,NumElements,NumBytesPerElement); + + // Move the data out of the inline data area into the new allocation. + RelocateConstructItems((void*)SecondaryData.GetAllocation(), GetInlineElements(), PreviousNumElements); + } + else + { + // Reallocate the indirect data for the new size. + SecondaryData.ResizeAllocation(PreviousNumElements,NumElements,NumBytesPerElement); + } + } + } + + FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, SIZE_T NumBytesPerElement) const + { + // If the elements use less space than the inline allocation, only use the inline allocation as slack. + return NumElements <= NumInlineElements ? + NumInlineElements : + SecondaryData.CalculateSlackReserve(NumElements, NumBytesPerElement); + } + FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + // If the elements use less space than the inline allocation, only use the inline allocation as slack. + return NumElements <= NumInlineElements ? + NumInlineElements : + SecondaryData.CalculateSlackShrink(NumElements, NumAllocatedElements, NumBytesPerElement); + } + FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + // If the elements use less space than the inline allocation, only use the inline allocation as slack. + return NumElements <= NumInlineElements ? + NumInlineElements : + SecondaryData.CalculateSlackGrow(NumElements, NumAllocatedElements, NumBytesPerElement); + } + + SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const + { + return SecondaryData.GetAllocatedSize(NumAllocatedElements, NumBytesPerElement); + } + + bool HasAllocation() + { + return SecondaryData.HasAllocation(); + } + + private: + ForElementType(const ForElementType&); + ForElementType& operator=(const ForElementType&); + + /** The data is stored in this array if less than NumInlineElements is needed. */ + TTypeCompatibleBytes InlineData[NumInlineElements]; + + /** The data is allocated through the indirect allocation policy if more than NumInlineElements is needed. */ + typename SecondaryAllocator::template ForElementType SecondaryData; + + /** @return the base of the aligned inline element data */ + ElementType* GetInlineElements() const + { + return (ElementType*)InlineData; + } + }; + + typedef void ForAnyElementType; +}; + +template +struct TAllocatorTraits> : TAllocatorTraitsBase> +{ + enum { SupportsMove = TAllocatorTraits::SupportsMove }; +}; + +/** + * The fixed allocation policy allocates up to a specified number of elements in the same allocation as the container. + * It's like the inline allocator, except it doesn't provide secondary storage when the inline storage has been filled. + */ +template +class TFixedAllocator +{ +public: + + enum { NeedsElementType = true }; + enum { RequireRangeCheck = true }; + + template + class ForElementType + { + public: + + /** Default constructor. */ + ForElementType() + { + } + + /** + * Moves the state of another allocator into this one. + * Assumes that the allocator is currently empty, i.e. memory may be allocated but any existing elements have already been destructed (if necessary). + * @param Other - The allocator to move the state from. This allocator should be left in a valid empty state. + */ + FORCEINLINE void MoveToEmpty(ForElementType& Other) + { + checkSlow(this != &Other); + + // Relocate objects from other inline storage + RelocateConstructItems((void*)InlineData, Other.GetInlineElements(), NumInlineElements); + } + + // FContainerAllocatorInterface + FORCEINLINE ElementType* GetAllocation() const + { + return GetInlineElements(); + } + + void ResizeAllocation(int32 PreviousNumElements,int32 NumElements,SIZE_T NumBytesPerElement) + { + // Ensure the requested allocation will fit in the inline data area. + checkSlow(NumElements <= NumInlineElements); + } + + FORCEINLINE int32 CalculateSlackReserve(int32 NumElements, SIZE_T NumBytesPerElement) const + { + // Ensure the requested allocation will fit in the inline data area. + checkSlow(NumElements <= NumInlineElements); + return NumInlineElements; + } + FORCEINLINE int32 CalculateSlackShrink(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + // Ensure the requested allocation will fit in the inline data area. + checkSlow(NumAllocatedElements <= NumInlineElements); + return NumInlineElements; + } + FORCEINLINE int32 CalculateSlackGrow(int32 NumElements, int32 NumAllocatedElements, int32 NumBytesPerElement) const + { + // Ensure the requested allocation will fit in the inline data area. + checkSlow(NumElements <= NumInlineElements); + return NumInlineElements; + } + + SIZE_T GetAllocatedSize(int32 NumAllocatedElements, SIZE_T NumBytesPerElement) const + { + return 0; + } + + bool HasAllocation() + { + return false; + } + + + private: + ForElementType(const ForElementType&); + ForElementType& operator=(const ForElementType&); + + /** The data is stored in this array if less than NumInlineElements is needed. */ + TTypeCompatibleBytes InlineData[NumInlineElements]; + + /** @return the base of the aligned inline element data */ + ElementType* GetInlineElements() const + { + return (ElementType*)InlineData; + } + }; + + typedef void ForAnyElementType; +}; + +template +struct TAllocatorTraits> : TAllocatorTraitsBase> +{ + enum { SupportsMove = true }; +}; + +// We want these to be correctly typed as int32, but we don't want them to have linkage, so we make them macros +#define NumBitsPerDWORD ((int32)32) +#define NumBitsPerDWORDLogTwo ((int32)5) + +// +// Sparse array allocation definitions +// + +class FDefaultAllocator; +class FDefaultBitArrayAllocator; + +/** Encapsulates the allocators used by a sparse array in a single type. */ +template +class TSparseArrayAllocator +{ +public: + + typedef InElementAllocator ElementAllocator; + typedef InBitArrayAllocator BitArrayAllocator; +}; + +/** An inline sparse array allocator that allows sizing of the inline allocations for a set number of elements. */ +template< + uint32 NumInlineElements, + typename SecondaryAllocator = TSparseArrayAllocator + > +class TInlineSparseArrayAllocator +{ +private: + + /** The size to allocate inline for the bit array. */ + enum { InlineBitArrayDWORDs = (NumInlineElements + NumBitsPerDWORD - 1) / NumBitsPerDWORD}; + +public: + + typedef TInlineAllocator ElementAllocator; + typedef TInlineAllocator BitArrayAllocator; +}; + +// +// Set allocation definitions. +// + +#define DEFAULT_NUMBER_OF_ELEMENTS_PER_HASH_BUCKET 2 +#define DEFAULT_BASE_NUMBER_OF_HASH_BUCKETS 8 +#define DEFAULT_MIN_NUMBER_OF_HASHED_ELEMENTS 4 + +/** Encapsulates the allocators used by a set in a single type. */ +template< + typename InSparseArrayAllocator = TSparseArrayAllocator<>, + typename InHashAllocator = TInlineAllocator<1,FDefaultAllocator>, + uint32 AverageNumberOfElementsPerHashBucket = DEFAULT_NUMBER_OF_ELEMENTS_PER_HASH_BUCKET, + uint32 BaseNumberOfHashBuckets = DEFAULT_BASE_NUMBER_OF_HASH_BUCKETS, + uint32 MinNumberOfHashedElements = DEFAULT_MIN_NUMBER_OF_HASHED_ELEMENTS + > +class TSetAllocator +{ +public: + + /** Computes the number of hash buckets to use for a given number of elements. */ + static FORCEINLINE uint32 GetNumberOfHashBuckets(uint32 NumHashedElements) + { + if(NumHashedElements >= MinNumberOfHashedElements) + { + return FPlatformMath::RoundUpToPowerOfTwo(NumHashedElements / AverageNumberOfElementsPerHashBucket + BaseNumberOfHashBuckets); + } + + return 1; + } + + typedef InSparseArrayAllocator SparseArrayAllocator; + typedef InHashAllocator HashAllocator; +}; + +class FDefaultAllocator; + +/** An inline set allocator that allows sizing of the inline allocations for a set number of elements. */ +template< + uint32 NumInlineElements, + typename SecondaryAllocator = TSetAllocator,FDefaultAllocator>, + uint32 AverageNumberOfElementsPerHashBucket = DEFAULT_NUMBER_OF_ELEMENTS_PER_HASH_BUCKET, + uint32 MinNumberOfHashedElements = DEFAULT_MIN_NUMBER_OF_HASHED_ELEMENTS + > +class TInlineSetAllocator +{ +private: + + enum { NumInlineHashBuckets = (NumInlineElements + AverageNumberOfElementsPerHashBucket - 1) / AverageNumberOfElementsPerHashBucket }; + + static_assert(!(NumInlineHashBuckets & (NumInlineHashBuckets - 1)), "Number of inline buckets must be a power of two"); + +public: + + /** Computes the number of hash buckets to use for a given number of elements. */ + static FORCEINLINE uint32 GetNumberOfHashBuckets(uint32 NumHashedElements) + { + const uint32 NumDesiredHashBuckets = FPlatformMath::RoundUpToPowerOfTwo(NumHashedElements / AverageNumberOfElementsPerHashBucket); + if (NumDesiredHashBuckets < NumInlineHashBuckets) + { + return NumInlineHashBuckets; + } + + if (NumHashedElements < MinNumberOfHashedElements) + { + return NumInlineHashBuckets; + } + + return NumDesiredHashBuckets; + } + + typedef TInlineSparseArrayAllocator SparseArrayAllocator; + typedef TInlineAllocator HashAllocator; +}; + +#pragma warning(pop) + +/** + * 'typedefs' for various allocator defaults. + * + * These should be replaced with actual typedefs when Core.h include order is sorted out, as then we won't need to + * 'forward' these TAllocatorTraits specializations below. + */ + +class FDefaultAllocator : public FHeapAllocator { public: typedef FHeapAllocator Typedef; }; +class FDefaultSetAllocator : public TSetAllocator<> { public: typedef TSetAllocator<> Typedef; }; +class FDefaultBitArrayAllocator : public TInlineAllocator<4> { public: typedef TInlineAllocator<4> Typedef; }; +class FDefaultSparseArrayAllocator : public TSparseArrayAllocator<> { public: typedef TSparseArrayAllocator<> Typedef; }; + +template <> struct TAllocatorTraits : TAllocatorTraits {}; +template <> struct TAllocatorTraits : TAllocatorTraits {}; +template <> struct TAllocatorTraits : TAllocatorTraits {}; +template <> struct TAllocatorTraits : TAllocatorTraits {}; diff --git a/version/Core/Public/API/UE/Containers/EnumAsByte.h b/version/Core/Public/API/UE/Containers/EnumAsByte.h new file mode 100644 index 0000000..d60d0e9 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/EnumAsByte.h @@ -0,0 +1,140 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Templates/IsPODType.h" +#include "../Templates/IsEnumClass.h" + +template struct TEnumAsByte_EnumClass; +template <> struct TEnumAsByte_EnumClass {}; + +/** + * Template to store enumeration values as bytes in a type-safe way. + */ +template +class TEnumAsByte +{ + typedef TEnumAsByte_EnumClass::Value> Check; + +public: + typedef TEnum EnumType; + + /** Default Constructor (no initialization). */ + FORCEINLINE TEnumAsByte() { } + + /** + * Copy constructor. + * + * @param InValue value to construct with. + */ + FORCEINLINE TEnumAsByte( const TEnumAsByte &InValue ) + : Value(InValue.Value) + { } + + /** + * Constructor, initialize to the enum value. + * + * @param InValue value to construct with. + */ + FORCEINLINE TEnumAsByte( TEnum InValue ) + : Value(static_cast(InValue)) + { } + + /** + * Constructor, initialize to the int32 value. + * + * @param InValue value to construct with. + */ + explicit FORCEINLINE TEnumAsByte( int32 InValue ) + : Value(static_cast(InValue)) + { } + + /** + * Constructor, initialize to the int32 value. + * + * @param InValue value to construct with. + */ + explicit FORCEINLINE TEnumAsByte( uint8 InValue ) + : Value(InValue) + { } + +public: + + /** + * Assignment operator. + * + * @param InValue value to set. + * @return This instance. + */ + FORCEINLINE TEnumAsByte& operator=( TEnumAsByte InValue ) + { + Value = InValue.Value; + return *this; + } + /** + * Assignment operator. + * + * @param InValue value to set. + * @return This instance. + */ + FORCEINLINE TEnumAsByte& operator=( TEnum InValue ) + { + Value = static_cast(InValue); + return *this; + } + + /** + * Compares two enumeration values for equality. + * + * @param InValue The value to compare with. + * @return true if the two values are equal, false otherwise. + */ + bool operator==( TEnum InValue ) const + { + return static_cast(Value) == InValue; + } + + /** + * Compares two enumeration values for equality. + * + * @param InValue The value to compare with. + * @return true if the two values are equal, false otherwise. + */ + bool operator==(TEnumAsByte InValue) const + { + return Value == InValue.Value; + } + + /** Implicit conversion to TEnum. */ + operator TEnum() const + { + return (TEnum)Value; + } + +public: + + /** + * Gets the enumeration value. + * + * @return The enumeration value. + */ + TEnum GetValue() const + { + return (TEnum)Value; + } + +private: + + /** Holds the value as a byte. **/ + uint8 Value; + + + FORCEINLINE friend uint32 GetTypeHash(const TEnumAsByte& Enum) + { + return GetTypeHash(Enum.Value); + } +}; + + +template struct TIsPODType> { enum { Value = true }; }; diff --git a/version/Core/Public/API/UE/Containers/FString.h b/version/Core/Public/API/UE/Containers/FString.h new file mode 100644 index 0000000..8cb2ce8 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/FString.h @@ -0,0 +1,3030 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include + +#include + +#include "TArray.h" +#include "../Windows/MicrosoftPlatformString.h" +#include "../Templates/MemoryOps.h" +#include "../Templates/UnrealTemplate.h" +#include "../Math/UnrealMathUtility.h" +#include "../Misc/CString.h" + +#pragma warning(push) +#pragma warning(disable : 4244) + +struct FStringFormatArg; + +/** Determines case sensitivity options for string comparisons. */ +namespace ESearchCase +{ + enum Type + { + /** Case sensitive. Upper/lower casing must match for strings to be considered equal. */ + CaseSensitive, + + /** Ignore case. Upper/lower casing does not matter when making a comparison. */ + IgnoreCase, + }; +}; + +/** Determines search direction for string operations. */ +namespace ESearchDir +{ + enum Type + { + /** Search from the start, moving forward through the string. */ + FromStart, + + /** Search from the end, moving backward through the string. */ + FromEnd, + }; +} + +/** +* A dynamically sizeable string. +* @see https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/StringHandling/FString/ +*/ +class FString +{ +private: + friend struct TContainerTraits; + + /** Array holding the character data */ + typedef TArray DataType; + DataType Data; + +public: + using ElementType = TCHAR; + + FString() = default; + FString(FString&&) = default; + FString(const FString&) = default; + FString& operator=(FString&&) = default; + FString& operator=(const FString&) = default; + + /** + * Create a copy of the Other string with extra space for characters at the end of the string + * + * @param Other the other string to create a new copy from + * @param ExtraSlack number of extra characters to add to the end of the other string in this string + */ + FORCEINLINE FString(const FString& Other, int32 ExtraSlack) + : Data(Other.Data, ExtraSlack + ((Other.Data.Num() || !ExtraSlack) ? 0 : 1)) // Add 1 if the source string array is empty and we want some slack, because we'll need to include a null terminator which is currently missing + { + } + + /** + * Create a copy of the Other string with extra space for characters at the end of the string + * + * @param Other the other string to create a new copy from + * @param ExtraSlack number of extra characters to add to the end of the other string in this string + */ + FORCEINLINE FString(FString&& Other, int32 ExtraSlack) + : Data(MoveTemp(Other.Data), ExtraSlack + ((Other.Data.Num() || !ExtraSlack) ? 0 : 1)) // Add 1 if the source string array is empty and we want some slack, because we'll need to include a null terminator which is currently missing + { + } + + /** + * Constructor using an array of TCHAR + * + * @param In array of TCHAR + */ + template + FORCEINLINE FString(const CharType* Src, typename TEnableIf::Value>::Type* Dummy = nullptr) // This TEnableIf is to ensure we don't instantiate this constructor for non-char types, like id* in Obj-C + { + if (Src && *Src) + { + int32 SrcLen = TCString::Strlen(Src) + 1; + int32 DestLen = FPlatformString::ConvertedLength(Src, SrcLen); + Data.AddUninitialized(DestLen); + + FPlatformString::Convert(Data.GetData(), DestLen, Src, SrcLen); + } + } + + /** + * Constructor to create FString with specified number of characters from another string with additional character zero + * + * @param InCount how many characters to copy + * @param InSrc String to copy from + */ + FORCEINLINE explicit FString(int32 InCount, const TCHAR* InSrc) + { + Data.AddUninitialized(InCount ? InCount + 1 : 0); + + if (Data.Num() > 0) + { + FCString::Strncpy(Data.GetData(), InSrc, InCount + 1); + } + } + + /** + * Copy Assignment from array of TCHAR + * + * @param Other array of TCHAR + */ + FORCEINLINE FString& operator=(const TCHAR* Other) + { + if (Data.GetData() != Other) + { + int32 Len = (Other && *Other) ? FCString::Strlen(Other) + 1 : 0; + Data.Empty(Len); + Data.AddUninitialized(Len); + + if (Len) + { + FMemory::Memcpy(Data.GetData(), Other, Len * sizeof(TCHAR)); + } + } + return *this; + } + + /** + * Return specific character from this string + * + * @param Index into string + * @return Character at Index + */ + FORCEINLINE TCHAR& operator[](int32 Index) + { + return Data.GetData()[Index]; + } + + /** + * Return specific const character from this string + * + * @param Index into string + * @return const Character at Index + */ + FORCEINLINE const TCHAR& operator[](int32 Index) const + { + return Data.GetData()[Index]; + } + + /** + * Iterator typedefs + */ + typedef TArray::TIterator TIterator; + typedef TArray::TConstIterator TConstIterator; + + /** Creates an iterator for the characters in this string */ + FORCEINLINE TIterator CreateIterator() + { + return Data.CreateIterator(); + } + + /** Creates a const iterator for the characters in this string */ + FORCEINLINE TConstIterator CreateConstIterator() const + { + return Data.CreateConstIterator(); + } + +private: + /** + * DO NOT USE DIRECTLY + * STL-like iterators to enable range-based for loop support. + */ + FORCEINLINE friend DataType::RangedForIteratorType begin(FString& Str) { auto Result = begin(Str.Data); return Result; } + FORCEINLINE friend DataType::RangedForConstIteratorType begin(const FString& Str) { auto Result = begin(Str.Data); return Result; } + FORCEINLINE friend DataType::RangedForIteratorType end(FString& Str) { auto Result = end(Str.Data); if (Str.Data.Num()) { --Result; } return Result; } + FORCEINLINE friend DataType::RangedForConstIteratorType end(const FString& Str) { auto Result = end(Str.Data); if (Str.Data.Num()) { --Result; } return Result; } + +public: + FORCEINLINE uint32 GetAllocatedSize() const + { + return Data.GetAllocatedSize(); + } + + /** + * Run slow checks on this string + */ + FORCEINLINE void CheckInvariants() const + { + } + + /** + * Create empty string of given size with zero terminating character + * + * @param Slack length of empty string to create + */ + FORCEINLINE void Empty(int32 Slack = 0) + { + Data.Empty(Slack); + } + + /** + * Test whether this string is empty + * + * @return true if this string is empty, otherwise return false. + */ + FORCEINLINE bool IsEmpty() const + { + return Data.Num() <= 1; + } + + /** + * Empties the string, but doesn't change memory allocation, unless the new size is larger than the current string. + * + * @param NewReservedSize The expected usage size (in characters, not including the terminator) after calling this function. + */ + FORCEINLINE void Reset(int32 NewReservedSize = 0) + { + const int32 NewSizeIncludingTerminator = (NewReservedSize > 0) ? (NewReservedSize + 1) : 0; + Data.Reset(NewSizeIncludingTerminator); + } + + /** + * Remove unallocated empty character space from the end of this string + */ + FORCEINLINE void Shrink() + { + Data.Shrink(); + } + + /** + * Tests if index is valid, i.e. greater than or equal to zero, and less than the number of characters in this string (excluding the null terminator). + * + * @param Index Index to test. + * + * @returns True if index is valid. False otherwise. + */ + FORCEINLINE bool IsValidIndex(int32 Index) const + { + return Index >= 0 && Index < Len(); + } + + /** + * Get pointer to the string + * + * @Return Pointer to Array of TCHAR if Num, otherwise the empty string + */ + FORCEINLINE const TCHAR* operator*() const + { + return Data.Num() ? Data.GetData() : TEXT(""); + } + + /** + *Get string as array of TCHARS + * + * @warning: Operations on the TArray<*CHAR> can be unsafe, such as adding + * non-terminating 0's or removing the terminating zero. + */ + FORCEINLINE DataType& GetCharArray() + { + return Data; + } + + /** Get string as const array of TCHARS */ + FORCEINLINE const DataType& GetCharArray() const + { + return Data; + } + +#ifdef __OBJC__ + /** Convert FString to Objective-C NSString */ + FORCEINLINE NSString* GetNSString() const + { +#if PLATFORM_TCHAR_IS_4_BYTES + return[[[NSString alloc] initWithBytes:Data.GetData() length : Len() * sizeof(TCHAR) encoding : NSUTF32LittleEndianStringEncoding] autorelease]; +#else + return[[[NSString alloc] initWithBytes:Data.GetData() length : Len() * sizeof(TCHAR) encoding : NSUTF16LittleEndianStringEncoding] autorelease]; +#endif + } +#endif + + /** + * Appends an array of characters to the string. + * + * @param Array A pointer to the start of an array of characters to append. This array need not be null-terminated, and null characters are not treated specially. + * @param Count The number of characters to copy from Array. + */ + FORCEINLINE void AppendChars(const TCHAR* Array, int32 Count) + { + if (!Count) + return; + + int32 Index = Data.Num(); + + // Reserve enough space - including an extra gap for a null terminator if we don't already have a string allocated + Data.AddUninitialized(Count + (Index ? 0 : 1)); + + TCHAR* EndPtr = Data.GetData() + Index - (Index ? 1 : 0); + + // Copy characters to end of string, overwriting null terminator if we already have one + CopyAssignItems(EndPtr, Array, Count); + + // (Re-)establish the null terminator + *(EndPtr + Count) = 0; + } + + /** + * Concatenate this with given string + * + * @param Str array of TCHAR to be concatenated onto the end of this + * @return reference to this + */ + FORCEINLINE FString& operator+=(const TCHAR* Str) + { + CheckInvariants(); + + AppendChars(Str, FCString::Strlen(Str)); + + return *this; + } + + /** + * Concatenate this with given char + * + * @param inChar other Char to be concatenated onto the end of this string + * @return reference to this + */ + template + FORCEINLINE typename TEnableIf::Value, FString&>::Type operator+=(CharType InChar) + { + CheckInvariants(); + + if (InChar != 0) + { + // position to insert the character. + // At the end of the string if we have existing characters, otherwise at the 0 position + int32 InsertIndex = (Data.Num() > 0) ? Data.Num() - 1 : 0; + + // number of characters to add. If we don't have any existing characters, + // we'll need to append the terminating zero as well. + int32 InsertCount = (Data.Num() > 0) ? 1 : 2; + + Data.AddUninitialized(InsertCount); + Data[InsertIndex] = InChar; + Data[InsertIndex + 1] = 0; + } + return *this; + } + + /** + * Concatenate this with given char + * + * @param InChar other Char to be concatenated onto the end of this string + * @return reference to this + */ + FORCEINLINE FString& AppendChar(const TCHAR InChar) + { + *this += InChar; + return *this; + } + + FORCEINLINE FString& Append(const FString& Text) + { + *this += Text; + return *this; + } + + FString& Append(const TCHAR* Text, int32 Count) + { + CheckInvariants(); + + if (Count != 0) + { + // position to insert the character. + // At the end of the string if we have existing characters, otherwise at the 0 position + int32 InsertIndex = (Data.Num() > 0) ? Data.Num() - 1 : 0; + + // number of characters to add. If we don't have any existing characters, + // we'll need to append the terminating zero as well. + int32 FinalCount = (Data.Num() > 0) ? Count : Count + 1; + + Data.AddUninitialized(FinalCount); + + for (int32 Index = 0; Index < Count; Index++) + { + Data[InsertIndex + Index] = Text[Index]; + } + + Data[Data.Num() - 1] = 0; + } + return *this; + } + + /** + * Removes characters within the string. + * + * @param Index The index of the first character to remove. + * @param Count The number of characters to remove. + * @param bAllowShrinking Whether or not to reallocate to shrink the storage after removal. + */ + FORCEINLINE void RemoveAt(int32 Index, int32 Count = 1, bool bAllowShrinking = true) + { + Data.RemoveAt(Index, Count, bAllowShrinking); + } + + FORCEINLINE void InsertAt(int32 Index, TCHAR Character) + { + if (Character != 0) + { + if (Data.Num() == 0) + { + *this += Character; + } + else + { + Data.Insert(Character, Index); + } + } + } + + FORCEINLINE void InsertAt(int32 Index, const FString& Characters) + { + if (Characters.Len()) + { + if (Data.Num() == 0) + { + *this += Characters; + } + else + { + Data.Insert(Characters.Data.GetData(), Characters.Len(), Index); + } + } + } + + /** + * Removes the text from the start of the string if it exists. + * + * @param InPrefix the prefix to search for at the start of the string to remove. + * @return true if the prefix was removed, otherwise false. + */ + bool RemoveFromStart(const FString& InPrefix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase); + + /** + * Removes the text from the end of the string if it exists. + * + * @param InSuffix the suffix to search for at the end of the string to remove. + * @return true if the suffix was removed, otherwise false. + */ + bool RemoveFromEnd(const FString& InSuffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase); + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Str Pointer to an array of TCHARs (not necessarily null-terminated) to be concatenated onto the end of this. + * @param StrLength Exact number of characters from Str to append. + */ + void PathAppend(const TCHAR* Str, int32 StrLength); + + /** + * Concatenate this with given string + * + * @param Str other string to be concatenated onto the end of this + * @return reference to this + */ + FORCEINLINE FString& operator+=(const FString& Str) + { + CheckInvariants(); + Str.CheckInvariants(); + + AppendChars(Str.Data.GetData(), Str.Len()); + + return *this; + } + + /** + * Concatenates an FString with a TCHAR. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The char on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + template + FORCEINLINE friend typename TEnableIf::Value, FString>::Type operator+(const FString& Lhs, CharType Rhs) + { + Lhs.CheckInvariants(); + + FString Result(Lhs, 1); + Result += Rhs; + + return Result; + } + + /** + * Concatenates an FString with a TCHAR. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The char on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + template + FORCEINLINE friend typename TEnableIf::Value, FString>::Type operator+(FString&& Lhs, CharType Rhs) + { + Lhs.CheckInvariants(); + + FString Result(MoveTemp(Lhs), 1); + Result += Rhs; + + return Result; + } + +private: + template + FORCEINLINE static FString ConcatFStrings(typename TIdentity::Type Lhs, typename TIdentity::Type Rhs) + { + Lhs.CheckInvariants(); + Rhs.CheckInvariants(); + + if (Lhs.IsEmpty()) + { + return MoveTempIfPossible(Rhs); + } + + int32 RhsLen = Rhs.Len(); + + FString Result(MoveTempIfPossible(Lhs), RhsLen); + Result.AppendChars(Rhs.Data.GetData(), RhsLen); + + return Result; + } + + template + FORCEINLINE static FString ConcatTCHARsToFString(const TCHAR* Lhs, typename TIdentity::Type Rhs) + { + Rhs.CheckInvariants(); + + if (!Lhs || !*Lhs) + { + return MoveTempIfPossible(Rhs); + } + + int32 LhsLen = FCString::Strlen(Lhs); + int32 RhsLen = Rhs.Len(); + + // This is not entirely optimal, as if the Rhs is an rvalue and has enough slack space to hold Lhs, then + // the memory could be reused here without constructing a new object. However, until there is proof otherwise, + // I believe this will be relatively rare and isn't worth making the code a lot more complex right now. + FString Result; + Result.Data.AddUninitialized(LhsLen + RhsLen + 1); + + TCHAR* ResultData = Result.Data.GetData(); + CopyAssignItems(ResultData, Lhs, LhsLen); + CopyAssignItems(ResultData + LhsLen, Rhs.Data.GetData(), RhsLen); + *(ResultData + LhsLen + RhsLen) = 0; + + return Result; + } + + template + FORCEINLINE static FString ConcatFStringToTCHARs(typename TIdentity::Type Lhs, const TCHAR* Rhs) + { + Lhs.CheckInvariants(); + + if (!Rhs || !*Rhs) + { + return MoveTempIfPossible(Lhs); + } + + int32 RhsLen = FCString::Strlen(Rhs); + + FString Result(MoveTempIfPossible(Lhs), RhsLen); + Result.AppendChars(Rhs, RhsLen); + + return Result; + } + +public: + /** + * Concatenate two FStrings. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(const FString& Lhs, const FString& Rhs) + { + return ConcatFStrings(Lhs, Rhs); + } + + /** + * Concatenate two FStrings. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(FString&& Lhs, const FString& Rhs) + { + return ConcatFStrings(MoveTemp(Lhs), Rhs); + } + + /** + * Concatenate two FStrings. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(const FString& Lhs, FString&& Rhs) + { + return ConcatFStrings(Lhs, MoveTemp(Rhs)); + } + + /** + * Concatenate two FStrings. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(FString&& Lhs, FString&& Rhs) + { + return ConcatFStrings(MoveTemp(Lhs), MoveTemp(Rhs)); + } + + /** + * Concatenates a TCHAR array to an FString. + * + * @param Lhs The TCHAR array on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(const TCHAR* Lhs, const FString& Rhs) + { + return ConcatTCHARsToFString(Lhs, Rhs); + } + + /** + * Concatenates a TCHAR array to an FString. + * + * @param Lhs The TCHAR array on the left-hand-side of the expression. + * @param Rhs The FString on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(const TCHAR* Lhs, FString&& Rhs) + { + return ConcatTCHARsToFString(Lhs, MoveTemp(Rhs)); + } + + /** + * Concatenates an FString to a TCHAR array. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The TCHAR array on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(const FString& Lhs, const TCHAR* Rhs) + { + return ConcatFStringToTCHARs(Lhs, Rhs); + } + + /** + * Concatenates an FString to a TCHAR array. + * + * @param Lhs The FString on the left-hand-side of the expression. + * @param Rhs The TCHAR array on the right-hand-side of the expression. + * + * @return The concatenated string. + */ + FORCEINLINE friend FString operator+(FString&& Lhs, const TCHAR* Rhs) + { + return ConcatFStringToTCHARs(MoveTemp(Lhs), Rhs); + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Str path array of TCHAR to be concatenated onto the end of this + * @return reference to path + */ + FORCEINLINE FString& operator/=(const TCHAR* Str) + { + PathAppend(Str, FCString::Strlen(Str)); + return *this; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Str path FString to be concatenated onto the end of this + * @return reference to path + */ + FORCEINLINE FString& operator/=(const FString& Str) + { + PathAppend(Str.Data.GetData(), Str.Len()); + return *this; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Lhs Path to concatenate onto. + * @param Rhs Path to concatenate. + * @return new FString of the path + */ + FORCEINLINE friend FString operator/(const FString& Lhs, const TCHAR* Rhs) + { + int32 StrLength = FCString::Strlen(Rhs); + + FString Result(Lhs, StrLength + 1); + Result.PathAppend(Rhs, StrLength); + return Result; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Lhs Path to concatenate onto. + * @param Rhs Path to concatenate. + * @return new FString of the path + */ + FORCEINLINE friend FString operator/(FString&& Lhs, const TCHAR* Rhs) + { + int32 StrLength = FCString::Strlen(Rhs); + + FString Result(MoveTemp(Lhs), StrLength + 1); + Result.PathAppend(Rhs, StrLength); + return Result; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Lhs Path to concatenate onto. + * @param Rhs Path to concatenate. + * @return new FString of the path + */ + FORCEINLINE friend FString operator/(const FString& Lhs, const FString& Rhs) + { + int32 StrLength = Rhs.Len(); + + FString Result(Lhs, StrLength + 1); + Result.PathAppend(Rhs.Data.GetData(), StrLength); + return Result; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Lhs Path to concatenate onto. + * @param Rhs Path to concatenate. + * @return new FString of the path + */ + FORCEINLINE friend FString operator/(FString&& Lhs, const FString& Rhs) + { + int32 StrLength = Rhs.Len(); + + FString Result(MoveTemp(Lhs), StrLength + 1); + Result.PathAppend(Rhs.Data.GetData(), StrLength); + return Result; + } + + /** + * Concatenate this path with given path ensuring the / character is used between them + * + * @param Lhs Path to concatenate onto. + * @param Rhs Path to concatenate. + * @return new FString of the path + */ + FORCEINLINE friend FString operator/(const TCHAR* Lhs, const FString& Rhs) + { + int32 StrLength = Rhs.Len(); + + FString Result(FString(Lhs), StrLength + 1); + Result.PathAppend(Rhs.Data.GetData(), Rhs.Len()); + return Result; + } + + /** + * Lexicographically test whether the left string is <= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically <= the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator<=(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) <= 0; + } + + /** + * Lexicographically test whether the left string is <= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically <= the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator<=(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) <= 0; + } + + /** + * Lexicographically test whether the left string is <= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically <= the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator<=(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) <= 0; + } + + /** + * Lexicographically test whether the left string is < the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically < the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator<(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) < 0; + } + + /** + * Lexicographically test whether the left string is < the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically < the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator<(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) < 0; + } + + /** + * Lexicographically test whether the left string is < the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically < the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator<(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) < 0; + } + + /** + * Lexicographically test whether the left string is >= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically >= the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator>=(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) >= 0; + } + + /** + * Lexicographically test whether the left string is >= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically >= the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator>=(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) >= 0; + } + + /** + * Lexicographically test whether the left string is >= the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically >= the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator>=(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) >= 0; + } + + /** + * Lexicographically test whether the left string is > the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically > the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator>(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) > 0; + } + + /** + * Lexicographically test whether the left string is > the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically > the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator>(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) > 0; + } + + /** + * Lexicographically test whether the left string is > the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically > the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator>(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) > 0; + } + + /** + * Lexicographically test whether the left string is == the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically == the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator==(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) == 0; + } + + /** + * Lexicographically test whether the left string is == the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically == the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator==(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) == 0; + } + + /** + * Lexicographically test whether the left string is == the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically == the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator==(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) == 0; + } + + /** + * Lexicographically test whether the left string is != the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically != the right string, otherwise false + * @note case insensitive + */ + FORCEINLINE friend bool operator!=(const FString& Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(*Lhs, *Rhs) != 0; + } + + /** + * Lexicographically test whether the left string is != the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically != the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator!=(const FString& Lhs, const CharType* Rhs) + { + return FPlatformString::Stricmp(*Lhs, Rhs) != 0; + } + + /** + * Lexicographically test whether the left string is != the right string + * + * @param Lhs String to compare against. + * @param Rhs String to compare against. + * @return true if the left string is lexicographically != the right string, otherwise false + * @note case insensitive + */ + template + FORCEINLINE friend bool operator!=(const CharType* Lhs, const FString& Rhs) + { + return FPlatformString::Stricmp(Lhs, *Rhs) != 0; + } + + /** Get the length of the string, excluding terminating character */ + FORCEINLINE int32 Len() const + { + return Data.Num() ? Data.Num() - 1 : 0; + } + + /** @return the left most given number of characters */ + FORCEINLINE FString Left(int32 Count) const + { + return FString(FMath::Clamp(Count, 0, Len()), **this); + } + + /** @return the left most characters from the string chopping the given number of characters from the end */ + FORCEINLINE FString LeftChop(int32 Count) const + { + return FString(FMath::Clamp(Len() - Count, 0, Len()), **this); + } + + /** @return the string to the right of the specified location, counting back from the right (end of the word). */ + FORCEINLINE FString Right(int32 Count) const + { + return FString(**this + Len() - FMath::Clamp(Count, 0, Len())); + } + + /** @return the string to the right of the specified location, counting forward from the left (from the beginning of the word). */ + FORCEINLINE FString RightChop(int32 Count) const + { + return FString(**this + Len() - FMath::Clamp(Len() - Count, 0, Len())); + } + + /** @return the substring from Start position for Count characters. */ + FORCEINLINE FString Mid(int32 Start, int32 Count = INT_MAX) const + { + uint32 End = Start + Count; + Start = FMath::Clamp((uint32)Start, (uint32)0, (uint32)Len()); + End = FMath::Clamp((uint32)End, (uint32)Start, (uint32)Len()); + return FString(End - Start, **this + Start); + } + + /** + * Searches the string for a substring, and returns index into this string + * of the first found instance. Can search from beginning or end, and ignore case or not. + * + * @param SubStr The string array of TCHAR to search for + * @param StartPosition The start character position to search from + * @param SearchCase Indicates whether the search is case sensitive or not + * @param SearchDir Indicates whether the search starts at the begining or at the end. + */ + int32 Find(const TCHAR* SubStr, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, + ESearchDir::Type SearchDir = ESearchDir::FromStart, int32 StartPosition = INDEX_NONE) const; + + /** + * Searches the string for a substring, and returns index into this string + * of the first found instance. Can search from beginning or end, and ignore case or not. + * + * @param SubStr The string to search for + * @param StartPosition The start character position to search from + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @param SearchDir Indicates whether the search starts at the begining or at the end ( defaults to ESearchDir::FromStart ) + */ + FORCEINLINE int32 Find(const FString& SubStr, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, + ESearchDir::Type SearchDir = ESearchDir::FromStart, int32 StartPosition = INDEX_NONE) const + { + return Find(*SubStr, SearchCase, SearchDir, StartPosition); + } + + /** + * Returns whether this string contains the specified substring. + * + * @param SubStr Find to search for + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @param SearchDir Indicates whether the search starts at the begining or at the end ( defaults to ESearchDir::FromStart ) + * @return Returns whether the string contains the substring + **/ + FORCEINLINE bool Contains(const TCHAR* SubStr, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, + ESearchDir::Type SearchDir = ESearchDir::FromStart) const + { + return Find(SubStr, SearchCase, SearchDir) != INDEX_NONE; + } + + /** + * Returns whether this string contains the specified substring. + * + * @param SubStr Find to search for + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @param SearchDir Indicates whether the search starts at the begining or at the end ( defaults to ESearchDir::FromStart ) + * @return Returns whether the string contains the substring + **/ + FORCEINLINE bool Contains(const FString& SubStr, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, + ESearchDir::Type SearchDir = ESearchDir::FromStart) const + { + return Find(*SubStr, SearchCase, SearchDir) != INDEX_NONE; + } + + /** + * Searches the string for a character + * + * @param InChar the character to search for + * @param Index out the position the character was found at, INDEX_NONE if return is false + * @return true if character was found in this string, otherwise false + */ + FORCEINLINE bool FindChar(TCHAR InChar, int32& Index) const + { + return Data.Find(InChar, Index); + } + + /** + * Searches the string for the last occurrence of a character + * + * @param InChar the character to search for + * @param Index out the position the character was found at, INDEX_NONE if return is false + * @return true if character was found in this string, otherwise false + */ + FORCEINLINE bool FindLastChar(TCHAR InChar, int32& Index) const + { + return Data.FindLast(InChar, Index); + } + + /** + * Searches an initial substring for the last occurrence of a character which matches the specified predicate. + * + * @param Pred Predicate that takes TCHAR and returns true if TCHAR matches search criteria, false otherwise. + * @param Count The number of characters from the front of the string through which to search. + * + * @return Index of found TCHAR, INDEX_NONE otherwise. + */ + template + FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred, int32 Count) const + { + return Data.FindLastByPredicate(Pred, Count); + } + + /** + * Searches the string for the last occurrence of a character which matches the specified predicate. + * + * @param Pred Predicate that takes TCHAR and returns true if TCHAR matches search criteria, false otherwise. + * @param StartIndex Index of element from which to start searching. Defaults to last TCHAR in string. + * + * @return Index of found TCHAR, INDEX_NONE otherwise. + */ + template + FORCEINLINE int32 FindLastCharByPredicate(Predicate Pred) const + { + return Data.FindLastByPredicate(Pred, this->Len()); + } + + /** + * Lexicographically tests whether this string is equivalent to the Other given string + * + * @param Other The string test against + * @param SearchCase Whether or not the comparison should ignore case + * @return true if this string is lexicographically equivalent to the other, otherwise false + */ + FORCEINLINE bool Equals(const FString& Other, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) const + { + if (SearchCase == ESearchCase::CaseSensitive) + { + return FCString::Strcmp(**this, *Other) == 0; + } + else + { + return FCString::Stricmp(**this, *Other) == 0; + } + } + + /** + * Lexicographically tests how this string compares to the Other given string + * + * @param Other The string test against + * @param SearchCase Whether or not the comparison should ignore case + * @return 0 if equal, negative if less than, positive if greater than + */ + FORCEINLINE int32 Compare(const FString& Other, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) const + { + if (SearchCase == ESearchCase::CaseSensitive) + { + return FCString::Strcmp(**this, *Other); + } + else + { + return FCString::Stricmp(**this, *Other); + } + } + + /** + * Splits this string at given string position case sensitive. + * + * @param InStr The string to search and split at + * @param LeftS out the string to the left of InStr, not updated if return is false + * @param RightS out the string to the right of InStr, not updated if return is false + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @param SearchDir Indicates whether the search starts at the begining or at the end ( defaults to ESearchDir::FromStart ) + * @return true if string is split, otherwise false + */ + bool Split(const FString& InS, FString* LeftS, FString* RightS, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, + ESearchDir::Type SearchDir = ESearchDir::FromStart) const + { + int32 InPos = Find(InS, SearchCase, SearchDir); + + if (InPos < 0) { return false; } + + if (LeftS) { *LeftS = Left(InPos); } + if (RightS) { *RightS = Mid(InPos + InS.Len()); } + + return true; + } + + /** @return a new string with the characters of this converted to uppercase */ + FString ToUpper() const &; + + /** + * Converts all characters in this rvalue string to uppercase and moves it into the returned string. + * @return a new string with the characters of this converted to uppercase + */ + FString ToUpper() && ; + + /** Converts all characters in this string to uppercase */ + void ToUpperInline(); + + /** @return a new string with the characters of this converted to lowercase */ + FString ToLower() const &; + + /** + * Converts all characters in this rvalue string to lowercase and moves it into the returned string. + * @return a new string with the characters of this converted to lowercase + */ + FString ToLower() && ; + + /** Converts all characters in this string to lowercase */ + void ToLowerInline(); + + /** Pad the left of this string for ChCount characters */ + FString LeftPad(int32 ChCount) const; + + /** Pad the right of this string for ChCount characters */ + FString RightPad(int32 ChCount) const; + + /** @return true if the string only contains numeric characters */ + bool IsNumeric() const; + + // @return string with Ch character + static FString Chr(TCHAR Ch); + + /** + * Returns a string that is full of a variable number of characters + * + * @param NumCharacters Number of characters to put into the string + * @param Char Character to put into the string + * + * @return The string of NumCharacters characters. + */ + static FString ChrN(int32 NumCharacters, TCHAR Char); + + /** + * Test whether this string starts with given string. + * + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return true if this string begins with specified text, false otherwise + */ + bool StartsWith(const TCHAR* InSuffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Test whether this string starts with given string. + * + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return true if this string begins with specified text, false otherwise + */ + bool StartsWith(const FString& InPrefix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Test whether this string ends with given string. + * + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return true if this string ends with specified text, false otherwise + */ + bool EndsWith(const TCHAR* InSuffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Test whether this string ends with given string. + * + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return true if this string ends with specified text, false otherwise + */ + bool EndsWith(const FString& InSuffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Searches this string for a given wild card + * + * @param Wildcard *?-type wildcard + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return true if this string matches the *?-type wildcard given. + * @warning This is a simple, SLOW routine. Use with caution + */ + bool MatchesWildcard(const FString& Wildcard, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Removes whitespace characters from the start and end of this string. Modifies the string in-place. + */ + void TrimStartAndEndInline(); + + /** + * Removes whitespace characters from the start and end of this string. + * @note Unlike Trim() this function returns a copy, and does not mutate the string. + */ + FString TrimStartAndEnd() const &; + + /** + * Removes whitespace characters from the start and end of this string. + * @note Unlike Trim() this function returns a copy, and does not mutate the string. + */ + FString TrimStartAndEnd() && ; + + /** + * Removes whitespace characters from the start of this string. Modifies the string in-place. + */ + void TrimStartInline(); + + /** + * Removes whitespace characters from the start of this string. + * @note Unlike Trim() this function returns a copy, and does not mutate the string. + */ + FString TrimStart() const &; + + /** + * Removes whitespace characters from the start of this string. + * @note Unlike Trim() this function returns a copy, and does not mutate the string. + */ + FString TrimStart() && ; + + /** + * Removes whitespace characters from the end of this string. Modifies the string in-place. + */ + void TrimEndInline(); + + /** + * Removes whitespace characters from the end of this string. + * @note Unlike TrimTrailing() this function returns a copy, and does not mutate the string. + */ + FString TrimEnd() const &; + + /** + * Removes whitespace characters from the end of this string. + * @note Unlike TrimTrailing() this function returns a copy, and does not mutate the string. + */ + FString TrimEnd() && ; + + /** + * Trims the inner array after the null terminator. + */ + void TrimToNullTerminator(); + + /** + * Returns a copy of this string with wrapping quotation marks removed. + */ + FString TrimQuotes(bool* bQuotesRemoved = nullptr) const; + + /** + * Breaks up a delimited string into elements of a string array. + * + * @param InArray The array to fill with the string pieces + * @param pchDelim The string to delimit on + * @param InCullEmpty If 1, empty strings are not added to the array + * + * @return The number of elements in InArray + */ + int32 ParseIntoArray(TArray& OutArray, const TCHAR* pchDelim, bool InCullEmpty = true) const; + + /** + * Breaks up a delimited string into elements of a string array, using any whitespace and an + * optional extra delimter, like a "," + * @warning Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all! + * + * @param InArray The array to fill with the string pieces + * @param pchExtraDelim The string to delimit on + * + * @return The number of elements in InArray + */ + int32 ParseIntoArrayWS(TArray& OutArray, const TCHAR* pchExtraDelim = nullptr, bool InCullEmpty = true) const; + + /** + * Breaks up a delimited string into elements of a string array, using line ending characters + * @warning Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all! + * + * @param InArray The array to fill with the string pieces + * + * @return The number of elements in InArray + */ + int32 ParseIntoArrayLines(TArray& OutArray, bool InCullEmpty = true) const; + + /** + * Breaks up a delimited string into elements of a string array, using the given delimiters + * @warning Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all! + * + * @param InArray The array to fill with the string pieces + * @param DelimArray The strings to delimit on + * @param NumDelims The number of delimiters. + * + * @return The number of elements in InArray + */ + int32 ParseIntoArray(TArray& OutArray, const TCHAR** DelimArray, int32 NumDelims, bool InCullEmpty = true) const; + + /** + * Takes an array of strings and removes any zero length entries. + * + * @param InArray The array to cull + * + * @return The number of elements left in InArray + */ + static int32 CullArray(TArray* InArray); + + /** + * Returns a copy of this string, with the characters in reverse order + */ + FString Reverse() const; + + /** + * Reverses the order of characters in this string + */ + void ReverseString(); + + /** + * Replace all occurrences of a substring in this string + * + * @param From substring to replace + * @param To substring to replace From with + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * @return a copy of this string with the replacement made + */ + FString Replace(const TCHAR* From, const TCHAR* To, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const; + + /** + * Replace all occurrences of SearchText with ReplacementText in this string. + * + * @param SearchText the text that should be removed from this string + * @param ReplacementText the text to insert in its place + * @param SearchCase Indicates whether the search is case sensitive or not ( defaults to ESearchCase::IgnoreCase ) + * + * @return the number of occurrences of SearchText that were replaced. + */ + int32 ReplaceInline(const TCHAR* SearchText, const TCHAR* ReplacementText, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase); + + /** + * Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) + */ + FString ReplaceQuotesWithEscapedQuotes() const; + + /** + * Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\\n"). + * The characters supported are: { \n, \r, \t, \', \", \\ }. + * + * @param Chars by default, replaces all supported characters; this parameter allows you to limit the replacement to a subset. + * + * @return a string with all control characters replaced by the escaped version. + */ + FString ReplaceCharWithEscapedChar(const TArray* Chars = nullptr) const; + + /** + * Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. (i.e. + * replaces "\\n" with "\n". Counterpart to ReplaceCharWithEscapedChar(). + * @return copy of this string with replacement made + */ + FString ReplaceEscapedCharWithChar(const TArray* Chars = nullptr) const; + + /** + * Replaces all instances of '\t' with TabWidth number of spaces + * @param InSpacesPerTab - Number of spaces that a tab represents + * @return copy of this string with replacement made + */ + FString ConvertTabsToSpaces(const int32 InSpacesPerTab); + + // Takes the number passed in and formats the string in comma format ( 12345 becomes "12,345") + static FString FormatAsNumber(int32 InNumber); + + // To allow more efficient memory handling, automatically adds one for the string termination. + FORCEINLINE void Reserve(const uint32 CharacterCount) + { + Data.Reserve(CharacterCount + 1); + } + + /** Converts an integer to a string. */ + static FORCEINLINE FString FromInt(int32 Num) + { + FString Ret; + Ret.AppendInt(Num); + return Ret; + } + + /** appends the integer InNum to this string */ + void AppendInt(int32 InNum); + + /** + * Converts a string into a buffer + * + * @param DestBuffer the buffer to fill with the string data + * @param DestSize the size of the buffer in bytes (must be at least string len / 3) + * + * @return true if the conversion happened, false otherwise + */ + static bool ToBlob(const FString& Source, uint8* DestBuffer, const uint32 DestSize); + + /** + * Converts a string into a buffer + * + * @param DestBuffer the buffer to fill with the string data + * @param DestSize the size of the buffer in bytes (must be at least string len / 2) + * + * @return true if the conversion happened, false otherwise + */ + static bool ToHexBlob(const FString& Source, uint8* DestBuffer, const uint32 DestSize); + + /** + * Joins an array of 'something that can be concatentated to strings with +=' together into a single string with separators. + * + * @param Array The array of 'things' to concatenate. + * @param Separator The string used to separate each element. + * + * @return The final, joined, separated string. + */ + template + static FString Join(const TArray& Array, const TCHAR* Separator) + { + FString Result; + bool First = true; + for (const T& Element : Array) + { + if (First) + { + First = false; + } + else + { + Result += Separator; + } + + Result += Element; + } + + return Result; + } + + /** + * \brief Convert FString to std::string + */ + std::string ToString() const + { + TCHAR* data = Data.GetData(); + + if (!data) + return ""; + + const auto length = Len(); + std::string str(length, '\0'); + std::use_facet>(std::locale()).narrow(data, data + length, '?', str.data()); + + return str; + } + + /** + * \brief Formats text using fmt::format + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param format Message + * \param args Optional arguments + * \return Formatted text + */ + template + static FString Format(const T* format, Args&&... args) + { + if constexpr (!TIsCharType::Value) + static_assert(TIsCharType::Value, "format must be a char or wchar_t"); + + auto formatted_msg = fmt::format(format, std::forward(args)...); + + return FString(formatted_msg.c_str()); + } +}; + + +template<> +struct TContainerTraits : public TContainerTraitsBase +{ + enum { MoveWillEmptyContainer = TContainerTraits::MoveWillEmptyContainer }; +}; + +template<> struct TIsZeroConstructType { enum { Value = true }; }; +Expose_TNameOf(FString) + +template <> +struct TIsContiguousContainer +{ + enum { Value = true }; +}; + +inline TCHAR* GetData(FString& String) +{ + return String.GetCharArray().GetData(); +} + +inline const TCHAR* GetData(const FString& String) +{ + return String.GetCharArray().GetData(); +} + +inline SIZE_T GetNum(const FString& String) +{ + return String.GetCharArray().Num(); +} + +/** +* Convert an array of bytes to a TCHAR +* @param In byte array values to convert +* @param Count number of bytes to convert +* @return Valid string representing bytes. +*/ +inline FString BytesToString(const uint8* In, int32 Count) +{ + FString Result; + Result.Empty(Count); + + while (Count) + { + // Put the byte into an int16 and add 1 to it, this keeps anything from being put into the string as a null terminator + int16 Value = *In; + Value += 1; + + Result += TCHAR(Value); + + ++In; + Count--; + } + return Result; +} + +/** +* Convert FString of bytes into the byte array. +* @param String The FString of byte values +* @param OutBytes Ptr to memory must be preallocated large enough +* @param MaxBufferSize Max buffer size of the OutBytes array, to prevent overflow +* @return The number of bytes copied +*/ +inline int32 StringToBytes(const FString& String, uint8* OutBytes, int32 MaxBufferSize) +{ + int32 NumBytes = 0; + const TCHAR* CharPos = *String; + + while (*CharPos && NumBytes < MaxBufferSize) + { + OutBytes[NumBytes] = (int8)(*CharPos - 1); + CharPos++; + ++NumBytes; + } + return NumBytes - 1; +} + +/** @return Char value of Nibble */ +inline TCHAR NibbleToTChar(uint8 Num) +{ + if (Num > 9) + { + return TEXT('A') + TCHAR(Num - 10); + } + return TEXT('0') + TCHAR(Num); +} + +/** +* Convert a byte to hex +* @param In byte value to convert +* @param Result out hex value output +*/ +inline void ByteToHex(uint8 In, FString& Result) +{ + Result += NibbleToTChar(In >> 4); + Result += NibbleToTChar(In & 15); +} + +/** +* Convert an array of bytes to hex +* @param In byte array values to convert +* @param Count number of bytes to convert +* @return Hex value in string. +*/ +inline FString BytesToHex(const uint8* In, int32 Count) +{ + FString Result; + Result.Empty(Count * 2); + + while (Count) + { + ByteToHex(*In++, Result); + Count--; + } + return Result; +} + +/** +* Checks if the TChar is a valid hex character +* @param Char The character +* @return True if in 0-9 and A-F ranges +*/ +inline const bool CheckTCharIsHex(const TCHAR Char) +{ + return (Char >= TEXT('0') && Char <= TEXT('9')) || (Char >= TEXT('A') && Char <= TEXT('F')) || (Char >= TEXT('a') && Char <= TEXT('f')); +} + +/** +* Convert a TChar to equivalent hex value as a uint8 +* @param Char The character +* @return The uint8 value of a hex character +*/ +inline const uint8 TCharToNibble(const TCHAR Char) +{ + check(CheckTCharIsHex(Char)); + if (Char >= TEXT('0') && Char <= TEXT('9')) + { + return Char - TEXT('0'); + } + else if (Char >= TEXT('A') && Char <= TEXT('F')) + { + return (Char - TEXT('A')) + 10; + } + return (Char - TEXT('a')) + 10; +} + +/** +* Convert FString of Hex digits into the byte array. +* @param HexString The FString of Hex values +* @param OutBytes Ptr to memory must be preallocated large enough +* @return The number of bytes copied +*/ +inline int32 HexToBytes(const FString& HexString, uint8* OutBytes) +{ + int32 NumBytes = 0; + const bool bPadNibble = (HexString.Len() % 2) == 1; + const TCHAR* CharPos = *HexString; + if (bPadNibble) + { + OutBytes[NumBytes++] = TCharToNibble(*CharPos++); + } + while (*CharPos) + { + OutBytes[NumBytes] = TCharToNibble(*CharPos++) << 4; + OutBytes[NumBytes] += TCharToNibble(*CharPos++); + ++NumBytes; + } + return NumBytes; +} + +/** Namespace that houses lexical conversion for various types. User defined conversions can be implemented externally */ +namespace Lex +{ + /** + * Expected functions in this namespace are as follows: + * bool TryParseString(T& OutValue, const TCHAR* Buffer); + * void FromString(T& OutValue, const TCHAR* Buffer); + * ToString(T); + * ^-- Generally this means it can return either FString or const TCHAR* + * Generic code that uses ToString should assign to an FString or forward along to other functions + * that accept types that are also implicitly convertible to FString + * + * Implement custom functionality externally. + */ + + /** Covert a string buffer to intrinsic types */ + inline void FromString(int8& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi(Buffer); } + inline void FromString(int16& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi(Buffer); } + inline void FromString(int32& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi(Buffer); } + inline void FromString(int64& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi64(Buffer); } + inline void FromString(uint8& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi(Buffer); } + inline void FromString(uint16& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi(Buffer); } + inline void FromString(uint32& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atoi64(Buffer); } //64 because this unsigned and so Atoi might overflow + inline void FromString(uint64& OutValue, const TCHAR* Buffer) { OutValue = FCString::Strtoui64(Buffer, nullptr, 0); } + inline void FromString(float& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atof(Buffer); } + inline void FromString(double& OutValue, const TCHAR* Buffer) { OutValue = FCString::Atod(Buffer); } + inline void FromString(FString& OutValue, const TCHAR* Buffer) { OutValue = Buffer; } + + template + typename TEnableIf::Value, FString>::Type + ToString(const CharType* Ptr) + { + return FString(Ptr); + } + + inline FString ToString(bool Value) + { + return Value ? TEXT("true") : TEXT("false"); + } + + FORCEINLINE FString ToString(FString&& Str) + { + return MoveTemp(Str); + } + + FORCEINLINE FString ToString(const FString& Str) + { + return Str; + } + + /** Helper template to convert to sanitized strings */ + template + FString ToSanitizedString(const T& Value) + { + return ToString(Value); + } + + /** Parse a string into this type, returning whether it was successful */ + /** Specialization for arithmetic types */ + template + static typename TEnableIf::Value, bool>::Type + TryParseString(T& OutValue, const TCHAR* Buffer) + { + if (FCString::IsNumeric(Buffer)) + { + FromString(OutValue, Buffer); + return true; + } + return false; + } +} + +// Deprecated alias for old LexicalConversion namespace. +// Namespace alias deprecation doesn't work on our compilers, so we can't actually mark it with the DEPRECATED() macro. +namespace LexicalConversion = Lex; + +/** Shorthand legacy use for Lex functions */ +template +struct TTypeToString +{ + static FString ToString(const T& Value) { return Lex::ToString(Value); } + static FString ToSanitizedString(const T& Value) { return Lex::ToSanitizedString(Value); } +}; +template +struct TTypeFromString +{ + static void FromString(T& Value, const TCHAR* Buffer) { return Lex::FromString(Value, Buffer); } +}; + + +/* FString implementation +*****************************************************************************/ + +namespace UE4String_Private +{ + struct FCompareCharsCaseSensitive + { + static FORCEINLINE bool Compare(TCHAR Lhs, TCHAR Rhs) + { + return Lhs == Rhs; + } + }; + + struct FCompareCharsCaseInsensitive + { + static FORCEINLINE bool Compare(TCHAR Lhs, TCHAR Rhs) + { + return FChar::ToLower(Lhs) == FChar::ToLower(Rhs); + } + }; + + template + bool MatchesWildcardRecursive(const TCHAR* Target, int32 TargetLength, const TCHAR* Wildcard, int32 WildcardLength) + { + // Skip over common initial non-wildcard-char sequence of Target and Wildcard + for (;;) + { + TCHAR WCh = *Wildcard; + if (WCh == TEXT('*') || WCh == TEXT('?')) + { + break; + } + + if (!CompareType::Compare(*Target, WCh)) + { + return false; + } + + if (WCh == TEXT('\0')) + { + return true; + } + + ++Target; + ++Wildcard; + --TargetLength; + --WildcardLength; + } + + // Test for common suffix + const TCHAR* TPtr = Target + TargetLength; + const TCHAR* WPtr = Wildcard + WildcardLength; + for (;;) + { + --TPtr; + --WPtr; + + TCHAR WCh = *WPtr; + if (WCh == TEXT('*') || WCh == TEXT('?')) + { + break; + } + + if (!CompareType::Compare(*TPtr, WCh)) + { + return false; + } + + --TargetLength; + if (TargetLength == 0) + { + return false; + } + + --WildcardLength; + } + + // Match * against anything and ? against single (and zero?) chars + TCHAR FirstWild = *Wildcard; + if (WildcardLength == 1 && (FirstWild == TEXT('*') || TargetLength < 2)) + { + return true; + } + ++Wildcard; + --WildcardLength; + + // This routine is very slow, though it does ok with one wildcard + int32 MaxNum = TargetLength; + if (FirstWild == TEXT('?') && MaxNum > 1) + { + MaxNum = 1; + } + + for (int32 Index = 0; Index <= MaxNum; ++Index) + { + if (MatchesWildcardRecursive(Target, TargetLength - Index, Wildcard, WildcardLength)) + { + return true; + } + } + return false; + } +} + +inline void FString::TrimToNullTerminator() +{ + if (Data.Num()) + { + int32 DataLen = FCString::Strlen(Data.GetData()); + int32 Len = DataLen > 0 ? DataLen + 1 : 0; + + Data.RemoveAt(Len, Data.Num() - Len); + } +} + + +inline int32 FString::Find(const TCHAR* SubStr, ESearchCase::Type SearchCase, ESearchDir::Type SearchDir, int32 StartPosition) const +{ + if (SubStr == nullptr) + { + return INDEX_NONE; + } + if (SearchDir == ESearchDir::FromStart) + { + const TCHAR* Start = **this; + if (StartPosition != INDEX_NONE) + { + Start += FMath::Clamp(StartPosition, 0, Len() - 1); + } + const TCHAR* Tmp = SearchCase == ESearchCase::IgnoreCase + ? FCString::Stristr(Start, SubStr) + : FCString::Strstr(Start, SubStr); + + return Tmp ? (Tmp - **this) : INDEX_NONE; + } + else + { + // if ignoring, do a onetime ToUpper on both strings, to avoid ToUppering multiple + // times in the loop below + if (SearchCase == ESearchCase::IgnoreCase) + { + return ToUpper().Find(FString(SubStr).ToUpper(), ESearchCase::CaseSensitive, SearchDir, StartPosition); + } + else + { + const int32 SearchStringLength = FMath::Max(1, FCString::Strlen(SubStr)); + + if (StartPosition == INDEX_NONE || StartPosition >= Len()) + { + StartPosition = Len(); + } + + for (int32 i = StartPosition - SearchStringLength; i >= 0; i--) + { + int32 j; + for (j = 0; SubStr[j]; j++) + { + if ((*this)[i + j] != SubStr[j]) + { + break; + } + } + + if (!SubStr[j]) + { + return i; + } + } + return INDEX_NONE; + } + } +} + +inline FString FString::ToUpper() const & +{ + FString New = *this; + New.ToUpperInline(); + return New; +} + +inline FString FString::ToUpper() && +{ + this->ToUpperInline(); + return MoveTemp(*this); +} + +inline void FString::ToUpperInline() +{ + const int32 StringLength = Len(); + TCHAR* RawData = Data.GetData(); + for (int32 i = 0; i < StringLength; ++i) + { + RawData[i] = FChar::ToUpper(RawData[i]); + } +} + + +inline FString FString::ToLower() const & +{ + FString New = *this; + New.ToLowerInline(); + return New; +} + +inline FString FString::ToLower() && +{ + this->ToLowerInline(); + return MoveTemp(*this); +} + +inline void FString::ToLowerInline() +{ + const int32 StringLength = Len(); + TCHAR* RawData = Data.GetData(); + for (int32 i = 0; i < StringLength; ++i) + { + RawData[i] = FChar::ToLower(RawData[i]); + } +} + +inline bool FString::StartsWith(const TCHAR* InPrefix, ESearchCase::Type SearchCase) const +{ + if (SearchCase == ESearchCase::IgnoreCase) + { + return InPrefix && *InPrefix && !FCString::Strnicmp(**this, InPrefix, FCString::Strlen(InPrefix)); + } + else + { + return InPrefix && *InPrefix && !FCString::Strncmp(**this, InPrefix, FCString::Strlen(InPrefix)); + } +} + +inline bool FString::StartsWith(const FString& InPrefix, ESearchCase::Type SearchCase) const +{ + if (SearchCase == ESearchCase::IgnoreCase) + { + return InPrefix.Len() > 0 && !FCString::Strnicmp(**this, *InPrefix, InPrefix.Len()); + } + else + { + return InPrefix.Len() > 0 && !FCString::Strncmp(**this, *InPrefix, InPrefix.Len()); + } +} + +inline bool FString::EndsWith(const TCHAR* InSuffix, ESearchCase::Type SearchCase) const +{ + if (!InSuffix || *InSuffix == TEXT('\0')) + { + return false; + } + + int32 ThisLen = this->Len(); + int32 SuffixLen = FCString::Strlen(InSuffix); + if (SuffixLen > ThisLen) + { + return false; + } + + const TCHAR* StrPtr = Data.GetData() + ThisLen - SuffixLen; + if (SearchCase == ESearchCase::IgnoreCase) + { + return !FCString::Stricmp(StrPtr, InSuffix); + } + else + { + return !FCString::Strcmp(StrPtr, InSuffix); + } +} + +inline bool FString::EndsWith(const FString& InSuffix, ESearchCase::Type SearchCase) const +{ + if (SearchCase == ESearchCase::IgnoreCase) + { + return InSuffix.Len() > 0 && + Len() >= InSuffix.Len() && + !FCString::Stricmp(&(*this)[Len() - InSuffix.Len()], *InSuffix); + } + else + { + return InSuffix.Len() > 0 && + Len() >= InSuffix.Len() && + !FCString::Strcmp(&(*this)[Len() - InSuffix.Len()], *InSuffix); + } +} + +inline bool FString::RemoveFromStart(const FString& InPrefix, ESearchCase::Type SearchCase) +{ + if (InPrefix.IsEmpty()) + { + return false; + } + + if (StartsWith(InPrefix, SearchCase)) + { + RemoveAt(0, InPrefix.Len()); + return true; + } + + return false; +} + +inline bool FString::RemoveFromEnd(const FString& InSuffix, ESearchCase::Type SearchCase) +{ + if (InSuffix.IsEmpty()) + { + return false; + } + + if (EndsWith(InSuffix, SearchCase)) + { + RemoveAt(Len() - InSuffix.Len(), InSuffix.Len()); + return true; + } + + return false; +} + +/** +* Concatenate this path with given path ensuring the / character is used between them +* +* @param Str Pointer to an array of TCHARs (not necessarily null-terminated) to be concatenated onto the end of this. +* @param StrLength Exact number of characters from Str to append. +*/ +inline void FString::PathAppend(const TCHAR* Str, int32 StrLength) +{ + int32 DataNum = Data.Num(); + if (StrLength == 0) + { + if (DataNum > 1 && Data[DataNum - 2] != TEXT('/') && Data[DataNum - 2] != TEXT('\\')) + { + Data[DataNum - 1] = TEXT('/'); + Data.Add(TEXT('\0')); + } + } + else + { + if (DataNum > 0) + { + if (DataNum > 1 && Data[DataNum - 2] != TEXT('/') && Data[DataNum - 2] != TEXT('\\') && *Str != TEXT('/')) + { + Data[DataNum - 1] = TEXT('/'); + } + else + { + Data.Pop(false); + --DataNum; + } + } + + Data.Reserve(DataNum + StrLength + 1); + Data.Append(Str, StrLength); + Data.Add(TEXT('\0')); + } +} + +inline void FString::TrimStartAndEndInline() +{ + TrimEndInline(); + TrimStartInline(); +} + +inline FString FString::TrimStartAndEnd() const & +{ + FString Result(*this); + Result.TrimStartAndEndInline(); + return Result; +} + +inline FString FString::TrimStartAndEnd() && +{ + FString Result(MoveTemp(*this)); + Result.TrimStartAndEndInline(); + return Result; +} + +inline void FString::TrimStartInline() +{ + int32 Pos = 0; + while (Pos < Len() && FChar::IsWhitespace((*this)[Pos])) + { + Pos++; + } + RemoveAt(0, Pos); +} + +inline FString FString::TrimStart() const & +{ + FString Result(*this); + Result.TrimStartInline(); + return Result; +} + +inline FString FString::TrimStart() && +{ + FString Result(MoveTemp(*this)); + Result.TrimStartInline(); + return Result; +} + +inline void FString::TrimEndInline() +{ + int32 End = Len(); + while (End > 0 && FChar::IsWhitespace((*this)[End - 1])) + { + End--; + } + RemoveAt(End, Len() - End); +} + +inline FString FString::TrimEnd() const & +{ + FString Result(*this); + Result.TrimEndInline(); + return Result; +} + +inline FString FString::TrimEnd() && +{ + FString Result(MoveTemp(*this)); + Result.TrimEndInline(); + return Result; +} + +inline FString FString::TrimQuotes(bool* bQuotesRemoved) const +{ + bool bQuotesWereRemoved = false; + int32 Start = 0, Count = Len(); + if (Count > 0) + { + if ((*this)[0] == TCHAR('"')) + { + Start++; + Count--; + bQuotesWereRemoved = true; + } + + if (Len() > 1 && (*this)[Len() - 1] == TCHAR('"')) + { + Count--; + bQuotesWereRemoved = true; + } + } + + if (bQuotesRemoved != nullptr) + { + *bQuotesRemoved = bQuotesWereRemoved; + } + return Mid(Start, Count); +} + +inline int32 FString::CullArray(TArray* InArray) +{ + FString Empty; + InArray->Remove(Empty); + return InArray->Num(); +} + +inline FString FString::Reverse() const +{ + FString New(*this); + New.ReverseString(); + return New; +} + +inline void FString::ReverseString() +{ + if (Len() > 0) + { + TCHAR* StartChar = &(*this)[0]; + TCHAR* EndChar = &(*this)[Len() - 1]; + TCHAR TempChar; + do + { + TempChar = *StartChar; // store the current value of StartChar + *StartChar = *EndChar; // change the value of StartChar to the value of EndChar + *EndChar = TempChar; // change the value of EndChar to the character that was previously at StartChar + + StartChar++; + EndChar--; + + } while (StartChar < EndChar); // repeat until we've reached the midpoint of the string + } +} + +inline FString FString::FormatAsNumber(int32 InNumber) +{ + FString Number = FString::FromInt(InNumber), Result; + + int32 dec = 0; + for (int32 x = Number.Len() - 1; x > -1; --x) + { + Result += Number.Mid(x, 1); + + dec++; + if (dec == 3 && x > 0) + { + Result += TEXT(","); + dec = 0; + } + } + + return Result.Reverse(); +} + +inline void FString::AppendInt(int32 InNum) +{ + int64 Num = InNum; // This avoids having to deal with negating -MAX_int32-1 + const TCHAR* NumberChar[11] = { TEXT("0"), TEXT("1"), TEXT("2"), TEXT("3"), TEXT("4"), TEXT("5"), TEXT("6"), TEXT("7"), TEXT("8"), TEXT("9"), TEXT("-") }; + bool bIsNumberNegative = false; + TCHAR TempNum[16]; // 16 is big enough + int32 TempAt = 16; // fill the temp string from the top down. + + // Correctly handle negative numbers and convert to positive integer. + if (Num < 0) + { + bIsNumberNegative = true; + Num = -Num; + } + + TempNum[--TempAt] = 0; // NULL terminator + + // Convert to string assuming base ten and a positive integer. + do + { + TempNum[--TempAt] = *NumberChar[Num % 10]; + Num /= 10; + } while (Num); + + // Append sign as we're going to reverse string afterwards. + if (bIsNumberNegative) + { + TempNum[--TempAt] = *NumberChar[10]; + } + + *this += TempNum + TempAt; +} + +inline bool FString::ToBlob(const FString& Source, uint8* DestBuffer, const uint32 DestSize) +{ + // Make sure the buffer is at least half the size and that the string is an + // even number of characters long + if (DestSize >= (uint32)(Source.Len() / 3) && + (Source.Len() % 3) == 0) + { + TCHAR ConvBuffer[4]; + ConvBuffer[3] = TEXT('\0'); + int32 WriteIndex = 0; + // Walk the string 3 chars at a time + for (int32 Index = 0; Index < Source.Len(); Index += 3, WriteIndex++) + { + ConvBuffer[0] = Source[Index]; + ConvBuffer[1] = Source[Index + 1]; + ConvBuffer[2] = Source[Index + 2]; + DestBuffer[WriteIndex] = FCString::Atoi(ConvBuffer); + } + return true; + } + return false; +} + +inline bool FString::ToHexBlob(const FString& Source, uint8* DestBuffer, const uint32 DestSize) +{ + // Make sure the buffer is at least half the size and that the string is an + // even number of characters long + if (DestSize >= (uint32)(Source.Len() / 2) && + (Source.Len() % 2) == 0) + { + TCHAR ConvBuffer[3]; + ConvBuffer[2] = TEXT('\0'); + int32 WriteIndex = 0; + // Walk the string 2 chars at a time + TCHAR* End = nullptr; + for (int32 Index = 0; Index < Source.Len(); Index += 2, WriteIndex++) + { + ConvBuffer[0] = Source[Index]; + ConvBuffer[1] = Source[Index + 1]; + DestBuffer[WriteIndex] = FCString::Strtoi(ConvBuffer, &End, 16); + } + return true; + } + return false; +} + +inline FString FString::Chr(TCHAR Ch) +{ + TCHAR Temp[2] = { Ch,0 }; + return FString(Temp); +} + + +inline FString FString::ChrN(int32 NumCharacters, TCHAR Char) +{ + FString Temp; + Temp.Data.AddUninitialized(NumCharacters + 1); + for (int32 Cx = 0; Cx < NumCharacters; ++Cx) + { + Temp[Cx] = Char; + } + Temp.Data[NumCharacters] = 0; + return Temp; +} + +inline FString FString::LeftPad(int32 ChCount) const +{ + int32 Pad = ChCount - Len(); + + if (Pad > 0) + { + return ChrN(Pad, ' ') + *this; + } + else + { + return *this; + } +} + +inline FString FString::RightPad(int32 ChCount) const +{ + int32 Pad = ChCount - Len(); + + if (Pad > 0) + { + return *this + ChrN(Pad, ' '); + } + else + { + return *this; + } +} + +inline bool FString::IsNumeric() const +{ + if (IsEmpty()) + { + return 0; + } + + return FCString::IsNumeric(Data.GetData()); +} + +/** +* Breaks up a delimited string into elements of a string array. +* +* @param InArray The array to fill with the string pieces +* @param pchDelim The string to delimit on +* @param InCullEmpty If 1, empty strings are not added to the array +* +* @return The number of elements in InArray +*/ +inline int32 FString::ParseIntoArray(TArray& OutArray, const TCHAR* pchDelim, const bool InCullEmpty) const +{ + // Make sure the delimit string is not null or empty + OutArray.Reset(); + const TCHAR *Start = Data.GetData(); + const int32 DelimLength = FCString::Strlen(pchDelim); + if (Start && DelimLength) + { + while (const TCHAR *At = FCString::Strstr(Start, pchDelim)) + { + if (!InCullEmpty || At - Start) + { + OutArray.Emplace(At - Start, Start); + } + Start = At + DelimLength; + } + if (!InCullEmpty || *Start) + { + OutArray.Emplace(Start); + } + + } + return OutArray.Num(); +} + +inline bool FString::MatchesWildcard(const FString& InWildcard, ESearchCase::Type SearchCase) const +{ + FString Wildcard(InWildcard); + FString Target(*this); + int32 IndexOfStar = Wildcard.Find(TEXT("*"), ESearchCase::CaseSensitive, ESearchDir::FromEnd); // last occurance + int32 IndexOfQuestion = Wildcard.Find(TEXT("?"), ESearchCase::CaseSensitive, ESearchDir::FromEnd); // last occurance + int32 Suffix = FMath::Max(IndexOfStar, IndexOfQuestion); + if (Suffix == INDEX_NONE) + { + // no wildcards + if (SearchCase == ESearchCase::IgnoreCase) + { + return FCString::Stricmp(*Target, *Wildcard) == 0; + } + else + { + return FCString::Strcmp(*Target, *Wildcard) == 0; + } + } + else + { + if (Suffix + 1 < Wildcard.Len()) + { + FString SuffixString = Wildcard.Mid(Suffix + 1); + if (!Target.EndsWith(SuffixString, SearchCase)) + { + return false; + } + Wildcard = Wildcard.Left(Suffix + 1); + Target = Target.Left(Target.Len() - SuffixString.Len()); + } + int32 PrefixIndexOfStar = Wildcard.Find(TEXT("*"), ESearchCase::CaseSensitive); + int32 PrefixIndexOfQuestion = Wildcard.Find(TEXT("?"), ESearchCase::CaseSensitive); + int32 Prefix = FMath::Min(PrefixIndexOfStar < 0 ? INT_MAX : PrefixIndexOfStar, PrefixIndexOfQuestion < 0 ? INT_MAX : PrefixIndexOfQuestion); + if (Prefix > 0) + { + FString PrefixString = Wildcard.Left(Prefix); + if (!Target.StartsWith(PrefixString, SearchCase)) + { + return false; + } + Wildcard = Wildcard.Mid(Prefix); + Target = Target.Mid(Prefix); + } + } + // This routine is very slow, though it does ok with one wildcard + TCHAR FirstWild = Wildcard[0]; + Wildcard = Wildcard.Right(Wildcard.Len() - 1); + if (FirstWild == TEXT('*') || FirstWild == TEXT('?')) + { + if (!Wildcard.Len()) + { + if (FirstWild == TEXT('*') || Target.Len() < 2) + { + return true; + } + } + int32 MaxNum = FMath::Min(Target.Len(), FirstWild == TEXT('?') ? 1 : INT_MAX); + for (int32 Index = 0; Index <= MaxNum; Index++) + { + if (Target.Right(Target.Len() - Index).MatchesWildcard(Wildcard, SearchCase)) + { + return true; + } + } + return false; + } + else + { + return false; + } +} + + +/** Caution!! this routine is O(N^2) allocations...use it for parsing very short text or not at all */ +inline int32 FString::ParseIntoArrayWS(TArray& OutArray, const TCHAR* pchExtraDelim, bool InCullEmpty) const +{ + // default array of White Spaces, the last entry can be replaced with the optional pchExtraDelim string + // (if you want to split on white space and another character) + static const TCHAR* WhiteSpace[] = + { + TEXT(" "), + TEXT("\t"), + TEXT("\r"), + TEXT("\n"), + TEXT(""), + }; + + // start with just the standard whitespaces + int32 NumWhiteSpaces = ARRAY_COUNT(WhiteSpace) - 1; + // if we got one passed in, use that in addition + if (pchExtraDelim && *pchExtraDelim) + { + WhiteSpace[NumWhiteSpaces++] = pchExtraDelim; + } + + return ParseIntoArray(OutArray, WhiteSpace, NumWhiteSpaces, InCullEmpty); +} + +inline int32 FString::ParseIntoArrayLines(TArray& OutArray, bool InCullEmpty) const +{ + // default array of LineEndings + static const TCHAR* LineEndings[] = + { + TEXT("\r\n"), + TEXT("\r"), + TEXT("\n"), + }; + + // start with just the standard line endings + int32 NumLineEndings = ARRAY_COUNT(LineEndings); + return ParseIntoArray(OutArray, LineEndings, NumLineEndings, InCullEmpty); +} + +#pragma warning(push) +#pragma warning(disable : 4291) + +inline int32 FString::ParseIntoArray(TArray& OutArray, const TCHAR** DelimArray, int32 NumDelims, bool InCullEmpty) const +{ + // Make sure the delimit string is not null or empty + OutArray.Empty(); + const TCHAR *Start = Data.GetData(); + const int32 Length = Len(); + if (Start) + { + int32 SubstringBeginIndex = 0; + + // Iterate through string. + for (int32 i = 0; i < Len();) + { + int32 SubstringEndIndex = INDEX_NONE; + int32 DelimiterLength = 0; + + // Attempt each delimiter. + for (int32 DelimIndex = 0; DelimIndex < NumDelims; ++DelimIndex) + { + DelimiterLength = FCString::Strlen(DelimArray[DelimIndex]); + + // If we found a delimiter... + if (FCString::Strncmp(Start + i, DelimArray[DelimIndex], DelimiterLength) == 0) + { + // Mark the end of the substring. + SubstringEndIndex = i; + break; + } + } + + if (SubstringEndIndex != INDEX_NONE) + { + const int32 SubstringLength = SubstringEndIndex - SubstringBeginIndex; + // If we're not culling empty strings or if we are but the string isn't empty anyways... + if (!InCullEmpty || SubstringLength != 0) + { + // ... add new string from substring beginning up to the beginning of this delimiter. + new (OutArray) FString(SubstringEndIndex - SubstringBeginIndex, Start + SubstringBeginIndex); + } + // Next substring begins at the end of the discovered delimiter. + SubstringBeginIndex = SubstringEndIndex + DelimiterLength; + i = SubstringBeginIndex; + } + else + { + ++i; + } + } + + // Add any remaining characters after the last delimiter. + const int32 SubstringLength = Length - SubstringBeginIndex; + // If we're not culling empty strings or if we are but the string isn't empty anyways... + if (!InCullEmpty || SubstringLength != 0) + { + // ... add new string from substring beginning up to the beginning of this delimiter. + new (OutArray) FString(Start + SubstringBeginIndex); + } + } + + return OutArray.Num(); +} + +#pragma warning(pop) + +inline FString FString::Replace(const TCHAR* From, const TCHAR* To, ESearchCase::Type SearchCase) const +{ + // Previous code used to accidentally accept a nullptr replacement string - this is no longer accepted. + + if (IsEmpty() || !From || !*From) + { + return *this; + } + + // get a pointer into the character data + const TCHAR* Travel = Data.GetData(); + + // precalc the lengths of the replacement strings + int32 FromLength = FCString::Strlen(From); + int32 ToLength = FCString::Strlen(To); + + FString Result; + while (true) + { + // look for From in the remaining string + const TCHAR* FromLocation = SearchCase == ESearchCase::IgnoreCase ? FCString::Stristr(Travel, From) : FCString::Strstr(Travel, From); + if (!FromLocation) + break; + + // copy everything up to FromLocation + Result.AppendChars(Travel, FromLocation - Travel); + + // copy over the To + Result.AppendChars(To, ToLength); + + Travel = FromLocation + FromLength; + } + + // copy anything left over + Result += Travel; + + return Result; +} + +inline int32 FString::ReplaceInline(const TCHAR* SearchText, const TCHAR* ReplacementText, ESearchCase::Type SearchCase) +{ + int32 ReplacementCount = 0; + + if (Len() > 0 + && SearchText != nullptr && *SearchText != 0 + && ReplacementText != nullptr && (SearchCase == ESearchCase::IgnoreCase || FCString::Strcmp(SearchText, ReplacementText) != 0)) + { + const int32 NumCharsToReplace = FCString::Strlen(SearchText); + const int32 NumCharsToInsert = FCString::Strlen(ReplacementText); + + if (NumCharsToInsert == NumCharsToReplace) + { + TCHAR* Pos = SearchCase == ESearchCase::IgnoreCase ? FCString::Stristr(&(*this)[0], SearchText) : FCString::Strstr(&(*this)[0], SearchText); + while (Pos != nullptr) + { + ReplacementCount++; + + // FCString::Strcpy now inserts a terminating zero so can't use that + for (int32 i = 0; i < NumCharsToInsert; i++) + { + Pos[i] = ReplacementText[i]; + } + + if (Pos + NumCharsToReplace - **this < Len()) + { + Pos = SearchCase == ESearchCase::IgnoreCase ? FCString::Stristr(Pos + NumCharsToReplace, SearchText) : FCString::Strstr(Pos + NumCharsToReplace, SearchText); + } + else + { + break; + } + } + } + else if (Contains(SearchText, SearchCase)) + { + FString Copy(*this); + Empty(Len()); + + // get a pointer into the character data + TCHAR* WritePosition = (TCHAR*)Copy.Data.GetData(); + // look for From in the remaining string + TCHAR* SearchPosition = SearchCase == ESearchCase::IgnoreCase ? FCString::Stristr(WritePosition, SearchText) : FCString::Strstr(WritePosition, SearchText); + while (SearchPosition != nullptr) + { + ReplacementCount++; + + // replace the first letter of the From with 0 so we can do a strcpy (FString +=) + *SearchPosition = 0; + + // copy everything up to the SearchPosition + (*this) += WritePosition; + + // copy over the ReplacementText + (*this) += ReplacementText; + + // restore the letter, just so we don't have 0's in the string + *SearchPosition = *SearchText; + + WritePosition = SearchPosition + NumCharsToReplace; + SearchPosition = SearchCase == ESearchCase::IgnoreCase ? FCString::Stristr(WritePosition, SearchText) : FCString::Strstr(WritePosition, SearchText); + } + + // copy anything left over + (*this) += WritePosition; + } + } + + return ReplacementCount; +} + + +/** +* Returns a copy of this string with all quote marks escaped (unless the quote is already escaped) +*/ +inline FString FString::ReplaceQuotesWithEscapedQuotes() const +{ + if (Contains(TEXT("\""), ESearchCase::CaseSensitive)) + { + FString Result; + + const TCHAR* pChar = **this; + + bool bEscaped = false; + while (*pChar != 0) + { + if (bEscaped) + { + bEscaped = false; + } + else if (*pChar == TCHAR('\\')) + { + bEscaped = true; + } + else if (*pChar == TCHAR('"')) + { + Result += TCHAR('\\'); + } + + Result += *pChar++; + } + + return Result; + } + + return *this; +} + +static const TCHAR* CharToEscapeSeqMap[][2] = +{ + // Always replace \\ first to avoid double-escaping characters + { TEXT("\\"), TEXT("\\\\") }, +{ TEXT("\n"), TEXT("\\n") }, +{ TEXT("\r"), TEXT("\\r") }, +{ TEXT("\t"), TEXT("\\t") }, +{ TEXT("\'"), TEXT("\\'") }, +{ TEXT("\""), TEXT("\\\"") } +}; + +static const uint32 MaxSupportedEscapeChars = ARRAY_COUNT(CharToEscapeSeqMap); + +/** +* Replaces certain characters with the "escaped" version of that character (i.e. replaces "\n" with "\\n"). +* The characters supported are: { \n, \r, \t, \', \", \\ }. +* +* @param Chars by default, replaces all supported characters; this parameter allows you to limit the replacement to a subset. +* +* @return a string with all control characters replaced by the escaped version. +*/ +inline FString FString::ReplaceCharWithEscapedChar(const TArray* Chars/*=nullptr*/) const +{ + if (Len() > 0 && (Chars == nullptr || Chars->Num() > 0)) + { + FString Result(*this); + for (int32 ChIdx = 0; ChIdx < MaxSupportedEscapeChars; ChIdx++) + { + if (Chars == nullptr || Chars->Contains(*(CharToEscapeSeqMap[ChIdx][0]))) + { + // use ReplaceInline as that won't create a copy of the string if the character isn't found + Result.ReplaceInline(CharToEscapeSeqMap[ChIdx][0], CharToEscapeSeqMap[ChIdx][1]); + } + } + return Result; + } + + return *this; +} +/** +* Removes the escape backslash for all supported characters, replacing the escape and character with the non-escaped version. (i.e. +* replaces "\\n" with "\n". Counterpart to ReplaceCharWithEscapedChar(). +*/ +inline FString FString::ReplaceEscapedCharWithChar(const TArray* Chars/*=nullptr*/) const +{ + if (Len() > 0 && (Chars == nullptr || Chars->Num() > 0)) + { + FString Result(*this); + // Spin CharToEscapeSeqMap backwards to ensure we're doing the inverse of ReplaceCharWithEscapedChar + for (int32 ChIdx = MaxSupportedEscapeChars - 1; ChIdx >= 0; ChIdx--) + { + if (Chars == nullptr || Chars->Contains(*(CharToEscapeSeqMap[ChIdx][0]))) + { + // use ReplaceInline as that won't create a copy of the string if the character isn't found + Result.ReplaceInline(CharToEscapeSeqMap[ChIdx][1], CharToEscapeSeqMap[ChIdx][0]); + } + } + return Result; + } + + return *this; +} + +/** +* Replaces all instances of '\t' with TabWidth number of spaces +* @param InSpacesPerTab - Number of spaces that a tab represents +*/ +inline FString FString::ConvertTabsToSpaces(const int32 InSpacesPerTab) +{ + //must call this with at least 1 space so the modulus operation works + + FString FinalString = *this; + int32 TabIndex; + while ((TabIndex = FinalString.Find(TEXT("\t"))) != INDEX_NONE) + { + FString LeftSide = FinalString.Left(TabIndex); + FString RightSide = FinalString.Mid(TabIndex + 1); + + FinalString = LeftSide; + //for a tab size of 4, + int32 LineBegin = LeftSide.Find(TEXT("\n"), ESearchCase::IgnoreCase, ESearchDir::FromEnd, TabIndex); + if (LineBegin == INDEX_NONE) + { + LineBegin = 0; + } + int32 CharactersOnLine = (LeftSide.Len() - LineBegin); + + int32 NumSpacesForTab = InSpacesPerTab - (CharactersOnLine % InSpacesPerTab); + for (int32 i = 0; i < NumSpacesForTab; ++i) + { + FinalString.AppendChar(' '); + } + FinalString += RightSide; + } + + return FinalString; +} + +inline int32 FindMatchingClosingParenthesis(const FString& TargetString, const int32 StartSearch) +{ + const TCHAR* const StartPosition = (*TargetString) + StartSearch; + const TCHAR* CurrPosition = StartPosition; + int32 ParenthesisCount = 0; + + // Move to first open parenthesis + while (*CurrPosition != 0 && *CurrPosition != TEXT('(')) + { + ++CurrPosition; + } + + // Did we find the open parenthesis + if (*CurrPosition == TEXT('(')) + { + ++ParenthesisCount; + ++CurrPosition; + + while (*CurrPosition != 0 && ParenthesisCount > 0) + { + if (*CurrPosition == TEXT('(')) + { + ++ParenthesisCount; + } + else if (*CurrPosition == TEXT(')')) + { + --ParenthesisCount; + } + ++CurrPosition; + } + + // Did we find the matching close parenthesis + if (ParenthesisCount == 0 && *(CurrPosition - 1) == TEXT(')')) + { + return StartSearch + ((CurrPosition - 1) - StartPosition); + } + } + + return INDEX_NONE; +} + +#pragma warning(pop) + diff --git a/version/Core/Public/API/UE/Containers/Map.h b/version/Core/Public/API/UE/Containers/Map.h new file mode 100644 index 0000000..723c09a --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Map.h @@ -0,0 +1,1452 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Templates/UnrealTypeTraits.h" +#include "../Templates/UnrealTemplate.h" +#include "../Templates/Sorting.h" +#include "../Misc/StructBuilder.h" +#include "../Templates/Function.h" +#include "../Containers/Set.h" +#include "../Containers/Algo/Reverse.h" +#include "../Templates/Tuple.h" +#include "../Templates/HasGetTypeHash.h" + +#define ExchangeB(A,B) {bool T=A; A=B; B=T;} + +template +using TPair = TTuple; + +/** An initializer type for pairs that's passed to the pair set when adding a new pair. */ +template +class TPairInitializer +{ +public: + typename TRValueToLValueReference::Type Key; + typename TRValueToLValueReference::Type Value; + + /** Initialization constructor. */ + FORCEINLINE TPairInitializer(KeyInitType InKey, ValueInitType InValue) + : Key(InKey) + , Value(InValue) + { + } + + /** Implicit conversion to pair initializer. */ + template + FORCEINLINE TPairInitializer(const TPair& Pair) + : Key(Pair.Key) + , Value(Pair.Value) + { + } + + template + operator TPair() const + { + return TPair(StaticCast(Key), StaticCast(Value)); + } +}; + + +/** An initializer type for keys that's passed to the pair set when adding a new key. */ +template +class TKeyInitializer +{ +public: + typename TRValueToLValueReference::Type Key; + + /** Initialization constructor. */ + FORCEINLINE explicit TKeyInitializer(KeyInitType InKey) + : Key(InKey) + { } + + template + operator TPair() const + { + return TPair(StaticCast(Key), ValueType()); + } +}; + +/** Defines how the map's pairs are hashed. */ +template +struct TDefaultMapKeyFuncs : BaseKeyFuncs, KeyType, bInAllowDuplicateKeys> +{ + typedef typename TTypeTraits::ConstPointerType KeyInitType; + typedef const TPairInitializer::ConstInitType, typename TTypeTraits::ConstInitType>& ElementInitType; + + static FORCEINLINE KeyInitType GetSetKey(ElementInitType Element) + { + return Element.Key; + } + static FORCEINLINE bool Matches(KeyInitType A, KeyInitType B) + { + return A == B; + } + static FORCEINLINE uint32 GetKeyHash(KeyInitType Key) + { + return GetTypeHash(Key); + } +}; + +template +struct TDefaultMapHashableKeyFuncs : TDefaultMapKeyFuncs +{ + static_assert(THasGetTypeHash::Value, "TMap must have a hashable KeyType unless a custom key func is provided."); +}; + +/** +* The base class of maps from keys to values. Implemented using a TSet of key-value pairs with a custom KeyFuncs, +* with the same O(1) addition, removal, and finding. +**/ +template +class TMapBase +{ + template + friend class TMapBase; + + friend struct TContainerTraits; + +public: + typedef typename TTypeTraits::ConstPointerType KeyConstPointerType; + typedef typename TTypeTraits::ConstInitType KeyInitType; + typedef typename TTypeTraits::ConstInitType ValueInitType; + typedef TPair ElementType; + +protected: + +#if PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS + + TMapBase() = default; + TMapBase(TMapBase&&) = default; + TMapBase(const TMapBase&) = default; + TMapBase& operator=(TMapBase&&) = default; + TMapBase& operator=(const TMapBase&) = default; + +#else + + FORCEINLINE TMapBase() {} + FORCEINLINE TMapBase(TMapBase&& Other) : Pairs(MoveTemp(Other.Pairs)) {} + FORCEINLINE TMapBase(const TMapBase& Other) : Pairs(Other.Pairs) {} + FORCEINLINE TMapBase& operator=(TMapBase&& Other) { Pairs = MoveTemp(Other.Pairs); return *this; } + FORCEINLINE TMapBase& operator=(const TMapBase& Other) { Pairs = Other.Pairs; return *this; } + +#endif + + /** Constructor for moving elements from a TMap with a different SetAllocator */ + template + TMapBase(TMapBase&& Other) + : Pairs(MoveTemp(Other.Pairs)) + { } + + /** Constructor for copying elements from a TMap with a different SetAllocator */ + template + TMapBase(const TMapBase& Other) + : Pairs(Other.Pairs) + { } + + /** Assignment operator for moving elements from a TMap with a different SetAllocator */ + template + TMapBase& operator=(TMapBase&& Other) + { + Pairs = MoveTemp(Other.Pairs); + return *this; + } + + /** Assignment operator for copying elements from a TMap with a different SetAllocator */ + template + TMapBase& operator=(const TMapBase& Other) + { + Pairs = Other.Pairs; + return *this; + } + +public: + // Legacy comparison operators. Note that these also test whether the map's key-value pairs were added in the same order! + friend bool LegacyCompareEqual(const TMapBase& A, const TMapBase& B) + { + return LegacyCompareEqual(A.Pairs, B.Pairs); + } + friend bool LegacyCompareNotEqual(const TMapBase& A, const TMapBase& B) + { + return LegacyCompareNotEqual(A.Pairs, B.Pairs); + } + + /** + * Compare this map with another for equality. Does not make any assumptions about Key order. + * NOTE: this might be a candidate for operator== but it was decided to make it an explicit function + * since it can potentially be quite slow. + * + * @param Other The other map to compare against + * @returns True if both this and Other contain the same keys with values that compare == + */ + bool OrderIndependentCompareEqual(const TMapBase& Other) const + { + // first check counts (they should be the same obviously) + if (Num() != Other.Num()) + { + return false; + } + + // since we know the counts are the same, we can just iterate one map and check for existence in the other + for (typename ElementSetType::TConstIterator It(Pairs); It; ++It) + { + const ValueType* BVal = Other.Find(It->Key); + if (BVal == nullptr) + { + return false; + } + if (!(*BVal == It->Value)) + { + return false; + } + } + + // all fields in A match B and A and B's counts are the same (so there can be no fields in B not in A) + return true; + } + + /** + * Removes all elements from the map. + * + * This method potentially leaves space allocated for an expected + * number of elements about to be added. + * + * @param ExpectedNumElements The number of elements about to be added to the set. + */ + FORCEINLINE void Empty(int32 ExpectedNumElements = 0) + { + Pairs.Empty(ExpectedNumElements); + } + + /** Efficiently empties out the map but preserves all allocations and capacities */ + FORCEINLINE void Reset() + { + Pairs.Reset(); + } + + /** Shrinks the pair set to avoid slack. */ + FORCEINLINE void Shrink() + { + Pairs.Shrink(); + } + + /** Compacts the pair set to remove holes */ + FORCEINLINE void Compact() + { + Pairs.Compact(); + } + + /** Compacts the pair set to remove holes. Does not change the iteration order of the elements. */ + FORCEINLINE void CompactStable() + { + Pairs.CompactStable(); + } + + /** Preallocates enough memory to contain Number elements */ + FORCEINLINE void Reserve(int32 Number) + { + Pairs.Reserve(Number); + } + + /** @return The number of elements in the map. */ + FORCEINLINE int32 Num() const + { + return Pairs.Num(); + } + + /** + * Get the unique keys contained within this map. + * + * @param OutKeys Upon return, contains the set of unique keys in this map. + * @return The number of unique keys in the map. + */ + template int32 GetKeys(TArray& OutKeys) const + { + TSet VisitedKeys; + for (typename ElementSetType::TConstIterator It(Pairs); It; ++It) + { + if (!VisitedKeys.Contains(It->Key)) + { + OutKeys.Add(It->Key); + VisitedKeys.Add(It->Key); + } + } + return OutKeys.Num(); + } + + /** + * Helper function to return the amount of memory allocated by this container . + * + * @return Number of bytes allocated by this container. + * @see CountBytes + */ + FORCEINLINE uint32 GetAllocatedSize() const + { + return Pairs.GetAllocatedSize(); + } + + /** + * Set the value associated with a key. + * + * @param InKey The key to associate the value with. + * @param InValue The value to associate with the key. + * @return A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map. + */ + FORCEINLINE ValueType& Add(const KeyType& InKey, const ValueType& InValue) { return Emplace(InKey, InValue); } + FORCEINLINE ValueType& Add(const KeyType& InKey, ValueType&& InValue) { return Emplace(InKey, MoveTempIfPossible(InValue)); } + FORCEINLINE ValueType& Add(KeyType&& InKey, const ValueType& InValue) { return Emplace(MoveTempIfPossible(InKey), InValue); } + FORCEINLINE ValueType& Add(KeyType&& InKey, ValueType&& InValue) { return Emplace(MoveTempIfPossible(InKey), MoveTempIfPossible(InValue)); } + + /** + * Set a default value associated with a key. + * + * @param InKey The key to associate the value with. + * @return A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map. + */ + FORCEINLINE ValueType& Add(const KeyType& InKey) { return Emplace(InKey); } + FORCEINLINE ValueType& Add(KeyType&& InKey) { return Emplace(MoveTempIfPossible(InKey)); } + + /** + * Sets the value associated with a key. + * + * @param InKey The key to associate the value with. + * @param InValue The value to associate with the key. + * @return A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map. */ + template + ValueType& Emplace(InitKeyType&& InKey, InitValueType&& InValue) + { + const FSetElementId PairId = Pairs.Emplace(TPairInitializer(Forward(InKey), Forward(InValue))); + + return Pairs[PairId].Value; + } + + /** + * Set a default value associated with a key. + * + * @param InKey The key to associate the value with. + * @return A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map. + */ + template + ValueType& Emplace(InitKeyType&& InKey) + { + const FSetElementId PairId = Pairs.Emplace(TKeyInitializer(Forward(InKey))); + + return Pairs[PairId].Value; + } + + /** + * Remove all value associations for a key. + * + * @param InKey The key to remove associated values for. + * @return The number of values that were associated with the key. + */ + FORCEINLINE int32 Remove(KeyConstPointerType InKey) + { + const int32 NumRemovedPairs = Pairs.Remove(InKey); + return NumRemovedPairs; + } + + /** + * Find the key associated with the specified value. + * + * The time taken is O(N) in the number of pairs. + * + * @param Value The value to search for + * @return A pointer to the key associated with the specified value, + * or nullptr if the value isn't contained in this map. The pointer + * is only valid until the next change to any key in the map. + */ + const KeyType* FindKey(ValueInitType Value) const + { + for (typename ElementSetType::TConstIterator PairIt(Pairs); PairIt; ++PairIt) + { + if (PairIt->Value == Value) + { + return &PairIt->Key; + } + } + return nullptr; + } + + /** + * Find the value associated with a specified key. + * + * @param Key The key to search for. + * @return A pointer to the value associated with the specified key, or nullptr if the key isn't contained in this map. The pointer + * is only valid until the next change to any key in the map. + */ + FORCEINLINE ValueType* Find(KeyConstPointerType Key) + { + if (auto* Pair = Pairs.Find(Key)) + { + return &Pair->Value; + } + + return nullptr; + } + FORCEINLINE const ValueType* Find(KeyConstPointerType Key) const + { + return const_cast(this)->Find(Key); + } + +private: + + /** + * Find the value associated with a specified key, or if none exists, + * adds a value using the default constructor. + * + * @param Key The key to search for. + * @return A reference to the value associated with the specified key. + */ + template + FORCEINLINE ValueType& FindOrAddImpl(ArgType&& Arg) + { + if (auto* Pair = Pairs.Find(Arg)) + return Pair->Value; + + return Add(Forward(Arg)); + } + +public: + + /** + * Find the value associated with a specified key, or if none exists, + * adds a value using the default constructor. + * + * @param Key The key to search for. + * @return A reference to the value associated with the specified key. + */ + FORCEINLINE ValueType& FindOrAdd(const KeyType& Key) { return FindOrAddImpl(Key); } + FORCEINLINE ValueType& FindOrAdd(KeyType&& Key) { return FindOrAddImpl(MoveTempIfPossible(Key)); } + + /** + * Find the value associated with a specified key, or if none exists, + * adds a value using the key as the constructor parameter. + * + * @param Key The key to search for. + * @return A reference to the value associated with the specified key. + */ + //@todo UE4 merge - this prevents FConfigCacheIni from compiling + /*ValueType& FindOrAddKey(KeyInitType Key) + { + TPair* Pair = Pairs.Find(Key); + if( Pair ) + { + return Pair->Value; + } + else + { + return Set(Key, ValueType(Key)); + } + }*/ + + /** + * Find a reference to the value associated with a specified key. + * + * @param Key The key to search for. + * @return The value associated with the specified key, or triggers an assertion if the key does not exist. + */ + FORCEINLINE const ValueType& FindChecked(KeyConstPointerType Key) const + { + const auto* Pair = Pairs.Find(Key); + check(Pair != nullptr); + return Pair->Value; + } + + /** + * Find a reference to the value associated with a specified key. + * + * @param Key The key to search for. + * @return The value associated with the specified key, or triggers an assertion if the key does not exist. + */ + FORCEINLINE ValueType& FindChecked(KeyConstPointerType Key) + { + auto* Pair = Pairs.Find(Key); + check(Pair != nullptr); + return Pair->Value; + } + + /** + * Find the value associated with a specified key. + * + * @param Key The key to search for. + * @return The value associated with the specified key, or the default value for the ValueType if the key isn't contained in this map. + */ + FORCEINLINE ValueType FindRef(KeyConstPointerType Key) const + { + if (const auto* Pair = Pairs.Find(Key)) + { + return Pair->Value; + } + + return ValueType(); + } + + /** + * Check if map contains the specified key. + * + * @param Key The key to check for. + * @return true if the map contains the key. + */ + FORCEINLINE bool Contains(KeyConstPointerType Key) const + { + return Pairs.Contains(Key); + } + + /** + * Generate an array from the keys in this map. + * + * @param OutArray Will contain the collection of keys. + */ + template void GenerateKeyArray(TArray& OutArray) const + { + OutArray.Empty(Pairs.Num()); + for (typename ElementSetType::TConstIterator PairIt(Pairs); PairIt; ++PairIt) + { + new(OutArray) KeyType(PairIt->Key); + } + } + + /** + * Generate an array from the values in this map. + * + * @param OutArray Will contain the collection of values. + */ + template void GenerateValueArray(TArray& OutArray) const + { + OutArray.Empty(Pairs.Num()); + for (typename ElementSetType::TConstIterator PairIt(Pairs); PairIt; ++PairIt) + { + new(OutArray) ValueType(PairIt->Value); + } + } + +protected: + typedef TSet ElementSetType; + + /** The base of TMapBase iterators. */ + template + class TBaseIterator + { + public: + typedef typename TChooseClass< + bConst, + typename TChooseClass::Result, + typename TChooseClass::Result + >::Result PairItType; + private: + typedef typename TChooseClass::Result MapType; + typedef typename TChooseClass::Result ItKeyType; + typedef typename TChooseClass::Result ItValueType; + typedef typename TChooseClass::Result PairType; + + public: + FORCEINLINE TBaseIterator(const PairItType& InElementIt) + : PairIt(InElementIt) + { + } + + FORCEINLINE TBaseIterator& operator++() + { + ++PairIt; + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return !!PairIt; + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE friend bool operator==(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.PairIt == Rhs.PairIt; } + FORCEINLINE friend bool operator!=(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.PairIt != Rhs.PairIt; } + + FORCEINLINE ItKeyType& Key() const { return PairIt->Key; } + FORCEINLINE ItValueType& Value() const { return PairIt->Value; } + + FORCEINLINE PairType& operator* () const { return *PairIt; } + FORCEINLINE PairType* operator->() const { return &*PairIt; } + + protected: + PairItType PairIt; + }; + + /** The base type of iterators that iterate over the values associated with a specified key. */ + template + class TBaseKeyIterator + { + private: + typedef typename TChooseClass::Result SetItType; + typedef typename TChooseClass::Result ItKeyType; + typedef typename TChooseClass::Result ItValueType; + + public: + /** Initialization constructor. */ + FORCEINLINE TBaseKeyIterator(const SetItType& InSetIt) + : SetIt(InSetIt) + { + } + + FORCEINLINE TBaseKeyIterator& operator++() + { + ++SetIt; + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return !!SetIt; + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE ItKeyType& Key() const { return SetIt->Key; } + FORCEINLINE ItValueType& Value() const { return SetIt->Value; } + + protected: + SetItType SetIt; + }; + + /** A set of the key-value pairs in the map. */ + ElementSetType Pairs; + +public: + + /** Map iterator. */ + class TIterator : public TBaseIterator + { + public: + + /** Initialization constructor. */ + FORCEINLINE TIterator(TMapBase& InMap, bool bInRequiresRehashOnRemoval = false) + : TBaseIterator(InMap.Pairs.CreateIterator()) + , Map(InMap) + , bElementsHaveBeenRemoved(false) + , bRequiresRehashOnRemoval(bInRequiresRehashOnRemoval) + { + } + + /** Destructor. */ + FORCEINLINE ~TIterator() + { + if (bElementsHaveBeenRemoved && bRequiresRehashOnRemoval) + { + Map.Pairs.Relax(); + } + } + + /** Removes the current pair from the map. */ + FORCEINLINE void RemoveCurrent() + { + TBaseIterator::PairIt.RemoveCurrent(); + bElementsHaveBeenRemoved = true; + } + + private: + TMapBase & Map; + bool bElementsHaveBeenRemoved; + bool bRequiresRehashOnRemoval; + }; + + /** Const map iterator. */ + class TConstIterator : public TBaseIterator + { + public: + FORCEINLINE TConstIterator(const TMapBase& InMap) + : TBaseIterator(InMap.Pairs.CreateConstIterator()) + { + } + }; + + using TRangedForIterator = TBaseIterator; + using TRangedForConstIterator = TBaseIterator; + + /** Iterates over values associated with a specified key in a const map. */ + class TConstKeyIterator : public TBaseKeyIterator + { + public: + FORCEINLINE TConstKeyIterator(const TMapBase& InMap, KeyInitType InKey) + : TBaseKeyIterator(typename ElementSetType::TConstKeyIterator(InMap.Pairs, InKey)) + {} + }; + + /** Iterates over values associated with a specified key in a map. */ + class TKeyIterator : public TBaseKeyIterator + { + public: + FORCEINLINE TKeyIterator(TMapBase& InMap, KeyInitType InKey) + : TBaseKeyIterator(typename ElementSetType::TKeyIterator(InMap.Pairs, InKey)) + {} + + /** Removes the current key-value pair from the map. */ + FORCEINLINE void RemoveCurrent() + { + TBaseKeyIterator::SetIt.RemoveCurrent(); + } + }; + + /** Creates an iterator over all the pairs in this map */ + FORCEINLINE TIterator CreateIterator() + { + return TIterator(*this); + } + + /** Creates a const iterator over all the pairs in this map */ + FORCEINLINE TConstIterator CreateConstIterator() const + { + return TConstIterator(*this); + } + + /** Creates an iterator over the values associated with a specified key in a map */ + FORCEINLINE TKeyIterator CreateKeyIterator(KeyInitType InKey) + { + return TKeyIterator(*this, InKey); + } + + /** Creates a const iterator over the values associated with a specified key in a map */ + FORCEINLINE TConstKeyIterator CreateConstKeyIterator(KeyInitType InKey) const + { + return TConstKeyIterator(*this, InKey); + } + +private: + /** + * DO NOT USE DIRECTLY + * STL-like iterators to enable range-based for loop support. + */ + FORCEINLINE friend TRangedForIterator begin(TMapBase& MapBase) { return TRangedForIterator(begin(MapBase.Pairs)); } + FORCEINLINE friend TRangedForConstIterator begin(const TMapBase& MapBase) { return TRangedForConstIterator(begin(MapBase.Pairs)); } + FORCEINLINE friend TRangedForIterator end(TMapBase& MapBase) { return TRangedForIterator(end(MapBase.Pairs)); } + FORCEINLINE friend TRangedForConstIterator end(const TMapBase& MapBase) { return TRangedForConstIterator(end(MapBase.Pairs)); } +}; + + +/** The base type of sortable maps. */ +template +class TSortableMapBase : public TMapBase +{ + friend struct TContainerTraits; + +protected: + typedef TMapBase Super; + +#if PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS + + TSortableMapBase() = default; + TSortableMapBase(TSortableMapBase&&) = default; + TSortableMapBase(const TSortableMapBase&) = default; + TSortableMapBase& operator=(TSortableMapBase&&) = default; + TSortableMapBase& operator=(const TSortableMapBase&) = default; + +#else + + FORCEINLINE TSortableMapBase() {} + FORCEINLINE TSortableMapBase(TSortableMapBase&& Other) : Super(MoveTemp(Other)) {} + FORCEINLINE TSortableMapBase(const TSortableMapBase& Other) : Super(Other) {} + FORCEINLINE TSortableMapBase& operator=(TSortableMapBase&& Other) { Super::operator=(MoveTemp(Other)); return *this; } + FORCEINLINE TSortableMapBase& operator=(const TSortableMapBase& Other) { Super::operator=(Other); return *this; } + +#endif + + /** Constructor for moving elements from a TMap with a different SetAllocator */ + template + TSortableMapBase(TSortableMapBase&& Other) + : Super(MoveTemp(Other)) + { + } + + /** Constructor for copying elements from a TMap with a different SetAllocator */ + template + TSortableMapBase(const TSortableMapBase& Other) + : Super(Other) + { + } + + /** Assignment operator for moving elements from a TMap with a different SetAllocator */ + template + TSortableMapBase& operator=(TSortableMapBase&& Other) + { + (Super&)*this = MoveTemp(Other); + return *this; + } + + /** Assignment operator for copying elements from a TMap with a different SetAllocator */ + template + TSortableMapBase& operator=(const TSortableMapBase& Other) + { + (Super&)*this = Other; + return *this; + } + +public: + /** + * Sorts the pairs array using each pair's Key as the sort criteria, then rebuilds the map's hash. + * Invoked using "MyMapVar.KeySort( PREDICATE_CLASS() );" + */ + template + FORCEINLINE void KeySort(const PREDICATE_CLASS& Predicate) + { + Super::Pairs.Sort(FKeyComparisonClass(Predicate)); + } + + /** + * Sorts the pairs array using each pair's Value as the sort criteria, then rebuilds the map's hash. + * Invoked using "MyMapVar.ValueSort( PREDICATE_CLASS() );" + */ + template + FORCEINLINE void ValueSort(const PREDICATE_CLASS& Predicate) + { + Super::Pairs.Sort(FValueComparisonClass(Predicate)); + } + +private: + + /** Extracts the pair's key from the map's pair structure and passes it to the user provided comparison class. */ + template + class FKeyComparisonClass + { + TDereferenceWrapper< KeyType, PREDICATE_CLASS> Predicate; + + public: + + FORCEINLINE FKeyComparisonClass(const PREDICATE_CLASS& InPredicate) + : Predicate(InPredicate) + {} + + FORCEINLINE bool operator()(const typename Super::ElementType& A, const typename Super::ElementType& B) const + { + return Predicate(A.Key, B.Key); + } + }; + + /** Extracts the pair's value from the map's pair structure and passes it to the user provided comparison class. */ + template + class FValueComparisonClass + { + TDereferenceWrapper< ValueType, PREDICATE_CLASS> Predicate; + + public: + + FORCEINLINE FValueComparisonClass(const PREDICATE_CLASS& InPredicate) + : Predicate(InPredicate) + {} + + FORCEINLINE bool operator()(const typename Super::ElementType& A, const typename Super::ElementType& B) const + { + return Predicate(A.Value, B.Value); + } + }; +}; + +class FScriptMap; + +/** A TMapBase specialization that only allows a single value associated with each key.*/ +template> +class TMap : public TSortableMapBase +{ + friend struct TContainerTraits; + friend class FScriptMap; + + static_assert(!KeyFuncs::bAllowDuplicateKeys, "TMap cannot be instantiated with a KeyFuncs which allows duplicate keys"); + +public: + typedef TSortableMapBase Super; + typedef typename Super::KeyInitType KeyInitType; + typedef typename Super::KeyConstPointerType KeyConstPointerType; + +#if PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS + + TMap() = default; + TMap(TMap&&) = default; + TMap(const TMap&) = default; + TMap& operator=(TMap&&) = default; + TMap& operator=(const TMap&) = default; + +#else + + FORCEINLINE TMap() {} + FORCEINLINE TMap(TMap&& Other) : Super(MoveTemp(Other)) {} + FORCEINLINE TMap(const TMap& Other) : Super(Other) {} + FORCEINLINE TMap& operator=(TMap&& Other) { Super::operator=(MoveTemp(Other)); return *this; } + FORCEINLINE TMap& operator=(const TMap& Other) { Super::operator=(Other); return *this; } + +#endif + + /** Constructor for moving elements from a TMap with a different SetAllocator */ + template + TMap(TMap&& Other) + : Super(MoveTemp(Other)) + { + } + + /** Constructor for copying elements from a TMap with a different SetAllocator */ + template + TMap(const TMap& Other) + : Super(Other) + { + } + + /** Assignment operator for moving elements from a TMap with a different SetAllocator */ + template + TMap& operator=(TMap&& Other) + { + (Super&)*this = MoveTemp(Other); + return *this; + } + + /** Assignment operator for copying elements from a TMap with a different SetAllocator */ + template + TMap& operator=(const TMap& Other) + { + (Super&)*this = Other; + return *this; + } + + /** + * Remove the pair with the specified key and copies the value + * that was removed to the ref parameter + * + * @param Key The key to search for + * @param OutRemovedValue If found, the value that was removed (not modified if the key was not found) + * @return whether or not the key was found + */ + FORCEINLINE bool RemoveAndCopyValue(KeyInitType Key, ValueType& OutRemovedValue) + { + const FSetElementId PairId = Super::Pairs.FindId(Key); + if (!PairId.IsValidId()) + return false; + + OutRemovedValue = MoveTempIfPossible(Super::Pairs[PairId].Value); + Super::Pairs.Remove(PairId); + return true; + } + + /** + * Find a pair with the specified key, removes it from the map, and returns the value part of the pair. + * + * If no pair was found, an exception is thrown. + * + * @param Key the key to search for + * @return whether or not the key was found + */ + FORCEINLINE ValueType FindAndRemoveChecked(KeyConstPointerType Key) + { + const FSetElementId PairId = Super::Pairs.FindId(Key); + check(PairId.IsValidId()); + ValueType Result = MoveTempIfPossible(Super::Pairs[PairId].Value); + Super::Pairs.Remove(PairId); + return Result; + } + + /** + * Move all items from another map into our map (if any keys are in both, + * the value from the other map wins) and empty the other map. + * + * @param OtherMap The other map of items to move the elements from. + */ + template + void Append(TMap&& OtherMap) + { + this->Reserve(this->Num() + OtherMap.Num()); + for (auto& Pair : OtherMap) + { + this->Add(MoveTempIfPossible(Pair.Key), MoveTempIfPossible(Pair.Value)); + } + + OtherMap.Reset(); + } + + /** + * Add all items from another map to our map (if any keys are in both, + * the value from the other map wins). + * + * @param OtherMap The other map of items to add. + */ + template + void Append(const TMap& OtherMap) + { + this->Reserve(this->Num() + OtherMap.Num()); + for (auto& Pair : OtherMap) + { + this->Add(Pair.Key, Pair.Value); + } + } + + FORCEINLINE ValueType& operator[](KeyConstPointerType Key) { return this->FindChecked(Key); } + FORCEINLINE const ValueType& operator[](KeyConstPointerType Key) const { return this->FindChecked(Key); } +}; + + +/** A TMapBase specialization that allows multiple values to be associated with each key. */ +template*/> +class TMultiMap : public TSortableMapBase +{ + friend struct TContainerTraits; + + static_assert(KeyFuncs::bAllowDuplicateKeys, "TMultiMap cannot be instantiated with a KeyFuncs which disallows duplicate keys"); + +public: + typedef TSortableMapBase Super; + typedef typename Super::KeyConstPointerType KeyConstPointerType; + typedef typename Super::KeyInitType KeyInitType; + typedef typename Super::ValueInitType ValueInitType; + +#if PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS + + TMultiMap() = default; + TMultiMap(TMultiMap&&) = default; + TMultiMap(const TMultiMap&) = default; + TMultiMap& operator=(TMultiMap&&) = default; + TMultiMap& operator=(const TMultiMap&) = default; + +#else + + FORCEINLINE TMultiMap() {} + FORCEINLINE TMultiMap(TMultiMap&& Other) : Super(MoveTemp(Other)) {} + FORCEINLINE TMultiMap(const TMultiMap& Other) : Super(Other) {} + FORCEINLINE TMultiMap& operator=(TMultiMap&& Other) { Super::operator=(MoveTemp(Other)); return *this; } + FORCEINLINE TMultiMap& operator=(const TMultiMap& Other) { Super::operator=(Other); return *this; } + +#endif + + /** Constructor for moving elements from a TMap with a different SetAllocator */ + template + TMultiMap(TMultiMap&& Other) + : Super(MoveTemp(Other)) + { + } + + /** Constructor for copying elements from a TMap with a different SetAllocator */ + template + TMultiMap(const TMultiMap& Other) + : Super(Other) + { + } + + /** Assignment operator for moving elements from a TMap with a different SetAllocator */ + template + TMultiMap& operator=(TMultiMap&& Other) + { + (Super&)*this = MoveTemp(Other); + return *this; + } + + /** Assignment operator for copying elements from a TMap with a different SetAllocator */ + template + TMultiMap& operator=(const TMultiMap& Other) + { + (Super&)*this = Other; + return *this; + } + + /** + * Finds all values associated with the specified key. + * + * @param Key The key to find associated values for. + * @param OutValues Upon return, contains the values associated with the key. + * @param bMaintainOrder true if the Values array should be in the same order as the map's pairs. + */ + template void MultiFind(KeyInitType Key, TArray& OutValues, bool bMaintainOrder = false) const + { + for (typename Super::ElementSetType::TConstKeyIterator It(Super::Pairs, Key); It; ++It) + { + new(OutValues) ValueType(It->Value); + } + + if (bMaintainOrder) + { + Algo::Reverse(OutValues); + } + } + + /** + * Finds all values associated with the specified key. + * + * @param Key The key to find associated values for. + * @param OutValues Upon return, contains pointers to the values associated with the key. + * Pointers are only valid until the next change to any key in the map. + * @param bMaintainOrder true if the Values array should be in the same order as the map's pairs. + */ + template void MultiFindPointer(KeyInitType Key, TArray& OutValues, bool bMaintainOrder = false) const + { + for (typename Super::ElementSetType::TConstKeyIterator It(Super::Pairs, Key); It; ++It) + { + OutValues.Add(&It->Value); + } + + if (bMaintainOrder) + { + Algo::Reverse(OutValues); + } + } + template void MultiFindPointer(KeyInitType Key, TArray& OutValues, bool bMaintainOrder = false) + { + for (typename Super::ElementSetType::TKeyIterator It(Super::Pairs, Key); It; ++It) + { + OutValues.Add(&It->Value); + } + + if (bMaintainOrder) + { + Algo::Reverse(OutValues); + } + } + + /** + * Add a key-value association to the map. The association doesn't replace any of the key's existing associations. + * However, if both the key and value match an existing association in the map, no new association is made and the existing association's + * value is returned. + * + * @param InKey The key to associate. + * @param InValue The value to associate. + * @return A reference to the value as stored in the map; the reference is only valid until the next change to any key in the map. + */ + FORCEINLINE ValueType& AddUnique(const KeyType& InKey, const ValueType& InValue) { return EmplaceUnique(InKey, InValue); } + FORCEINLINE ValueType& AddUnique(const KeyType& InKey, ValueType&& InValue) { return EmplaceUnique(InKey, MoveTempIfPossible(InValue)); } + FORCEINLINE ValueType& AddUnique(KeyType&& InKey, const ValueType& InValue) { return EmplaceUnique(MoveTempIfPossible(InKey), InValue); } + FORCEINLINE ValueType& AddUnique(KeyType&& InKey, ValueType&& InValue) { return EmplaceUnique(MoveTempIfPossible(InKey), MoveTempIfPossible(InValue)); } + + /** + * Add a key-value association to the map. + * + * The association doesn't replace any of the key's existing associations. + * However, if both key and value match an existing association in the map, + * no new association is made and the existing association's value is returned. + * + * @param InKey The key to associate. + * @param InValue The value to associate. + * @return A reference to the value as stored in the map; the reference is only valid until the next change to any key in the map. + */ + template + ValueType& EmplaceUnique(InitKeyType&& InKey, InitValueType&& InValue) + { + if (ValueType* Found = FindPair(InKey, InValue)) + { + return *Found; + } + + // If there's no existing association with the same key and value, create one. + return Super::Add(Forward(InKey), Forward(InValue)); + } + + /** + * Remove all value associations for a key. + * + * @param InKey The key to remove associated values for. + * @return The number of values that were associated with the key. + */ + FORCEINLINE int32 Remove(KeyConstPointerType InKey) + { + return Super::Remove(InKey); + } + + /** + * Remove associations between the specified key and value from the map. + * + * @param InKey The key part of the pair to remove. + * @param InValue The value part of the pair to remove. + * @return The number of associations removed. + */ + int32 Remove(KeyInitType InKey, ValueInitType InValue) + { + // Iterate over pairs with a matching key. + int32 NumRemovedPairs = 0; + for (typename Super::ElementSetType::TKeyIterator It(Super::Pairs, InKey); It; ++It) + { + // If this pair has a matching value as well, remove it. + if (It->Value == InValue) + { + It.RemoveCurrent(); + ++NumRemovedPairs; + } + } + return NumRemovedPairs; + } + + /** + * Remove the first association between the specified key and value from the map. + * + * @param InKey The key part of the pair to remove. + * @param InValue The value part of the pair to remove. + * @return The number of associations removed. + */ + int32 RemoveSingle(KeyInitType InKey, ValueInitType InValue) + { + // Iterate over pairs with a matching key. + int32 NumRemovedPairs = 0; + for (typename Super::ElementSetType::TKeyIterator It(Super::Pairs, InKey); It; ++It) + { + // If this pair has a matching value as well, remove it. + if (It->Value == InValue) + { + It.RemoveCurrent(); + ++NumRemovedPairs; + + // We were asked to remove only the first association, so bail out. + break; + } + } + return NumRemovedPairs; + } + + /** + * Find an association between a specified key and value. (const) + * + * @param Key The key to find. + * @param Value The value to find. + * @return If the map contains a matching association, a pointer to the value in the map is returned. Otherwise nullptr is returned. + * The pointer is only valid as long as the map isn't changed. + */ + FORCEINLINE const ValueType* FindPair(KeyInitType Key, ValueInitType Value) const + { + return const_cast(this)->FindPair(Key, Value); + } + + /** + * Find an association between a specified key and value. + * + * @param Key The key to find. + * @param Value The value to find. + * @return If the map contains a matching association, a pointer to the value in the map is returned. Otherwise nullptr is returned. + * The pointer is only valid as long as the map isn't changed. + */ + ValueType* FindPair(KeyInitType Key, ValueInitType Value) + { + // Iterate over pairs with a matching key. + for (typename Super::ElementSetType::TKeyIterator It(Super::Pairs, Key); It; ++It) + { + // If the pair's value matches, return a pointer to it. + if (It->Value == Value) + { + return &It->Value; + } + } + + return nullptr; + } + + /** Returns the number of values within this map associated with the specified key */ + int32 Num(KeyInitType Key) const + { + // Iterate over pairs with a matching key. + int32 NumMatchingPairs = 0; + for (typename Super::ElementSetType::TConstKeyIterator It(Super::Pairs, Key); It; ++It) + { + ++NumMatchingPairs; + } + return NumMatchingPairs; + } + + // Since we implement an overloaded Num() function in TMultiMap, we need to reimplement TMapBase::Num to make it visible. + FORCEINLINE int32 Num() const + { + return Super::Num(); + } +}; + + +struct FScriptMapLayout +{ + int32 KeyOffset; + int32 ValueOffset; + + FScriptSetLayout SetLayout; +}; + + +// Untyped map type for accessing TMap data, like FScriptArray for TArray. +// Must have the same memory representation as a TMap. +class FScriptMap +{ +public: + static FScriptMapLayout GetScriptLayout(int32 KeySize, int32 KeyAlignment, int32 ValueSize, int32 ValueAlignment) + { + FScriptMapLayout Result; + + // TPair + FStructBuilder PairStruct; + Result.KeyOffset = PairStruct.AddMember(KeySize, KeyAlignment); + Result.ValueOffset = PairStruct.AddMember(ValueSize, ValueAlignment); + Result.SetLayout = FScriptSet::GetScriptLayout(PairStruct.GetSize(), PairStruct.GetAlignment()); + + return Result; + } + + FScriptMap() + { + } + + bool IsValidIndex(int32 Index) const + { + return Pairs.IsValidIndex(Index); + } + + int32 Num() const + { + return Pairs.Num(); + } + + int32 GetMaxIndex() const + { + return Pairs.GetMaxIndex(); + } + + void* GetData(int32 Index, const FScriptMapLayout& Layout) + { + return Pairs.GetData(Index, Layout.SetLayout); + } + + const void* GetData(int32 Index, const FScriptMapLayout& Layout) const + { + return Pairs.GetData(Index, Layout.SetLayout); + } + + void Empty(int32 Slack, const FScriptMapLayout& Layout) + { + Pairs.Empty(Slack, Layout.SetLayout); + } + + void RemoveAt(int32 Index, const FScriptMapLayout& Layout) + { + Pairs.RemoveAt(Index, Layout.SetLayout); + } + + /** + * Adds an uninitialized object to the map. + * The map will need rehashing at some point after this call to make it valid. + * + * @return The index of the added element. + */ + int32 AddUninitialized(const FScriptMapLayout& Layout) + { + return Pairs.AddUninitialized(Layout.SetLayout); + } + + void Rehash(const FScriptMapLayout& Layout, TFunctionRef GetKeyHash) + { + Pairs.Rehash(Layout.SetLayout, GetKeyHash); + } + + /** Finds the associated key, value from hash of Key, rather than linearly searching */ + int32 FindPairIndex(const void* Key, const FScriptMapLayout& MapLayout, TFunctionRef GetKeyHash, TFunctionRef KeyEqualityFn) + { + if (Pairs.Num()) + { + // !unsafe! 'Pairs' is mostly treated as a set of TPair, so anything in + // FScriptSet could assume that Key is actually a TPair, we can hide this + // complexity from our caller, at least (so their GetKeyHash/EqualityFn is unaware): + return Pairs.FindIndex( + Key, + MapLayout.SetLayout, + GetKeyHash, // We 'know' that the implementation of Find doesn't call GetKeyHash on anything except Key + [KeyEqualityFn, MapLayout](const void* InKey, const void* InPair) + { + return KeyEqualityFn(InKey, (uint8*)InPair + MapLayout.KeyOffset); + } + ); + } + + return INDEX_NONE; + } + + /** Finds the associated value from hash of Key, rather than linearly searching */ + uint8* FindValue(const void* Key, const FScriptMapLayout& MapLayout, TFunctionRef GetKeyHash, TFunctionRef KeyEqualityFn) + { + int32 FoundIndex = FindPairIndex(Key, MapLayout, GetKeyHash, KeyEqualityFn); + if (FoundIndex != INDEX_NONE) + { + uint8* Result = (uint8*)GetData(FoundIndex, MapLayout) + MapLayout.ValueOffset; + return Result; + } + + return nullptr; + } + + /** Adds the (key, value) pair to the map, returning true if the element was added, or false if the element was already present and has been overwritten */ + void Add( + const void* Key, + const void* Value, + const FScriptMapLayout& Layout, + TFunctionRef GetKeyHash, + TFunctionRef KeyEqualityFn, + TFunctionRef KeyConstructAndAssignFn, + TFunctionRef ValueConstructAndAssignFn, + TFunctionRef ValueAssignFn, + TFunctionRef DestructKeyFn, + TFunctionRef DestructValueFn) + { + Pairs.Add( + Key, + Layout.SetLayout, + GetKeyHash, + KeyEqualityFn, + [KeyConstructAndAssignFn, ValueConstructAndAssignFn, Layout](void* NewPair) + { + KeyConstructAndAssignFn((uint8*)NewPair + Layout.KeyOffset); + ValueConstructAndAssignFn((uint8*)NewPair + Layout.ValueOffset); + }, + [DestructKeyFn, DestructValueFn, Layout](void* NewPair) + { + DestructValueFn((uint8*)NewPair + Layout.ValueOffset); + DestructKeyFn((uint8*)NewPair + Layout.KeyOffset); + } + ); + } + +private: + FScriptSet Pairs; + + // This function isn't intended to be called, just to be compiled to validate the correctness of the type. + static void CheckConstraints() + { + typedef FScriptMap ScriptType; + typedef TMap RealType; + + // Check that the class footprint is the same + static_assert(sizeof(ScriptType) == sizeof(RealType), "FScriptMap's size doesn't match TMap"); + static_assert(alignof(ScriptType) == alignof(RealType), "FScriptMap's alignment doesn't match TMap"); + + // Check member sizes + static_assert(sizeof(DeclVal().Pairs) == sizeof(DeclVal().Pairs), "FScriptMap's Pairs member size does not match TMap's"); + + // Check member offsets + static_assert(STRUCT_OFFSET(ScriptType, Pairs) == STRUCT_OFFSET(RealType, Pairs), "FScriptMap's Pairs member offset does not match TMap's"); + } + +public: + // These should really be private, because they shouldn't be called, but there's a bunch of code + // that needs to be fixed first. + FScriptMap(const FScriptMap&) { check(false); } + void operator=(const FScriptMap&) { check(false); } +}; + + +template <> +struct TIsZeroConstructType +{ + enum { Value = true }; +}; + + +template +struct TContainerTraits> : public TContainerTraitsBase> +{ + enum { MoveWillEmptyContainer = TContainerTraits::ElementSetType>::MoveWillEmptyContainer }; +}; + + +template +struct TContainerTraits> : public TContainerTraitsBase> +{ + enum { MoveWillEmptyContainer = TContainerTraits::ElementSetType>::MoveWillEmptyContainer }; +}; diff --git a/version/Core/Public/API/UE/Containers/ScriptArray.h b/version/Core/Public/API/UE/Containers/ScriptArray.h new file mode 100644 index 0000000..55fa354 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/ScriptArray.h @@ -0,0 +1,192 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "ContainerAllocationPolicies.h" + +/** + * Base dynamic array. + * An untyped data array; mirrors a TArray's members, but doesn't need an exact C++ type for its elements. + **/ +class FScriptArray + : protected FHeapAllocator::ForAnyElementType +{ +public: + + FORCEINLINE void* GetData() + { + return this->GetAllocation(); + } + FORCEINLINE const void* GetData() const + { + return this->GetAllocation(); + } + FORCEINLINE bool IsValidIndex(int32 i) const + { + return i>=0 && i=0); + checkSlow(ArrayMax>=ArrayNum); + return ArrayNum; + } + void InsertZeroed( int32 Index, int32 Count, int32 NumBytesPerElement ) + { + Insert( Index, Count, NumBytesPerElement ); + FMemory::Memzero( (uint8*)this->GetAllocation()+Index*NumBytesPerElement, Count*NumBytesPerElement ); + } + void Insert( int32 Index, int32 Count, int32 NumBytesPerElement ) + { + check(Count>=0); + check(ArrayNum>=0); + check(ArrayMax>=ArrayNum); + check(Index>=0); + check(Index<=ArrayNum); + + const int32 OldNum = ArrayNum; + if( (ArrayNum+=Count)>ArrayMax ) + { + ResizeGrow(OldNum, NumBytesPerElement); + } + FMemory::Memmove + ( + (uint8*)this->GetAllocation() + (Index+Count )*NumBytesPerElement, + (uint8*)this->GetAllocation() + (Index )*NumBytesPerElement, + (OldNum-Index)*NumBytesPerElement + ); + } + int32 Add( int32 Count, int32 NumBytesPerElement ) + { + check(Count>=0); + checkSlow(ArrayNum>=0); + checkSlow(ArrayMax>=ArrayNum); + + const int32 OldNum = ArrayNum; + if( (ArrayNum+=Count)>ArrayMax ) + { + ResizeGrow(OldNum, NumBytesPerElement); + } + + return OldNum; + } + int32 AddZeroed( int32 Count, int32 NumBytesPerElement ) + { + const int32 Index = Add( Count, NumBytesPerElement ); + FMemory::Memzero( (uint8*)this->GetAllocation()+Index*NumBytesPerElement, Count*NumBytesPerElement ); + return Index; + } + void Shrink( int32 NumBytesPerElement ) + { + checkSlow(ArrayNum>=0); + checkSlow(ArrayMax>=ArrayNum); + if (ArrayNum != ArrayMax) + { + ResizeTo(ArrayNum, NumBytesPerElement); + } + } + void Empty( int32 Slack, int32 NumBytesPerElement ) + { + checkSlow(Slack>=0); + ArrayNum = 0; + if (Slack != ArrayMax) + { + ResizeTo(Slack, NumBytesPerElement); + } + } + FScriptArray() + : ArrayNum( 0 ) + , ArrayMax( 0 ) + { + } + /** + * Returns the amount of slack in this array in elements. + */ + FORCEINLINE int32 GetSlack() const + { + return ArrayMax - ArrayNum; + } + + void Remove( int32 Index, int32 Count, int32 NumBytesPerElement ) + { + if (Count) + { + checkSlow(Count >= 0); + checkSlow(Index >= 0); + checkSlow(Index <= ArrayNum); + checkSlow(Index + Count <= ArrayNum); + + // Skip memmove in the common case that there is nothing to move. + int32 NumToMove = ArrayNum - Index - Count; + if (NumToMove) + { + FMemory::Memmove + ( + (uint8*)this->GetAllocation() + (Index)* NumBytesPerElement, + (uint8*)this->GetAllocation() + (Index + Count) * NumBytesPerElement, + NumToMove * NumBytesPerElement + ); + } + ArrayNum -= Count; + + ResizeShrink(NumBytesPerElement); + checkSlow(ArrayNum >= 0); + checkSlow(ArrayMax >= ArrayNum); + } + } + +protected: + + FScriptArray( int32 InNum, int32 NumBytesPerElement ) + : ArrayNum( 0 ) + , ArrayMax( InNum ) + + { + if (ArrayMax) + { + ResizeInit(NumBytesPerElement); + } + ArrayNum = InNum; + } + int32 ArrayNum; + int32 ArrayMax; + + FORCENOINLINE void ResizeInit(int32 NumBytesPerElement) + { + ArrayMax = this->CalculateSlackReserve(ArrayMax, NumBytesPerElement); + this->ResizeAllocation(ArrayNum, ArrayMax, NumBytesPerElement); + } + FORCENOINLINE void ResizeGrow(int32 OldNum, int32 NumBytesPerElement) + { + ArrayMax = this->CalculateSlackGrow(ArrayNum, ArrayMax, NumBytesPerElement); + this->ResizeAllocation(OldNum, ArrayMax, NumBytesPerElement); + } + FORCENOINLINE void ResizeShrink(int32 NumBytesPerElement) + { + const int32 NewArrayMax = this->CalculateSlackShrink(ArrayNum, ArrayMax, NumBytesPerElement); + if (NewArrayMax != ArrayMax) + { + ArrayMax = NewArrayMax; + this->ResizeAllocation(ArrayNum, ArrayMax, NumBytesPerElement); + } + } + FORCENOINLINE void ResizeTo(int32 NewMax, int32 NumBytesPerElement) + { + if (NewMax) + { + NewMax = this->CalculateSlackReserve(NewMax, NumBytesPerElement); + } + if (NewMax != ArrayMax) + { + ArrayMax = NewMax; + this->ResizeAllocation(ArrayNum, ArrayMax, NumBytesPerElement); + } + } +public: + // These should really be private, because they shouldn't be called, but there's a bunch of code + // that needs to be fixed first. + FScriptArray(const FScriptArray&) { check(false); } + void operator=(const FScriptArray&) { check(false); } +}; \ No newline at end of file diff --git a/version/Core/Public/API/UE/Containers/Set.h b/version/Core/Public/API/UE/Containers/Set.h new file mode 100644 index 0000000..38e2a09 --- /dev/null +++ b/version/Core/Public/API/UE/Containers/Set.h @@ -0,0 +1,1481 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Templates/UnrealTypeTraits.h" +#include "../Templates/UnrealTemplate.h" +#include "ContainerAllocationPolicies.h" +#include "TArray.h" +#include "../Templates/Function.h" +#include +#include "../Templates/AreTypesEqual.h" +#include "../Templates/Decay.h" +#include "../Templates/TypeHash.h" +#include "SparseArray.h" +#include "../Misc/StructBuilder.h" + +/** + * The base KeyFuncs type with some useful definitions for all KeyFuncs; meant to be derived from instead of used directly. + * bInAllowDuplicateKeys=true is slightly faster because it allows the TSet to skip validating that + * there isn't already a duplicate entry in the TSet. + */ +template +struct BaseKeyFuncs +{ + typedef InKeyType KeyType; + typedef typename TCallTraits::ParamType KeyInitType; + typedef typename TCallTraits::ParamType ElementInitType; + + enum { bAllowDuplicateKeys = bInAllowDuplicateKeys }; +}; + +/** + * A default implementation of the KeyFuncs used by TSet which uses the element as a key. + */ +template +struct DefaultKeyFuncs : BaseKeyFuncs +{ + typedef typename TCallTraits::ParamType KeyInitType; + typedef typename TCallTraits::ParamType ElementInitType; + + /** + * @return The key used to index the given element. + */ + static FORCEINLINE KeyInitType GetSetKey(ElementInitType Element) + { + return Element; + } + + /** + * @return True if the keys match. + */ + static FORCEINLINE bool Matches(KeyInitType A,KeyInitType B) + { + return A == B; + } + + /** Calculates a hash index for a key. */ + static FORCEINLINE uint32 GetKeyHash(KeyInitType Key) + { + return GetTypeHash(Key); + } +}; + +// Forward declaration. +template< + typename InElementType, + typename KeyFuncs = DefaultKeyFuncs, + typename Allocator = FDefaultSetAllocator + > +class TSet; + +/** This is used to provide type specific behavior for a move which will destroy B. */ +/** Should be in UnrealTemplate but isn't for Clang build reasons - will move later */ +template +FORCEINLINE void MoveByRelocate(T& A, T& B) +{ + // Destruct the previous value of A. + A.~T(); + + // Relocate B into the 'hole' left by the destruction of A, leaving a hole in B instead. + RelocateConstructItems(&A, &B, 1); +} + +/** Either NULL or an identifier for an element of a set. */ +class FSetElementId +{ +public: + + template + friend class TSet; + + friend class FScriptSet; + + /** Default constructor. */ + FORCEINLINE FSetElementId(): + Index(INDEX_NONE) + {} + + /** @return a boolean value representing whether the id is NULL. */ + FORCEINLINE bool IsValidId() const + { + return Index != INDEX_NONE; + } + + /** Comparison operator. */ + FORCEINLINE friend bool operator==(const FSetElementId& A,const FSetElementId& B) + { + return A.Index == B.Index; + } + + FORCEINLINE int32 AsInteger() const + { + return Index; + } + + FORCEINLINE static FSetElementId FromInteger(int32 Integer) + { + return FSetElementId(Integer); + } + +private: + + /** The index of the element in the set's element array. */ + int32 Index; + + /** Initialization constructor. */ + FORCEINLINE FSetElementId(int32 InIndex): + Index(InIndex) + {} + + /** Implicit conversion to the element index. */ + FORCEINLINE operator int32() const + { + return Index; + } +}; + +/** An element in the set. */ +template +class TSetElement +{ +public: + typedef InElementType ElementType; + + /** The element's value. */ + ElementType Value; + + /** The id of the next element in the same hash bucket. */ + mutable FSetElementId HashNextId; + + /** The hash bucket that the element is currently linked to. */ + mutable int32 HashIndex; + + /** Default constructor. */ + FORCEINLINE TSetElement() + {} + + /** Initialization constructor. */ + template ::Type>::Value>::Type> explicit FORCEINLINE TSetElement(InitType&& InValue) : Value(Forward(InValue)) {} + + /** Copy/move constructors */ + FORCEINLINE TSetElement(const TSetElement& Rhs) : Value( Rhs.Value ), HashNextId( Rhs.HashNextId ), HashIndex(Rhs.HashIndex) {} + FORCEINLINE TSetElement( TSetElement&& Rhs) : Value(MoveTempIfPossible(Rhs.Value)), HashNextId(MoveTemp(Rhs.HashNextId)), HashIndex(Rhs.HashIndex) {} + + /** Copy/move assignment */ + FORCEINLINE TSetElement& operator=(const TSetElement& Rhs) { Value = Rhs.Value ; HashNextId = Rhs.HashNextId ; HashIndex = Rhs.HashIndex; return *this; } + FORCEINLINE TSetElement& operator=( TSetElement&& Rhs) { Value = MoveTempIfPossible(Rhs.Value); HashNextId = MoveTemp(Rhs.HashNextId); HashIndex = Rhs.HashIndex; return *this; } + + // Comparison operators + FORCEINLINE bool operator==(const TSetElement& Other) const + { + return Value == Other.Value; + } + FORCEINLINE bool operator!=(const TSetElement& Other) const + { + return Value != Other.Value; + } +}; + +/** + * A set with an optional KeyFuncs parameters for customizing how the elements are compared and searched. + * E.g. You can specify a mapping from elements to keys if you want to find elements by specifying a subset of + * the element type. It uses a TSparseArray of the elements, and also links the elements into a hash with a + * number of buckets proportional to the number of elements. Addition, removal, and finding are O(1). + * + **/ +template< + typename InElementType, + typename KeyFuncs /*= DefaultKeyFuncs*/, + typename Allocator /*= FDefaultSetAllocator*/ + > +class TSet +{ + friend struct TContainerTraits; + friend class FScriptSet; + + typedef typename KeyFuncs::KeyInitType KeyInitType; + typedef typename KeyFuncs::ElementInitType ElementInitType; + + typedef TSetElement SetElementType; + +public: + typedef InElementType ElementType; + + /** Initialization constructor. */ + FORCEINLINE TSet() + : HashSize(0) + {} + + /** Copy constructor. */ + FORCEINLINE TSet(const TSet& Copy) + : HashSize(0) + { + *this = Copy; + } + + FORCEINLINE explicit TSet(const TArray& InArray) + : HashSize(0) + { + Append(InArray); + } + + FORCEINLINE explicit TSet(TArray&& InArray) + : HashSize(0) + { + Append(MoveTemp(InArray)); + } + + /** Destructor. */ + FORCEINLINE ~TSet() + { + HashSize = 0; + } + + /** Assignment operator. */ + TSet& operator=(const TSet& Copy) + { + if(this != &Copy) + { + Empty(Copy.Num()); + for(TConstIterator CopyIt(Copy);CopyIt;++CopyIt) + { + Add(*CopyIt); + } + } + return *this; + } + +private: + template + static FORCEINLINE typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(SetType& ToSet, SetType& FromSet) + { + ToSet.Elements = (ElementArrayType&&)FromSet.Elements; + + ToSet.Hash.MoveToEmpty(FromSet.Hash); + + ToSet .HashSize = FromSet.HashSize; + FromSet.HashSize = 0; + } + + template + static FORCEINLINE typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(SetType& ToSet, SetType& FromSet) + { + ToSet = FromSet; + } + +public: + /** Initializer list constructor. */ + TSet(std::initializer_list InitList) + : HashSize(0) + { + Append(InitList); + } + + /** Move constructor. */ + TSet(TSet&& Other) + : HashSize(0) + { + MoveOrCopy(*this, Other); + } + + /** Move assignment operator. */ + TSet& operator=(TSet&& Other) + { + if (this != &Other) + { + MoveOrCopy(*this, Other); + } + + return *this; + } + + /** Constructor for moving elements from a TSet with a different SetAllocator */ + template + TSet(TSet&& Other) + : HashSize(0) + { + Append(MoveTemp(Other)); + } + + /** Constructor for copying elements from a TSet with a different SetAllocator */ + template + TSet(const TSet& Other) + : HashSize(0) + { + Append(Other); + } + + /** Assignment operator for moving elements from a TSet with a different SetAllocator */ + template + TSet& operator=(TSet&& Other) + { + Reset(); + Append(MoveTemp(Other)); + return *this; + } + + /** Assignment operator for copying elements from a TSet with a different SetAllocator */ + template + TSet& operator=(const TSet& Other) + { + Reset(); + Append(Other); + return *this; + } + + /** Initializer list assignment operator */ + TSet& operator=(std::initializer_list InitList) + { + Reset(); + Append(InitList); + return *this; + } + + /** + * Removes all elements from the set, potentially leaving space allocated for an expected number of elements about to be added. + * @param ExpectedNumElements - The number of elements about to be added to the set. + */ + void Empty(int32 ExpectedNumElements = 0) + { + // Empty the elements array, and reallocate it for the expected number of elements. + Elements.Empty(ExpectedNumElements); + + // Resize the hash to the desired size for the expected number of elements. + if(!ConditionalRehash(ExpectedNumElements,true)) + { + // If the hash was already the desired size, clear the references to the elements that have now been removed. + for (int32 HashIndex = 0, LocalHashSize = HashSize; HashIndex < LocalHashSize; ++HashIndex) + { + GetTypedHash(HashIndex) = FSetElementId(); + } + } + } + + /** Efficiently empties out the set but preserves all allocations and capacities */ + void Reset() + { + // Reset the elements array. + Elements.Reset(); + + // Clear the references to the elements that have now been removed. + for (int32 HashIndex = 0, LocalHashSize = HashSize; HashIndex < LocalHashSize; ++HashIndex) + { + GetTypedHash(HashIndex) = FSetElementId(); + } + } + + /** Shrinks the set's element storage to avoid slack. */ + FORCEINLINE void Shrink() + { + Elements.Shrink(); + Relax(); + } + + /** Compacts the allocated elements into a contiguous range. */ + FORCEINLINE void Compact() + { + if (Elements.Compact()) + { + Rehash(); + } + } + + /** Compacts the allocated elements into a contiguous range. Does not change the iteration order of the elements. */ + FORCEINLINE void CompactStable() + { + if (Elements.CompactStable()) + { + Rehash(); + } + } + + /** Preallocates enough memory to contain Number elements */ + FORCEINLINE void Reserve(int32 Number) + { + // makes sense only when Number > Elements.Num() since TSparseArray::Reserve + // does any work only if that's the case + if (Number > Elements.Num()) + { + Elements.Reserve(Number); + } + } + + /** Relaxes the set's hash to a size strictly bounded by the number of elements in the set. */ + FORCEINLINE void Relax() + { + ConditionalRehash(Elements.Num(),true); + } + + /** + * Helper function to return the amount of memory allocated by this container + * @return number of bytes allocated by this container + */ + FORCEINLINE uint32 GetAllocatedSize( void ) const + { + return Elements.GetAllocatedSize() + (HashSize * sizeof(FSetElementId)); + } + + /** @return the number of elements. */ + FORCEINLINE int32 Num() const + { + return Elements.Num(); + } + + /** + * Checks whether an element id is valid. + * @param Id - The element id to check. + * @return true if the element identifier refers to a valid element in this set. + */ + FORCEINLINE bool IsValidId(FSetElementId Id) const + { + return Id.IsValidId() && + Id >= 0 && + Id < Elements.GetMaxIndex() && + Elements.IsAllocated(Id); + } + + /** Accesses the identified element's value. */ + FORCEINLINE ElementType& operator[](FSetElementId Id) + { + return Elements[Id].Value; + } + + /** Accesses the identified element's value. */ + FORCEINLINE const ElementType& operator[](FSetElementId Id) const + { + return Elements[Id].Value; + } + + /** + * Adds an element to the set. + * + * @param InElement Element to add to set + * @param bIsAlreadyInSetPtr [out] Optional pointer to bool that will be set depending on whether element is already in set + * @return A pointer to the element stored in the set. + */ + FORCEINLINE FSetElementId Add(const InElementType& InElement, bool* bIsAlreadyInSetPtr = NULL) { return Emplace((InElement), bIsAlreadyInSetPtr); } + FORCEINLINE FSetElementId Add( InElementType&& InElement, bool* bIsAlreadyInSetPtr = NULL) { return Emplace(MoveTempIfPossible(InElement), bIsAlreadyInSetPtr); } + +#pragma warning(push) +#pragma warning(disable : 4291) + + /** + * Adds an element to the set. + * + * @param Args The argument(s) to be forwarded to the set element's constructor. + * @param bIsAlreadyInSetPtr [out] Optional pointer to bool that will be set depending on whether element is already in set + * @return A pointer to the element stored in the set. + */ + template + FSetElementId Emplace(ArgsType&& Args,bool* bIsAlreadyInSetPtr = NULL) + { + // Create a new element. + FSparseArrayAllocationInfo ElementAllocation = Elements.AddUninitialized(); + FSetElementId ElementId(ElementAllocation.Index); + auto& Element = *new(ElementAllocation) SetElementType(Forward(Args)); + + bool bIsAlreadyInSet = false; + if (!KeyFuncs::bAllowDuplicateKeys) + { + // If the set doesn't allow duplicate keys, check for an existing element with the same key as the element being added. + + // Don't bother searching for a duplicate if this is the first element we're adding + if (Elements.Num() != 1) + { + FSetElementId ExistingId = FindId(KeyFuncs::GetSetKey(Element.Value)); + bIsAlreadyInSet = ExistingId.IsValidId(); + if (bIsAlreadyInSet) + { + // If there's an existing element with the same key as the new element, replace the existing element with the new element. + MoveByRelocate(Elements[ExistingId].Value, Element.Value); + + // Then remove the new element. + Elements.RemoveAtUninitialized(ElementId); + + // Then point the return value at the replaced element. + ElementId = ExistingId; + } + } + } + + if (!bIsAlreadyInSet) + { + // Check if the hash needs to be resized. + if(!ConditionalRehash(Elements.Num())) + { + // If the rehash didn't add the new element to the hash, add it. + HashElement(ElementId,Element); + } + } + + if (bIsAlreadyInSetPtr) + { + *bIsAlreadyInSetPtr = bIsAlreadyInSet; + } + + return ElementId; + } + +#pragma warning(pop) + + template + void Append(const TArray& InElements) + { + Reserve(Elements.Num() + InElements.Num()); + for (const ElementType& Element : InElements) + { + Add(Element); + } + } + + template + void Append(TArray&& InElements) + { + Reserve(Elements.Num() + InElements.Num()); + for (ElementType& Element : InElements) + { + Add(MoveTempIfPossible(Element)); + } + InElements.Reset(); + } + + /** + * Add all items from another set to our set (union without creating a new set) + * @param OtherSet - The other set of items to add. + */ + template + void Append(const TSet& OtherSet) + { + Reserve(Elements.Num() + OtherSet.Num()); + for (const ElementType& Element : OtherSet) + { + Add(Element); + } + } + + template + void Append(TSet&& OtherSet) + { + Reserve(Elements.Num() + OtherSet.Num()); + for (ElementType& Element : OtherSet) + { + Add(MoveTempIfPossible(Element)); + } + OtherSet.Reset(); + } + + void Append(std::initializer_list InitList) + { + Reserve(Elements.Num() + (int32)InitList.size()); + for (const ElementType& Element : InitList) + { + Add(Element); + } + } + + /** + * Removes an element from the set. + * @param Element - A pointer to the element in the set, as returned by Add or Find. + */ + void Remove(FSetElementId ElementId) + { + if (Elements.Num()) + { + const auto& ElementBeingRemoved = Elements[ElementId]; + + // Remove the element from the hash. + for(FSetElementId* NextElementId = &GetTypedHash(ElementBeingRemoved.HashIndex); + NextElementId->IsValidId(); + NextElementId = &Elements[*NextElementId].HashNextId) + { + if(*NextElementId == ElementId) + { + *NextElementId = ElementBeingRemoved.HashNextId; + break; + } + } + } + + // Remove the element from the elements array. + Elements.RemoveAt(ElementId); + } + + /** + * Finds an element with the given key in the set. + * @param Key - The key to search for. + * @return The id of the set element matching the given key, or the NULL id if none matches. + */ + FSetElementId FindId(KeyInitType Key) const + { + if (Elements.Num()) + { + for(FSetElementId ElementId = GetTypedHash(KeyFuncs::GetKeyHash(Key)); + ElementId.IsValidId(); + ElementId = Elements[ElementId].HashNextId) + { + if(KeyFuncs::Matches(KeyFuncs::GetSetKey(Elements[ElementId].Value),Key)) + { + // Return the first match, regardless of whether the set has multiple matches for the key or not. + return ElementId; + } + } + } + return FSetElementId(); + } + + /** + * Finds an element with the given key in the set. + * @param Key - The key to search for. + * @return A pointer to an element with the given key. If no element in the set has the given key, this will return NULL. + */ + FORCEINLINE ElementType* Find(KeyInitType Key) + { + FSetElementId ElementId = FindId(Key); + if(ElementId.IsValidId()) + { + return &Elements[ElementId].Value; + } + else + { + return NULL; + } + } + + /** + * Finds an element with the given key in the set. + * @param Key - The key to search for. + * @return A const pointer to an element with the given key. If no element in the set has the given key, this will return NULL. + */ + FORCEINLINE const ElementType* Find(KeyInitType Key) const + { + FSetElementId ElementId = FindId(Key); + if(ElementId.IsValidId()) + { + return &Elements[ElementId].Value; + } + else + { + return NULL; + } + } + + /** + * Removes all elements from the set matching the specified key. + * @param Key - The key to match elements against. + * @return The number of elements removed. + */ + int32 Remove(KeyInitType Key) + { + int32 NumRemovedElements = 0; + + if (Elements.Num()) + { + FSetElementId* NextElementId = &GetTypedHash(KeyFuncs::GetKeyHash(Key)); + while(NextElementId->IsValidId()) + { + auto& Element = Elements[*NextElementId]; + if(KeyFuncs::Matches(KeyFuncs::GetSetKey(Element.Value),Key)) + { + // This element matches the key, remove it from the set. Note that Remove sets *NextElementId to point to the next + // element after the removed element in the hash bucket. + Remove(*NextElementId); + NumRemovedElements++; + + if(!KeyFuncs::bAllowDuplicateKeys) + { + // If the hash disallows duplicate keys, we're done removing after the first matched key. + break; + } + } + else + { + NextElementId = &Element.HashNextId; + } + } + } + + return NumRemovedElements; + } + + /** + * Checks if the element contains an element with the given key. + * @param Key - The key to check for. + * @return true if the set contains an element with the given key. + */ + FORCEINLINE bool Contains(KeyInitType Key) const + { + return FindId(Key).IsValidId(); + } + + /** + * Sorts the set's elements using the provided comparison class. + */ + template + void Sort( const PREDICATE_CLASS& Predicate ) + { + // Sort the elements according to the provided comparison class. + Elements.Sort( FElementCompareClass< PREDICATE_CLASS >( Predicate ) ); + + // Rehash. + Rehash(); + } + + bool VerifyHashElementsKey(KeyInitType Key) + { + bool bResult=true; + if (Elements.Num()) + { + // iterate over all elements for the hash entry of the given key + // and verify that the ids are valid + FSetElementId ElementId = GetTypedHash(KeyFuncs::GetKeyHash(Key)); + while( ElementId.IsValidId() ) + { + if( !IsValidId(ElementId) ) + { + bResult=false; + break; + } + ElementId = Elements[ElementId].HashNextId; + } + } + return bResult; + } + + // Legacy comparison operators. Note that these also test whether the set's elements were added in the same order! + friend bool LegacyCompareEqual(const TSet& A,const TSet& B) + { + return A.Elements == B.Elements; + } + friend bool LegacyCompareNotEqual(const TSet& A,const TSet& B) + { + return A.Elements != B.Elements; + } + + /** @return the intersection of two sets. (A AND B)*/ + TSet Intersect(const TSet& OtherSet) const + { + const bool bOtherSmaller = (Num() > OtherSet.Num()); + const TSet& A = (bOtherSmaller ? OtherSet : *this); + const TSet& B = (bOtherSmaller ? *this : OtherSet); + + TSet Result; + Result.Reserve(A.Num()); // Worst case is everything in smaller is in larger + + for(TConstIterator SetIt(A);SetIt;++SetIt) + { + if(B.Contains(KeyFuncs::GetSetKey(*SetIt))) + { + Result.Add(*SetIt); + } + } + return Result; + } + + /** @return the union of two sets. (A OR B)*/ + TSet Union(const TSet& OtherSet) const + { + TSet Result; + Result.Reserve(Num() + OtherSet.Num()); // Worst case is 2 totally unique Sets + + for(TConstIterator SetIt(*this);SetIt;++SetIt) + { + Result.Add(*SetIt); + } + for(TConstIterator SetIt(OtherSet);SetIt;++SetIt) + { + Result.Add(*SetIt); + } + return Result; + } + + /** @return the complement of two sets. (A not in B where A is this and B is Other)*/ + TSet Difference(const TSet& OtherSet) const + { + TSet Result; + Result.Reserve(Num()); // Worst case is no elements of this are in Other + + for(TConstIterator SetIt(*this);SetIt;++SetIt) + { + if(!OtherSet.Contains(KeyFuncs::GetSetKey(*SetIt))) + { + Result.Add(*SetIt); + } + } + return Result; + } + + /** + * Determine whether the specified set is entirely included within this set + * + * @param OtherSet Set to check + * + * @return True if the other set is entirely included in this set, false if it is not + */ + bool Includes(const TSet& OtherSet) const + { + bool bIncludesSet = true; + if (OtherSet.Num() <= Num()) + { + for(TConstIterator OtherSetIt(OtherSet); OtherSetIt; ++OtherSetIt) + { + if (!Contains(KeyFuncs::GetSetKey(*OtherSetIt))) + { + bIncludesSet = false; + break; + } + } + } + else + { + // Not possible to include if it is bigger than us + bIncludesSet = false; + } + return bIncludesSet; + } + + /** @return a TArray of the elements */ + TArray Array() const + { + TArray Result; + Result.Reserve(Num()); + for(TConstIterator SetIt(*this);SetIt;++SetIt) + { + Result.Add(*SetIt); + } + return Result; + } + + /** + * Checks that the specified address is not part of an element within the container. Used for implementations + * to check that reference arguments aren't going to be invalidated by possible reallocation. + * + * @param Addr The address to check. + */ + FORCEINLINE void CheckAddress(const ElementType* Addr) const + { + Elements.CheckAddress(Addr); + } + +private: + /** Extracts the element value from the set's element structure and passes it to the user provided comparison class. */ + template + class FElementCompareClass + { + TDereferenceWrapper< ElementType, PREDICATE_CLASS > Predicate; + + public: + FORCEINLINE FElementCompareClass( const PREDICATE_CLASS& InPredicate ) + : Predicate( InPredicate ) + {} + + FORCEINLINE bool operator()( const SetElementType& A,const SetElementType& B ) const + { + return Predicate( A.Value, B.Value ); + } + }; + + typedef TSparseArray ElementArrayType; + typedef typename Allocator::HashAllocator::template ForElementType HashType; + + ElementArrayType Elements; + + mutable HashType Hash; + mutable int32 HashSize; + + FORCEINLINE FSetElementId& GetTypedHash(int32 HashIndex) const + { + return ((FSetElementId*)Hash.GetAllocation())[HashIndex & (HashSize - 1)]; + } + + /** + * Accesses an element in the set. + * This is needed because the iterator classes aren't friends of FSetElementId and so can't access the element index. + */ + FORCEINLINE const SetElementType& GetInternalElement(FSetElementId Id) const + { + return Elements[Id]; + } + FORCEINLINE SetElementType& GetInternalElement(FSetElementId Id) + { + return Elements[Id]; + } + + /** + * Translates an element index into an element ID. + * This is needed because the iterator classes aren't friends of FSetElementId and so can't access the FSetElementId private constructor. + */ + static FORCEINLINE FSetElementId IndexToId(int32 Index) + { + return FSetElementId(Index); + } + + /** Adds an element to the hash. */ + FORCEINLINE void HashElement(FSetElementId ElementId,const SetElementType& Element) const + { + // Compute the hash bucket the element goes in. + Element.HashIndex = KeyFuncs::GetKeyHash(KeyFuncs::GetSetKey(Element.Value)) & (HashSize-1); + + // Link the element into the hash bucket. + Element.HashNextId = GetTypedHash(Element.HashIndex); + GetTypedHash(Element.HashIndex) = ElementId; + } + + /** + * Checks if the hash has an appropriate number of buckets, and if not resizes it. + * @param NumHashedElements - The number of elements to size the hash for. + * @param bAllowShrinking - true if the hash is allowed to shrink. + * @return true if the set was rehashed. + */ + bool ConditionalRehash(int32 NumHashedElements,bool bAllowShrinking = false) const + { + // Calculate the desired hash size for the specified number of elements. + const int32 DesiredHashSize = Allocator::GetNumberOfHashBuckets(NumHashedElements); + + // If the hash hasn't been created yet, or is smaller than the desired hash size, rehash. + if(NumHashedElements > 0 && + (!HashSize || + HashSize < DesiredHashSize || + (HashSize > DesiredHashSize && bAllowShrinking))) + { + HashSize = DesiredHashSize; + Rehash(); + return true; + } + else + { + return false; + } + } + + /** Resizes the hash. */ + void Rehash() const + { + // Free the old hash. + Hash.ResizeAllocation(0,0,sizeof(FSetElementId)); + + int32 LocalHashSize = HashSize; + if (LocalHashSize) + { + // Allocate the new hash. + checkSlow(FMath::IsPowerOfTwo(HashSize)); + Hash.ResizeAllocation(0, LocalHashSize, sizeof(FSetElementId)); + for (int32 HashIndex = 0; HashIndex < LocalHashSize; ++HashIndex) + { + GetTypedHash(HashIndex) = FSetElementId(); + } + + // Add the existing elements to the new hash. + for(typename ElementArrayType::TConstIterator ElementIt(Elements);ElementIt;++ElementIt) + { + HashElement(FSetElementId(ElementIt.GetIndex()),*ElementIt); + } + } + } + + /** The base type of whole set iterators. */ + template + class TBaseIterator + { + private: + friend class TSet; + + typedef typename TChooseClass::Result ItElementType; + + public: + typedef typename TChooseClass< + bConst, + typename TChooseClass::Result, + typename TChooseClass::Result + >::Result ElementItType; + + FORCEINLINE TBaseIterator(const ElementItType& InElementIt) + : ElementIt(InElementIt) + { + } + + /** Advances the iterator to the next element. */ + FORCEINLINE TBaseIterator& operator++() + { + ++ElementIt; + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return !!ElementIt; + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + // Accessors. + FORCEINLINE FSetElementId GetId() const + { + return TSet::IndexToId(ElementIt.GetIndex()); + } + FORCEINLINE ItElementType* operator->() const + { + return &ElementIt->Value; + } + FORCEINLINE ItElementType& operator*() const + { + return ElementIt->Value; + } + + FORCEINLINE friend bool operator==(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.ElementIt == Rhs.ElementIt; } + FORCEINLINE friend bool operator!=(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.ElementIt != Rhs.ElementIt; } + + ElementItType ElementIt; + }; + + /** The base type of whole set iterators. */ + template + class TBaseKeyIterator + { + private: + typedef typename TChooseClass::Result SetType; + typedef typename TChooseClass::Result ItElementType; + + public: + /** Initialization constructor. */ + FORCEINLINE TBaseKeyIterator(SetType& InSet,KeyInitType InKey) + : Set(InSet) + , Key(InKey) + , Id() + { + // The set's hash needs to be initialized to find the elements with the specified key. + Set.ConditionalRehash(Set.Elements.Num()); + if(Set.HashSize) + { + NextId = Set.GetTypedHash(KeyFuncs::GetKeyHash(Key)); + ++(*this); + } + } + + /** Advances the iterator to the next element. */ + FORCEINLINE TBaseKeyIterator& operator++() + { + Id = NextId; + + while(Id.IsValidId()) + { + NextId = Set.GetInternalElement(Id).HashNextId; + checkSlow(Id != NextId); + + if(KeyFuncs::Matches(KeyFuncs::GetSetKey(Set[Id]),Key)) + { + break; + } + + Id = NextId; + } + return *this; + } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return Id.IsValidId(); + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + // Accessors. + FORCEINLINE ItElementType* operator->() const + { + return &Set[Id]; + } + FORCEINLINE ItElementType& operator*() const + { + return Set[Id]; + } + + protected: + SetType& Set; + typename TTypeTraits::ConstPointerType Key; + FSetElementId Id; + FSetElementId NextId; + }; + +public: + + /** Used to iterate over the elements of a const TSet. */ + class TConstIterator : public TBaseIterator + { + friend class TSet; + + public: + FORCEINLINE TConstIterator(const TSet& InSet) + : TBaseIterator(begin(InSet.Elements)) + { + } + }; + + /** Used to iterate over the elements of a TSet. */ + class TIterator : public TBaseIterator + { + friend class TSet; + + public: + FORCEINLINE TIterator(TSet& InSet) + : TBaseIterator(begin(InSet.Elements)) + , Set (InSet) + { + } + + /** Removes the current element from the set. */ + FORCEINLINE void RemoveCurrent() + { + Set.Remove(TBaseIterator::GetId()); + } + + private: + TSet& Set; + }; + + using TRangedForConstIterator = TBaseIterator; + using TRangedForIterator = TBaseIterator; + + /** Used to iterate over the elements of a const TSet. */ + class TConstKeyIterator : public TBaseKeyIterator + { + public: + FORCEINLINE TConstKeyIterator(const TSet& InSet,KeyInitType InKey): + TBaseKeyIterator(InSet,InKey) + {} + }; + + /** Used to iterate over the elements of a TSet. */ + class TKeyIterator : public TBaseKeyIterator + { + public: + FORCEINLINE TKeyIterator(TSet& InSet,KeyInitType InKey) + : TBaseKeyIterator(InSet,InKey) + , Set(InSet) + {} + + /** Removes the current element from the set. */ + FORCEINLINE void RemoveCurrent() + { + Set.Remove(TBaseKeyIterator::Id); + TBaseKeyIterator::Id = FSetElementId(); + } + private: + TSet& Set; + }; + + /** Creates an iterator for the contents of this set */ + FORCEINLINE TIterator CreateIterator() + { + return TIterator(*this); + } + + /** Creates a const iterator for the contents of this set */ + FORCEINLINE TConstIterator CreateConstIterator() const + { + return TConstIterator(*this); + } + +private: + /** + * DO NOT USE DIRECTLY + * STL-like iterators to enable range-based for loop support. + */ + FORCEINLINE friend TRangedForIterator begin( TSet& Set) { return TRangedForIterator (begin(Set.Elements)); } + FORCEINLINE friend TRangedForConstIterator begin(const TSet& Set) { return TRangedForConstIterator(begin(Set.Elements)); } + FORCEINLINE friend TRangedForIterator end ( TSet& Set) { return TRangedForIterator (end (Set.Elements)); } + FORCEINLINE friend TRangedForConstIterator end (const TSet& Set) { return TRangedForConstIterator(end (Set.Elements)); } +}; + +template +struct TContainerTraits > : public TContainerTraitsBase > +{ + enum { MoveWillEmptyContainer = + TContainerTraits::ElementArrayType>::MoveWillEmptyContainer && + TAllocatorTraits::SupportsMove }; +}; + +struct FScriptSetLayout +{ + int32 ElementOffset; + int32 HashNextIdOffset; + int32 HashIndexOffset; + int32 Size; + + FScriptSparseArrayLayout SparseArrayLayout; +}; + +// Untyped set type for accessing TSet data, like FScriptArray for TArray. +// Must have the same memory representation as a TSet. +class FScriptSet +{ +public: + static FScriptSetLayout GetScriptLayout(int32 ElementSize, int32 ElementAlignment) + { + FScriptSetLayout Result; + + // TSetElement> + FStructBuilder SetElementStruct; + Result.ElementOffset = SetElementStruct.AddMember(ElementSize, ElementAlignment); + Result.HashNextIdOffset = SetElementStruct.AddMember(sizeof(FSetElementId), alignof(FSetElementId)); + Result.HashIndexOffset = SetElementStruct.AddMember(sizeof(int32), alignof(int32)); + Result.Size = SetElementStruct.GetSize(); + Result.SparseArrayLayout = FScriptSparseArray::GetScriptLayout(SetElementStruct.GetSize(), SetElementStruct.GetAlignment()); + + return Result; + } + + FScriptSet() + : HashSize(0) + { + } + + bool IsValidIndex(int32 Index) const + { + return Elements.IsValidIndex(Index); + } + + int32 Num() const + { + return Elements.Num(); + } + + int32 GetMaxIndex() const + { + return Elements.GetMaxIndex(); + } + + void* GetData(int32 Index, const FScriptSetLayout& Layout) + { + return Elements.GetData(Index, Layout.SparseArrayLayout); + } + + const void* GetData(int32 Index, const FScriptSetLayout& Layout) const + { + return Elements.GetData(Index, Layout.SparseArrayLayout); + } + + void Empty(int32 Slack, const FScriptSetLayout& Layout) + { + // Empty the elements array, and reallocate it for the expected number of elements. + Elements.Empty(Slack, Layout.SparseArrayLayout); + + // Calculate the desired hash size for the specified number of elements. + const int32 DesiredHashSize = Allocator::GetNumberOfHashBuckets(Slack); + + // If the hash hasn't been created yet, or is smaller than the desired hash size, rehash. + if (Slack != 0 && (HashSize == 0 || HashSize != DesiredHashSize)) + { + HashSize = DesiredHashSize; + + // Free the old hash. + Hash.ResizeAllocation(0, HashSize, sizeof(FSetElementId)); + } + + for (auto* It = (FSetElementId*)Hash.GetAllocation(), *End = It + HashSize; It != End; ++It) + { + *It = FSetElementId(); + } + } + + void RemoveAt(int32 Index, const FScriptSetLayout& Layout) + { + void* ElementBeingRemoved = Elements.GetData(Index, Layout.SparseArrayLayout); + + // Remove the element from the hash. + for (FSetElementId* NextElementId = &GetTypedHash(GetHashIndexRef(ElementBeingRemoved, Layout)); NextElementId->IsValidId(); NextElementId = &GetHashNextIdRef(Elements.GetData(NextElementId->AsInteger(), Layout.SparseArrayLayout), Layout)) + { + if (NextElementId->AsInteger() == Index) + { + *NextElementId = GetHashNextIdRef(ElementBeingRemoved, Layout); + break; + } + } + + // Remove the element from the elements array. + Elements.RemoveAtUninitialized(Layout.SparseArrayLayout, Index); + } + + /** + * Adds an uninitialized object to the set. + * The set will need rehashing at some point after this call to make it valid. + * + * @return The index of the added element. + */ + int32 AddUninitialized(const FScriptSetLayout& Layout) + { + int32 Result = Elements.AddUninitialized(Layout.SparseArrayLayout); + return Result; + } + + void Rehash(const FScriptSetLayout& Layout, TFunctionRef GetKeyHash) + { + // Free the old hash. + Hash.ResizeAllocation(0,0,sizeof(FSetElementId)); + + HashSize = Allocator::GetNumberOfHashBuckets(Elements.Num()); + if (HashSize) + { + // Allocate the new hash. + Hash.ResizeAllocation(0, HashSize, sizeof(FSetElementId)); + for (int32 HashIndex = 0; HashIndex < HashSize; ++HashIndex) + { + GetTypedHash(HashIndex) = FSetElementId(); + } + + // Add the existing elements to the new hash. + int32 Index = 0; + int32 Count = Elements.Num(); + while (Count) + { + if (Elements.IsValidIndex(Index)) + { + FSetElementId ElementId(Index); + + void* Element = (uint8*)Elements.GetData(Index, Layout.SparseArrayLayout); + + // Compute the hash bucket the element goes in. + uint32 ElementHash = GetKeyHash(Element); + int32 HashIndex = ElementHash & (HashSize - 1); + GetHashIndexRef(Element, Layout) = ElementHash & (HashSize - 1); + + // Link the element into the hash bucket. + GetHashNextIdRef(Element, Layout) = GetTypedHash(HashIndex); + GetTypedHash(HashIndex) = ElementId; + + --Count; + } + + ++Index; + } + } + } + + int32 FindIndex(const void* Element, const FScriptSetLayout& Layout, TFunctionRef GetKeyHash, TFunctionRef EqualityFn) + { + if (Elements.Num()) + { + const uint32 ElementHash = GetKeyHash(Element); + const int32 HashIndex = ElementHash & (HashSize - 1); + + uint8* CurrentElement = nullptr; + for (FSetElementId ElementId = GetTypedHash(HashIndex); + ElementId.IsValidId(); + ElementId = GetHashNextIdRef(CurrentElement, Layout)) + { + CurrentElement = (uint8*)Elements.GetData(ElementId, Layout.SparseArrayLayout); + if (EqualityFn(Element, CurrentElement)) + { + return ElementId; + } + } + } + + return INDEX_NONE; + } + + void Add(const void* Element, const FScriptSetLayout& Layout, TFunctionRef GetKeyHash, TFunctionRef EqualityFn, TFunctionRef ConstructFn, TFunctionRef DestructFn) + { + // Minor efficiency concern: we hash the element both here and in the FindIndex() call + uint32 ElementHash = GetKeyHash(Element); + + int32 NewElementIndex = FindIndex(Element, Layout, GetKeyHash, EqualityFn); + if (NewElementIndex != INDEX_NONE) + { + void* ElementPtr = Elements.GetData(NewElementIndex, Layout.SparseArrayLayout); + + DestructFn(ElementPtr); + ConstructFn(ElementPtr); + + // We don't update the hash because we don't need to - the new element + // should have the same hash, but let's just check. + } + else + { + NewElementIndex = Elements.AddUninitialized(Layout.SparseArrayLayout); + + void* ElementPtr = Elements.GetData(NewElementIndex, Layout.SparseArrayLayout); + ConstructFn(ElementPtr); + + const int32 DesiredHashSize = FDefaultSetAllocator::GetNumberOfHashBuckets(Num()); + if (!HashSize || HashSize < DesiredHashSize) + { + // rehash, this will link in our new element if needed: + Rehash(Layout, GetKeyHash); + } + else + { + // link the new element into the set: + int32 HashIndex = ElementHash & (HashSize - 1); + FSetElementId& TypedHash = GetTypedHash(HashIndex); + GetHashIndexRef(ElementPtr, Layout) = HashIndex; + GetHashNextIdRef(ElementPtr, Layout) = TypedHash; + TypedHash = FSetElementId(NewElementIndex); + } + } + } + +private: + typedef FDefaultSetAllocator Allocator; + typedef Allocator::HashAllocator::ForElementType HashType; + + FScriptSparseArray Elements; + mutable HashType Hash; + mutable int32 HashSize; + + FORCEINLINE FSetElementId& GetTypedHash(int32 HashIndex) const + { + return ((FSetElementId*)Hash.GetAllocation())[HashIndex & (HashSize - 1)]; + } + + static FSetElementId& GetHashNextIdRef(const void* Element, const FScriptSetLayout& Layout) + { + return *(FSetElementId*)((uint8*)Element + Layout.HashNextIdOffset); + } + + static int32& GetHashIndexRef(const void* Element, const FScriptSetLayout& Layout) + { + return *(int32*)((uint8*)Element + Layout.HashIndexOffset); + } + + // This function isn't intended to be called, just to be compiled to validate the correctness of the type. + static void CheckConstraints() + { + typedef FScriptSet ScriptType; + typedef TSet RealType; + + // Check that the class footprint is the same + static_assert(sizeof (ScriptType) == sizeof (RealType), "FScriptSet's size doesn't match TSet"); + static_assert(alignof(ScriptType) == alignof(RealType), "FScriptSet's alignment doesn't match TSet"); + + // Check member sizes + static_assert(sizeof(DeclVal().Elements) == sizeof(DeclVal().Elements), "FScriptSet's Elements member size does not match TSet's"); + static_assert(sizeof(DeclVal().Hash) == sizeof(DeclVal().Hash), "FScriptSet's Hash member size does not match TSet's"); + static_assert(sizeof(DeclVal().HashSize) == sizeof(DeclVal().HashSize), "FScriptSet's HashSize member size does not match TSet's"); + + // Check member offsets + static_assert(STRUCT_OFFSET(ScriptType, Elements) == STRUCT_OFFSET(RealType, Elements), "FScriptSet's Elements member offset does not match TSet's"); + static_assert(STRUCT_OFFSET(ScriptType, Hash) == STRUCT_OFFSET(RealType, Hash), "FScriptSet's Hash member offset does not match TSet's"); + static_assert(STRUCT_OFFSET(ScriptType, HashSize) == STRUCT_OFFSET(RealType, HashSize), "FScriptSet's FirstFreeIndex member offset does not match TSet's"); + } + +public: + // These should really be private, because they shouldn't be called, but there's a bunch of code + // that needs to be fixed first. + FScriptSet(const FScriptSet&) { check(false); } + void operator=(const FScriptSet&) { check(false); } +}; + +template <> +struct TIsZeroConstructType +{ + enum { Value = true }; +}; diff --git a/version/Core/Public/API/UE/Containers/SparseArray.h b/version/Core/Public/API/UE/Containers/SparseArray.h new file mode 100644 index 0000000..7dc54fb --- /dev/null +++ b/version/Core/Public/API/UE/Containers/SparseArray.h @@ -0,0 +1,1076 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "../Templates/IsTriviallyCopyConstructible.h" +#include "../Templates/UnrealTypeTraits.h" +#include "../Templates/UnrealTemplate.h" +#include "../Templates/IsTriviallyDestructible.h" +#include "ContainerAllocationPolicies.h" +#include "TArray.h" +#include "../Math/UnrealMathUtility.h" +#include "ScriptArray.h" +#include "BitArray.h" + +#define TSPARSEARRAY_RANGED_FOR_CHECKS 1 + +// Forward declarations. +template +class TSparseArray; + + +/** The result of a sparse array allocation. */ +struct FSparseArrayAllocationInfo +{ + int32 Index; + void* Pointer; +}; + +/** Allocated elements are overlapped with free element info in the element list. */ +template +union TSparseArrayElementOrFreeListLink +{ + /** If the element is allocated, its value is stored here. */ + ElementType ElementData; + + struct + { + /** If the element isn't allocated, this is a link to the previous element in the array's free list. */ + int32 PrevFreeIndex; + + /** If the element isn't allocated, this is a link to the next element in the array's free list. */ + int32 NextFreeIndex; + }; +}; + +class FScriptSparseArray; + +/** + * A dynamically sized array where element indices aren't necessarily contiguous. Memory is allocated for all + * elements in the array's index range, so it doesn't save memory; but it does allow O(1) element removal that + * doesn't invalidate the indices of subsequent elements. It uses TArray to store the elements, and a TBitArray + * to store whether each element index is allocated (for fast iteration over allocated elements). + * + **/ +template +class TSparseArray +{ + using ElementType = InElementType; + + friend struct TContainerTraits; + friend class FScriptSparseArray; + +public: + + /** Destructor. */ + ~TSparseArray() + { + // Destruct the elements in the array. + Empty(); + } + + /** Marks an index as allocated, and returns information about the allocation. */ + FSparseArrayAllocationInfo AllocateIndex(int32 Index) + { + check(Index >= 0); + check(Index < GetMaxIndex()); + check(!AllocationFlags[Index]); + + // Flag the element as allocated. + AllocationFlags[Index] = true; + + // Set the allocation info. + FSparseArrayAllocationInfo Result; + Result.Index = Index; + Result.Pointer = &GetData(Result.Index).ElementData; + + return Result; + } + + /** + * Allocates space for an element in the array. The element is not initialized, and you must use the corresponding placement new operator + * to construct the element in the allocated memory. + */ + FSparseArrayAllocationInfo AddUninitialized() + { + int32 Index; + if(NumFreeIndices) + { + // Remove and use the first index from the list of free elements. + Index = FirstFreeIndex; + FirstFreeIndex = GetData(FirstFreeIndex).NextFreeIndex; + --NumFreeIndices; + if(NumFreeIndices) + { + GetData(FirstFreeIndex).PrevFreeIndex = -1; + } + } + else + { + // Add a new element. + Index = Data.AddUninitialized(1); + AllocationFlags.Add(false); + } + + return AllocateIndex(Index); + } + + /** Adds an element to the array. */ + int32 Add(typename TTypeTraits::ConstInitType Element) + { + FSparseArrayAllocationInfo Allocation = AddUninitialized(); + new(Allocation) ElementType(Element); + return Allocation.Index; + } + + /** + * Allocates space for an element in the array at a given index. The element is not initialized, and you must use the corresponding placement new operator + * to construct the element in the allocated memory. + */ + FSparseArrayAllocationInfo InsertUninitialized(int32 Index) + { + // Enlarge the array to include the given index. + if(Index >= Data.Num()) + { + Data.AddUninitialized(Index + 1 - Data.Num()); + while(AllocationFlags.Num() < Data.Num()) + { + const int32 FreeIndex = AllocationFlags.Num(); + GetData(FreeIndex).PrevFreeIndex = -1; + GetData(FreeIndex).NextFreeIndex = FirstFreeIndex; + if(NumFreeIndices) + { + GetData(FirstFreeIndex).PrevFreeIndex = FreeIndex; + } + FirstFreeIndex = FreeIndex; + verify(AllocationFlags.Add(false) == FreeIndex); + ++NumFreeIndices; + }; + } + + // Verify that the specified index is free. + check(!AllocationFlags[Index]); + + // Remove the index from the list of free elements. + --NumFreeIndices; + const int32 PrevFreeIndex = GetData(Index).PrevFreeIndex; + const int32 NextFreeIndex = GetData(Index).NextFreeIndex; + if(PrevFreeIndex != -1) + { + GetData(PrevFreeIndex).NextFreeIndex = NextFreeIndex; + } + else + { + FirstFreeIndex = NextFreeIndex; + } + if(NextFreeIndex != -1) + { + GetData(NextFreeIndex).PrevFreeIndex = PrevFreeIndex; + } + + return AllocateIndex(Index); + } + + /** + * Inserts an element to the array. + */ + void Insert(int32 Index,typename TTypeTraits::ConstInitType Element) + { + new(InsertUninitialized(Index)) ElementType(Element); + } + + /** Removes Count elements from the array, starting from Index. */ + void RemoveAt(int32 Index,int32 Count = 1) + { + if (!TIsTriviallyDestructible::Value) + { + for (int32 It = Index, ItCount = Count; ItCount; ++It, --ItCount) + { + ((ElementType&)GetData(It).ElementData).~ElementType(); + } + } + + RemoveAtUninitialized(Index, Count); + } + + /** Removes Count elements from the array, starting from Index, without destructing them. */ + void RemoveAtUninitialized(int32 Index,int32 Count = 1) + { + for (; Count; --Count) + { + check(AllocationFlags[Index]); + + // Mark the element as free and add it to the free element list. + if(NumFreeIndices) + { + GetData(FirstFreeIndex).PrevFreeIndex = Index; + } + auto& IndexData = GetData(Index); + IndexData.PrevFreeIndex = -1; + IndexData.NextFreeIndex = NumFreeIndices > 0 ? FirstFreeIndex : INDEX_NONE; + FirstFreeIndex = Index; + ++NumFreeIndices; + AllocationFlags[Index] = false; + + ++Index; + } + } + + /** + * Removes all elements from the array, potentially leaving space allocated for an expected number of elements about to be added. + * @param ExpectedNumElements - The expected number of elements about to be added. + */ + void Empty(int32 ExpectedNumElements = 0) + { + // Destruct the allocated elements. + if( !TIsTriviallyDestructible::Value ) + { + for(TIterator It(*this);It;++It) + { + ElementType& Element = *It; + Element.~ElementType(); + } + } + + // Free the allocated elements. + Data.Empty(ExpectedNumElements); + FirstFreeIndex = -1; + NumFreeIndices = 0; + AllocationFlags.Empty(ExpectedNumElements); + } + + /** Empties the array, but keep its allocated memory as slack. */ + void Reset() + { + // Destruct the allocated elements. + if( !TIsTriviallyDestructible::Value ) + { + for(TIterator It(*this);It;++It) + { + ElementType& Element = *It; + Element.~ElementType(); + } + } + + // Free the allocated elements. + Data.Reset(); + FirstFreeIndex = -1; + NumFreeIndices = 0; + AllocationFlags.Reset(); + } + + /** + * Preallocates enough memory to contain the specified number of elements. + * + * @param ExpectedNumElements the total number of elements that the array will have + */ + void Reserve(int32 ExpectedNumElements) + { + if ( ExpectedNumElements > Data.Num() ) + { + const int32 ElementsToAdd = ExpectedNumElements - Data.Num(); + + // allocate memory in the array itself + int32 ElementIndex = Data.AddUninitialized(ElementsToAdd); + + // now mark the new elements as free + for ( int32 FreeIndex = ExpectedNumElements - 1; FreeIndex >= ElementIndex; --FreeIndex ) + { + if(NumFreeIndices) + { + GetData(FirstFreeIndex).PrevFreeIndex = FreeIndex; + } + GetData(FreeIndex).PrevFreeIndex = -1; + GetData(FreeIndex).NextFreeIndex = NumFreeIndices > 0 ? FirstFreeIndex : INDEX_NONE; + FirstFreeIndex = FreeIndex; + ++NumFreeIndices; + } + //@fixme - this will have to do until TBitArray has a Reserve method.... + for ( int32 i = 0; i < ElementsToAdd; i++ ) + { + AllocationFlags.Add(false); + } + } + } + + /** Shrinks the array's storage to avoid slack. */ + void Shrink() + { + // Determine the highest allocated index in the data array. + int32 MaxAllocatedIndex = INDEX_NONE; + for(TConstSetBitIterator AllocatedIndexIt(AllocationFlags);AllocatedIndexIt;++AllocatedIndexIt) + { + MaxAllocatedIndex = FMath::Max(MaxAllocatedIndex,AllocatedIndexIt.GetIndex()); + } + + const int32 FirstIndexToRemove = MaxAllocatedIndex + 1; + if(FirstIndexToRemove < Data.Num()) + { + if(NumFreeIndices > 0) + { + // Look for elements in the free list that are in the memory to be freed. + int32 FreeIndex = FirstFreeIndex; + while(FreeIndex != INDEX_NONE) + { + if(FreeIndex >= FirstIndexToRemove) + { + const int32 PrevFreeIndex = GetData(FreeIndex).PrevFreeIndex; + const int32 NextFreeIndex = GetData(FreeIndex).NextFreeIndex; + if(NextFreeIndex != -1) + { + GetData(NextFreeIndex).PrevFreeIndex = PrevFreeIndex; + } + if(PrevFreeIndex != -1) + { + GetData(PrevFreeIndex).NextFreeIndex = NextFreeIndex; + } + else + { + FirstFreeIndex = NextFreeIndex; + } + --NumFreeIndices; + + FreeIndex = NextFreeIndex; + } + else + { + FreeIndex = GetData(FreeIndex).NextFreeIndex; + } + } + } + + // Truncate unallocated elements at the end of the data array. + Data.RemoveAt(FirstIndexToRemove,Data.Num() - FirstIndexToRemove); + AllocationFlags.RemoveAt(FirstIndexToRemove,AllocationFlags.Num() - FirstIndexToRemove); + } + + // Shrink the data array. + Data.Shrink(); + } + + /** Compacts the allocated elements into a contiguous index range. */ + /** Returns true if any elements were relocated, false otherwise. */ + bool Compact() + { + int32 NumFree = NumFreeIndices; + if (NumFree == 0) + { + return false; + } + + bool bResult = false; + + FElementOrFreeListLink* ElementData = Data.GetData(); + + int32 EndIndex = Data.Num(); + int32 TargetIndex = EndIndex - NumFree; + int32 FreeIndex = FirstFreeIndex; + while (FreeIndex != -1) + { + int32 NextFreeIndex = GetData(FreeIndex).NextFreeIndex; + if (FreeIndex < TargetIndex) + { + // We need an element here + do + { + --EndIndex; + } + while (!AllocationFlags[EndIndex]); + + RelocateConstructItems(ElementData + FreeIndex, ElementData + EndIndex, 1); + AllocationFlags[FreeIndex] = true; + + bResult = true; + } + + FreeIndex = NextFreeIndex; + } + + Data .RemoveAt(TargetIndex, NumFree); + AllocationFlags.RemoveAt(TargetIndex, NumFree); + + NumFreeIndices = 0; + FirstFreeIndex = -1; + + return bResult; + } + + /** Compacts the allocated elements into a contiguous index range. Does not change the iteration order of the elements. */ + /** Returns true if any elements were relocated, false otherwise. */ + bool CompactStable() + { + if (NumFreeIndices == 0) + { + return false; + } + + // Copy the existing elements to a new array. + TSparseArray CompactedArray; + CompactedArray.Empty(Num()); + for(TConstIterator It(*this);It;++It) + { + new(CompactedArray.AddUninitialized()) ElementType(*It); + } + + // Replace this array with the compacted array. + Exchange(*this,CompactedArray); + + return true; + } + + /** + * Helper function to return the amount of memory allocated by this container + * @return number of bytes allocated by this container + */ + uint32 GetAllocatedSize( void ) const + { + return (Data.Num() + Data.GetSlack()) * sizeof(FElementOrFreeListLink) + + AllocationFlags.GetAllocatedSize(); + } + + /** + * Equality comparison operator. + * Checks that both arrays have the same elements and element indices; that means that unallocated elements are signifigant! + */ + friend bool operator==(const TSparseArray& A,const TSparseArray& B) + { + if(A.GetMaxIndex() != B.GetMaxIndex()) + { + return false; + } + + for(int32 ElementIndex = 0;ElementIndex < A.GetMaxIndex();ElementIndex++) + { + const bool bIsAllocatedA = A.IsAllocated(ElementIndex); + const bool bIsAllocatedB = B.IsAllocated(ElementIndex); + if(bIsAllocatedA != bIsAllocatedB) + { + return false; + } + else if(bIsAllocatedA) + { + if(A[ElementIndex] != B[ElementIndex]) + { + return false; + } + } + } + + return true; + } + + /** + * Inequality comparison operator. + * Checks that both arrays have the same elements and element indices; that means that unallocated elements are signifigant! + */ + friend bool operator!=(const TSparseArray& A,const TSparseArray& B) + { + return !(A == B); + } + + /** Default constructor. */ + TSparseArray() + : FirstFreeIndex(-1) + , NumFreeIndices(0) + {} + + /** Move constructor. */ + TSparseArray(TSparseArray&& InCopy) + { + MoveOrCopy(*this, InCopy); + } + + /** Copy constructor. */ + TSparseArray(const TSparseArray& InCopy) + : FirstFreeIndex(-1) + , NumFreeIndices(0) + { + *this = InCopy; + } + + /** Move assignment operator. */ + TSparseArray& operator=(TSparseArray&& InCopy) + { + if(this != &InCopy) + { + MoveOrCopy(*this, InCopy); + } + return *this; + } + + /** Copy assignment operator. */ + TSparseArray& operator=(const TSparseArray& InCopy) + { + if (this != &InCopy) + { + int32 SrcMax = InCopy.GetMaxIndex(); + + // Reallocate the array. + Empty(SrcMax); + Data.AddUninitialized(SrcMax); + + // Copy the other array's element allocation state. + FirstFreeIndex = InCopy.FirstFreeIndex; + NumFreeIndices = InCopy.NumFreeIndices; + AllocationFlags = InCopy.AllocationFlags; + + // Determine whether we need per element construction or bulk copy is fine + if (!TIsTriviallyCopyConstructible::Value) + { + FElementOrFreeListLink* DestData = (FElementOrFreeListLink*)Data.GetData(); + const FElementOrFreeListLink* SrcData = (FElementOrFreeListLink*)InCopy.Data.GetData(); + + // Use the inplace new to copy the element to an array element + for (int32 Index = 0; Index < SrcMax; ++Index) + { + FElementOrFreeListLink& DestElement = DestData[Index]; + const FElementOrFreeListLink& SrcElement = SrcData [Index]; + if (InCopy.IsAllocated(Index)) + { + ::new((uint8*)&DestElement.ElementData) ElementType(*(const ElementType*)&SrcElement.ElementData); + } + else + { + DestElement.PrevFreeIndex = SrcElement.PrevFreeIndex; + DestElement.NextFreeIndex = SrcElement.NextFreeIndex; + } + } + } + else + { + // Use the much faster path for types that allow it + FMemory::Memcpy(Data.GetData(), InCopy.Data.GetData(), sizeof(FElementOrFreeListLink) * SrcMax); + } + } + return *this; + } + +private: + template + FORCEINLINE static typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(SparseArrayType& ToArray, SparseArrayType& FromArray) + { + // Destruct the allocated elements. + if( !TIsTriviallyDestructible::Value ) + { + for (ElementType& Element : ToArray) + { + DestructItem(&Element); + } + } + + ToArray.Data = (DataType&&)FromArray.Data; + ToArray.AllocationFlags = (AllocationBitArrayType&&)FromArray.AllocationFlags; + + ToArray.FirstFreeIndex = FromArray.FirstFreeIndex; + ToArray.NumFreeIndices = FromArray.NumFreeIndices; + FromArray.FirstFreeIndex = -1; + FromArray.NumFreeIndices = 0; + } + + template + FORCEINLINE static typename TEnableIf::MoveWillEmptyContainer>::Type MoveOrCopy(SparseArrayType& ToArray, SparseArrayType& FromArray) + { + ToArray = FromArray; + } + +public: + // Accessors. + ElementType& operator[](int32 Index) + { + checkSlow(Index >= 0 && Index < Data.Num() && Index < AllocationFlags.Num()); + //checkSlow(AllocationFlags[Index]); // Disabled to improve loading times -BZ + return *(ElementType*)&GetData(Index).ElementData; + } + const ElementType& operator[](int32 Index) const + { + checkSlow(Index >= 0 && Index < Data.Num() && Index < AllocationFlags.Num()); + //checkSlow(AllocationFlags[Index]); // Disabled to improve loading times -BZ + return *(ElementType*)&GetData(Index).ElementData; + } + + bool IsAllocated(int32 Index) const { return AllocationFlags[Index]; } + int32 GetMaxIndex() const { return Data.Num(); } + int32 Num() const { return Data.Num() - NumFreeIndices; } + + /** + * Checks that the specified address is not part of an element within the container. Used for implementations + * to check that reference arguments aren't going to be invalidated by possible reallocation. + * + * @param Addr The address to check. + */ + FORCEINLINE void CheckAddress(const ElementType* Addr) const + { + Data.CheckAddress(Addr); + } + +private: + + /** The base class of sparse array iterators. */ + template + class TBaseIterator + { + public: + typedef TConstSetBitIterator BitArrayItType; + + private: + typedef typename TChooseClass::Result ArrayType; + typedef typename TChooseClass::Result ItElementType; + + public: + explicit TBaseIterator(ArrayType& InArray, const BitArrayItType& InBitArrayIt) + : Array (InArray) + , BitArrayIt(InBitArrayIt) + { + } + + FORCEINLINE TBaseIterator& operator++() + { + // Iterate to the next set allocation flag. + ++BitArrayIt; + return *this; + } + + FORCEINLINE int32 GetIndex() const { return BitArrayIt.GetIndex(); } + + FORCEINLINE friend bool operator==(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.BitArrayIt == Rhs.BitArrayIt && &Lhs.Array == &Rhs.Array; } + FORCEINLINE friend bool operator!=(const TBaseIterator& Lhs, const TBaseIterator& Rhs) { return Lhs.BitArrayIt != Rhs.BitArrayIt || &Lhs.Array != &Rhs.Array; } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return !!BitArrayIt; + } + + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE ItElementType& operator*() const { return Array[GetIndex()]; } + FORCEINLINE ItElementType* operator->() const { return &Array[GetIndex()]; } + FORCEINLINE const FRelativeBitReference& GetRelativeBitReference() const { return BitArrayIt; } + + protected: + ArrayType& Array; + BitArrayItType BitArrayIt; + }; + +public: + + /** Iterates over all allocated elements in a sparse array. */ + class TIterator : public TBaseIterator + { + public: + TIterator(TSparseArray& InArray) + : TBaseIterator(InArray, TConstSetBitIterator(InArray.AllocationFlags)) + { + } + + TIterator(TSparseArray& InArray, const typename TBaseIterator::BitArrayItType& InBitArrayIt) + : TBaseIterator(InArray, InBitArrayIt) + { + } + + /** Safely removes the current element from the array. */ + void RemoveCurrent() + { + this->Array.RemoveAt(this->GetIndex()); + } + }; + + /** Iterates over all allocated elements in a const sparse array. */ + class TConstIterator : public TBaseIterator + { + public: + TConstIterator(const TSparseArray& InArray) + : TBaseIterator(InArray, TConstSetBitIterator(InArray.AllocationFlags)) + { + } + + TConstIterator(const TSparseArray& InArray, const typename TBaseIterator::BitArrayItType& InBitArrayIt) + : TBaseIterator(InArray, InBitArrayIt) + { + } + }; + + #if TSPARSEARRAY_RANGED_FOR_CHECKS + class TRangedForIterator : public TIterator + { + public: + TRangedForIterator(TSparseArray& InArray, const typename TBaseIterator::BitArrayItType& InBitArrayIt) + : TIterator (InArray, InBitArrayIt) + , InitialNum(InArray.Num()) + { + } + + private: + int32 InitialNum; + + friend FORCEINLINE bool operator!=(const TRangedForIterator& Lhs, const TRangedForIterator& Rhs) + { + // We only need to do the check in this operator, because no other operator will be + // called until after this one returns. + // + // Also, we should only need to check one side of this comparison - if the other iterator isn't + // even from the same array then the compiler has generated bad code. + ensureMsgf(Lhs.Array.Num() == Lhs.InitialNum, TEXT("Container has changed during ranged-for iteration!")); + return *(TIterator*)&Lhs != *(TIterator*)&Rhs; + } + }; + + class TRangedForConstIterator : public TConstIterator + { + public: + TRangedForConstIterator(const TSparseArray& InArray, const typename TBaseIterator::BitArrayItType& InBitArrayIt) + : TConstIterator(InArray, InBitArrayIt) + , InitialNum (InArray.Num()) + { + } + + private: + int32 InitialNum; + + friend FORCEINLINE bool operator!=(const TRangedForConstIterator& Lhs, const TRangedForConstIterator& Rhs) + { + // We only need to do the check in this operator, because no other operator will be + // called until after this one returns. + // + // Also, we should only need to check one side of this comparison - if the other iterator isn't + // even from the same array then the compiler has generated bad code. + ensureMsgf(Lhs.Array.Num() == Lhs.InitialNum, TEXT("Container has changed during ranged-for iteration!")); + return *(TIterator*)&Lhs != *(TIterator*)&Rhs; + } + }; + #else + using TRangedForIterator = TIterator; + using TRangedForConstIterator = TConstIterator; + #endif + + /** Creates an iterator for the contents of this array */ + TIterator CreateIterator() + { + return TIterator(*this); + } + + /** Creates a const iterator for the contents of this array */ + TConstIterator CreateConstIterator() const + { + return TConstIterator(*this); + } + +private: + /** + * DO NOT USE DIRECTLY + * STL-like iterators to enable range-based for loop support. + */ + FORCEINLINE friend TRangedForIterator begin( TSparseArray& Array) { return TRangedForIterator (Array, TConstSetBitIterator(Array.AllocationFlags)); } + FORCEINLINE friend TRangedForConstIterator begin(const TSparseArray& Array) { return TRangedForConstIterator(Array, TConstSetBitIterator(Array.AllocationFlags)); } + FORCEINLINE friend TRangedForIterator end ( TSparseArray& Array) { return TRangedForIterator (Array, TConstSetBitIterator(Array.AllocationFlags, Array.AllocationFlags.Num())); } + FORCEINLINE friend TRangedForConstIterator end (const TSparseArray& Array) { return TRangedForConstIterator(Array, TConstSetBitIterator(Array.AllocationFlags, Array.AllocationFlags.Num())); } + +public: + /** An iterator which only iterates over the elements of the array which correspond to set bits in a separate bit array. */ + template + class TConstSubsetIterator + { + public: + TConstSubsetIterator( const TSparseArray& InArray, const TBitArray& InBitArray ): + Array(InArray), + BitArrayIt(InArray.AllocationFlags,InBitArray) + {} + FORCEINLINE TConstSubsetIterator& operator++() + { + // Iterate to the next element which is both allocated and has its bit set in the other bit array. + ++BitArrayIt; + return *this; + } + FORCEINLINE int32 GetIndex() const { return BitArrayIt.GetIndex(); } + + /** conversion to "bool" returning true if the iterator is valid. */ + FORCEINLINE explicit operator bool() const + { + return !!BitArrayIt; + } + /** inverse of the "bool" operator */ + FORCEINLINE bool operator !() const + { + return !(bool)*this; + } + + FORCEINLINE const ElementType& operator*() const { return Array(GetIndex()); } + FORCEINLINE const ElementType* operator->() const { return &Array(GetIndex()); } + FORCEINLINE const FRelativeBitReference& GetRelativeBitReference() const { return BitArrayIt; } + private: + const TSparseArray& Array; + TConstDualSetBitIterator BitArrayIt; + }; + + /** Concatenation operators */ + TSparseArray& operator+=( const TSparseArray& OtherArray ) + { + this->Reserve(this->Num() + OtherArray.Num()); + for ( typename TSparseArray::TConstIterator It(OtherArray); It; ++It ) + { + this->Add(*It); + } + return *this; + } + TSparseArray& operator+=( const TArray& OtherArray ) + { + this->Reserve(this->Num() + OtherArray.Num()); + for ( int32 Idx = 0; Idx < OtherArray.Num(); Idx++ ) + { + this->Add(OtherArray[Idx]); + } + return *this; + } + +private: + + /** + * The element type stored is only indirectly related to the element type requested, to avoid instantiating TArray redundantly for + * compatible types. + */ + typedef TSparseArrayElementOrFreeListLink< + TAlignedBytes + > FElementOrFreeListLink; + + /** Extracts the element value from the array's element structure and passes it to the user provided comparison class. */ + template + class FElementCompareClass + { + const PREDICATE_CLASS& Predicate; + + public: + FElementCompareClass( const PREDICATE_CLASS& InPredicate ) + : Predicate( InPredicate ) + {} + + bool operator()( const FElementOrFreeListLink& A,const FElementOrFreeListLink& B ) const + { + return Predicate(*(ElementType*)&A.ElementData,*(ElementType*)&B.ElementData); + } + }; + + /** Accessor for the element or free list data. */ + FElementOrFreeListLink& GetData(int32 Index) + { + return ((FElementOrFreeListLink*)Data.GetData())[Index]; + } + + /** Accessor for the element or free list data. */ + const FElementOrFreeListLink& GetData(int32 Index) const + { + return ((FElementOrFreeListLink*)Data.GetData())[Index]; + } + + typedef TArray DataType; + DataType Data; + + typedef TBitArray AllocationBitArrayType; + AllocationBitArrayType AllocationFlags; + + /** The index of an unallocated element in the array that currently contains the head of the linked list of free elements. */ + int32 FirstFreeIndex; + + /** The number of elements in the free list. */ + int32 NumFreeIndices; +}; + +template +struct TContainerTraits > : public TContainerTraitsBase > +{ + enum { MoveWillEmptyContainer = + TContainerTraits::DataType>::MoveWillEmptyContainer && + TContainerTraits::AllocationBitArrayType>::MoveWillEmptyContainer }; +}; + +struct FScriptSparseArrayLayout +{ + int32 ElementOffset; + int32 Alignment; + int32 Size; +}; + +// Untyped sparse array type for accessing TSparseArray data, like FScriptArray for TArray. +// Must have the same memory representation as a TSet. +class FScriptSparseArray +{ +public: + static FScriptSparseArrayLayout GetScriptLayout(int32 ElementSize, int32 ElementAlignment) + { + FScriptSparseArrayLayout Result; + Result.ElementOffset = 0; + Result.Alignment = FMath::Max(ElementAlignment, (int32)alignof(FFreeListLink)); + Result.Size = FMath::Max(ElementSize, (int32)sizeof (FFreeListLink)); + + return Result; + } + + FScriptSparseArray() + : FirstFreeIndex(-1) + , NumFreeIndices(0) + { + } + + bool IsValidIndex(int32 Index) const + { + return AllocationFlags.IsValidIndex(Index) && AllocationFlags[Index]; + } + + int32 Num() const + { + return Data.Num() - NumFreeIndices; + } + + int32 GetMaxIndex() const + { + return Data.Num(); + } + + void* GetData(int32 Index, const FScriptSparseArrayLayout& Layout) + { + return (uint8*)Data.GetData() + Layout.Size * Index; + } + + const void* GetData(int32 Index, const FScriptSparseArrayLayout& Layout) const + { + return (const uint8*)Data.GetData() + Layout.Size * Index; + } + + void Empty(int32 Slack, const FScriptSparseArrayLayout& Layout) + { + // Free the allocated elements. + Data.Empty(Slack, Layout.Size); + FirstFreeIndex = -1; + NumFreeIndices = 0; + AllocationFlags.Empty(Slack); + } + + /** + * Adds an uninitialized object to the array. + * + * @return The index of the added element. + */ + int32 AddUninitialized(const FScriptSparseArrayLayout& Layout) + { + int32 Index; + if (NumFreeIndices) + { + // Remove and use the first index from the list of free elements. + Index = FirstFreeIndex; + FirstFreeIndex = GetFreeListLink(FirstFreeIndex, Layout)->NextFreeIndex; + --NumFreeIndices; + if(NumFreeIndices) + { + GetFreeListLink(FirstFreeIndex, Layout)->PrevFreeIndex = -1; + } + } + else + { + // Add a new element. + Index = Data.Add(1, Layout.Size); + AllocationFlags.Add(false); + } + + AllocationFlags[Index] = true; + + return Index; + } + + /** Removes Count elements from the array, starting from Index, without destructing them. */ + void RemoveAtUninitialized(const FScriptSparseArrayLayout& Layout, int32 Index, int32 Count = 1) + { + for (; Count; --Count) + { + check(AllocationFlags[Index]); + + // Mark the element as free and add it to the free element list. + if(NumFreeIndices) + { + GetFreeListLink(FirstFreeIndex, Layout)->PrevFreeIndex = Index; + } + + auto* IndexData = GetFreeListLink(Index, Layout); + IndexData->PrevFreeIndex = -1; + IndexData->NextFreeIndex = NumFreeIndices > 0 ? FirstFreeIndex : INDEX_NONE; + FirstFreeIndex = Index; + ++NumFreeIndices; + AllocationFlags[Index] = false; + + ++Index; + } + } + +private: + FScriptArray Data; + FScriptBitArray AllocationFlags; + int32 FirstFreeIndex; + int32 NumFreeIndices; + + // This function isn't intended to be called, just to be compiled to validate the correctness of the type. + static void CheckConstraints() + { + typedef FScriptSparseArray ScriptType; + typedef TSparseArray RealType; + + // Check that the class footprint is the same + static_assert(sizeof (ScriptType) == sizeof (RealType), "FScriptSparseArray's size doesn't match TSparseArray"); + static_assert(alignof(ScriptType) == alignof(RealType), "FScriptSparseArray's alignment doesn't match TSparseArray"); + + // Check member sizes + static_assert(sizeof(DeclVal().Data) == sizeof(DeclVal().Data), "FScriptSparseArray's Data member size does not match TSparseArray's"); + static_assert(sizeof(DeclVal().AllocationFlags) == sizeof(DeclVal().AllocationFlags), "FScriptSparseArray's AllocationFlags member size does not match TSparseArray's"); + static_assert(sizeof(DeclVal().FirstFreeIndex) == sizeof(DeclVal().FirstFreeIndex), "FScriptSparseArray's FirstFreeIndex member size does not match TSparseArray's"); + static_assert(sizeof(DeclVal().NumFreeIndices) == sizeof(DeclVal().NumFreeIndices), "FScriptSparseArray's NumFreeIndices member size does not match TSparseArray's"); + + // Check member offsets + static_assert(STRUCT_OFFSET(ScriptType, Data) == STRUCT_OFFSET(RealType, Data), "FScriptSparseArray's Data member offset does not match TSparseArray's"); + static_assert(STRUCT_OFFSET(ScriptType, AllocationFlags) == STRUCT_OFFSET(RealType, AllocationFlags), "FScriptSparseArray's AllocationFlags member offset does not match TSparseArray's"); + static_assert(STRUCT_OFFSET(ScriptType, FirstFreeIndex) == STRUCT_OFFSET(RealType, FirstFreeIndex), "FScriptSparseArray's FirstFreeIndex member offset does not match TSparseArray's"); + static_assert(STRUCT_OFFSET(ScriptType, NumFreeIndices) == STRUCT_OFFSET(RealType, NumFreeIndices), "FScriptSparseArray's NumFreeIndices member offset does not match TSparseArray's"); + + // Check free index offsets + static_assert(STRUCT_OFFSET(ScriptType::FFreeListLink, PrevFreeIndex) == STRUCT_OFFSET(RealType::FElementOrFreeListLink, PrevFreeIndex), "FScriptSparseArray's FFreeListLink's PrevFreeIndex member offset does not match TSparseArray's"); + static_assert(STRUCT_OFFSET(ScriptType::FFreeListLink, NextFreeIndex) == STRUCT_OFFSET(RealType::FElementOrFreeListLink, NextFreeIndex), "FScriptSparseArray's FFreeListLink's NextFreeIndex member offset does not match TSparseArray's"); + } + + struct FFreeListLink + { + /** If the element isn't allocated, this is a link to the previous element in the array's free list. */ + int32 PrevFreeIndex; + + /** If the element isn't allocated, this is a link to the next element in the array's free list. */ + int32 NextFreeIndex; + }; + + /** Accessor for the element or free list data. */ + FORCEINLINE FFreeListLink* GetFreeListLink(int32 Index, const FScriptSparseArrayLayout& Layout) + { + return (FFreeListLink*)GetData(Index, Layout); + } + +public: + // These should really be private, because they shouldn't be called, but there's a bunch of code + // that needs to be fixed first. + FScriptSparseArray(const FScriptSparseArray&) { check(false); } + void operator=(const FScriptSparseArray&) { check(false); } +}; + +template <> +struct TIsZeroConstructType +{ + enum { Value = true }; +}; + +/** + * A placement new operator which constructs an element in a sparse array allocation. + */ +inline void* operator new(size_t Size,const FSparseArrayAllocationInfo& Allocation) +{ + ASSUME(Allocation.Pointer); + return Allocation.Pointer; +} diff --git a/version/Core/Public/API/UE/Containers/TArray.h b/version/Core/Public/API/UE/Containers/TArray.h new file mode 100644 index 0000000..14e329e --- /dev/null +++ b/version/Core/Public/API/UE/Containers/TArray.h @@ -0,0 +1,2022 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "../Templates/AreTypesEqual.h" +#include "../Templates/UnrealTypeTraits.h" +#include "../Templates/UnrealTemplate.h" +#include "ContainerAllocationPolicies.h" + +#include "../Templates/ChooseClass.h" +#include "../Templates/Sorting.h" + +#define TARRAY_RANGED_FOR_CHECKS 1 + +#pragma warning(push) +#pragma warning(disable : 4244) + +/** +* Generic iterator which can operate on types that expose the following: +* - A type called ElementType representing the contained type. +* - A method IndexType Num() const that returns the number of items in the container. +* - A method bool IsValidIndex(IndexType index) which returns whether a given index is valid in the container. +* - A method T& operator\[\](IndexType index) which returns a reference to a contained object by index. +* - A method void RemoveAt(IndexType index) which removes the element at index +*/ +template< typename ContainerType, typename ElementType, typename IndexType> +class TIndexedContainerIterator +{ +public: + TIndexedContainerIterator(ContainerType& InContainer, IndexType StartIndex = 0) + : Container(InContainer) + , Index(StartIndex) + { + } + + /** Advances iterator to the next element in the container. */ + TIndexedContainerIterator& operator++() + { + ++Index; + return *this; + } + TIndexedContainerIterator operator++(int) + { + TIndexedContainerIterator Tmp(*this); + ++Index; + return Tmp; + } + + /** Moves iterator to the previous element in the container. */ + TIndexedContainerIterator& operator--() + { + --Index; + return *this; + } + TIndexedContainerIterator operator--(int) + { + TIndexedContainerIterator Tmp(*this); + --Index; + return Tmp; + } + + /** iterator arithmetic support */ + TIndexedContainerIterator& operator+=(int32 Offset) + { + Index += Offset; + return *this; + } + + TIndexedContainerIterator operator+(int32 Offset) const + { + TIndexedContainerIterator Tmp(*this); + return Tmp += Offset; + } + + TIndexedContainerIterator& operator-=(int32 Offset) + { + return *this += -Offset; + } + + TIndexedContainerIterator operator-(int32 Offset) const + { + TIndexedContainerIterator Tmp(*this); + return Tmp -= Offset; + } + + ElementType& operator* () const + { + return Container[Index]; + } + + ElementType* operator->() const + { + return &Container[Index]; + } + + /** conversion to "bool" returning true if the iterator has not reached the last element. */ + FORCEINLINE explicit operator bool() const + { + return Container.IsValidIndex(Index); + } + + /** Returns an index to the current element. */ + IndexType GetIndex() const + { + return Index; + } + + /** Resets the iterator to the first element. */ + void Reset() + { + Index = 0; + } + + /** Sets iterator to the last element. */ + void SetToEnd() + { + Index = Container.Num(); + } + + /** Removes current element in array. This invalidates the current iterator value and it must be incremented */ + void RemoveCurrent() + { + Container.RemoveAt(Index); + Index--; + } + + FORCEINLINE friend bool operator==(const TIndexedContainerIterator& Lhs, const TIndexedContainerIterator& Rhs) { return &Lhs.Container == &Rhs.Container && Lhs.Index == Rhs.Index; } + FORCEINLINE friend bool operator!=(const TIndexedContainerIterator& Lhs, const TIndexedContainerIterator& Rhs) { return &Lhs.Container != &Rhs.Container || Lhs.Index != Rhs.Index; } + +private: + + ContainerType & Container; + IndexType Index; +}; + + +/** operator + */ +template +FORCEINLINE TIndexedContainerIterator operator+(int32 Offset, TIndexedContainerIterator RHS) +{ + return RHS + Offset; +} + + +#if TARRAY_RANGED_FOR_CHECKS +/** +* Pointer-like iterator type for ranged-for loops which checks that the +* container hasn't been resized during iteration. +*/ +template +struct TCheckedPointerIterator +{ + // This iterator type only supports the minimal functionality needed to support + // C++ ranged-for syntax. For example, it does not provide post-increment ++ nor ==. + // + // We do add an operator-- to help FString implementation + + explicit TCheckedPointerIterator(const int32& InNum, ElementType* InPtr) + : Ptr(InPtr) + , CurrentNum(InNum) + , InitialNum(InNum) + { + } + + FORCEINLINE ElementType& operator*() const + { + return *Ptr; + } + + FORCEINLINE TCheckedPointerIterator& operator++() + { + ++Ptr; + return *this; + } + + FORCEINLINE TCheckedPointerIterator& operator--() + { + --Ptr; + return *this; + } + +private: + ElementType * Ptr; + const int32& CurrentNum; + int32 InitialNum; + + FORCEINLINE friend bool operator!=(const TCheckedPointerIterator& Lhs, const TCheckedPointerIterator& Rhs) + { + // We only need to do the check in this operator, because no other operator will be + // called until after this one returns. + // + // Also, we should only need to check one side of this comparison - if the other iterator isn't + // even from the same array then the compiler has generated bad code. + ensureMsgf(Lhs.CurrentNum == Lhs.InitialNum, TEXT("Array has changed during ranged-for iteration!")); + return Lhs.Ptr != Rhs.Ptr; + } +}; +#endif + + +template +struct TDereferencingIterator +{ + explicit TDereferencingIterator(IteratorType InIter) + : Iter(InIter) + { + } + + FORCEINLINE ElementType& operator*() const + { + return *(ElementType*)*Iter; + } + + FORCEINLINE TDereferencingIterator& operator++() + { + ++Iter; + return *this; + } + +private: + IteratorType Iter; + + FORCEINLINE friend bool operator!=(const TDereferencingIterator& Lhs, const TDereferencingIterator& Rhs) + { + return Lhs.Iter != Rhs.Iter; + } +}; + +namespace UE4Array_Private +{ + template + struct TCanMoveTArrayPointersBetweenArrayTypes + { + typedef typename FromArrayType::Allocator FromAllocatorType; + typedef typename ToArrayType::Allocator ToAllocatorType; + typedef typename FromArrayType::ElementType FromElementType; + typedef typename ToArrayType::ElementType ToElementType; + + enum + { + Value = + TAreTypesEqual::Value && // Allocators must be equal + TContainerTraits::MoveWillEmptyContainer && // A move must be allowed to leave the source array empty + ( + TAreTypesEqual ::Value || // The element type of the container must be the same, or... + TIsBitwiseConstructible::Value // ... the element type of the source container must be bitwise constructible from the element type in the destination container + ) + }; + }; +} + + +/** +* Templated dynamic array +* +* A dynamically sized array of typed elements. Makes the assumption that your elements are relocate-able; +* i.e. that they can be transparently moved to new memory without a copy constructor. The main implication +* is that pointers to elements in the TArray may be invalidated by adding or removing other elements to the array. +* Removal of elements is O(N) and invalidates the indices of subsequent elements. +* +* Caution: as noted below some methods are not safe for element types that require constructors. +* +**/ +template +class TArray +{ + template + friend class TArray; + +public: + + typedef InElementType ElementType; + typedef InAllocator Allocator; + + /** + * Constructor, initializes element number counters. + */ + FORCEINLINE TArray() + : ArrayNum(0) + , ArrayMax(0) + {} + + /** + * Constructor from a raw array of elements. + * + * @param Ptr A pointer to an array of elements to copy. + * @param Count The number of elements to copy from Ptr. + * @see Append + */ + FORCEINLINE TArray(const ElementType* Ptr, int32 Count) + { + check(Ptr != nullptr || Count == 0); + + CopyToEmpty(Ptr, Count, 0, 0); + } + + /** + * Initializer list constructor + */ + TArray(std::initializer_list InitList) + { + // This is not strictly legal, as std::initializer_list's iterators are not guaranteed to be pointers, but + // this appears to be the case on all of our implementations. Also, if it's not true on a new implementation, + // it will fail to compile rather than behave badly. + CopyToEmpty(InitList.begin(), (int32)InitList.size(), 0, 0); + } + + /** + * Copy constructor with changed allocator. Use the common routine to perform the copy. + * + * @param Other The source array to copy. + */ + template + FORCEINLINE explicit TArray(const TArray& Other) + { + CopyToEmpty(Other.GetData(), Other.Num(), 0, 0); + } + + /** + * Copy constructor. Use the common routine to perform the copy. + * + * @param Other The source array to copy. + */ + FORCEINLINE TArray(const TArray& Other) + { + CopyToEmpty(Other.GetData(), Other.Num(), 0, 0); + } + + /** + * Copy constructor. Use the common routine to perform the copy. + * + * @param Other The source array to copy. + * @param ExtraSlack Tells how much extra memory should be preallocated + * at the end of the array in the number of elements. + */ + FORCEINLINE TArray(const TArray& Other, int32 ExtraSlack) + { + CopyToEmpty(Other.GetData(), Other.Num(), 0, ExtraSlack); + } + + /** + * Initializer list assignment operator. First deletes all currently contained elements + * and then copies from initializer list. + * + * @param InitList The initializer_list to copy from. + */ + TArray& operator=(std::initializer_list InitList) + { + DestructItems(GetData(), ArrayNum); + // This is not strictly legal, as std::initializer_list's iterators are not guaranteed to be pointers, but + // this appears to be the case on all of our implementations. Also, if it's not true on a new implementation, + // it will fail to compile rather than behave badly. + CopyToEmpty(InitList.begin(), (int32)InitList.size(), ArrayMax, 0); + return *this; + } + + /** + * Assignment operator. First deletes all currently contained elements + * and then copies from other array. + * + * Allocator changing version. + * + * @param Other The source array to assign from. + */ + template + TArray& operator=(const TArray& Other) + { + DestructItems(GetData(), ArrayNum); + CopyToEmpty(Other.GetData(), Other.Num(), ArrayMax, 0); + return *this; + } + + /** + * Assignment operator. First deletes all currently contained elements + * and then copies from other array. + * + * @param Other The source array to assign from. + */ + TArray& operator=(const TArray& Other) + { + if (this != &Other) + { + DestructItems(GetData(), ArrayNum); + CopyToEmpty(Other.GetData(), Other.Num(), ArrayMax, 0); + } + return *this; + } + +private: + + /** + * Moves or copies array. Depends on the array type traits. + * + * This override moves. + * + * @param ToArray Array to move into. + * @param FromArray Array to move from. + */ + template + static FORCEINLINE typename TEnableIf::Value>::Type MoveOrCopy(ToArrayType& ToArray, FromArrayType& FromArray, int32 PrevMax) + { + ToArray.AllocatorInstance.MoveToEmpty(FromArray.AllocatorInstance); + + ToArray.ArrayNum = FromArray.ArrayNum; + ToArray.ArrayMax = FromArray.ArrayMax; + FromArray.ArrayNum = 0; + FromArray.ArrayMax = 0; + } + + /** + * Moves or copies array. Depends on the array type traits. + * + * This override copies. + * + * @param ToArray Array to move into. + * @param FromArray Array to move from. + * @param ExtraSlack Tells how much extra memory should be preallocated + * at the end of the array in the number of elements. + */ + template + static FORCEINLINE typename TEnableIf::Value>::Type MoveOrCopy(ToArrayType& ToArray, FromArrayType& FromArray, int32 PrevMax) + { + ToArray.CopyToEmpty(FromArray.GetData(), FromArray.Num(), PrevMax, 0); + } + + /** + * Moves or copies array. Depends on the array type traits. + * + * This override moves. + * + * @param ToArray Array to move into. + * @param FromArray Array to move from. + * @param ExtraSlack Tells how much extra memory should be preallocated + * at the end of the array in the number of elements. + */ + template + static FORCEINLINE typename TEnableIf::Value>::Type MoveOrCopyWithSlack(ToArrayType& ToArray, FromArrayType& FromArray, int32 PrevMax, int32 ExtraSlack) + { + MoveOrCopy(ToArray, FromArray, PrevMax); + + ToArray.Reserve(ToArray.ArrayNum + ExtraSlack); + } + + /** + * Moves or copies array. Depends on the array type traits. + * + * This override copies. + * + * @param ToArray Array to move into. + * @param FromArray Array to move from. + * @param ExtraSlack Tells how much extra memory should be preallocated + * at the end of the array in the number of elements. + */ + template + static FORCEINLINE typename TEnableIf::Value>::Type MoveOrCopyWithSlack(ToArrayType& ToArray, FromArrayType& FromArray, int32 PrevMax, int32 ExtraSlack) + { + ToArray.CopyToEmpty(FromArray.GetData(), FromArray.Num(), PrevMax, ExtraSlack); + } + +public: + /** + * Move constructor. + * + * @param Other Array to move from. + */ + FORCEINLINE TArray(TArray&& Other) + { + MoveOrCopy(*this, Other, 0); + } + + /** + * Move constructor. + * + * @param Other Array to move from. + */ + template + FORCEINLINE explicit TArray(TArray&& Other) + { + MoveOrCopy(*this, Other, 0); + } + + /** + * Move constructor. + * + * @param Other Array to move from. + * @param ExtraSlack Tells how much extra memory should be preallocated + * at the end of the array in the number of elements. + */ + template + TArray(TArray&& Other, int32 ExtraSlack) + { + // We don't implement move semantics for general OtherAllocators, as there's no way + // to tell if they're compatible with the current one. Probably going to be a pretty + // rare requirement anyway. + + MoveOrCopyWithSlack(*this, Other, 0, ExtraSlack); + } + + /** + * Move assignment operator. + * + * @param Other Array to assign and move from. + */ + TArray& operator=(TArray&& Other) + { + if (this != &Other) + { + DestructItems(GetData(), ArrayNum); + MoveOrCopy(*this, Other, ArrayMax); + } + return *this; + } + + /** Destructor. */ + ~TArray() + { + DestructItems(GetData(), ArrayNum); + +#if defined(_MSC_VER) && !defined(__clang__) // Relies on MSVC-specific lazy template instantiation to support arrays of incomplete types + // ensure that DebugGet gets instantiated. + //@todo it would be nice if we had a cleaner solution for DebugGet + volatile const ElementType* Dummy = &DebugGet(0); +#endif + } + + /** + * Helper function for returning a typed pointer to the first array entry. + * + * @returns Pointer to first array entry or nullptr if ArrayMax == 0. + */ + FORCEINLINE ElementType* GetData() const + { + return (ElementType*)AllocatorInstance.GetAllocation(); + } + + /** + * Helper function returning the size of the inner type. + * + * @returns Size in bytes of array type. + */ + FORCEINLINE uint32 GetTypeSize() const + { + return sizeof(ElementType); + } + + /** + * Helper function to return the amount of memory allocated by this + * container. + * + * @returns Number of bytes allocated by this container. + */ + FORCEINLINE uint32 GetAllocatedSize(void) const + { + return AllocatorInstance.GetAllocatedSize(ArrayMax, sizeof(ElementType)); + } + + /** + * Returns the amount of slack in this array in elements. + * + * @see Num, Shrink + */ + FORCEINLINE int32 GetSlack() const + { + return ArrayMax - ArrayNum; + } + + /** + * Checks array invariants: if array size is greater than zero and less + * than maximum. + */ + FORCEINLINE void CheckInvariants() const + { + checkSlow((ArrayNum >= 0) & (ArrayMax >= ArrayNum)); // & for one branch + } + + /** + * Checks if index is in array range. + * + * @param Index Index to check. + */ + FORCEINLINE void RangeCheck(int32 Index) const + { + CheckInvariants(); + + // Template property, branch will be optimized out + if (Allocator::RequireRangeCheck) + { + checkf((Index >= 0) & (Index < ArrayNum), TEXT("Array index out of bounds: %i from an array of size %i"), Index, ArrayNum); // & for one branch + } + } + + /** + * Tests if index is valid, i.e. greater than or equal to zero, and less than the number of elements in the array. + * + * @param Index Index to test. + * @returns True if index is valid. False otherwise. + */ + FORCEINLINE bool IsValidIndex(int32 Index) const + { + return Index >= 0 && Index < ArrayNum; + } + + /** + * Returns number of elements in array. + * + * @returns Number of elements in array. + * @see GetSlack + */ + FORCEINLINE int32 Num() const + { + return ArrayNum; + } + + /** + * Returns maximum number of elements in array. + * + * @returns Maximum number of elements in array. + * @see GetSlack + */ + FORCEINLINE int32 Max() const + { + return ArrayMax; + } + + /** + * Array bracket operator. Returns reference to element at give index. + * + * @returns Reference to indexed element. + */ + FORCEINLINE ElementType& operator[](int32 Index) + { + RangeCheck(Index); + return GetData()[Index]; + } + + /** + * Array bracket operator. Returns reference to element at give index. + * + * Const version of the above. + * + * @returns Reference to indexed element. + */ + FORCEINLINE const ElementType& operator[](int32 Index) const + { + RangeCheck(Index); + return GetData()[Index]; + } + + /** + * Pops element from the array. + * + * @param bAllowShrinking If this call allows shrinking of the array during element remove. + * @returns Popped element. + */ + FORCEINLINE ElementType Pop(bool bAllowShrinking = true) + { + RangeCheck(0); + ElementType Result = MoveTempIfPossible(GetData()[ArrayNum - 1]); + RemoveAt(ArrayNum - 1, 1, bAllowShrinking); + return Result; + } + + /** + * Pushes element into the array. + * + * @param Item Item to push. + */ + FORCEINLINE void Push(ElementType&& Item) + { + Add(MoveTempIfPossible(Item)); + } + + /** + * Pushes element into the array. + * + * Const ref version of the above. + * + * @param Item Item to push. + * @see Pop, Top + */ + FORCEINLINE void Push(const ElementType& Item) + { + Add(Item); + } + + /** + * Returns the top element, i.e. the last one. + * + * @returns Reference to the top element. + * @see Pop, Push + */ + FORCEINLINE ElementType& Top() + { + return Last(); + } + + /** + * Returns the top element, i.e. the last one. + * + * Const version of the above. + * + * @returns Reference to the top element. + * @see Pop, Push + */ + FORCEINLINE const ElementType& Top() const + { + return Last(); + } + + /** + * Returns n-th last element from the array. + * + * @param IndexFromTheEnd (Optional) Index from the end of array (default = 0). + * @returns Reference to n-th last element from the array. + */ + FORCEINLINE ElementType& Last(int32 IndexFromTheEnd = 0) + { + RangeCheck(ArrayNum - IndexFromTheEnd - 1); + return GetData()[ArrayNum - IndexFromTheEnd - 1]; + } + + /** + * Returns n-th last element from the array. + * + * Const version of the above. + * + * @param IndexFromTheEnd (Optional) Index from the end of array (default = 0). + * @returns Reference to n-th last element from the array. + */ + FORCEINLINE const ElementType& Last(int32 IndexFromTheEnd = 0) const + { + RangeCheck(ArrayNum - IndexFromTheEnd - 1); + return GetData()[ArrayNum - IndexFromTheEnd - 1]; + } + + /** + * Shrinks the array's used memory to smallest possible to store elements currently in it. + * + * @see Slack + */ + FORCEINLINE void Shrink() + { + CheckInvariants(); + if (ArrayMax != ArrayNum) + { + ResizeTo(ArrayNum); + } + } + + /** + * Finds element within the array. + * + * @param Item Item to look for. + * @param Index Will contain the found index. + * @returns True if found. False otherwise. + * @see FindLast, FindLastByPredicate + */ + FORCEINLINE bool Find(const ElementType& Item, int32& Index) const + { + Index = this->Find(Item); + return Index != INDEX_NONE; + } + + /** + * Finds element within the array. + * + * @param Item Item to look for. + * @returns Index of the found element. INDEX_NONE otherwise. + * @see FindLast, FindLastByPredicate + */ + int32 Find(const ElementType& Item) const + { + const ElementType* RESTRICT Start = GetData(); + for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data) + { + if (*Data == Item) + { + return static_cast(Data - Start); + } + } + return INDEX_NONE; + } + + /** + * Finds element within the array starting from the end. + * + * @param Item Item to look for. + * @param Index Output parameter. Found index. + * @returns True if found. False otherwise. + * @see Find, FindLastByPredicate + */ + FORCEINLINE bool FindLast(const ElementType& Item, int32& Index) const + { + Index = this->FindLast(Item); + return Index != INDEX_NONE; + } + + /** + * Finds element within the array starting from the end. + * + * @param Item Item to look for. + * @returns Index of the found element. INDEX_NONE otherwise. + */ + int32 FindLast(const ElementType& Item) const + { + for (const ElementType* RESTRICT Start = GetData(), *RESTRICT Data = Start + ArrayNum; Data != Start; ) + { + --Data; + if (*Data == Item) + { + return static_cast(Data - Start); + } + } + return INDEX_NONE; + } + + /** + * Searches an initial subrange of the array for the last occurrence of an element which matches the specified predicate. + * + * @param Pred Predicate taking array element and returns true if element matches search criteria, false otherwise. + * @param Count The number of elements from the front of the array through which to search. + * @returns Index of the found element. INDEX_NONE otherwise. + */ + template + int32 FindLastByPredicate(Predicate Pred, int32 Count) const + { + check(Count >= 0 && Count <= this->Num()); + for (const ElementType* RESTRICT Start = GetData(), *RESTRICT Data = Start + Count; Data != Start; ) + { + --Data; + if (Pred(*Data)) + { + return static_cast(Data - Start); + } + } + return INDEX_NONE; + } + + /** + * Searches the array for the last occurrence of an element which matches the specified predicate. + * + * @param Pred Predicate taking array element and returns true if element matches search criteria, false otherwise. + * @returns Index of the found element. INDEX_NONE otherwise. + */ + template + FORCEINLINE int32 FindLastByPredicate(Predicate Pred) const + { + return FindLastByPredicate(Pred, ArrayNum); + } + + /** + * Finds an item by key (assuming the ElementType overloads operator== for + * the comparison). + * + * @param Key The key to search by. + * @returns Index to the first matching element, or INDEX_NONE if none is found. + */ + template + int32 IndexOfByKey(const KeyType& Key) const + { + const ElementType* RESTRICT Start = GetData(); + for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Start + ArrayNum; Data != DataEnd; ++Data) + { + if (*Data == Key) + { + return static_cast(Data - Start); + } + } + return INDEX_NONE; + } + + /** + * Finds an item by predicate. + * + * @param Pred The predicate to match. + * @returns Index to the first matching element, or INDEX_NONE if none is found. + */ + template + int32 IndexOfByPredicate(Predicate Pred) const + { + const ElementType* RESTRICT Start = GetData(); + for (const ElementType* RESTRICT Data = Start, *RESTRICT DataEnd = Start + ArrayNum; Data != DataEnd; ++Data) + { + if (Pred(*Data)) + { + return static_cast(Data - Start); + } + } + return INDEX_NONE; + } + + /** + * Finds an item by key (assuming the ElementType overloads operator== for + * the comparison). + * + * @param Key The key to search by. + * @returns Pointer to the first matching element, or nullptr if none is found. + * @see Find + */ + template + FORCEINLINE const ElementType* FindByKey(const KeyType& Key) const + { + return const_cast(this)->FindByKey(Key); + } + + /** + * Finds an item by key (assuming the ElementType overloads operator== for + * the comparison). Time Complexity: O(n), starts iteration from the beginning so better performance if Key is in the front + * + * @param Key The key to search by. + * @returns Pointer to the first matching element, or nullptr if none is found. + * @see Find + */ + template + ElementType* FindByKey(const KeyType& Key) + { + for (ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data) + { + if (*Data == Key) + { + return Data; + } + } + + return nullptr; + } + + /** + * Finds an element which matches a predicate functor. + * + * @param Pred The functor to apply to each element. + * @returns Pointer to the first element for which the predicate returns true, or nullptr if none is found. + * @see FilterByPredicate, ContainsByPredicate + */ + template + FORCEINLINE const ElementType* FindByPredicate(Predicate Pred) const + { + return const_cast(this)->FindByPredicate(Pred); + } + + /** + * Finds an element which matches a predicate functor. + * + * @param Pred The functor to apply to each element. true, or nullptr if none is found. + * @see FilterByPredicate, ContainsByPredicate + */ + template + ElementType* FindByPredicate(Predicate Pred) + { + for (ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data) + { + if (Pred(*Data)) + { + return Data; + } + } + + return nullptr; + } + + /** + * Filters the elements in the array based on a predicate functor. + * + * @param Pred The functor to apply to each element. + * @returns TArray with the same type as this object which contains + * the subset of elements for which the functor returns true. + * @see FindByPredicate, ContainsByPredicate + */ + template + TArray FilterByPredicate(Predicate Pred) const + { + TArray FilterResults; + for (const ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data) + { + if (Pred(*Data)) + { + FilterResults.Add(*Data); + } + } + return FilterResults; + } + + /** + * Checks if this array contains the element. + * + * @returns True if found. False otherwise. + * @see ContainsByPredicate, FilterByPredicate, FindByPredicate + */ + template + bool Contains(const ComparisonType& Item) const + { + for (const ElementType* RESTRICT Data = GetData(), *RESTRICT DataEnd = Data + ArrayNum; Data != DataEnd; ++Data) + { + if (*Data == Item) + { + return true; + } + } + return false; + } + + /** + * Checks if this array contains element for which the predicate is true. + * + * @param Predicate to use + * @returns True if found. False otherwise. + * @see Contains, Find + */ + template + FORCEINLINE bool ContainsByPredicate(Predicate Pred) const + { + return FindByPredicate(Pred) != nullptr; + } + + /** + * Equality operator. + * + * @param OtherArray Array to compare. + * @returns True if this array is the same as OtherArray. False otherwise. + */ + bool operator==(const TArray& OtherArray) const + { + int32 Count = Num(); + + return Count == OtherArray.Num() && CompareItems(GetData(), OtherArray.GetData(), Count); + } + + /** + * Inequality operator. + * + * @param OtherArray Array to compare. + * @returns True if this array is NOT the same as OtherArray. False otherwise. + */ + FORCEINLINE bool operator!=(const TArray& OtherArray) const + { + return !(*this == OtherArray); + } + + /** + * Adds a given number of uninitialized elements into the array. + * + * Caution, AddUninitialized() will create elements without calling + * the constructor and this is not appropriate for element types that + * require a constructor to function properly. + * + * @param Count Number of elements to add. + * @returns Number of elements in array before addition. + */ + FORCEINLINE int32 AddUninitialized(int32 Count = 1) + { + CheckInvariants(); + checkSlow(Count >= 0); + + const int32 OldNum = ArrayNum; + if ((ArrayNum += Count) > ArrayMax) + { + ResizeGrow(OldNum); + } + return OldNum; + } + + /** + * Inserts a given number of uninitialized elements into the array at given + * location. + * + * Caution, InsertUninitialized() will create elements without calling the + * constructor and this is not appropriate for element types that require + * a constructor to function properly. + * + * @param Index Tells where to insert the new elements. + * @param Count Number of elements to add. + * @see Insert, InsertZeroed, InsertDefaulted + */ + void InsertUninitialized(int32 Index, int32 Count = 1) + { + CheckInvariants(); + checkSlow((Count >= 0) & (Index >= 0) & (Index <= ArrayNum)); + + const int32 OldNum = ArrayNum; + if ((ArrayNum += Count) > ArrayMax) + { + ResizeGrow(OldNum); + } + ElementType* Data = GetData() + Index; + RelocateConstructItems(Data + Count, Data, OldNum - Index); + } + + /** + * Inserts a given number of zeroed elements into the array at given + * location. + * + * Caution, InsertZeroed() will create elements without calling the + * constructor and this is not appropriate for element types that require + * a constructor to function properly. + * + * @param Index Tells where to insert the new elements. + * @param Count Number of elements to add. + * @see Insert, InsertUninitialized, InsertDefaulted + */ + void InsertZeroed(int32 Index, int32 Count = 1) + { + InsertUninitialized(Index, Count); + FMemory::Memzero((uint8*)AllocatorInstance.GetAllocation() + Index * sizeof(ElementType), Count * sizeof(ElementType)); + } + + /** + * Inserts a given number of default-constructed elements into the array at a given + * location. + * + * @param Index Tells where to insert the new elements. + * @param Count Number of elements to add. + * @see Insert, InsertUninitialized, InsertZeroed + */ + void InsertDefaulted(int32 Index, int32 Count = 1) + { + InsertUninitialized(Index, Count); + DefaultConstructItems((uint8*)AllocatorInstance.GetAllocation() + Index * sizeof(ElementType), Count); + } + + /** + * Inserts given elements into the array at given location. + * + * @param Items Array of elements to insert. + * @param InIndex Tells where to insert the new elements. + * @returns Location at which the item was inserted. + */ + int32 Insert(std::initializer_list InitList, const int32 InIndex) + { + InsertUninitialized(InIndex, (int32)InitList.size()); + + ElementType* Data = (ElementType*)AllocatorInstance.GetAllocation(); + + int32 Index = InIndex; + for (const ElementType& Element : InitList) + { + new (Data + Index++) ElementType(Element); + } + return InIndex; + } + + /** + * Inserts given elements into the array at given location. + * + * @param Items Array of elements to insert. + * @param InIndex Tells where to insert the new elements. + * @returns Location at which the item was inserted. + */ + int32 Insert(const TArray& Items, const int32 InIndex) + { + check(this != &Items); + + InsertUninitialized(InIndex, Items.Num()); + + ElementType* Data = (ElementType*)AllocatorInstance.GetAllocation(); + + int32 Index = InIndex; + for (auto It = Items.CreateConstIterator(); It; ++It) + { + new (Data + Index++) ElementType(*It); + } + return InIndex; + } + + /** + * Inserts a raw array of elements at a particular index in the TArray. + * + * @param Ptr A pointer to an array of elements to add. + * @param Count The number of elements to insert from Ptr. + * @param Index The index to insert the elements at. + * @return The index of the first element inserted. + * @see Add, Remove + */ + int32 Insert(const ElementType* Ptr, int32 Count, int32 Index) + { + check(Ptr != nullptr); + + InsertUninitialized(Index, Count); + ConstructItems(GetData() + Index, Ptr, Count); + + return Index; + } + + /** + * Checks that the specified address is not part of an element within the + * container. Used for implementations to check that reference arguments + * aren't going to be invalidated by possible reallocation. + * + * @param Addr The address to check. + * @see Add, Remove + */ + FORCEINLINE void CheckAddress(const ElementType* Addr) const + { + checkf(Addr < GetData() || Addr >= (GetData() + ArrayMax), TEXT("Attempting to use a container element (%p) which already comes from the container being modified (%p, ArrayMax: %d, ArrayNum: %d, SizeofElement: %d)!"), Addr, GetData(), ArrayMax, ArrayNum, sizeof(ElementType)); + } + + /** + * Inserts a given element into the array at given location. Move semantics + * version. + * + * @param Item The element to insert. + * @param Index Tells where to insert the new elements. + * @returns Location at which the insert was done. + * @see Add, Remove + */ + int32 Insert(ElementType&& Item, int32 Index) + { + CheckAddress(&Item); + + // construct a copy in place at Index (this new operator will insert at + // Index, then construct that memory with Item) + InsertUninitialized(Index, 1); + new(GetData() + Index) ElementType(MoveTempIfPossible(Item)); + return Index; + } + + /** + * Inserts a given element into the array at given location. + * + * @param Item The element to insert. + * @param Index Tells where to insert the new elements. + * @returns Location at which the insert was done. + * @see Add, Remove + */ + int32 Insert(const ElementType& Item, int32 Index) + { + CheckAddress(&Item); + + // construct a copy in place at Index (this new operator will insert at + // Index, then construct that memory with Item) + InsertUninitialized(Index, 1); + new(GetData() + Index) ElementType(Item); + return Index; + } + +private: + void RemoveAtImpl(int32 Index, int32 Count, bool bAllowShrinking) + { + if (Count) + { + CheckInvariants(); + checkSlow((Count >= 0) & (Index >= 0) & (Index + Count <= ArrayNum)); + + DestructItems(GetData() + Index, Count); + + // Skip memmove in the common case that there is nothing to move. + int32 NumToMove = ArrayNum - Index - Count; + if (NumToMove) + { + FMemory::Memmove + ( + (uint8*)AllocatorInstance.GetAllocation() + (Index) * sizeof(ElementType), + (uint8*)AllocatorInstance.GetAllocation() + (Index + Count) * sizeof(ElementType), + NumToMove * sizeof(ElementType) + ); + } + ArrayNum -= Count; + + if (bAllowShrinking) + { + ResizeShrink(); + } + } + } + +public: + /** + * Removes an element (or elements) at given location optionally shrinking + * the array. + * + * @param Index Location in array of the element to remove. + * @param Count (Optional) Number of elements to remove. Default is 1. + * @param bAllowShrinking (Optional) Tells if this call can shrink array if suitable after remove. Default is true. + */ + FORCEINLINE void RemoveAt(int32 Index) + { + RemoveAtImpl(Index, 1, true); + } + + /** + * Removes an element (or elements) at given location optionally shrinking + * the array. + * + * @param Index Location in array of the element to remove. + * @param Count (Optional) Number of elements to remove. Default is 1. + * @param bAllowShrinking (Optional) Tells if this call can shrink array if suitable after remove. Default is true. + */ + template + FORCEINLINE void RemoveAt(int32 Index, CountType Count, bool bAllowShrinking = true) + { + static_assert(!TAreTypesEqual::Value, "TArray::RemoveAt: unexpected bool passed as the Count argument"); + RemoveAtImpl(Index, Count, bAllowShrinking); + } + + /** + * Same as empty, but doesn't change memory allocations, unless the new size is larger than + * the current array. It calls the destructors on held items if needed and then zeros the ArrayNum. + * + * @param NewSize The expected usage size after calling this function. + */ + void Reset(int32 NewSize = 0) + { + // If we have space to hold the excepted size, then don't reallocate + if (NewSize <= ArrayMax) + { + DestructItems(GetData(), ArrayNum); + ArrayNum = 0; + } + else + { + Empty(NewSize); + } + } + + /** + * Empties the array. It calls the destructors on held items if needed. + * + * @param Slack (Optional) The expected usage size after empty operation. Default is 0. + */ + void Empty(int32 Slack = 0) + { + DestructItems(GetData(), ArrayNum); + + checkSlow(Slack >= 0); + ArrayNum = 0; + + if (ArrayMax != Slack) + { + ResizeTo(Slack); + } + } + + /** + * Resizes array to given number of elements. + * + * @param NewNum New size of the array. + * @param bAllowShrinking Tell if this function can shrink the memory in-use if suitable. + */ + void SetNum(int32 NewNum, bool bAllowShrinking = true) + { + if (NewNum > Num()) + { + const int32 Diff = NewNum - ArrayNum; + const int32 Index = AddUninitialized(Diff); + DefaultConstructItems((uint8*)AllocatorInstance.GetAllocation() + Index * sizeof(ElementType), Diff); + } + else if (NewNum < Num()) + { + RemoveAt(NewNum, Num() - NewNum, bAllowShrinking); + } + } + + /** + * Resizes array to given number of elements. New elements will be zeroed. + * + * @param NewNum New size of the array. + */ + void SetNumZeroed(int32 NewNum, bool bAllowShrinking = true) + { + if (NewNum > Num()) + { + AddZeroed(NewNum - Num()); + } + else if (NewNum < Num()) + { + RemoveAt(NewNum, Num() - NewNum, bAllowShrinking); + } + } + + /** + * Resizes array to given number of elements. New elements will be uninitialized. + * + * @param NewNum New size of the array. + */ + void SetNumUninitialized(int32 NewNum, bool bAllowShrinking = true) + { + if (NewNum > Num()) + { + AddUninitialized(NewNum - Num()); + } + else if (NewNum < Num()) + { + RemoveAt(NewNum, Num() - NewNum, bAllowShrinking); + } + } + + /** + * Does nothing except setting the new number of elements in the array. Does not destruct items, does not de-allocate memory. + * @param NewNum New number of elements in the array, must be <= the current number of elements in the array. + */ + void SetNumUnsafeInternal(int32 NewNum) + { + checkSlow(NewNum <= Num() && NewNum >= 0); + ArrayNum = NewNum; + } + + /** + * Appends the specified array to this array. + * + * Allocator changing version. + * + * @param Source The array to append. + * @see Add, Insert + */ + template + void Append(const TArray& Source) + { + check((void*)this != (void*)&Source); + + int32 SourceCount = Source.Num(); + + // Do nothing if the source is empty. + if (!SourceCount) + { + return; + } + + // Allocate memory for the new elements. + Reserve(ArrayNum + SourceCount); + ConstructItems(GetData() + ArrayNum, Source.GetData(), SourceCount); + + ArrayNum += SourceCount; + } + + /** + * Appends the specified array to this array. + * + * @param Source The array to append. + * @see Add, Insert + */ + template + void Append(TArray&& Source) + { + check((void*)this != (void*)&Source); + + int32 SourceCount = Source.Num(); + + // Do nothing if the source is empty. + if (!SourceCount) + { + return; + } + + // Allocate memory for the new elements. + Reserve(ArrayNum + SourceCount); + RelocateConstructItems(GetData() + ArrayNum, Source.GetData(), SourceCount); + Source.ArrayNum = 0; + + ArrayNum += SourceCount; + } + + /** + * Adds a raw array of elements to the end of the TArray. + * + * @param Ptr A pointer to an array of elements to add. + * @param Count The number of elements to insert from Ptr. + * @see Add, Insert + */ + void Append(const ElementType* Ptr, int32 Count) + { + check(Ptr != nullptr || Count == 0); + + int32 Pos = AddUninitialized(Count); + ConstructItems(GetData() + Pos, Ptr, Count); + } + + /** + * Adds an initializer list of elements to the end of the TArray. + * + * @param InitList The initializer list of elements to add. + * @see Add, Insert + */ + FORCEINLINE void Append(std::initializer_list InitList) + { + int32 Count = (int32)InitList.size(); + + int32 Pos = AddUninitialized(Count); + ConstructItems(GetData() + Pos, InitList.begin(), Count); + } + + /** + * Appends the specified array to this array. + * Cannot append to self. + * + * Move semantics version. + * + * @param Other The array to append. + */ + TArray& operator+=(TArray&& Other) + { + Append(MoveTemp(Other)); + return *this; + } + + /** + * Appends the specified array to this array. + * Cannot append to self. + * + * @param Other The array to append. + */ + TArray& operator+=(const TArray& Other) + { + Append(Other); + return *this; + } + + /** + * Appends the specified initializer list to this array. + * + * @param InitList The initializer list to append. + */ + TArray& operator+=(std::initializer_list InitList) + { + Append(InitList); + return *this; + } + + /** + * Constructs a new item at the end of the array, possibly reallocating the whole array to fit. + * + * @param Args The arguments to forward to the constructor of the new item. + * @return Index to the new item + */ + template + FORCEINLINE int32 Emplace(ArgsType&&... Args) + { + const int32 Index = AddUninitialized(1); + new(GetData() + Index) ElementType(Forward(Args)...); + return Index; + } + + /** + * Constructs a new item at a specified index, possibly reallocating the whole array to fit. + * + * @param Index The index to add the item at. + * @param Args The arguments to forward to the constructor of the new item. + */ + template + FORCEINLINE void EmplaceAt(int32 Index, ArgsType&&... Args) + { + InsertUninitialized(Index, 1); + new(GetData() + Index) ElementType(Forward(Args)...); + } + + /** + * Adds a new item to the end of the array, possibly reallocating the whole array to fit. + * + * Move semantics version. + * + * @param Item The item to add + * @return Index to the new item + * @see AddDefaulted, AddUnique, AddZeroed, Append, Insert + */ + FORCEINLINE int32 Add(ElementType&& Item) { CheckAddress(&Item); return Emplace(MoveTempIfPossible(Item)); } + + /** + * Adds a new item to the end of the array, possibly reallocating the whole array to fit. + * + * @param Item The item to add + * @return Index to the new item + * @see AddDefaulted, AddUnique, AddZeroed, Append, Insert + */ + FORCEINLINE int32 Add(const ElementType& Item) { CheckAddress(&Item); return Emplace(Item); } + + /** + * Adds new items to the end of the array, possibly reallocating the whole + * array to fit. The new items will be zeroed. + * + * Caution, AddZeroed() will create elements without calling the + * constructor and this is not appropriate for element types that require + * a constructor to function properly. + * + * @param Count The number of new items to add. + * @return Index to the first of the new items. + * @see Add, AddDefaulted, AddUnique, Append, Insert + */ + int32 AddZeroed(int32 Count = 1) + { + const int32 Index = AddUninitialized(Count); + FMemory::Memzero((uint8*)AllocatorInstance.GetAllocation() + Index * sizeof(ElementType), Count * sizeof(ElementType)); + return Index; + } + + /** + * Adds new items to the end of the array, possibly reallocating the whole + * array to fit. The new items will be default-constructed. + * + * @param Count The number of new items to add. + * @return Index to the first of the new items. + * @see Add, AddZeroed, AddUnique, Append, Insert + */ + int32 AddDefaulted(int32 Count = 1) + { + const int32 Index = AddUninitialized(Count); + DefaultConstructItems((uint8*)AllocatorInstance.GetAllocation() + Index * sizeof(ElementType), Count); + return Index; + } + +private: + + /** + * Adds unique element to array if it doesn't exist. + * + * @param Args Item to add. + * @returns Index of the element in the array. + */ + template + int32 AddUniqueImpl(ArgsType&& Args) + { + int32 Index; + if (Find(Args, Index)) + { + return Index; + } + + return Add(Forward(Args)); + } + +public: + + /** + * Adds unique element to array if it doesn't exist. + * + * Move semantics version. + * + * @param Args Item to add. + * @returns Index of the element in the array. + * @see Add, AddDefaulted, AddZeroed, Append, Insert + */ + FORCEINLINE int32 AddUnique(ElementType&& Item) { return AddUniqueImpl(MoveTempIfPossible(Item)); } + + /** + * Adds unique element to array if it doesn't exist. + * + * @param Args Item to add. + * @returns Index of the element in the array. + * @see Add, AddDefaulted, AddZeroed, Append, Insert + */ + FORCEINLINE int32 AddUnique(const ElementType& Item) { return AddUniqueImpl(Item); } + + /** + * Reserves memory such that the array can contain at least Number elements. + * + * @param Number The number of elements that the array should be able to contain after allocation. + * @see Shrink + */ + FORCEINLINE void Reserve(int32 Number) + { + if (Number > ArrayMax) + { + ResizeTo(Number); + } + } + + /** + * Sets the size of the array, filling it with the given element. + * + * @param Element The element to fill array with. + * @param Number The number of elements that the array should be able to contain after allocation. + */ + void Init(const ElementType& Element, int32 Number) + { + Empty(Number); + for (int32 Index = 0; Index < Number; ++Index) + { + new(*this) ElementType(Element); + } + } + + /** + * Removes the first occurrence of the specified item in the array, + * maintaining order but not indices. + * + * @param Item The item to remove. + * @returns The number of items removed. For RemoveSingleItem, this is always either 0 or 1. + * @see Add, Insert, Remove, RemoveAll, RemoveAllSwap + */ + int32 RemoveSingle(const ElementType& Item) + { + int32 Index = Find(Item); + if (Index == INDEX_NONE) + { + return 0; + } + + auto* RemovePtr = GetData() + Index; + + // Destruct items that match the specified Item. + DestructItems(RemovePtr, 1); + const int32 NextIndex = Index + 1; + RelocateConstructItems(RemovePtr, RemovePtr + 1, ArrayNum - (Index + 1)); + + // Update the array count + --ArrayNum; + + // Removed one item + return 1; + } + + /** + * Removes as many instances of Item as there are in the array, maintaining + * order but not indices. + * + * @param Item Item to remove from array. + * @returns Number of removed elements. + * @see Add, Insert, RemoveAll, RemoveAllSwap, RemoveSingle, RemoveSwap + */ + int32 Remove(const ElementType& Item) + { + CheckAddress(&Item); + + // Element is non-const to preserve compatibility with existing code with a non-const operator==() member function + return RemoveAll([&Item](ElementType& Element) { return Element == Item; }); + } + + /** + * Remove all instances that match the predicate, maintaining order but not indices + * Optimized to work with runs of matches/non-matches + * + * @param Predicate Predicate class instance + * @returns Number of removed elements. + * @see Add, Insert, RemoveAllSwap, RemoveSingle, RemoveSwap + */ + template + int32 RemoveAll(const PREDICATE_CLASS& Predicate) + { + const int32 OriginalNum = ArrayNum; + if (!OriginalNum) + { + return 0; // nothing to do, loop assumes one item so need to deal with this edge case here + } + + int32 WriteIndex = 0; + int32 ReadIndex = 0; + bool NotMatch = !Predicate(GetData()[ReadIndex]); // use a ! to guarantee it can't be anything other than zero or one + do + { + int32 RunStartIndex = ReadIndex++; + while (ReadIndex < OriginalNum && NotMatch == !Predicate(GetData()[ReadIndex])) + { + ReadIndex++; + } + int32 RunLength = ReadIndex - RunStartIndex; + checkSlow(RunLength > 0); + if (NotMatch) + { + // this was a non-matching run, we need to move it + if (WriteIndex != RunStartIndex) + { + FMemory::Memmove(&GetData()[WriteIndex], &GetData()[RunStartIndex], sizeof(ElementType)* RunLength); + } + WriteIndex += RunLength; + } + else + { + // this was a matching run, delete it + DestructItems(GetData() + RunStartIndex, RunLength); + } + NotMatch = !NotMatch; + } while (ReadIndex < OriginalNum); + + ArrayNum = WriteIndex; + return OriginalNum - ArrayNum; + } + + // Iterators + typedef TIndexedContainerIterator< TArray, ElementType, int32> TIterator; + typedef TIndexedContainerIterator TConstIterator; + + /** + * Creates an iterator for the contents of this array + * + * @returns The iterator. + */ + TIterator CreateIterator() + { + return TIterator(*this); + } + + /** + * Creates a const iterator for the contents of this array + * + * @returns The const iterator. + */ + TConstIterator CreateConstIterator() const + { + return TConstIterator(*this); + } + +#if TARRAY_RANGED_FOR_CHECKS + typedef TCheckedPointerIterator< ElementType> RangedForIteratorType; + typedef TCheckedPointerIterator RangedForConstIteratorType; +#else + typedef ElementType* RangedForIteratorType; + typedef const ElementType* RangedForConstIteratorType; +#endif + +private: + + /** + * DO NOT USE DIRECTLY + * STL-like iterators to enable range-based for loop support. + */ +#if TARRAY_RANGED_FOR_CHECKS + FORCEINLINE friend RangedForIteratorType begin(TArray& Array) { return RangedForIteratorType(Array.ArrayNum, Array.GetData()); } + FORCEINLINE friend RangedForConstIteratorType begin(const TArray& Array) { return RangedForConstIteratorType(Array.ArrayNum, Array.GetData()); } + FORCEINLINE friend RangedForIteratorType end(TArray& Array) { return RangedForIteratorType(Array.ArrayNum, Array.GetData() + Array.Num()); } + FORCEINLINE friend RangedForConstIteratorType end(const TArray& Array) { return RangedForConstIteratorType(Array.ArrayNum, Array.GetData() + Array.Num()); } +#else + FORCEINLINE friend RangedForIteratorType begin(TArray& Array) { return Array.GetData(); } + FORCEINLINE friend RangedForConstIteratorType begin(const TArray& Array) { return Array.GetData(); } + FORCEINLINE friend RangedForIteratorType end(TArray& Array) { return Array.GetData() + Array.Num(); } + FORCEINLINE friend RangedForConstIteratorType end(const TArray& Array) { return Array.GetData() + Array.Num(); } +#endif + +public: + + /** + * Sorts the array assuming < operator is defined for the item type. + * + * @note: If your array contains raw pointers, they will be automatically dereferenced during sorting. + * Therefore, your array will be sorted by the values being pointed to, rather than the pointers' values. + * If this is not desirable, please use Algo::Sort(MyArray) instead. + * The auto-dereferencing behavior does not occur with smart pointers. + */ + void Sort() + { + ::Sort(GetData(), Num()); + } + + /** + * Sorts the array using user define predicate class. + * + * @param Predicate Predicate class instance. + * + * @note: If your array contains raw pointers, they will be automatically dereferenced during sorting. + * Therefore, your predicate will be passed references rather than pointers. + * If this is not desirable, please use Algo::Sort(MyArray, Predicate) instead. + * The auto-dereferencing behavior does not occur with smart pointers. + */ + template + void Sort(const PREDICATE_CLASS& Predicate) + { + ::Sort(GetData(), Num(), Predicate); + } + + /** + * Stable sorts the array assuming < operator is defined for the item type. + * + * Stable sort is slower than non-stable algorithm. + * + * @note: If your array contains raw pointers, they will be automatically dereferenced during sorting. + * Therefore, your array will be sorted by the values being pointed to, rather than the pointers' values. + * The auto-dereferencing behavior does not occur with smart pointers. + */ + void StableSort() + { + ::StableSort(GetData(), Num()); + } + + /** + * Stable sorts the array using user defined predicate class. + * + * Stable sort is slower than non-stable algorithm. + * + * @param Predicate Predicate class instance + * + * @note: If your array contains raw pointers, they will be automatically dereferenced during sorting. + * Therefore, your predicate will be passed references rather than pointers. + * The auto-dereferencing behavior does not occur with smart pointers. + */ + template + void StableSort(const PREDICATE_CLASS& Predicate) + { + ::StableSort(GetData(), Num(), Predicate); + } + +#if defined(_MSC_VER) && !defined(__clang__) // Relies on MSVC-specific lazy template instantiation to support arrays of incomplete types +private: + /** + * Helper function that can be used inside the debuggers watch window to debug TArrays. E.g. "*Class->Defaults.DebugGet(5)". + * + * @param Index Position to get. + * @returns Reference to the element at given position. + */ + FORCENOINLINE const ElementType& DebugGet(int32 Index) const + { + return GetData()[Index]; + } +#endif + +private: + + FORCENOINLINE void ResizeGrow(int32 OldNum) + { + ArrayMax = AllocatorInstance.CalculateSlackGrow(ArrayNum, ArrayMax, sizeof(ElementType)); + AllocatorInstance.ResizeAllocation(OldNum, ArrayMax, sizeof(ElementType)); + } + FORCENOINLINE void ResizeShrink() + { + const int32 NewArrayMax = AllocatorInstance.CalculateSlackShrink(ArrayNum, ArrayMax, sizeof(ElementType)); + if (NewArrayMax != ArrayMax) + { + ArrayMax = NewArrayMax; + check(ArrayMax >= ArrayNum); + AllocatorInstance.ResizeAllocation(ArrayNum, ArrayMax, sizeof(ElementType)); + } + } + FORCENOINLINE void ResizeTo(int32 NewMax) + { + if (NewMax) + { + NewMax = AllocatorInstance.CalculateSlackReserve(NewMax, sizeof(ElementType)); + } + if (NewMax != ArrayMax) + { + ArrayMax = NewMax; + AllocatorInstance.ResizeAllocation(ArrayNum, ArrayMax, sizeof(ElementType)); + } + } + FORCENOINLINE void ResizeForCopy(int32 NewMax, int32 PrevMax) + { + if (NewMax) + { + NewMax = AllocatorInstance.CalculateSlackReserve(NewMax, sizeof(ElementType)); + } + if (NewMax != PrevMax) + { + AllocatorInstance.ResizeAllocation(0, NewMax, sizeof(ElementType)); + } + ArrayMax = NewMax; + } + + + /** + * Copies data from one array into this array. Uses the fast path if the + * data in question does not need a constructor. + * + * @param Source The source array to copy + * @param PrevMax The previous allocated size + * @param ExtraSlack Additional amount of memory to allocate at + * the end of the buffer. Counted in elements. Zero by + * default. + */ + template + void CopyToEmpty(const OtherElementType* OtherData, int32 OtherNum, int32 PrevMax, int32 ExtraSlack) + { + checkSlow(ExtraSlack >= 0); + ArrayNum = OtherNum; + if (OtherNum || ExtraSlack || PrevMax) + { + ResizeForCopy(OtherNum + ExtraSlack, PrevMax); + ConstructItems(GetData(), OtherData, OtherNum); + } + else + { + ArrayMax = 0; + } + } + +protected: + + typedef typename TChooseClass< + Allocator::NeedsElementType, + typename Allocator::template ForElementType, + typename Allocator::ForAnyElementType + >::Result ElementAllocatorType; + + ElementAllocatorType AllocatorInstance; + int32 ArrayNum; + int32 ArrayMax; +}; + + +template +struct TIsZeroConstructType> +{ + enum { Value = TAllocatorTraits::IsZeroConstruct }; +}; + +template +struct TContainerTraits > : public TContainerTraitsBase > +{ + enum { MoveWillEmptyContainer = TAllocatorTraits::SupportsMove }; +}; + +template +struct TIsContiguousContainer> +{ + enum { Value = true }; +}; + + +/** +* Traits class which determines whether or not a type is a TArray. +*/ +template struct TIsTArray { enum { Value = false }; }; + +template struct TIsTArray< TArray> { enum { Value = true }; }; +template struct TIsTArray> { enum { Value = true }; }; +template struct TIsTArray< volatile TArray> { enum { Value = true }; }; +template struct TIsTArray> { enum { Value = true }; }; + + +// +// Array operator news. +// +template void* operator new(size_t Size, TArray& Array) +{ + check(Size == sizeof(T)); + const int32 Index = Array.AddUninitialized(1); + return &Array[Index]; +} +template void* operator new(size_t Size, TArray& Array, int32 Index) +{ + check(Size == sizeof(T)); + Array.InsertUninitialized(Index, 1); + return &Array[Index]; +} + +#pragma warning(pop) diff --git a/version/Core/Public/API/UE/Delegates/IntegerSequence.h b/version/Core/Public/API/UE/Delegates/IntegerSequence.h new file mode 100644 index 0000000..410f858 --- /dev/null +++ b/version/Core/Public/API/UE/Delegates/IntegerSequence.h @@ -0,0 +1,30 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +template +struct TIntegerSequence +{ +}; + +// Doxygen can't parse recursive template definitions; just skip it. +#if !UE_BUILD_DOCS + +template +struct TMakeIntegerSequenceImpl +{ + typedef typename TMakeIntegerSequenceImpl::Type Type; +}; + +template +struct TMakeIntegerSequenceImpl +{ + typedef TIntegerSequence Type; +}; + +#endif + +template +using TMakeIntegerSequence = typename TMakeIntegerSequenceImpl::Type; diff --git a/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMath.h b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMath.h new file mode 100644 index 0000000..f8188d0 --- /dev/null +++ b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMath.h @@ -0,0 +1,626 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + + +/*============================================================================================= + GenericPlatformMath.h: Generic platform Math classes, mostly implemented with ANSI C++ +==============================================================================================*/ + +#pragma once + +#include "../BasicTypes.h" + +class FDefaultAllocator; +class FDefaultSetAllocator; + +class FString; + +template class TArray; + + +/** + * Generic implementation for most platforms + */ +struct FGenericPlatformMath +{ + /** + * Converts a float to an integer with truncation towards zero. + * @param F Floating point value to convert + * @return Truncated integer. + */ + static CONSTEXPR FORCEINLINE int32 TruncToInt(float F) + { + return (int)F; + } + + /** + * Converts a float to an integer value with truncation towards zero. + * @param F Floating point value to convert + * @return Truncated integer value. + */ + static CONSTEXPR FORCEINLINE float TruncToFloat(float F) + { + return (float)TruncToInt(F); + } + + /** + * Converts a float to a nearest less or equal integer. + * @param F Floating point value to convert + * @return An integer less or equal to 'F'. + */ + static FORCEINLINE int32 FloorToInt(float F) + { + return TruncToInt(floorf(F)); + } + + /** + * Converts a float to the nearest less or equal integer. + * @param F Floating point value to convert + * @return An integer less or equal to 'F'. + */ + static FORCEINLINE float FloorToFloat(float F) + { + return floorf(F); + } + + /** + * Converts a double to a less or equal integer. + * @param F Floating point value to convert + * @return The nearest integer value to 'F'. + */ + static FORCEINLINE double FloorToDouble(double F) + { + return floor(F); + } + + /** + * Converts a float to the nearest integer. Rounds up when the fraction is .5 + * @param F Floating point value to convert + * @return The nearest integer to 'F'. + */ + static FORCEINLINE int32 RoundToInt(float F) + { + return FloorToInt(F + 0.5f); + } + + /** + * Converts a float to the nearest integer. Rounds up when the fraction is .5 + * @param F Floating point value to convert + * @return The nearest integer to 'F'. + */ + static FORCEINLINE float RoundToFloat(float F) + { + return FloorToFloat(F + 0.5f); + } + + /** + * Converts a double to the nearest integer. Rounds up when the fraction is .5 + * @param F Floating point value to convert + * @return The nearest integer to 'F'. + */ + static FORCEINLINE double RoundToDouble(double F) + { + return FloorToDouble(F + 0.5); + } + + /** + * Converts a float to the nearest greater or equal integer. + * @param F Floating point value to convert + * @return An integer greater or equal to 'F'. + */ + static FORCEINLINE int32 CeilToInt(float F) + { + return TruncToInt(ceilf(F)); + } + + /** + * Converts a float to the nearest greater or equal integer. + * @param F Floating point value to convert + * @return An integer greater or equal to 'F'. + */ + static FORCEINLINE float CeilToFloat(float F) + { + return ceilf(F); + } + + /** + * Converts a double to the nearest greater or equal integer. + * @param F Floating point value to convert + * @return An integer greater or equal to 'F'. + */ + static FORCEINLINE double CeilToDouble(double F) + { + return ceil(F); + } + + /** + * Returns signed fractional part of a float. + * @param Value Floating point value to convert + * @return A float between >=0 and < 1 for nonnegative input. A float between >= -1 and < 0 for negative input. + */ + static FORCEINLINE float Fractional(float Value) + { + return Value - TruncToFloat(Value); + } + + /** + * Returns the fractional part of a float. + * @param Value Floating point value to convert + * @return A float between >=0 and < 1. + */ + static FORCEINLINE float Frac(float Value) + { + return Value - FloorToFloat(Value); + } + + /** + * Breaks the given value into an integral and a fractional part. + * @param InValue Floating point value to convert + * @param OutIntPart Floating point value that receives the integral part of the number. + * @return The fractional part of the number. + */ + static FORCEINLINE float Modf(const float InValue, float* OutIntPart) + { + return modff(InValue, OutIntPart); + } + + /** + * Breaks the given value into an integral and a fractional part. + * @param InValue Floating point value to convert + * @param OutIntPart Floating point value that receives the integral part of the number. + * @return The fractional part of the number. + */ + static FORCEINLINE double Modf(const double InValue, double* OutIntPart) + { + return modf(InValue, OutIntPart); + } + + // Returns e^Value + static FORCEINLINE float Exp( float Value ) { return expf(Value); } + // Returns 2^Value + static FORCEINLINE float Exp2( float Value ) { return powf(2.f, Value); /*exp2f(Value);*/ } + static FORCEINLINE float Loge( float Value ) { return logf(Value); } + static FORCEINLINE float LogX( float Base, float Value ) { return Loge(Value) / Loge(Base); } + // 1.0 / Loge(2) = 1.4426950f + static FORCEINLINE float Log2( float Value ) { return Loge(Value) * 1.4426950f; } + + /** + * Returns the floating-point remainder of X / Y + * Warning: Always returns remainder toward 0, not toward the smaller multiple of Y. + * So for example Fmod(2.8f, 2) gives .8f as you would expect, however, Fmod(-2.8f, 2) gives -.8f, NOT 1.2f + * Use Floor instead when snapping positions that can be negative to a grid + */ + static FORCEINLINE float Fmod(float X, float Y) + { + if (fabsf(Y) <= 1.e-8f) + { + return 0.f; + } + const float Quotient = TruncToFloat(X / Y); + float IntPortion = Y * Quotient; + + // Rounding and imprecision could cause IntPortion to exceed X and cause the result to be outside the expected range. + // For example Fmod(55.8, 9.3) would result in a very small negative value! + if (fabsf(IntPortion) > fabsf(X)) + { + IntPortion = X; + } + + const float Result = X - IntPortion; + return Result; + } + + static FORCEINLINE float Sin( float Value ) { return sinf(Value); } + static FORCEINLINE float Asin( float Value ) { return asinf( (Value<-1.f) ? -1.f : ((Value<1.f) ? Value : 1.f) ); } + static FORCEINLINE float Sinh(float Value) { return sinhf(Value); } + static FORCEINLINE float Cos( float Value ) { return cosf(Value); } + static FORCEINLINE float Acos( float Value ) { return acosf( (Value<-1.f) ? -1.f : ((Value<1.f) ? Value : 1.f) ); } + static FORCEINLINE float Tan( float Value ) { return tanf(Value); } + static FORCEINLINE float Atan( float Value ) { return atanf(Value); } + static FORCEINLINE float Sqrt( float Value ) { return sqrtf(Value); } + static FORCEINLINE float Pow( float A, float B ) { return powf(A,B); } + + /** Computes a fully accurate inverse square root */ + static FORCEINLINE float InvSqrt( float F ) + { + return 1.0f / sqrtf( F ); + } + + /** Computes a faster but less accurate inverse square root */ + static FORCEINLINE float InvSqrtEst( float F ) + { + return InvSqrt( F ); + } + + /** Return true if value is NaN (not a number). */ + static FORCEINLINE bool IsNaN( float A ) + { + return ((*(uint32*)&A) & 0x7FFFFFFF) > 0x7F800000; + } + /** Return true if value is finite (not NaN and not Infinity). */ + static FORCEINLINE bool IsFinite( float A ) + { + return ((*(uint32*)&A) & 0x7F800000) != 0x7F800000; + } + static FORCEINLINE bool IsNegativeFloat(const float& A) + { + return ( (*(uint32*)&A) >= (uint32)0x80000000 ); // Detects sign bit. + } + + static FORCEINLINE bool IsNegativeDouble(const double& A) + { + return ( (*(uint64*)&A) >= (uint64)0x8000000000000000 ); // Detects sign bit. + } + + /** Returns a random integer between 0 and RAND_MAX, inclusive */ + static FORCEINLINE int32 Rand() { return rand(); } + + /** Seeds global random number functions Rand() and FRand() */ + static FORCEINLINE void RandInit(int32 Seed) { srand( Seed ); } + + /** Returns a random float between 0 and 1, inclusive. */ + static FORCEINLINE float FRand() { return Rand() / (float)RAND_MAX; } + + /** + * Computes the base 2 logarithm for an integer value that is greater than 0. + * The result is rounded down to the nearest integer. + * + * @param Value The value to compute the log of + * @return Log2 of Value. 0 if Value is 0. + */ + static FORCEINLINE uint32 FloorLog2(uint32 Value) + { +/* // reference implementation + // 1500ms on test data + uint32 Bit = 32; + for (; Bit > 0;) + { + Bit--; + if (Value & (1<= 1<<16) { Value >>= 16; pos += 16; } + if (Value >= 1<< 8) { Value >>= 8; pos += 8; } + if (Value >= 1<< 4) { Value >>= 4; pos += 4; } + if (Value >= 1<< 2) { Value >>= 2; pos += 2; } + if (Value >= 1<< 1) { pos += 1; } + return (Value == 0) ? 0 : pos; + + // even faster would be method3 but it can introduce more cache misses and it would need to store the table somewhere + // 304ms in test data + /*int LogTable256[256]; + + void prep() + { + LogTable256[0] = LogTable256[1] = 0; + for (int i = 2; i < 256; i++) + { + LogTable256[i] = 1 + LogTable256[i / 2]; + } + LogTable256[0] = -1; // if you want log(0) to return -1 + } + + int _forceinline method3(uint32 v) + { + int r; // r will be lg(v) + uint32 tt; // temporaries + + if ((tt = v >> 24) != 0) + { + r = (24 + LogTable256[tt]); + } + else if ((tt = v >> 16) != 0) + { + r = (16 + LogTable256[tt]); + } + else if ((tt = v >> 8 ) != 0) + { + r = (8 + LogTable256[tt]); + } + else + { + r = LogTable256[v]; + } + return r; + }*/ + } + + /** + * Computes the base 2 logarithm for a 64-bit value that is greater than 0. + * The result is rounded down to the nearest integer. + * + * @param Value The value to compute the log of + * @return Log2 of Value. 0 if Value is 0. + */ + static FORCEINLINE uint64 FloorLog2_64(uint64 Value) + { + uint64 pos = 0; + if (Value >= 1ull<<32) { Value >>= 32; pos += 32; } + if (Value >= 1ull<<16) { Value >>= 16; pos += 16; } + if (Value >= 1ull<< 8) { Value >>= 8; pos += 8; } + if (Value >= 1ull<< 4) { Value >>= 4; pos += 4; } + if (Value >= 1ull<< 2) { Value >>= 2; pos += 2; } + if (Value >= 1ull<< 1) { pos += 1; } + return (Value == 0) ? 0 : pos; + } + + /** + * Counts the number of leading zeros in the bit representation of the value + * + * @param Value the value to determine the number of leading zeros for + * + * @return the number of zeros before the first "on" bit + */ + static FORCEINLINE uint32 CountLeadingZeros(uint32 Value) + { + if (Value == 0) return 32; + return 31 - FloorLog2(Value); + } + + /** + * Counts the number of leading zeros in the bit representation of the 64-bit value + * + * @param Value the value to determine the number of leading zeros for + * + * @return the number of zeros before the first "on" bit + */ + static FORCEINLINE uint64 CountLeadingZeros64(uint64 Value) + { + if (Value == 0) return 64; + return 63 - FloorLog2_64(Value); + } + + /** + * Counts the number of trailing zeros in the bit representation of the value + * + * @param Value the value to determine the number of trailing zeros for + * + * @return the number of zeros after the last "on" bit + */ + static FORCEINLINE uint32 CountTrailingZeros(uint32 Value) + { + if (Value == 0) + { + return 32; + } + uint32 Result = 0; + while ((Value & 1) == 0) + { + Value >>= 1; + ++Result; + } + return Result; + } + + /** + * Returns smallest N such that (1<=Arg. + * Note: CeilLogTwo(0)=0 because (1<<0)=1 >= 0. + */ + static FORCEINLINE uint32 CeilLogTwo( uint32 Arg ) + { + int32 Bitmask = ((int32)(CountLeadingZeros(Arg) << 26)) >> 31; + return (32 - CountLeadingZeros(Arg - 1)) & (~Bitmask); + } + + static FORCEINLINE uint64 CeilLogTwo64( uint64 Arg ) + { + int64 Bitmask = ((int64)(CountLeadingZeros64(Arg) << 57)) >> 63; + return (64 - CountLeadingZeros64(Arg - 1)) & (~Bitmask); + } + + /** @return Rounds the given number up to the next highest power of two. */ + static FORCEINLINE uint32 RoundUpToPowerOfTwo(uint32 Arg) + { + return 1 << CeilLogTwo(Arg); + } + + /** Spreads bits to every other. */ + static FORCEINLINE uint32 MortonCode2( uint32 x ) + { + x &= 0x0000ffff; + x = (x ^ (x << 8)) & 0x00ff00ff; + x = (x ^ (x << 4)) & 0x0f0f0f0f; + x = (x ^ (x << 2)) & 0x33333333; + x = (x ^ (x << 1)) & 0x55555555; + return x; + } + + /** Reverses MortonCode2. Compacts every other bit to the right. */ + static FORCEINLINE uint32 ReverseMortonCode2( uint32 x ) + { + x &= 0x55555555; + x = (x ^ (x >> 1)) & 0x33333333; + x = (x ^ (x >> 2)) & 0x0f0f0f0f; + x = (x ^ (x >> 4)) & 0x00ff00ff; + x = (x ^ (x >> 8)) & 0x0000ffff; + return x; + } + + /** Spreads bits to every 3rd. */ + static FORCEINLINE uint32 MortonCode3( uint32 x ) + { + x &= 0x000003ff; + x = (x ^ (x << 16)) & 0xff0000ff; + x = (x ^ (x << 8)) & 0x0300f00f; + x = (x ^ (x << 4)) & 0x030c30c3; + x = (x ^ (x << 2)) & 0x09249249; + return x; + } + + /** Reverses MortonCode3. Compacts every 3rd bit to the right. */ + static FORCEINLINE uint32 ReverseMortonCode3( uint32 x ) + { + x &= 0x09249249; + x = (x ^ (x >> 2)) & 0x030c30c3; + x = (x ^ (x >> 4)) & 0x0300f00f; + x = (x ^ (x >> 8)) & 0xff0000ff; + x = (x ^ (x >> 16)) & 0x000003ff; + return x; + } + + /** + * Returns value based on comparand. The main purpose of this function is to avoid + * branching based on floating point comparison which can be avoided via compiler + * intrinsics. + * + * Please note that we don't define what happens in the case of NaNs as there might + * be platform specific differences. + * + * @param Comparand Comparand the results are based on + * @param ValueGEZero Return value if Comparand >= 0 + * @param ValueLTZero Return value if Comparand < 0 + * + * @return ValueGEZero if Comparand >= 0, ValueLTZero otherwise + */ + static CONSTEXPR FORCEINLINE float FloatSelect( float Comparand, float ValueGEZero, float ValueLTZero ) + { + return Comparand >= 0.f ? ValueGEZero : ValueLTZero; + } + + /** + * Returns value based on comparand. The main purpose of this function is to avoid + * branching based on floating point comparison which can be avoided via compiler + * intrinsics. + * + * Please note that we don't define what happens in the case of NaNs as there might + * be platform specific differences. + * + * @param Comparand Comparand the results are based on + * @param ValueGEZero Return value if Comparand >= 0 + * @param ValueLTZero Return value if Comparand < 0 + * + * @return ValueGEZero if Comparand >= 0, ValueLTZero otherwise + */ + static CONSTEXPR FORCEINLINE double FloatSelect( double Comparand, double ValueGEZero, double ValueLTZero ) + { + return Comparand >= 0.f ? ValueGEZero : ValueLTZero; + } + + /** Computes absolute value in a generic way */ + template< class T > + static CONSTEXPR FORCEINLINE T Abs( const T A ) + { + return (A>=(T)0) ? A : -A; + } + + /** Returns 1, 0, or -1 depending on relation of T to 0 */ + template< class T > + static CONSTEXPR FORCEINLINE T Sign( const T A ) + { + return (A > (T)0) ? (T)1 : ((A < (T)0) ? (T)-1 : (T)0); + } + + /** Returns higher value in a generic way */ + template< class T > + static CONSTEXPR FORCEINLINE T Max( const T A, const T B ) + { + return (A>=B) ? A : B; + } + + /** Returns lower value in a generic way */ + template< class T > + static CONSTEXPR FORCEINLINE T Min( const T A, const T B ) + { + return (A<=B) ? A : B; + } + + /** + * Min of Array + * @param Array of templated type + * @param Optional pointer for returning the index of the minimum element, if multiple minimum elements the first index is returned + * @return The min value found in the array or default value if the array was empty + */ + template< class T > + static FORCEINLINE T Min(const TArray& Values, int32* MinIndex = NULL) + { + if (Values.Num() == 0) + { + if (MinIndex) + { + *MinIndex = INDEX_NONE; + } + return T(); + } + + T CurMin = Values[0]; + int32 CurMinIndex = 0; + for (int32 v = 1; v < Values.Num(); ++v) + { + const T Value = Values[v]; + if (Value < CurMin) + { + CurMin = Value; + CurMinIndex = v; + } + } + + if (MinIndex) + { + *MinIndex = CurMinIndex; + } + return CurMin; + } + + /** + * Max of Array + * @param Array of templated type + * @param Optional pointer for returning the index of the maximum element, if multiple maximum elements the first index is returned + * @return The max value found in the array or default value if the array was empty + */ + template< class T > + static FORCEINLINE T Max(const TArray& Values, int32* MaxIndex = NULL) + { + if (Values.Num() == 0) + { + if (MaxIndex) + { + *MaxIndex = INDEX_NONE; + } + return T(); + } + + T CurMax = Values[0]; + int32 CurMaxIndex = 0; + for (int32 v = 1; v < Values.Num(); ++v) + { + const T Value = Values[v]; + if (CurMax < Value) + { + CurMax = Value; + CurMaxIndex = v; + } + } + + if (MaxIndex) + { + *MaxIndex = CurMaxIndex; + } + return CurMax; + } + + static FORCEINLINE int32 CountBits(uint64 Bits) + { + // https://en.wikipedia.org/wiki/Hamming_weight + Bits -= (Bits >> 1) & 0x5555555555555555ull; + Bits = (Bits & 0x3333333333333333ull) + ((Bits >> 2) & 0x3333333333333333ull); + Bits = (Bits + (Bits >> 4)) & 0x0f0f0f0f0f0f0f0full; + return (Bits * 0x0101010101010101) >> 56; + } +}; + +/** Float specialization */ +template<> +FORCEINLINE float FGenericPlatformMath::Abs( const float A ) +{ + return fabsf( A ); +} + +using FPlatformMath = FGenericPlatformMath; \ No newline at end of file diff --git a/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMemory.h b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMemory.h new file mode 100644 index 0000000..274ceb5 --- /dev/null +++ b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformMemory.h @@ -0,0 +1,64 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + + +/*============================================================================================= + GenericPlatformMemory.h: Generic platform memory classes +==============================================================================================*/ + +#pragma once + +#include "../BasicTypes.h" +#include + +struct FPlatformMemory +{ + static FORCEINLINE void* Memmove( void* Dest, const void* Src, SIZE_T Count ) + { + return memmove( Dest, Src, Count ); + } + + static FORCEINLINE int32 Memcmp( const void* Buf1, const void* Buf2, SIZE_T Count ) + { + return memcmp( Buf1, Buf2, Count ); + } + + static FORCEINLINE void* Memset(void* Dest, uint8 Char, SIZE_T Count) + { + return memset( Dest, Char, Count ); + } + + static FORCEINLINE void* Memzero(void* Dest, SIZE_T Count) + { + return memset( Dest, 0, Count ); + } + + static FORCEINLINE void* Memcpy(void* Dest, const void* Src, SIZE_T Count) + { + return memcpy( Dest, Src, Count ); + } + + /** Memcpy optimized for big blocks. */ + static FORCEINLINE void* BigBlockMemcpy(void* Dest, const void* Src, SIZE_T Count) + { + return memcpy(Dest, Src, Count); + } + + /** On some platforms memcpy optimized for big blocks that avoid L2 cache pollution are available */ + static FORCEINLINE void* StreamingMemcpy(void* Dest, const void* Src, SIZE_T Count) + { + return memcpy( Dest, Src, Count ); + } + +private: + template + static FORCEINLINE void Valswap(T& A, T& B) + { + // Usually such an implementation would use move semantics, but + // we're only ever going to call it on fundamental types and MoveTemp + // is not necessarily in scope here anyway, so we don't want to + // #include it if we don't need to. + T Tmp = A; + A = B; + B = Tmp; + } +}; diff --git a/version/Core/Public/API/UE/GenericPlatform/GenericPlatformString.h b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformString.h new file mode 100644 index 0000000..506d78e --- /dev/null +++ b/version/Core/Public/API/UE/GenericPlatform/GenericPlatformString.h @@ -0,0 +1,208 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Templates/EnableIf.h" +#include "../HAL/UnrealMemory.h" + +/** +* Generic string implementation for most platforms +*/ +struct FGenericPlatformString +{ + /** + * Tests whether a particular character is a valid member of its encoding. + * + * @param Ch The character to test. + * @return True if the character is a valid member of Encoding. + */ + template + static bool IsValidChar(Encoding Ch) + { + return true; + } + + + /** + * Tests whether a particular character can be converted to the destination encoding. + * + * @param Ch The character to test. + * @return True if Ch can be encoded as a DestEncoding. + */ + template + static bool CanConvertChar(SourceEncoding Ch) + { + return IsValidChar(Ch) && (SourceEncoding)(DestEncoding)Ch == Ch && IsValidChar((DestEncoding)Ch); + } + + + /** + * Returns the string representing the name of the given encoding type. + * + * @return The name of the CharType as a TCHAR string. + */ + template + static const TCHAR* GetEncodingTypeName(); + + /** + * True if the encoding type of the string is some form of unicode + */ + static const bool IsUnicodeEncoded = false; + + + /** + * Metafunction which tests whether a given character type represents a fixed-width encoding. + * + * We need to 'forward' the metafunction to a helper because of the C++ requirement that + * nested structs cannot be fully specialized. They can be partially specialized however, hence the + * helper function. + */ + template + struct TIsFixedWidthEncoding_Helper + { + enum { Value = false }; + }; + + template struct TIsFixedWidthEncoding_Helper { enum { Value = true }; }; + template struct TIsFixedWidthEncoding_Helper { enum { Value = true }; }; + template struct TIsFixedWidthEncoding_Helper { enum { Value = true }; }; + + template + struct TIsFixedWidthEncoding : TIsFixedWidthEncoding_Helper + { + }; + + + /** + * Metafunction which tests whether two encodings are compatible. + * + * We'll say the encodings are compatible if they're both fixed-width and have the same size. This + * should be good enough and catches things like UCS2CHAR and WIDECHAR being equivalent. + * Specializations of this template can be provided for any other special cases. + * Same size is a minimum requirement. + */ + template + struct TAreEncodingsCompatible + { + enum { Value = TIsFixedWidthEncoding::Value && TIsFixedWidthEncoding::Value && sizeof(EncodingA) == sizeof(EncodingB) }; + }; + + /** + * Converts the [Src, Src+SrcSize) string range from SourceChar to DestChar and writes it to the [Dest, Dest+DestSize) range. + * The Src range should contain a null terminator if a null terminator is required in the output. + * If the Dest range is not big enough to hold the converted output, NULL is returned. In this case, nothing should be assumed about the contents of Dest. + * + * @param Dest The start of the destination buffer. + * @param DestSize The size of the destination buffer. + * @param Src The start of the string to convert. + * @param SrcSize The number of Src elements to convert. + * @param BogusChar The char to use when the conversion process encounters a character it cannot convert. + * @return A pointer to one past the last-written element. + */ + template + static typename TEnableIf< + // This overload should be called when SourceEncoding and DestEncoding are 'compatible', i.e. they're the same type or equivalent (e.g. like UCS2CHAR and WIDECHAR are on Windows). + TAreEncodingsCompatible::Value, + DestEncoding* + >::Type Convert(DestEncoding* Dest, int32 DestSize, const SourceEncoding* Src, int32 SrcSize, DestEncoding BogusChar = (DestEncoding)'?') + { + if (DestSize < SrcSize) + return nullptr; + + return (DestEncoding*)Memcpy(Dest, Src, SrcSize * sizeof(SourceEncoding)) + SrcSize; + } + + /** + * Converts the [Src, Src+SrcSize) string range from SourceEncoding to DestEncoding and writes it to the [Dest, Dest+DestSize) range. + * The Src range should contain a null terminator if a null terminator is required in the output. + * If the Dest range is not big enough to hold the converted output, NULL is returned. In this case, nothing should be assumed about the contents of Dest. + * + * @param Dest The start of the destination buffer. + * @param DestSize The size of the destination buffer. + * @param Src The start of the string to convert. + * @param SrcSize The number of Src elements to convert. + * @param BogusChar The char to use when the conversion process encounters a character it cannot convert. + * @return A pointer to one past the last-written element. + */ + template + static typename TEnableIf< + // This overload should be called when the types are not compatible but the source is fixed-width, e.g. ANSICHAR->WIDECHAR. + !TAreEncodingsCompatible::Value && TIsFixedWidthEncoding::Value, + DestEncoding* + >::Type Convert(DestEncoding* Dest, int32 DestSize, const SourceEncoding* Src, int32 SrcSize, DestEncoding BogusChar = (DestEncoding)'?') + { + const SourceEncoding* InSrc = Src; + int32 InSrcSize = SrcSize; + bool bInvalidChars = false; + while (SrcSize) + { + if (!DestSize) + return nullptr; + + SourceEncoding SrcCh = *Src++; + if (CanConvertChar(SrcCh)) + { + *Dest++ = (DestEncoding)SrcCh; + } + else + { + *Dest++ = BogusChar; + bInvalidChars = true; + } + --SrcSize; + --DestSize; + } + + return Dest; + } + + /** + * Returns the required buffer length for the [Src, Src+SrcSize) string when converted to the DestChar encoding. + * The Src range should contain a null terminator if a null terminator is required in the output. + * + * @param Src The start of the string to convert. + * @param SrcSize The number of Src elements to convert. + * @return The number of DestChar elements that Src will be converted into. + */ + template + static typename TEnableIf::Value && TIsFixedWidthEncoding::Value, int32>::Type ConvertedLength(const SourceEncoding* Src, int32 SrcSize) + { + return SrcSize; + } + + +private: + /** + * Forwarding function because we can't call FMemory::Memcpy directly due to #include ordering issues. + * + * @param Dest The destination buffer. + * @param Src The source buffer. + * @param Count The number of bytes to copy. + * @return Dest + */ + static void* Memcpy(void* Dest, const void* Src, SIZE_T Count); +}; + + +/** +* Specialization of IsValidChar for ANSICHARs. +*/ +template <> +inline bool FGenericPlatformString::IsValidChar(ANSICHAR Ch) +{ + return Ch >= 0x00 && Ch <= 0x7F; +} + +template <> +inline const TCHAR* FGenericPlatformString::GetEncodingTypeName() { return TEXT("ANSICHAR"); } +template <> +inline const TCHAR* FGenericPlatformString::GetEncodingTypeName() { return TEXT("WIDECHAR"); } +template <> +inline const TCHAR* FGenericPlatformString::GetEncodingTypeName() { return TEXT("UCS2CHAR"); } + + +inline void* FGenericPlatformString::Memcpy(void* Dest, const void* Src, SIZE_T Count) +{ + return FMemory::Memcpy(Dest, Src, Count); +} \ No newline at end of file diff --git a/version/Core/Public/API/UE/HAL/UnrealMemory.h b/version/Core/Public/API/UE/HAL/UnrealMemory.h new file mode 100644 index 0000000..3f36fe4 --- /dev/null +++ b/version/Core/Public/API/UE/HAL/UnrealMemory.h @@ -0,0 +1,108 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../../Fields.h" +#include "../Templates/IsPointer.h" +#include "../GenericPlatform/GenericPlatformMemory.h" + +enum +{ + // Default allocator alignment. If the default is specified, the allocator applies to engine rules. + // Blocks >= 16 bytes will be 16-byte-aligned, Blocks < 16 will be 8-byte aligned. If the allocator does + // not support allocation alignment, the alignment will be ignored. + DEFAULT_ALIGNMENT = 0, + + // Minimum allocator alignment + MIN_ALIGNMENT = 8, +}; + +/*----------------------------------------------------------------------------- + FMemory. +-----------------------------------------------------------------------------*/ + +struct FMemory +{ + static FORCEINLINE void* Memmove( void* Dest, const void* Src, SIZE_T Count ) + { + return FPlatformMemory::Memmove( Dest, Src, Count ); + } + + static FORCEINLINE int32 Memcmp( const void* Buf1, const void* Buf2, SIZE_T Count ) + { + return FPlatformMemory::Memcmp( Buf1, Buf2, Count ); + } + + static FORCEINLINE void* Memset(void* Dest, uint8 Char, SIZE_T Count) + { + return FPlatformMemory::Memset( Dest, Char, Count ); + } + + template< class T > + static FORCEINLINE void Memset( T& Src, uint8 ValueToSet ) + { + static_assert( !TIsPointer::Value, "For pointers use the three parameters function"); + Memset( &Src, ValueToSet, sizeof( T ) ); + } + + static FORCEINLINE void* Memzero(void* Dest, SIZE_T Count) + { + return FPlatformMemory::Memzero( Dest, Count ); + } + + template< class T > + static FORCEINLINE void Memzero( T& Src ) + { + static_assert( !TIsPointer::Value, "For pointers use the two parameters function"); + Memzero( &Src, sizeof( T ) ); + } + + static FORCEINLINE void* Memcpy(void* Dest, const void* Src, SIZE_T Count) + { + return FPlatformMemory::Memcpy(Dest,Src,Count); + } + + template< class T > + static FORCEINLINE void Memcpy( T& Dest, const T& Src ) + { + static_assert( !TIsPointer::Value, "For pointers use the three parameters function"); + Memcpy( &Dest, &Src, sizeof( T ) ); + } + + static FORCEINLINE void* BigBlockMemcpy(void* Dest, const void* Src, SIZE_T Count) + { + return FPlatformMemory::BigBlockMemcpy(Dest,Src,Count); + } + + static FORCEINLINE void* StreamingMemcpy(void* Dest, const void* Src, SIZE_T Count) + { + return FPlatformMemory::StreamingMemcpy(Dest,Src,Count); + } + + // + // C style memory allocation stubs that fall back to C runtime + // + static FORCEINLINE void* SystemMalloc(SIZE_T Size) + { + return ::malloc(Size); + } + + static FORCEINLINE void SystemFree(void* Ptr) + { + ::free(Ptr); + } + + // + // C style memory allocation stubs. + // + + static void * Malloc(SIZE_T Count, uint32 Alignment = DEFAULT_ALIGNMENT) { return NativeCall(nullptr, "FMemory.Malloc", Count, Alignment); } + static void * Realloc(void * Ptr, SIZE_T Size, uint32 Alignment = DEFAULT_ALIGNMENT) { return NativeCall(nullptr, "FMemory.Realloc", Ptr, Size); } + static void Free(void* Original) { NativeCall(nullptr, "FMemory.Free", Original); } + + static SIZE_T QuantizeSize(SIZE_T Count, uint32 Alignment = DEFAULT_ALIGNMENT) + { + return Count; + } +}; diff --git a/version/Core/Public/API/UE/Math/Color.h b/version/Core/Public/API/UE/Math/Color.h new file mode 100644 index 0000000..bbe1dc6 --- /dev/null +++ b/version/Core/Public/API/UE/Math/Color.h @@ -0,0 +1,634 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "../Containers/FString.h" + +struct FColor; + +class FFloat16Color; + +#pragma warning(push) +#pragma warning(disable : 4244) + +/** +* Enum for the different kinds of gamma spaces we expect to need to convert from/to. +*/ +enum class EGammaSpace +{ + /** No gamma correction is applied to this space, the incoming colors are assumed to already be in linear space. */ + Linear, + /** A simplified sRGB gamma correction is applied, pow(1/2.2). */ + Pow22, + /** Use the standard sRGB conversion. */ + sRGB, +}; + + +/** +* A linear, 32-bit/component floating point RGBA color. +*/ +struct FLinearColor +{ + float R, + G, + B, + A; + + /** Static lookup table used for FColor -> FLinearColor conversion. Pow(2.2) */ + static float Pow22OneOver255Table[256]; + + /** Static lookup table used for FColor -> FLinearColor conversion. sRGB */ + static CONSTEXPR double sRGBToLinearTable[256] = + { + 0, + 0.000303526983548838, 0.000607053967097675, 0.000910580950646512, 0.00121410793419535, 0.00151763491774419, + 0.00182116190129302, 0.00212468888484186, 0.0024282158683907, 0.00273174285193954, 0.00303526983548838, + 0.00334653564113713, 0.00367650719436314, 0.00402471688178252, 0.00439144189356217, 0.00477695332960869, + 0.005181516543916, 0.00560539145834456, 0.00604883284946662, 0.00651209061157708, 0.00699540999852809, + 0.00749903184667767, 0.00802319278093555, 0.0085681254056307, 0.00913405848170623, 0.00972121709156193, + 0.0103298227927056, 0.0109600937612386, 0.0116122449260844, 0.012286488094766, 0.0129830320714536, + 0.0137020827679224, 0.0144438433080002, 0.0152085141260192, 0.0159962930597398, 0.0168073754381669, + 0.0176419541646397, 0.0185002197955389, 0.0193823606149269, 0.0202885627054049, 0.0212190100154473, + 0.0221738844234532, 0.02315336579873, 0.0241576320596103, 0.0251868592288862, 0.0262412214867272, + 0.0273208912212394, 0.0284260390768075, 0.0295568340003534, 0.0307134432856324, 0.0318960326156814, + 0.0331047661035236, 0.0343398063312275, 0.0356013143874111, 0.0368894499032755, 0.0382043710872463, + 0.0395462347582974, 0.0409151963780232, 0.0423114100815264, 0.0437350287071788, 0.0451862038253117, + 0.0466650857658898, 0.0481718236452158, 0.049706565391714, 0.0512694577708345, 0.0528606464091205, + 0.0544802758174765, 0.0561284894136735, 0.0578054295441256, 0.0595112375049707, 0.0612460535624849, + 0.0630100169728596, 0.0648032660013696, 0.0666259379409563, 0.0684781691302512, 0.070360094971063, + 0.0722718499453493, 0.0742135676316953, 0.0761853807213167, 0.0781874210336082, 0.0802198195312533, + 0.0822827063349132, 0.0843762107375113, 0.0865004612181274, 0.0886555854555171, 0.0908417103412699, + 0.0930589619926197, 0.0953074657649191, 0.0975873462637915, 0.0998987273569704, 0.102241732185838, + 0.104616483176675, 0.107023102051626, 0.109461709839399, 0.1119324268857, 0.114435372863418, + 0.116970666782559, 0.119538426999953, 0.122138771228724, 0.124771816547542, 0.127437679409664, + 0.130136475651761, 0.132868320502552, 0.135633328591233, 0.138431613955729, 0.141263290050755, + 0.144128469755705, 0.147027265382362, 0.149959788682454, 0.152926150855031, 0.155926462553701, + 0.158960833893705, 0.162029374458845, 0.16513219330827, 0.168269398983119, 0.171441099513036, + 0.174647402422543, 0.17788841473729, 0.181164242990184, 0.184474993227387, 0.187820771014205, + 0.191201681440861, 0.194617829128147, 0.198069318232982, 0.201556252453853, 0.205078735036156, + 0.208636868777438, 0.212230756032542, 0.215860498718652, 0.219526198320249, 0.223227955893977, + 0.226965872073417, 0.23074004707378, 0.23455058069651, 0.238397572333811, 0.242281120973093, + 0.246201325201334, 0.250158283209375, 0.254152092796134, 0.258182851372752, 0.262250655966664, + 0.266355603225604, 0.270497789421545, 0.274677310454565, 0.278894261856656, 0.283148738795466, + 0.287440836077983, 0.291770648154158, 0.296138269120463, 0.300543792723403, 0.304987312362961, + 0.309468921095997, 0.313988711639584, 0.3185467763743, 0.323143207347467, 0.32777809627633, + 0.332451534551205, 0.337163613238559, 0.341914423084057, 0.346704054515559, 0.351532597646068, + 0.356400142276637, 0.361306777899234, 0.36625259369956, 0.371237678559833, 0.376262121061519, + 0.381326009488037, 0.386429431827418, 0.39157247577492, 0.396755228735618, 0.401977777826949, + 0.407240209881218, 0.41254261144808, 0.417885068796976, 0.423267667919539, 0.428690494531971, + 0.434153634077377, 0.439657171728079, 0.445201192387887, 0.450785780694349, 0.456411021020965, + 0.462076997479369, 0.467783793921492, 0.473531493941681, 0.479320180878805, 0.485149937818323, + 0.491020847594331, 0.496932992791578, 0.502886455747457, 0.50888131855397, 0.514917663059676, + 0.520995570871595, 0.527115123357109, 0.533276401645826, 0.539479486631421, 0.545724458973463, + 0.552011399099209, 0.558340387205378, 0.56471150325991, 0.571124827003694, 0.577580437952282, + 0.584078415397575, 0.590618838409497, 0.597201785837643, 0.603827336312907, 0.610495568249093, + 0.617206559844509, 0.623960389083534, 0.630757133738175, 0.637596871369601, 0.644479679329661, + 0.651405634762384, 0.658374814605461, 0.665387295591707, 0.672443154250516, 0.679542466909286, + 0.686685309694841, 0.693871758534824, 0.701101889159085, 0.708375777101046, 0.71569349769906, + 0.723055126097739, 0.730460737249286, 0.737910405914797, 0.745404206665559, 0.752942213884326, + 0.760524501766589, 0.768151144321824, 0.775822215374732, 0.783537788566466, 0.791297937355839, + 0.799102735020525, 0.806952254658248, 0.81484656918795, 0.822785751350956, 0.830769873712124, + 0.838799008660978, 0.846873228412837, 0.854992605009927, 0.863157210322481, 0.871367116049835, + 0.879622393721502, 0.887923114698241, 0.896269350173118, 0.904661171172551, 0.913098648557343, + 0.921581853023715, 0.930110855104312, 0.938685725169219, 0.947306533426946, 0.955973349925421, + 0.964686244552961, 0.973445287039244, 0.982250546956257, 0.991102093719252, 1.0, + }; + + FORCEINLINE FLinearColor() {} + FORCEINLINE explicit FLinearColor(EForceInit) + : R(0), G(0), B(0), A(0) + {} + FORCEINLINE FLinearColor(float InR, float InG, float InB, float InA = 1.0f) : R(InR), G(InG), B(InB), A(InA) {} + + FLinearColor(const FColor& Color); + + // Operators. + + FORCEINLINE float& Component(int32 Index) + { + return (&R)[Index]; + } + + FORCEINLINE const float& Component(int32 Index) const + { + return (&R)[Index]; + } + + FORCEINLINE FLinearColor operator+(const FLinearColor& ColorB) const + { + return FLinearColor( + this->R + ColorB.R, + this->G + ColorB.G, + this->B + ColorB.B, + this->A + ColorB.A + ); + } + FORCEINLINE FLinearColor& operator+=(const FLinearColor& ColorB) + { + R += ColorB.R; + G += ColorB.G; + B += ColorB.B; + A += ColorB.A; + return *this; + } + + FORCEINLINE FLinearColor operator-(const FLinearColor& ColorB) const + { + return FLinearColor( + this->R - ColorB.R, + this->G - ColorB.G, + this->B - ColorB.B, + this->A - ColorB.A + ); + } + FORCEINLINE FLinearColor& operator-=(const FLinearColor& ColorB) + { + R -= ColorB.R; + G -= ColorB.G; + B -= ColorB.B; + A -= ColorB.A; + return *this; + } + + FORCEINLINE FLinearColor operator*(const FLinearColor& ColorB) const + { + return FLinearColor( + this->R * ColorB.R, + this->G * ColorB.G, + this->B * ColorB.B, + this->A * ColorB.A + ); + } + FORCEINLINE FLinearColor& operator*=(const FLinearColor& ColorB) + { + R *= ColorB.R; + G *= ColorB.G; + B *= ColorB.B; + A *= ColorB.A; + return *this; + } + + FORCEINLINE FLinearColor operator*(float Scalar) const + { + return FLinearColor( + this->R * Scalar, + this->G * Scalar, + this->B * Scalar, + this->A * Scalar + ); + } + + FORCEINLINE FLinearColor& operator*=(float Scalar) + { + R *= Scalar; + G *= Scalar; + B *= Scalar; + A *= Scalar; + return *this; + } + + FORCEINLINE FLinearColor operator/(const FLinearColor& ColorB) const + { + return FLinearColor( + this->R / ColorB.R, + this->G / ColorB.G, + this->B / ColorB.B, + this->A / ColorB.A + ); + } + FORCEINLINE FLinearColor& operator/=(const FLinearColor& ColorB) + { + R /= ColorB.R; + G /= ColorB.G; + B /= ColorB.B; + A /= ColorB.A; + return *this; + } + + FORCEINLINE FLinearColor operator/(float Scalar) const + { + const float InvScalar = 1.0f / Scalar; + return FLinearColor( + this->R * InvScalar, + this->G * InvScalar, + this->B * InvScalar, + this->A * InvScalar + ); + } + FORCEINLINE FLinearColor& operator/=(float Scalar) + { + const float InvScalar = 1.0f / Scalar; + R *= InvScalar; + G *= InvScalar; + B *= InvScalar; + A *= InvScalar; + return *this; + } + + // clamped in 0..1 range + FORCEINLINE FLinearColor GetClamped(float InMin = 0.0f, float InMax = 1.0f) const + { + FLinearColor Ret; + + Ret.R = FMath::Clamp(R, InMin, InMax); + Ret.G = FMath::Clamp(G, InMin, InMax); + Ret.B = FMath::Clamp(B, InMin, InMax); + Ret.A = FMath::Clamp(A, InMin, InMax); + + return Ret; + } + + /** Comparison operators */ + FORCEINLINE bool operator==(const FLinearColor& ColorB) const + { + return this->R == ColorB.R && this->G == ColorB.G && this->B == ColorB.B && this->A == ColorB.A; + } + FORCEINLINE bool operator!=(const FLinearColor& Other) const + { + return this->R != Other.R || this->G != Other.G || this->B != Other.B || this->A != Other.A; + } + + // Error-tolerant comparison. + FORCEINLINE bool Equals(const FLinearColor& ColorB, float Tolerance = KINDA_SMALL_NUMBER) const + { + return FMath::Abs(this->R - ColorB.R) < Tolerance && FMath::Abs(this->G - ColorB.G) < Tolerance && FMath::Abs(this->B - ColorB.B) < Tolerance && FMath::Abs(this->A - ColorB.A) < Tolerance; + } + + FLinearColor CopyWithNewOpacity(float NewOpacicty) const + { + FLinearColor NewCopy = *this; + NewCopy.A = NewOpacicty; + return NewCopy; + } + + /** + * Converts byte hue-saturation-brightness to floating point red-green-blue. + */ + static FLinearColor FGetHSV(uint8 H, uint8 S, uint8 V); + + /** + * Makes a random but quite nice color. + */ + static FLinearColor MakeRandomColor(); + + /** + * Converts temperature in Kelvins of a black body radiator to RGB chromaticity. + */ + static FLinearColor MakeFromColorTemperature(float Temp); + + /** + * Euclidean distance between two points. + */ + static inline float Dist(const FLinearColor &V1, const FLinearColor &V2) + { + return FMath::Sqrt(FMath::Square(V2.R - V1.R) + FMath::Square(V2.G - V1.G) + FMath::Square(V2.B - V1.B) + FMath::Square(V2.A - V1.A)); + } + + /** + * Generates a list of sample points on a Bezier curve defined by 2 points. + * + * @param ControlPoints Array of 4 Linear Colors (vert1, controlpoint1, controlpoint2, vert2). + * @param NumPoints Number of samples. + * @param OutPoints Receives the output samples. + * @return Path length. + */ + static float EvaluateBezier(const FLinearColor* ControlPoints, int32 NumPoints, TArray& OutPoints); + + /** Converts a linear space RGB color to an HSV color */ + FLinearColor LinearRGBToHSV() const; + + /** Converts an HSV color to a linear space RGB color */ + FLinearColor HSVToLinearRGB() const; + + /** + * Linearly interpolates between two colors by the specified progress amount. The interpolation is performed in HSV color space + * taking the shortest path to the new color's hue. This can give better results than FMath::Lerp(), but is much more expensive. + * The incoming colors are in RGB space, and the output color will be RGB. The alpha value will also be interpolated. + * + * @param From The color and alpha to interpolate from as linear RGBA + * @param To The color and alpha to interpolate to as linear RGBA + * @param Progress Scalar interpolation amount (usually between 0.0 and 1.0 inclusive) + * @return The interpolated color in linear RGB space along with the interpolated alpha value + */ + static FLinearColor LerpUsingHSV(const FLinearColor& From, const FLinearColor& To, const float Progress); + + /** + * Returns a desaturated color, with 0 meaning no desaturation and 1 == full desaturation + * + * @param Desaturation Desaturation factor in range [0..1] + * @return Desaturated color + */ + FLinearColor Desaturate(float Desaturation) const; + + /** Computes the perceptually weighted luminance value of a color. */ + inline float ComputeLuminance() const + { + return R * 0.3f + G * 0.59f + B * 0.11f; + } + + /** + * Returns the maximum value in this color structure + * + * @return The maximum color channel value + */ + FORCEINLINE float GetMax() const + { + return FMath::Max(FMath::Max(FMath::Max(R, G), B), A); + } + + /** useful to detect if a light contribution needs to be rendered */ + bool IsAlmostBlack() const + { + return FMath::Square(R) < DELTA && FMath::Square(G) < DELTA && FMath::Square(B) < DELTA; + } + + /** + * Returns the minimum value in this color structure + * + * @return The minimum color channel value + */ + FORCEINLINE float GetMin() const + { + return FMath::Min(FMath::Min(FMath::Min(R, G), B), A); + } + + FORCEINLINE float GetLuminance() const + { + return R * 0.3f + G * 0.59f + B * 0.11f; + } + + // Common colors. + static const FLinearColor White; + static const FLinearColor Gray; + static const FLinearColor Black; + static const FLinearColor Transparent; + static const FLinearColor Red; + static const FLinearColor Green; + static const FLinearColor Blue; + static const FLinearColor Yellow; +}; + +FORCEINLINE FLinearColor operator*(float Scalar, const FLinearColor& Color) +{ + return Color.operator*(Scalar); +} + +// +// FColor +// Stores a color with 8 bits of precision per channel. +// Note: Linear color values should always be converted to gamma space before stored in an FColor, as 8 bits of precision is not enough to store linear space colors! +// This can be done with FLinearColor::ToFColor(true) +// + +struct FColor +{ +public: + // Variables. +#if PLATFORM_LITTLE_ENDIAN +#ifdef _MSC_VER + // Win32 x86 + union { struct { uint8 B, G, R, A; }; uint32 AlignmentDummy; }; +#else + // Linux x86, etc + uint8 B GCC_ALIGN(4); + uint8 G, R, A; +#endif +#else // PLATFORM_LITTLE_ENDIAN + union { struct { uint8 A, R, G, B; }; uint32 AlignmentDummy; }; +#endif + + uint32& DWColor(void) { return *((uint32*)this); } + const uint32& DWColor(void) const { return *((uint32*)this); } + + // Constructors. + FORCEINLINE FColor() {} + FORCEINLINE explicit FColor(EForceInit) + { + // put these into the body for proper ordering with INTEL vs non-INTEL_BYTE_ORDER + R = G = B = A = 0; + } + FORCEINLINE FColor(uint8 InR, uint8 InG, uint8 InB, uint8 InA = 255) + { + // put these into the body for proper ordering with INTEL vs non-INTEL_BYTE_ORDER + R = InR; + G = InG; + B = InB; + A = InA; + + } + + FORCEINLINE explicit FColor(uint32 InColor) + { + DWColor() = InColor; + } + + // Operators. + FORCEINLINE bool operator==(const FColor &C) const + { + return DWColor() == C.DWColor(); + } + + FORCEINLINE bool operator!=(const FColor& C) const + { + return DWColor() != C.DWColor(); + } + + FORCEINLINE void operator+=(const FColor& C) + { + R = (uint8)FMath::Min((int32)R + (int32)C.R, 255); + G = (uint8)FMath::Min((int32)G + (int32)C.G, 255); + B = (uint8)FMath::Min((int32)B + (int32)C.B, 255); + A = (uint8)FMath::Min((int32)A + (int32)C.A, 255); + } + + FLinearColor FromRGBE() const; + + /** + * Creates a color value from the given hexadecimal string. + * + * Supported formats are: RGB, RRGGBB, RRGGBBAA, #RGB, #RRGGBB, #RRGGBBAA + * + * @param HexString - The hexadecimal string. + * @return The corresponding color value. + * @see ToHex + */ + static FColor FromHex(const FString& HexString); + + /** + * Makes a random but quite nice color. + */ + static FColor MakeRandomColor(); + + /** + * Makes a color red->green with the passed in scalar (e.g. 0 is red, 1 is green) + */ + static FColor MakeRedToGreenColorFromScalar(float Scalar); + + /** + * Converts temperature in Kelvins of a black body radiator to RGB chromaticity. + */ + static FColor MakeFromColorTemperature(float Temp); + + /** + * @return a new FColor based of this color with the new alpha value. + * Usage: const FColor& MyColor = FColorList::Green.WithAlpha(128); + */ + FColor WithAlpha(uint8 Alpha) const + { + return FColor(R, G, B, Alpha); + } + + /** + * Reinterprets the color as a linear color. + * + * @return The linear color representation. + */ + FORCEINLINE FLinearColor ReinterpretAsLinear() const + { + return FLinearColor(R / 255.f, G / 255.f, B / 255.f, A / 255.f); + } + + /** + * Gets the color in a packed uint32 format packed in the order ARGB. + */ + FORCEINLINE uint32 ToPackedARGB() const + { + return (A << 24) | (R << 16) | (G << 8) | (B << 0); + } + + /** + * Gets the color in a packed uint32 format packed in the order ABGR. + */ + FORCEINLINE uint32 ToPackedABGR() const + { + return (A << 24) | (B << 16) | (G << 8) | (R << 0); + } + + /** + * Gets the color in a packed uint32 format packed in the order RGBA. + */ + FORCEINLINE uint32 ToPackedRGBA() const + { + return (R << 24) | (G << 16) | (B << 8) | (A << 0); + } + + /** + * Gets the color in a packed uint32 format packed in the order BGRA. + */ + FORCEINLINE uint32 ToPackedBGRA() const + { + return (B << 24) | (G << 16) | (R << 8) | (A << 0); + } + + /** Some pre-inited colors, useful for debug code */ + static const FColor White; + static const FColor Black; + static const FColor Transparent; + static const FColor Red; + static const FColor Green; + static const FColor Blue; + static const FColor Yellow; + static const FColor Cyan; + static const FColor Magenta; + static const FColor Orange; + static const FColor Purple; + static const FColor Turquoise; + static const FColor Silver; + static const FColor Emerald; + +private: + /** + * Please use .ToFColor(true) on FLinearColor if you wish to convert from FLinearColor to FColor, + * with proper sRGB conversion applied. + * + * Note: Do not implement or make public. We don't want people needlessly and implicitly converting between + * FLinearColor and FColor. It's not a free conversion. + */ + explicit FColor(const FLinearColor& LinearColor); +}; + +static const float OneOver255 = 1.0f / 255.0f; + +inline FLinearColor::FLinearColor(const FColor& Color) +{ + R = sRGBToLinearTable[Color.R]; + G = sRGBToLinearTable[Color.G]; + B = sRGBToLinearTable[Color.B]; + A = float(Color.A) * OneOver255; +} + +// These act like a POD +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; + + +/** +* Helper struct for a 16 bit 565 color of a DXT1/3/5 block. +*/ +struct FDXTColor565 +{ + /** Blue component, 5 bit. */ + uint16 B : 5; + + /** Green component, 6 bit. */ + uint16 G : 6; + + /** Red component, 5 bit */ + uint16 R : 5; +}; + + +/** +* Helper struct for a 16 bit 565 color of a DXT1/3/5 block. +*/ +struct FDXTColor16 +{ + union + { + /** 565 Color */ + FDXTColor565 Color565; + /** 16 bit entity representation for easy access. */ + uint16 Value; + }; +}; + + +/** +* Structure encompassing single DXT1 block. +*/ +struct FDXT1 +{ + /** Color 0/1 */ + union + { + FDXTColor16 Color[2]; + uint32 Colors; + }; + /** Indices controlling how to blend colors. */ + uint32 Indices; +}; + + +/** +* Structure encompassing single DXT5 block +*/ +struct FDXT5 +{ + /** Alpha component of DXT5 */ + uint8 Alpha[8]; + /** DXT1 color component. */ + FDXT1 DXT1; +}; + +#pragma warning(pop) + + +// Make DXT helpers act like PODs +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; + diff --git a/version/Core/Public/API/UE/Math/ColorList.h b/version/Core/Public/API/UE/Math/ColorList.h new file mode 100644 index 0000000..dde2ce2 --- /dev/null +++ b/version/Core/Public/API/UE/Math/ColorList.h @@ -0,0 +1,110 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "Color.h" + +class FColorList +{ +public: + // Common colors. + inline static const FColor White = FColor(255, 255, 255, 255); + inline static const FColor Red = FColor(255, 0, 0, 255); + inline static const FColor Green = FColor(0, 255, 0, 255); + inline static const FColor Blue = FColor(0, 0, 255, 255); + inline static const FColor Magenta = FColor(255, 0, 255, 255); + inline static const FColor Cyan = FColor(0, 255, 255, 255); + inline static const FColor Yellow = FColor(255, 255, 0, 255); + inline static const FColor Black = FColor(0, 0, 0, 255); + inline static const FColor Aquamarine = FColor(112, 219, 147, 255); + inline static const FColor BakerChocolate = FColor(92, 51, 23, 255); + inline static const FColor BlueViolet = FColor(159, 95, 159, 255); + inline static const FColor Brass = FColor(181, 166, 66, 255); + inline static const FColor BrightGold = FColor(217, 217, 25, 255); + inline static const FColor Brown = FColor(166, 42, 42, 255); + inline static const FColor Bronze = FColor(140, 120, 83, 255); + inline static const FColor BronzeII = FColor(166, 125, 61, 255); + inline static const FColor CadetBlue = FColor(95, 159, 159, 255); + inline static const FColor CoolCopper = FColor(217, 135, 25, 255); + inline static const FColor Copper = FColor(184, 115, 51, 255); + inline static const FColor Coral = FColor(255, 127, 0, 255); + inline static const FColor CornFlowerBlue = FColor(66, 66, 111, 255); + inline static const FColor DarkBrown = FColor(92, 64, 51, 255); + inline static const FColor DarkGreen = FColor(47, 79, 47, 255); + inline static const FColor DarkGreenCopper = FColor(74, 118, 110, 255); + inline static const FColor DarkOliveGreen = FColor(79, 79, 47, 255); + inline static const FColor DarkOrchid = FColor(153, 50, 205, 255); + inline static const FColor DarkPurple = FColor(135, 31, 120, 255); + inline static const FColor DarkSlateBlue = FColor(107, 35, 142, 255); + inline static const FColor DarkSlateGrey = FColor(47, 79, 79, 255); + inline static const FColor DarkTan = FColor(151, 105, 79, 255); + inline static const FColor DarkTurquoise = FColor(112, 147, 219, 255); + inline static const FColor DarkWood = FColor(133, 94, 66, 255); + inline static const FColor DimGrey = FColor(84, 84, 84, 255); + inline static const FColor DustyRose = FColor(133, 99, 99, 255); + inline static const FColor Feldspar = FColor(209, 146, 117, 255); + inline static const FColor Firebrick = FColor(142, 35, 35, 255); + inline static const FColor ForestGreen = FColor(35, 142, 35, 255); + inline static const FColor Gold = FColor(205, 127, 50, 255); + inline static const FColor Goldenrod = FColor(219, 219, 112, 255); + inline static const FColor Grey = FColor(192, 192, 192, 255); + inline static const FColor GreenCopper = FColor(82, 127, 118, 255); + inline static const FColor GreenYellow = FColor(147, 219, 112, 255); + inline static const FColor HunterGreen = FColor(33, 94, 33, 255); + inline static const FColor IndianRed = FColor(78, 47, 47, 255); + inline static const FColor Khaki = FColor(159, 159, 95, 255); + inline static const FColor LightBlue = FColor(192, 217, 217, 255); + inline static const FColor LightGrey = FColor(168, 168, 168, 255); + inline static const FColor LightSteelBlue = FColor(143, 143, 189, 255); + inline static const FColor LightWood = FColor(233, 194, 166, 255); + inline static const FColor LimeGreen = FColor(50, 205, 50, 255); + inline static const FColor MandarianOrange = FColor(228, 120, 51, 255); + inline static const FColor Maroon = FColor(142, 35, 107, 255); + inline static const FColor MediumAquamarine = FColor(50, 205, 153, 255); + inline static const FColor MediumBlue = FColor(50, 50, 205, 255); + inline static const FColor MediumForestGreen = FColor(107, 142, 35, 255); + inline static const FColor MediumGoldenrod = FColor(234, 234, 174, 255); + inline static const FColor MediumOrchid = FColor(147, 112, 219, 255); + inline static const FColor MediumSeaGreen = FColor(66, 111, 66, 255); + inline static const FColor MediumSlateBlue = FColor(127, 0, 255, 255); + inline static const FColor MediumSpringGreen = FColor(127, 255, 0, 255); + inline static const FColor MediumTurquoise = FColor(112, 219, 219, 255); + inline static const FColor MediumVioletRed = FColor(219, 112, 147, 255); + inline static const FColor MediumWood = FColor(166, 128, 100, 255); + inline static const FColor MidnightBlue = FColor(47, 47, 79, 255); + inline static const FColor NavyBlue = FColor(35, 35, 142, 255); + inline static const FColor NeonBlue = FColor(77, 77, 255, 255); + inline static const FColor NeonPink = FColor(255, 110, 199, 255); + inline static const FColor NewMidnightBlue = FColor(0, 0, 156, 255); + inline static const FColor NewTan = FColor(235, 199, 158, 255); + inline static const FColor OldGold = FColor(207, 181, 59, 255); + inline static const FColor Orange = FColor(255, 127, 0, 255); + inline static const FColor OrangeRed = FColor(255, 36, 0, 255); + inline static const FColor Orchid = FColor(219, 112, 219, 255); + inline static const FColor PaleGreen = FColor(143, 188, 143, 255); + inline static const FColor Pink = FColor(188, 143, 143, 255); + inline static const FColor Plum = FColor(234, 173, 234, 255); + inline static const FColor Quartz = FColor(217, 217, 243, 255); + inline static const FColor RichBlue = FColor(89, 89, 171, 255); + inline static const FColor Salmon = FColor(111, 66, 66, 255); + inline static const FColor Scarlet = FColor(140, 23, 23, 255); + inline static const FColor SeaGreen = FColor(35, 142, 104, 255); + inline static const FColor SemiSweetChocolate = FColor(107, 66, 38, 255); + inline static const FColor Sienna = FColor(142, 107, 35, 255); + inline static const FColor Silver = FColor(230, 232, 250, 255); + inline static const FColor SkyBlue = FColor(50, 153, 204, 255); + inline static const FColor SlateBlue = FColor(0, 127, 255, 255); + inline static const FColor SpicyPink = FColor(255, 28, 174, 255); + inline static const FColor SpringGreen = FColor(0, 255, 127, 255); + inline static const FColor SteelBlue = FColor(35, 107, 142, 255); + inline static const FColor SummerSky = FColor(56, 176, 222, 255); + inline static const FColor Tan = FColor(219, 147, 112, 255); + inline static const FColor Thistle = FColor(216, 191, 216, 255); + inline static const FColor Turquoise = FColor(173, 234, 234, 255); + inline static const FColor VeryDarkBrown = FColor(92, 64, 51, 255); + inline static const FColor VeryLightGrey = FColor(205, 205, 205, 255); + inline static const FColor Violet = FColor(79, 47, 79, 255); + inline static const FColor VioletRed = FColor(204, 50, 153, 255); + inline static const FColor Wheat = FColor(216, 216, 191, 255); + inline static const FColor YellowGreen = FColor(153, 204, 50, 255); +}; diff --git a/version/Core/Public/API/UE/Math/IntPoint.h b/version/Core/Public/API/UE/Math/IntPoint.h new file mode 100644 index 0000000..3c219d0 --- /dev/null +++ b/version/Core/Public/API/UE/Math/IntPoint.h @@ -0,0 +1,472 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "../Containers/FString.h" + +/** + * Structure for integer points in 2-d space. + * + * @todo Docs: The operators need better documentation, i.e. what does it mean to divide a point? + */ +struct FIntPoint +{ + /** Holds the point's x-coordinate. */ + int32 X; + + /** Holds the point's y-coordinate. */ + int32 Y; + +public: + + /** An integer point with zeroed values. */ + static const FIntPoint ZeroValue; + + /** An integer point with INDEX_NONE values. */ + static const FIntPoint NoneValue; + +public: + + /** Default constructor (no initialization). */ + FIntPoint(); + + /** + * Create and initialize a new instance with the specified coordinates. + * + * @param InX The x-coordinate. + * @param InY The y-coordinate. + */ + FIntPoint(int32 InX, int32 InY); + + /** + * Create and initialize a new instance to zero. + * + * @param EForceInit Force init enum + */ + explicit FORCEINLINE FIntPoint(EForceInit); + +public: + + /** + * Get specific component of a point. + * + * @param PointIndex Index of point component. + * @return const reference to component. + */ + const int32& operator()(int32 PointIndex) const; + + /** + * Get specific component of a point. + * + * @param PointIndex Index of point component + * @return reference to component. + */ + int32& operator()(int32 PointIndex); + + /** + * Compare two points for equality. + * + * @param Other The other int point being compared. + * @return true if the points are equal, false otherwise. + */ + bool operator==(const FIntPoint& Other) const; + + /** + * Compare two points for inequality. + * + * @param Other The other int point being compared. + * @return true if the points are not equal, false otherwise. + */ + bool operator!=(const FIntPoint& Other) const; + + /** + * Scale this point. + * + * @param Scale What to multiply the point by. + * @return Reference to this point after multiplication. + */ + FIntPoint& operator*=(int32 Scale); + + /** + * Divide this point by a scalar. + * + * @param Divisor What to divide the point by. + * @return Reference to this point after division. + */ + FIntPoint& operator/=(int32 Divisor); + + /** + * Add another point component-wise to this point. + * + * @param Other The point to add to this point. + * @return Reference to this point after addition. + */ + FIntPoint& operator+=(const FIntPoint& Other); + + /** + * Subtract another point component-wise from this point. + * + * @param Other The point to subtract from this point. + * @return Reference to this point after subtraction. + */ + FIntPoint& operator-=(const FIntPoint& Other); + + /** + * Divide this point component-wise by another point. + * + * @param Other The point to divide with. + * @return Reference to this point after division. + */ + FIntPoint& operator/=(const FIntPoint& Other); + + /** + * Assign another point to this one. + * + * @param Other The point to assign this point from. + * @return Reference to this point after assignment. + */ + FIntPoint& operator=(const FIntPoint& Other); + + /** + * Get the result of scaling on this point. + * + * @param Scale What to multiply the point by. + * @return A new scaled int point. + */ + FIntPoint operator*(int32 Scale) const; + + /** + * Get the result of division on this point. + * + * @param Divisor What to divide the point by. + * @return A new divided int point. + */ + FIntPoint operator/(int32 Divisor) const; + + /** + * Get the result of addition on this point. + * + * @param Other The other point to add to this. + * @return A new combined int point. + */ + FIntPoint operator+(const FIntPoint& Other) const; + + /** + * Get the result of subtraction from this point. + * + * @param Other The other point to subtract from this. + * @return A new subtracted int point. + */ + FIntPoint operator-(const FIntPoint& Other) const; + + /** + * Get the result of division on this point. + * + * @param Other The other point to subtract from this. + * @return A new subtracted int point. + */ + FIntPoint operator/(const FIntPoint& Other) const; + + /** + * Get specific component of the point. + * + * @param Index the index of point component + * @return reference to component. + */ + int32& operator[](int32 Index); + + /** + * Get specific component of the point. + * + * @param Index the index of point component + * @return copy of component value. + */ + int32 operator[](int32 Index) const; + +public: + + /** + * Get the component-wise min of two points. + * + * @see ComponentMax, GetMax + */ + FORCEINLINE FIntPoint ComponentMin(const FIntPoint& Other) const; + + /** + * Get the component-wise max of two points. + * + * @see ComponentMin, GetMin + */ + FORCEINLINE FIntPoint ComponentMax(const FIntPoint& Other) const; + + /** + * Get the larger of the point's two components. + * + * @return The maximum component of the point. + * @see GetMin, Size, SizeSquared + */ + int32 GetMax() const; + + /** + * Get the smaller of the point's two components. + * + * @return The minimum component of the point. + * @see GetMax, Size, SizeSquared + */ + int32 GetMin() const; + + /** + * Get the distance of this point from (0,0). + * + * @return The distance of this point from (0,0). + * @see GetMax, GetMin, SizeSquared + */ + int32 Size() const; + + /** + * Get the squared distance of this point from (0,0). + * + * @return The squared distance of this point from (0,0). + * @see GetMax, GetMin, Size + */ + int32 SizeSquared() const; + + /** + * Get a textual representation of this point. + * + * @return A string describing the point. + */ + FString ToString() const; + +public: + + /** + * Divide an int point and round up the result. + * + * @param lhs The int point being divided. + * @param Divisor What to divide the int point by. + * @return A new divided int point. + * @see DivideAndRoundDown + */ + static FIntPoint DivideAndRoundUp(FIntPoint lhs, int32 Divisor); + static FIntPoint DivideAndRoundUp(FIntPoint lhs, FIntPoint Divisor); + + /** + * Divide an int point and round down the result. + * + * @param lhs The int point being divided. + * @param Divisor What to divide the int point by. + * @return A new divided int point. + * @see DivideAndRoundUp + */ + static FIntPoint DivideAndRoundDown(FIntPoint lhs, int32 Divisor); + + /** + * Get number of components point has. + * + * @return number of components point has. + */ + static int32 Num(); +}; + + +/* FIntPoint inline functions + *****************************************************************************/ + +FORCEINLINE FIntPoint::FIntPoint() { } + + +FORCEINLINE FIntPoint::FIntPoint(int32 InX, int32 InY) + : X(InX) + , Y(InY) +{ } + + +FORCEINLINE FIntPoint::FIntPoint(EForceInit) + : X(0) + , Y(0) +{ } + + +FORCEINLINE const int32& FIntPoint::operator()(int32 PointIndex) const +{ + return (&X)[PointIndex]; +} + + +FORCEINLINE int32& FIntPoint::operator()(int32 PointIndex) +{ + return (&X)[PointIndex]; +} + + +FORCEINLINE int32 FIntPoint::Num() +{ + return 2; +} + + +FORCEINLINE bool FIntPoint::operator==(const FIntPoint& Other) const +{ + return X==Other.X && Y==Other.Y; +} + + +FORCEINLINE bool FIntPoint::operator!=(const FIntPoint& Other) const +{ + return (X != Other.X) || (Y != Other.Y); +} + + +FORCEINLINE FIntPoint& FIntPoint::operator*=(int32 Scale) +{ + X *= Scale; + Y *= Scale; + + return *this; +} + + +FORCEINLINE FIntPoint& FIntPoint::operator/=(int32 Divisor) +{ + X /= Divisor; + Y /= Divisor; + + return *this; +} + + +FORCEINLINE FIntPoint& FIntPoint::operator+=(const FIntPoint& Other) +{ + X += Other.X; + Y += Other.Y; + + return *this; +} + + +FORCEINLINE FIntPoint& FIntPoint::operator-=(const FIntPoint& Other) +{ + X -= Other.X; + Y -= Other.Y; + + return *this; +} + + +FORCEINLINE FIntPoint& FIntPoint::operator/=(const FIntPoint& Other) +{ + X /= Other.X; + Y /= Other.Y; + + return *this; +} + + +FORCEINLINE FIntPoint& FIntPoint::operator=(const FIntPoint& Other) +{ + X = Other.X; + Y = Other.Y; + + return *this; +} + + +FORCEINLINE FIntPoint FIntPoint::operator*(int32 Scale) const +{ + return FIntPoint(*this) *= Scale; +} + + +FORCEINLINE FIntPoint FIntPoint::operator/(int32 Divisor) const +{ + return FIntPoint(*this) /= Divisor; +} + + +FORCEINLINE int32& FIntPoint::operator[](int32 Index) +{ + check(Index >= 0 && Index < 2); + return ((Index == 0) ? X : Y); +} + + +FORCEINLINE int32 FIntPoint::operator[](int32 Index) const +{ + check(Index >= 0 && Index < 2); + return ((Index == 0) ? X : Y); +} + + +FORCEINLINE FIntPoint FIntPoint::ComponentMin(const FIntPoint& Other) const +{ + return FIntPoint(FMath::Min(X, Other.X), FMath::Min(Y, Other.Y)); +} + + +FORCEINLINE FIntPoint FIntPoint::ComponentMax(const FIntPoint& Other) const +{ + return FIntPoint(FMath::Max(X, Other.X), FMath::Max(Y, Other.Y)); +} + +FORCEINLINE FIntPoint FIntPoint::DivideAndRoundUp(FIntPoint lhs, int32 Divisor) +{ + return FIntPoint(FMath::DivideAndRoundUp(lhs.X, Divisor), FMath::DivideAndRoundUp(lhs.Y, Divisor)); +} + +FORCEINLINE FIntPoint FIntPoint::DivideAndRoundUp(FIntPoint lhs, FIntPoint Divisor) +{ + return FIntPoint(FMath::DivideAndRoundUp(lhs.X, Divisor.X), FMath::DivideAndRoundUp(lhs.Y, Divisor.Y)); +} + +FORCEINLINE FIntPoint FIntPoint::DivideAndRoundDown(FIntPoint lhs, int32 Divisor) +{ + return FIntPoint(FMath::DivideAndRoundDown(lhs.X, Divisor), FMath::DivideAndRoundDown(lhs.Y, Divisor)); +} + + +FORCEINLINE FIntPoint FIntPoint::operator+(const FIntPoint& Other) const +{ + return FIntPoint(*this) += Other; +} + + +FORCEINLINE FIntPoint FIntPoint::operator-(const FIntPoint& Other) const +{ + return FIntPoint(*this) -= Other; +} + + +FORCEINLINE FIntPoint FIntPoint::operator/(const FIntPoint& Other) const +{ + return FIntPoint(*this) /= Other; +} + + +FORCEINLINE int32 FIntPoint::GetMax() const +{ + return FMath::Max(X, Y); +} + + +FORCEINLINE int32 FIntPoint::GetMin() const +{ + return FMath::Min(X,Y); +} + + +FORCEINLINE int32 FIntPoint::Size() const +{ + int64 X64 = (int64)X; + int64 Y64 = (int64)Y; + return int32(FMath::Sqrt(float(X64 * X64 + Y64 * Y64))); +} + +FORCEINLINE int32 FIntPoint::SizeSquared() const +{ + return X*X + Y*Y; +} + +template <> struct TIsPODType { enum { Value = true }; }; diff --git a/version/Core/Public/API/UE/Math/IntVector.h b/version/Core/Public/API/UE/Math/IntVector.h new file mode 100644 index 0000000..3220b9c --- /dev/null +++ b/version/Core/Public/API/UE/Math/IntVector.h @@ -0,0 +1,530 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" + +struct FVector; + +#pragma warning(push) +#pragma warning(disable : 4244) + +/** + * Structure for integer vectors in 3-d space. + */ +struct FIntVector +{ + /** Holds the point's x-coordinate. */ + int32 X; + + /** Holds the point's y-coordinate. */ + int32 Y; + + /** Holds the point's z-coordinate. */ + int32 Z; + +public: + + /** An int point with zeroed values. */ + static const FIntVector ZeroValue; + + /** An int point with INDEX_NONE values. */ + static const FIntVector NoneValue; + +public: + + /** + * Default constructor (no initialization). + */ + FIntVector(); + + /** + * Creates and initializes a new instance with the specified coordinates. + * + * @param InX The x-coordinate. + * @param InY The y-coordinate. + * @param InZ The z-coordinate. + */ + FIntVector( int32 InX, int32 InY, int32 InZ ); + + /** + * Constructor + * + * @param InValue replicated to all components + */ + explicit FIntVector( int32 InValue ); + + /** + * Constructor + * + * @param InVector float vector converted to int + */ + explicit FIntVector( FVector InVector ); + + /** + * Constructor + * + * @param EForceInit Force init enum + */ + explicit FORCEINLINE FIntVector( EForceInit ); + +public: + + /** + * Gets specific component of a point. + * + * @param ComponentIndex Index of point component. + * @return const reference to component. + */ + const int32& operator()( int32 ComponentIndex ) const; + + /** + * Gets specific component of a point. + * + * @param ComponentIndex Index of point component. + * @return reference to component. + */ + int32& operator()( int32 ComponentIndex ); + + /** + * Gets specific component of a point. + * + * @param ComponentIndex Index of point component. + * @return const reference to component. + */ + const int32& operator[]( int32 ComponentIndex ) const; + + /** + * Gets specific component of a point. + * + * @param ComponentIndex Index of point component. + * @return reference to component. + */ + int32& operator[]( int32 ComponentIndex ); + + /** + * Compares points for equality. + * + * @param Other The other int point being compared. + * @return true if the points are equal, false otherwise.. + */ + bool operator==( const FIntVector& Other ) const; + + /** + * Compares points for inequality. + * + * @param Other The other int point being compared. + * @return true if the points are not equal, false otherwise.. + */ + bool operator!=( const FIntVector& Other ) const; + + /** + * Scales this point. + * + * @param Scale What to multiply the point by. + * @return Reference to this point after multiplication. + */ + FIntVector& operator*=( int32 Scale ); + + /** + * Divides this point. + * + * @param Divisor What to divide the point by. + * @return Reference to this point after division. + */ + FIntVector& operator/=( int32 Divisor ); + + /** + * Adds to this point. + * + * @param Other The point to add to this point. + * @return Reference to this point after addition. + */ + FIntVector& operator+=( const FIntVector& Other ); + + /** + * Subtracts from this point. + * + * @param Other The point to subtract from this point. + * @return Reference to this point after subtraction. + */ + FIntVector& operator-=( const FIntVector& Other ); + + /** + * Assigns another point to this one. + * + * @param Other The point to assign this point from. + * @return Reference to this point after assignment. + */ + FIntVector& operator=( const FIntVector& Other ); + + /** + * Gets the result of scaling on this point. + * + * @param Scale What to multiply the point by. + * @return A new scaled int point. + */ + FIntVector operator*( int32 Scale ) const; + + /** + * Gets the result of division on this point. + * + * @param Divisor What to divide the point by. + * @return A new divided int point. + */ + FIntVector operator/( int32 Divisor ) const; + + /** + * Gets the result of addition on this point. + * + * @param Other The other point to add to this. + * @return A new combined int point. + */ + FIntVector operator+( const FIntVector& Other ) const; + + /** + * Gets the result of subtraction from this point. + * + * @param Other The other point to subtract from this. + * @return A new subtracted int point. + */ + FIntVector operator-( const FIntVector& Other ) const; + + /** + * Is vector equal to zero. + * @return is zero + */ + bool IsZero() const; + +public: + + /** + * Gets the maximum value in the point. + * + * @return The maximum value in the point. + */ + float GetMax() const; + + /** + * Gets the minimum value in the point. + * + * @return The minimum value in the point. + */ + float GetMin() const; + + /** + * Gets the distance of this point from (0,0,0). + * + * @return The distance of this point from (0,0,0). + */ + int32 Size() const; + +public: + + /** + * Divide an int point and round up the result. + * + * @param lhs The int point being divided. + * @param Divisor What to divide the int point by. + * @return A new divided int point. + */ + static FIntVector DivideAndRoundUp( FIntVector lhs, int32 Divisor ); + + /** + * Gets the number of components a point has. + * + * @return Number of components point has. + */ + static int32 Num(); +}; + + +/* FIntVector inline functions + *****************************************************************************/ + +FORCEINLINE FIntVector::FIntVector() +{ } + + +FORCEINLINE FIntVector::FIntVector( int32 InX, int32 InY, int32 InZ ) + : X(InX) + , Y(InY) + , Z(InZ) +{ } + + +FORCEINLINE FIntVector::FIntVector( int32 InValue ) + : X(InValue) + , Y(InValue) + , Z(InValue) +{ } + + +FORCEINLINE FIntVector::FIntVector( EForceInit ) + : X(0) + , Y(0) + , Z(0) +{ } + + +FORCEINLINE const int32& FIntVector::operator()( int32 ComponentIndex ) const +{ + return (&X)[ComponentIndex]; +} + + +FORCEINLINE int32& FIntVector::operator()( int32 ComponentIndex ) +{ + return (&X)[ComponentIndex]; +} + + +FORCEINLINE const int32& FIntVector::operator[]( int32 ComponentIndex ) const +{ + return (&X)[ComponentIndex]; +} + + +FORCEINLINE int32& FIntVector::operator[]( int32 ComponentIndex ) +{ + return (&X)[ComponentIndex]; +} + +FORCEINLINE bool FIntVector::operator==( const FIntVector& Other ) const +{ + return X==Other.X && Y==Other.Y && Z==Other.Z; +} + + +FORCEINLINE bool FIntVector::operator!=( const FIntVector& Other ) const +{ + return X!=Other.X || Y!=Other.Y || Z!=Other.Z; +} + + +FORCEINLINE FIntVector& FIntVector::operator*=( int32 Scale ) +{ + X *= Scale; + Y *= Scale; + Z *= Scale; + + return *this; +} + + +FORCEINLINE FIntVector& FIntVector::operator/=( int32 Divisor ) +{ + X /= Divisor; + Y /= Divisor; + Z /= Divisor; + + return *this; +} + + +FORCEINLINE FIntVector& FIntVector::operator+=( const FIntVector& Other ) +{ + X += Other.X; + Y += Other.Y; + Z += Other.Z; + + return *this; +} + + +FORCEINLINE FIntVector& FIntVector::operator-=( const FIntVector& Other ) +{ + X -= Other.X; + Y -= Other.Y; + Z -= Other.Z; + + return *this; +} + + +FORCEINLINE FIntVector& FIntVector::operator=( const FIntVector& Other ) +{ + X = Other.X; + Y = Other.Y; + Z = Other.Z; + + return *this; +} + + +FORCEINLINE FIntVector FIntVector::operator*( int32 Scale ) const +{ + return FIntVector(*this) *= Scale; +} + + +FORCEINLINE FIntVector FIntVector::operator/( int32 Divisor ) const +{ + return FIntVector(*this) /= Divisor; +} + + +FORCEINLINE FIntVector FIntVector::operator+( const FIntVector& Other ) const +{ + return FIntVector(*this) += Other; +} + +FORCEINLINE FIntVector FIntVector::operator-( const FIntVector& Other ) const +{ + return FIntVector(*this) -= Other; +} + + +FORCEINLINE FIntVector FIntVector::DivideAndRoundUp( FIntVector lhs, int32 Divisor ) +{ + return FIntVector(FMath::DivideAndRoundUp(lhs.X, Divisor), FMath::DivideAndRoundUp(lhs.Y, Divisor), FMath::DivideAndRoundUp(lhs.Z, Divisor)); +} + + +FORCEINLINE float FIntVector::GetMax() const +{ + return FMath::Max(FMath::Max(X, Y), Z); +} + + +FORCEINLINE float FIntVector::GetMin() const +{ + return FMath::Min(FMath::Min(X, Y), Z); +} + + +FORCEINLINE int32 FIntVector::Num() +{ + return 3; +} + + +FORCEINLINE int32 FIntVector::Size() const +{ + int64 X64 = (int64)X; + int64 Y64 = (int64)Y; + int64 Z64 = (int64)Z; + return int32(FMath::Sqrt(float(X64 * X64 + Y64 * Y64 + Z64 * Z64))); +} + +FORCEINLINE bool FIntVector::IsZero() const +{ + return *this == ZeroValue; +} + +struct FIntVector4 +{ + int32 X, Y, Z, W; + + FORCEINLINE FIntVector4() + { + } + + FORCEINLINE FIntVector4(int32 InX, int32 InY, int32 InZ, int32 InW) + : X(InX) + , Y(InY) + , Z(InZ) + , W(InW) + { + } + + FORCEINLINE explicit FIntVector4(int32 InValue) + : X(InValue) + , Y(InValue) + , Z(InValue) + , W(InValue) + { + } + + FORCEINLINE FIntVector4(EForceInit) + : X(0) + , Y(0) + , Z(0) + , W(0) + { + } + + FORCEINLINE const int32& operator[](int32 ComponentIndex) const + { + return (&X)[ComponentIndex]; + } + + + FORCEINLINE int32& operator[](int32 ComponentIndex) + { + return (&X)[ComponentIndex]; + } + + FORCEINLINE bool operator==(const FIntVector4& Other) const + { + return X==Other.X && Y==Other.Y && Z==Other.Z && W==Other.W; + } + + + FORCEINLINE bool operator!=(const FIntVector4& Other) const + { + return X!=Other.X || Y!=Other.Y || Z!=Other.Z || W!=Other.W; + } +}; + +struct FUintVector4 +{ + uint32 X, Y, Z, W; + + FORCEINLINE FUintVector4() + { + } + + FORCEINLINE FUintVector4(uint32 InX, uint32 InY, uint32 InZ, uint32 InW) + : X(InX) + , Y(InY) + , Z(InZ) + , W(InW) + { + } + + FORCEINLINE explicit FUintVector4(uint32 InValue) + : X(InValue) + , Y(InValue) + , Z(InValue) + , W(InValue) + { + } + + FORCEINLINE FUintVector4(EForceInit) + : X(0) + , Y(0) + , Z(0) + , W(0) + { + } + + FORCEINLINE const uint32& operator[](int32 ComponentIndex) const + { + return (&X)[ComponentIndex]; + } + + + FORCEINLINE uint32& operator[](int32 ComponentIndex) + { + return (&X)[ComponentIndex]; + } + + FORCEINLINE bool operator==(const FUintVector4& Other) const + { + return X==Other.X && Y==Other.Y && Z==Other.Z && W==Other.W; + } + + + FORCEINLINE bool operator!=(const FUintVector4& Other) const + { + return X!=Other.X || Y!=Other.Y || Z!=Other.Z || W!=Other.W; + } +}; + +#pragma warning(pop) + +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; +template <> struct TIsPODType { enum { Value = true }; }; diff --git a/version/Core/Public/API/UE/Math/Quat.h b/version/Core/Public/API/UE/Math/Quat.h new file mode 100644 index 0000000..f1b26f1 --- /dev/null +++ b/version/Core/Public/API/UE/Math/Quat.h @@ -0,0 +1,942 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "Vector.h" +#include "Rotator.h" + +/** + * Floating point quaternion that can represent a rotation about an axis in 3-D space. + * The X, Y, Z, W components also double as the Axis/Angle format. + * + * Order matters when composing quaternions: C = A * B will yield a quaternion C that logically + * first applies B then A to any subsequent transformation (right first, then left). + * Note that this is the opposite order of FTransform multiplication. + * + * Example: LocalToWorld = (LocalToWorld * DeltaRotation) will change rotation in local space by DeltaRotation. + * Example: LocalToWorld = (DeltaRotation * LocalToWorld) will change rotation in world space by DeltaRotation. + */ +MS_ALIGN(16) struct FQuat +{ +public: + + /** The quaternion's X-component. */ + float X; + + /** The quaternion's Y-component. */ + float Y; + + /** The quaternion's Z-component. */ + float Z; + + /** The quaternion's W-component. */ + float W; + +public: + + /** Identity quaternion. */ + static const FQuat Identity; + +public: + + /** Default constructor (no initialization). */ + FORCEINLINE FQuat() { } + + /** + * Creates and initializes a new quaternion, with the W component either 0 or 1. + * + * @param EForceInit Force init enum: if equal to ForceInitToZero then W is 0, otherwise W = 1 (creating an identity transform) + */ + explicit FORCEINLINE FQuat(EForceInit); + + /** + * Constructor. + * + * @param InX X component of the quaternion + * @param InY Y component of the quaternion + * @param InZ Z component of the quaternion + * @param InW W component of the quaternion + */ + FORCEINLINE FQuat(float InX, float InY, float InZ, float InW); + + /** + * Copy constructor. + * + * @param Q A FQuat object to use to create new quaternion from. + */ + FORCEINLINE FQuat(const FQuat& Q); + + /** + * Creates and initializes a new quaternion from the given rotator. + * + * @param R The rotator to initialize from. + */ + explicit FQuat(const FRotator& R); + + /** + * Creates and initializes a new quaternion from the a rotation around the given axis. + * + * @param Axis assumed to be a normalized vector + * @param Angle angle to rotate above the given axis (in radians) + */ + FQuat(FVector Axis, float AngleRad); + +public: + +#ifdef IMPLEMENT_ASSIGNMENT_OPERATOR_MANUALLY + /** + * Copy another FQuat into this one + * + * @return reference to this FQuat + */ + FORCEINLINE FQuat& operator=(const FQuat& Other); +#endif + + /** + * Gets the result of adding a Quaternion to this. + * This is a component-wise addition; composing quaternions should be done via multiplication. + * + * @param Q The Quaternion to add. + * @return The result of addition. + */ + FORCEINLINE FQuat operator+(const FQuat& Q) const; + + /** + * Adds to this quaternion. + * This is a component-wise addition; composing quaternions should be done via multiplication. + * + * @param Other The quaternion to add to this. + * @return Result after addition. + */ + FORCEINLINE FQuat operator+=(const FQuat& Q); + + /** + * Gets the result of subtracting a Quaternion to this. + * This is a component-wise subtraction; composing quaternions should be done via multiplication. + * + * @param Q The Quaternion to subtract. + * @return The result of subtraction. + */ + FORCEINLINE FQuat operator-(const FQuat& Q) const; + + /** + * Checks whether another Quaternion is equal to this, within specified tolerance. + * + * @param Q The other Quaternion. + * @param Tolerance Error tolerance for comparison with other Quaternion. + * @return true if two Quaternions are equal, within specified tolerance, otherwise false. + */ + FORCEINLINE bool Equals(const FQuat& Q, float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Checks whether this Quaternion is an Identity Quaternion. + * Assumes Quaternion tested is normalized. + * + * @param Tolerance Error tolerance for comparison with Identity Quaternion. + * @return true if Quaternion is a normalized Identity Quaternion. + */ + FORCEINLINE bool IsIdentity(float Tolerance=SMALL_NUMBER) const; + + /** + * Subtracts another quaternion from this. + * This is a component-wise subtraction; composing quaternions should be done via multiplication. + * + * @param Q The other quaternion. + * @return reference to this after subtraction. + */ + FORCEINLINE FQuat operator-=(const FQuat& Q); + + /** + * Rotate a vector by this quaternion. + * + * @param V the vector to be rotated + * @return vector after rotation + * @see RotateVector + */ + FVector operator*(const FVector& V) const; + + /** + * Multiply this quaternion by a scaling factor. + * + * @param Scale The scaling factor. + * @return a reference to this after scaling. + */ + FORCEINLINE FQuat operator*=(const float Scale); + + /** + * Get the result of scaling this quaternion. + * + * @param Scale The scaling factor. + * @return The result of scaling. + */ + FORCEINLINE FQuat operator*(const float Scale) const; + + /** + * Divide this quaternion by scale. + * + * @param Scale What to divide by. + * @return a reference to this after scaling. + */ + FORCEINLINE FQuat operator/=(const float Scale); + + /** + * Divide this quaternion by scale. + * + * @param Scale What to divide by. + * @return new Quaternion of this after division by scale. + */ + FORCEINLINE FQuat operator/(const float Scale) const; + + /** + * Checks whether two quaternions are identical. + * This is an exact comparison per-component;see Equals() for a comparison + * that allows for a small error tolerance and flipped axes of rotation. + * + * @param Q The other quaternion. + * @return true if two quaternion are identical, otherwise false. + * @see Equals + */ + bool operator==(const FQuat& Q) const; + + /** + * Checks whether two quaternions are not identical. + * + * @param Q The other quaternion. + * @return true if two quaternion are not identical, otherwise false. + */ + bool operator!=(const FQuat& Q) const; + + /** + * Calculates dot product of two quaternions. + * + * @param Q The other quaternions. + * @return The dot product. + */ + float operator|(const FQuat& Q) const; + +public: + + /** + * Convert a vector of floating-point Euler angles (in degrees) into a Quaternion. + * + * @param Euler the Euler angles + * @return constructed FQuat + */ + static FQuat MakeFromEuler(const FVector& Euler); + + /** Convert a Quaternion into floating-point Euler angles (in degrees). */ + FVector Euler() const; + + /** + * Normalize this quaternion if it is large enough. + * If it is too small, returns an identity quaternion. + * + * @param Tolerance Minimum squared length of quaternion for normalization. + */ + FORCEINLINE void Normalize(float Tolerance = SMALL_NUMBER); + + /** + * Get a normalized copy of this quaternion. + * If it is too small, returns an identity quaternion. + * + * @param Tolerance Minimum squared length of quaternion for normalization. + */ + FORCEINLINE FQuat GetNormalized(float Tolerance = SMALL_NUMBER) const; + + // Return true if this quaternion is normalized + bool IsNormalized() const; + + /** + * Get the length of this quaternion. + * + * @return The length of this quaternion. + */ + FORCEINLINE float Size() const; + + /** + * Get the length squared of this quaternion. + * + * @return The length of this quaternion. + */ + FORCEINLINE float SizeSquared() const; + + + /** Get the angle of this quaternion */ + FORCEINLINE float GetAngle() const; + + /** + * get the axis and angle of rotation of this quaternion + * + * @param Axis{out] vector of axis of the quaternion + * @param Angle{out] angle of the quaternion + * @warning : assumes normalized quaternions. + */ + void ToAxisAndAngle(FVector& Axis, float& Angle) const; + + /** + * Get the swing and twist decomposition for a specified axis + * + * @param InTwistAxis Axis to use for decomposition + * @param OutSwing swing component quaternion + * @param OutTwist Twist component quaternion + * @warning assumes normalised quaternion and twist axis + */ + void ToSwingTwist(const FVector& InTwistAxis, FQuat& OutSwing, FQuat& OutTwist) const; + + /** + * Rotate a vector by this quaternion. + * + * @param V the vector to be rotated + * @return vector after rotation + */ + FVector RotateVector(FVector V) const; + + /** + * Rotate a vector by the inverse of this quaternion. + * + * @param V the vector to be rotated + * @return vector after rotation by the inverse of this quaternion. + */ + FVector UnrotateVector(FVector V) const; + + /** + * @return quaternion with W=0 and V=theta*v. + */ + FQuat Log() const; + + /** + * @note Exp should really only be used after Log. + * Assumes a quaternion with W=0 and V=theta*v (where |v| = 1). + * Exp(q) = (sin(theta)*v, cos(theta)) + */ + FQuat Exp() const; + + /** + * @return inverse of this quaternion + */ + FORCEINLINE FQuat Inverse() const; + + /** + * Enforce that the delta between this Quaternion and another one represents + * the shortest possible rotation angle + */ + void EnforceShortestArcWith(const FQuat& OtherQuat); + + /** Get the forward direction (X axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetAxisX() const; + + /** Get the right direction (Y axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetAxisY() const; + + /** Get the up direction (Z axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetAxisZ() const; + + /** Get the forward direction (X axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetForwardVector() const; + + /** Get the right direction (Y axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetRightVector() const; + + /** Get the up direction (Z axis) after it has been rotated by this Quaternion. */ + FORCEINLINE FVector GetUpVector() const; + + /** Convert a rotation into a unit vector facing in its direction. Equivalent to GetForwardVector(). */ + FORCEINLINE FVector Vector() const; + + /** Get the FRotator representation of this Quaternion. */ + FRotator Rotator() const; + + /** + * Get the axis of rotation of the Quaternion. + * This is the axis around which rotation occurs to transform the canonical coordinate system to the target orientation. + * For the identity Quaternion which has no such rotation, FVector(1,0,0) is returned. + */ + FORCEINLINE FVector GetRotationAxis() const; + + /** Find the angular distance between two rotation quaternions (in radians) */ + FORCEINLINE float AngularDistance(const FQuat& Q) const; + + /** + * Utility to check if there are any non-finite values (NaN or Inf) in this Quat. + * + * @return true if there are any non-finite values in this Quaternion, otherwise false. + */ + bool ContainsNaN() const; + + /** + * Get a textual representation of the vector. + * + * @return Text describing the vector. + */ + FString ToString() const; + + /** + * Initialize this FQuat from a FString. + * The string is expected to contain X=, Y=, Z=, W=, otherwise + * this FQuat will have indeterminate (invalid) values. + * + * @param InSourceString FString containing the quaternion values. + * @return true if the FQuat was initialized; false otherwise. + */ + bool InitFromString(const FString& InSourceString); + +public: + +#if ENABLE_NAN_DIAGNOSTIC + FORCEINLINE void DiagnosticCheckNaN() const + { + if (ContainsNaN()) + { + logOrEnsureNanError(TEXT("FQuat contains NaN: %s"), *ToString()); + *const_cast(this) = FQuat::Identity; + } + } + + FORCEINLINE void DiagnosticCheckNaN(const TCHAR* Message) const + { + if (ContainsNaN()) + { + logOrEnsureNanError(TEXT("%s: FQuat contains NaN: %s"), Message, *ToString()); + *const_cast(this) = FQuat::Identity; + } + } +#else + FORCEINLINE void DiagnosticCheckNaN() const {} + FORCEINLINE void DiagnosticCheckNaN(const TCHAR* Message) const {} +#endif + +public: + + /** + * Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length. + */ + static FORCEINLINE FQuat FindBetween(const FVector& Vector1, const FVector& Vector2) + { + return FindBetweenVectors(Vector1, Vector2); + } + + /** + * Generates the 'smallest' (geodesic) rotation between two normals (assumed to be unit length). + */ + static FQuat FindBetweenNormals(const FVector& Normal1, const FVector& Normal2); + + /** + * Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length. + */ + static FQuat FindBetweenVectors(const FVector& Vector1, const FVector& Vector2); + + /** + * Error measure (angle) between two quaternions, ranged [0..1]. + * Returns the hypersphere-angle between two quaternions; alignment shouldn't matter, though + * @note normalized input is expected. + */ + static FORCEINLINE float Error(const FQuat& Q1, const FQuat& Q2); + + /** + * FQuat::Error with auto-normalization. + */ + static FORCEINLINE float ErrorAutoNormalize(const FQuat& A, const FQuat& B); + + /** + * Fast Linear Quaternion Interpolation. + * Result is NOT normalized. + */ + static FORCEINLINE FQuat FastLerp(const FQuat& A, const FQuat& B, const float Alpha); + + /** + * Bi-Linear Quaternion interpolation. + * Result is NOT normalized. + */ + static FORCEINLINE FQuat FastBilerp(const FQuat& P00, const FQuat& P10, const FQuat& P01, const FQuat& P11, float FracX, float FracY); + + + /** Spherical interpolation. Will correct alignment. Result is NOT normalized. */ + static FQuat Slerp_NotNormalized(const FQuat &Quat1, const FQuat &Quat2, float Slerp); + + /** Spherical interpolation. Will correct alignment. Result is normalized. */ + static FORCEINLINE FQuat Slerp(const FQuat &Quat1, const FQuat &Quat2, float Slerp) + { + return Slerp_NotNormalized(Quat1, Quat2, Slerp).GetNormalized(); + } + + /** + * Simpler Slerp that doesn't do any checks for 'shortest distance' etc. + * We need this for the cubic interpolation stuff so that the multiple Slerps dont go in different directions. + * Result is NOT normalized. + */ + static FQuat SlerpFullPath_NotNormalized(const FQuat &quat1, const FQuat &quat2, float Alpha); + + /** + * Simpler Slerp that doesn't do any checks for 'shortest distance' etc. + * We need this for the cubic interpolation stuff so that the multiple Slerps dont go in different directions. + * Result is normalized. + */ + static FORCEINLINE FQuat SlerpFullPath(const FQuat &quat1, const FQuat &quat2, float Alpha) + { + return SlerpFullPath_NotNormalized(quat1, quat2, Alpha).GetNormalized(); + } + + /** + * Given start and end quaternions of quat1 and quat2, and tangents at those points tang1 and tang2, calculate the point at Alpha (between 0 and 1) between them. Result is normalized. + * This will correct alignment by ensuring that the shortest path is taken. + */ + static FQuat Squad(const FQuat& quat1, const FQuat& tang1, const FQuat& quat2, const FQuat& tang2, float Alpha); + + /** + * Simpler Squad that doesn't do any checks for 'shortest distance' etc. + * Given start and end quaternions of quat1 and quat2, and tangents at those points tang1 and tang2, calculate the point at Alpha (between 0 and 1) between them. Result is normalized. + */ + static FQuat SquadFullPath(const FQuat& quat1, const FQuat& tang1, const FQuat& quat2, const FQuat& tang2, float Alpha); + + /** + * Calculate tangents between given points + * + * @param PrevP quaternion at P-1 + * @param P quaternion to return the tangent + * @param NextP quaternion P+1 + * @param Tension @todo document + * @param OutTan Out control point + */ + static void CalcTangents(const FQuat& PrevP, const FQuat& P, const FQuat& NextP, float Tension, FQuat& OutTan); + +} GCC_ALIGN(16); + + +/* FQuat inline functions + *****************************************************************************/ + +FORCEINLINE FQuat::FQuat(const FRotator& R) +{ + *this = R.Quaternion(); + DiagnosticCheckNaN(); +} + + +FORCEINLINE FVector FQuat::operator*(const FVector& V) const +{ + return RotateVector(V); +} + +/* FQuat inline functions + *****************************************************************************/ + +FORCEINLINE FQuat::FQuat(EForceInit ZeroOrNot) + : X(0), Y(0), Z(0), W(ZeroOrNot == ForceInitToZero ? 0.0f : 1.0f) +{ } + + +FORCEINLINE FQuat::FQuat(float InX, float InY, float InZ, float InW) + : X(InX) + , Y(InY) + , Z(InZ) + , W(InW) +{ + DiagnosticCheckNaN(); +} + + +FORCEINLINE FQuat::FQuat(const FQuat& Q) + : X(Q.X) + , Y(Q.Y) + , Z(Q.Z) + , W(Q.W) +{ } + +#ifdef IMPLEMENT_ASSIGNMENT_OPERATOR_MANUALLY +FORCEINLINE FQuat& FQuat::operator=(const FQuat& Other) +{ + this->X = Other.X; + this->Y = Other.Y; + this->Z = Other.Z; + this->W = Other.W; + + return *this; +} +#endif + + +FORCEINLINE FQuat::FQuat(FVector Axis, float AngleRad) +{ + const float half_a = 0.5f * AngleRad; + float s, c; + FMath::SinCos(&s, &c, half_a); + + X = s * Axis.X; + Y = s * Axis.Y; + Z = s * Axis.Z; + W = c; + + DiagnosticCheckNaN(); +} + + +FORCEINLINE FQuat FQuat::operator+(const FQuat& Q) const +{ + return FQuat(X + Q.X, Y + Q.Y, Z + Q.Z, W + Q.W); +} + + +FORCEINLINE FQuat FQuat::operator+=(const FQuat& Q) +{ + this->X += Q.X; + this->Y += Q.Y; + this->Z += Q.Z; + this->W += Q.W; + + DiagnosticCheckNaN(); + + return *this; +} + + +FORCEINLINE FQuat FQuat::operator-(const FQuat& Q) const +{ + return FQuat(X - Q.X, Y - Q.Y, Z - Q.Z, W - Q.W); +} + + +FORCEINLINE bool FQuat::Equals(const FQuat& Q, float Tolerance) const +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister ToleranceV = VectorLoadFloat1(&Tolerance); + const VectorRegister A = VectorLoadAligned(this); + const VectorRegister B = VectorLoadAligned(&Q); + + const VectorRegister RotationSub = VectorAbs(VectorSubtract(A, B)); + const VectorRegister RotationAdd = VectorAbs(VectorAdd(A, B)); + return !VectorAnyGreaterThan(RotationSub, ToleranceV) || !VectorAnyGreaterThan(RotationAdd, ToleranceV); +#else + return (FMath::Abs(X - Q.X) <= Tolerance && FMath::Abs(Y - Q.Y) <= Tolerance && FMath::Abs(Z - Q.Z) <= Tolerance && FMath::Abs(W - Q.W) <= Tolerance) + || (FMath::Abs(X + Q.X) <= Tolerance && FMath::Abs(Y + Q.Y) <= Tolerance && FMath::Abs(Z + Q.Z) <= Tolerance && FMath::Abs(W + Q.W) <= Tolerance); +#endif // PLATFORM_ENABLE_VECTORINTRINSICS +} + +FORCEINLINE bool FQuat::IsIdentity(float Tolerance) const +{ + return Equals(FQuat::Identity, Tolerance); +} + +FORCEINLINE FQuat FQuat::operator-=(const FQuat& Q) +{ + this->X -= Q.X; + this->Y -= Q.Y; + this->Z -= Q.Z; + this->W -= Q.W; + + DiagnosticCheckNaN(); + + return *this; +} + + +FORCEINLINE FQuat FQuat::operator*=(const float Scale) +{ + X *= Scale; + Y *= Scale; + Z *= Scale; + W *= Scale; + + DiagnosticCheckNaN(); + + return *this; +} + + +FORCEINLINE FQuat FQuat::operator*(const float Scale) const +{ + return FQuat(Scale * X, Scale * Y, Scale * Z, Scale * W); +} + + +FORCEINLINE FQuat FQuat::operator/=(const float Scale) +{ + const float Recip = 1.0f / Scale; + X *= Recip; + Y *= Recip; + Z *= Recip; + W *= Recip; + + DiagnosticCheckNaN(); + + return *this; +} + + +FORCEINLINE FQuat FQuat::operator/(const float Scale) const +{ + const float Recip = 1.0f / Scale; + return FQuat(X * Recip, Y * Recip, Z * Recip, W * Recip); +} + + +FORCEINLINE bool FQuat::operator==(const FQuat& Q) const +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister A = VectorLoadAligned(this); + const VectorRegister B = VectorLoadAligned(&Q); + return VectorMaskBits(VectorCompareEQ(A, B)) == 0x0F; +#else + return X == Q.X && Y == Q.Y && Z == Q.Z && W == Q.W; +#endif // PLATFORM_ENABLE_VECTORINTRINSICS +} + + +FORCEINLINE bool FQuat::operator!=(const FQuat& Q) const +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister A = VectorLoadAligned(this); + const VectorRegister B = VectorLoadAligned(&Q); + return VectorMaskBits(VectorCompareNE(A, B)) != 0x00; +#else + return X != Q.X || Y != Q.Y || Z != Q.Z || W != Q.W; +#endif // PLATFORM_ENABLE_VECTORINTRINSICS +} + + +FORCEINLINE float FQuat::operator|(const FQuat& Q) const +{ + return X * Q.X + Y * Q.Y + Z * Q.Z + W * Q.W; +} + + +FORCEINLINE void FQuat::Normalize(float Tolerance) +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister Vector = VectorLoadAligned(this); + + const VectorRegister SquareSum = VectorDot4(Vector, Vector); + const VectorRegister NonZeroMask = VectorCompareGE(SquareSum, VectorLoadFloat1(&Tolerance)); + const VectorRegister InvLength = VectorReciprocalSqrtAccurate(SquareSum); + const VectorRegister NormalizedVector = VectorMultiply(InvLength, Vector); + VectorRegister Result = VectorSelect(NonZeroMask, NormalizedVector, GlobalVectorConstants::Float0001); + + VectorStoreAligned(Result, this); +#else + const float SquareSum = X * X + Y * Y + Z * Z + W * W; + + if (SquareSum >= Tolerance) + { + const float Scale = FMath::InvSqrt(SquareSum); + + X *= Scale; + Y *= Scale; + Z *= Scale; + W *= Scale; + } + else + { + *this = FQuat::Identity; + } +#endif // PLATFORM_ENABLE_VECTORINTRINSICS +} + + +FORCEINLINE FQuat FQuat::GetNormalized(float Tolerance) const +{ + FQuat Result(*this); + Result.Normalize(Tolerance); + return Result; +} + +FORCEINLINE bool FQuat::IsNormalized() const +{ + return (FMath::Abs(1.f - SizeSquared()) < THRESH_QUAT_NORMALIZED); +} + + +FORCEINLINE float FQuat::Size() const +{ + return FMath::Sqrt(X * X + Y * Y + Z * Z + W * W); +} + + +FORCEINLINE float FQuat::SizeSquared() const +{ + return (X * X + Y * Y + Z * Z + W * W); +} + +FORCEINLINE float FQuat::GetAngle() const +{ + return 2.f * FMath::Acos(W); +} + + +FORCEINLINE void FQuat::ToAxisAndAngle(FVector& Axis, float& Angle) const +{ + Angle = GetAngle(); + Axis = GetRotationAxis(); +} + +FORCEINLINE FVector FQuat::GetRotationAxis() const +{ + // Ensure we never try to sqrt a neg number + const float S = FMath::Sqrt(FMath::Max(1.f - (W * W), 0.f)); + + if (S >= 0.0001f) + { + return FVector(X / S, Y / S, Z / S); + } + + return FVector(1.f, 0.f, 0.f); +} + +float FQuat::AngularDistance(const FQuat& Q) const +{ + float InnerProd = X*Q.X + Y*Q.Y + Z*Q.Z + W*Q.W; + return FMath::Acos((2 * InnerProd * InnerProd) - 1.f); +} + + +FORCEINLINE FVector FQuat::RotateVector(FVector V) const +{ +#if WITH_DIRECTXMATH + FVector Result; + VectorQuaternionVector3Rotate(&Result, &V, this); + return Result; + +#else + + // http://people.csail.mit.edu/bkph/articles/Quaternions.pdf + // V' = V + 2w(Q x V) + (2Q x (Q x V)) + // refactor: + // V' = V + w(2(Q x V)) + (Q x (2(Q x V))) + // T = 2(Q x V); + // V' = V + w*(T) + (Q x T) + + const FVector Q(X, Y, Z); + const FVector T = 2.f * FVector::CrossProduct(Q, V); + const FVector Result = V + (W * T) + FVector::CrossProduct(Q, T); + return Result; +#endif +} + +FORCEINLINE FVector FQuat::UnrotateVector(FVector V) const +{ +#if WITH_DIRECTXMATH + FVector Result; + VectorQuaternionVector3InverseRotate(&Result, &V, this); + return Result; +#else + //return Inverse().RotateVector(V); + + const FVector Q(-X, -Y, -Z); // Inverse + const FVector T = 2.f * FVector::CrossProduct(Q, V); + const FVector Result = V + (W * T) + FVector::CrossProduct(Q, T); + return Result; +#endif +} + + +FORCEINLINE FQuat FQuat::Inverse() const +{ + checkSlow(IsNormalized()); + + return FQuat(-X, -Y, -Z, W); +} + + +FORCEINLINE void FQuat::EnforceShortestArcWith(const FQuat& OtherQuat) +{ + const float DotResult = (OtherQuat | *this); + const float Bias = FMath::FloatSelect(DotResult, 1.0f, -1.0f); + + X *= Bias; + Y *= Bias; + Z *= Bias; + W *= Bias; +} + + +FORCEINLINE FVector FQuat::GetAxisX() const +{ + return RotateVector(FVector(1.f, 0.f, 0.f)); +} + + +FORCEINLINE FVector FQuat::GetAxisY() const +{ + return RotateVector(FVector(0.f, 1.f, 0.f)); +} + + +FORCEINLINE FVector FQuat::GetAxisZ() const +{ + return RotateVector(FVector(0.f, 0.f, 1.f)); +} + + +FORCEINLINE FVector FQuat::GetForwardVector() const +{ + return GetAxisX(); +} + +FORCEINLINE FVector FQuat::GetRightVector() const +{ + return GetAxisY(); +} + +FORCEINLINE FVector FQuat::GetUpVector() const +{ + return GetAxisZ(); +} + +FORCEINLINE FVector FQuat::Vector() const +{ + return GetAxisX(); +} + + +FORCEINLINE float FQuat::Error(const FQuat& Q1, const FQuat& Q2) +{ + const float cosom = FMath::Abs(Q1.X * Q2.X + Q1.Y * Q2.Y + Q1.Z * Q2.Z + Q1.W * Q2.W); + return (FMath::Abs(cosom) < 0.9999999f) ? FMath::Acos(cosom)*(1.f / PI) : 0.0f; +} + + +FORCEINLINE float FQuat::ErrorAutoNormalize(const FQuat& A, const FQuat& B) +{ + FQuat Q1 = A; + Q1.Normalize(); + + FQuat Q2 = B; + Q2.Normalize(); + + return FQuat::Error(Q1, Q2); +} + +/** + * Fast Linear Quaternion Interpolation. + * Result is NOT normalized. + */ +FORCEINLINE FQuat FQuat::FastLerp(const FQuat& A, const FQuat& B, const float Alpha) +{ + // To ensure the 'shortest route', we make sure the dot product between the both rotations is positive. + const float DotResult = (A | B); + const float Bias = FMath::FloatSelect(DotResult, 1.0f, -1.0f); + return (B * Alpha) + (A * (Bias * (1.f - Alpha))); +} + + +FORCEINLINE FQuat FQuat::FastBilerp(const FQuat& P00, const FQuat& P10, const FQuat& P01, const FQuat& P11, float FracX, float FracY) +{ + return FQuat::FastLerp( + FQuat::FastLerp(P00,P10,FracX), + FQuat::FastLerp(P01,P11,FracX), + FracY + ); +} + + +FORCEINLINE bool FQuat::ContainsNaN() const +{ + return (!FMath::IsFinite(X) || + !FMath::IsFinite(Y) || + !FMath::IsFinite(Z) || + !FMath::IsFinite(W) + ); +} + +template<> struct TIsPODType { enum { Value = true }; }; + diff --git a/version/Core/Public/API/UE/Math/Rotator.h b/version/Core/Public/API/UE/Math/Rotator.h new file mode 100644 index 0000000..42cff3f --- /dev/null +++ b/version/Core/Public/API/UE/Math/Rotator.h @@ -0,0 +1,587 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "Vector.h" + +/** + * Implements a container for rotation information. + * + * All rotation values are stored in degrees. + */ +struct FRotator +{ +public: + /** Rotation around the right axis (around Y axis), Looking up and down (0=Straight Ahead, +Up, -Down) */ + float Pitch; + + /** Rotation around the up axis (around Z axis), Running in circles 0=East, +North, -South. */ + float Yaw; + + /** Rotation around the forward axis (around X axis), Tilting your head, 0=Straight, +Clockwise, -CCW. */ + float Roll; + +public: + + /** A rotator of zero degrees on each axis. */ + static const FRotator ZeroRotator; + +public: + + /** + * Default constructor (no initialization). + */ + FORCEINLINE FRotator() { } + + /** + * Constructor + * + * @param InF Value to set all components to. + */ + explicit FORCEINLINE FRotator(float InF); + + /** + * Constructor. + * + * @param InPitch Pitch in degrees. + * @param InYaw Yaw in degrees. + * @param InRoll Roll in degrees. + */ + FORCEINLINE FRotator( float InPitch, float InYaw, float InRoll ); + + /** + * Constructor. + * + * @param EForceInit Force Init Enum. + */ + explicit FORCEINLINE FRotator( EForceInit ); + + /** + * Constructor. + * + * @param Quat Quaternion used to specify rotation. + */ + explicit FRotator( const FQuat& Quat ); + +public: + + // Binary arithmetic operators. + + /** + * Get the result of adding a rotator to this. + * + * @param R The other rotator. + * @return The result of adding a rotator to this. + */ + FRotator operator+( const FRotator& R ) const; + + /** + * Get the result of subtracting a rotator from this. + * + * @param R The other rotator. + * @return The result of subtracting a rotator from this. + */ + FRotator operator-( const FRotator& R ) const; + + /** + * Get the result of scaling this rotator. + * + * @param Scale The scaling factor. + * @return The result of scaling. + */ + FRotator operator*( float Scale ) const; + + /** + * Multiply this rotator by a scaling factor. + * + * @param Scale The scaling factor. + * @return Copy of the rotator after scaling. + */ + FRotator operator*=( float Scale ); + + // Binary comparison operators. + + /** + * Checks whether two rotators are identical. This checks each component for exact equality. + * + * @param R The other rotator. + * @return true if two rotators are identical, otherwise false. + * @see Equals() + */ + bool operator==( const FRotator& R ) const; + + /** + * Checks whether two rotators are different. + * + * @param V The other rotator. + * @return true if two rotators are different, otherwise false. + */ + bool operator!=( const FRotator& V ) const; + + // Assignment operators. + + /** + * Adds another rotator to this. + * + * @param R The other rotator. + * @return Copy of rotator after addition. + */ + FRotator operator+=( const FRotator& R ); + + /** + * Subtracts another rotator from this. + * + * @param R The other rotator. + * @return Copy of rotator after subtraction. + */ + FRotator operator-=( const FRotator& R ); + +public: + + // Functions. + + /** + * Checks whether rotator is nearly zero within specified tolerance, when treated as an orientation. + * This means that FRotator(0, 0, 360) is "zero", because it is the same final orientation as the zero rotator. + * + * @param Tolerance Error Tolerance. + * @return true if rotator is nearly zero, within specified tolerance, otherwise false. + */ + bool IsNearlyZero( float Tolerance=KINDA_SMALL_NUMBER ) const; + + /** + * Checks whether this has exactly zero rotation, when treated as an orientation. + * This means that FRotator(0, 0, 360) is "zero", because it is the same final orientation as the zero rotator. + * + * @return true if this has exactly zero rotation, otherwise false. + */ + bool IsZero() const; + + /** + * Checks whether two rotators are equal within specified tolerance, when treated as an orientation. + * This means that FRotator(0, 0, 360).Equals(FRotator(0,0,0)) is true, because they represent the same final orientation. + * + * @param R The other rotator. + * @param Tolerance Error Tolerance. + * @return true if two rotators are equal, within specified tolerance, otherwise false. + */ + bool Equals( const FRotator& R, float Tolerance=KINDA_SMALL_NUMBER ) const; + + /** + * Adds to each component of the rotator. + * + * @param DeltaPitch Change in pitch. (+/-) + * @param DeltaYaw Change in yaw. (+/-) + * @param DeltaRoll Change in roll. (+/-) + * @return Copy of rotator after addition. + */ + FRotator Add( float DeltaPitch, float DeltaYaw, float DeltaRoll ); + + /** + * Returns the inverse of the rotator. + */ + FRotator GetInverse() const; + + /** + * Get the rotation, snapped to specified degree segments. + * + * @param RotGrid A Rotator specifying how to snap each component. + * @return Snapped version of rotation. + */ + FRotator GridSnap( const FRotator& RotGrid ) const; + + /** + * Convert a rotation into a unit vector facing in its direction. + * + * @return Rotation as a unit direction vector. + */ + FVector Vector() const; + + /** + * Get Rotation as a quaternion. + * + * @return Rotation as a quaternion. + */ + FQuat Quaternion() const; + + /** + * Convert a Rotator into floating-point Euler angles (in degrees). Rotator now stored in degrees. + * + * @return Rotation as a Euler angle vector. + */ + FVector Euler() const; + + /** + * Rotate a vector rotated by this rotator. + * + * @param V The vector to rotate. + * @return The rotated vector. + */ + FVector RotateVector( const FVector& V ) const; + + /** + * Returns the vector rotated by the inverse of this rotator. + * + * @param V The vector to rotate. + * @return The rotated vector. + */ + FVector UnrotateVector( const FVector& V ) const; + + /** + * Gets the rotation values so they fall within the range [0,360] + * + * @return Clamped version of rotator. + */ + FRotator Clamp() const; + + /** + * Create a copy of this rotator and normalize, removes all winding and creates the "shortest route" rotation. + * + * @return Normalized copy of this rotator + */ + FRotator GetNormalized() const; + + /** + * Create a copy of this rotator and denormalize, clamping each axis to 0 - 360. + * + * @return Denormalized copy of this rotator + */ + FRotator GetDenormalized() const; + + /** + * In-place normalize, removes all winding and creates the "shortest route" rotation. + */ + void Normalize(); + + /** + * Decompose this Rotator into a Winding part (multiples of 360) and a Remainder part. + * Remainder will always be in [-180, 180] range. + * + * @param Winding[Out] the Winding part of this Rotator + * @param Remainder[Out] the Remainder + */ + void GetWindingAndRemainder( FRotator& Winding, FRotator& Remainder ) const; + + /** + * Get a textual representation of the vector. + * + * @return Text describing the vector. + */ + FString ToString() const; + + /** Get a short textural representation of this vector, for compact readable logging. */ + FString ToCompactString() const; + + /** + * Initialize this Rotator based on an FString. The String is expected to contain P=, Y=, R=. + * The FRotator will be bogus when InitFromString returns false. + * + * @param InSourceString FString containing the rotator values. + * @return true if the P,Y,R values were read successfully; false otherwise. + */ + bool InitFromString( const FString& InSourceString ); + + /** + * Utility to check if there are any non-finite values (NaN or Inf) in this Rotator. + * + * @return true if there are any non-finite values in this Rotator, otherwise false. + */ + bool ContainsNaN() const; + +public: + + /** + * Clamps an angle to the range of [0, 360). + * + * @param Angle The angle to clamp. + * @return The clamped angle. + */ + static float ClampAxis( float Angle ); + + /** + * Clamps an angle to the range of (-180, 180]. + * + * @param Angle The Angle to clamp. + * @return The clamped angle. + */ + static float NormalizeAxis( float Angle ); + + /** + * Compresses a floating point angle into a byte. + * + * @param Angle The angle to compress. + * @return The angle as a byte. + */ + static uint8 CompressAxisToByte( float Angle ); + + /** + * Decompress a word into a floating point angle. + * + * @param Angle The word angle. + * @return The decompressed angle. + */ + static float DecompressAxisFromByte( uint16 Angle ); + + /** + * Compress a floating point angle into a word. + * + * @param Angle The angle to compress. + * @return The decompressed angle. + */ + static uint16 CompressAxisToShort( float Angle ); + + /** + * Decompress a short into a floating point angle. + * + * @param Angle The word angle. + * @return The decompressed angle. + */ + static float DecompressAxisFromShort( uint16 Angle ); + + /** + * Convert a vector of floating-point Euler angles (in degrees) into a Rotator. Rotator now stored in degrees + * + * @param Euler Euler angle vector. + * @return A rotator from a Euler angle. + */ + static FRotator MakeFromEuler( const FVector& Euler ); +}; + + +/* FRotator inline functions + *****************************************************************************/ + +/** + * Scale a rotator and return. + * + * @param Scale scale to apply to R. + * @param R rotator to be scaled. + * @return Scaled rotator. + */ +FORCEINLINE FRotator operator*( float Scale, const FRotator& R ) +{ + return R.operator*( Scale ); +} + + +FORCEINLINE FRotator::FRotator( float InF ) + : Pitch(InF), Yaw(InF), Roll(InF) +{ +} + + +FORCEINLINE FRotator::FRotator( float InPitch, float InYaw, float InRoll ) + : Pitch(InPitch), Yaw(InYaw), Roll(InRoll) +{ +} + + +FORCEINLINE FRotator::FRotator(EForceInit) + : Pitch(0), Yaw(0), Roll(0) +{} + + +FORCEINLINE FRotator FRotator::operator+( const FRotator& R ) const +{ + return FRotator( Pitch+R.Pitch, Yaw+R.Yaw, Roll+R.Roll ); +} + + +FORCEINLINE FRotator FRotator::operator-( const FRotator& R ) const +{ + return FRotator( Pitch-R.Pitch, Yaw-R.Yaw, Roll-R.Roll ); +} + + +FORCEINLINE FRotator FRotator::operator*( float Scale ) const +{ + return FRotator( Pitch*Scale, Yaw*Scale, Roll*Scale ); +} + + +FORCEINLINE FRotator FRotator::operator*= (float Scale) +{ + Pitch = Pitch*Scale; Yaw = Yaw*Scale; Roll = Roll*Scale; + return *this; +} + + +FORCEINLINE bool FRotator::operator==( const FRotator& R ) const +{ + return Pitch==R.Pitch && Yaw==R.Yaw && Roll==R.Roll; +} + + +FORCEINLINE bool FRotator::operator!=( const FRotator& V ) const +{ + return Pitch!=V.Pitch || Yaw!=V.Yaw || Roll!=V.Roll; +} + + +FORCEINLINE FRotator FRotator::operator+=( const FRotator& R ) +{ + Pitch += R.Pitch; Yaw += R.Yaw; Roll += R.Roll; + return *this; +} + + +FORCEINLINE FRotator FRotator::operator-=( const FRotator& R ) +{ + Pitch -= R.Pitch; Yaw -= R.Yaw; Roll -= R.Roll; + return *this; +} + + +FORCEINLINE bool FRotator::IsNearlyZero(float Tolerance) const +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister RegA = VectorLoadFloat3_W0(this); + const VectorRegister Norm = VectorNormalizeRotator(RegA); + const VectorRegister AbsNorm = VectorAbs(Norm); + return !VectorAnyGreaterThan(AbsNorm, VectorLoadFloat1(&Tolerance)); +#else + return + FMath::Abs(NormalizeAxis(Pitch))<=Tolerance + && FMath::Abs(NormalizeAxis(Yaw))<=Tolerance + && FMath::Abs(NormalizeAxis(Roll))<=Tolerance; +#endif +} + + +FORCEINLINE bool FRotator::IsZero() const +{ + return (ClampAxis(Pitch)==0.f) && (ClampAxis(Yaw)==0.f) && (ClampAxis(Roll)==0.f); +} + + +FORCEINLINE bool FRotator::Equals(const FRotator& R, float Tolerance) const +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + const VectorRegister RegA = VectorLoadFloat3_W0(this); + const VectorRegister RegB = VectorLoadFloat3_W0(&R); + const VectorRegister NormDelta = VectorNormalizeRotator(VectorSubtract(RegA, RegB)); + const VectorRegister AbsNormDelta = VectorAbs(NormDelta); + return !VectorAnyGreaterThan(AbsNormDelta, VectorLoadFloat1(&Tolerance)); +#else + return (FMath::Abs(NormalizeAxis(Pitch - R.Pitch)) <= Tolerance) + && (FMath::Abs(NormalizeAxis(Yaw - R.Yaw)) <= Tolerance) + && (FMath::Abs(NormalizeAxis(Roll - R.Roll)) <= Tolerance); +#endif +} + + +FORCEINLINE FRotator FRotator::Add( float DeltaPitch, float DeltaYaw, float DeltaRoll ) +{ + Yaw += DeltaYaw; + Pitch += DeltaPitch; + Roll += DeltaRoll; + return *this; +} + + +FORCEINLINE FRotator FRotator::Clamp() const +{ + return FRotator(ClampAxis(Pitch), ClampAxis(Yaw), ClampAxis(Roll)); +} + + +FORCEINLINE float FRotator::ClampAxis( float Angle ) +{ + // returns Angle in the range (-360,360) + Angle = FMath::Fmod(Angle, 360.f); + + if (Angle < 0.f) + { + // shift to [0,360) range + Angle += 360.f; + } + + return Angle; +} + + +FORCEINLINE float FRotator::NormalizeAxis( float Angle ) +{ + // returns Angle in the range [0,360) + Angle = ClampAxis(Angle); + + if (Angle > 180.f) + { + // shift to (-180,180] + Angle -= 360.f; + } + + return Angle; +} + + +FORCEINLINE uint8 FRotator::CompressAxisToByte( float Angle ) +{ + // map [0->360) to [0->256) and mask off any winding + return FMath::RoundToInt(Angle * 256.f / 360.f) & 0xFF; +} + + +FORCEINLINE float FRotator::DecompressAxisFromByte( uint16 Angle ) +{ + // map [0->256) to [0->360) + return (Angle * 360.f / 256.f); +} + + +FORCEINLINE uint16 FRotator::CompressAxisToShort( float Angle ) +{ + // map [0->360) to [0->65536) and mask off any winding + return FMath::RoundToInt(Angle * 65536.f / 360.f) & 0xFFFF; +} + + +FORCEINLINE float FRotator::DecompressAxisFromShort( uint16 Angle ) +{ + // map [0->65536) to [0->360) + return (Angle * 360.f / 65536.f); +} + + +FORCEINLINE FRotator FRotator::GetNormalized() const +{ + FRotator Rot = *this; + Rot.Normalize(); + return Rot; +} + + +FORCEINLINE FRotator FRotator::GetDenormalized() const +{ + FRotator Rot = *this; + Rot.Pitch = ClampAxis(Rot.Pitch); + Rot.Yaw = ClampAxis(Rot.Yaw); + Rot.Roll = ClampAxis(Rot.Roll); + return Rot; +} + + +FORCEINLINE void FRotator::Normalize() +{ +#if PLATFORM_ENABLE_VECTORINTRINSICS + VectorRegister VRotator = VectorLoadFloat3_W0(this); + VRotator = VectorNormalizeRotator(VRotator); + VectorStoreFloat3(VRotator, this); +#else + Pitch = NormalizeAxis(Pitch); + Yaw = NormalizeAxis(Yaw); + Roll = NormalizeAxis(Roll); +#endif +} + + +FORCEINLINE bool FRotator::ContainsNaN() const +{ + return (!FMath::IsFinite(Pitch) || + !FMath::IsFinite(Yaw) || + !FMath::IsFinite(Roll)); +} + +template<> struct TIsPODType { enum { Value = true }; }; diff --git a/version/Core/Public/API/UE/Math/UnrealMathUtility.h b/version/Core/Public/API/UE/Math/UnrealMathUtility.h new file mode 100644 index 0000000..aec4b18 --- /dev/null +++ b/version/Core/Public/API/UE/Math/UnrealMathUtility.h @@ -0,0 +1,700 @@ +#pragma once + +#include "../BasicTypes.h" +#include "../GenericPlatform/GenericPlatformMath.h" + + +//#define IMPLEMENT_ASSIGNMENT_OPERATOR_MANUALLY + +// Assert on non finite numbers. Used to track NaNs. +#ifndef ENABLE_NAN_DIAGNOSTIC +#define ENABLE_NAN_DIAGNOSTIC 0 +#endif + +/*----------------------------------------------------------------------------- + Floating point constants. +-----------------------------------------------------------------------------*/ + +#undef PI +#define PI (3.1415926535897932f) +#define SMALL_NUMBER (1.e-8f) +#define KINDA_SMALL_NUMBER (1.e-4f) +#define BIG_NUMBER (3.4e+38f) +#define EULERS_NUMBER (2.71828182845904523536f) + +// Copied from float.h +#define MAX_FLT 3.402823466e+38F + +// Aux constants. +#define INV_PI (0.31830988618f) +#define HALF_PI (1.57079632679f) + +// Magic numbers for numerical precision. +#define DELTA (0.00001f) + +/** + * Lengths of normalized vectors (These are half their maximum values + * to assure that dot products with normalized vectors don't overflow). + */ +#define FLOAT_NORMAL_THRESH (0.0001f) + +// +// Magic numbers for numerical precision. +// +#define THRESH_POINT_ON_PLANE (0.10f) /* Thickness of plane for front/back/inside test */ +#define THRESH_POINT_ON_SIDE (0.20f) /* Thickness of polygon side's side-plane for point-inside/outside/on side test */ +#define THRESH_POINTS_ARE_SAME (0.00002f) /* Two points are same if within this distance */ +#define THRESH_POINTS_ARE_NEAR (0.015f) /* Two points are near if within this distance and can be combined if imprecise math is ok */ +#define THRESH_NORMALS_ARE_SAME (0.00002f) /* Two normal points are same if within this distance */ +/* Making this too large results in incorrect CSG classification and disaster */ +#define THRESH_VECTORS_ARE_NEAR (0.0004f) /* Two vectors are near if within this distance and can be combined if imprecise math is ok */ +/* Making this too large results in lighting problems due to inaccurate texture coordinates */ +#define THRESH_SPLIT_POLY_WITH_PLANE (0.25f) /* A plane splits a polygon in half */ +#define THRESH_SPLIT_POLY_PRECISELY (0.01f) /* A plane exactly splits a polygon */ +#define THRESH_ZERO_NORM_SQUARED (0.0001f) /* Num of a unit normal that is considered "zero", squared */ +#define THRESH_NORMALS_ARE_PARALLEL (0.999845f) /* Two unit vectors are parallel if abs(A dot B) is greater than or equal to this. This is roughly cosine(1.0 degrees). */ +#define THRESH_NORMALS_ARE_ORTHOGONAL (0.017455f) /* Two unit vectors are orthogonal (perpendicular) if abs(A dot B) is less than or equal this. This is roughly cosine(89.0 degrees). */ + +#define THRESH_VECTOR_NORMALIZED (0.01f) /** Allowed error for a normalized vector (against squared magnitude) */ +#define THRESH_QUAT_NORMALIZED (0.01f) /** Allowed error for a normalized quaternion (against squared magnitude) */ + +/*----------------------------------------------------------------------------- + Global functions. +-----------------------------------------------------------------------------*/ + +/** + * Structure for all math helper functions, inherits from platform math to pick up platform-specific implementations + * Check GenericPlatformMath.h for additional math functions + */ +struct FMath : FGenericPlatformMath +{ + // Random Number Functions + + /** Helper function for rand implementations. Returns a random number in [0..A) */ + static FORCEINLINE int32 RandHelper(int32 A) + { + // Note that on some platforms RAND_MAX is a large number so we cannot do ((rand()/(RAND_MAX+1)) * A) + // or else we may include the upper bound results, which should be excluded. + return A > 0 ? Min(TruncToInt(FRand() * A), A - 1) : 0; + } + + /** Helper function for rand implementations. Returns a random number >= Min and <= Max */ + static FORCEINLINE int32 RandRange(int32 Min, int32 Max) + { + const int32 Range = Max - Min + 1; + return Min + RandHelper(Range); + } + + /** Util to generate a random number in a range. Overloaded to distinguish from int32 version, where passing a float is typically a mistake. */ + static FORCEINLINE float RandRange(float InMin, float InMax) + { + return FRandRange(InMin, InMax); + } + + /** Util to generate a random number in a range. */ + static FORCEINLINE float FRandRange(float InMin, float InMax) + { + return InMin + (InMax - InMin) * FRand(); + } + + /** Util to generate a random boolean. */ + static FORCEINLINE bool RandBool() + { + return RandRange(0, 1) == 1 ? true : false; + } + + /** + * Checks whether a number is a power of two. + * @param Value Number to check + * @return true if Value is a power of two + */ + template + static FORCEINLINE bool IsPowerOfTwo(T Value) + { + return ((Value & (Value - 1)) == (T)0); + } + + + // Math Operations + + /** Returns highest of 3 values */ + template + static FORCEINLINE T Max3(const T A, const T B, const T C) + { + return Max(Max(A, B), C); + } + + /** Returns lowest of 3 values */ + template + static FORCEINLINE T Min3(const T A, const T B, const T C) + { + return Min(Min(A, B), C); + } + + /** Multiples value by itself */ + template + static FORCEINLINE T Square(const T A) + { + return A * A; + } + + /** Clamps X to be between Min and Max, inclusive */ + template + static FORCEINLINE T Clamp(const T X, const T Min, const T Max) + { + return X < Min ? Min : X < Max ? X : Max; + } + + /** Divides two integers and rounds up */ + template + static FORCEINLINE T DivideAndRoundUp(T Dividend, T Divisor) + { + return (Dividend + Divisor - 1) / Divisor; + } + + template + static FORCEINLINE T DivideAndRoundDown(T Dividend, T Divisor) + { + return Dividend / Divisor; + } + + /** + * Computes the sine and cosine of a scalar float. + * + * @param ScalarSin Pointer to where the Sin result should be stored + * @param ScalarCos Pointer to where the Cos result should be stored + * @param Value input angles + */ + static FORCEINLINE void SinCos(float* ScalarSin, float* ScalarCos, float Value) + { + // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. + float quotient = INV_PI * 0.5f * Value; + if (Value >= 0.0f) + { + quotient = (float)(int)(quotient + 0.5f); + } + else + { + quotient = (float)(int)(quotient - 0.5f); + } + float y = Value - 2.0f * PI * quotient; + + // Map y to [-pi/2,pi/2] with sin(y) = sin(Value). + float sign; + if (y > HALF_PI) + { + y = PI - y; + sign = -1.0f; + } + else if (y < -HALF_PI) + { + y = -PI - y; + sign = -1.0f; + } + else + { + sign = +1.0f; + } + + float y2 = y * y; + + // 11-degree minimax approximation + *ScalarSin = (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * y2 + 0.0083333310f) * y2 - + 0.16666667f) * y2 + 1.0f) * y; + + // 10-degree minimax approximation + float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 + + 1.0f; + *ScalarCos = sign * p; + } + + + // Note: We use FASTASIN_HALF_PI instead of HALF_PI inside of FastASin(), since it was the value that accompanied the minimax coefficients below. + // It is important to use exactly the same value in all places inside this function to ensure that FastASin(0.0f) == 0.0f. + // For comparison: + // HALF_PI == 1.57079632679f == 0x3fC90FDB + // FASTASIN_HALF_PI == 1.5707963050f == 0x3fC90FDA +#define FASTASIN_HALF_PI (1.5707963050f) + + /** + * Computes the ASin of a scalar float. + * + * @param Value input angle + * @return ASin of Value + */ + static FORCEINLINE float FastAsin(float Value) + { + // Clamp input to [-1,1]. + bool nonnegative = Value >= 0.0f; + float x = Abs(Value); + float omx = 1.0f - x; + if (omx < 0.0f) + { + omx = 0.0f; + } + float root = Sqrt(omx); + // 7-degree minimax approximation + float result = ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + 0.0308918810f) * x - 0.0501743046f + ) * x + 0.0889789874f) * x - 0.2145988016f) * x + FASTASIN_HALF_PI; + result *= root; // acos(|x|) + // acos(x) = pi - acos(-x) when x < 0, asin(x) = pi/2 - acos(x) + return nonnegative ? FASTASIN_HALF_PI - result : result - FASTASIN_HALF_PI; + } +#undef FASTASIN_HALF_PI + + + // Conversion Functions + + /** + * Converts radians to degrees. + * @param RadVal Value in radians. + * @return Value in degrees. + */ + template + static FORCEINLINE auto RadiansToDegrees(T const& RadVal) -> decltype(RadVal * (180.f / PI)) + { + return RadVal * (180.f / PI); + } + + /** + * Converts degrees to radians. + * @param DegVal Value in degrees. + * @return Value in radians. + */ + template + static FORCEINLINE auto DegreesToRadians(T const& DegVal) -> decltype(DegVal * (PI / 180.f)) + { + return DegVal * (PI / 180.f); + } + + /** Find the smallest angle between two headings (in degrees) */ + static float FindDeltaAngleDegrees(float A1, float A2) + { + // Find the difference + float Delta = A2 - A1; + + // If change is larger than 180 + if (Delta > 180.0f) + { + // Flip to negative equivalent + Delta = Delta - 360.0f; + } + else if (Delta < -180.0f) + { + // Otherwise, if change is smaller than -180 + // Flip to positive equivalent + Delta = Delta + 360.0f; + } + + // Return delta in [-180,180] range + return Delta; + } + + /** Find the smallest angle between two headings (in radians) */ + static float FindDeltaAngleRadians(float A1, float A2) + { + // Find the difference + float Delta = A2 - A1; + + // If change is larger than PI + if (Delta > PI) + { + // Flip to negative equivalent + Delta = Delta - PI * 2.0f; + } + else if (Delta < -PI) + { + // Otherwise, if change is smaller than -PI + // Flip to positive equivalent + Delta = Delta + PI * 2.0f; + } + + // Return delta in [-PI,PI] range + return Delta; + } + + /** Given a heading which may be outside the +/- PI range, 'unwind' it back into that range. */ + static float UnwindRadians(float A) + { + while (A > PI) + { + A -= (float)PI * 2.0f; + } + + while (A < -PI) + { + A += (float)PI * 2.0f; + } + + return A; + } + + /** Utility to ensure angle is between +/- 180 degrees by unwinding. */ + static float UnwindDegrees(float A) + { + while (A > 180.f) + { + A -= 360.f; + } + + while (A < -180.f) + { + A += 360.f; + } + + return A; + } + + /** Converts given Polar coordinate pair to Cartesian coordinate system. */ + static FORCEINLINE void PolarToCartesian(const float Rad, const float Ang, float& OutX, float& OutY) + { + OutX = Rad * Cos(Ang); + OutY = Rad * Sin(Ang); + } + + /** Performs a linear interpolation between two values, Alpha ranges from 0-1 */ + template + static T Lerp(const T& A, const T& B, const U& Alpha) + { + return (T)(A + Alpha * (B - A)); + } + + /** Performs a linear interpolation between two values, Alpha ranges from 0-1. Handles full numeric range of T */ + template + static T LerpStable(const T& A, const T& B, double Alpha) + { + return (T)((A * (1.0 - Alpha)) + (B * Alpha)); + } + + /** Performs a linear interpolation between two values, Alpha ranges from 0-1. Handles full numeric range of T */ + template + static T LerpStable(const T& A, const T& B, float Alpha) + { + return (T)((A * (1.0f - Alpha)) + (B * Alpha)); + } + + /** Performs a 2D linear interpolation between four values values, FracX, FracY ranges from 0-1 */ + template + static T BiLerp(const T& P00, const T& P10, const T& P01, const T& P11, const U& FracX, const U& FracY) + { + return Lerp( + Lerp(P00, P10, FracX), + Lerp(P01, P11, FracX), + FracY + ); + } + + /** + * Performs a cubic interpolation + * + * @param P - end points + * @param T - tangent directions at end points + * @param Alpha - distance along spline + * + * @return Interpolated value + */ + template + static T CubicInterp(const T& P0, const T& T0, const T& P1, const T& T1, const U& A) + { + const float A2 = A * A; + const float A3 = A2 * A; + + return (T)((2 * A3 - 3 * A2 + 1) * P0) + ((A3 - 2 * A2 + A) * T0) + ((A3 - A2) * T1) + ((-2 * A3 + 3 * A2) * P1); + } + + /** + * Performs a first derivative cubic interpolation + * + * @param P - end points + * @param T - tangent directions at end points + * @param Alpha - distance along spline + * + * @return Interpolated value + */ + template + static T CubicInterpDerivative(const T& P0, const T& T0, const T& P1, const T& T1, const U& A) + { + T a = 6.f * P0 + 3.f * T0 + 3.f * T1 - 6.f * P1; + T b = -6.f * P0 - 4.f * T0 - 2.f * T1 + 6.f * P1; + T c = T0; + + const float A2 = A * A; + + return (a * A2) + (b * A) + c; + } + + /** + * Performs a second derivative cubic interpolation + * + * @param P - end points + * @param T - tangent directions at end points + * @param Alpha - distance along spline + * + * @return Interpolated value + */ + template + static T CubicInterpSecondDerivative(const T& P0, const T& T0, const T& P1, const T& T1, const U& A) + { + T a = 12.f * P0 + 6.f * T0 + 6.f * T1 - 12.f * P1; + T b = -6.f * P0 - 4.f * T0 - 2.f * T1 + 6.f * P1; + + return (a * A) + b; + } + + /** Interpolate between A and B, applying an ease in function. Exp controls the degree of the curve. */ + template + static T InterpEaseIn(const T& A, const T& B, float Alpha, float Exp) + { + float const ModifiedAlpha = Pow(Alpha, Exp); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolate between A and B, applying an ease out function. Exp controls the degree of the curve. */ + template + static T InterpEaseOut(const T& A, const T& B, float Alpha, float Exp) + { + float const ModifiedAlpha = 1.f - Pow(1.f - Alpha, Exp); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolate between A and B, applying an ease in/out function. Exp controls the degree of the curve. */ + template + static T InterpEaseInOut(const T& A, const T& B, float Alpha, float Exp) + { + return Lerp(A, B, Alpha < 0.5f + ? InterpEaseIn(0.f, 1.f, Alpha * 2.f, Exp) * 0.5f + : InterpEaseOut(0.f, 1.f, Alpha * 2.f - 1.f, Exp) * 0.5f + 0.5f); + } + + /** Interpolation between A and B, applying a step function. */ + template + static T InterpStep(const T& A, const T& B, float Alpha, int32 Steps) + { + if (Steps <= 1 || Alpha <= 0) + { + return A; + } + if (Alpha >= 1) + { + return B; + } + + const float StepsAsFloat = static_cast(Steps); + const float NumIntervals = StepsAsFloat - 1.f; + float const ModifiedAlpha = FloorToFloat(Alpha * StepsAsFloat) / NumIntervals; + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying a sinusoidal in function. */ + template + static T InterpSinIn(const T& A, const T& B, float Alpha) + { + float const ModifiedAlpha = -1.f * Cos(Alpha * HALF_PI) + 1.f; + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying a sinusoidal out function. */ + template + static T InterpSinOut(const T& A, const T& B, float Alpha) + { + float const ModifiedAlpha = Sin(Alpha * HALF_PI); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying a sinusoidal in/out function. */ + template + static T InterpSinInOut(const T& A, const T& B, float Alpha) + { + return Lerp(A, B, Alpha < 0.5f + ? InterpSinIn(0.f, 1.f, Alpha * 2.f) * 0.5f + : InterpSinOut(0.f, 1.f, Alpha * 2.f - 1.f) * 0.5f + 0.5f); + } + + /** Interpolation between A and B, applying an exponential in function. */ + template + static T InterpExpoIn(const T& A, const T& B, float Alpha) + { + float const ModifiedAlpha = Alpha == 0.f ? 0.f : Pow(2.f, 10.f * (Alpha - 1.f)); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying an exponential out function. */ + template + static T InterpExpoOut(const T& A, const T& B, float Alpha) + { + float const ModifiedAlpha = Alpha == 1.f ? 1.f : -Pow(2.f, -10.f * Alpha) + 1.f; + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying an exponential in/out function. */ + template + static T InterpExpoInOut(const T& A, const T& B, float Alpha) + { + return Lerp(A, B, Alpha < 0.5f + ? InterpExpoIn(0.f, 1.f, Alpha * 2.f) * 0.5f + : InterpExpoOut(0.f, 1.f, Alpha * 2.f - 1.f) * 0.5f + 0.5f); + } + + /** Interpolation between A and B, applying a circular in function. */ + template + static T InterpCircularIn(const T& A, const T& B, float Alpha) + { + float const ModifiedAlpha = -1.f * (Sqrt(1.f - Alpha * Alpha) - 1.f); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying a circular out function. */ + template + static T InterpCircularOut(const T& A, const T& B, float Alpha) + { + Alpha -= 1.f; + float const ModifiedAlpha = Sqrt(1.f - Alpha * Alpha); + return Lerp(A, B, ModifiedAlpha); + } + + /** Interpolation between A and B, applying a circular in/out function. */ + template + static T InterpCircularInOut(const T& A, const T& B, float Alpha) + { + return Lerp(A, B, Alpha < 0.5f + ? InterpCircularIn(0.f, 1.f, Alpha * 2.f) * 0.5f + : InterpCircularOut(0.f, 1.f, Alpha * 2.f - 1.f) * 0.5f + 0.5f); + } + + /* + * Cubic Catmull-Rom Spline interpolation. Based on http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf + * Curves are guaranteed to pass through the control points and are easily chained together. + * Equation supports abitrary parameterization. eg. Uniform=0,1,2,3 ; chordal= |Pn - Pn-1| ; centripetal = |Pn - Pn-1|^0.5 + * P0 - The control point preceding the interpolation range. + * P1 - The control point starting the interpolation range. + * P2 - The control point ending the interpolation range. + * P3 - The control point following the interpolation range. + * T0-3 - The interpolation parameters for the corresponding control points. + * T - The interpolation factor in the range 0 to 1. 0 returns P1. 1 returns P2. + */ + template + static U CubicCRSplineInterp(const U& P0, const U& P1, const U& P2, const U& P3, const float T0, const float T1, + const float T2, const float T3, const float T) + { + //Based on http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf + float InvT1MinusT0 = 1.0f / (T1 - T0); + U L01 = (P0 * ((T1 - T) * InvT1MinusT0)) + (P1 * ((T - T0) * InvT1MinusT0)); + float InvT2MinusT1 = 1.0f / (T2 - T1); + U L12 = (P1 * ((T2 - T) * InvT2MinusT1)) + (P2 * ((T - T1) * InvT2MinusT1)); + float InvT3MinusT2 = 1.0f / (T3 - T2); + U L23 = (P2 * ((T3 - T) * InvT3MinusT2)) + (P3 * ((T - T2) * InvT3MinusT2)); + + float InvT2MinusT0 = 1.0f / (T2 - T0); + U L012 = (L01 * ((T2 - T) * InvT2MinusT0)) + (L12 * ((T - T0) * InvT2MinusT0)); + float InvT3MinusT1 = 1.0f / (T3 - T1); + U L123 = (L12 * ((T3 - T) * InvT3MinusT1)) + (L23 * ((T - T1) * InvT3MinusT1)); + + return ((L012 * ((T2 - T) * InvT2MinusT1)) + (L123 * ((T - T1) * InvT2MinusT1))); + } + + // Geometry intersection + + /** + * Converts a floating point number to an integer which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1 + * @param F Floating point value to convert + * @return The rounded integer + */ + static FORCEINLINE float RoundFromZero(float F) + { + return F < 0.0f ? FloorToFloat(F) : CeilToFloat(F); + } + + static FORCEINLINE double RoundFromZero(double F) + { + return F < 0.0 ? FloorToDouble(F) : CeilToDouble(F); + } + + /** + * Converts a floating point number to an integer which is closer to zero, "smaller" in absolute value: 0.1 becomes 0, -0.1 becomes 0 + * @param F Floating point value to convert + * @return The rounded integer + */ + static FORCEINLINE float RoundToZero(float F) + { + return F < 0.0f ? CeilToFloat(F) : FloorToFloat(F); + } + + static FORCEINLINE double RoundToZero(double F) + { + return F < 0.0 ? CeilToDouble(F) : FloorToDouble(F); + } + + /** + * Converts a floating point number to an integer which is more negative: 0.1 becomes 0, -0.1 becomes -1 + * @param F Floating point value to convert + * @return The rounded integer + */ + static FORCEINLINE float RoundToNegativeInfinity(float F) + { + return FloorToFloat(F); + } + + static FORCEINLINE double RoundToNegativeInfinity(double F) + { + return FloorToDouble(F); + } + + /** + * Converts a floating point number to an integer which is more positive: 0.1 becomes 1, -0.1 becomes 0 + * @param F Floating point value to convert + * @return The rounded integer + */ + static FORCEINLINE float RoundToPositiveInfinity(float F) + { + return CeilToFloat(F); + } + + static FORCEINLINE double RoundToPositiveInfinity(double F) + { + return CeilToDouble(F); + } + + /** + * Returns a smooth Hermite interpolation between 0 and 1 for the value X (where X ranges between A and B) + * Clamped to 0 for X <= A and 1 for X >= B. + * + * @param A Minimum value of X + * @param B Maximum value of X + * @param X Parameter + * + * @return Smoothed value between 0 and 1 + */ + static float SmoothStep(float A, float B, float X) + { + if (X < A) + { + return 0.0f; + } + if (X >= B) + { + return 1.0f; + } + const float InterpFraction = (X - A) / (B - A); + return InterpFraction * InterpFraction * (3.0f - 2.0f * InterpFraction); + } + + // Use the Euclidean method to find the GCD + static int32 GreatestCommonDivisor(int32 a, int32 b) + { + while (b != 0) + { + int32 t = b; + b = a % b; + a = t; + } + return a; + } + + // LCM = a/gcd * b + // a and b are the number we want to find the lcm + static int32 LeastCommonMultiplier(int32 a, int32 b) + { + int32 CurrentGcd = GreatestCommonDivisor(a, b); + return CurrentGcd == 0 ? 0 : a / CurrentGcd * b; + } +}; diff --git a/version/Core/Public/API/UE/Math/Vector.h b/version/Core/Public/API/UE/Math/Vector.h new file mode 100644 index 0000000..a62f589 --- /dev/null +++ b/version/Core/Public/API/UE/Math/Vector.h @@ -0,0 +1,1657 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "../Containers/FString.h" +#include "Color.h" +#include "IntPoint.h" +#include "Vector2D.h" +#include "../Misc/ByteSwap.h" +#include "IntVector.h" + +struct FRotator; + +#pragma warning(push) +#pragma warning(disable : 4244) + +/** + * A vector in 3-D space composed of components (X, Y, Z) with floating point precision. + */ +struct FVector +{ +public: + + /** Vector's X component. */ + float X; + + /** Vector's Y component. */ + float Y; + + /** Vector's Z component. */ + float Z; + + +public: + + static const FVector ZeroVector; + + /** Default constructor */ + FORCEINLINE FVector() : X(0), Y(0), Z(0) + {}; + + /** + * Constructor initializing all components to a single float value. + * + * @param InF Value to set all components to. + */ + explicit FORCEINLINE FVector(float InF); + + /** + * Constructor using initial values for each component. + * + * @param InX X Coordinate. + * @param InY Y Coordinate. + * @param InZ Z Coordinate. + */ + FORCEINLINE CONSTEXPR FVector(float InX, float InY, float InZ); + + /** + * Constructs a vector from an FVector2D and Z value. + * + * @param V Vector to copy from. + * @param InZ Z Coordinate. + */ + explicit FORCEINLINE FVector(const FVector2D V, float InZ); + + /** + * Constructs a vector from an FLinearColor. + * + * @param InColor Color to copy from. + */ + explicit FVector(const FLinearColor& InColor); + + /** + * Constructs a vector from an FIntVector. + * + * @param InVector FIntVector to copy from. + */ + explicit FVector(FIntVector InVector); + + /** + * Constructs a vector from an FIntPoint. + * + * @param A Int Point used to set X and Y coordinates, Z is set to zero. + */ + explicit FVector(FIntPoint A); + + /** + * Constructor which initializes all components to zero. + * + * @param EForceInit Force init enum + */ + explicit FORCEINLINE FVector(EForceInit); + +#ifdef IMPLEMENT_ASSIGNMENT_OPERATOR_MANUALLY + /** + * Copy another FVector into this one + * + * @param Other The other vector. + * @return Reference to vector after copy. + */ + FORCEINLINE FVector& operator=(const FVector& Other); +#endif + + /** + * Calculate cross product between this and another vector. + * + * @param V The other vector. + * @return The cross product. + */ + FORCEINLINE FVector operator^(const FVector& V) const; + + /** + * Calculate the cross product of two vectors. + * + * @param A The first vector. + * @param B The second vector. + * @return The cross product. + */ + FORCEINLINE static FVector CrossProduct(const FVector& A, const FVector& B); + + /** + * Calculate the dot product between this and another vector. + * + * @param V The other vector. + * @return The dot product. + */ + FORCEINLINE float operator|(const FVector& V) const; + + /** + * Calculate the dot product of two vectors. + * + * @param A The first vector. + * @param B The second vector. + * @return The dot product. + */ + FORCEINLINE static float DotProduct(const FVector& A, const FVector& B); + + /** + * Gets the result of component-wise addition of this and another vector. + * + * @param V The vector to add to this. + * @return The result of vector addition. + */ + FORCEINLINE FVector operator+(const FVector& V) const; + + /** + * Gets the result of component-wise subtraction of this by another vector. + * + * @param V The vector to subtract from this. + * @return The result of vector subtraction. + */ + FORCEINLINE FVector operator-(const FVector& V) const; + + /** + * Gets the result of subtracting from each component of the vector. + * + * @param Bias How much to subtract from each component. + * @return The result of subtraction. + */ + FORCEINLINE FVector operator-(float Bias) const; + + /** + * Gets the result of adding to each component of the vector. + * + * @param Bias How much to add to each component. + * @return The result of addition. + */ + FORCEINLINE FVector operator+(float Bias) const; + + /** + * Gets the result of scaling the vector (multiplying each component by a value). + * + * @param Scale What to multiply each component by. + * @return The result of multiplication. + */ + FORCEINLINE FVector operator*(float Scale) const; + + /** + * Gets the result of dividing each component of the vector by a value. + * + * @param Scale What to divide each component by. + * @return The result of division. + */ + FVector operator/(float Scale) const; + + /** + * Gets the result of component-wise multiplication of this vector by another. + * + * @param V The vector to multiply with. + * @return The result of multiplication. + */ + FORCEINLINE FVector operator*(const FVector& V) const; + + /** + * Gets the result of component-wise division of this vector by another. + * + * @param V The vector to divide by. + * @return The result of division. + */ + FORCEINLINE FVector operator/(const FVector& V) const; + + // Binary comparison operators. + + /** + * Check against another vector for equality. + * + * @param V The vector to check against. + * @return true if the vectors are equal, false otherwise. + */ + bool operator==(const FVector& V) const; + + /** + * Check against another vector for inequality. + * + * @param V The vector to check against. + * @return true if the vectors are not equal, false otherwise. + */ + bool operator!=(const FVector& V) const; + + /** + * Check against another vector for equality, within specified error limits. + * + * @param V The vector to check against. + * @param Tolerance Error tolerance. + * @return true if the vectors are equal within tolerance limits, false otherwise. + */ + bool Equals(const FVector& V, float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Checks whether all components of this vector are the same, within a tolerance. + * + * @param Tolerance Error tolerance. + * @return true if the vectors are equal within tolerance limits, false otherwise. + */ + bool AllComponentsEqual(float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Get a negated copy of the vector. + * + * @return A negated copy of the vector. + */ + FORCEINLINE FVector operator-() const; + + /** + * Adds another vector to this. + * Uses component-wise addition. + * + * @param V Vector to add to this. + * @return Copy of the vector after addition. + */ + FORCEINLINE FVector operator+=(const FVector& V); + + /** + * Subtracts another vector from this. + * Uses component-wise subtraction. + * + * @param V Vector to subtract from this. + * @return Copy of the vector after subtraction. + */ + FORCEINLINE FVector operator-=(const FVector& V); + + /** + * Scales the vector. + * + * @param Scale Amount to scale this vector by. + * @return Copy of the vector after scaling. + */ + FORCEINLINE FVector operator*=(float Scale); + + /** + * Divides the vector by a number. + * + * @param V What to divide this vector by. + * @return Copy of the vector after division. + */ + FVector operator/=(float V); + + /** + * Multiplies the vector with another vector, using component-wise multiplication. + * + * @param V What to multiply this vector with. + * @return Copy of the vector after multiplication. + */ + FVector operator*=(const FVector& V); + + /** + * Divides the vector by another vector, using component-wise division. + * + * @param V What to divide vector by. + * @return Copy of the vector after division. + */ + FVector operator/=(const FVector& V); + + /** + * Gets specific component of the vector. + * + * @param Index the index of vector component + * @return reference to component. + */ + float& operator[](int32 Index); + + /** + * Gets specific component of the vector. + * + * @param Index the index of vector component + * @return Copy of the component. + */ + float operator[](int32 Index)const; + + /** + * Gets a specific component of the vector. + * + * @param Index The index of the component required. + * + * @return Reference to the specified component. + */ + float& Component(int32 Index); + + /** + * Gets a specific component of the vector. + * + * @param Index The index of the component required. + * @return Copy of the specified component. + */ + float Component(int32 Index) const; + +public: + + // Simple functions. + + /** + * Set the values of the vector directly. + * + * @param InX New X coordinate. + * @param InY New Y coordinate. + * @param InZ New Z coordinate. + */ + void Set(float InX, float InY, float InZ); + + /** + * Get the maximum value of the vector's components. + * + * @return The maximum value of the vector's components. + */ + float GetMax() const; + + /** + * Get the maximum absolute value of the vector's components. + * + * @return The maximum absolute value of the vector's components. + */ + float GetAbsMax() const; + + /** + * Get the minimum value of the vector's components. + * + * @return The minimum value of the vector's components. + */ + float GetMin() const; + + /** + * Get the minimum absolute value of the vector's components. + * + * @return The minimum absolute value of the vector's components. + */ + float GetAbsMin() const; + + /** Gets the component-wise min of two vectors. */ + FVector ComponentMin(const FVector& Other) const; + + /** Gets the component-wise max of two vectors. */ + FVector ComponentMax(const FVector& Other) const; + + /** + * Get a copy of this vector with absolute value of each component. + * + * @return A copy of this vector with absolute value of each component. + */ + FVector GetAbs() const; + + /** + * Get the length (magnitude) of this vector. + * + * @return The length of this vector. + */ + float Size() const; + + /** + * Get the squared length of this vector. + * + * @return The squared length of this vector. + */ + float SizeSquared() const; + + /** + * Get the length of the 2D components of this vector. + * + * @return The 2D length of this vector. + */ + float Size2D() const ; + + /** + * Get the squared length of the 2D components of this vector. + * + * @return The squared 2D length of this vector. + */ + float SizeSquared2D() const ; + + /** + * Checks whether vector is near to zero within a specified tolerance. + * + * @param Tolerance Error tolerance. + * @return true if the vector is near to zero, false otherwise. + */ + bool IsNearlyZero(float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Checks whether all components of the vector are exactly zero. + * + * @return true if the vector is exactly zero, false otherwise. + */ + bool IsZero() const; + + /** + * Normalize this vector in-place if it is larger than a given tolerance. Leaves it unchanged if not. + * + * @param Tolerance Minimum squared length of vector for normalization. + * @return true if the vector was normalized correctly, false otherwise. + */ + bool Normalize(float Tolerance=SMALL_NUMBER); + + /** + * Checks whether vector is normalized. + * + * @return true if Normalized, false otherwise. + */ + bool IsNormalized() const; + + /** + * Util to convert this vector into a unit direction vector and its original length. + * + * @param OutDir Reference passed in to store unit direction vector. + * @param OutLength Reference passed in to store length of the vector. + */ + void ToDirectionAndLength(FVector &OutDir, float &OutLength) const; + + /** + * Get a copy of the vector as sign only. + * Each component is set to +1 or -1, with the sign of zero treated as +1. + * + * @param A copy of the vector with each component set to +1 or -1 + */ + FORCEINLINE FVector GetSignVector() const; + + /** + * Projects 2D components of vector based on Z. + * + * @return Projected version of vector based on Z. + */ + FVector Projection() const; + + /** + * Calculates normalized version of vector without checking for zero length. + * + * @return Normalized version of vector. + * @see GetSafeNormal() + */ + FORCEINLINE FVector GetUnsafeNormal() const; + + /** + * Gets a copy of this vector snapped to a grid. + * + * @param GridSz Grid dimension. + * @return A copy of this vector snapped to a grid. + * @see FMath::GridSnap() + */ + FVector GridSnap(const float& GridSz) const; + + /** + * Get a copy of this vector, clamped inside of a cube. + * + * @param Radius Half size of the cube. + * @return A copy of this vector, bound by cube. + */ + FVector BoundToCube(float Radius) const; + + /** Create a copy of this vector, with its magnitude clamped between Min and Max. */ + FVector GetClampedToSize(float Min, float Max) const; + + /** Create a copy of this vector, with the 2D magnitude clamped between Min and Max. Z is unchanged. */ + FVector GetClampedToSize2D(float Min, float Max) const; + + /** Create a copy of this vector, with its maximum magnitude clamped to MaxSize. */ + FVector GetClampedToMaxSize(float MaxSize) const; + + /** Create a copy of this vector, with the maximum 2D magnitude clamped to MaxSize. Z is unchanged. */ + FVector GetClampedToMaxSize2D(float MaxSize) const; + + /** + * Gets the reciprocal of this vector, avoiding division by zero. + * Zero components are set to BIG_NUMBER. + * + * @return Reciprocal of this vector. + */ + FVector Reciprocal() const; + + /** + * Check whether X, Y and Z are nearly equal. + * + * @param Tolerance Specified Tolerance. + * @return true if X == Y == Z within the specified tolerance. + */ + bool IsUniform(float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Mirror a vector about a normal vector. + * + * @param MirrorNormal Normal vector to mirror about. + * @return Mirrored vector. + */ + FVector MirrorByVector(const FVector& MirrorNormal) const; + + /** + * Rotates around Axis (assumes Axis.Size() == 1). + * + * @param Angle Angle to rotate (in degrees). + * @param Axis Axis to rotate around. + * @return Rotated Vector. + */ + FVector RotateAngleAxis(const float AngleDeg, const FVector& Axis) const; + + /** + * Gets a normalized copy of the vector, checking it is safe to do so based on the length. + * Returns zero vector if vector length is too small to safely normalize. + * + * @param Tolerance Minimum squared vector length. + * @return A normalized copy if safe, (0,0,0) otherwise. + */ + FVector GetSafeNormal(float Tolerance=SMALL_NUMBER) const; + + /** + * Gets a normalized copy of the 2D components of the vector, checking it is safe to do so. Z is set to zero. + * Returns zero vector if vector length is too small to normalize. + * + * @param Tolerance Minimum squared vector length. + * @return Normalized copy if safe, otherwise returns zero vector. + */ + FVector GetSafeNormal2D(float Tolerance=SMALL_NUMBER) const; + + /** + * Returns the cosine of the angle between this vector and another projected onto the XY plane (no Z). + * + * @param B the other vector to find the 2D cosine of the angle with. + * @return The cosine. + */ + FORCEINLINE float CosineAngle2D(FVector B) const; + + /** + * Gets a copy of this vector projected onto the input vector. + * + * @param A Vector to project onto, does not assume it is normalized. + * @return Projected vector. + */ + FORCEINLINE FVector ProjectOnTo(const FVector& A) const ; + + /** + * Gets a copy of this vector projected onto the input vector, which is assumed to be unit length. + * + * @param Normal Vector to project onto (assumed to be unit length). + * @return Projected vector. + */ + FORCEINLINE FVector ProjectOnToNormal(const FVector& Normal) const; + + /** + * Return the FRotator orientation corresponding to the direction in which the vector points. + * Sets Yaw and Pitch to the proper numbers, and sets Roll to zero because the roll can't be determined from a vector. + * + * @return FRotator from the Vector's direction, without any roll. + * @see ToOrientationQuat() + */ + FRotator ToOrientationRotator() const; + + /** + * Return the Quaternion orientation corresponding to the direction in which the vector points. + * Similar to the FRotator version, returns a result without roll such that it preserves the up vector. + * + * @note If you don't care about preserving the up vector and just want the most direct rotation, you can use the faster + * 'FQuat::FindBetweenVectors(FVector::ForwardVector, YourVector)' or 'FQuat::FindBetweenNormals(...)' if you know the vector is of unit length. + * + * @return Quaternion from the Vector's direction, without any roll. + * @see ToOrientationRotator(), FQuat::FindBetweenVectors() + */ + FQuat ToOrientationQuat() const; + + /** + * Return the FRotator orientation corresponding to the direction in which the vector points. + * Sets Yaw and Pitch to the proper numbers, and sets Roll to zero because the roll can't be determined from a vector. + * @note Identical to 'ToOrientationRotator()' and preserved for legacy reasons. + * @return FRotator from the Vector's direction. + * @see ToOrientationRotator(), ToOrientationQuat() + */ + FRotator Rotation() const; + + /** + * Find good arbitrary axis vectors to represent U and V axes of a plane, + * using this vector as the normal of the plane. + * + * @param Axis1 Reference to first axis. + * @param Axis2 Reference to second axis. + */ + void FindBestAxisVectors(FVector& Axis1, FVector& Axis2) const; + + /** When this vector contains Euler angles (degrees), ensure that angles are between +/-180 */ + void UnwindEuler(); + + /** + * Utility to check if there are any non-finite values (NaN or Inf) in this vector. + * + * @return true if there are any non-finite values in this vector, false otherwise. + */ + bool ContainsNaN() const; + + /** + * Check if the vector is of unit length, with specified tolerance. + * + * @param LengthSquaredTolerance Tolerance against squared length. + * @return true if the vector is a unit vector within the specified tolerance. + */ + FORCEINLINE bool IsUnit(float LengthSquaredTolerance = KINDA_SMALL_NUMBER) const; + + /** + * Get a textual representation of this vector. + * + * @return A string describing the vector. + */ + FString ToString() const; + + /** + * Initialize this Vector based on an FString. The String is expected to contain X=, Y=, Z=. + * The FVector will be bogus when InitFromString returns false. + * + * @param InSourceString FString containing the vector values. + * @return true if the X,Y,Z values were read successfully; false otherwise. + */ + bool InitFromString(const FString& InSourceString); + + /** + * Converts a Cartesian unit vector into spherical coordinates on the unit sphere. + * @return Output Theta will be in the range [0, PI], and output Phi will be in the range [-PI, PI]. + */ + FVector2D UnitCartesianToSpherical() const; + + /** + * Convert a direction vector into a 'heading' angle. + * + * @return 'Heading' angle between +/-PI. 0 is pointing down +X. + */ + float HeadingAngle() const; + + /** + * Create an orthonormal basis from a basis with at least two orthogonal vectors. + * It may change the directions of the X and Y axes to make the basis orthogonal, + * but it won't change the direction of the Z axis. + * All axes will be normalized. + * + * @param XAxis The input basis' XAxis, and upon return the orthonormal basis' XAxis. + * @param YAxis The input basis' YAxis, and upon return the orthonormal basis' YAxis. + * @param ZAxis The input basis' ZAxis, and upon return the orthonormal basis' ZAxis. + */ + static void CreateOrthonormalBasis(FVector& XAxis,FVector& YAxis,FVector& ZAxis); + + /** + * Compare two points and see if they're the same, using a threshold. + * + * @param P First vector. + * @param Q Second vector. + * @return Whether points are the same within a threshold. Uses fast distance approximation (linear per-component distance). + */ + static bool PointsAreSame(const FVector &P, const FVector &Q); + + /** + * Compare two points and see if they're within specified distance. + * + * @param Point1 First vector. + * @param Point2 Second vector. + * @param Dist Specified distance. + * @return Whether two points are within the specified distance. Uses fast distance approximation (linear per-component distance). + */ + static bool PointsAreNear(const FVector &Point1, const FVector &Point2, float Dist); + + /** + * Calculate the signed distance (in the direction of the normal) between a point and a plane. + * + * @param Point The Point we are checking. + * @param PlaneBase The Base Point in the plane. + * @param PlaneNormal The Normal of the plane (assumed to be unit length). + * @return Signed distance between point and plane. + */ + static float PointPlaneDist(const FVector &Point, const FVector &PlaneBase, const FVector &PlaneNormal); + + /** + * Calculate the projection of a point on the plane defined by counter-clockwise (CCW) points A,B,C. + * + * @param Point The point to project onto the plane + * @param A 1st of three points in CCW order defining the plane + * @param B 2nd of three points in CCW order defining the plane + * @param C 3rd of three points in CCW order defining the plane + * @return Projection of Point onto plane ABC + */ + static FVector PointPlaneProject(const FVector& Point, const FVector& A, const FVector& B, const FVector& C); + + /** + * Calculate the projection of a point on the plane defined by PlaneBase and PlaneNormal. + * + * @param Point The point to project onto the plane + * @param PlaneBase Point on the plane + * @param PlaneNorm Normal of the plane (assumed to be unit length). + * @return Projection of Point onto plane + */ + static FVector PointPlaneProject(const FVector& Point, const FVector& PlaneBase, const FVector& PlaneNormal); + + /** + * Calculate the projection of a vector on the plane defined by PlaneNormal. + * + * @param V The vector to project onto the plane. + * @param PlaneNormal Normal of the plane (assumed to be unit length). + * @return Projection of V onto plane. + */ + static FVector VectorPlaneProject(const FVector& V, const FVector& PlaneNormal); + + /** + * Euclidean distance between two points. + * + * @param V1 The first point. + * @param V2 The second point. + * @return The distance between two points. + */ + static FORCEINLINE float Dist(const FVector &V1, const FVector &V2); + static FORCEINLINE float Distance(const FVector &V1, const FVector &V2) { return Dist(V1, V2); } + + /** + * Euclidean distance between two points in the XY plane (ignoring Z). + * + * @param V1 The first point. + * @param V2 The second point. + * @return The distance between two points in the XY plane. + */ + static FORCEINLINE float DistXY(const FVector &V1, const FVector &V2); + static FORCEINLINE float Dist2D(const FVector &V1, const FVector &V2) { return DistXY(V1, V2); } + + /** + * Squared distance between two points. + * + * @param V1 The first point. + * @param V2 The second point. + * @return The squared distance between two points. + */ + static FORCEINLINE float DistSquared(const FVector &V1, const FVector &V2); + + /** + * Squared distance between two points in the XY plane only. + * + * @param V1 The first point. + * @param V2 The second point. + * @return The squared distance between two points in the XY plane + */ + static FORCEINLINE float DistSquaredXY(const FVector &V1, const FVector &V2); + static FORCEINLINE float DistSquared2D(const FVector &V1, const FVector &V2) { return DistSquaredXY(V1, V2); } + + /** + * Compute pushout of a box from a plane. + * + * @param Normal The plane normal. + * @param Size The size of the box. + * @return Pushout required. + */ + static FORCEINLINE float BoxPushOut(const FVector& Normal, const FVector& Size); + + /** + * See if two normal vectors are nearly parallel, meaning the angle between them is close to 0 degrees. + * + * @param Normal1 First normalized vector. + * @param Normal1 Second normalized vector. + * @param ParallelCosineThreshold Normals are parallel if absolute value of dot product (cosine of angle between them) is greater than or equal to this. For example: cos(1.0 degrees). + * @return true if vectors are nearly parallel, false otherwise. + */ + static bool Parallel(const FVector& Normal1, const FVector& Normal2, float ParallelCosineThreshold = THRESH_NORMALS_ARE_PARALLEL); + + /** + * See if two normal vectors are coincident (nearly parallel and point in the same direction). + * + * @param Normal1 First normalized vector. + * @param Normal2 Second normalized vector. + * @param ParallelCosineThreshold Normals are coincident if dot product (cosine of angle between them) is greater than or equal to this. For example: cos(1.0 degrees). + * @return true if vectors are coincident (nearly parallel and point in the same direction), false otherwise. + */ + static bool Coincident(const FVector& Normal1, const FVector& Normal2, float ParallelCosineThreshold = THRESH_NORMALS_ARE_PARALLEL); + + /** + * See if two normal vectors are nearly orthogonal (perpendicular), meaning the angle between them is close to 90 degrees. + * + * @param Normal1 First normalized vector. + * @param Normal2 Second normalized vector. + * @param OrthogonalCosineThreshold Normals are orthogonal if absolute value of dot product (cosine of angle between them) is less than or equal to this. For example: cos(89.0 degrees). + * @return true if vectors are orthogonal (perpendicular), false otherwise. + */ + static bool Orthogonal(const FVector& Normal1, const FVector& Normal2, float OrthogonalCosineThreshold = THRESH_NORMALS_ARE_ORTHOGONAL); + + /** + * See if two planes are coplanar. They are coplanar if the normals are nearly parallel and the planes include the same set of points. + * + * @param Base1 The base point in the first plane. + * @param Normal1 The normal of the first plane. + * @param Base2 The base point in the second plane. + * @param Normal2 The normal of the second plane. + * @param ParallelCosineThreshold Normals are parallel if absolute value of dot product is greater than or equal to this. + * @return true if the planes are coplanar, false otherwise. + */ + static bool Coplanar(const FVector& Base1, const FVector& Normal1, const FVector& Base2, const FVector& Normal2, float ParallelCosineThreshold = THRESH_NORMALS_ARE_PARALLEL); + + /** + * Triple product of three vectors: X dot (Y cross Z). + * + * @param X The first vector. + * @param Y The second vector. + * @param Z The third vector. + * @return The triple product: X dot (Y cross Z). + */ + static float Triple(const FVector& X, const FVector& Y, const FVector& Z); + + /** + * Generates a list of sample points on a Bezier curve defined by 2 points. + * + * @param ControlPoints Array of 4 FVectors (vert1, controlpoint1, controlpoint2, vert2). + * @param NumPoints Number of samples. + * @param OutPoints Receives the output samples. + * @return The path length. + */ + static float EvaluateBezier(const FVector* ControlPoints, int32 NumPoints, TArray& OutPoints); + + /** + * Converts a vector containing radian values to a vector containing degree values. + * + * @param RadVector Vector containing radian values + * @return Vector containing degree values + */ + static FVector RadiansToDegrees(const FVector& RadVector); + + /** + * Converts a vector containing degree values to a vector containing radian values. + * + * @param DegVector Vector containing degree values + * @return Vector containing radian values + */ + static FVector DegreesToRadians(const FVector& DegVector); +}; + +/* FVector inline functions + *****************************************************************************/ + +/** + * Multiplies a vector by a scaling factor. + * + * @param Scale Scaling factor. + * @param V Vector to scale. + * @return Result of multiplication. + */ +FORCEINLINE FVector operator*(float Scale, const FVector& V) +{ + return V.operator*(Scale); +} + +#if PLATFORM_LITTLE_ENDIAN + #define INTEL_ORDER_VECTOR(x) (x) +#else + static FORCEINLINE FVector INTEL_ORDER_VECTOR(FVector v) + { + return FVector(INTEL_ORDERF(v.X), INTEL_ORDERF(v.Y), INTEL_ORDERF(v.Z)); + } +#endif + + +/** + * Util to calculate distance from a point to a bounding box + * + * @param Mins 3D Point defining the lower values of the axis of the bound box + * @param Max 3D Point defining the lower values of the axis of the bound box + * @param Point 3D position of interest + * @return the distance from the Point to the bounding box. + */ +FORCEINLINE float ComputeSquaredDistanceFromBoxToPoint(const FVector& Mins, const FVector& Maxs, const FVector& Point) +{ + // Accumulates the distance as we iterate axis + float DistSquared = 0.f; + + // Check each axis for min/max and add the distance accordingly + // NOTE: Loop manually unrolled for > 2x speed up + if (Point.X < Mins.X) + { + DistSquared += FMath::Square(Point.X - Mins.X); + } + else if (Point.X > Maxs.X) + { + DistSquared += FMath::Square(Point.X - Maxs.X); + } + + if (Point.Y < Mins.Y) + { + DistSquared += FMath::Square(Point.Y - Mins.Y); + } + else if (Point.Y > Maxs.Y) + { + DistSquared += FMath::Square(Point.Y - Maxs.Y); + } + + if (Point.Z < Mins.Z) + { + DistSquared += FMath::Square(Point.Z - Mins.Z); + } + else if (Point.Z > Maxs.Z) + { + DistSquared += FMath::Square(Point.Z - Maxs.Z); + } + + return DistSquared; +} + + +FORCEINLINE FVector::FVector(const FVector2D V, float InZ) + : X(V.X), Y(V.Y), Z(InZ) +{ +} + +FORCEINLINE FIntVector::FIntVector( FVector InVector ) + : X(FMath::TruncToInt(InVector.X)) + , Y(FMath::TruncToInt(InVector.Y)) + , Z(FMath::TruncToInt(InVector.Z)) +{ } + +inline FVector FVector::RotateAngleAxis(const float AngleDeg, const FVector& Axis) const +{ + float S, C; + FMath::SinCos(&S, &C, FMath::DegreesToRadians(AngleDeg)); + + const float XX = Axis.X * Axis.X; + const float YY = Axis.Y * Axis.Y; + const float ZZ = Axis.Z * Axis.Z; + + const float XY = Axis.X * Axis.Y; + const float YZ = Axis.Y * Axis.Z; + const float ZX = Axis.Z * Axis.X; + + const float XS = Axis.X * S; + const float YS = Axis.Y * S; + const float ZS = Axis.Z * S; + + const float OMC = 1.f - C; + + return FVector( + (OMC * XX + C) * X + (OMC * XY - ZS) * Y + (OMC * ZX + YS) * Z, + (OMC * XY + ZS) * X + (OMC * YY + C) * Y + (OMC * YZ - XS) * Z, + (OMC * ZX - YS) * X + (OMC * YZ + XS) * Y + (OMC * ZZ + C) * Z + ); +} + +inline bool FVector::PointsAreSame(const FVector &P, const FVector &Q) +{ + float Temp; + Temp=P.X-Q.X; + if((Temp > -THRESH_POINTS_ARE_SAME) && (Temp < THRESH_POINTS_ARE_SAME)) + { + Temp=P.Y-Q.Y; + if((Temp > -THRESH_POINTS_ARE_SAME) && (Temp < THRESH_POINTS_ARE_SAME)) + { + Temp=P.Z-Q.Z; + if((Temp > -THRESH_POINTS_ARE_SAME) && (Temp < THRESH_POINTS_ARE_SAME)) + { + return true; + } + } + } + return false; +} + +inline bool FVector::PointsAreNear(const FVector &Point1, const FVector &Point2, float Dist) +{ + float Temp; + Temp=(Point1.X - Point2.X); if (FMath::Abs(Temp)>=Dist) return false; + Temp=(Point1.Y - Point2.Y); if (FMath::Abs(Temp)>=Dist) return false; + Temp=(Point1.Z - Point2.Z); if (FMath::Abs(Temp)>=Dist) return false; + return true; +} + +inline float FVector::PointPlaneDist +( + const FVector &Point, + const FVector &PlaneBase, + const FVector &PlaneNormal +) +{ + return (Point - PlaneBase) | PlaneNormal; +} + + +inline FVector FVector::PointPlaneProject(const FVector& Point, const FVector& PlaneBase, const FVector& PlaneNorm) +{ + //Find the distance of X from the plane + //Add the distance back along the normal from the point + return Point - FVector::PointPlaneDist(Point,PlaneBase,PlaneNorm) * PlaneNorm; +} + +inline FVector FVector::VectorPlaneProject(const FVector& V, const FVector& PlaneNormal) +{ + return V - V.ProjectOnToNormal(PlaneNormal); +} + +inline bool FVector::Parallel(const FVector& Normal1, const FVector& Normal2, float ParallelCosineThreshold) +{ + const float NormalDot = Normal1 | Normal2; + return FMath::Abs(NormalDot) >= ParallelCosineThreshold; +} + +inline bool FVector::Coincident(const FVector& Normal1, const FVector& Normal2, float ParallelCosineThreshold) +{ + const float NormalDot = Normal1 | Normal2; + return NormalDot >= ParallelCosineThreshold; +} + +inline bool FVector::Orthogonal(const FVector& Normal1, const FVector& Normal2, float OrthogonalCosineThreshold) +{ + const float NormalDot = Normal1 | Normal2; + return FMath::Abs(NormalDot) <= OrthogonalCosineThreshold; +} + +inline bool FVector::Coplanar(const FVector &Base1, const FVector &Normal1, const FVector &Base2, const FVector &Normal2, float ParallelCosineThreshold) +{ + if (!FVector::Parallel(Normal1,Normal2,ParallelCosineThreshold)) return false; + else if (FVector::PointPlaneDist (Base2,Base1,Normal1) > THRESH_POINT_ON_PLANE) return false; + else return true; +} + +inline float FVector::Triple(const FVector& X, const FVector& Y, const FVector& Z) +{ + return + ( (X.X * (Y.Y * Z.Z - Y.Z * Z.Y)) + + (X.Y * (Y.Z * Z.X - Y.X * Z.Z)) + + (X.Z * (Y.X * Z.Y - Y.Y * Z.X))); +} + +inline FVector FVector::RadiansToDegrees(const FVector& RadVector) +{ + return RadVector * (180.f / PI); +} + +inline FVector FVector::DegreesToRadians(const FVector& DegVector) +{ + return DegVector * (PI / 180.f); +} + +FORCEINLINE FVector::FVector(float InF) + : X(InF), Y(InF), Z(InF) +{ +} + +FORCEINLINE CONSTEXPR FVector::FVector(float InX, float InY, float InZ) + : X(InX), Y(InY), Z(InZ) +{ +} + +FORCEINLINE FVector::FVector(const FLinearColor& InColor) + : X(InColor.R), Y(InColor.G), Z(InColor.B) +{ +} + +FORCEINLINE FVector::FVector(FIntVector InVector) + : X(InVector.X), Y(InVector.Y), Z(InVector.Z) +{ +} + +FORCEINLINE FVector::FVector(FIntPoint A) + : X(A.X), Y(A.Y), Z(0.f) +{ +} + +FORCEINLINE FVector::FVector(EForceInit) + : X(0.0f), Y(0.0f), Z(0.0f) +{ +} + +#ifdef IMPLEMENT_ASSIGNMENT_OPERATOR_MANUALLY +FORCEINLINE FVector& FVector::operator=(const FVector& Other) +{ + this->X = Other.X; + this->Y = Other.Y; + this->Z = Other.Z; + + DiagnosticCheckNaN(); + + return *this; +} +#endif + +FORCEINLINE FVector FVector::operator^(const FVector& V) const +{ + return FVector + ( + Y * V.Z - Z * V.Y, + Z * V.X - X * V.Z, + X * V.Y - Y * V.X + ); +} + +FORCEINLINE FVector FVector::CrossProduct(const FVector& A, const FVector& B) +{ + return A ^ B; +} + +FORCEINLINE float FVector::operator|(const FVector& V) const +{ + return X*V.X + Y*V.Y + Z*V.Z; +} + +FORCEINLINE float FVector::DotProduct(const FVector& A, const FVector& B) +{ + return A | B; +} + +FORCEINLINE FVector FVector::operator+(const FVector& V) const +{ + return FVector(X + V.X, Y + V.Y, Z + V.Z); +} + +FORCEINLINE FVector FVector::operator-(const FVector& V) const +{ + return FVector(X - V.X, Y - V.Y, Z - V.Z); +} + +FORCEINLINE FVector FVector::operator-(float Bias) const +{ + return FVector(X - Bias, Y - Bias, Z - Bias); +} + +FORCEINLINE FVector FVector::operator+(float Bias) const +{ + return FVector(X + Bias, Y + Bias, Z + Bias); +} + +FORCEINLINE FVector FVector::operator*(float Scale) const +{ + return FVector(X * Scale, Y * Scale, Z * Scale); +} + +FORCEINLINE FVector FVector::operator/(float Scale) const +{ + const float RScale = 1.f/Scale; + return FVector(X * RScale, Y * RScale, Z * RScale); +} + +FORCEINLINE FVector FVector::operator*(const FVector& V) const +{ + return FVector(X * V.X, Y * V.Y, Z * V.Z); +} + +FORCEINLINE FVector FVector::operator/(const FVector& V) const +{ + return FVector(X / V.X, Y / V.Y, Z / V.Z); +} + +FORCEINLINE bool FVector::operator==(const FVector& V) const +{ + return X==V.X && Y==V.Y && Z==V.Z; +} + +FORCEINLINE bool FVector::operator!=(const FVector& V) const +{ + return X!=V.X || Y!=V.Y || Z!=V.Z; +} + +FORCEINLINE bool FVector::Equals(const FVector& V, float Tolerance) const +{ + return FMath::Abs(X-V.X) <= Tolerance && FMath::Abs(Y-V.Y) <= Tolerance && FMath::Abs(Z-V.Z) <= Tolerance; +} + +FORCEINLINE bool FVector::AllComponentsEqual(float Tolerance) const +{ + return FMath::Abs(X - Y) <= Tolerance && FMath::Abs(X - Z) <= Tolerance && FMath::Abs(Y - Z) <= Tolerance; +} + + +FORCEINLINE FVector FVector::operator-() const +{ + return FVector(-X, -Y, -Z); +} + + +FORCEINLINE FVector FVector::operator+=(const FVector& V) +{ + X += V.X; Y += V.Y; Z += V.Z; + return *this; +} + +FORCEINLINE FVector FVector::operator-=(const FVector& V) +{ + X -= V.X; Y -= V.Y; Z -= V.Z; + return *this; +} + +FORCEINLINE FVector FVector::operator*=(float Scale) +{ + X *= Scale; Y *= Scale; Z *= Scale; + return *this; +} + +FORCEINLINE FVector FVector::operator/=(float V) +{ + const float RV = 1.f/V; + X *= RV; Y *= RV; Z *= RV; + return *this; +} + +FORCEINLINE FVector FVector::operator*=(const FVector& V) +{ + X *= V.X; Y *= V.Y; Z *= V.Z; + return *this; +} + +FORCEINLINE FVector FVector::operator/=(const FVector& V) +{ + X /= V.X; Y /= V.Y; Z /= V.Z; + return *this; +} + +FORCEINLINE float& FVector::operator[](int32 Index) +{ + check(Index >= 0 && Index < 3); + if(Index == 0) + { + return X; + } + else if(Index == 1) + { + return Y; + } + else + { + return Z; + } +} + +FORCEINLINE float FVector::operator[](int32 Index)const +{ + check(Index >= 0 && Index < 3); + if(Index == 0) + { + return X; + } + else if(Index == 1) + { + return Y; + } + else + { + return Z; + } +} + +FORCEINLINE void FVector::Set(float InX, float InY, float InZ) +{ + X = InX; + Y = InY; + Z = InZ; +} + +FORCEINLINE float FVector::GetMax() const +{ + return FMath::Max(FMath::Max(X,Y),Z); +} + +FORCEINLINE float FVector::GetAbsMax() const +{ + return FMath::Max(FMath::Max(FMath::Abs(X),FMath::Abs(Y)),FMath::Abs(Z)); +} + +FORCEINLINE float FVector::GetMin() const +{ + return FMath::Min(FMath::Min(X,Y),Z); +} + +FORCEINLINE float FVector::GetAbsMin() const +{ + return FMath::Min(FMath::Min(FMath::Abs(X),FMath::Abs(Y)),FMath::Abs(Z)); +} + +FORCEINLINE FVector FVector::ComponentMin(const FVector& Other) const +{ + return FVector(FMath::Min(X, Other.X), FMath::Min(Y, Other.Y), FMath::Min(Z, Other.Z)); +} + +FORCEINLINE FVector FVector::ComponentMax(const FVector& Other) const +{ + return FVector(FMath::Max(X, Other.X), FMath::Max(Y, Other.Y), FMath::Max(Z, Other.Z)); +} + +FORCEINLINE FVector FVector::GetAbs() const +{ + return FVector(FMath::Abs(X), FMath::Abs(Y), FMath::Abs(Z)); +} + +FORCEINLINE float FVector::Size() const +{ + return FMath::Sqrt(X*X + Y*Y + Z*Z); +} + +FORCEINLINE float FVector::SizeSquared() const +{ + return X*X + Y*Y + Z*Z; +} + +FORCEINLINE float FVector::Size2D() const +{ + return FMath::Sqrt(X*X + Y*Y); +} + +FORCEINLINE float FVector::SizeSquared2D() const +{ + return X*X + Y*Y; +} + +FORCEINLINE bool FVector::IsNearlyZero(float Tolerance) const +{ + return + FMath::Abs(X)<=Tolerance + && FMath::Abs(Y)<=Tolerance + && FMath::Abs(Z)<=Tolerance; +} + +FORCEINLINE bool FVector::IsZero() const +{ + return X==0.f && Y==0.f && Z==0.f; +} + +FORCEINLINE bool FVector::Normalize(float Tolerance) +{ + const float SquareSum = X*X + Y*Y + Z*Z; + if(SquareSum > Tolerance) + { + const float Scale = FMath::InvSqrt(SquareSum); + X *= Scale; Y *= Scale; Z *= Scale; + return true; + } + return false; +} + +FORCEINLINE bool FVector::IsNormalized() const +{ + return (FMath::Abs(1.f - SizeSquared()) < THRESH_VECTOR_NORMALIZED); +} + +FORCEINLINE void FVector::ToDirectionAndLength(FVector &OutDir, float &OutLength) const +{ + OutLength = Size(); + if (OutLength > SMALL_NUMBER) + { + float OneOverLength = 1.0f/OutLength; + OutDir = FVector(X*OneOverLength, Y*OneOverLength, + Z*OneOverLength); + } + else + { + OutDir = FVector::ZeroVector; + } +} + +FORCEINLINE FVector FVector::GetSignVector() const +{ + return FVector + ( + FMath::FloatSelect(X, 1.f, -1.f), + FMath::FloatSelect(Y, 1.f, -1.f), + FMath::FloatSelect(Z, 1.f, -1.f) + ); +} + +FORCEINLINE FVector FVector::Projection() const +{ + const float RZ = 1.f/Z; + return FVector(X*RZ, Y*RZ, 1); +} + +FORCEINLINE FVector FVector::GetUnsafeNormal() const +{ + const float Scale = FMath::InvSqrt(X*X+Y*Y+Z*Z); + return FVector(X*Scale, Y*Scale, Z*Scale); +} + +FORCEINLINE FVector FVector::BoundToCube(float Radius) const +{ + return FVector + ( + FMath::Clamp(X,-Radius,Radius), + FMath::Clamp(Y,-Radius,Radius), + FMath::Clamp(Z,-Radius,Radius) + ); +} + +FORCEINLINE FVector FVector::GetClampedToSize(float Min, float Max) const +{ + float VecSize = Size(); + const FVector VecDir = (VecSize > SMALL_NUMBER) ? (*this/VecSize) : FVector::ZeroVector; + + VecSize = FMath::Clamp(VecSize, Min, Max); + + return VecSize * VecDir; +} + +FORCEINLINE FVector FVector::GetClampedToSize2D(float Min, float Max) const +{ + float VecSize2D = Size2D(); + const FVector VecDir = (VecSize2D > SMALL_NUMBER) ? (*this/VecSize2D) : FVector::ZeroVector; + + VecSize2D = FMath::Clamp(VecSize2D, Min, Max); + + return FVector(VecSize2D * VecDir.X, VecSize2D * VecDir.Y, Z); +} + +FORCEINLINE FVector FVector::GetClampedToMaxSize(float MaxSize) const +{ + if (MaxSize < KINDA_SMALL_NUMBER) + { + return FVector::ZeroVector; + } + + const float VSq = SizeSquared(); + if (VSq > FMath::Square(MaxSize)) + { + const float Scale = MaxSize * FMath::InvSqrt(VSq); + return FVector(X*Scale, Y*Scale, Z*Scale); + } + else + { + return *this; + } +} + +FORCEINLINE FVector FVector::GetClampedToMaxSize2D(float MaxSize) const +{ + if (MaxSize < KINDA_SMALL_NUMBER) + { + return FVector(0.f, 0.f, Z); + } + + const float VSq2D = SizeSquared2D(); + if (VSq2D > FMath::Square(MaxSize)) + { + const float Scale = MaxSize * FMath::InvSqrt(VSq2D); + return FVector(X*Scale, Y*Scale, Z); + } + else + { + return *this; + } +} + +FORCEINLINE float& FVector::Component(int32 Index) +{ + return (&X)[Index]; +} + +FORCEINLINE float FVector::Component(int32 Index) const +{ + return (&X)[Index]; +} + +FORCEINLINE FVector FVector::Reciprocal() const +{ + FVector RecVector; + if (X!=0.f) + { + RecVector.X = 1.f/X; + } + else + { + RecVector.X = BIG_NUMBER; + } + if (Y!=0.f) + { + RecVector.Y = 1.f/Y; + } + else + { + RecVector.Y = BIG_NUMBER; + } + if (Z!=0.f) + { + RecVector.Z = 1.f/Z; + } + else + { + RecVector.Z = BIG_NUMBER; + } + + return RecVector; +} + + + + +FORCEINLINE bool FVector::IsUniform(float Tolerance) const +{ + return AllComponentsEqual(Tolerance); +} + +FORCEINLINE FVector FVector::MirrorByVector(const FVector& MirrorNormal) const +{ + return *this - MirrorNormal * (2.f * (*this | MirrorNormal)); +} + +FORCEINLINE FVector FVector::GetSafeNormal(float Tolerance) const +{ + const float SquareSum = X*X + Y*Y + Z*Z; + + // Not sure if it's safe to add tolerance in there. Might introduce too many errors + if(SquareSum == 1.f) + { + return *this; + } + else if(SquareSum < Tolerance) + { + return FVector::ZeroVector; + } + const float Scale = FMath::InvSqrt(SquareSum); + return FVector(X*Scale, Y*Scale, Z*Scale); +} + +FORCEINLINE FVector FVector::GetSafeNormal2D(float Tolerance) const +{ + const float SquareSum = X*X + Y*Y; + + // Not sure if it's safe to add tolerance in there. Might introduce too many errors + if(SquareSum == 1.f) + { + if(Z == 0.f) + { + return *this; + } + else + { + return FVector(X, Y, 0.f); + } + } + else if(SquareSum < Tolerance) + { + return FVector::ZeroVector; + } + + const float Scale = FMath::InvSqrt(SquareSum); + return FVector(X*Scale, Y*Scale, 0.f); +} + +FORCEINLINE float FVector::CosineAngle2D(FVector B) const +{ + FVector A(*this); + A.Z = 0.0f; + B.Z = 0.0f; + A.Normalize(); + B.Normalize(); + return A | B; +} + +FORCEINLINE FVector FVector::ProjectOnTo(const FVector& A) const +{ + return (A * ((*this | A) / (A | A))); +} + +FORCEINLINE FVector FVector::ProjectOnToNormal(const FVector& Normal) const +{ + return (Normal * (*this | Normal)); +} + + +FORCEINLINE bool FVector::ContainsNaN() const +{ + return (!FMath::IsFinite(X) || + !FMath::IsFinite(Y) || + !FMath::IsFinite(Z)); +} + +FORCEINLINE bool FVector::IsUnit(float LengthSquaredTolerance) const +{ + return FMath::Abs(1.0f - SizeSquared()) < LengthSquaredTolerance; +} + +FORCEINLINE float FVector::HeadingAngle() const +{ + // Project Dir into Z plane. + FVector PlaneDir = *this; + PlaneDir.Z = 0.f; + PlaneDir = PlaneDir.GetSafeNormal(); + + float Angle = FMath::Acos(PlaneDir.X); + + if(PlaneDir.Y < 0.0f) + { + Angle *= -1.0f; + } + + return Angle; +} + +FORCEINLINE float FVector::Dist(const FVector &V1, const FVector &V2) +{ + return FMath::Sqrt(FVector::DistSquared(V1, V2)); +} + +FORCEINLINE float FVector::DistXY(const FVector &V1, const FVector &V2) +{ + return FMath::Sqrt(FVector::DistSquaredXY(V1, V2)); +} + +FORCEINLINE float FVector::DistSquared(const FVector &V1, const FVector &V2) +{ + return FMath::Square(V2.X-V1.X) + FMath::Square(V2.Y-V1.Y) + FMath::Square(V2.Z-V1.Z); +} + +FORCEINLINE float FVector::DistSquaredXY(const FVector &V1, const FVector &V2) +{ + return FMath::Square(V2.X-V1.X) + FMath::Square(V2.Y-V1.Y); +} + +FORCEINLINE float FVector::BoxPushOut(const FVector& Normal, const FVector& Size) +{ + return FMath::Abs(Normal.X*Size.X) + FMath::Abs(Normal.Y*Size.Y) + FMath::Abs(Normal.Z*Size.Z); +} + +FORCEINLINE FString FVector::ToString() const +{ + wchar_t buffer[256]; + swprintf_s(buffer, TEXT("X=%3.3f Y=%3.3f Z=%3.3f"), X, Y, Z); + + return FString(buffer); +} + +/** Component-wise clamp for FVector */ +FORCEINLINE FVector ClampVector(const FVector& V, const FVector& Min, const FVector& Max) +{ + return FVector( + FMath::Clamp(V.X,Min.X,Max.X), + FMath::Clamp(V.Y,Min.Y,Max.Y), + FMath::Clamp(V.Z,Min.Z,Max.Z) + ); +} + +#pragma warning(pop) + +template <> struct TIsPODType { enum { Value = true }; }; diff --git a/version/Core/Public/API/UE/Math/Vector2D.h b/version/Core/Public/API/UE/Math/Vector2D.h new file mode 100644 index 0000000..0fea433 --- /dev/null +++ b/version/Core/Public/API/UE/Math/Vector2D.h @@ -0,0 +1,831 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "UnrealMathUtility.h" +#include "../Containers/FString.h" +#include "IntPoint.h" + +#pragma warning(push) +#pragma warning(disable : 4244) + +/** + * A vector in 2-D space composed of components (X, Y) with floating point precision. + */ +struct FVector2D +{ + /** Vector's X component. */ + float X; + + /** Vector's Y component. */ + float Y; + +public: + + /** Global 2D zero vector constant (0,0) */ + static const FVector2D ZeroVector; + + /** Global 2D unit vector constant (1,1) */ + static const FVector2D UnitVector; + +public: + + /** Default constructor (no initialization). */ + FORCEINLINE FVector2D() { } + + /** + * Constructor using initial values for each component. + * + * @param InX X coordinate. + * @param InY Y coordinate. + */ + FORCEINLINE FVector2D(float InX, float InY); + + /** + * Constructs a vector from an FIntPoint. + * + * @param InPos Integer point used to set this vector. + */ + FORCEINLINE FVector2D(FIntPoint InPos); + + /** + * Constructor which initializes all components to zero. + * + * @param EForceInit Force init enum + */ + explicit FORCEINLINE FVector2D(EForceInit); + +public: + + /** + * Gets the result of adding two vectors together. + * + * @param V The other vector to add to this. + * @return The result of adding the vectors together. + */ + FORCEINLINE FVector2D operator+(const FVector2D& V) const; + + /** + * Gets the result of subtracting a vector from this one. + * + * @param V The other vector to subtract from this. + * @return The result of the subtraction. + */ + FORCEINLINE FVector2D operator-(const FVector2D& V) const; + + /** + * Gets the result of scaling the vector (multiplying each component by a value). + * + * @param Scale How much to scale the vector by. + * @return The result of scaling this vector. + */ + FORCEINLINE FVector2D operator*(float Scale) const; + + /** + * Gets the result of dividing each component of the vector by a value. + * + * @param Scale How much to divide the vector by. + * @return The result of division on this vector. + */ + FVector2D operator/(float Scale) const; + + /** + * Gets the result of this vector + float A. + * + * @param A Float to add to each component. + * @return The result of this vector + float A. + */ + FORCEINLINE FVector2D operator+(float A) const; + + /** + * Gets the result of subtracting from each component of the vector. + * + * @param A Float to subtract from each component + * @return The result of this vector - float A. + */ + FORCEINLINE FVector2D operator-(float A) const; + + /** + * Gets the result of component-wise multiplication of this vector by another. + * + * @param V The other vector to multiply this by. + * @return The result of the multiplication. + */ + FORCEINLINE FVector2D operator*(const FVector2D& V) const; + + /** + * Gets the result of component-wise division of this vector by another. + * + * @param V The other vector to divide this by. + * @return The result of the division. + */ + FVector2D operator/(const FVector2D& V) const; + + /** + * Calculates dot product of this vector and another. + * + * @param V The other vector. + * @return The dot product. + */ + FORCEINLINE float operator|(const FVector2D& V) const; + + /** + * Calculates cross product of this vector and another. + * + * @param V The other vector. + * @return The cross product. + */ + FORCEINLINE float operator^(const FVector2D& V) const; + +public: + + /** + * Compares this vector against another for equality. + * + * @param V The vector to compare against. + * @return true if the two vectors are equal, otherwise false. + */ + bool operator==(const FVector2D& V) const; + + /** + * Compares this vector against another for inequality. + * + * @param V The vector to compare against. + * @return true if the two vectors are not equal, otherwise false. + */ + bool operator!=(const FVector2D& V) const; + + /** + * Checks whether both components of this vector are less than another. + * + * @param Other The vector to compare against. + * @return true if this is the smaller vector, otherwise false. + */ + bool operator<(const FVector2D& Other) const; + + /** + * Checks whether both components of this vector are greater than another. + * + * @param Other The vector to compare against. + * @return true if this is the larger vector, otherwise false. + */ + bool operator>(const FVector2D& Other) const; + + /** + * Checks whether both components of this vector are less than or equal to another. + * + * @param Other The vector to compare against. + * @return true if this vector is less than or equal to the other vector, otherwise false. + */ + bool operator<=(const FVector2D& Other) const; + + /** + * Checks whether both components of this vector are greater than or equal to another. + * + * @param Other The vector to compare against. + * @return true if this vector is greater than or equal to the other vector, otherwise false. + */ + bool operator>=(const FVector2D& Other) const; + + /** + * Gets a negated copy of the vector. + * + * @return A negated copy of the vector. + */ + FORCEINLINE FVector2D operator-() const; + + /** + * Adds another vector to this. + * + * @param V The other vector to add. + * @return Copy of the vector after addition. + */ + FORCEINLINE FVector2D operator+=(const FVector2D& V); + + /** + * Subtracts another vector from this. + * + * @param V The other vector to subtract. + * @return Copy of the vector after subtraction. + */ + FORCEINLINE FVector2D operator-=(const FVector2D& V); + + /** + * Scales this vector. + * + * @param Scale The scale to multiply vector by. + * @return Copy of the vector after scaling. + */ + FORCEINLINE FVector2D operator*=(float Scale); + + /** + * Divides this vector. + * + * @param V What to divide vector by. + * @return Copy of the vector after division. + */ + FVector2D operator/=(float V); + + /** + * Multiplies this vector with another vector, using component-wise multiplication. + * + * @param V The vector to multiply with. + * @return Copy of the vector after multiplication. + */ + FVector2D operator*=(const FVector2D& V); + + /** + * Divides this vector by another vector, using component-wise division. + * + * @param V The vector to divide by. + * @return Copy of the vector after division. + */ + FVector2D operator/=(const FVector2D& V); + + /** + * Gets specific component of the vector. + * + * @param Index the index of vector component + * @return reference to component. + */ + float& operator[](int32 Index); + + /** + * Gets specific component of the vector. + * + * @param Index the index of vector component + * @return copy of component value. + */ + float operator[](int32 Index) const; + + /** + * Gets a specific component of the vector. + * + * @param Index The index of the component required. + * @return Reference to the specified component. + */ + float& Component(int32 Index); + + /** + * Gets a specific component of the vector. + * + * @param Index The index of the component required. + * @return Copy of the specified component. + */ + float Component(int32 Index) const; + +public: + + /** + * Calculates the dot product of two vectors. + * + * @param A The first vector. + * @param B The second vector. + * @return The dot product. + */ + FORCEINLINE static float DotProduct(const FVector2D& A, const FVector2D& B); + + /** + * Squared distance between two 2D points. + * + * @param V1 The first point. + * @param V2 The second point. + * @return The squared distance between two 2D points. + */ + FORCEINLINE static float DistSquared(const FVector2D& V1, const FVector2D& V2); + + /** + * Distance between two 2D points. + * + * @param V1 The first point. + * @param V2 The second point. + * @return The distance between two 2D points. + */ + FORCEINLINE static float Distance(const FVector2D& V1, const FVector2D& V2); + + /** + * Calculate the cross product of two vectors. + * + * @param A The first vector. + * @param B The second vector. + * @return The cross product. + */ + FORCEINLINE static float CrossProduct(const FVector2D& A, const FVector2D& B); + + /** + * Checks for equality with error-tolerant comparison. + * + * @param V The vector to compare. + * @param Tolerance Error tolerance. + * @return true if the vectors are equal within specified tolerance, otherwise false. + */ + bool Equals(const FVector2D& V, float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Set the values of the vector directly. + * + * @param InX New X coordinate. + * @param InY New Y coordinate. + */ + void Set(float InX, float InY); + + /** + * Get the maximum value of the vector's components. + * + * @return The maximum value of the vector's components. + */ + float GetMax() const; + + /** + * Get the maximum absolute value of the vector's components. + * + * @return The maximum absolute value of the vector's components. + */ + float GetAbsMax() const; + + /** + * Get the minimum value of the vector's components. + * + * @return The minimum value of the vector's components. + */ + float GetMin() const; + + /** + * Get the length (magnitude) of this vector. + * + * @return The length of this vector. + */ + float Size() const; + + /** + * Get the squared length of this vector. + * + * @return The squared length of this vector. + */ + float SizeSquared() const; + + /** + * Rotates around axis (0,0,1) + * + * @param AngleDeg Angle to rotate (in degrees) + * @return Rotated Vector + */ + FVector2D GetRotated(float AngleDeg) const; + + /** + * Gets a normalized copy of the vector, checking it is safe to do so based on the length. + * Returns zero vector if vector length is too small to safely normalize. + * + * @param Tolerance Minimum squared length of vector for normalization. + * @return A normalized copy of the vector if safe, (0,0) otherwise. + */ + FVector2D GetSafeNormal(float Tolerance=SMALL_NUMBER) const; + + /** + * Normalize this vector in-place if it is large enough, set it to (0,0) otherwise. + * + * @param Tolerance Minimum squared length of vector for normalization. + * @see GetSafeNormal() + */ + void Normalize(float Tolerance=SMALL_NUMBER); + + /** + * Checks whether vector is near to zero within a specified tolerance. + * + * @param Tolerance Error tolerance. + * @return true if vector is in tolerance to zero, otherwise false. + */ + bool IsNearlyZero(float Tolerance=KINDA_SMALL_NUMBER) const; + + /** + * Util to convert this vector into a unit direction vector and its original length. + * + * @param OutDir Reference passed in to store unit direction vector. + * @param OutLength Reference passed in to store length of the vector. + */ + void ToDirectionAndLength(FVector2D &OutDir, float &OutLength) const; + + /** + * Checks whether all components of the vector are exactly zero. + * + * @return true if vector is exactly zero, otherwise false. + */ + bool IsZero() const; + + /** + * Get this vector as an Int Point. + * + * @return New Int Point from this vector. + */ + FIntPoint IntPoint() const; + + /** + * Get this vector as a vector where each component has been rounded to the nearest int. + * + * @return New FVector2D from this vector that is rounded. + */ + FVector2D RoundToVector() const; + + /** + * Creates a copy of this vector with both axes clamped to the given range. + * @return New vector with clamped axes. + */ + FVector2D ClampAxes(float MinAxisVal, float MaxAxisVal) const; + + /** + * Get a copy of the vector as sign only. + * Each component is set to +1 or -1, with the sign of zero treated as +1. + * + * @param A copy of the vector with each component set to +1 or -1 + */ + FORCEINLINE FVector2D GetSignVector() const; + + /** + * Get a copy of this vector with absolute value of each component. + * + * @return A copy of this vector with absolute value of each component. + */ + FORCEINLINE FVector2D GetAbs() const; + + + /** + * Utility to check if there are any non-finite values (NaN or Inf) in this vector. + * + * @return true if there are any non-finite values in this vector, false otherwise. + */ + FORCEINLINE bool ContainsNaN() const + { + return (!FMath::IsFinite(X) || + !FMath::IsFinite(Y)); + } +}; + +/* FVector2D inline functions + *****************************************************************************/ + +FORCEINLINE FVector2D operator*(float Scale, const FVector2D& V) +{ + return V.operator*(Scale); +} + +template <> struct TIsPODType { enum { Value = true }; }; + + +FORCEINLINE FVector2D::FVector2D(float InX,float InY) + : X(InX), Y(InY) +{ } + + +FORCEINLINE FVector2D::FVector2D(FIntPoint InPos) +{ + X = (float)InPos.X; + Y = (float)InPos.Y; +} + + +FORCEINLINE FVector2D::FVector2D(EForceInit) + : X(0), Y(0) +{ +} + +FORCEINLINE FVector2D FVector2D::operator+(const FVector2D& V) const +{ + return FVector2D(X + V.X, Y + V.Y); +} + + +FORCEINLINE FVector2D FVector2D::operator-(const FVector2D& V) const +{ + return FVector2D(X - V.X, Y - V.Y); +} + + +FORCEINLINE FVector2D FVector2D::operator*(float Scale) const +{ + return FVector2D(X * Scale, Y * Scale); +} + + +FORCEINLINE FVector2D FVector2D::operator/(float Scale) const +{ + const float RScale = 1.f/Scale; + return FVector2D(X * RScale, Y * RScale); +} + + +FORCEINLINE FVector2D FVector2D::operator+(float A) const +{ + return FVector2D(X + A, Y + A); +} + + +FORCEINLINE FVector2D FVector2D::operator-(float A) const +{ + return FVector2D(X - A, Y - A); +} + + +FORCEINLINE FVector2D FVector2D::operator*(const FVector2D& V) const +{ + return FVector2D(X * V.X, Y * V.Y); +} + + +FORCEINLINE FVector2D FVector2D::operator/(const FVector2D& V) const +{ + return FVector2D(X / V.X, Y / V.Y); +} + + +FORCEINLINE float FVector2D::operator|(const FVector2D& V) const +{ + return X*V.X + Y*V.Y; +} + + +FORCEINLINE float FVector2D::operator^(const FVector2D& V) const +{ + return X*V.Y - Y*V.X; +} + + +FORCEINLINE float FVector2D::DotProduct(const FVector2D& A, const FVector2D& B) +{ + return A | B; +} + + +FORCEINLINE float FVector2D::DistSquared(const FVector2D &V1, const FVector2D &V2) +{ + return FMath::Square(V2.X-V1.X) + FMath::Square(V2.Y-V1.Y); +} + + +FORCEINLINE float FVector2D::Distance(const FVector2D& V1, const FVector2D& V2) +{ + return FMath::Sqrt(FVector2D::DistSquared(V1, V2)); +} + + +FORCEINLINE float FVector2D::CrossProduct(const FVector2D& A, const FVector2D& B) +{ + return A ^ B; +} + + +FORCEINLINE bool FVector2D::operator==(const FVector2D& V) const +{ + return X==V.X && Y==V.Y; +} + + +FORCEINLINE bool FVector2D::operator!=(const FVector2D& V) const +{ + return X!=V.X || Y!=V.Y; +} + + +FORCEINLINE bool FVector2D::operator<(const FVector2D& Other) const +{ + return X < Other.X && Y < Other.Y; +} + + +FORCEINLINE bool FVector2D::operator>(const FVector2D& Other) const +{ + return X > Other.X && Y > Other.Y; +} + + +FORCEINLINE bool FVector2D::operator<=(const FVector2D& Other) const +{ + return X <= Other.X && Y <= Other.Y; +} + + +FORCEINLINE bool FVector2D::operator>=(const FVector2D& Other) const +{ + return X >= Other.X && Y >= Other.Y; +} + + +FORCEINLINE bool FVector2D::Equals(const FVector2D& V, float Tolerance) const +{ + return FMath::Abs(X-V.X) <= Tolerance && FMath::Abs(Y-V.Y) <= Tolerance; +} + + +FORCEINLINE FVector2D FVector2D::operator-() const +{ + return FVector2D(-X, -Y); +} + + +FORCEINLINE FVector2D FVector2D::operator+=(const FVector2D& V) +{ + X += V.X; Y += V.Y; + return *this; +} + + +FORCEINLINE FVector2D FVector2D::operator-=(const FVector2D& V) +{ + X -= V.X; Y -= V.Y; + return *this; +} + + +FORCEINLINE FVector2D FVector2D::operator*=(float Scale) +{ + X *= Scale; Y *= Scale; + return *this; +} + + +FORCEINLINE FVector2D FVector2D::operator/=(float V) +{ + const float RV = 1.f/V; + X *= RV; Y *= RV; + return *this; +} + + +FORCEINLINE FVector2D FVector2D::operator*=(const FVector2D& V) +{ + X *= V.X; Y *= V.Y; + return *this; +} + + +FORCEINLINE FVector2D FVector2D::operator/=(const FVector2D& V) +{ + X /= V.X; Y /= V.Y; + return *this; +} + + +FORCEINLINE float& FVector2D::operator[](int32 Index) +{ + check(Index>=0 && Index<2); + return ((Index == 0) ? X : Y); +} + + +FORCEINLINE float FVector2D::operator[](int32 Index) const +{ + check(Index>=0 && Index<2); + return ((Index == 0) ? X : Y); +} + + +FORCEINLINE void FVector2D::Set(float InX, float InY) +{ + X = InX; + Y = InY; +} + + +FORCEINLINE float FVector2D::GetMax() const +{ + return FMath::Max(X,Y); +} + + +FORCEINLINE float FVector2D::GetAbsMax() const +{ + return FMath::Max(FMath::Abs(X),FMath::Abs(Y)); +} + + +FORCEINLINE float FVector2D::GetMin() const +{ + return FMath::Min(X,Y); +} + + +FORCEINLINE float FVector2D::Size() const +{ + return FMath::Sqrt(X*X + Y*Y); +} + + +FORCEINLINE float FVector2D::SizeSquared() const +{ + return X*X + Y*Y; +} + + +FORCEINLINE FVector2D FVector2D::GetRotated(const float AngleDeg) const +{ + // Based on FVector::RotateAngleAxis with Axis(0,0,1) + + float S, C; + FMath::SinCos(&S, &C, FMath::DegreesToRadians(AngleDeg)); + + const float OMC = 1.0f - C; + + return FVector2D( + C * X - S * Y, + S * X + C * Y); +} + + +FORCEINLINE FVector2D FVector2D::GetSafeNormal(float Tolerance) const +{ + const float SquareSum = X*X + Y*Y; + if(SquareSum > Tolerance) + { + const float Scale = FMath::InvSqrt(SquareSum); + return FVector2D(X*Scale, Y*Scale); + } + return FVector2D(0.f, 0.f); +} + + +FORCEINLINE void FVector2D::Normalize(float Tolerance) +{ + const float SquareSum = X*X + Y*Y; + if(SquareSum > Tolerance) + { + const float Scale = FMath::InvSqrt(SquareSum); + X *= Scale; + Y *= Scale; + return; + } + X = 0.0f; + Y = 0.0f; +} + + +FORCEINLINE void FVector2D::ToDirectionAndLength(FVector2D &OutDir, float &OutLength) const +{ + OutLength = Size(); + if (OutLength > SMALL_NUMBER) + { + float OneOverLength = 1.0f / OutLength; + OutDir = FVector2D(X*OneOverLength, Y*OneOverLength); + } + else + { + OutDir = FVector2D::ZeroVector; + } +} + + +FORCEINLINE bool FVector2D::IsNearlyZero(float Tolerance) const +{ + return FMath::Abs(X)<=Tolerance + && FMath::Abs(Y)<=Tolerance; +} + + +FORCEINLINE bool FVector2D::IsZero() const +{ + return X==0.f && Y==0.f; +} + + +FORCEINLINE float& FVector2D::Component(int32 Index) +{ + return (&X)[Index]; +} + + +FORCEINLINE float FVector2D::Component(int32 Index) const +{ + return (&X)[Index]; +} + + +FORCEINLINE FIntPoint FVector2D::IntPoint() const +{ + return FIntPoint(FMath::RoundToInt(X), FMath::RoundToInt(Y)); +} + +FORCEINLINE FVector2D FVector2D::RoundToVector() const +{ + return FVector2D(FMath::RoundToInt(X), FMath::RoundToInt(Y)); +} + +FORCEINLINE FVector2D FVector2D::ClampAxes(float MinAxisVal, float MaxAxisVal) const +{ + return FVector2D(FMath::Clamp(X, MinAxisVal, MaxAxisVal), FMath::Clamp(Y, MinAxisVal, MaxAxisVal)); +} + + +FORCEINLINE FVector2D FVector2D::GetSignVector() const +{ + return FVector2D + ( + FMath::FloatSelect(X, 1.f, -1.f), + FMath::FloatSelect(Y, 1.f, -1.f) + ); +} + +FORCEINLINE FVector2D FVector2D::GetAbs() const +{ + return FVector2D(FMath::Abs(X), FMath::Abs(Y)); +} + +#pragma warning(pop) diff --git a/version/Core/Public/API/UE/Misc/ByteSwap.h b/version/Core/Public/API/UE/Misc/ByteSwap.h new file mode 100644 index 0000000..f26f03e --- /dev/null +++ b/version/Core/Public/API/UE/Misc/ByteSwap.h @@ -0,0 +1,84 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +// These macros are not safe to use unless data is UNSIGNED! +#define BYTESWAP_ORDER16_unsigned(x) ((((x) >> 8) & 0xff) + (((x) << 8) & 0xff00)) +#define BYTESWAP_ORDER32_unsigned(x) (((x) >> 24) + (((x) >> 8) & 0xff00) + (((x) << 8) & 0xff0000) + ((x) << 24)) + + +static FORCEINLINE uint16 BYTESWAP_ORDER16 (uint16 val) +{ + return(BYTESWAP_ORDER16_unsigned(val)); +} + +static FORCEINLINE int16 BYTESWAP_ORDER16 (int16 val) +{ + uint16 uval = *((uint16*)&val); + uval = BYTESWAP_ORDER16_unsigned(uval); + + return *((int16*) &uval); +} + +static FORCEINLINE uint32 BYTESWAP_ORDER32 (uint32 val) +{ + return (BYTESWAP_ORDER32_unsigned(val)); +} + +static FORCEINLINE int32 BYTESWAP_ORDER32 (int32 val) +{ + uint32 uval = *((uint32*)&val); + uval = BYTESWAP_ORDER32_unsigned(uval); + + return *((int32*)&uval); +} + +static FORCEINLINE float BYTESWAP_ORDERF (float val) +{ + uint32 uval = *((uint32*)&val); + uval = BYTESWAP_ORDER32_unsigned(uval); + + return *((float*) &uval); +} + +static FORCEINLINE uint64 BYTESWAP_ORDER64 (uint64 Value) +{ + uint64 Swapped = 0; + uint8* Forward = (uint8*)&Value; + uint8* Reverse = (uint8*)&Swapped + 7; + for( int32 i=0; i<8; i++ ) + { + *(Reverse--) = *(Forward++); // copy into Swapped + } + return Swapped; +} + +static FORCEINLINE int64 BYTESWAP_ORDER64 (int64 Value) +{ + int64 Swapped = 0; + uint8* Forward = (uint8*)&Value; + uint8* Reverse = (uint8*)&Swapped + 7; + + for (int32 i = 0; i < 8; i++) + { + *(Reverse--) = *(Forward++); // copy into Swapped + } + + return Swapped; +} + +static FORCEINLINE void BYTESWAP_ORDER_TCHARARRAY (TCHAR* str) +{ + for (TCHAR* c = str; *c; ++c) + { + *c = BYTESWAP_ORDER16_unsigned(*c); + } +} + +#define INTEL_ORDER16(x) (x) +#define INTEL_ORDER32(x) (x) +#define INTEL_ORDERF(x) (x) +#define INTEL_ORDER64(x) (x) +#define INTEL_ORDER_TCHARARRAY(x) diff --git a/version/Core/Public/API/UE/Misc/CString.h b/version/Core/Public/API/UE/Misc/CString.h new file mode 100644 index 0000000..00bbad1 --- /dev/null +++ b/version/Core/Public/API/UE/Misc/CString.h @@ -0,0 +1,779 @@ +#pragma once + +#include "Char.h" +#include "../Windows/MicrosoftPlatformString.h" + +#define MAX_SPRINTF 1024 + +/** + * Set of basic string utility functions operating on plain C strings. In addition to the + * wrapped C string API,this struct also contains a set of widely used utility functions that + * operate on c strings. + * There is a specialized implementation for ANSICHAR and WIDECHAR strings provided. To access these + * functionality, the convenience typedefs FCString and FCStringAnsi are provided. + **/ +template +struct TCString +{ + typedef T CharType; + + /** + * Returns whether this string contains only pure ansi characters + * @param Str - string that will be checked + **/ + static FORCEINLINE bool IsPureAnsi(const CharType* Str); + + /** + * Returns whether this string contains only numeric characters + * @param Str - string that will be checked + **/ + static bool IsNumeric(const CharType* Str) + { + if (*Str == '-' || *Str == '+') + { + ++Str; + } + + bool bHasDot = false; + while (*Str != '\0') + { + if (*Str == '.') + { + if (bHasDot) + { + return false; + } + bHasDot = true; + } + else if (!FChar::IsDigit(*Str)) + { + return false; + } + + ++Str; + } + + return true; + } + + /** + * strcpy wrapper + * + * @param Dest - destination string to copy to + * @param Destcount - size of Dest in characters + * @param Src - source string + * @return destination string + */ + static FORCEINLINE CharType* Strcpy(CharType* Dest, SIZE_T DestCount, const CharType* Src); + + /** + * Copy a string with length checking. Behavior differs from strncpy in that last character is zeroed. + * + * @param Dest - destination buffer to copy to + * @param Src - source buffer to copy from + * @param MaxLen - max length of the buffer (including null-terminator) + * @return pointer to resulting string buffer + */ + static FORCEINLINE CharType* Strncpy(CharType* Dest, const CharType* Src, int32 MaxLen); + + /** + * strcpy wrapper + * (templated version to automatically handle static destination array case) + * + * @param Dest - destination string to copy to + * @param Src - source string + * @return destination string + */ + template + static FORCEINLINE CharType* Strcpy(CharType (&Dest)[DestCount], const CharType* Src) + { + return Strcpy(Dest, DestCount, Src); + } + + /** + * strcat wrapper + * + * @param Dest - destination string to copy to + * @param Destcount - size of Dest in characters + * @param Src - source string + * @return destination string + */ + static FORCEINLINE CharType* Strcat(CharType* Dest, SIZE_T DestCount, const CharType* Src); + + /** + * strcat wrapper + * (templated version to automatically handle static destination array case) + * + * @param Dest - destination string to copy to + * @param Src - source string + * @return destination string + */ + template + static FORCEINLINE CharType* Strcat(CharType (&Dest)[DestCount], const CharType* Src) + { + return Strcat(Dest, DestCount, Src); + } + + /** + * Concatenate a string with length checking. + * + * @param Dest - destination buffer to append to + * @param Src - source buffer to copy from + * @param MaxLen - max length of the buffer + * @return pointer to resulting string buffer + */ + static CharType* Strncat(CharType* Dest, const CharType* Src, int32 MaxLen) + { + int32 Len = Strlen(Dest); + CharType* NewDest = Dest + Len; + if ((MaxLen -= Len) > 0) + { + Strncpy(NewDest, Src, MaxLen); + } + return Dest; + } + + /** + * strupr wrapper + * + * @param Dest - destination string to convert + * @param Destcount - size of Dest in characters + * @return destination string + */ + static FORCEINLINE CharType* Strupr(CharType* Dest, SIZE_T DestCount); + + + /** + * strupr wrapper + * (templated version to automatically handle static destination array case) + * + * @param Dest - destination string to convert + * @return destination string + */ + template + static FORCEINLINE CharType* Strupr(CharType (&Dest)[DestCount]) + { + return Strupr(Dest, DestCount); + } + + /** + * strcmp wrapper + **/ + static FORCEINLINE int32 Strcmp(const CharType* String1, const CharType* String2); + + /** + * strncmp wrapper + */ + static FORCEINLINE int32 Strncmp(const CharType* String1, const CharType* String2, SIZE_T Count); + + /** + * stricmp wrapper + */ + static FORCEINLINE int32 Stricmp(const CharType* String1, const CharType* String2); + + /** + * strnicmp wrapper + */ + static FORCEINLINE int32 Strnicmp(const CharType* String1, const CharType* String2, SIZE_T Count); + + /** + * Returns a static string that is filled with a variable number of spaces + * + * @param NumSpaces Number of spaces to put into the string, max of 255 + * + * @return The string of NumSpaces spaces. + */ + static const CharType* Spc(int32 NumSpaces); + + /** + * Returns a static string that is filled with a variable number of tabs + * + * @param NumTabs Number of tabs to put into the string, max of 255 + * + * @return The string of NumTabs tabs. + */ + static const CharType* Tab(int32 NumTabs); + + /** + * Find string in string, case sensitive, requires non-alphanumeric lead-in. + */ + static const CharType* Strfind(const CharType* Str, const CharType* Find); + + /** + * Find string in string, case insensitive, requires non-alphanumeric lead-in. + */ + static const CharType* Strifind(const CharType* Str, const CharType* Find); + + /** + * Finds string in string, case insensitive, requires the string be surrounded by one the specified + * delimiters, or the start or end of the string. + */ + static const CharType* StrfindDelim(const CharType* Str, const CharType* Find, + const CharType* Delim = LITERAL(CharType, " \t,")); + + /** + * Finds string in string, case insensitive + * @param Str The string to look through + * @param Find The string to find inside Str + * @return Position in Str if Find was found, otherwise, NULL + */ + static const CharType* Stristr(const CharType* Str, const CharType* Find); + + /** + * Finds string in string, case insensitive (non-const version) + * @param Str The string to look through + * @param Find The string to find inside Str + * @return Position in Str if Find was found, otherwise, NULL + */ + static CharType* Stristr(CharType* Str, const CharType* Find) + { + return (CharType*)Stristr((const CharType*)Str, Find); + } + + /** + * strlen wrapper + */ + static FORCEINLINE int32 Strlen(const CharType* String); + + /** + * strstr wrapper + */ + static FORCEINLINE const CharType* Strstr(const CharType* String, const CharType* Find); + static FORCEINLINE CharType* Strstr(CharType* String, const CharType* Find); + + /** + * strchr wrapper + */ + static FORCEINLINE const CharType* Strchr(const CharType* String, CharType c); + static FORCEINLINE CharType* Strchr(CharType* String, CharType c); + + /** + * strrchr wrapper + */ + static FORCEINLINE const CharType* Strrchr(const CharType* String, CharType c); + static FORCEINLINE CharType* Strrchr(CharType* String, CharType c); + + /** + * strrstr wrapper + */ + static FORCEINLINE const CharType* Strrstr(const CharType* String, const CharType* Find); + static FORCEINLINE CharType* Strrstr(CharType* String, const CharType* Find); + + /** + * strspn wrapper + */ + static FORCEINLINE int32 Strspn(const CharType* String, const CharType* Mask); + + /** + * strcspn wrapper + */ + static FORCEINLINE int32 Strcspn(const CharType* String, const CharType* Mask); + + /** + * atoi wrapper + */ + static FORCEINLINE int32 Atoi(const CharType* String); + + /** + * atoi64 wrapper + */ + static FORCEINLINE int64 Atoi64(const CharType* String); + + /** + * atof wrapper + */ + static FORCEINLINE float Atof(const CharType* String); + + /** + * atod wrapper + */ + static FORCEINLINE double Atod(const CharType* String); + + /** + * Converts a string into a boolean value + * 1, "True", "Yes", GTrue, GYes, and non-zero integers become true + * 0, "False", "No", GFalse, GNo, and unparsable values become false + * + * @return The boolean value + */ + static FORCEINLINE bool ToBool(const CharType* String); + + /** + * strtoi wrapper + */ + static FORCEINLINE int32 Strtoi(const CharType* Start, CharType** End, int32 Base); + + /** + * strtoi wrapper + */ + static FORCEINLINE int64 Strtoi64(const CharType* Start, CharType** End, int32 Base); + + /** + * strtoui wrapper + */ + static FORCEINLINE uint64 Strtoui64(const CharType* Start, CharType** End, int32 Base); + + /** + * strtok wrapper + */ + static FORCEINLINE CharType* Strtok(CharType* TokenString, const CharType* Delim, CharType** Context); + + /** + * Helper function to write formatted output using an argument list + * + * @param Dest - destination string buffer + * @param DestSize - size of destination buffer + * @param Count - number of characters to write (not including null terminating character) + * @param Fmt - string to print + * @param Args - argument list + * @return number of characters written or -1 if truncated + */ + static FORCEINLINE int32 GetVarArgs(CharType* Dest, SIZE_T DestSize, int32 Count, const CharType*& Fmt, + va_list ArgPtr); +}; + +typedef TCString FCString; +typedef TCString FCStringAnsi; +typedef TCString FCStringWide; + +/*----------------------------------------------------------------------------- + generic TCString implementations +-----------------------------------------------------------------------------*/ + +template +struct TCStringSpcHelper +{ + /** Number of characters to be stored in string. */ + static const int32 MAX_SPACES = 255; + + /** Number of tabs to be stored in string. */ + static const int32 MAX_TABS = 255; +}; + +template +const typename TCString::CharType* TCString::Spc(int32 NumSpaces) +{ + check(NumSpaces >= 0 && NumSpaces <= TCStringSpcHelper::MAX_SPACES); + return TCStringSpcHelper::SpcArray + TCStringSpcHelper::MAX_SPACES - NumSpaces; +} + +template +const typename TCString::CharType* TCString::Tab(int32 NumTabs) +{ + return TCStringSpcHelper::TabArray + TCStringSpcHelper::MAX_TABS - NumTabs; +} + +// +// Find string in string, case sensitive, requires non-alphanumeric lead-in. +// +template +const typename TCString::CharType* TCString::Strfind(const CharType* Str, const CharType* Find) +{ + if (Find == nullptr || Str == nullptr) + { + return nullptr; + } + + bool Alnum = false; + CharType f = *Find; + int32 Length = Strlen(Find++) - 1; + CharType c = *Str++; + while (c) + { + if (!Alnum && c == f && !Strncmp(Str, Find, Length)) + { + return Str - 1; + } + Alnum = (c >= LITERAL(CharType, 'A') && c <= LITERAL(CharType, 'Z')) || + (c >= LITERAL(CharType, 'a') && c <= LITERAL(CharType, 'z')) || + (c >= LITERAL(CharType, '0') && c <= LITERAL(CharType, '9')); + c = *Str++; + } + return nullptr; +} + +// +// Find string in string, case insensitive, requires non-alphanumeric lead-in. +// +template +const typename TCString::CharType* TCString::Strifind(const CharType* Str, const CharType* Find) +{ + if (Find == nullptr || Str == nullptr) + { + return nullptr; + } + + bool Alnum = false; + CharType f = (*Find < LITERAL(CharType, 'a') || *Find > LITERAL(CharType, 'z')) + ? (*Find) + : (*Find + LITERAL(CharType,'A') - LITERAL(CharType,'a')); + int32 Length = Strlen(Find++) - 1; + CharType c = *Str++; + while (c) + { + if (c >= LITERAL(CharType, 'a') && c <= LITERAL(CharType, 'z')) + { + c += LITERAL(CharType, 'A') - LITERAL(CharType, 'a'); + } + if (!Alnum && c == f && !Strnicmp(Str, Find, Length)) + { + return Str - 1; + } + Alnum = (c >= LITERAL(CharType,'A') && c <= LITERAL(CharType,'Z')) || + (c >= LITERAL(CharType,'0') && c <= LITERAL(CharType,'9')); + c = *Str++; + } + return nullptr; +} + +// +// Finds string in string, case insensitive, requires the string be surrounded by one the specified +// delimiters, or the start or end of the string. +// +template +const typename TCString::CharType* TCString::StrfindDelim(const CharType* Str, const CharType* Find, + const CharType* Delim) +{ + if (Find == nullptr || Str == nullptr) + { + return nullptr; + } + + int32 Length = Strlen(Find); + const T* Found = Stristr(Str, Find); + if (Found) + { + // check if this occurrence is delimited correctly + if ((Found == Str || Strchr(Delim, Found[-1]) != nullptr) && // either first char, or following a delim + (Found[Length] == LITERAL(CharType,'\0') || Strchr(Delim, Found[Length]) != nullptr)) + // either last or with a delim following + { + return Found; + } + + // start searching again after the first matched character + for (;;) + { + Str = Found + 1; + Found = Stristr(Str, Find); + + if (Found == nullptr) + { + return nullptr; + } + + // check if the next occurrence is delimited correctly + if ((Strchr(Delim, Found[-1]) != nullptr) && // match is following a delim + (Found[Length] == LITERAL(CharType,'\0') || Strchr(Delim, Found[Length]) != nullptr)) + // either last or with a delim following + { + return Found; + } + } + } + + return nullptr; +} + +/** + * Finds string in string, case insensitive + * @param Str The string to look through + * @param Find The string to find inside Str + * @return Position in Str if Find was found, otherwise, NULL + */ +template +const typename TCString::CharType* TCString::Stristr(const CharType* Str, const CharType* Find) +{ + // both strings must be valid + if (Find == nullptr || Str == nullptr) + { + return nullptr; + } + + // get upper-case first letter of the find string (to reduce the number of full strnicmps) + CharType FindInitial = TChar::ToUpper(*Find); + // get length of find string, and increment past first letter + int32 Length = Strlen(Find++) - 1; + // get the first letter of the search string, and increment past it + CharType StrChar = *Str++; + // while we aren't at end of string... + while (StrChar) + { + // make sure it's upper-case + StrChar = TChar::ToUpper(StrChar); + // if it matches the first letter of the find string, do a case-insensitive string compare for the length of the find string + if (StrChar == FindInitial && !Strnicmp(Str, Find, Length)) + { + // if we found the string, then return a pointer to the beginning of it in the search string + return Str - 1; + } + // go to next letter + StrChar = *Str++; + } + + // if nothing was found, return NULL + return nullptr; +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strcpy(CharType* Dest, SIZE_T DestCount, const CharType* Src) +{ + return FPlatformString::Strcpy(Dest, DestCount, Src); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strncpy(CharType* Dest, const CharType* Src, int32 MaxLen) +{ + FPlatformString::Strncpy(Dest, Src, MaxLen); + return Dest; +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strcat(CharType* Dest, SIZE_T DestCount, const CharType* Src) +{ + return FPlatformString::Strcat(Dest, DestCount, Src); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strupr(CharType* Dest, SIZE_T DestCount) +{ + return FPlatformString::Strupr(Dest, DestCount); +} + +template +FORCEINLINE +int32 TCString::Strcmp(const CharType* String1, const CharType* String2) +{ + return FPlatformString::Strcmp(String1, String2); +} + +template +FORCEINLINE +int32 TCString::Strncmp(const CharType* String1, const CharType* String2, SIZE_T Count) +{ + return FPlatformString::Strncmp(String1, String2, Count); +} + +template +FORCEINLINE +int32 TCString::Stricmp(const CharType* String1, const CharType* String2) +{ + return FPlatformString::Stricmp(String1, String2); +} + +template +FORCEINLINE +int32 TCString::Strnicmp(const CharType* String1, const CharType* String2, SIZE_T Count) +{ + return FPlatformString::Strnicmp(String1, String2, Count); +} + +template +FORCEINLINE +int32 TCString::Strlen(const CharType* String) +{ + return FPlatformString::Strlen(String); +} + +template +FORCEINLINE +const typename TCString::CharType* TCString::Strstr(const CharType* String, const CharType* Find) +{ + return FPlatformString::Strstr(String, Find); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strstr(CharType* String, const CharType* Find) +{ + return (CharType*)FPlatformString::Strstr(String, Find); +} + +template +FORCEINLINE +const typename TCString::CharType* TCString::Strchr(const CharType* String, CharType c) +{ + return FPlatformString::Strchr(String, c); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strchr(CharType* String, CharType c) +{ + return (CharType*)FPlatformString::Strchr(String, c); +} + +template +FORCEINLINE +const typename TCString::CharType* TCString::Strrchr(const CharType* String, CharType c) +{ + return FPlatformString::Strrchr(String, c); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strrchr(CharType* String, CharType c) +{ + return (CharType*)FPlatformString::Strrchr(String, c); +} + +template +FORCEINLINE +const typename TCString::CharType* TCString::Strrstr(const CharType* String, const CharType* Find) +{ + return Strrstr((CharType*)String, Find); +} + +template +FORCEINLINE +typename TCString::CharType* TCString::Strrstr(CharType* String, const CharType* Find) +{ + if (*Find == (CharType)0) + { + return String + Strlen(String); + } + + CharType* Result = nullptr; + for (;;) + { + CharType* Found = Strstr(String, Find); + if (!Found) + { + return Result; + } + + Result = Found; + String = Found + 1; + } +} + +template +FORCEINLINE +int32 TCString::Strspn(const CharType* String, const CharType* Mask) +{ + const TCHAR* StringIt = String; + while (*StringIt) + { + for (const TCHAR* MaskIt = Mask; *MaskIt; ++MaskIt) + { + if (*StringIt == *MaskIt) + { + goto NextChar; + } + } + + return StringIt - String; + + NextChar: + ++StringIt; + } + + return StringIt - String; +} + +template +FORCEINLINE +int32 TCString::Strcspn(const CharType* String, const CharType* Mask) +{ + const TCHAR* StringIt = String; + while (*StringIt) + { + for (const TCHAR* MaskIt = Mask; *MaskIt; ++MaskIt) + { + if (*StringIt == *MaskIt) + { + return StringIt - String; + } + } + + ++StringIt; + } + + return StringIt - String; +} + +template +FORCEINLINE +int32 TCString::Atoi(const CharType* String) +{ + return FPlatformString::Atoi(String); +} + +template +FORCEINLINE +int64 TCString::Atoi64(const CharType* String) +{ + return FPlatformString::Atoi64(String); +} + +template +FORCEINLINE +float TCString::Atof(const CharType* String) +{ + return FPlatformString::Atof(String); +} + +template +FORCEINLINE +double TCString::Atod(const CharType* String) +{ + return FPlatformString::Atod(String); +} + +template +FORCEINLINE +int32 TCString::Strtoi(const CharType* Start, CharType** End, int32 Base) +{ + return FPlatformString::Strtoi(Start, End, Base); +} + +template +FORCEINLINE +int64 TCString::Strtoi64(const CharType* Start, CharType** End, int32 Base) +{ + return FPlatformString::Strtoi64(Start, End, Base); +} + +template +FORCEINLINE +uint64 TCString::Strtoui64(const CharType* Start, CharType** End, int32 Base) +{ + return FPlatformString::Strtoui64(Start, End, Base); +} + + +template +FORCEINLINE +typename TCString::CharType* TCString::Strtok(CharType* TokenString, const CharType* Delim, CharType** Context) +{ + return FPlatformString::Strtok(TokenString, Delim, Context); +} + +template +FORCEINLINE +int32 TCString::GetVarArgs(CharType* Dest, SIZE_T DestSize, int32 Count, const CharType*& Fmt, va_list ArgPtr) +{ + return FPlatformString::GetVarArgs(Dest, DestSize, Count, Fmt, ArgPtr); +} + + +/*----------------------------------------------------------------------------- + TCString specializations +-----------------------------------------------------------------------------*/ +template <> +FORCEINLINE +bool TCString::IsPureAnsi(const WIDECHAR* Str) +{ + for (; *Str; Str++) + { + if (*Str > 0x7f) + { + return false; + } + } + return true; +} diff --git a/version/Core/Public/API/UE/Misc/Char.h b/version/Core/Public/API/UE/Misc/Char.h new file mode 100644 index 0000000..83c8b64 --- /dev/null +++ b/version/Core/Public/API/UE/Misc/Char.h @@ -0,0 +1,223 @@ +#pragma once + +#include "../BasicTypes.h" + +#include +#include + +/*----------------------------------------------------------------------------- + Character type functions. +-----------------------------------------------------------------------------*/ + +/** + * Templated literal struct to allow selection of wide or ansi string literals + * based on the character type provided, and not on compiler switches. + */ +template +struct TLiteral +{ + static const ANSICHAR Select(const ANSICHAR ansi, const WIDECHAR) { return ansi; } + static const ANSICHAR* Select(const ANSICHAR* ansi, const WIDECHAR*) { return ansi; } +}; + +template <> +struct TLiteral +{ + static const WIDECHAR Select(const ANSICHAR, const WIDECHAR wide) { return wide; } + static const WIDECHAR* Select(const ANSICHAR*, const WIDECHAR* wide) { return wide; } +}; + +#define LITERAL(CharType, StringLiteral) TLiteral::Select(StringLiteral, L##StringLiteral) + +/** + * TChar + * Set of utility functions operating on a single character. The functions + * are specialized for ANSICHAR and TCHAR character types. You can use the + * typedefs FChar and FCharAnsi for convenience. + */ + +template +struct TCharBase +{ + typedef T CharType; + + static const CharType LineFeed = L'\x000A'; + static const CharType VerticalTab = L'\x000B'; + static const CharType FormFeed = L'\x000C'; + static const CharType CarriageReturn = L'\x000D'; + static const CharType NextLine = L'\x0085'; + static const CharType LineSeparator = L'\x2028'; + static const CharType ParagraphSeparator = L'\x2029'; +}; + +template +struct TCharBase +{ + typedef T CharType; + + static const CharType LineFeed = '\x000A'; + static const CharType VerticalTab = '\x000B'; + static const CharType FormFeed = '\x000C'; + static const CharType CarriageReturn = '\x000D'; + static const CharType NextLine = '\x0085'; +}; + +template +struct LineBreakImplementation +{ + typedef T CharType; + + static bool IsLinebreak(CharType c) + { + return c == TCharBase::LineFeed + || c == TCharBase::VerticalTab + || c == TCharBase::FormFeed + || c == TCharBase::CarriageReturn + || c == TCharBase::NextLine + || c == TCharBase::LineSeparator + || c == TCharBase::ParagraphSeparator; + } +}; + +template +struct LineBreakImplementation +{ + typedef T CharType; + + static bool IsLinebreak(CharType c) + { + return c == TCharBase::LineFeed + || c == TCharBase::VerticalTab + || c == TCharBase::FormFeed + || c == TCharBase::CarriageReturn + || c == TCharBase::NextLine; + } +}; + +template +struct TChar : public TCharBase +{ + typedef T CharType; +public: + static CharType ToUpper(CharType Char); + static CharType ToLower(CharType Char); + static bool IsUpper(CharType Char); + static bool IsLower(CharType Char); + static bool IsAlpha(CharType Char); + static bool IsGraph(CharType Char); + static bool IsPrint(CharType Char); + static bool IsPunct(CharType Char); + + static bool IsAlnum(CharType Char); + static bool IsDigit(CharType Char); + + static bool IsOctDigit(CharType Char) + { + return Char >= '0' && Char <= '7'; + } + + static bool IsHexDigit(CharType Char); + + static int32 ConvertCharDigitToInt(CharType Char) + { + return static_cast(Char) - static_cast('0'); + } + + static bool IsWhitespace(CharType Char); + + static bool IsIdentifier(CharType Char) + { + return IsAlnum(Char) || IsUnderscore(Char); + } + + static bool IsUnderscore(CharType Char) { return Char == LITERAL(CharType, '_'); } + +public: + static bool IsLinebreak(CharType Char) + { + return LineBreakImplementation::IsLinebreak(Char); + } +}; + +typedef TChar FChar; +typedef TChar FCharWide; +typedef TChar FCharAnsi; + +/*----------------------------------------------------------------------------- + TCHAR specialized functions +-----------------------------------------------------------------------------*/ + +template <> +inline TChar::CharType TChar::ToUpper(CharType Char) { return ::towupper(Char); } + +template <> +inline TChar::CharType TChar::ToLower(CharType Char) { return ::towlower(Char); } + +template <> +inline bool TChar::IsUpper(CharType Char) { return ::iswupper(Char) != 0; } + +template <> +inline bool TChar::IsLower(CharType Char) { return ::iswlower(Char) != 0; } + +template <> +inline bool TChar::IsAlpha(CharType Char) { return ::iswalpha(Char) != 0; } + +template <> +inline bool TChar::IsGraph(CharType Char) { return ::iswgraph(Char) != 0; } + +template <> +inline bool TChar::IsPrint(CharType Char) { return ::iswprint(Char) != 0; } + +template <> +inline bool TChar::IsPunct(CharType Char) { return ::iswpunct(Char) != 0; } + +template <> +inline bool TChar::IsAlnum(CharType Char) { return ::iswalnum(Char) != 0; } + +template <> +inline bool TChar::IsDigit(CharType Char) { return ::iswdigit(Char) != 0; } + +template <> +inline bool TChar::IsHexDigit(CharType Char) { return ::iswxdigit(Char) != 0; } + +template <> +inline bool TChar::IsWhitespace(CharType Char) { return ::iswspace(Char) != 0; } + +/*----------------------------------------------------------------------------- + ANSICHAR specialized functions +-----------------------------------------------------------------------------*/ +template <> +inline TChar::CharType TChar::ToUpper(CharType Char) { return ::toupper(Char); } + +template <> +inline TChar::CharType TChar::ToLower(CharType Char) { return ::tolower(Char); } + +template <> +inline bool TChar::IsUpper(CharType Char) { return ::isupper((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsLower(CharType Char) { return ::islower((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsAlpha(CharType Char) { return ::isalpha((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsGraph(CharType Char) { return ::isgraph((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsPrint(CharType Char) { return ::isprint((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsPunct(CharType Char) { return ::ispunct((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsAlnum(CharType Char) { return ::isalnum((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsDigit(CharType Char) { return ::isdigit((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsHexDigit(CharType Char) { return ::isxdigit((unsigned char)Char) != 0; } + +template <> +inline bool TChar::IsWhitespace(CharType Char) { return ::isspace((unsigned char)Char) != 0; } diff --git a/version/Core/Public/API/UE/Misc/StructBuilder.h b/version/Core/Public/API/UE/Misc/StructBuilder.h new file mode 100644 index 0000000..e45b816 --- /dev/null +++ b/version/Core/Public/API/UE/Misc/StructBuilder.h @@ -0,0 +1,64 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Math/UnrealMathUtility.h" +#include "../Templates/AlignmentTemplates.h" + +/** + * Lays out up a struct at runtime, in hopefully the same way as a compiler, + * and returns the offset of each member as it's added. + */ +class FStructBuilder +{ +public: + FStructBuilder() + : EndOfLastMember(0) + , Alignment (0) + { + } + + /** + * Adds a new member to the end of the struct. + * + * @param MemberSize The size of the member. + * @param MemberAlignment The alignment of the member. + * + * @return The offset of the member from the start of the struct. + */ + int32 AddMember(int32 MemberSize, int32 MemberAlignment) + { + int32 Result = Align(EndOfLastMember, MemberAlignment); + EndOfLastMember = Result + MemberSize; + Alignment = FMath::Max(Alignment, MemberAlignment); + return Result; + } + + /** + * Returns the current size of the struct. + * + * @return The size of the struct. + */ + int32 GetSize() const + { + return Align(EndOfLastMember, Alignment); + } + + /** + * Returns the current alignment of the struct. + * + * @return The alignment of the struct. + */ + int32 GetAlignment() const + { + return Alignment; + } + +private: + // The offset from the start of the struct to the end of the last added member + int32 EndOfLastMember; + + // The alignment of the struct + int32 Alignment; +}; diff --git a/version/Core/Public/API/UE/NetSerialization.h b/version/Core/Public/API/UE/NetSerialization.h new file mode 100644 index 0000000..82fcbe4 --- /dev/null +++ b/version/Core/Public/API/UE/NetSerialization.h @@ -0,0 +1,141 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +/*============================================================================= + NetworkSerialization.h: + Contains custom network serialization functionality. +=============================================================================*/ + +#pragma once + +#include "BasicTypes.h" +#include "Math/Vector.h" + +class Error; +struct FFastArraySerializer; +struct FFastArraySerializerItem; + +/** + * ===================== Vector NetSerialization customization. ===================== + * Provides custom NetSerilization for FVectors. + * + * There are two types of net quantization available: + * + * Fixed Quantization (SerializeFixedVector) + * -Fixed number of bits + * -Max Value specified as template parameter + * + * Serialized value is scaled based on num bits and max value. Precision is determined by MaxValue and NumBits + * (if 2^NumBits is > MaxValue, you will have room for extra precision). + * + * This format is good for things like normals, where the magnitudes are often similar. For example normal values may often + * be in the 0.1f - 1.f range. In a packed format, the overhead in serializing num of bits per component would outweigh savings from + * serializing very small ( < 0.1f ) values. + * + * It is also good for performance critical sections since you can guarantee byte alignment if that is important. + * + * + * + * Packed Quantization (SerializePackedVector) + * -Scaling factor (usually 10, 100, etc) + * -Max number of bits per component (this is maximum, not a constant) + * + * The format is + * + * The advantages to this format are that packed nature. You may support large magnitudes and have as much precision as you want. All while + * having small magnitudes take less space. + * + * The trade off is that there is overhead in serializing how many bits are used for each component, and byte alignment is almost always thrown + * off. + * +*/ + +struct FVector_NetQuantize : public FVector +{ + FORCEINLINE FVector_NetQuantize() + {} + + explicit FORCEINLINE FVector_NetQuantize(EForceInit E) + : FVector(E) + {} + + FORCEINLINE FVector_NetQuantize( float InX, float InY, float InZ ) + : FVector(InX, InY, InZ) + {} + + FORCEINLINE FVector_NetQuantize(const FVector &InVec) + { + FVector::operator=(InVec); + } + +}; + +struct FRotator_NetQuantize : public FRotator +{ + FORCEINLINE FRotator_NetQuantize() + {} + + explicit FORCEINLINE FRotator_NetQuantize(EForceInit E) + : FRotator(E) + {} + + FORCEINLINE FRotator_NetQuantize(float InPitch, float InYaw, float InRoll) + : FRotator(InPitch, InYaw, InRoll) + {} +}; + +struct FVector_NetQuantize10 : public FVector +{ + FORCEINLINE FVector_NetQuantize10() + {} + + explicit FORCEINLINE FVector_NetQuantize10(EForceInit E) + : FVector(E) + {} + + FORCEINLINE FVector_NetQuantize10( float InX, float InY, float InZ ) + : FVector(InX, InY, InZ) + {} + + FORCEINLINE FVector_NetQuantize10(const FVector &InVec) + { + FVector::operator=(InVec); + } +}; + +struct FVector_NetQuantize100 : public FVector +{ + FORCEINLINE FVector_NetQuantize100() + {} + + explicit FORCEINLINE FVector_NetQuantize100(EForceInit E) + : FVector(E) + {} + + FORCEINLINE FVector_NetQuantize100( float InX, float InY, float InZ ) + : FVector(InX, InY, InZ) + {} + + FORCEINLINE FVector_NetQuantize100(const FVector &InVec) + { + FVector::operator=(InVec); + } +}; + +struct FVector_NetQuantizeNormal : public FVector +{ + FORCEINLINE FVector_NetQuantizeNormal() + {} + + explicit FORCEINLINE FVector_NetQuantizeNormal(EForceInit E) + : FVector(E) + {} + + FORCEINLINE FVector_NetQuantizeNormal( float InX, float InY, float InZ ) + : FVector(InX, InY, InZ) + {} + + FORCEINLINE FVector_NetQuantizeNormal(const FVector &InVec) + { + FVector::operator=(InVec); + } +}; diff --git a/version/Core/Public/API/UE/Templates/AlignmentTemplates.h b/version/Core/Public/API/UE/Templates/AlignmentTemplates.h new file mode 100644 index 0000000..83cb7f0 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/AlignmentTemplates.h @@ -0,0 +1,56 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +/** + * Aligns a value to the nearest higher multiple of 'Alignment', which must be a power of two. + * + * @param Ptr Value to align + * @param Alignment Alignment, must be a power of two + * @return Aligned value + */ +template +inline CONSTEXPR T Align( const T Ptr, int32 Alignment ) +{ + return (T)(((int64)Ptr + Alignment - 1) & ~(Alignment-1)); +} + +/** + * Aligns a value to the nearest lower multiple of 'Alignment', which must be a power of two. + * + * @param Ptr Value to align + * @param Alignment Alignment, must be a power of two + * @return Aligned value + */ +template +inline CONSTEXPR T AlignDown( const T Ptr, int32 Alignment ) +{ + return (T)(((int64)Ptr) & ~(Alignment-1)); +} + +/** + * Checks if a pointer is aligned to the specified alignment. + * + * @param Ptr - The pointer to check. + * + * @return true if the pointer is aligned, false otherwise. + */ +static FORCEINLINE bool IsAligned(const volatile void* Ptr, const uint32 Alignment) +{ + return !(UPTRINT(Ptr) & (Alignment - 1)); +} + +/** + * Aligns a value to the nearest higher multiple of 'Alignment'. + * + * @param Ptr Value to align + * @param Alignment Alignment, can be any arbitrary uint32 + * @return Aligned value + */ +template< class T > inline T AlignArbitrary( const T Ptr, uint32 Alignment ) +{ + return (T) ( ( ((uint64)Ptr + Alignment - 1) / Alignment ) * Alignment ); +} + diff --git a/version/Core/Public/API/UE/Templates/AndOrNot.h b/version/Core/Public/API/UE/Templates/AndOrNot.h new file mode 100644 index 0000000..4bb526e --- /dev/null +++ b/version/Core/Public/API/UE/Templates/AndOrNot.h @@ -0,0 +1,71 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * Does a boolean AND of the ::Value static members of each type, but short-circuits if any Type::Value == false. + */ +template +struct TAnd; + +template +struct TAndValue +{ + enum { Value = TAnd::Value }; +}; + +template +struct TAndValue +{ + enum { Value = false }; +}; + +template +struct TAnd : TAndValue +{ +}; + +template <> +struct TAnd<> +{ + enum { Value = true }; +}; + +/** + * Does a boolean OR of the ::Value static members of each type, but short-circuits if any Type::Value == true. + */ +template +struct TOr; + +template +struct TOrValue +{ + enum { Value = TOr::Value }; +}; + +template +struct TOrValue +{ + enum { Value = true }; +}; + +template +struct TOr : TOrValue +{ +}; + +template <> +struct TOr<> +{ + enum { Value = false }; +}; + +/** + * Does a boolean NOT of the ::Value static members of the type. + */ +template +struct TNot +{ + enum { Value = !Type::Value }; +}; + diff --git a/version/Core/Public/API/UE/Templates/AreTypesEqual.h b/version/Core/Public/API/UE/Templates/AreTypesEqual.h new file mode 100644 index 0000000..c0cee5d --- /dev/null +++ b/version/Core/Public/API/UE/Templates/AreTypesEqual.h @@ -0,0 +1,21 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** Tests whether two typenames refer to the same type. */ +template +struct TAreTypesEqual; + +template +struct TAreTypesEqual +{ + enum { Value = false }; +}; + +template +struct TAreTypesEqual +{ + enum { Value = true }; +}; + +#define ARE_TYPES_EQUAL(A,B) TAreTypesEqual::Value diff --git a/version/Core/Public/API/UE/Templates/ChooseClass.h b/version/Core/Public/API/UE/Templates/ChooseClass.h new file mode 100644 index 0000000..ca63612 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/ChooseClass.h @@ -0,0 +1,21 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** Chooses between two different classes based on a boolean. */ +template +class TChooseClass; + +template +class TChooseClass +{ +public: + typedef TrueClass Result; +}; + +template +class TChooseClass +{ +public: + typedef FalseClass Result; +}; diff --git a/version/Core/Public/API/UE/Templates/Decay.h b/version/Core/Public/API/UE/Templates/Decay.h new file mode 100644 index 0000000..7188861 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Decay.h @@ -0,0 +1,46 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "RemoveCV.h" +#include "RemoveReference.h" + +namespace UE4Decay_Private +{ + template + struct TDecayNonReference + { + typedef typename TRemoveCV::Type Type; + }; + + template + struct TDecayNonReference + { + typedef T* Type; + }; + + template + struct TDecayNonReference + { + typedef T* Type; + }; + + template + struct TDecayNonReference + { + typedef RetType (*Type)(Params...); + }; +} + +/** + * Returns the decayed type of T, meaning it removes all references, qualifiers and + * applies array-to-pointer and function-to-pointer conversions. + * + * http://en.cppreference.com/w/cpp/types/decay + */ +template +struct TDecay +{ + typedef typename UE4Decay_Private::TDecayNonReference::Type>::Type Type; +}; diff --git a/version/Core/Public/API/UE/Templates/EnableIf.h b/version/Core/Public/API/UE/Templates/EnableIf.h new file mode 100644 index 0000000..ac22b21 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/EnableIf.h @@ -0,0 +1,58 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * Includes a function in an overload set if the predicate is true. It should be used similarly to this: + * + * // This function will only be instantiated if SomeTrait::Value is true for a particular T + * template + * typename TEnableIf::Value, ReturnType>::Type Function(const T& Obj) + * { + * ... + * } + * + * ReturnType is the real return type of the function. + */ +template +class TEnableIf; + +template +class TEnableIf +{ +public: + typedef Result Type; +}; + +template +class TEnableIf +{ }; + + +/** + * This is a variant of the above that will determine the return type 'lazily', i.e. only if the function is enabled. + * This is useful when the return type isn't necessarily legal code unless the enabling condition is true. + * + * // This function will only be instantiated if SomeTrait::Value is true for a particular T. + * // The function's return type is typename Transform::Type. + * template + * typename TLazyEnableIf::Value, Transform>::Type Function(const T& Obj) + * { + * ... + * } + * + * See boost::lazy_enable_if for more details. + */ +template +class TLazyEnableIf; + +template +class TLazyEnableIf +{ +public: + typedef typename Func::Type Type; +}; + +template +class TLazyEnableIf +{ }; diff --git a/version/Core/Public/API/UE/Templates/Function.h b/version/Core/Public/API/UE/Templates/Function.h new file mode 100644 index 0000000..45c680e --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Function.h @@ -0,0 +1,695 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "AreTypesEqual.h" +#include "UnrealTypeTraits.h" +#include "RemoveReference.h" +#include "Decay.h" +#include "Invoke.h" +#include "../Containers/ContainerAllocationPolicies.h" +#include "../Math/UnrealMathUtility.h" + + +// Disable visualization hack for shipping or test builds. +#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) + #define ENABLE_TFUNCTIONREF_VISUALIZATION 1 +#else + #define ENABLE_TFUNCTIONREF_VISUALIZATION 0 +#endif + +template class TFunction; +template class TFunctionRef; + +/** + * TFunction + * + * See the class definition for intended usage. + */ +template +class TFunction; + +/** + * TFunctionRef + * + * See the class definition for intended usage. + */ +template +class TFunctionRef; + +/** + * Traits class which checks if T is a TFunction<> type. + */ +template struct TIsATFunction { enum { Value = false }; }; +template struct TIsATFunction> { enum { Value = true }; }; + +/** + * Traits class which checks if T is a TFunction<> type. + */ +template struct TIsATFunctionRef { enum { Value = false }; }; +template struct TIsATFunctionRef> { enum { Value = true }; }; + +/** + * Private implementation details of TFunction and TFunctionRef. + */ +namespace UE4Function_Private +{ + struct FFunctionStorage; + + /** + * Common interface to a callable object owned by TFunction. + */ + struct IFunction_OwnedObject + { + /** + * Creates a copy of the object in the allocator and returns a pointer to it. + */ + virtual IFunction_OwnedObject* CopyToEmptyStorage(FFunctionStorage& Storage) const = 0; + + /** + * Returns the address of the object. + */ + virtual void* GetAddress() = 0; + + /** + * Destructor. + */ + virtual ~IFunction_OwnedObject() = 0; + }; + + /** + * Destructor. + */ + inline IFunction_OwnedObject::~IFunction_OwnedObject() + { + } + + #if !defined(_WIN32) || defined(_WIN64) + // Let TFunction store up to 32 bytes which are 16-byte aligned before we heap allocate + typedef TAlignedBytes<16, 16> AlignedInlineFunctionType; + typedef TInlineAllocator<2> FunctionAllocatorType; + #else + // ... except on Win32, because we can't pass 16-byte aligned types by value, as some TFunctions are. + // So we'll just keep it heap-allocated, which is always sufficiently aligned. + typedef TAlignedBytes<16, 8> AlignedInlineFunctionType; + typedef FHeapAllocator FunctionAllocatorType; + #endif + + struct FFunctionStorage + { + FFunctionStorage() + : AllocatedSize(0) + { + } + + FFunctionStorage(FFunctionStorage&& Other) + : AllocatedSize(0) + { + Allocator.MoveToEmpty(Other.Allocator); + AllocatedSize = Other.AllocatedSize; + Other.AllocatedSize = 0; + } + + void Empty() + { + Allocator.ResizeAllocation(0, 0, sizeof(UE4Function_Private::AlignedInlineFunctionType)); + AllocatedSize = 0; + } + + typedef FunctionAllocatorType::ForElementType AllocatorType; + + IFunction_OwnedObject* GetBoundObject() const + { + return AllocatedSize ? (IFunction_OwnedObject*)Allocator.GetAllocation() : nullptr; + } + + AllocatorType Allocator; + int32 AllocatedSize; + }; +} + +inline void* operator new(size_t Size, UE4Function_Private::FFunctionStorage& Storage) +{ + if (UE4Function_Private::IFunction_OwnedObject* Obj = Storage.GetBoundObject()) + { + Obj->~IFunction_OwnedObject(); + } + + int32 NewSize = static_cast(FMath::DivideAndRoundUp(Size, sizeof(UE4Function_Private::AlignedInlineFunctionType))); + if (Storage.AllocatedSize != NewSize) + { + Storage.Allocator.ResizeAllocation(0, NewSize, sizeof(UE4Function_Private::AlignedInlineFunctionType)); + Storage.AllocatedSize = NewSize; + } + + return Storage.Allocator.GetAllocation(); +} + +namespace UE4Function_Private +{ + /** + * Implementation of IFunction_OwnedObject for a given T. + */ + template + struct TFunction_OwnedObject : public IFunction_OwnedObject + { + /** + * Constructor which creates its T by copying. + */ + explicit TFunction_OwnedObject(const T& InObj) + : Obj(InObj) + { + } + + /** + * Constructor which creates its T by moving. + */ + explicit TFunction_OwnedObject(T&& InObj) + : Obj(MoveTemp(InObj)) + { + } + + IFunction_OwnedObject* CopyToEmptyStorage(FFunctionStorage& Storage) const override + { + return new (Storage) TFunction_OwnedObject(Obj); + } + + virtual void* GetAddress() override + { + return &Obj; + } + + T Obj; + }; + + /** + * A class which is used to instantiate the code needed to call a bound function. + */ + template + struct TFunctionRefCaller; + + /** + * A class which is used to instantiate the code needed to assert when called - used for unset bindings. + */ + template + struct TFunctionRefAsserter; + + /** + * A class which defines an operator() which will invoke the TFunctionRefCaller::Call function. + */ + template + struct TFunctionRefBase; + + #if ENABLE_TFUNCTIONREF_VISUALIZATION + /** + * Helper classes to help debugger visualization. + */ + struct IDebugHelper + { + virtual ~IDebugHelper() = 0; + }; + + inline IDebugHelper::~IDebugHelper() + { + } + + template + struct TDebugHelper : IDebugHelper + { + T* Ptr; + }; + #endif + + /** + * Function which invokes the passed callable when invoked. + */ + template + struct TFunctionRefCaller + { + static Ret Call(void* Obj, ParamTypes&... Params) + { + return Invoke(*(Functor*)Obj, Forward(Params)...); + } + }; + + template + struct TFunctionRefCaller + { + static void Call(void* Obj, ParamTypes&... Params) + { + Invoke(*(Functor*)Obj, Forward(Params)...); + } + }; + + /** + * Function which asserts when invoked. + */ + template + struct TFunctionRefAsserter + { + static Ret Call(void* Obj, ParamTypes&...) + { + checkf(false, TEXT("Attempting to call an unbound TFunction!")); + + // This doesn't need to be valid, because it'll never be reached, but it does at least need to compile. + return Forward(*(typename TRemoveReference::Type*)Obj); + } + }; + + template + struct TFunctionRefAsserter + { + static void Call(void*, ParamTypes&...) + { + checkf(false, TEXT("Attempting to call an unbound TFunction!")); + } + }; + + template + struct TFunctionRefBase + { + explicit TFunctionRefBase(ENoInit) + { + // Not really designed to be initialized directly, but we want to be explicit about that. + } + + Ret operator()(ParamTypes... Params) const + { + const DerivedType* Derived = static_cast(this); + return Callable(Derived->GetPtr(), Params...); + } + + protected: + template + void Set(FunctorType* Functor) + { + Callable = &UE4Function_Private::TFunctionRefCaller::Call; + + #if ENABLE_TFUNCTIONREF_VISUALIZATION + // We placement new over the top of the same object each time. This is illegal, + // but it ensures that the vptr is set correctly for the bound type, and so is + // visualizable. We never depend on the state of this object at runtime, so it's + // ok. + new ((void*)&DebugPtrStorage) UE4Function_Private::TDebugHelper; + DebugPtrStorage.Ptr = (void*)Functor; + #endif + } + + void CopyAndReseat(const TFunctionRefBase& Other, void* Functor) + { + Callable = Other.Callable; + + #if ENABLE_TFUNCTIONREF_VISUALIZATION + // Use Memcpy to copy the other DebugPtrStorage, including vptr (because we don't know the bound type + // here), and then reseat the underlying pointer. Possibly even more evil than the Set code. + FMemory::Memcpy(&DebugPtrStorage, &Other.DebugPtrStorage, sizeof(DebugPtrStorage)); + DebugPtrStorage.Ptr = Functor; + #endif + } + + void Unset() + { + Callable = &UE4Function_Private::TFunctionRefAsserter::Call; + } + + private: + // A pointer to a function which invokes the call operator on the callable object + Ret (*Callable)(void*, ParamTypes&...); + + #if ENABLE_TFUNCTIONREF_VISUALIZATION + // To help debug visualizers + UE4Function_Private::TDebugHelper DebugPtrStorage; + #endif + }; +} + +/** + * TFunctionRef + * + * A class which represents a reference to something callable. The important part here is *reference* - if + * you bind it to a lambda and the lambda goes out of scope, you will be left with an invalid reference. + * + * FuncType represents a function type and so TFunctionRef should be defined as follows: + * + * // A function taking a string and float and returning int32. Parameter names are optional. + * TFunctionRef + * + * If you also want to take ownership of the callable thing, e.g. you want to return a lambda from a + * function, you should use TFunction. TFunctionRef does not concern itself with ownership because it's + * intended to be FAST. + * + * TFunctionRef is most useful when you want to parameterize a function with some caller-defined code + * without making it a template. + * + * Example: + * + * // Something.h + * void DoSomethingWithConvertingStringsToInts(TFunctionRef Convert); + * + * // Something.cpp + * void DoSomethingWithConvertingStringsToInts(TFunctionRef Convert) + * { + * for (const FString& Str : SomeBunchOfStrings) + * { + * int32 Int = Convert(Str); + * DoSomething(Int); + * } + * } + * + * // SomewhereElse.cpp + * #include "Something.h" + * + * void Func() + * { + * // First do something using string length + * DoSomethingWithConvertingStringsToInts([](const FString& Str) { + * return Str.Len(); + * }); + * + * // Then do something using string conversion + * DoSomethingWithConvertingStringsToInts([](const FString& Str) { + * int32 Result; + * TTypeFromString::FromString(Result, *Str); + * return Result; + * }); + * } + */ +template +class TFunctionRef : public UE4Function_Private::TFunctionRefBase, FuncType> +{ + friend struct UE4Function_Private::TFunctionRefBase, FuncType>; + + typedef UE4Function_Private::TFunctionRefBase, FuncType> Super; + +public: + /** + * Constructor which binds a TFunctionRef to a non-const lvalue function object. + */ + template ::Value && !TAreTypesEqual::Value>::Type> + TFunctionRef(FunctorType& Functor) + : Super(NoInit) + { + // This constructor is disabled for function types because we want it to call the function pointer overload. + // It is also disabled for TFunctionRef types because VC is incorrectly treating it as a copy constructor. + + Set(&Functor); + } + + /** + * Constructor which binds a TFunctionRef to an rvalue or const lvalue function object. + */ + template ::Value && !TAreTypesEqual::Value>::Type> + TFunctionRef(const FunctorType& Functor) + : Super(NoInit) + { + // This constructor is disabled for function types because we want it to call the function pointer overload. + // It is also disabled for TFunctionRef types because VC is incorrectly treating it as a copy constructor. + + Set(&Functor); + } + + /** + * Constructor which binds a TFunctionRef to a function pointer. + */ + template ::Value>::Type> + TFunctionRef(FunctionType* Function) + : Super(NoInit) + { + // This constructor is enabled only for function types because we don't want weird errors from it being called with arbitrary pointers. + + Set(Function); + } + + #if ENABLE_TFUNCTIONREF_VISUALIZATION + + /** + * Copy constructor. + */ + TFunctionRef(const TFunctionRef& Other) + : Super(NoInit) + { + // If visualization is enabled, then we need to do an explicit copy + // to ensure that our hacky DebugPtrStorage's vptr is copied. + CopyAndReseat(Other, Other.Ptr); + } + + #endif + + // We delete the assignment operators because we don't want it to be confused with being related to + // regular C++ reference assignment - i.e. calling the assignment operator of whatever the reference + // is bound to - because that's not what TFunctionRef does, nor is it even capable of doing that. + #if PLATFORM_COMPILER_HAS_DEFAULTED_FUNCTIONS + + #if !ENABLE_TFUNCTIONREF_VISUALIZATION + TFunctionRef(const TFunctionRef&) = default; + #endif + TFunctionRef& operator=(const TFunctionRef&) const = delete; + ~TFunctionRef() = default; + + #else + + // We mark copy assignment as private. We don't define the others because it's mostly likely + // that this code path is only for VC and the compiler will still generate the others fine anyway, + // despite such behavior being deprecated. + private: + TFunctionRef& operator=(const TFunctionRef&) const; + public: + + #endif + +private: + /** + * Sets the state of the TFunctionRef given a pointer to a callable thing. + */ + template + void Set(FunctorType* Functor) + { + // We force a void* cast here because if FunctorType is an actual function then + // this won't compile. We convert it back again before we use it anyway. + + Ptr = (void*)Functor; + Super::Set(Functor); + } + + /** + * Copies another TFunctionRef and rebinds it to another object of the same type which was originally bound. + * Only intended to be used by TFunction's copy constructor/assignment operator. + */ + void CopyAndReseat(const TFunctionRef& Other, void* Functor) + { + Ptr = Functor; + Super::CopyAndReseat(Other, Functor); + } + + /** + * Returns a pointer to the callable object - needed by TFunctionRefBase. + */ + void* GetPtr() const + { + return Ptr; + } + + // A pointer to the callable object + void* Ptr; +}; + +/** + * TFunction + * + * A class which represents a copy of something callable. FuncType represents a function type and so + * TFunction should be defined as follows: + * + * // A function taking a string and float and returning int32. Parameter names are optional. + * TFunction + * + * Unlike TFunctionRef, this object is intended to be used like a UE4 version of std::function. That is, + * it takes a copy of whatever is bound to it, meaning you can return it from functions and store them in + * objects without caring about the lifetime of the original object being bound. + * + * Example: + * + * // Something.h + * TFunction GetTransform(); + * + * // Something.cpp + * TFunction GetTransform(const FString& Prefix) + * { + * // Squares number and returns it as a string with the specified prefix + * return [=](int32 Num) { + * return Prefix + TEXT(": ") + TTypeToString::ToString(Num * Num); + * }; + * } + * + * // SomewhereElse.cpp + * #include "Something.h" + * + * void Func() + * { + * TFunction Transform = GetTransform(TEXT("Hello")); + * + * FString Result = Transform(5); // "Hello: 25" + * } + */ +template +class TFunction : public UE4Function_Private::TFunctionRefBase, FuncType> +{ + friend struct UE4Function_Private::TFunctionRefBase, FuncType>; + + typedef UE4Function_Private::TFunctionRefBase, FuncType> Super; + +public: + /** + * Default constructor. + */ + TFunction(TYPE_OF_NULLPTR = nullptr) + : Super(NoInit) + { + Super::Unset(); + } + + /** + * Constructor which binds a TFunction to any function object. + */ + template ::Type>::Value>::Type> + TFunction(FunctorType&& InFunc) + : Super(NoInit) + { + // This constructor is disabled for TFunction types because VC is incorrectly treating it as copy/move constructors. + + typedef typename TDecay::Type DecayedFunctorType; + typedef UE4Function_Private::TFunction_OwnedObject OwnedType; + + // This is probably a mistake if you expect TFunction to take a copy of what + // TFunctionRef is bound to, because that's not possible. + // + // If you really intended to bind a TFunction to a TFunctionRef, you can just + // wrap it in a lambda (and thus it's clear you're just binding to a call to another + // reference): + // + // TFunction MyFunction = [=](float F) -> int32 { return MyFunctionRef(F); }; + static_assert(!TIsATFunctionRef::Value, "Cannot construct a TFunction from a TFunctionRef"); + + OwnedType* NewObj = new (Storage) OwnedType(Forward(InFunc)); + Super::Set(&NewObj->Obj); + } + + /** + * Copy constructor. + */ + TFunction(const TFunction& Other) + : Super(NoInit) + { + if (UE4Function_Private::IFunction_OwnedObject* OtherFunc = Other.Storage.GetBoundObject()) + { + UE4Function_Private::IFunction_OwnedObject* ThisFunc = OtherFunc->CopyToEmptyStorage(Storage); + Super::CopyAndReseat(Other, ThisFunc->GetAddress()); + } + else + { + Super::Unset(); + } + } + + /** + * Move constructor. + */ + TFunction(TFunction&& Other) + : Super (NoInit) + , Storage(MoveTemp(Other.Storage)) + { + if (UE4Function_Private::IFunction_OwnedObject* Func = Storage.GetBoundObject()) + { + Super::CopyAndReseat(Other, Func->GetAddress()); + } + else + { + Super::Unset(); + } + + Other.Unset(); + } + + /** + * Nullptr assignment operator - unbinds any bound function. + */ + TFunction& operator=(TYPE_OF_NULLPTR) + { + if (UE4Function_Private::IFunction_OwnedObject* Obj = Storage.GetBoundObject()) + { + Obj->~IFunction_OwnedObject(); + } + Storage.Empty(); + Super::Unset(); + + return *this; + } + + /** + * Destructor. + */ + ~TFunction() + { + if (UE4Function_Private::IFunction_OwnedObject* Obj = Storage.GetBoundObject()) + { + Obj->~IFunction_OwnedObject(); + } + } + + /** + * Tests if the TFunction is callable. + */ + FORCEINLINE explicit operator bool() const + { + return !!Storage.GetBoundObject(); + } + +private: + /** + * Returns a pointer to the callable object - needed by TFunctionRefBase. + */ + void* GetPtr() const + { + UE4Function_Private::IFunction_OwnedObject* Ptr = Storage.GetBoundObject(); + return Ptr ? Ptr->GetAddress() : nullptr; + } + + UE4Function_Private::FFunctionStorage Storage; +}; + +/** + * Nullptr equality operator. + */ +template +FORCEINLINE bool operator==(TYPE_OF_NULLPTR, const TFunction& Func) +{ + return !Func; +} + +/** + * Nullptr equality operator. + */ +template +FORCEINLINE bool operator==(const TFunction& Func, TYPE_OF_NULLPTR) +{ + return !Func; +} + +/** + * Nullptr inequality operator. + */ +template +FORCEINLINE bool operator!=(TYPE_OF_NULLPTR, const TFunction& Func) +{ + return (bool)Func; +} + +/** + * Nullptr inequality operator. + */ +template +FORCEINLINE bool operator!=(const TFunction& Func, TYPE_OF_NULLPTR) +{ + return (bool)Func; +} diff --git a/version/Core/Public/API/UE/Templates/HasGetTypeHash.h b/version/Core/Public/API/UE/Templates/HasGetTypeHash.h new file mode 100644 index 0000000..05e4971 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/HasGetTypeHash.h @@ -0,0 +1,53 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "AndOrNot.h" +#include "IsArithmetic.h" +#include "IsPointer.h" +#include "IsEnum.h" + +namespace UE4GetTypeHashExists_Private +{ + struct FNotSpecified {}; + + template + struct FReturnValueCheck + { + static char (&Func())[2]; + }; + + template <> + struct FReturnValueCheck + { + static char (&Func())[1]; + }; + + template + FNotSpecified GetTypeHash(const T&); + + template + const T& Make(); + + template , TIsPointer, TIsEnum>::Value> + struct GetTypeHashQuery + { + // All arithmetic, pointer and enums types are hashable + enum { Value = true }; + }; + + template + struct GetTypeHashQuery + { + enum { Value = sizeof(FReturnValueCheck()))>::Func()) == sizeof(char[2]) }; + }; +} + +/** +* Traits class which tests if a type has a GetTypeHash overload. +*/ +template +struct THasGetTypeHash +{ + enum { Value = UE4GetTypeHashExists_Private::GetTypeHashQuery::Value }; +}; diff --git a/version/Core/Public/API/UE/Templates/IdentityFunctor.h b/version/Core/Public/API/UE/Templates/IdentityFunctor.h new file mode 100644 index 0000000..15c90e6 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IdentityFunctor.h @@ -0,0 +1,15 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * A functor which returns whatever is passed to it. Mainly used for generic composition. + */ +struct FIdentityFunctor +{ + template + FORCEINLINE T&& operator()(T&& Val) const + { + return (T&&)Val; + } +}; diff --git a/version/Core/Public/API/UE/Templates/Invoke.h b/version/Core/Public/API/UE/Templates/Invoke.h new file mode 100644 index 0000000..25c954d --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Invoke.h @@ -0,0 +1,66 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "PointerIsConvertibleFromTo.h" +#include "UnrealTemplate.h" +#include "Decay.h" + + +namespace UE4Invoke_Private +{ + template + FORCEINLINE auto DereferenceIfNecessary(CallableType&& Callable) + -> typename TEnableIf::Type, typename TDecay::Type>::Value, decltype((CallableType&&)Callable)>::Type + { + return (CallableType&&)Callable; + } + + template + FORCEINLINE auto DereferenceIfNecessary(CallableType&& Callable) + -> typename TEnableIf::Type, typename TDecay::Type>::Value, decltype(*(CallableType&&)Callable)>::Type + { + return *(CallableType&&)Callable; + } +} + + +/** + * Invokes a callable with a set of arguments. Allows the following: + * + * - Calling a functor object given a set of arguments. + * - Calling a function pointer given a set of arguments. + * - Calling a member function given a reference to an object and a set of arguments. + * - Calling a member function given a pointer (including smart pointers) to an object and a set of arguments. + * - Projecting via a data member pointer given a reference to an object. + * - Projecting via a data member pointer given a pointer (including smart pointers) to an object. + * + * See: http://en.cppreference.com/w/cpp/utility/functional/invoke + */ +template +FORCEINLINE auto Invoke(FuncType&& Func, ArgTypes&&... Args) + -> decltype(Forward(Func)(Forward(Args)...)) +{ + return Forward(Func)(Forward(Args)...); +} + +template +FORCEINLINE auto Invoke(ReturnType ObjType::*pdm, CallableType&& Callable) + -> decltype(UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*pdm) +{ + return UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*pdm; +} + +template +FORCEINLINE auto Invoke(ReturnType (ObjType::*PtrMemFun)(PMFArgTypes...), CallableType&& Callable, ArgTypes&&... Args) + -> decltype((UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*PtrMemFun)(Forward(Args)...)) +{ + return (UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*PtrMemFun)(Forward(Args)...); +} + +template +FORCEINLINE auto Invoke(ReturnType (ObjType::*PtrMemFun)(PMFArgTypes...) const, CallableType&& Callable, ArgTypes&&... Args) + -> decltype((UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*PtrMemFun)(Forward(Args)...)) +{ + return (UE4Invoke_Private::DereferenceIfNecessary(Forward(Callable)).*PtrMemFun)(Forward(Args)...); +} diff --git a/version/Core/Public/API/UE/Templates/IsArithmetic.h b/version/Core/Public/API/UE/Templates/IsArithmetic.h new file mode 100644 index 0000000..3fdc0a1 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsArithmetic.h @@ -0,0 +1,32 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +/** + * Traits class which tests if a type is arithmetic. + */ +template +struct TIsArithmetic +{ + enum { Value = false }; +}; + +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; +template <> struct TIsArithmetic { enum { Value = true }; }; + +template struct TIsArithmetic { enum { Value = TIsArithmetic::Value }; }; +template struct TIsArithmetic< volatile T> { enum { Value = TIsArithmetic::Value }; }; +template struct TIsArithmetic { enum { Value = TIsArithmetic::Value }; }; diff --git a/version/Core/Public/API/UE/Templates/IsContiguousContainer.h b/version/Core/Public/API/UE/Templates/IsContiguousContainer.h new file mode 100644 index 0000000..9769d6b --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsContiguousContainer.h @@ -0,0 +1,39 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include + +/** + * Traits class which tests if a type is a contiguous container. + * Requires: + * [ &Container[0], &Container[0] + Num ) is a valid range + */ +template +struct TIsContiguousContainer +{ + enum { Value = false }; +}; + +template struct TIsContiguousContainer< T& > : TIsContiguousContainer {}; +template struct TIsContiguousContainer< T&&> : TIsContiguousContainer {}; +template struct TIsContiguousContainer : TIsContiguousContainer {}; +template struct TIsContiguousContainer< volatile T> : TIsContiguousContainer {}; +template struct TIsContiguousContainer : TIsContiguousContainer {}; + +/** + * Specialization for C arrays (always contiguous) + */ +template struct TIsContiguousContainer< T[N]> { enum { Value = true }; }; +template struct TIsContiguousContainer { enum { Value = true }; }; +template struct TIsContiguousContainer< volatile T[N]> { enum { Value = true }; }; +template struct TIsContiguousContainer { enum { Value = true }; }; + +/** + * Specialization for initializer lists (also always contiguous) + */ +template +struct TIsContiguousContainer> +{ + enum { Value = true }; +}; diff --git a/version/Core/Public/API/UE/Templates/IsEnum.h b/version/Core/Public/API/UE/Templates/IsEnum.h new file mode 100644 index 0000000..fa6c4e8 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsEnum.h @@ -0,0 +1,9 @@ +// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. + +#pragma once + +template +struct TIsEnum +{ + enum { Value = __is_enum(T) }; +}; diff --git a/version/Core/Public/API/UE/Templates/IsEnumClass.h b/version/Core/Public/API/UE/Templates/IsEnumClass.h new file mode 100644 index 0000000..ce884f5 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsEnumClass.h @@ -0,0 +1,26 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "AndOrNot.h" + +namespace UE4IsEnumClass_Private +{ + template + struct TIsEnumConvertibleToInt + { + static char (&Resolve(int))[2]; + static char Resolve(...); + + enum { Value = sizeof(Resolve(T())) - 1 }; + }; +} + +/** + * Traits class which tests if a type is arithmetic. + */ +template +struct TIsEnumClass +{ + enum { Value = TAndValue<__is_enum(T), TNot>>::Value }; +}; diff --git a/version/Core/Public/API/UE/Templates/IsPODType.h b/version/Core/Public/API/UE/Templates/IsPODType.h new file mode 100644 index 0000000..c811786 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsPODType.h @@ -0,0 +1,27 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "IsPointer.h" +#include "AndOrNot.h" +#include "IsArithmetic.h" + +/** + * Traits class which tests if a type is POD. + */ + +#if defined(_MSC_VER) && _MSC_VER >= 1900 + // __is_pod changed in VS2015, however the results are still correct for all usages I've been able to locate. + #pragma warning(push) + #pragma warning(disable:4647) +#endif // _MSC_VER == 1900 + +template +struct TIsPODType +{ + enum { Value = TOrValue<__is_pod(T) || __is_enum(T), TIsArithmetic, TIsPointer>::Value }; +}; + +#if defined(_MSC_VER) && _MSC_VER >= 1900 + #pragma warning(pop) +#endif // _MSC_VER >= 1900 diff --git a/version/Core/Public/API/UE/Templates/IsPointer.h b/version/Core/Public/API/UE/Templates/IsPointer.h new file mode 100644 index 0000000..0ba8f81 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsPointer.h @@ -0,0 +1,21 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * Traits class which tests if a type is a pointer. + */ +template +struct TIsPointer +{ + enum { Value = false }; +}; + +template struct TIsPointer< T*> { enum { Value = true }; }; +template struct TIsPointer { enum { Value = true }; }; +template struct TIsPointer< volatile T*> { enum { Value = true }; }; +template struct TIsPointer { enum { Value = true }; }; + +template struct TIsPointer { enum { Value = TIsPointer::Value }; }; +template struct TIsPointer< volatile T> { enum { Value = TIsPointer::Value }; }; +template struct TIsPointer { enum { Value = TIsPointer::Value }; }; diff --git a/version/Core/Public/API/UE/Templates/IsTriviallyCopyAssignable.h b/version/Core/Public/API/UE/Templates/IsTriviallyCopyAssignable.h new file mode 100644 index 0000000..1b3d331 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsTriviallyCopyAssignable.h @@ -0,0 +1,15 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "AndOrNot.h" +#include "IsPODType.h" + +/** + * Traits class which tests if a type has a trivial copy assignment operator. + */ +template +struct TIsTriviallyCopyAssignable +{ + enum { Value = TOrValue<__has_trivial_assign(T), TIsPODType>::Value }; +}; diff --git a/version/Core/Public/API/UE/Templates/IsTriviallyCopyConstructible.h b/version/Core/Public/API/UE/Templates/IsTriviallyCopyConstructible.h new file mode 100644 index 0000000..3acfb13 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsTriviallyCopyConstructible.h @@ -0,0 +1,15 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "AndOrNot.h" +#include "IsPODType.h" + +/** + * Traits class which tests if a type has a trivial copy constructor. + */ +template +struct TIsTriviallyCopyConstructible +{ + enum { Value = TOrValue<__has_trivial_copy(T), TIsPODType>::Value }; +}; diff --git a/version/Core/Public/API/UE/Templates/IsTriviallyDestructible.h b/version/Core/Public/API/UE/Templates/IsTriviallyDestructible.h new file mode 100644 index 0000000..51e4d6b --- /dev/null +++ b/version/Core/Public/API/UE/Templates/IsTriviallyDestructible.h @@ -0,0 +1,29 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +namespace UE4IsTriviallyDestructible_Private +{ + // We have this specialization for enums to avoid the need to have a full definition of + // the type. + template + struct TImpl + { + enum { Value = true }; + }; + + template + struct TImpl + { + enum { Value = __has_trivial_destructor(T) }; + }; +} + +/** + * Traits class which tests if a type has a trivial destructor. + */ +template +struct TIsTriviallyDestructible +{ + enum { Value = UE4IsTriviallyDestructible_Private::TImpl::Value }; +}; diff --git a/version/Core/Public/API/UE/Templates/Less.h b/version/Core/Public/API/UE/Templates/Less.h new file mode 100644 index 0000000..c38e0bc --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Less.h @@ -0,0 +1,30 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +/** + * Binary predicate class for sorting elements in order. Assumes < operator is defined for the template type. + * Forward declaration exists in ContainersFwd.h + * + * See: http://en.cppreference.com/w/cpp/utility/functional/less + */ +template +struct TLess +{ + FORCEINLINE bool operator()(const T& A, const T& B) const + { + return A < B; + } +}; + +template <> +struct TLess +{ + template + FORCEINLINE bool operator()(const T& A, const T& B) const + { + return A < B; + } +}; diff --git a/version/Core/Public/API/UE/Templates/MemoryOps.h b/version/Core/Public/API/UE/Templates/MemoryOps.h new file mode 100644 index 0000000..aa3ac08 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/MemoryOps.h @@ -0,0 +1,278 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../HAL/UnrealMemory.h" +#include "EnableIf.h" +#include "AreTypesEqual.h" +#include "IsTriviallyCopyConstructible.h" +#include "UnrealTypeTraits.h" +#include + +#include "IsTriviallyCopyAssignable.h" +#include "IsTriviallyDestructible.h" + + +namespace UE4MemoryOps_Private +{ + template + struct TCanBitwiseRelocate + { + enum + { + Value = + TOr< + TAreTypesEqual, + TAnd< + TIsBitwiseConstructible, + TIsTriviallyDestructible + > + >::Value + }; + }; +} + +/** + * Default constructs a range of items in memory. + * + * @param Elements The address of the first memory location to construct at. + * @param Count The number of elements to destruct. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type DefaultConstructItems(void* Address, int32 Count) +{ + ElementType* Element = (ElementType*)Address; + while (Count) + { + new (Element) ElementType; + ++Element; + --Count; + } +} + + +template +FORCEINLINE typename TEnableIf::Value>::Type DefaultConstructItems(void* Elements, int32 Count) +{ + FMemory::Memset(Elements, 0, sizeof(ElementType) * Count); +} + + +/** + * Destructs a single item in memory. + * + * @param Elements A pointer to the item to destruct. + * + * @note: This function is optimized for values of T, and so will not dynamically dispatch destructor calls if T's destructor is virtual. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type DestructItem(ElementType* Element) +{ + // We need a typedef here because VC won't compile the destructor call below if ElementType itself has a member called ElementType + typedef ElementType DestructItemsElementTypeTypedef; + + Element->DestructItemsElementTypeTypedef::~DestructItemsElementTypeTypedef(); +} + + +template +FORCEINLINE typename TEnableIf::Value>::Type DestructItem(ElementType* Element) +{ +} + + +/** + * Destructs a range of items in memory. + * + * @param Elements A pointer to the first item to destruct. + * @param Count The number of elements to destruct. + * + * @note: This function is optimized for values of T, and so will not dynamically dispatch destructor calls if T's destructor is virtual. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type DestructItems(ElementType* Element, int32 Count) +{ + while (Count) + { + // We need a typedef here because VC won't compile the destructor call below if ElementType itself has a member called ElementType + typedef ElementType DestructItemsElementTypeTypedef; + + Element->DestructItemsElementTypeTypedef::~DestructItemsElementTypeTypedef(); + ++Element; + --Count; + } +} + + +template +FORCEINLINE typename TEnableIf::Value>::Type DestructItems(ElementType* Elements, int32 Count) +{ +} + + +/** + * Constructs a range of items into memory from a set of arguments. The arguments come from an another array. + * + * @param Dest The memory location to start copying into. + * @param Source A pointer to the first argument to pass to the constructor. + * @param Count The number of elements to copy. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type ConstructItems(void* Dest, const SourceElementType* Source, int32 Count) +{ + while (Count) + { + new (Dest) DestinationElementType(*Source); + ++(DestinationElementType*&)Dest; + ++Source; + --Count; + } +} + + +template +FORCEINLINE typename TEnableIf::Value>::Type ConstructItems(void* Dest, const SourceElementType* Source, int32 Count) +{ + FMemory::Memcpy(Dest, Source, sizeof(SourceElementType) * Count); +} + + +/** + * Copy assigns a range of items. + * + * @param Dest The memory location to start assigning to. + * @param Source A pointer to the first item to assign. + * @param Count The number of elements to assign. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type CopyAssignItems(ElementType* Dest, const ElementType* Source, int32 Count) +{ + while (Count) + { + *Dest = *Source; + ++Dest; + ++Source; + --Count; + } +} + + +template +FORCEINLINE typename TEnableIf::Value>::Type CopyAssignItems(ElementType* Dest, const ElementType* Source, int32 Count) +{ + FMemory::Memcpy(Dest, Source, sizeof(ElementType) * Count); +} + + +/** + * Relocates a range of items to a new memory location as a new type. This is a so-called 'destructive move' for which + * there is no single operation in C++ but which can be implemented very efficiently in general. + * + * @param Dest The memory location to relocate to. + * @param Source A pointer to the first item to relocate. + * @param Count The number of elements to relocate. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type RelocateConstructItems(void* Dest, const SourceElementType* Source, int32 Count) +{ + while (Count) + { + // We need a typedef here because VC won't compile the destructor call below if SourceElementType itself has a member called SourceElementType + typedef SourceElementType RelocateConstructItemsElementTypeTypedef; + + new (Dest) DestinationElementType(*Source); + ++(DestinationElementType*&)Dest; + (Source++)->RelocateConstructItemsElementTypeTypedef::~RelocateConstructItemsElementTypeTypedef(); + --Count; + } +} + +template +FORCEINLINE typename TEnableIf::Value>::Type RelocateConstructItems(void* Dest, const SourceElementType* Source, int32 Count) +{ + /* All existing UE containers seem to assume trivial relocatability (i.e. memcpy'able) of their members, + * so we're going to assume that this is safe here. However, it's not generally possible to assume this + * in general as objects which contain pointers/references to themselves are not safe to be trivially + * relocated. + * + * However, it is not yet possible to automatically infer this at compile time, so we can't enable + * different (i.e. safer) implementations anyway. */ + + FMemory::Memmove(Dest, Source, sizeof(SourceElementType) * Count); +} + +/** + * Move constructs a range of items into memory. + * + * @param Dest The memory location to start moving into. + * @param Source A pointer to the first item to move from. + * @param Count The number of elements to move. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type MoveConstructItems(void* Dest, const ElementType* Source, int32 Count) +{ + while (Count) + { + new (Dest) ElementType((ElementType&&)*Source); + ++(ElementType*&)Dest; + ++Source; + --Count; + } +} + +template +FORCEINLINE typename TEnableIf::Value>::Type MoveConstructItems(void* Dest, const ElementType* Source, int32 Count) +{ + FMemory::Memmove(Dest, Source, sizeof(ElementType) * Count); +} + +/** + * Move assigns a range of items. + * + * @param Dest The memory location to start move assigning to. + * @param Source A pointer to the first item to move assign. + * @param Count The number of elements to move assign. + */ +template +FORCEINLINE typename TEnableIf::Value>::Type MoveAssignItems(ElementType* Dest, const ElementType* Source, int32 Count) +{ + while (Count) + { + *Dest = (ElementType&&)*Source; + ++Dest; + ++Source; + --Count; + } +} + +template +FORCEINLINE typename TEnableIf::Value>::Type MoveAssignItems(ElementType* Dest, const ElementType* Source, int32 Count) +{ + FMemory::Memmove(Dest, Source, sizeof(ElementType) * Count); +} + +template +FORCEINLINE typename TEnableIf::IsBytewiseComparable, bool>::Type CompareItems(const ElementType* A, const ElementType* B, int32 Count) +{ + return !FMemory::Memcmp(A, B, sizeof(ElementType) * Count); +} + + +template +FORCEINLINE typename TEnableIf::IsBytewiseComparable, bool>::Type CompareItems(const ElementType* A, const ElementType* B, int32 Count) +{ + while (Count) + { + if (!(*A == *B)) + { + return false; + } + + ++A; + ++B; + --Count; + } + + return true; +} diff --git a/version/Core/Public/API/UE/Templates/PointerIsConvertibleFromTo.h b/version/Core/Public/API/UE/Templates/PointerIsConvertibleFromTo.h new file mode 100644 index 0000000..7b42cdd --- /dev/null +++ b/version/Core/Public/API/UE/Templates/PointerIsConvertibleFromTo.h @@ -0,0 +1,49 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" + +/** + * Tests if a From* is convertible to a To* + **/ +template +struct TPointerIsConvertibleFromTo +{ +private: + static uint8 Test(...); + static uint16 Test(To*); + +public: + enum { Value = sizeof(Test((From*)nullptr)) - 1 }; +}; + + +class TPointerIsConvertibleFromTo_TestBase +{ +}; + +class TPointerIsConvertibleFromTo_TestDerived : public TPointerIsConvertibleFromTo_TestBase +{ +}; + +class TPointerIsConvertibleFromTo_Unrelated +{ +}; + +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); + +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); +static_assert(!TPointerIsConvertibleFromTo::Value, "Platform TPointerIsConvertibleFromTo test failed."); diff --git a/version/Core/Public/API/UE/Templates/RemoveCV.h b/version/Core/Public/API/UE/Templates/RemoveCV.h new file mode 100644 index 0000000..a732f85 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/RemoveCV.h @@ -0,0 +1,13 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * TRemoveCV will remove any const/volatile qualifiers from a type. + * (based on std::remove_cv<> + * note: won't remove the const from "const int*", as the pointer is not const + */ +template struct TRemoveCV { typedef T Type; }; +template struct TRemoveCV { typedef T Type; }; +template struct TRemoveCV { typedef T Type; }; +template struct TRemoveCV { typedef T Type; }; diff --git a/version/Core/Public/API/UE/Templates/RemoveReference.h b/version/Core/Public/API/UE/Templates/RemoveReference.h new file mode 100644 index 0000000..0753fdf --- /dev/null +++ b/version/Core/Public/API/UE/Templates/RemoveReference.h @@ -0,0 +1,10 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +/** + * TRemoveReference will remove any references from a type. + */ +template struct TRemoveReference { typedef T Type; }; +template struct TRemoveReference { typedef T Type; }; +template struct TRemoveReference { typedef T Type; }; diff --git a/version/Core/Public/API/UE/Templates/ReversePredicate.h b/version/Core/Public/API/UE/Templates/ReversePredicate.h new file mode 100644 index 0000000..f0fe46f --- /dev/null +++ b/version/Core/Public/API/UE/Templates/ReversePredicate.h @@ -0,0 +1,23 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "UnrealTemplate.h" + +/** + * Helper class to reverse a predicate. + * Performs Predicate(B, A) + */ +template +class TReversePredicate +{ + const PredicateType& Predicate; + +public: + TReversePredicate( const PredicateType& InPredicate ) + : Predicate( InPredicate ) + {} + + template + FORCEINLINE bool operator()( T&& A, T&& B ) const { return Predicate( Forward(B), Forward(A) ); } +}; \ No newline at end of file diff --git a/version/Core/Public/API/UE/Templates/Sorting.h b/version/Core/Public/API/UE/Templates/Sorting.h new file mode 100644 index 0000000..49b09ba --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Sorting.h @@ -0,0 +1,417 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "../Containers/Algo/BinarySearch.h" +#include "../Containers/Algo/Sort.h" +#include "../Templates/Less.h" + +/** + * Helper class for dereferencing pointer types in Sort function + */ +template +struct TDereferenceWrapper +{ + const PREDICATE_CLASS& Predicate; + + TDereferenceWrapper( const PREDICATE_CLASS& InPredicate ) + : Predicate( InPredicate ) {} + + /** Pass through for non-pointer types */ + FORCEINLINE bool operator()( T& A, T& B ) { return Predicate( A, B ); } + FORCEINLINE bool operator()( const T& A, const T& B ) const { return Predicate( A, B ); } +}; +/** Partially specialized version of the above class */ +template +struct TDereferenceWrapper +{ + const PREDICATE_CLASS& Predicate; + + TDereferenceWrapper( const PREDICATE_CLASS& InPredicate ) + : Predicate( InPredicate ) {} + + /** Dereference pointers */ + FORCEINLINE bool operator()( T* A, T* B ) const + { + return Predicate( *A, *B ); + } +}; + +/** + * Wraps a range into a container like interface to satisfy the GetData and GetNum global functions. + * We're not using TArrayView since it calls ::Sort creating a circular dependency. + */ +template +struct TArrayRange +{ + TArrayRange(T* InPtr, int32 InSize) + : Begin(InPtr) + , Size(InSize) + { + } + + T* GetData() const { return Begin; } + int32 Num() const { return Size; } + +private: + T* Begin; + int32 Size; +}; + +template +struct TIsContiguousContainer< TArrayRange > +{ + enum { Value = true }; +}; + +/** + * Sort elements using user defined predicate class. The sort is unstable, meaning that the ordering of equal items is not necessarily preserved. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Predicate predicate class + */ +template +void Sort( T* First, const int32 Num, const PREDICATE_CLASS& Predicate ) +{ + TArrayRange ArrayRange( First, Num ); + Algo::Sort( ArrayRange, TDereferenceWrapper( Predicate ) ); +} + +/** + * Specialized version of the above Sort function for pointers to elements. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Predicate predicate class + */ +template +void Sort( T** First, const int32 Num, const PREDICATE_CLASS& Predicate ) +{ + TArrayRange ArrayRange( First, Num ); + Algo::Sort( ArrayRange, TDereferenceWrapper( Predicate ) ); +} + +/** + * Sort elements. The sort is unstable, meaning that the ordering of equal items is not necessarily preserved. + * Assumes < operator is defined for the template type. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + */ +template +void Sort( T* First, const int32 Num ) +{ + TArrayRange ArrayRange( First, Num ); + Algo::Sort( ArrayRange, TDereferenceWrapper >( TLess() ) ); +} + +/** + * Specialized version of the above Sort function for pointers to elements. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + */ +template +void Sort( T** First, const int32 Num ) +{ + TArrayRange ArrayRange( First, Num ); + Algo::Sort( ArrayRange, TDereferenceWrapper >( TLess() ) ); +} + +/** + * Stable merge to perform sort below. Stable sort is slower than non-stable + * algorithm. + * + * @param Out Pointer to the first element of output array. + * @param In Pointer to the first element to sort. + * @param Mid Middle point of the table, i.e. merge separator. + * @param Num Number of elements in the whole table. + * @param Predicate Predicate class. + */ +template +void Merge(T* Out, T* In, const int32 Mid, const int32 Num, const PREDICATE_CLASS& Predicate) +{ + int32 Merged = 0; + int32 Picked; + int32 A = 0, B = Mid; + + while (Merged < Num) + { + if (Merged != B && (B >= Num || !Predicate(In[B], In[A]))) + { + Picked = A++; + } + else + { + Picked = B++; + } + + Out[Merged] = In[Picked]; + + ++Merged; + } +} + +/** + * Euclidean algorithm using modulo policy. + */ +class FEuclidDivisionGCD +{ +public: + /** + * Calculate GCD. + * + * @param A First parameter. + * @param B Second parameter. + * + * @returns Greatest common divisor of A and B. + */ + static int32 GCD(int32 A, int32 B) + { + while (B != 0) + { + int32 Temp = B; + B = A % B; + A = Temp; + } + + return A; + } +}; + +/** + * Array rotation using juggling technique. + * + * @template_param TGCDPolicy Policy for calculating greatest common divisor. + */ +template +class TJugglingRotation +{ +public: + /** + * Rotates array. + * + * @param First Pointer to the array. + * @param From Rotation starting point. + * @param To Rotation ending point. + * @param Amount Amount of steps to rotate. + */ + template + static void Rotate(T* First, const int32 From, const int32 To, const int32 Amount) + { + if (Amount == 0) + { + return; + } + + auto Num = To - From; + auto GCD = TGCDPolicy::GCD(Num, Amount); + auto CycleSize = Num / GCD; + + for (int32 Index = 0; Index < GCD; ++Index) + { + T BufferObject = MoveTemp(First[From + Index]); + int32 IndexToFill = Index; + + for (int32 InCycleIndex = 0; InCycleIndex < CycleSize; ++InCycleIndex) + { + IndexToFill = (IndexToFill + Amount) % Num; + Exchange(First[From + IndexToFill], BufferObject); + } + } + } +}; + +/** + * Merge policy for merge sort. + * + * @template_param TRotationPolicy Policy for array rotation algorithm. + */ +template +class TRotationInPlaceMerge +{ +public: + /** + * Two sorted arrays merging function. + * + * @param First Pointer to array. + * @param Mid Middle point i.e. separation point of two arrays to merge. + * @param Num Number of elements in array. + * @param Predicate Predicate for comparison. + */ + template + static void Merge(T* First, const int32 Mid, const int32 Num, const PREDICATE_CLASS& Predicate) + { + int32 AStart = 0; + int32 BStart = Mid; + + while (AStart < BStart && BStart < Num) + { + // Index after the last value == First[BStart] + int32 NewAOffset = AlgoImpl::UpperBoundInternal(First + AStart, BStart - AStart, First[BStart], FIdentityFunctor(), Predicate); + AStart += NewAOffset; + + if (AStart >= BStart) // done + break; + + // Index of the first value == First[AStart] + int32 NewBOffset = AlgoImpl::LowerBoundInternal(First + BStart, Num - BStart, First[AStart], FIdentityFunctor(), Predicate); + TRotationPolicy::Rotate(First, AStart, BStart + NewBOffset, NewBOffset); + BStart += NewBOffset; + AStart += NewBOffset + 1; + } + } +}; + +/** + * Merge sort class. + * + * @template_param TMergePolicy Merging policy. + * @template_param MinMergeSubgroupSize Minimal size of the subgroup that should be merged. + */ +template +class TMergeSort +{ +public: + /** + * Sort the array. + * + * @param First Pointer to the array. + * @param Num Number of elements in the array. + * @param Predicate Predicate for comparison. + */ + template + static void Sort(T* First, const int32 Num, const PREDICATE_CLASS& Predicate) + { + int32 SubgroupStart = 0; + + if (MinMergeSubgroupSize > 1) + { + if (MinMergeSubgroupSize > 2) + { + // First pass with simple bubble-sort. + do + { + int32 GroupEnd = FPlatformMath::Min(SubgroupStart + MinMergeSubgroupSize, Num); + do + { + for (int32 It = SubgroupStart; It < GroupEnd - 1; ++It) + { + if (Predicate(First[It + 1], First[It])) + { + Exchange(First[It], First[It + 1]); + } + } + GroupEnd--; + } while (GroupEnd - SubgroupStart > 1); + + SubgroupStart += MinMergeSubgroupSize; + } while (SubgroupStart < Num); + } + else + { + for (int32 Subgroup = 0; Subgroup < Num; Subgroup += 2) + { + if (Subgroup + 1 < Num && Predicate(First[Subgroup + 1], First[Subgroup])) + { + Exchange(First[Subgroup], First[Subgroup + 1]); + } + } + } + } + + int32 SubgroupSize = MinMergeSubgroupSize; + while (SubgroupSize < Num) + { + SubgroupStart = 0; + do + { + TMergePolicy::Merge( + First + SubgroupStart, + SubgroupSize, + FPlatformMath::Min(SubgroupSize << 1, Num - SubgroupStart), + Predicate); + SubgroupStart += SubgroupSize << 1; + } while (SubgroupStart < Num); + + SubgroupSize <<= 1; + } + } +}; + +/** + * Stable sort elements using user defined predicate class. The sort is stable, + * meaning that the ordering of equal items is preserved, but it's slower than + * non-stable algorithm. + * + * This is the internal sorting function used by StableSort overrides. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Predicate predicate class + */ +template +void StableSortInternal(T* First, const int32 Num, const PREDICATE_CLASS& Predicate) +{ + TMergeSort > >::Sort(First, Num, Predicate); +} + +/** + * Stable sort elements using user defined predicate class. The sort is stable, + * meaning that the ordering of equal items is preserved, but it's slower than + * non-stable algorithm. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Predicate predicate class + */ +template +void StableSort(T* First, const int32 Num, const PREDICATE_CLASS& Predicate) +{ + StableSortInternal(First, Num, TDereferenceWrapper(Predicate)); +} + +/** + * Specialized version of the above StableSort function for pointers to elements. + * Stable sort is slower than non-stable algorithm. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + * @param Predicate predicate class + */ +template +void StableSort(T** First, const int32 Num, const PREDICATE_CLASS& Predicate) +{ + StableSortInternal(First, Num, TDereferenceWrapper(Predicate)); +} + +/** + * Stable sort elements. The sort is stable, meaning that the ordering of equal + * items is preserved, but it's slower than non-stable algorithm. + * + * Assumes < operator is defined for the template type. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + */ +template +void StableSort(T* First, const int32 Num) +{ + StableSortInternal(First, Num, TDereferenceWrapper >(TLess())); +} + +/** + * Specialized version of the above StableSort function for pointers to elements. + * Stable sort is slower than non-stable algorithm. + * + * @param First pointer to the first element to sort + * @param Num the number of items to sort + */ +template +void StableSort(T** First, const int32 Num) +{ + StableSortInternal(First, Num, TDereferenceWrapper >(TLess())); +} + diff --git a/version/Core/Public/API/UE/Templates/Tuple.h b/version/Core/Public/API/UE/Templates/Tuple.h new file mode 100644 index 0000000..3e46a6f --- /dev/null +++ b/version/Core/Public/API/UE/Templates/Tuple.h @@ -0,0 +1,716 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "AreTypesEqual.h" +#include "UnrealTemplate.h" +#include "Decay.h" +#include "../Delegates/IntegerSequence.h" + +// Static analysis causes internal compiler errors with auto-deduced return types, +// but some older VC versions still have return type deduction failures inside the delegate code +// when they are enabled. So we currently only enable them for static analysis builds. +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #define USE_TUPLE_AUTO_RETURN_TYPES (PLATFORM_COMPILER_HAS_AUTO_RETURN_TYPES && USING_CODE_ANALYSIS) +#else + #define USE_TUPLE_AUTO_RETURN_TYPES 1 +#endif + +#define TUPLES_USE_DEFAULTED_FUNCTIONS 1 + +template +struct TTuple; + +namespace UE4Tuple_Private +{ + template + struct TNthTypeFromParameterPack; + + template + struct TNthTypeFromParameterPack + { + typedef typename TNthTypeFromParameterPack::Type Type; + }; + + template + struct TNthTypeFromParameterPack<0, T, OtherTypes...> + { + typedef T Type; + }; + + template + struct TDecayedFrontOfParameterPackIsSameType + { + enum { Value = TAreTypesEqual::Type>::Type>::Value }; + }; + + template + struct TTupleElement + { + template < + typename... ArgTypes, + typename = typename TEnableIf< + TAndValue< + sizeof...(ArgTypes) != 0, + TOrValue< + sizeof...(ArgTypes) != 1, + TNot> + > + >::Value + >::Type + > + explicit TTupleElement(ArgTypes&&... Args) + : Value(Forward(Args)...) + { + } + + TTupleElement() + : Value() + { + } + + #if TUPLES_USE_DEFAULTED_FUNCTIONS + + TTupleElement(TTupleElement&&) = default; + TTupleElement(const TTupleElement&) = default; + TTupleElement& operator=(TTupleElement&&) = default; + TTupleElement& operator=(const TTupleElement&) = default; + + #else + + TTupleElement(TTupleElement&& Other) + : Value(MoveTemp(Other.Value)) + { + } + + TTupleElement(const TTupleElement& Other) + : Value(Other.Value) + { + } + + void operator=(TTupleElement&& Other) + { + Value = MoveTemp(Other.Value); + } + + void operator=(const TTupleElement& Other) + { + Value = Other.Value; + } + + #endif + + T Value; + }; + + template + struct TTupleElementHelperImpl; + + template + struct TTupleElementHelperImpl : TTupleElementHelperImpl + { + }; + + template + struct TTupleElementHelperImpl + { + typedef ElementType Type; + + template + static FORCEINLINE ElementType& Get(TupleType& Tuple) + { + return static_cast&>(Tuple).Value; + } + + template + static FORCEINLINE const ElementType& Get(const TupleType& Tuple) + { + return Get((TupleType&)Tuple); + } + }; + + template + struct TTupleElementHelper : TTupleElementHelperImpl<0, WantedIndex, Types...> + { + }; + + template + struct FEqualityHelper + { + template + FORCEINLINE static bool Compare(const TupleType& Lhs, const TupleType& Rhs) + { + return Lhs.template Get() == Rhs.template Get() && FEqualityHelper::Compare(Lhs, Rhs); + } + }; + + template + struct FEqualityHelper + { + template + FORCEINLINE static bool Compare(const TupleType& Lhs, const TupleType& Rhs) + { + return true; + } + }; + + template + struct TLessThanHelper + { + template + FORCEINLINE static bool Do(const TupleType& Lhs, const TupleType& Rhs) + { + return Lhs.template Get() < Rhs.template Get() || (!(Rhs.template Get() < Lhs.template Get()) && TLessThanHelper::Do(Lhs, Rhs)); + } + }; + + template + struct TLessThanHelper + { + template + FORCEINLINE static bool Do(const TupleType& Lhs, const TupleType& Rhs) + { + return Lhs.template Get() < Rhs.template Get(); + } + }; + + template + struct TLessThanHelper + { + template + FORCEINLINE static bool Do(const TupleType& Lhs, const TupleType& Rhs) + { + return false; + } + }; + + template + struct TTupleStorage; + + template + struct TTupleStorage, Types...> : TTupleElement... + { + template < + typename... ArgTypes, + typename = typename TEnableIf< + TAndValue< + sizeof...(ArgTypes) == sizeof...(Types) && sizeof...(ArgTypes) != 0, + TOrValue< + sizeof...(ArgTypes) != 1, + TNot> + > + >::Value + >::Type + > + explicit TTupleStorage(ArgTypes&&... Args) + : TTupleElement(Forward(Args))... + { + } + + #if TUPLES_USE_DEFAULTED_FUNCTIONS + + TTupleStorage() = default; + TTupleStorage(TTupleStorage&&) = default; + TTupleStorage(const TTupleStorage&) = default; + TTupleStorage& operator=(TTupleStorage&&) = default; + TTupleStorage& operator=(const TTupleStorage&) = default; + + #else + + TTupleStorage() + : TTupleElement()... + { + } + + TTupleStorage(TTupleStorage&& Other) + : TTupleElement(MoveTemp(*(TTupleElement*)&Other))... + { + } + + TTupleStorage(const TTupleStorage& Other) + : TTupleElement(*(const TTupleElement*)&Other)... + { + } + + void operator=(TTupleStorage&& Other) + { + int Temp[] = { 0, (*(TTupleElement*)this = MoveTemp(*(TTupleElement*)&Other), 0)... }; + (void)Temp; + } + + void operator=(const TTupleStorage& Other) + { + int Temp[] = { 0, (*(TTupleElement*)this = *(const TTupleElement*)&Other, 0)... }; + (void)Temp; + } + + #endif + + template FORCEINLINE const typename TTupleElementHelper::Type& Get() const { return TTupleElementHelper::Get(*this); } + template FORCEINLINE typename TTupleElementHelper::Type& Get() { return TTupleElementHelper::Get(*this); } + }; + + // Specialization of 2-TTuple to give it the API of TPair. + template + struct TTupleStorage, InKeyType, InValueType> + { + private: + template // Dummy needed for partial template specialization workaround + struct TGetHelper; + + template + struct TGetHelper<0, Dummy> + { + typedef InKeyType ResultType; + + static const InKeyType& Get(const TTupleStorage& Tuple) { return Tuple.Key; } + static InKeyType& Get( TTupleStorage& Tuple) { return Tuple.Key; } + }; + + template + struct TGetHelper<1, Dummy> + { + typedef InValueType ResultType; + + static const InValueType& Get(const TTupleStorage& Tuple) { return Tuple.Value; } + static InValueType& Get( TTupleStorage& Tuple) { return Tuple.Value; } + }; + + public: + typedef InKeyType KeyType; + typedef InValueType ValueType; + + template + explicit TTupleStorage(KeyInitType&& KeyInit, ValueInitType&& ValueInit) + : Key (Forward(KeyInit )) + , Value(Forward(ValueInit)) + { + } + + TTupleStorage() + : Key() + , Value() + { + } + + #if TUPLES_USE_DEFAULTED_FUNCTIONS + + TTupleStorage(TTupleStorage&&) = default; + TTupleStorage(const TTupleStorage&) = default; + TTupleStorage& operator=(TTupleStorage&&) = default; + TTupleStorage& operator=(const TTupleStorage&) = default; + + #else + + TTupleStorage(TTupleStorage&& Other) + : Key (MoveTemp(Other.Key)) + , Value(MoveTemp(Other.Value)) + { + } + + TTupleStorage(const TTupleStorage& Other) + : Key (Other.Key) + , Value(Other.Value) + { + } + + void operator=(TTupleStorage&& Other) + { + Key = MoveTemp(Other.Key); + Value = MoveTemp(Other.Value); + } + + void operator=(const TTupleStorage& Other) + { + Key = Other.Key; + Value = Other.Value; + } + + #endif + + template FORCEINLINE const typename TGetHelper::ResultType& Get() const { return TGetHelper::Get(*this); } + template FORCEINLINE typename TGetHelper::ResultType& Get() { return TGetHelper::Get(*this); } + + InKeyType Key; + InValueType Value; + }; + + template + struct TTupleImpl; + + template + struct TTupleImpl, Types...> : TTupleStorage, Types...> + { + private: + typedef TTupleStorage, Types...> Super; + + public: + using Super::Get; + + template < + typename... ArgTypes, + typename = typename TEnableIf< + TAndValue< + sizeof...(ArgTypes) == sizeof...(Types) && sizeof...(ArgTypes) != 0, + TOrValue< + sizeof...(ArgTypes) != 1, + TNot> + > + >::Value + >::Type + > + explicit TTupleImpl(ArgTypes&&... Args) + : Super(Forward(Args)...) + { + } + + #if TUPLES_USE_DEFAULTED_FUNCTIONS + + TTupleImpl() = default; + TTupleImpl(TTupleImpl&& Other) = default; + TTupleImpl(const TTupleImpl& Other) = default; + TTupleImpl& operator=(TTupleImpl&& Other) = default; + TTupleImpl& operator=(const TTupleImpl& Other) = default; + + #else + + TTupleImpl() + : Super() + { + } + + TTupleImpl(TTupleImpl&& Other) + : Super(MoveTemp(*(Super*)&Other)) + { + } + + TTupleImpl(const TTupleImpl& Other) + : Super(*(const Super*)&Other) + { + } + + void operator=(TTupleImpl&& Other) + { + *(Super*)this = MoveTemp(*(Super*)&Other); + } + + void operator=(const TTupleImpl& Other) + { + *(Super*)this = *(const Super*)&Other; + } + + #endif + + template + #if USE_TUPLE_AUTO_RETURN_TYPES + decltype(auto) ApplyAfter(FuncType&& Func, ArgTypes&&... Args) const + #else + auto ApplyAfter(FuncType&& Func, ArgTypes&&... Args) const -> decltype(Func(Forward(Args)..., Get()...)) + #endif + { + return Func(Forward(Args)..., this->template Get()...); + } + + template + #if USE_TUPLE_AUTO_RETURN_TYPES + decltype(auto) ApplyBefore(FuncType&& Func, ArgTypes&&... Args) const + #else + auto ApplyBefore(FuncType&& Func, ArgTypes&&... Args) const -> decltype(Func(Get()..., Forward(Args)...)) + #endif + { + return Func(this->template Get()..., Forward(Args)...); + } + + FORCEINLINE friend bool operator==(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + // This could be implemented with a fold expression when our compilers support it + return FEqualityHelper::Compare(Lhs, Rhs); + } + + FORCEINLINE friend bool operator!=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return !(Lhs == Rhs); + } + + FORCEINLINE friend bool operator<(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return TLessThanHelper::Do(Lhs, Rhs); + } + + FORCEINLINE friend bool operator<=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return !(Rhs < Lhs); + } + + FORCEINLINE friend bool operator>(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return Rhs < Lhs; + } + + FORCEINLINE friend bool operator>=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return !(Lhs < Rhs); + } + }; + + #ifdef _MSC_VER + + // Not strictly necessary, but some VC versions give a 'syntax error: ' error + // for empty tuples. + template <> + struct TTupleImpl> + { + explicit TTupleImpl() + { + } + + // Doesn't matter what these return, or even have a function body, but they need to be declared + template FORCEINLINE const int32& Get() const; + template FORCEINLINE int32& Get(); + + template + #if USE_TUPLE_AUTO_RETURN_TYPES + decltype(auto) ApplyAfter(FuncType&& Func, ArgTypes&&... Args) const + #else + auto ApplyAfter(FuncType&& Func, ArgTypes&&... Args) const -> decltype(Func(Forward(Args)...)) + #endif + { + return Func(Forward(Args)...); + } + + template + #if USE_TUPLE_AUTO_RETURN_TYPES + decltype(auto) ApplyBefore(FuncType&& Func, ArgTypes&&... Args) const + #else + auto ApplyBefore(FuncType&& Func, ArgTypes&&... Args) const -> decltype(Func(Forward(Args)...)) + #endif + { + return Func(Forward(Args)...); + } + + FORCEINLINE friend bool operator==(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return true; + } + + FORCEINLINE friend bool operator!=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return false; + } + + FORCEINLINE friend bool operator<(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return false; + } + + FORCEINLINE friend bool operator<=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return true; + } + + FORCEINLINE friend bool operator>(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return false; + } + + FORCEINLINE friend bool operator>=(const TTupleImpl& Lhs, const TTupleImpl& Rhs) + { + return true; + } + }; + + #endif + + template + struct TTransformTuple_Impl; + + template + struct TTransformTuple_Impl> + { + template + #if USE_TUPLE_AUTO_RETURN_TYPES + static decltype(auto) Do(TupleType&& Tuple, FuncType Func) + #else + static auto Do(TupleType&& Tuple, FuncType Func) -> decltype(MakeTuple(Func(Forward(Tuple).template Get())...)) + #endif + { + return MakeTuple(Func(Forward(Tuple).template Get())...); + } + }; + + template + struct TVisitTupleElements_Impl; + + template + struct TVisitTupleElements_Impl> + { + template + static void Do(TupleType&& Tuple, FuncType Func) + { + // This should be implemented with a fold expression when our compilers support it + int Temp[] = { 0, (Func(Tuple.template Get()), 0)... }; + (void)Temp; + } + }; + + + template + struct TCVTupleArity; + + template + struct TCVTupleArity> + { + enum { Value = sizeof...(Types) }; + }; +} + +template +struct TTuple : UE4Tuple_Private::TTupleImpl, Types...> +{ +private: + typedef UE4Tuple_Private::TTupleImpl, Types...> Super; + +public: + template < + typename... ArgTypes, + typename = typename TEnableIf< + TAndValue< + sizeof...(ArgTypes) == sizeof...(Types) && sizeof...(ArgTypes) != 0, + TOrValue< + sizeof...(ArgTypes) != 1, + TNot> + > + >::Value + >::Type + > + explicit TTuple(ArgTypes&&... Args) + : Super(Forward(Args)...) + { + // This constructor is disabled for TTuple and zero parameters because VC is incorrectly instantiating it as a move/copy/default constructor. + } + + #if TUPLES_USE_DEFAULTED_FUNCTIONS + + TTuple() = default; + TTuple(TTuple&&) = default; + TTuple(const TTuple&) = default; + TTuple& operator=(TTuple&&) = default; + TTuple& operator=(const TTuple&) = default; + + #else + + TTuple() + { + } + + TTuple(TTuple&& Other) + : Super(MoveTemp(*(Super*)&Other)) + { + } + + TTuple(const TTuple& Other) + : Super(*(const Super*)&Other) + { + } + + TTuple& operator=(TTuple&& Other) + { + *(Super*)this = MoveTemp(*(Super*)&Other); + return *this; + } + + TTuple& operator=(const TTuple& Other) + { + *(Super*)this = *(const Super*)&Other; + return *this; + } + + #endif +}; + + +/** + * Traits class which calculates the number of elements in a tuple. + */ +template +struct TTupleArity : UE4Tuple_Private::TCVTupleArity +{ +}; + + +/** + * Makes a TTuple from some arguments. The type of the TTuple elements are the decayed versions of the arguments. + * + * @param Args The arguments used to construct the tuple. + * @return A tuple containing a copy of the arguments. + * + * Example: + * + * void Func(const int32 A, FString&& B) + * { + * // Equivalent to: + * // TTuple MyTuple(A, TEXT("Hello"), MoveTemp(B)); + * auto MyTuple = MakeTuple(A, TEXT("Hello"), MoveTemp(B)); + * } + */ +template +TTuple::Type...> MakeTuple(Types&&... Args) +{ + return TTuple::Type...>(Forward(Args)...); +} + + +/** + * Creates a new TTuple by applying a functor to each of the elements. + * + * @param Tuple The tuple to apply the functor to. + * @param Func The functor to apply. + * + * @return A new tuple of the transformed elements. + * + * Example: + * + * float Overloaded(int32 Arg); + * char Overloaded(const TCHAR* Arg); + * const TCHAR* Overloaded(const FString& Arg); + * + * void Func(const TTuple& MyTuple) + * { + * // Equivalent to: + * // TTuple TransformedTuple(Overloaded(MyTuple.Get<0>()), Overloaded(MyTuple.Get<1>()), Overloaded(MyTuple.Get<2>()))); + * auto TransformedTuple = TransformTuple(MyTuple, [](const auto& Arg) { return Overloaded(Arg); }); + * } + */ +template +#if USE_TUPLE_AUTO_RETURN_TYPES + FORCEINLINE decltype(auto) TransformTuple(TTuple&& Tuple, FuncType Func) +#else + FORCEINLINE auto TransformTuple(TTuple&& Tuple, FuncType Func) -> decltype(UE4Tuple_Private::TTransformTuple_Impl>::Do(MoveTemp(Tuple), MoveTemp(Func))) +#endif +{ + return UE4Tuple_Private::TTransformTuple_Impl>::Do(MoveTemp(Tuple), MoveTemp(Func)); +} + +template +#if USE_TUPLE_AUTO_RETURN_TYPES + FORCEINLINE decltype(auto) TransformTuple(const TTuple& Tuple, FuncType Func) +#else + FORCEINLINE auto TransformTuple(const TTuple& Tuple, FuncType Func) -> decltype(UE4Tuple_Private::TTransformTuple_Impl>::Do(Tuple, MoveTemp(Func))) +#endif +{ + return UE4Tuple_Private::TTransformTuple_Impl>::Do(Tuple, MoveTemp(Func)); +} + + +/** + * Visits each element in the tuple in turn and applies the supplied functor to it. + * + * @param Tuple The tuple to apply the functor to. + * @param Func The functor to apply. + */ +template +FORCEINLINE void VisitTupleElements(TupleType& Tuple, FuncType Func) +{ + UE4Tuple_Private::TVisitTupleElements_Impl::Value>>::Do(Tuple, MoveTemp(Func)); +} diff --git a/version/Core/Public/API/UE/Templates/TypeCompatibleBytes.h b/version/Core/Public/API/UE/Templates/TypeCompatibleBytes.h new file mode 100644 index 0000000..4e894f4 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/TypeCompatibleBytes.h @@ -0,0 +1,60 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + + +/** + * Used to declare an untyped array of data with compile-time alignment. + * It needs to use template specialization as the MS_ALIGN and GCC_ALIGN macros require literal parameters. + */ +template +struct TAlignedBytes; // this intentionally won't compile, we don't support the requested alignment + +/** Unaligned storage. */ +template +struct TAlignedBytes +{ + uint8 Pad[Size]; +}; + + +// C++/CLI doesn't support alignment of native types in managed code, so we enforce that the element +// size is a multiple of the desired alignment +#ifdef __cplusplus_cli + #define IMPLEMENT_ALIGNED_STORAGE(Align) \ + template \ + struct TAlignedBytes \ + { \ + uint8 Pad[Size]; \ + static_assert(Size % Align == 0, "CLR interop types must not be aligned."); \ + }; +#else +/** A macro that implements TAlignedBytes for a specific alignment. */ +#define IMPLEMENT_ALIGNED_STORAGE(Align) \ + template \ + struct TAlignedBytes \ + { \ + struct MS_ALIGN(Align) TPadding \ + { \ + uint8 Pad[Size]; \ + } GCC_ALIGN(Align); \ + TPadding Padding; \ + }; +#endif + +// Implement TAlignedBytes for these alignments. +IMPLEMENT_ALIGNED_STORAGE(16); +IMPLEMENT_ALIGNED_STORAGE(8); +IMPLEMENT_ALIGNED_STORAGE(4); +IMPLEMENT_ALIGNED_STORAGE(2); + +#undef IMPLEMENT_ALIGNED_STORAGE + +/** An untyped array of data with compile-time alignment and size derived from another type. */ +template +struct TTypeCompatibleBytes : + public TAlignedBytes< + sizeof(ElementType), + alignof(ElementType) + > +{}; diff --git a/version/Core/Public/API/UE/Templates/TypeHash.h b/version/Core/Public/API/UE/Templates/TypeHash.h new file mode 100644 index 0000000..0ad6587 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/TypeHash.h @@ -0,0 +1,158 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "IsEnum.h" +#include "Tuple.h" + +/** + * Combines two hash values to get a third. + * Note - this function is not commutative. + */ +inline uint32 HashCombine(uint32 A, uint32 C) +{ + uint32 B = 0x9e3779b9; + A += B; + + A -= B; A -= C; A ^= (C>>13); + B -= C; B -= A; B ^= (A<<8); + C -= A; C -= B; C ^= (B>>13); + A -= B; A -= C; A ^= (C>>12); + B -= C; B -= A; B ^= (A<<16); + C -= A; C -= B; C ^= (B>>5); + A -= B; A -= C; A ^= (C>>3); + B -= C; B -= A; B ^= (A<<10); + C -= A; C -= B; C ^= (B>>15); + + return C; +} + + +inline uint32 PointerHash(const void* Key,uint32 C = 0) +{ + // Avoid LHS stalls on PS3 and Xbox 360 +#if PLATFORM_64BITS + // Ignoring the lower 4 bits since they are likely zero anyway. + // Higher bits are more significant in 64 bit builds. + auto PtrInt = reinterpret_cast(Key) >> 4; +#else + auto PtrInt = reinterpret_cast(Key); +#endif + + return HashCombine(static_cast(PtrInt), C); +} + + +// +// Hash functions for common types. +// + +inline uint32 GetTypeHash( const uint8 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const int8 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const uint16 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const int16 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const int32 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const uint32 A ) +{ + return A; +} + +inline uint32 GetTypeHash( const uint64 A ) +{ + return (uint32)A+((uint32)(A>>32) * 23); +} + +inline uint32 GetTypeHash( const int64 A ) +{ + return (uint32)A+((uint32)(A>>32) * 23); +} + +#if PLATFORM_MAC +inline uint32 GetTypeHash( const __uint128_t A ) +{ + uint64 Low = (uint64)A; + uint64 High = (uint64)(A >> 64); + return GetTypeHash(Low) ^ GetTypeHash(High); +} +#endif + +inline uint32 GetTypeHash( float Value ) +{ + return *(uint32*)&Value; +} + +inline uint32 GetTypeHash( double Value ) +{ + return GetTypeHash(*(uint64*)&Value); +} + +inline uint32 GetTypeHash( const void* A ) +{ + return PointerHash(A); +} + +inline uint32 GetTypeHash( void* A ) +{ + return PointerHash(A); +} + +template +FORCEINLINE typename TEnableIf::Value, uint32>::Type GetTypeHash(EnumType E) +{ + return GetTypeHash((__underlying_type(EnumType))E); +} + +namespace UE4TypeHash_Private +{ + template + struct TGetTupleHashHelper + { + template + FORCEINLINE static uint32 Do(uint32 Hash, const TupleType& Tuple) + { + return TGetTupleHashHelper::Do(HashCombine(Hash, GetTypeHash(Tuple.template Get())), Tuple); + } + }; + + template + struct TGetTupleHashHelper + { + template + FORCEINLINE static uint32 Do(uint32 Hash, const TupleType& Tuple) + { + return Hash; + } + }; +} + +template +FORCEINLINE uint32 GetTypeHash(const TTuple& Tuple) +{ + return UE4TypeHash_Private::TGetTupleHashHelper<1u, sizeof...(Types)>::Do(GetTypeHash(Tuple.template Get<0>()), Tuple); +} + +FORCEINLINE uint32 GetTypeHash(const TTuple<>& Tuple) +{ + return 0; +} diff --git a/version/Core/Public/API/UE/Templates/UnrealTemplate.h b/version/Core/Public/API/UE/Templates/UnrealTemplate.h new file mode 100644 index 0000000..65b0628 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/UnrealTemplate.h @@ -0,0 +1,566 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include "../BasicTypes.h" +#include "IsPointer.h" +#include "../HAL/UnrealMemory.h" +#include "EnableIf.h" +#include "AndOrNot.h" +#include "AreTypesEqual.h" +#include "IsArithmetic.h" +#include "UnrealTypeTraits.h" +#include "RemoveReference.h" +#include "TypeCompatibleBytes.h" +#include "IsContiguousContainer.h" + +/*----------------------------------------------------------------------------- + Standard templates. +-----------------------------------------------------------------------------*/ + +/** + * Chooses between the two parameters based on whether the first is nullptr or not. + * @return If the first parameter provided is non-nullptr, it is returned; otherwise the second parameter is returned. + */ +template +FORCEINLINE ReferencedType* IfAThenAElseB(ReferencedType* A,ReferencedType* B) +{ + const PTRINT IntA = reinterpret_cast(A); + const PTRINT IntB = reinterpret_cast(B); + + // Compute a mask which has all bits set if IntA is zero, and no bits set if it's non-zero. + const PTRINT MaskB = -(!IntA); + + return reinterpret_cast(IntA | (MaskB & IntB)); +} + +/** branchless pointer selection based on predicate +* return PTRINT(Predicate) ? A : B; +**/ +template +FORCEINLINE ReferencedType* IfPThenAElseB(PredicateType Predicate,ReferencedType* A,ReferencedType* B) +{ + const PTRINT IntA = reinterpret_cast(A); + const PTRINT IntB = reinterpret_cast(B); + + // Compute a mask which has all bits set if Predicate is zero, and no bits set if it's non-zero. + const PTRINT MaskB = -(!PTRINT(Predicate)); + + return reinterpret_cast((IntA & ~MaskB) | (IntB & MaskB)); +} + +/** A logical exclusive or function. */ +inline bool XOR(bool A, bool B) +{ + return A != B; +} + +/** This is used to provide type specific behavior for a copy which cannot change the value of B. */ +template +FORCEINLINE void Move(T& A,typename TMoveSupportTraits::Copy B) +{ + // Destruct the previous value of A. + A.~T(); + + // Use placement new and a copy constructor so types with const members will work. + new(&A) T(B); +} + +/** This is used to provide type specific behavior for a move which may change the value of B. */ +template +FORCEINLINE void Move(T& A,typename TMoveSupportTraits::Move B) +{ + // Destruct the previous value of A. + A.~T(); + + // Use placement new and a copy constructor so types with const members will work. + new(&A) T(MoveTemp(B)); +} + +/** + * Generically gets the data pointer of a contiguous container + */ +template::Value>::Type> +auto GetData(T&& Container) -> decltype(Container.GetData()) +{ + return Container.GetData(); +} + +template +CONSTEXPR T* GetData(T (&Container)[N]) +{ + return Container; +} + +template +CONSTEXPR T* GetData(std::initializer_list List) +{ + return List.begin(); +} + +/** +* Generically gets the number of items in a contiguous container +*/ +template::Value>::Type> +SIZE_T GetNum(T&& Container) +{ + return (SIZE_T)Container.Num(); +} + +template +CONSTEXPR SIZE_T GetNum(T (&Container)[N]) +{ + return N; +} + +template +CONSTEXPR SIZE_T GetNum(std::initializer_list List) +{ + return List.size(); +} + +/*---------------------------------------------------------------------------- + Standard macros. +----------------------------------------------------------------------------*/ + +#ifdef __clang__ + template + auto ArrayCountHelper(T& t) -> typename TEnableIf<__is_array(T), char(&)[sizeof(t) / sizeof(t[0]) + 1]>::Type; +#else + template + char (&ArrayCountHelper(const T (&)[N]))[N + 1]; +#endif + +// Number of elements in an array. +#define ARRAY_COUNT( array ) (sizeof(ArrayCountHelper(array)) - 1) + +// Offset of a struct member. +#ifndef UNREAL_CODE_ANALYZER +// UCA uses clang on Windows. According to C++11 standard, (which in this case clang follows and msvc doesn't) +// forbids using reinterpret_cast in constant expressions. msvc uses reinterpret_cast in offsetof macro, +// while clang uses compiler intrinsic. Calling static_assert(STRUCT_OFFSET(x, y) == SomeValue) causes compiler +// error when using clang on Windows (while including windows headers). +#define STRUCT_OFFSET( struc, member ) offsetof(struc, member) +#else +#define STRUCT_OFFSET( struc, member ) __builtin_offsetof(struc, member) +#endif + +#if PLATFORM_VTABLE_AT_END_OF_CLASS + #error need implementation +#else + #define VTABLE_OFFSET( Class, MultipleInheritenceParent ) ( ((PTRINT) static_cast((Class*)1)) - 1) +#endif + + +/** + * works just like std::min_element. + */ +template inline +ForwardIt MinElement(ForwardIt First, ForwardIt Last) +{ + ForwardIt Result = First; + for (; ++First != Last; ) + { + if (*First < *Result) + { + Result = First; + } + } + return Result; +} + +/** + * works just like std::min_element. + */ +template inline +ForwardIt MinElement(ForwardIt First, ForwardIt Last, PredicateType Predicate) +{ + ForwardIt Result = First; + for (; ++First != Last; ) + { + if (Predicate(*First,*Result)) + { + Result = First; + } + } + return Result; +} + +/** +* works just like std::max_element. +*/ +template inline +ForwardIt MaxElement(ForwardIt First, ForwardIt Last) +{ + ForwardIt Result = First; + for (; ++First != Last; ) + { + if (*Result < *First) + { + Result = First; + } + } + return Result; +} + +/** +* works just like std::max_element. +*/ +template inline +ForwardIt MaxElement(ForwardIt First, ForwardIt Last, PredicateType Predicate) +{ + ForwardIt Result = First; + for (; ++First != Last; ) + { + if (Predicate(*Result,*First)) + { + Result = First; + } + } + return Result; +} + +/** + * utility template for a class that should not be copyable. + * Derive from this class to make your class non-copyable + */ +class FNoncopyable +{ +protected: + // ensure the class cannot be constructed directly + FNoncopyable() {} + // the class should not be used polymorphically + ~FNoncopyable() {} +private: + FNoncopyable(const FNoncopyable&); + FNoncopyable& operator=(const FNoncopyable&); +}; + + +/** + * exception-safe guard around saving/restoring a value. + * Commonly used to make sure a value is restored + * even if the code early outs in the future. + * Usage: + * TGuardValue GuardSomeBool(bSomeBool, false); // Sets bSomeBool to false, and restores it in dtor. + */ +template +struct TGuardValue : private FNoncopyable +{ + TGuardValue(Type& ReferenceValue, const Type& NewValue) + : RefValue(ReferenceValue), OldValue(ReferenceValue) + { + RefValue = NewValue; + } + ~TGuardValue() + { + RefValue = OldValue; + } + + /** + * Overloaded dereference operator. + * Provides read-only access to the original value of the data being tracked by this struct + * + * @return a const reference to the original data value + */ + FORCEINLINE const Type& operator*() const + { + return OldValue; + } + +private: + Type& RefValue; + Type OldValue; +}; + + +/** + * Commonly used to make sure a value is incremented, and then decremented anyway the function can terminate. + * Usage: + * TScopeCounter BeginProcessing(ProcessingCount); // increments ProcessingCount, and decrements it in the dtor + */ +template +struct TScopeCounter : private FNoncopyable +{ + TScopeCounter(Type& ReferenceValue) + : RefValue(ReferenceValue) + { + ++RefValue; + } + ~TScopeCounter() + { + --RefValue; + } + +private: + Type& RefValue; +}; + + +/** + * Helper class to make it easy to use key/value pairs with a container. + */ +template +struct TKeyValuePair +{ + TKeyValuePair( const KeyType& InKey, const ValueType& InValue ) + : Key(InKey), Value(InValue) + { + } + TKeyValuePair( const KeyType& InKey ) + : Key(InKey) + { + } + TKeyValuePair() + { + } + bool operator==( const TKeyValuePair& Other ) const + { + return Key == Other.Key; + } + bool operator!=( const TKeyValuePair& Other ) const + { + return Key != Other.Key; + } + bool operator<( const TKeyValuePair& Other ) const + { + return Key < Other.Key; + } + FORCEINLINE bool operator()( const TKeyValuePair& A, const TKeyValuePair& B ) const + { + return A.Key < B.Key; + } + KeyType Key; + ValueType Value; +}; + +// +// Macros that can be used to specify multiple template parameters in a macro parameter. +// This is necessary to prevent the macro parsing from interpreting the template parameter +// delimiting comma as a macro parameter delimiter. +// + +#define TEMPLATE_PARAMETERS2(X,Y) X,Y + + +/** + * Removes one level of pointer from a type, e.g.: + * + * TRemovePointer< int32 >::Type == int32 + * TRemovePointer< int32* >::Type == int32 + * TRemovePointer< int32**>::Type == int32* + * TRemovePointer::Type == const int32 + */ +template struct TRemovePointer { typedef T Type; }; +template struct TRemovePointer { typedef T Type; }; + +/** + * MoveTemp will cast a reference to an rvalue reference. + * This is UE's equivalent of std::move except that it will not compile when passed an rvalue or + * const object, because we would prefer to be informed when MoveTemp will have no effect. + */ +template +FORCEINLINE typename TRemoveReference::Type&& MoveTemp(T&& Obj) +{ + typedef typename TRemoveReference::Type CastType; + + // Validate that we're not being passed an rvalue or a const object - the former is redundant, the latter is almost certainly a mistake + static_assert(TIsLValueReferenceType::Value, "MoveTemp called on an rvalue"); + static_assert(!TAreTypesEqual::Value, "MoveTemp called on a const object"); + + return (CastType&&)Obj; +} + +/** + * MoveTemp will cast a reference to an rvalue reference. + * This is UE's equivalent of std::move. It doesn't static assert like MoveTemp, because it is useful in + * templates or macros where it's not obvious what the argument is, but you want to take advantage of move semantics + * where you can but not stop compilation. + */ +template +FORCEINLINE typename TRemoveReference::Type&& MoveTempIfPossible(T&& Obj) +{ + typedef typename TRemoveReference::Type CastType; + return (CastType&&)Obj; +} + +/** + * CopyTemp will enforce the creation of an rvalue which can bind to rvalue reference parameters. + * Unlike MoveTemp, the source object will never be modifed. (i.e. a copy will be made) + * There is no std:: equivalent. + */ +template +FORCEINLINE T CopyTemp(T& Val) +{ + return const_cast(Val); +} + +template +FORCEINLINE T CopyTemp(const T& Val) +{ + return Val; +} + +template +FORCEINLINE T&& CopyTemp(T&& Val) +{ + // If we already have an rvalue, just return it unchanged, rather than needlessly creating yet another rvalue from it. + return MoveTemp(Val); +} + +/** + * Forward will cast a reference to an rvalue reference. + * This is UE's equivalent of std::forward. + */ +template +FORCEINLINE T&& Forward(typename TRemoveReference::Type& Obj) +{ + return (T&&)Obj; +} + +template +FORCEINLINE T&& Forward(typename TRemoveReference::Type&& Obj) +{ + return (T&&)Obj; +} + +/** + * A traits class which specifies whether a Swap of a given type should swap the bits or use a traditional value-based swap. + */ +template +struct TUseBitwiseSwap +{ + // We don't use bitwise swapping for 'register' types because this will force them into memory and be slower. + enum { Value = !TOrValue<__is_enum(T), TIsPointer, TIsArithmetic>::Value }; +}; + + +/** + * Swap two values. Assumes the types are trivially relocatable. + */ +template +inline typename TEnableIf::Value>::Type Swap(T& A, T& B) +{ + if (LIKELY(&A != &B)) + { + TTypeCompatibleBytes Temp; + FMemory::Memcpy(&Temp, &A, sizeof(T)); + FMemory::Memcpy(&A, &B, sizeof(T)); + FMemory::Memcpy(&B, &Temp, sizeof(T)); + } +} + +template +inline typename TEnableIf::Value>::Type Swap(T& A, T& B) +{ + T Temp = MoveTemp(A); + A = MoveTemp(B); + B = MoveTemp(Temp); +} + +template +inline void Exchange(T& A, T& B) +{ + Swap(A, B); +} + +/** + * This exists to avoid a Visual Studio bug where using a cast to forward an rvalue reference array argument + * to a pointer parameter will cause bad code generation. Wrapping the cast in a function causes the correct + * code to be generated. + */ +template +FORCEINLINE T StaticCast(ArgType&& Arg) +{ + return static_cast(Arg); +} + +/** + * TRValueToLValueReference converts any rvalue reference type into the equivalent lvalue reference, otherwise returns the same type. + */ +template struct TRValueToLValueReference { typedef T Type; }; +template struct TRValueToLValueReference { typedef T& Type; }; + +/** + * Reverses the order of the bits of a value. + * This is an TEnableIf'd template to ensure that no undesirable conversions occur. Overloads for other types can be added in the same way. + * + * @param Bits - The value to bit-swap. + * @return The bit-swapped value. + */ +template +FORCEINLINE typename TEnableIf::Value, T>::Type ReverseBits( T Bits ) +{ + Bits = ( Bits << 16) | ( Bits >> 16); + Bits = ( (Bits & 0x00ff00ff) << 8 ) | ( (Bits & 0xff00ff00) >> 8 ); + Bits = ( (Bits & 0x0f0f0f0f) << 4 ) | ( (Bits & 0xf0f0f0f0) >> 4 ); + Bits = ( (Bits & 0x33333333) << 2 ) | ( (Bits & 0xcccccccc) >> 2 ); + Bits = ( (Bits & 0x55555555) << 1 ) | ( (Bits & 0xaaaaaaaa) >> 1 ); + return Bits; +} + +/** Template for initializing a singleton at the boot. */ +template< class T > +struct TForceInitAtBoot +{ + TForceInitAtBoot() + { + T::Get(); + } +}; + +/** Used to avoid cluttering code with ifdefs. */ +struct FNoopStruct +{ + FNoopStruct() + {} + + ~FNoopStruct() + {} +}; + +/** + * Copies the cv-qualifiers from one type to another, e.g.: + * + * TCopyQualifiersFromTo::Type == const T2 + * TCopyQualifiersFromTo::Type == const volatile T2 + */ +template struct TCopyQualifiersFromTo { typedef To Type; }; +template struct TCopyQualifiersFromTo { typedef const To Type; }; +template struct TCopyQualifiersFromTo< volatile From, To> { typedef volatile To Type; }; +template struct TCopyQualifiersFromTo { typedef const volatile To Type; }; + +/** + * Tests if qualifiers are lost between one type and another, e.g.: + * + * TCopyQualifiersFromTo::Value == true + * TCopyQualifiersFromTo::Value == false + */ +template +struct TLosesQualifiersFromTo +{ + enum { Value = !TAreTypesEqual::Type, To>::Value }; +}; + +/** + * Returns the same type passed to it. This is useful in a few cases, but mainly for inhibiting template argument deduction in function arguments, e.g.: + * + * template + * void Func1(T Val); // Can be called like Func(123) or Func(123); + * + * template + * void Func2(typename TIdentity::Type Val); // Must be called like Func(123) + */ +template +struct TIdentity +{ + typedef T Type; +}; + +/** + * Equivalent to std::declval. + * + * Note that this function is unimplemented, and is only intended to be used in unevaluated contexts, like sizeof and trait expressions. + */ +template +T&& DeclVal(); diff --git a/version/Core/Public/API/UE/Templates/UnrealTypeTraits.h b/version/Core/Public/API/UE/Templates/UnrealTypeTraits.h new file mode 100644 index 0000000..cd91650 --- /dev/null +++ b/version/Core/Public/API/UE/Templates/UnrealTypeTraits.h @@ -0,0 +1,482 @@ +// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. + +/*============================================================================= +UnrealTypeTraits.h: Unreal type traits definitions. +Note: Boost does a much better job of limiting instantiations. +We require VC8 so a lot of potential version checks are omitted. +=============================================================================*/ + +#pragma once + +#include "../BasicTypes.h" +#include "IsPointer.h" +#include "AndOrNot.h" +#include "AreTypesEqual.h" +#include "IsArithmetic.h" +#include "IsEnum.h" +#include "RemoveCV.h" + +#include "IsPODType.h" +#include "IsTriviallyCopyConstructible.h" + + +/*----------------------------------------------------------------------------- +* Macros to abstract the presence of certain compiler intrinsic type traits +-----------------------------------------------------------------------------*/ +#define HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +#define IS_POD(T) __is_pod(T) +#define IS_EMPTY(T) __is_empty(T) + + +/*----------------------------------------------------------------------------- +Type traits similar to TR1 (uses intrinsics supported by VC8) +Should be updated/revisited/discarded when compiler support for tr1 catches up. +-----------------------------------------------------------------------------*/ + +/** +* TIsSame +* +* Unreal implementation of std::is_same trait. +*/ +template struct TIsSame { enum { Value = false }; }; +template struct TIsSame { enum { Value = true }; }; + +/** +* TIsCharType +*/ +template struct TIsCharType { enum { Value = false }; }; +template<> struct TIsCharType { enum { Value = true }; }; +template<> struct TIsCharType { enum { Value = true }; }; +template<> struct TIsCharType { enum { Value = true }; }; + +/** +* TFormatSpecifier, only applies to numeric types +*/ +template +struct TFormatSpecifier +{ + FORCEINLINE static TCHAR const* GetFormatSpecifier() + { + // Force the template instantiation to be dependent upon T so the compiler cannot automatically decide that this template can never be instantiated. + // If the static_assert below were a constant 0 or something not dependent on T, compilers are free to detect this and fail to compile the template. + // As specified in the C++ standard s14.6p8. A compiler is free to give a diagnostic here or not. MSVC ignores it, and clang/gcc instantiates the + // template and triggers the static_assert. + static_assert(sizeof(T) < 0, "Format specifier not supported for this type."); // request for a format specifier for a type we do not know about + return TEXT("Unknown"); + } +}; +#define Expose_TFormatSpecifier(type, format) \ +template<> \ +struct TFormatSpecifier \ +{ \ + FORCEINLINE static const TCHAR (&GetFormatSpecifier())[5] \ + { \ + static const TCHAR Spec[5] = TEXT(format); \ + return Spec; \ + } \ +}; + +Expose_TFormatSpecifier(bool, "%i") +Expose_TFormatSpecifier(uint8, "%u") +Expose_TFormatSpecifier(uint16, "%u") +Expose_TFormatSpecifier(uint32, "%u") +Expose_TFormatSpecifier(uint64, "%llu") +Expose_TFormatSpecifier(int8, "%d") +Expose_TFormatSpecifier(int16, "%d") +Expose_TFormatSpecifier(int32, "%d") +Expose_TFormatSpecifier(int64, "%lld") +Expose_TFormatSpecifier(float, "%f") +Expose_TFormatSpecifier(double, "%f") +Expose_TFormatSpecifier(long double, "%f") + + +/** +* TIsReferenceType +*/ +template struct TIsReferenceType { enum { Value = false }; }; +template struct TIsReferenceType { enum { Value = true }; }; +template struct TIsReferenceType { enum { Value = true }; }; + +/** +* TIsLValueReferenceType +*/ +template struct TIsLValueReferenceType { enum { Value = false }; }; +template struct TIsLValueReferenceType { enum { Value = true }; }; + +/** +* TIsRValueReferenceType +*/ +template struct TIsRValueReferenceType { enum { Value = false }; }; +template struct TIsRValueReferenceType { enum { Value = true }; }; + +/** +* TIsVoidType +*/ +template struct TIsVoidType { enum { Value = false }; }; +template<> struct TIsVoidType { enum { Value = true }; }; +template<> struct TIsVoidType { enum { Value = true }; }; +template<> struct TIsVoidType { enum { Value = true }; }; +template<> struct TIsVoidType { enum { Value = true }; }; + +/** +* TIsFundamentalType +*/ +template +struct TIsFundamentalType +{ + enum { Value = TOr, TIsVoidType>::Value }; +}; + +/** +* TIsFunction +* +* Tests is a type is a function. +*/ +template +struct TIsFunction +{ + enum { Value = false }; +}; + +template +struct TIsFunction +{ + enum { Value = true }; +}; + +/** +* TIsZeroConstructType +*/ +template +struct TIsZeroConstructType +{ + enum { Value = TOr, TIsArithmetic, TIsPointer>::Value }; +}; + +/** +* TIsWeakPointerType +*/ +template +struct TIsWeakPointerType +{ + enum { Value = false }; +}; + + +/** +* TNameOf +*/ +template +struct TNameOf +{ + FORCEINLINE static TCHAR const* GetName() + { + return TEXT("Unknown"); + } +}; + +#define Expose_TNameOf(type) \ +template<> \ +struct TNameOf \ +{ \ + FORCEINLINE static TCHAR const* GetName() \ + { \ + return TEXT(#type); \ + } \ +}; + +Expose_TNameOf(uint8) +Expose_TNameOf(uint16) +Expose_TNameOf(uint32) +Expose_TNameOf(uint64) +Expose_TNameOf(int8) +Expose_TNameOf(int16) +Expose_TNameOf(int32) +Expose_TNameOf(int64) +Expose_TNameOf(float) +Expose_TNameOf(double) + +/*----------------------------------------------------------------------------- +Call traits - Modeled somewhat after boost's interfaces. +-----------------------------------------------------------------------------*/ + +/** +* Call traits helpers +*/ +template +struct TCallTraitsParamTypeHelper +{ + typedef const T& ParamType; + typedef const T& ConstParamType; +}; +template +struct TCallTraitsParamTypeHelper +{ + typedef const T ParamType; + typedef const T ConstParamType; +}; +template +struct TCallTraitsParamTypeHelper +{ + typedef T* ParamType; + typedef const T* ConstParamType; +}; + + +/*----------------------------------------------------------------------------- +Helper templates for dealing with 'const' in template code +-----------------------------------------------------------------------------*/ + +/** +* TRemoveConst<> is modeled after boost's implementation. It allows you to take a templatized type +* such as 'const Foo*' and use const_cast to convert that type to 'Foo*' without knowing about Foo. +* +* MutablePtr = const_cast< RemoveConst< ConstPtrType >::Type >( ConstPtr ); +*/ +template< class T > +struct TRemoveConst +{ + typedef T Type; +}; +template< class T > +struct TRemoveConst +{ + typedef T Type; +}; + + +/*----------------------------------------------------------------------------- +* TCallTraits +* +* Same call traits as boost, though not with as complete a solution. +* +* The main member to note is ParamType, which specifies the optimal +* form to pass the type as a parameter to a function. +* +* Has a small-value optimization when a type is a POD type and as small as a pointer. +-----------------------------------------------------------------------------*/ + +/** +* base class for call traits. Used to more easily refine portions when specializing +*/ +template +struct TCallTraitsBase +{ +private: + enum { PassByValue = TOr>, TIsArithmetic, TIsPointer>::Value }; +public: + typedef T ValueType; + typedef T& Reference; + typedef const T& ConstReference; + typedef typename TCallTraitsParamTypeHelper::ParamType ParamType; + typedef typename TCallTraitsParamTypeHelper::ConstParamType ConstPointerType; +}; + +/** +* TCallTraits +*/ +template +struct TCallTraits : public TCallTraitsBase {}; + +// Fix reference-to-reference problems. +template +struct TCallTraits +{ + typedef T& ValueType; + typedef T& Reference; + typedef const T& ConstReference; + typedef T& ParamType; + typedef T& ConstPointerType; +}; + +// Array types +template +struct TCallTraits +{ +private: + typedef T ArrayType[N]; +public: + typedef const T* ValueType; + typedef ArrayType& Reference; + typedef const ArrayType& ConstReference; + typedef const T* const ParamType; + typedef const T* const ConstPointerType; +}; + +// const array types +template +struct TCallTraits +{ +private: + typedef const T ArrayType[N]; +public: + typedef const T* ValueType; + typedef ArrayType& Reference; + typedef const ArrayType& ConstReference; + typedef const T* const ParamType; + typedef const T* const ConstPointerType; +}; + + +/*----------------------------------------------------------------------------- +Traits for our particular container classes +-----------------------------------------------------------------------------*/ + +/** +* Helper for array traits. Provides a common base to more easily refine a portion of the traits +* when specializing. Mainly used by MemoryOps.h which is used by the contiguous storage containers like TArray. +*/ +template +struct TTypeTraitsBase +{ + typedef typename TCallTraits::ParamType ConstInitType; + typedef typename TCallTraits::ConstPointerType ConstPointerType; + + // There's no good way of detecting this so we'll just assume it to be true for certain known types and expect + // users to customize it for their custom types. + enum { IsBytewiseComparable = TOr, TIsArithmetic, TIsPointer>::Value }; +}; + +/** +* Traits for types. +*/ +template struct TTypeTraits : public TTypeTraitsBase {}; + + +/** +* Traits for containers. +*/ +template struct TContainerTraitsBase +{ + // This should be overridden by every container that supports emptying its contents via a move operation. + enum { MoveWillEmptyContainer = false }; +}; + +template struct TContainerTraits : public TContainerTraitsBase {}; + +struct FVirtualDestructor +{ + virtual ~FVirtualDestructor() {} +}; + +template +struct TMoveSupportTraitsBase +{ + // Param type is not an const lvalue reference, which means it's pass-by-value, so we should just provide a single type for copying. + // Move overloads will be ignored due to SFINAE. + typedef U Copy; +}; + +template +struct TMoveSupportTraitsBase +{ + // Param type is a const lvalue reference, so we can provide an overload for moving. + typedef const T& Copy; + typedef T&& Move; +}; + +/** +* This traits class is intended to be used in pairs to allow efficient and correct move-aware overloads for generic types. +* For example: +* +* template +* void Func(typename TMoveSupportTraits::Copy Obj) +* { +* // Copy Obj here +* } +* +* template +* void Func(typename TMoveSupportTraits::Move Obj) +* { +* // Move from Obj here as if it was passed as T&& +* } +* +* Structuring things in this way will handle T being a pass-by-value type (e.g. ints, floats, other 'small' types) which +* should never have a reference overload. +*/ +template +struct TMoveSupportTraits : TMoveSupportTraitsBase::ParamType> +{ +}; + +/** +* Tests if a type T is bitwise-constructible from a given argument type U. That is, whether or not +* the U can be memcpy'd in order to produce an instance of T, rather than having to go +* via a constructor. +* +* Examples: +* TIsBitwiseConstructible::Value == true // PODs can be trivially copied +* TIsBitwiseConstructible::Value == true // a non-const Derived pointer is trivially copyable as a const Base pointer +* TIsBitwiseConstructible::Value == false // not legal the other way because it would be a const-correctness violation +* TIsBitwiseConstructible::Value == true // signed integers can be memcpy'd as unsigned integers +* TIsBitwiseConstructible::Value == true // and vice versa +*/ + +template +struct TIsBitwiseConstructible +{ + static_assert( + !TIsReferenceType::Value && + !TIsReferenceType::Value, + "TIsBitwiseConstructible is not designed to accept reference types"); + + static_assert( + TAreTypesEqual::Type>::Value && + TAreTypesEqual::Type>::Value, + "TIsBitwiseConstructible is not designed to accept qualified types"); + + // Assume no bitwise construction in general + enum { Value = false }; +}; + +template +struct TIsBitwiseConstructible +{ + // Ts can always be bitwise constructed from itself if it is trivially copyable. + enum { Value = TIsTriviallyCopyConstructible::Value }; +}; + +template +struct TIsBitwiseConstructible : TIsBitwiseConstructible +{ + // Constructing a const T is the same as constructing a T +}; + +// Const pointers can be bitwise constructed from non-const pointers. +// This is not true for pointer conversions in general, e.g. where an offset may need to be applied in the case +// of multiple inheritance, but there is no way of detecting that at compile-time. +template +struct TIsBitwiseConstructible +{ + // Constructing a const T is the same as constructing a T + enum { Value = true }; +}; + +// Unsigned types can be bitwise converted to their signed equivalents, and vice versa. +// (assuming two's-complement, which we are) +template <> struct TIsBitwiseConstructible { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible< int8, uint8> { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible< int16, uint16> { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible< int32, uint32> { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible { enum { Value = true }; }; +template <> struct TIsBitwiseConstructible< int64, uint64> { enum { Value = true }; }; + +#define GENERATE_MEMBER_FUNCTION_CHECK(MemberName, Result, ConstModifier, ...) \ +template \ +class THasMemberFunction_##MemberName \ +{ \ + template struct Check; \ + template static char MemberTest(Check *); \ + template static int MemberTest(...); \ +public: \ + enum { Value = sizeof(MemberTest(nullptr)) == sizeof(char) }; \ +}; + +/*----------------------------------------------------------------------------- +* Undef Macros abstracting the presence of certain compiler intrinsic type traits +-----------------------------------------------------------------------------*/ +#undef IS_EMPTY +#undef IS_POD +#undef HAS_TRIVIAL_CONSTRUCTOR diff --git a/version/Core/Public/API/UE/UE.h b/version/Core/Public/API/UE/UE.h new file mode 100644 index 0000000..6b14fe9 --- /dev/null +++ b/version/Core/Public/API/UE/UE.h @@ -0,0 +1,659 @@ +#pragma once + +#include +#include + +#include "Containers/TArray.h" +#include "Containers/FString.h" +#include "Containers/EnumAsByte.h" +#include "API/Fields.h" +#include "API/Enums.h" + +// Base types + +struct FText; + +struct FName +{ + int ComparisonIndex; + unsigned int Number; + + // Functions + + FName() : ComparisonIndex(0), Number(0) + { + } + + //static TStaticIndirectArrayThreadSafeRead * GetNames() { return NativeCall *>(nullptr, "FName.GetNames"); } + static FString * NameToDisplayString(FString * result, FString * InDisplayName, const bool bIsBool) { return NativeCall(nullptr, "FName.NameToDisplayString", result, InDisplayName, bIsBool); } + FName(const wchar_t * Name, EFindName FindType, bool __formal) { NativeCall(this, "FName.FName", Name, FindType, __formal); } + FName(const char * Name, EFindName FindType, bool __formal) { NativeCall(this, "FName.FName", Name, FindType, __formal); } + bool operator==(const wchar_t * Other) { return NativeCall(this, "FName.operator==", Other); } + int Compare(FName * Other) { return NativeCall(this, "FName.Compare", Other); } + void Init(const wchar_t * InName, int InNumber, EFindName FindType, bool bSplitName, int HardcodeIndex) { NativeCall(this, "FName.Init", InName, InNumber, FindType, bSplitName, HardcodeIndex); } + void ToString(FString * Out) { NativeCall(this, "FName.ToString", Out); } + void AppendString(FString * Out) { NativeCall(this, "FName.AppendString", Out); } + static bool SplitNameWithCheck(const wchar_t * OldName, wchar_t * NewName, int NewNameLen, int * NewNumber) { return NativeCall(nullptr, "FName.SplitNameWithCheck", OldName, NewName, NewNameLen, NewNumber); } + bool IsValidXName(FString InvalidChars, FText * Reason) { return NativeCall(this, "FName.IsValidXName", InvalidChars, Reason); } + void Init(const char * InName, int InNumber, EFindName FindType, bool bSplitName, int HardcodeIndex) { NativeCall(this, "FName.Init", InName, InNumber, FindType, bSplitName, HardcodeIndex); } +}; + +struct FTransform +{ + __m128 Rotation; + __m128 Translation; + __m128 Scale3D; +}; + +struct FBoxSphereBounds +{ +}; + +struct FGuid +{ + uint32_t A; + uint32_t B; + uint32_t C; + uint32_t D; +}; + +struct UFunction +{ +}; + +struct FBox +{ +}; + +template +struct TSharedPtr +{ + ObjectType* Object; + short int SharedReferenceCount; + + FORCEINLINE ObjectType& operator*() const + { + return *Object; + } + + FORCEINLINE ObjectType* operator->() const + { + return Object; + } +}; + +template +struct TSubobjectPtr +{ + UObject *Object; + + FORCEINLINE ObjectType& operator*() const + { + return *Object; + } + + FORCEINLINE ObjectType* operator->() const + { + return Object; + } +}; + +struct __declspec(align(8)) FTextHistory +{ + void* vfptr; + int Revision; +}; + +struct FText +{ + TSharedPtr History; + int Flags; + TSharedPtr DisplayString; + + // Functions + + int CompareTo(FText * Other, ETextComparisonLevel::Type ComparisonLevel) { return NativeCall(this, "FText.CompareTo", Other, ComparisonLevel); } + FText() { NativeCall(this, "FText.FText"); } + FText(FText * Source) { NativeCall(this, "FText.FText", Source); } + FText * operator=(FText * Source) { return NativeCall(this, "FText.operator=", Source); } + FText(FString InSourceString) { NativeCall(this, "FText.FText", InSourceString); } + FText(FString InSourceString, FString InNamespace, FString InKey, int InFlags) { NativeCall(this, "FText.FText", InSourceString, InNamespace, InKey, InFlags); } + static FText * TrimPreceding(FText * result, FText * InText) { return NativeCall(nullptr, "FText.TrimPreceding", result, InText); } + static FText * TrimTrailing(FText * result, FText * InText) { return NativeCall(nullptr, "FText.TrimTrailing", result, InText); } + static FText * TrimPrecedingAndTrailing(FText * result, FText * InText) { return NativeCall(nullptr, "FText.TrimPrecedingAndTrailing", result, InText); } + static FText * Format(FText * result, FText * Fmt, FText * v1) { return NativeCall(nullptr, "FText.Format", result, Fmt, v1); } + static FText * Format(FText * result, FText * Fmt, FText * v1, FText * v2) { return NativeCall(nullptr, "FText.Format", result, Fmt, v1, v2); } + static FText * Format(FText * result, FText * Fmt, FText * v1, FText * v2, FText * v3) { return NativeCall(nullptr, "FText.Format", result, Fmt, v1, v2, v3); } + static bool FindText(FString * Namespace, FString * Key, FText * OutText, FString *const SourceString) { return NativeCall(nullptr, "FText.FindText", Namespace, Key, OutText, SourceString); } + static FText * CreateChronologicalText(FText * result, FString InSourceString) { return NativeCall(nullptr, "FText.CreateChronologicalText", result, InSourceString); } + static FText * FromName(FText * result, FName * Val) { return NativeCall(nullptr, "FText.FromName", result, Val); } + static FText * FromString(FText * result, FString String) { return NativeCall(nullptr, "FText.FromString", result, String); } + FString * ToString() { return NativeCall(this, "FText.ToString"); } + bool ShouldGatherForLocalization() { return NativeCall(this, "FText.ShouldGatherForLocalization"); } + TSharedPtr * GetSourceString(TSharedPtr * result) { return NativeCall *, TSharedPtr *>(this, "FText.GetSourceString", result); } + static void GetEmpty() { NativeCall(nullptr, "FText.GetEmpty"); } +}; + +struct FDateTime +{ +}; + +template +struct TWeakObjectPtr +{ + int ObjectIndex; + int ObjectSerialNumber; + + FORCEINLINE T& operator*() + { + return *Get(); + } + + FORCEINLINE T* operator->() + { + return Get(); + } + + T* Get(bool bEvenIfPendingKill = false) + { + return NativeCall(this, "FWeakObjectPtr.Get", bEvenIfPendingKill); + } +}; + +template +using TAutoWeakObjectPtr = TWeakObjectPtr; + +template +struct TSubclassOf +{ + TSubclassOf() + : uClass(nullptr) + { + } + + TSubclassOf(UClass* uClass) + : uClass(uClass) + { + } + + UClass* uClass; +}; + +struct IOnlinePlatformData +{ + void *vfptr; +}; + +struct FUniqueNetId : IOnlinePlatformData +{ + +}; + +struct FUniqueNetIdSteam : FUniqueNetId +{ + unsigned __int64 UniqueNetId; + + // Functions + + int GetSize() { return NativeCall(this, "FUniqueNetIdSteam.GetSize"); } + FString * ToString(FString * result) { return NativeCall(this, "FUniqueNetIdSteam.ToString", result); } + bool IsValid() { return NativeCall(this, "FUniqueNetIdSteam.IsValid"); } + FString * ToDebugString(FString * result) { return NativeCall(this, "FUniqueNetIdSteam.ToDebugString", result); } +}; + +struct UObjectBase +{ + FieldValue ObjectFlagsField() { return { this, "UObjectBase.ObjectFlags" }; } + FieldValue InternalIndexField() { return { this, "UObjectBase.InternalIndex" }; } + FieldValue ClassField() { return { this, "UObjectBase.Class" }; } + FieldValue NameField() { return { this, "UObjectBase.Name" }; } + FieldValue OuterField() { return { this, "UObjectBase.Outer" }; } + + // Functions + + void DeferredRegister(UClass * UClassStaticClass, const wchar_t * PackageName, const wchar_t * InName) { NativeCall(this, "UObjectBase.DeferredRegister", UClassStaticClass, PackageName, InName); } + bool IsValidLowLevel() { return NativeCall(this, "UObjectBase.IsValidLowLevel"); } + bool IsValidLowLevelFast(bool bRecursive) { return NativeCall(this, "UObjectBase.IsValidLowLevelFast", bRecursive); } + static void EmitBaseReferences(UClass * RootClass) { NativeCall(nullptr, "UObjectBase.EmitBaseReferences", RootClass); } + void Register(const wchar_t * PackageName, const wchar_t * InName) { NativeCall(this, "UObjectBase.Register", PackageName, InName); } +}; + +struct UObjectBaseUtility : public UObjectBase +{ + int GetLinkerUE4Version() { return NativeCall(this, "UObjectBaseUtility.GetLinkerUE4Version"); } + int GetLinkerLicenseeUE4Version() { return NativeCall(this, "UObjectBaseUtility.GetLinkerLicenseeUE4Version"); } + FString * GetPathName(FString * result, UObject * StopOuter) { return NativeCall(this, "UObjectBaseUtility.GetPathName", result, StopOuter); } + void GetPathName(UObject * StopOuter, FString * ResultString) { NativeCall(this, "UObjectBaseUtility.GetPathName", StopOuter, ResultString); } + FString * GetFullName(FString * result, UObject * StopOuter) { return NativeCall(this, "UObjectBaseUtility.GetFullName", result, StopOuter); } + void MarkPackageDirty() { NativeCall(this, "UObjectBaseUtility.MarkPackageDirty"); } + bool IsIn(UObject * SomeOuter) { return NativeCall(this, "UObjectBaseUtility.IsIn", SomeOuter); } + bool IsA(UClass * SomeBase) { return NativeCall(this, "UObjectBaseUtility.IsA", SomeBase); } + void * GetInterfaceAddress(UClass * InterfaceClass) { return NativeCall(this, "UObjectBaseUtility.GetInterfaceAddress", InterfaceClass); } + bool IsDefaultSubobject() { return NativeCall(this, "UObjectBaseUtility.IsDefaultSubobject"); } + int GetLinkerIndex() { return NativeCall(this, "UObjectBaseUtility.GetLinkerIndex"); } +}; + +struct UObject : UObjectBaseUtility +{ + static UClass* StaticClass() { return NativeCall(nullptr, "UObject.StaticClass"); } + void ExecuteUbergraph(int EntryPoint) { NativeCall(this, "UObject.ExecuteUbergraph", EntryPoint); } + bool AreAllOuterObjectsValid() { return NativeCall(this, "UObject.AreAllOuterObjectsValid"); } + FName * GetExporterName(FName * result) { return NativeCall(this, "UObject.GetExporterName", result); } + FString * GetDetailedInfoInternal(FString * result) { return NativeCall(this, "UObject.GetDetailedInfoInternal", result); } + UObject * GetArchetype() { return NativeCall(this, "UObject.GetArchetype"); } + bool IsBasedOnArchetype(UObject *const SomeObject) { return NativeCall(this, "UObject.IsBasedOnArchetype", SomeObject); } + bool IsInBlueprint() { return NativeCall(this, "UObject.IsInBlueprint"); } + bool Rename(const wchar_t * InName, UObject * NewOuter, unsigned int Flags) { return NativeCall(this, "UObject.Rename", InName, NewOuter, Flags); } + void LoadLocalized(UObject * LocBase, bool bLoadHierachecally) { NativeCall(this, "UObject.LoadLocalized", LocBase, bLoadHierachecally); } + void LocalizeProperty(UObject * LocBase, TArray * PropertyTagChain, UProperty *const BaseProperty, UProperty *const Property, void *const ValueAddress) { NativeCall *, UProperty *const, UProperty *const, void *const>(this, "UObject.LocalizeProperty", LocBase, PropertyTagChain, BaseProperty, Property, ValueAddress); } + void BeginDestroy() { NativeCall(this, "UObject.BeginDestroy"); } + void FinishDestroy() { NativeCall(this, "UObject.FinishDestroy"); } + FString * GetDetailedInfo(FString * result) { return NativeCall(this, "UObject.GetDetailedInfo", result); } + bool ConditionalBeginDestroy() { return NativeCall(this, "UObject.ConditionalBeginDestroy"); } + bool ConditionalFinishDestroy() { return NativeCall(this, "UObject.ConditionalFinishDestroy"); } + void ConditionalPostLoad() { NativeCall(this, "UObject.ConditionalPostLoad"); } + bool Modify(bool bAlwaysMarkDirty) { return NativeCall(this, "UObject.Modify", bAlwaysMarkDirty); } + bool IsSelected() { return NativeCall(this, "UObject.IsSelected"); } + void CollectDefaultSubobjects(TArray * OutSubobjectArray, bool bIncludeNestedSubobjects) { NativeCall *, bool>(this, "UObject.CollectDefaultSubobjects", OutSubobjectArray, bIncludeNestedSubobjects); } + bool CheckDefaultSubobjectsInternal() { return NativeCall(this, "UObject.CheckDefaultSubobjectsInternal"); } + bool IsAsset() { return NativeCall(this, "UObject.IsAsset"); } + bool IsSafeForRootSet() { return NativeCall(this, "UObject.IsSafeForRootSet"); } + void LoadConfig(UClass * ConfigClass, const wchar_t * InFilename, unsigned int PropagationFlags, UProperty * PropertyToLoad) { NativeCall(this, "UObject.LoadConfig", ConfigClass, InFilename, PropagationFlags, PropertyToLoad); } + void ConditionalShutdownAfterError() { NativeCall(this, "UObject.ConditionalShutdownAfterError"); } + bool IsNameStableForNetworking() { return NativeCall(this, "UObject.IsNameStableForNetworking"); } + bool IsFullNameStableForNetworking() { return NativeCall(this, "UObject.IsFullNameStableForNetworking"); } + bool IsSupportedForNetworking() { return NativeCall(this, "UObject.IsSupportedForNetworking"); } + UFunction * FindFunctionChecked(FName InName) { return NativeCall(this, "UObject.FindFunctionChecked", InName); } + void ProcessEvent(UFunction * Function, void * Parms) { NativeCall(this, "UObject.ProcessEvent", Function, Parms); } + static UObject * GetArchetypeFromRequiredInfo(UClass * Class, UObject * Outer, FName Name, bool bIsCDO) { return NativeCall(nullptr, "UObject.GetArchetypeFromRequiredInfo", Class, Outer, Name, bIsCDO); } +}; + +struct UField : UObject +{ + FieldValue NextField() { return { this, "UField.Next" }; } + + // Functions + + UClass * GetOwnerClass() { return NativeCall(this, "UField.GetOwnerClass"); } + UStruct * GetOwnerStruct() { return NativeCall(this, "UField.GetOwnerStruct"); } + void PostLoad() { NativeCall(this, "UField.PostLoad"); } + void AddCppProperty(UProperty * Property) { NativeCall(this, "UField.AddCppProperty", Property); } +}; + +struct UStruct : UField +{ + FieldValue SuperStructField() { return { this, "UStruct.SuperStruct" }; } + FieldValue ChildrenField() { return { this, "UStruct.Children" }; } + FieldValue PropertiesSizeField() { return { this, "UStruct.PropertiesSize" }; } + FieldValue> ScriptField() { return { this, "UStruct.Script" }; } + FieldValue MinAlignmentField() { return { this, "UStruct.MinAlignment" }; } + FieldValue PropertyLinkField() { return { this, "UStruct.PropertyLink" }; } + FieldValue RefLinkField() { return { this, "UStruct.RefLink" }; } + FieldValue DestructorLinkField() { return { this, "UStruct.DestructorLink" }; } + FieldValue PostConstructLinkField() { return { this, "UStruct.PostConstructLink" }; } + FieldValue> ScriptObjectReferencesField() { return { this, "UStruct.ScriptObjectReferences" }; } + + // Functions + + bool IsChildOf(UStruct * SomeBase) { return NativeCall(this, "UStruct.IsChildOf", SomeBase); } + UField * StaticClass() { return NativeCall(this, "UStruct.StaticClass"); } + void LinkChild(UProperty * Property) { NativeCall(this, "UStruct.LinkChild", Property); } + const wchar_t * GetPrefixCPP() { return NativeCall(this, "UStruct.GetPrefixCPP"); } + void RegisterDependencies() { NativeCall(this, "UStruct.RegisterDependencies"); } + void StaticLink(bool bRelinkExistingProperties) { NativeCall(this, "UStruct.StaticLink", bRelinkExistingProperties); } + void FinishDestroy() { NativeCall(this, "UStruct.FinishDestroy"); } + void SetSuperStruct(UStruct * NewSuperStruct) { NativeCall(this, "UStruct.SetSuperStruct", NewSuperStruct); } + void TagSubobjects(EObjectFlags NewFlags) { NativeCall(this, "UStruct.TagSubobjects", NewFlags); } +}; + +struct UClass : UStruct +{ + FieldValue ClassFlagsField() { return { this, "UClass.ClassFlags" }; } + FieldValue ClassCastFlagsField() { return { this, "UClass.ClassCastFlags" }; } + FieldValue ClassUniqueField() { return { this, "UClass.ClassUnique" }; } + FieldValue ClassWithinField() { return { this, "UClass.ClassWithin" }; } + FieldValue ClassGeneratedByField() { return { this, "UClass.ClassGeneratedBy" }; } + FieldValue bIsGameClassField() { return { this, "UClass.bIsGameClass" }; } + FieldValue ClassConfigNameField() { return { this, "UClass.ClassConfigName" }; } + FieldValue> NetFieldsField() { return { this, "UClass.NetFields" }; } + FieldValue ClassDefaultObjectField() { return { this, "UClass.ClassDefaultObject" }; } + FieldValue bCookedField() { return { this, "UClass.bCooked" }; } + //FieldValue >> FuncMapField() { return { this, "UClass.FuncMap" }; } + + // Functions + + static UClass* StaticClass() { return NativeCall(nullptr, "UClass.StaticClass"); } + UObject * GetDefaultObject(bool bCreateIfNeeded) { return NativeCall(this, "UClass.GetDefaultObject", bCreateIfNeeded); } + void AddFunctionToFunctionMap(UFunction * NewFunction) { NativeCall(this, "UClass.AddFunctionToFunctionMap", NewFunction); } + void PostInitProperties() { NativeCall(this, "UClass.PostInitProperties"); } + UObject * GetDefaultSubobjectByName(FName ToFind) { return NativeCall(this, "UClass.GetDefaultSubobjectByName", ToFind); } + void GetDefaultObjectSubobjects(TArray * OutDefaultSubobjects) { NativeCall *>(this, "UClass.GetDefaultObjectSubobjects", OutDefaultSubobjects); } + UObject * CreateDefaultObject() { return NativeCall(this, "UClass.CreateDefaultObject"); } + FName * GetDefaultObjectName(FName * result) { return NativeCall(this, "UClass.GetDefaultObjectName", result); } + void DeferredRegister(UClass * UClassStaticClass, const wchar_t * PackageName, const wchar_t * Name) { NativeCall(this, "UClass.DeferredRegister", UClassStaticClass, PackageName, Name); } + bool Rename(const wchar_t * InName, UObject * NewOuter, unsigned int Flags) { return NativeCall(this, "UClass.Rename", InName, NewOuter, Flags); } + void TagSubobjects(EObjectFlags NewFlags) { NativeCall(this, "UClass.TagSubobjects", NewFlags); } + void Bind() { NativeCall(this, "UClass.Bind"); } + const wchar_t * GetPrefixCPP() { return NativeCall(this, "UClass.GetPrefixCPP"); } + FString * GetDescription(FString * result) { return NativeCall(this, "UClass.GetDescription", result); } + void FinishDestroy() { NativeCall(this, "UClass.FinishDestroy"); } + void PostLoad() { NativeCall(this, "UClass.PostLoad"); } + void SetSuperStruct(UStruct * NewSuperStruct) { NativeCall(this, "UClass.SetSuperStruct", NewSuperStruct); } + bool ImplementsInterface(UClass * SomeInterface) { return NativeCall(this, "UClass.ImplementsInterface", SomeInterface); } + void PurgeClass(bool bRecompilingOnLoad) { NativeCall(this, "UClass.PurgeClass", bRecompilingOnLoad); } + bool HasProperty(UProperty * InProperty) { return NativeCall(this, "UClass.HasProperty", InProperty); } + UFunction * FindFunctionByName(FName InName, EIncludeSuperFlag::Type IncludeSuper) { return NativeCall(this, "UClass.FindFunctionByName", InName, IncludeSuper); } + FString * GetConfigName(FString * result) { return NativeCall(this, "UClass.GetConfigName", result); } + unsigned int EmitStructArrayBegin(int Offset, FName * DebugName, int Stride) { return NativeCall(this, "UClass.EmitStructArrayBegin", Offset, DebugName, Stride); } + void AssembleReferenceTokenStream() { NativeCall(this, "UClass.AssembleReferenceTokenStream"); } +}; + +struct UBlueprintCore : UObject +{ + FieldValue> SkeletonGeneratedClassField() { return { this, "UBlueprintCore.SkeletonGeneratedClass" }; } + FieldValue> GeneratedClassField() { return { this, "UBlueprintCore.GeneratedClass" }; } + FieldValue bLegacyNeedToPurgeSkelRefsField() { return { this, "UBlueprintCore.bLegacyNeedToPurgeSkelRefs" }; } + FieldValue bLegacyGeneratedClassIsAuthoritativeField() { return { this, "UBlueprintCore.bLegacyGeneratedClassIsAuthoritative" }; } + FieldValue BlueprintGuidField() { return { this, "UBlueprintCore.BlueprintGuid" }; } +}; + +struct UBlueprint : UBlueprintCore +{ + FieldValue> ParentClassField() { return { this, "UBlueprint.ParentClass" }; } + FieldValue PRIVATE_InnermostPreviousCDOField() { return { this, "UBlueprint.PRIVATE_InnermostPreviousCDO" }; } + FieldValue> ComponentTemplatesField() { return { this, "UBlueprint.ComponentTemplates" }; } + FieldValue> BlueprintTypeField() { return { this, "UBlueprint.BlueprintType" }; } + FieldValue BlueprintSystemVersionField() { return { this, "UBlueprint.BlueprintSystemVersion" }; } + + // Functions + + static UClass* StaticClass() { return NativeCall(nullptr, "UBlueprint.StaticClass"); } + FString * GetDesc(FString * result) { return NativeCall(this, "UBlueprint.GetDesc", result); } + bool NeedsLoadForClient() { return NativeCall(this, "UBlueprint.NeedsLoadForClient"); } + bool NeedsLoadForServer() { return NativeCall(this, "UBlueprint.NeedsLoadForServer"); } + void TagSubobjects(EObjectFlags NewFlags) { NativeCall(this, "UBlueprint.TagSubobjects", NewFlags); } +}; + +struct UProperty : UField +{ + FieldValue ArrayDimField() { return { this, "UProperty.ArrayDim" }; } + FieldValue ElementSizeField() { return { this, "UProperty.ElementSize" }; } + FieldValue PropertyFlagsField() { return { this, "UProperty.PropertyFlags" }; } + FieldValue RepIndexField() { return { this, "UProperty.RepIndex" }; } + FieldValue RepNotifyFuncField() { return { this, "UProperty.RepNotifyFunc" }; } + FieldValue Offset_InternalField() { return { this, "UProperty.Offset_Internal" }; } + FieldValue PropertyLinkNextField() { return { this, "UProperty.PropertyLinkNext" }; } + FieldValue NextRefField() { return { this, "UProperty.NextRef" }; } + FieldValue DestructorLinkNextField() { return { this, "UProperty.DestructorLinkNext" }; } + FieldValue PostConstructLinkNextField() { return { this, "UProperty.PostConstructLinkNext" }; } + + // Functions + + bool Identical(const void * A, const void * B, unsigned int PortFlags) { return NativeCall(this, "UProperty.Identical", A, B, PortFlags); } + void ExportTextItem(FString * ValueStr, const void * PropertyValue, const void * DefaultValue, UObject * Parent, int PortFlags, UObject * ExportRootScope) { NativeCall(this, "UProperty.ExportTextItem", ValueStr, PropertyValue, DefaultValue, Parent, PortFlags, ExportRootScope); } + void CopySingleValueFromScriptVM(void * Dest, const void * Src) { NativeCall(this, "UProperty.CopySingleValueFromScriptVM", Dest, Src); } + void CopyCompleteValueFromScriptVM(void * Dest, const void * Src) { NativeCall(this, "UProperty.CopyCompleteValueFromScriptVM", Dest, Src); } + FString * GetCPPType(FString * result, FString * ExtendedTypeText, unsigned int CPPExportFlags) { return NativeCall(this, "UProperty.GetCPPType", result, ExtendedTypeText, CPPExportFlags); } + bool Identical_InContainer(const void * A, const void * B, int ArrayIndex, unsigned int PortFlags) { return NativeCall(this, "UProperty.Identical_InContainer", A, B, ArrayIndex, PortFlags); } + bool ShouldDuplicateValue() { return NativeCall(this, "UProperty.ShouldDuplicateValue"); } + FString * GetCPPMacroType(FString * result, FString * ExtendedTypeText) { return NativeCall(this, "UProperty.GetCPPMacroType", result, ExtendedTypeText); } + bool ExportText_Direct(FString * ValueStr, const void * Data, const void * Delta, UObject * Parent, int PortFlags, UObject * ExportRootScope) { return NativeCall(this, "UProperty.ExportText_Direct", ValueStr, Data, Delta, Parent, PortFlags, ExportRootScope); } + bool IsLocalized() { return NativeCall(this, "UProperty.IsLocalized"); } + bool ShouldPort(unsigned int PortFlags) { return NativeCall(this, "UProperty.ShouldPort", PortFlags); } + FName * GetID(FName * result) { return NativeCall(this, "UProperty.GetID", result); } + bool SameType(UProperty * Other) { return NativeCall(this, "UProperty.SameType", Other); } +}; + +struct UNumericProperty : UProperty +{ + __int64 GetSignedIntPropertyValue(void const* Data) { return NativeCall<__int64, void const *>(this, "UNumericProperty.GetSignedIntPropertyValue", Data); } + double GetFloatingPointPropertyValue(void const* Data) { return NativeCall(this, "UNumericProperty.GetFloatingPointPropertyValue", Data); } + unsigned __int64 GetUnsignedIntPropertyValue(void const* Data) { return NativeCall(this, "UNumericProperty.GetUnsignedIntPropertyValue", Data); } +}; + +struct UBoolProperty : UProperty +{ + FieldValue FieldSizeField() { return { this, "UBoolProperty.FieldSize" }; } + FieldValue ByteOffsetField() { return { this, "UBoolProperty.ByteOffset" }; } + FieldValue ByteMaskField() { return { this, "UBoolProperty.ByteMask" }; } + FieldValue FieldMaskField() { return { this, "UBoolProperty.FieldMask" }; } + + // Functions + + static void SetIntPropertyValue(void * Scratch, bool Value) { NativeCall(nullptr, "TProperty_Numeric.SetIntPropertyValue", Scratch, Value); } + void SetFloatingPointPropertyValue(void * Data, long double Value) { NativeCall(this, "TProperty_Numeric.SetFloatingPointPropertyValue", Data, Value); } + void SetNumericPropertyValueFromString(void * Data, const wchar_t * Value) { NativeCall(this, "TProperty_Numeric.SetNumericPropertyValueFromString", Data, Value); } + unsigned __int64 GetSignedIntPropertyValue(const void * Data) { return NativeCall(this, "TProperty_Numeric.GetSignedIntPropertyValue", Data); } + long double GetFloatingPointPropertyValue(const void * Data) { return NativeCall(this, "TProperty_Numeric.GetFloatingPointPropertyValue", Data); } + FString * GetNumericPropertyValueToString(FString * result, const void * Data) { return NativeCall(this, "TProperty_Numeric.GetNumericPropertyValueToString", result, Data); } + void SetBoolSize(const unsigned int InSize, const bool bIsNativeBool, const unsigned int InBitMask) { NativeCall(this, "UBoolProperty.SetBoolSize", InSize, bIsNativeBool, InBitMask); } + int GetMinAlignment() { return NativeCall(this, "UBoolProperty.GetMinAlignment"); } + FString * GetCPPType(FString * result, FString * ExtendedTypeText, unsigned int CPPExportFlags) { return NativeCall(this, "UBoolProperty.GetCPPType", result, ExtendedTypeText, CPPExportFlags); } + FString * GetCPPMacroType(FString * result, FString * ExtendedTypeText) { return NativeCall(this, "UBoolProperty.GetCPPMacroType", result, ExtendedTypeText); } + void ExportTextItem(FString * ValueStr, const void * PropertyValue, const void * DefaultValue, UObject * Parent, int PortFlags, UObject * ExportRootScope) { NativeCall(this, "UBoolProperty.ExportTextItem", ValueStr, PropertyValue, DefaultValue, Parent, PortFlags, ExportRootScope); } + bool Identical(const void * A, const void * B, unsigned int PortFlags) { return NativeCall(this, "UBoolProperty.Identical", A, B, PortFlags); } + void CopyValuesInternal(void * Dest, const void * Src, int Count) { NativeCall(this, "UBoolProperty.CopyValuesInternal", Dest, Src, Count); } + void ClearValueInternal(void * Data) { NativeCall(this, "UBoolProperty.ClearValueInternal", Data); } +}; + +//not using this right now so leave empty +struct FObjectInstancingGraph +{ + /*UObject *SourceRoot; + UObject *DestinationRoot; + bool bCreatingArchetype; + bool bEnableSubobjectInstancing; + bool bLoadingObject; + TMap > SourceToDestinationMap;*/ +}; + + +struct Globals +{ + static UObject* StaticLoadObject(UClass* ObjectClass, UObject* InOuter, const wchar_t* InName, const wchar_t* Filename, + unsigned int LoadFlags, DWORD64 Sandbox, bool bAllowObjectReconciliation) + { + return NativeCall( + nullptr, "Global.StaticLoadObject", ObjectClass, InOuter, InName, Filename, LoadFlags, Sandbox, + bAllowObjectReconciliation); + } + + //UObject *__fastcall StaticConstructObject(UClass *InClass, UObject *InOuter, FName InName, EObjectFlags InFlags, UObject *InTemplate, bool bCopyTransientsFromClassDefaults, FObjectInstancingGraph *InInstanceGraph) + static UObject* StaticConstructObject(UClass* InClass, UObject* InOuter, FName InName, EObjectFlags InFlags, + UObject* InTemplate, bool bCopyTransientsFromClassDefaults, + FObjectInstancingGraph* InInstanceGraph) + { + return NativeCall( + nullptr, "Global.StaticConstructObject", InClass, InOuter, InName, InFlags, InTemplate, + bCopyTransientsFromClassDefaults, InInstanceGraph); + } + + //UObject *__fastcall StaticFindObjectFastInternal(UClass *ObjectClass, UObject *ObjectPackage, FName ObjectName, bool bExactClass, bool bAnyPackage, EObjectFlags ExcludeFlags) + + template + static void GetPrivateStaticClassBody(const wchar_t* PackageName, const wchar_t* Name, T** ReturnClass, + void(__cdecl *RegisterNativeFunc)()); + + /*template <> + static void GetPrivateStaticClassBody(const wchar_t *PackageName, const wchar_t *Name, UClass **ReturnClass, void(__cdecl *RegisterNativeFunc)()) { return NativeCall(nullptr, "Global.GetPrivateStaticClassBody", PackageName, Name, ReturnClass, RegisterNativeFunc); }*/ + + //void __fastcall GetPrivateStaticClassBody(const wchar_t *PackageName, const wchar_t *Name, UClass **ReturnClass, void(__cdecl *RegisterNativeFunc)()) + + //static char RaycastSingle(UWorld *World, FHitResult *OutHit, FVector *Start, FVector *End, ECollisionChannel TraceChannel, FCollisionQueryParams *Params, FCollisionResponseParams *ResponseParams, FCollisionObjectQueryParams *ObjectParams) { return NativeCall(nullptr, "Global.RaycastSingle", World, OutHit, Start, End, TraceChannel, Params, ResponseParams, ObjectParams); } + //char RaycastSingle(UWorld *World, FHitResult *OutHit, FVector *Start, FVector *End, ECollisionChannel TraceChannel, FCollisionQueryParams *Params, FCollisionResponseParams *ResponseParams, FCollisionObjectQueryParams *ObjectParams) + + static bool HasClassCastFlags(UObject* object, ClassCastFlags flags) + { + const auto flags_value = static_cast::type>(flags); + return object != nullptr && (object->ClassField()()->ClassCastFlagsField()() & flags_value) == flags_value; + } + + static bool HasClassCastFlags(UClass* _class, ClassCastFlags flags) + { + const auto flags_value = static_cast::type>(flags); + return _class != nullptr && (_class->ClassCastFlagsField()() & flags_value) == flags_value; + } +}; + +template <> +inline void Globals::GetPrivateStaticClassBody(const wchar_t* PackageName, const wchar_t* Name, + UClass** ReturnClass, void(__cdecl *RegisterNativeFunc)()) +{ + return NativeCall( + nullptr, "Global.GetPrivateStaticClassBody", PackageName, Name, ReturnClass, RegisterNativeFunc); +} + +struct FAssetData +{ + FName ObjectPath; + FName PackageName; + FName PackagePath; + FName GroupNames; + FName AssetName; + FName AssetClass; + char unk[80];// TMap > TagsAndValues; + TArray ChunkIDs; + + // Functions + + bool IsUAsset() { return NativeCall(this, "FAssetData.IsUAsset"); } + void PrintAssetData() { NativeCall(this, "FAssetData.PrintAssetData"); } + UObject * GetAsset() { return NativeCall(this, "FAssetData.GetAsset"); } +}; + +struct IModuleInterface +{ +}; + +struct IAssetRegistryInterface : IModuleInterface +{ +}; + +struct FAssetRegistryModule : IAssetRegistryInterface +{ + FAssetRegistry* Get() { return NativeCall(this, "FAssetRegistryModule.Get"); } +}; + +struct FModuleManager +{ + static FModuleManager * Get() { return NativeCall(nullptr, "FModuleManager.Get"); } + void FindModules(const wchar_t * WildcardWithoutExtension, TArray * OutModules) { NativeCall *>(this, "FModuleManager.FindModules", WildcardWithoutExtension, OutModules); } + bool IsModuleLoaded(FName InModuleName) { return NativeCall(this, "FModuleManager.IsModuleLoaded", InModuleName); } + bool IsModuleUpToDate(FName InModuleName) { return NativeCall(this, "FModuleManager.IsModuleUpToDate", InModuleName); } + void AddModule(FName InModuleName) { NativeCall(this, "FModuleManager.AddModule", InModuleName); } + TSharedPtr * LoadModule(TSharedPtr * result, FName InModuleName, const bool bWasReloaded) { return NativeCall *, TSharedPtr *, FName, const bool>(this, "FModuleManager.LoadModule", result, InModuleName, bWasReloaded); } + bool UnloadModule(FName InModuleName, bool bIsShutdown) { return NativeCall(this, "FModuleManager.UnloadModule", InModuleName, bIsShutdown); } + void UnloadModulesAtShutdown() { NativeCall(this, "FModuleManager.UnloadModulesAtShutdown"); } + TSharedPtr * GetModule(TSharedPtr * result, FName InModuleName) { return NativeCall *, TSharedPtr *, FName>(this, "FModuleManager.GetModule", result, InModuleName); } + static FString * GetCleanModuleFilename(FString * result, FName ModuleName, bool bGameModule) { return NativeCall(nullptr, "FModuleManager.GetCleanModuleFilename", result, ModuleName, bGameModule); } + static void GetModuleFilenameFormat(bool bGameModule, FString * OutPrefix, FString * OutSuffix) { NativeCall(nullptr, "FModuleManager.GetModuleFilenameFormat", bGameModule, OutPrefix, OutSuffix); } + void AddBinariesDirectory(const wchar_t * InDirectory, bool bIsGameDirectory) { NativeCall(this, "FModuleManager.AddBinariesDirectory", InDirectory, bIsGameDirectory); } + void FModuleInfo() { NativeCall(this, "FModuleManager.FModuleInfo"); } +}; + +struct FAssetRegistry +{ + void CollectCodeGeneratorClasses() { NativeCall(this, "FAssetRegistry.CollectCodeGeneratorClasses"); } + void SearchAllAssets(bool bSynchronousSearch) { NativeCall(this, "FAssetRegistry.SearchAllAssets", bSynchronousSearch); } + bool GetAssetsByPackageName(FName PackageName, TArray * OutAssetData) { return NativeCall *>(this, "FAssetRegistry.GetAssetsByPackageName", PackageName, OutAssetData); } + bool GetAssetsByPath(FName PackagePath, TArray * OutAssetData, bool bRecursive) { return NativeCall *, bool>(this, "FAssetRegistry.GetAssetsByPath", PackagePath, OutAssetData, bRecursive); } + bool GetAssetsByClass(FName ClassName, TArray * OutAssetData, bool bSearchSubClasses) { return NativeCall *, bool>(this, "FAssetRegistry.GetAssetsByClass", ClassName, OutAssetData, bSearchSubClasses); } + //bool GetAssetsByTagValues(TMultiMap > * AssetTagsAndValues, TArray * OutAssetData) { return NativeCall > *, TArray *>(this, "FAssetRegistry.GetAssetsByTagValues", AssetTagsAndValues, OutAssetData); } + //bool GetAssets(FARFilter * Filter, TArray * OutAssetData) { return NativeCall *>(this, "FAssetRegistry.GetAssets", Filter, OutAssetData); } + FAssetData * GetAssetByObjectPath(FAssetData * result, FName ObjectPath) { return NativeCall(this, "FAssetRegistry.GetAssetByObjectPath", result, ObjectPath); } + bool GetAllAssets(TArray * OutAssetData) { return NativeCall *>(this, "FAssetRegistry.GetAllAssets", OutAssetData); } + bool GetDependencies(FName PackageName, TArray * OutDependencies) { return NativeCall *>(this, "FAssetRegistry.GetDependencies", PackageName, OutDependencies); } + bool GetReferencers(FName PackageName, TArray * OutReferencers) { return NativeCall *>(this, "FAssetRegistry.GetReferencers", PackageName, OutReferencers); } + bool GetAncestorClassNames(FName ClassName, TArray * OutAncestorClassNames) { return NativeCall *>(this, "FAssetRegistry.GetAncestorClassNames", ClassName, OutAncestorClassNames); } + void GetAllCachedPaths(TArray * OutPathList) { NativeCall *>(this, "FAssetRegistry.GetAllCachedPaths", OutPathList); } + void GetSubPaths(FString * InBasePath, TArray * OutPathList, bool bInRecurse) { NativeCall *, bool>(this, "FAssetRegistry.GetSubPaths", InBasePath, OutPathList, bInRecurse); } + EAssetAvailability::Type GetAssetAvailability(FAssetData * AssetData) { return NativeCall(this, "FAssetRegistry.GetAssetAvailability", AssetData); } + float GetAssetAvailabilityProgress(FAssetData * AssetData, EAssetAvailabilityProgressReportingType::Type ReportType) { return NativeCall(this, "FAssetRegistry.GetAssetAvailabilityProgress", AssetData, ReportType); } + bool GetAssetAvailabilityProgressTypeSupported(EAssetAvailabilityProgressReportingType::Type ReportType) { return NativeCall(this, "FAssetRegistry.GetAssetAvailabilityProgressTypeSupported", ReportType); } + void PrioritizeAssetInstall(FAssetData * AssetData) { NativeCall(this, "FAssetRegistry.PrioritizeAssetInstall", AssetData); } + bool AddPath(FString * PathToAdd) { return NativeCall(this, "FAssetRegistry.AddPath", PathToAdd); } + bool RemovePath(FString * PathToRemove) { return NativeCall(this, "FAssetRegistry.RemovePath", PathToRemove); } + void ScanPathsSynchronous(TArray * InPaths, bool bForceRescan) { NativeCall *, bool>(this, "FAssetRegistry.ScanPathsSynchronous", InPaths, bForceRescan); } + void PrioritizeSearchPath(FString * PathToPrioritize) { NativeCall(this, "FAssetRegistry.PrioritizeSearchPath", PathToPrioritize); } + void AssetCreated(UObject * NewAsset) { NativeCall(this, "FAssetRegistry.AssetCreated", NewAsset); } + void AssetDeleted(UObject * DeletedAsset) { NativeCall(this, "FAssetRegistry.AssetDeleted", DeletedAsset); } + void AssetRenamed(UObject * RenamedAsset, FString * OldObjectPath) { NativeCall(this, "FAssetRegistry.AssetRenamed", RenamedAsset, OldObjectPath); } + bool IsLoadingAssets() { return NativeCall(this, "FAssetRegistry.IsLoadingAssets"); } + void Tick(float DeltaTime) { NativeCall(this, "FAssetRegistry.Tick", DeltaTime); } + static bool IsUsingWorldAssets() { return NativeCall(nullptr, "FAssetRegistry.IsUsingWorldAssets"); } + void ScanPathsSynchronous_Internal(TArray * InPaths, bool bForceRescan, bool bUseCache) { NativeCall *, bool, bool>(this, "FAssetRegistry.ScanPathsSynchronous_Internal", InPaths, bForceRescan, bUseCache); } + void PathDataGathered(const long double TickStartTime, TArray * PathResults) { NativeCall *>(this, "FAssetRegistry.PathDataGathered", TickStartTime, PathResults); } + bool RemoveDependsNode(FName PackageName) { return NativeCall(this, "FAssetRegistry.RemoveDependsNode", PackageName); } + bool RemoveAssetPath(FString * PathToRemove, bool bEvenIfAssetsStillExist) { return NativeCall(this, "FAssetRegistry.RemoveAssetPath", PathToRemove, bEvenIfAssetsStillExist); } + FString * ExportTextPathToObjectName(FString * result, FString * InExportTextPath) { return NativeCall(this, "FAssetRegistry.ExportTextPathToObjectName", result, InExportTextPath); } + void AddAssetData(FAssetData * AssetData) { NativeCall(this, "FAssetRegistry.AddAssetData", AssetData); } + bool RemoveAssetData(FAssetData * AssetData) { return NativeCall(this, "FAssetRegistry.RemoveAssetData", AssetData); } + void OnContentPathMounted(FString * InAssetPath, FString * FileSystemPath) { NativeCall(this, "FAssetRegistry.OnContentPathMounted", InAssetPath, FileSystemPath); } + void OnContentPathDismounted(FString * InAssetPath, FString * FileSystemPath) { NativeCall(this, "FAssetRegistry.OnContentPathDismounted", InAssetPath, FileSystemPath); } + //static void GetAssets(FAssetData ** First, const int Num, TDereferenceWrapper * Predicate) { NativeCall *>(nullptr, "FAssetRegistry.GetAssets", First, Num, Predicate); } +}; + +struct UTexture2D +{ + static UClass* StaticClass() { return NativeCall(nullptr, "UTexture2D.StaticClass"); } +}; + +struct FNavigationFilterFlags +{ + uint32_t Flags; +}; + +struct __declspec(align(8)) UNavArea : UObject +{ + float DefaultCost; + float FixedAreaEnteringCost; + FColor DrawColor; + uint32_t unk; + uint16_t AreaFlags; +}; + +struct __declspec(align(8)) FNavigationFilterArea +{ + TSubclassOf AreaClass; + float TravelCostOverride; + float EnteringCostOverride; + uint32_t bIsExcluded : 1; + uint32_t bOverrideTravelCost : 1; + uint32_t bOverrideEnteringCost : 1; +}; + +struct UNavigationQueryFilter : UObject +{ + //TArray Areas; + TArray Areas; + FNavigationFilterFlags IncludeFlags; + FNavigationFilterFlags ExcludeFlags; +}; + + +struct FCollisionQueryParams +{ + FName TraceTag; + FName OwnerTag; + bool bTraceAsyncScene; + bool bTraceComplex; + bool bFindInitialOverlaps; + bool bReturnFaceIndex; + bool bReturnPhysicalMaterial; + TArray IgnoreActors; +}; + +struct FCollisionResponseContainer +{ + char unk[32]; +}; + +struct FCollisionResponseParams +{ + FCollisionResponseContainer CollisionResponse; +}; + +struct FCollisionObjectQueryParams +{ + int ObjectTypesToQuery; +}; diff --git a/version/Core/Public/API/UE/Windows/MicrosoftPlatformString.h b/version/Core/Public/API/UE/Windows/MicrosoftPlatformString.h new file mode 100644 index 0000000..813fcab --- /dev/null +++ b/version/Core/Public/API/UE/Windows/MicrosoftPlatformString.h @@ -0,0 +1,265 @@ +#pragma once + +#include + +#include "../GenericPlatform/GenericPlatformString.h" + +/** +* Microsoft specific implementation +**/ + +#pragma warning(push) +#pragma warning(disable : 4996) // 'function' was declared deprecated (needed for the secure string functions) +#pragma warning(disable : 4995) // 'function' was declared deprecated (needed for the secure string functions) +#pragma warning(disable : 4267) +#pragma warning(disable : 4244) + +struct FMicrosoftPlatformString : public FGenericPlatformString +{ + /** + * Wide character implementation + **/ + static FORCEINLINE WIDECHAR* Strcpy(WIDECHAR* Dest, SIZE_T DestCount, const WIDECHAR* Src) + { + _tcscpy_s(Dest, DestCount, Src); + return Dest; + } + + static FORCEINLINE WIDECHAR* Strncpy(WIDECHAR* Dest, const WIDECHAR* Src, SIZE_T MaxLen) + { + _tcsncpy_s(Dest, MaxLen, Src, MaxLen - 1); + return Dest; + } + + static FORCEINLINE WIDECHAR* Strcat(WIDECHAR* Dest, SIZE_T DestCount, const WIDECHAR* Src) + { + _tcscat_s(Dest, DestCount, Src); + return Dest; + } + + static FORCEINLINE WIDECHAR* Strupr(WIDECHAR* Dest, SIZE_T DestCount) + { + _tcsupr_s(Dest, DestCount); + return Dest; + } + + static FORCEINLINE int32 Strcmp(const WIDECHAR* String1, const WIDECHAR* String2) + { + return _tcscmp(String1, String2); + } + + static FORCEINLINE int32 Strncmp(const WIDECHAR* String1, const WIDECHAR* String2, SIZE_T Count) + { + return _tcsncmp(String1, String2, Count); + } + + static FORCEINLINE int32 Strnicmp(const WIDECHAR* String1, const WIDECHAR* String2, SIZE_T Count) + { + return _tcsnicmp(String1, String2, Count); + } + + static FORCEINLINE int32 Strlen(const WIDECHAR* String) + { + return _tcslen(String); + } + + static FORCEINLINE const WIDECHAR* Strstr(const WIDECHAR* String, const WIDECHAR* Find) + { + return _tcsstr(String, Find); + } + + static FORCEINLINE const WIDECHAR* Strchr(const WIDECHAR* String, WIDECHAR C) + { + return _tcschr(String, C); + } + + static FORCEINLINE const WIDECHAR* Strrchr(const WIDECHAR* String, WIDECHAR C) + { + return _tcsrchr(String, C); + } + + static FORCEINLINE int32 Atoi(const WIDECHAR* String) + { + return _tstoi(String); + } + + static FORCEINLINE int64 Atoi64(const WIDECHAR* String) + { + return _tstoi64(String); + } + + static FORCEINLINE float Atof(const WIDECHAR* String) + { + return _tstof(String); + } + + static FORCEINLINE double Atod(const WIDECHAR* String) + { + return _tcstod(String, nullptr); + } + + static FORCEINLINE int32 Strtoi(const WIDECHAR* Start, WIDECHAR** End, int32 Base) + { + return _tcstoul(Start, End, Base); + } + + static FORCEINLINE int64 Strtoi64(const WIDECHAR* Start, WIDECHAR** End, int32 Base) + { + return _tcstoi64(Start, End, Base); + } + + static FORCEINLINE uint64 Strtoui64(const WIDECHAR* Start, WIDECHAR** End, int32 Base) + { + return _tcstoui64(Start, End, Base); + } + + static FORCEINLINE WIDECHAR* Strtok(WIDECHAR* StrToken, const WIDECHAR* Delim, WIDECHAR** Context) + { + return _tcstok_s(StrToken, Delim, Context); + } + + static FORCEINLINE int32 GetVarArgs(WIDECHAR* Dest, SIZE_T DestSize, int32 Count, const WIDECHAR*& Fmt, va_list ArgPtr) + { + int32 Result = _vsntprintf_s(Dest, DestSize, Count, Fmt, ArgPtr); + va_end( ArgPtr ); + return Result; + } + + /** + * Ansi implementation + **/ + static FORCEINLINE ANSICHAR* Strcpy(ANSICHAR* Dest, SIZE_T DestCount, const ANSICHAR* Src) + { + strcpy_s(Dest, DestCount, Src); + return Dest; + } + + static FORCEINLINE void Strncpy(ANSICHAR* Dest, const ANSICHAR* Src, SIZE_T MaxLen) + { + strncpy_s(Dest, MaxLen, Src, MaxLen - 1); + } + + static FORCEINLINE ANSICHAR* Strcat(ANSICHAR* Dest, SIZE_T DestCount, const ANSICHAR* Src) + { + strcat_s(Dest, DestCount, Src); + return Dest; + } + + static FORCEINLINE ANSICHAR* Strupr(ANSICHAR* Dest, SIZE_T DestCount) + { + _strupr_s(Dest, DestCount); + return Dest; + } + + static FORCEINLINE int32 Strcmp(const ANSICHAR* String1, const ANSICHAR* String2) + { + return strcmp(String1, String2); + } + + static FORCEINLINE int32 Strncmp(const ANSICHAR* String1, const ANSICHAR* String2, SIZE_T Count) + { + return strncmp(String1, String2, Count); + } + + /** + * Compares two strings case-insensitive. + * + * @param String1 First string to compare. + * @param String2 Second string to compare. + * + * @returns Zero if both strings are equal. Greater than zero if first + * string is greater than the second one. Less than zero + * otherwise. + */ + static FORCEINLINE int32 Stricmp(const ANSICHAR* String1, const ANSICHAR* String2) + { + return _stricmp(String1, String2); + } + + static FORCEINLINE int32 Stricmp(const WIDECHAR* String1, const WIDECHAR* String2) + { + return _wcsicmp(String1, String2); + } + + static FORCEINLINE int32 Strnicmp(const ANSICHAR* String1, const ANSICHAR* String2, SIZE_T Count) + { + return _strnicmp(String1, String2, Count); + } + + static FORCEINLINE int32 Strlen(const ANSICHAR* String) + { + return strlen(String); + } + + static FORCEINLINE const ANSICHAR* Strstr(const ANSICHAR* String, const ANSICHAR* Find) + { + return strstr(String, Find); + } + + static FORCEINLINE const ANSICHAR* Strchr(const ANSICHAR* String, ANSICHAR C) + { + return strchr(String, C); + } + + static FORCEINLINE const ANSICHAR* Strrchr(const ANSICHAR* String, ANSICHAR C) + { + return strrchr(String, C); + } + + static FORCEINLINE int32 Atoi(const ANSICHAR* String) + { + return atoi(String); + } + + static FORCEINLINE int64 Atoi64(const ANSICHAR* String) + { + return _strtoi64(String, nullptr, 10); + } + + static FORCEINLINE float Atof(const ANSICHAR* String) + { + return (float)atof(String); + } + + static FORCEINLINE double Atod(const ANSICHAR* String) + { + return atof(String); + } + + static FORCEINLINE int32 Strtoi(const ANSICHAR* Start, ANSICHAR** End, int32 Base) + { + return strtol(Start, End, Base); + } + + static FORCEINLINE int64 Strtoi64(const ANSICHAR* Start, ANSICHAR** End, int32 Base) + { + return _strtoi64(Start, End, Base); + } + + static FORCEINLINE uint64 Strtoui64(const ANSICHAR* Start, ANSICHAR** End, int32 Base) + { + return _strtoui64(Start, End, Base); + } + + static FORCEINLINE ANSICHAR* Strtok(ANSICHAR* StrToken, const ANSICHAR* Delim, ANSICHAR** Context) + { + return strtok_s(StrToken, Delim, Context); + } + + static FORCEINLINE int32 GetVarArgs(ANSICHAR* Dest, SIZE_T DestSize, int32 Count, const ANSICHAR*& Fmt, va_list ArgPtr) + { + int32 Result = _vsnprintf_s(Dest, DestSize, Count, Fmt, ArgPtr); + return Result; + } + + static const ANSICHAR* GetEncodingName() + { + return "UTF-16LE"; + } + + static const bool IsUnicodeEncoded = true; +}; + +typedef FMicrosoftPlatformString FPlatformString; + +#pragma warning(pop) diff --git a/version/Core/Public/IApiUtils.h b/version/Core/Public/IApiUtils.h new file mode 100644 index 0000000..852df1e --- /dev/null +++ b/version/Core/Public/IApiUtils.h @@ -0,0 +1,512 @@ +#pragma once + +#include +#include "API/ARK/Ark.h" + +namespace ArkApi +{ + class ARK_API IApiUtils + { + public: + virtual ~IApiUtils() = default; + + /** + * \brief Returns a pointer to UWorld + */ + virtual UWorld* GetWorld() const = 0; + + /** + * \brief Returns a pointer to AShooterGameMode + */ + virtual AShooterGameMode* GetShooterGameMode() const = 0; + + /** + * \brief Sends server message to the specific player. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param player_controller Player + * \param msg_color Message color + * \param msg Message + * \param args Optional arguments + */ + template + void SendServerMessage(AShooterPlayerController* player_controller, FLinearColor msg_color, const T* msg, + Args&&... args) + { + FString text(FString::Format(msg, std::forward(args)...)); + + player_controller->ClientServerChatDirectMessage(&text, msg_color, false); + } + + /** + * \brief Sends notification (on-screen message) to the specific player. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param player_controller Player + * \param color Message color + * \param display_scale Size of text + * \param display_time Display time + * \param icon Message icon (optional) + * \param msg Message + * \param args Optional arguments + */ + template + void SendNotification(AShooterPlayerController* player_controller, FLinearColor color, float display_scale, + float display_time, UTexture2D* icon, const T* msg, Args&&... args) + { + FString text(FString::Format(msg, std::forward(args)...)); + + player_controller->ClientServerSOTFNotificationCustom(&text, color, display_scale, display_time, icon, nullptr); + } + + /** + * \brief Sends chat message to the specific player. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param player_controller Player + * \param sender_name Name of the sender + * \param msg Message + * \param args Optional arguments + */ + template + void SendChatMessage(AShooterPlayerController* player_controller, const FString& sender_name, const T* msg, + Args&&... args) + { + const FString text(FString::Format(msg, std::forward(args)...)); + + FChatMessage chat_message = FChatMessage(); + chat_message.SenderName = sender_name; + chat_message.Message = text; + + player_controller->ClientChatMessage(chat_message); + } + + /** + * \brief Sends server message to all players. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param msg_color Message color + * \param msg Message + * \param args Optional arguments + */ + template + void SendServerMessageToAll(FLinearColor msg_color, const T* msg, + Args&&... args) + { + FString text(FString::Format(msg, std::forward(args)...)); + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); + + shooter_pc->ClientServerChatDirectMessage(&text, msg_color, false); + } + } + + /** + * \brief Sends notification (on-screen message) to all players. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param color Message color + * \param display_scale Size of text + * \param display_time Display time + * \param icon Message icon (optional) + * \param msg Message + * \param args Optional arguments + */ + template + void SendNotificationToAll(FLinearColor color, float display_scale, + float display_time, UTexture2D* icon, const T* msg, Args&&... args) + { + FString text(FString::Format(msg, std::forward(args)...)); + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); + + shooter_pc->ClientServerSOTFNotificationCustom(&text, color, display_scale, display_time, icon, nullptr); + } + } + + /** + * \brief Sends chat message to all players. Using fmt::format. + * \tparam T Either a a char or wchar_t + * \tparam Args Optional arguments types + * \param sender_name Name of the sender + * \param msg Message + * \param args Optional arguments + */ + template + void SendChatMessageToAll(const FString& sender_name, const T* msg, Args&&... args) + { + const FString text(FString::Format(msg, std::forward(args)...)); + + FChatMessage chat_message = FChatMessage(); + chat_message.SenderName = sender_name; + chat_message.Message = text; + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); + + shooter_pc->ClientChatMessage(chat_message); + } + } + + /** + * \brief Returns Steam ID from player controller + */ + static uint64 GetSteamIdFromController(AController* controller) + { + uint64 steam_id = 0; + + APlayerState* player_state = controller->PlayerStateField()(); + if (player_state) + { + FUniqueNetIdSteam* steam_net_id = static_cast(player_state->UniqueIdField()() + .UniqueNetId.Object); + steam_id = steam_net_id->UniqueNetId; + } + + return steam_id; + } + + /** + * \brief Finds player from the given steam name + * \param steam_name Steam name + * \return Pointer to AShooterPlayerController + */ + AShooterPlayerController* FindPlayerFromSteamName(const FString& steam_name) const + { + AShooterPlayerController* result = nullptr; + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + const FString current_name = player_controller->PlayerStateField()()->PlayerNameField()(); + if (current_name == steam_name) + { + AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); + + result = shooter_pc; + break; + } + } + + return result; + } + + /** + * \brief Finds all matching players from the given character name + * \param character_name Character name + * \param search Type Defaulted To ESearchCase::Type::IgnoreCase + * \param full_match Will match the full length of the string if true + * \return Array of AShooterPlayerController* + */ + TArray FindPlayerFromCharacterName(const FString& character_name, + ESearchCase::Type search = ESearchCase::Type:: + IgnoreCase, + bool full_match = false) const + { + TArray found_players; + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + AShooterPlayerController* shooter_player = static_cast(player_controller.Get()); + FString char_name = GetCharacterName(shooter_player); + + if (!char_name.IsEmpty() && (full_match + ? char_name.Equals(character_name, search) + : char_name.StartsWith(character_name, search))) + found_players.Add(shooter_player); + } + + return found_players; + } + + /** + * \brief Returns the character name of player + * \param player_controller Player + */ + static FString GetCharacterName(AShooterPlayerController* player_controller) + { + AShooterPlayerState* player_state = static_cast(player_controller->PlayerStateField()()); + if (player_state && player_state->MyPlayerDataStructField()()) + return player_state->MyPlayerDataStructField()()->MyPlayerCharacterConfigField()().PlayerCharacterName; + + return FString(""); + } + + /** + * \brief Returns the steam name of player + * \param player_controller Player + */ + static FString GetSteamName(AController* player_controller) + { + return player_controller->PlayerStateField()()->PlayerNameField()(); + } + + /** + * \brief Finds player from the given steam id + * \param steam_id Steam id + * \return Pointer to AShooterPlayerController + */ + AShooterPlayerController* FindPlayerFromSteamId(uint64 steam_id) const + { + AShooterPlayerController* result = nullptr; + + const auto& player_controllers = GetWorld()->PlayerControllerListField()(); + for (TWeakObjectPtr player_controller : player_controllers) + { + const uint64 current_steam_id = GetSteamIdFromController(player_controller.Get()); + + if (current_steam_id == steam_id) + { + AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); + + result = shooter_pc; + break; + } + } + + return result; + } + + /*bool SpawnDrop(const wchar_t* blueprint, FVector pos, int amount, float item_quality = 0.0f, + bool force_blueprint = false, float life_span = 0.0f) const + { + UObject* object = Globals::StaticLoadObject(UObject::StaticClass(), nullptr, blueprint, nullptr, 0, 0, true); + + TSubclassOf archetype;// (reinterpret_cast(object)); + archetype.uClass = reinterpret_cast(object); + TSubclassOf archetype_dropped; + archetype_dropped.uClass = reinterpret_cast(object); + + APlayerController* player = GetWorld()->GetFirstPlayerController(); + if (player) + { + FVector pos2{1, 1, 1}; + FRotator rot{0, 0, 0}; + + + UPrimalInventoryComponent::StaticDropNewItem(player, archetype, item_quality, false, amount, force_blueprint, + archetype_dropped, &rot, + true, &pos2, &rot, true, false, false, true, nullptr, pos2, + nullptr, life_span); + + return true; + } + + return false; + }*/ + + /** + * \brief Spawns a dino near player or at specific coordinates + * \param player Player. If null, random player will be chosen. At least one player should be on the map + * \param blueprint Blueprint path + * \param location Spawn position. If null, dino will be spawned near player + * \param lvl Level of the dino + * \param force_tame Force tame + * \return Spawned dino or null + */ + APrimalDinoCharacter* SpawnDino(AShooterPlayerController* player, FString blueprint, FVector* location, int lvl, + bool force_tame) const + { + if (!player) + { + player = static_cast(GetWorld()->GetFirstPlayerController()); + if (!player) + return nullptr; + } + + AActor* actor = player->SpawnActor(&blueprint, 100, 0, 0, true); + if (actor && actor->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) + { + APrimalDinoCharacter* dino = static_cast(actor); + + dino->AbsoluteBaseLevelField() = lvl; + + if (location && !location->IsZero()) + { + FRotator rotation{0, 0, 0}; + dino->TeleportTo(location, &rotation, true, false); + } + + if (force_tame) + { + dino->TameDino(player, true, player->TargetingTeamField()()); + } + + dino->BeginPlay(); + + return dino; + } + + return nullptr; + } + + /** + * \brief Returns true if character is riding a dino, false otherwise + * \param player_controller Player + */ + static bool IsRidingDino(AShooterPlayerController* player_controller) + { + return player_controller && player_controller->GetPlayerCharacter() + && player_controller->GetPlayerCharacter()->GetRidingDino() != nullptr; + } + + /** + * \brief Returns the dino the character is riding + * \param player_controller Player + * \return APrimalDinoCharacter* + */ + static APrimalDinoCharacter* GetRidingDino(AShooterPlayerController* player_controller) + { + return player_controller && player_controller->GetPlayerCharacter() + ? player_controller->GetPlayerCharacter()->GetRidingDino() + : nullptr; + } + + /** + * \brief Returns the position of a player + * \param player_controller Player + * \return FVector + */ + static FVector GetPosition(APlayerController* player_controller) + { + return player_controller ? player_controller->DefaultActorLocationField()() : FVector{0, 0, 0}; + } + + /** + * \brief Teleport one player to another + * \param me Player + * \param him Other Player + * \param check_for_dino If set true prevents players teleporting with dino's or teleporting to a player on a dino + * \param max_dist Is the max distance the characters can be away from each other -1 is disabled + */ + static std::optional TeleportToPlayer(AShooterPlayerController* me, AShooterPlayerController* him, + bool check_for_dino, + float max_dist = -1) + { + if (!(me && him && me->GetPlayerCharacter() && him->GetPlayerCharacter() + && !me->GetPlayerCharacter()->IsDead() && !him->GetPlayerCharacter()->IsDead()) + ) + { + return "One of players is dead"; + } + + if (check_for_dino && (IsRidingDino(me) || IsRidingDino(him))) + { + return "One of players is riding a dino"; + } + + if (max_dist != -1 && FVector::Distance(GetPosition(me), GetPosition(him)) > max_dist) + { + return "Person is too far away"; + } + + const FVector pos = him->DefaultActorLocationField()(); + + me->SetPlayerPos(pos.X, pos.Y, pos.Z); + + return {}; + } + + /** + * \brief Teleports player to the given position + * \param player_controller Player + * \param pos New position + */ + static bool TeleportToPos(AShooterPlayerController* player_controller, const FVector& pos) + { + if (player_controller && !IsPlayerDead(player_controller)) + { + player_controller->SetPlayerPos(pos.X, pos.Y, pos.Z); + return true; + } + + return false; + } + + + /** + * \brief Counts a specific items quantity + * \param player_controller Player + * \param item_name The name of the item you want to count the quantity of + * \return On success, the function returns amount of items player has. Returns -1 if the function has failed. + */ + static int GetInventoryItemCount(AShooterPlayerController* player_controller, const FString& item_name) + { + if (!player_controller) + return -1; + + UPrimalInventoryComponent* inventory_component = player_controller + ->GetPlayerCharacter()->MyInventoryComponentField()(); + if (!inventory_component) + return -1; + + FString name; + int item_count = 0; + + for (UPrimalItem* item : inventory_component->InventoryItemsField()()) + { + item->GetItemName(&name, true, false, nullptr); + + if (name.Equals(item_name, ESearchCase::IgnoreCase)) + item_count += item->GetItemQuantity(); + } + + return item_count; + } + + /** + * \brief Returns IP address of player + */ + static FString GetIPAddress(AShooterPlayerController* player) + { + FString ip_address = ""; + + AShooterPlayerState* player_state = static_cast(player->PlayerStateField()()); + + if (player_state && player_state->MyPlayerDataStructField()()) + ip_address = player_state->MyPlayerDataStructField()()->SavedNetworkAddressField()(); + + return ip_address; + } + + /** + * \brief Returns blueprint from UPrimalItem + */ + static FString GetItemBlueprint(UPrimalItem* item) + { + FString path_name; + item->ClassField()()->GetDefaultObject(true)->GetFullName(&path_name, nullptr); + + if (int find_index = 0; path_name.FindChar(' ', find_index)) + { + path_name = "Blueprint'" + path_name.Mid(find_index + 1, + path_name.Len() - (find_index + (path_name.EndsWith( + "_C", ESearchCase::CaseSensitive) + ? 3 + : 1))) + "'"; + return path_name.Replace(L"Default__", L"", ESearchCase::CaseSensitive); + } + + return FString(""); + } + + /** + * \brief Returns true if player is dead, false otherwise + */ + static bool IsPlayerDead(AShooterPlayerController* player) + { + return player->GetPlayerCharacter() == nullptr; + } + }; + + ARK_API IApiUtils& APIENTRY GetApiUtils(); +} diff --git a/version/Core/Public/ICommands.h b/version/Core/Public/ICommands.h new file mode 100644 index 0000000..5076665 --- /dev/null +++ b/version/Core/Public/ICommands.h @@ -0,0 +1,89 @@ +#pragma once + +#include + +#include "API/ARK/Ark.h" + +namespace ArkApi +{ + class ARK_API ICommands + { + public: + virtual ~ICommands() = default; + + /** + * \brief Adds a chat command + * \param command Command name + * \param callback Callback function + */ + virtual void AddChatCommand(const FString& command, + const std::function& + callback) = 0; + /** + * \brief Adds a console command + * \param command Command name + * \param callback Callback function + */ + virtual void AddConsoleCommand(const FString& command, + const std::function& callback) = 0; + + /** + * \brief Adds a rcon command + * \param command Command name + * \param callback Callback function + */ + virtual void AddRconCommand(const FString& command, + const std::function& callback) = 0; + + /** + * \brief Added function will be called every frame + * \param id Unique ID + * \param callback Callback function + */ + virtual void AddOnTickCallback(const FString& id, const std::function& callback) = 0; + + /** + * \brief Added function will be called every second + * \param id Unique ID + * \param callback Callback function + */ + virtual void AddOnTimerCallback(const FString& id, const std::function& callback) = 0; + + /** + * \brief Removes a chat command + * \param command Command name + * \return true if success, false otherwise + */ + virtual bool RemoveChatCommand(const FString& command) = 0; + + /** + * \brief Removes a console command + * \param command Command name + * \return true if success, false otherwise + */ + virtual bool RemoveConsoleCommand(const FString& command) = 0; + + /** + * \brief Removes a rcon command + * \param command Command name + * \return true if success, false otherwise + */ + virtual bool RemoveRconCommand(const FString& command) = 0; + + /** + * \brief Removes a on-tick callback + * \param id Callback ID + * \return true if success, false otherwise + */ + virtual bool RemoveOnTickCallback(const FString& id) = 0; + + /** + * \brief Removes an on-timer callback + * \param id Callback ID + * \return true if success, false otherwise + */ + virtual bool RemoveOnTimerCallback(const FString& id) = 0; + }; + + ARK_API ICommands& APIENTRY GetCommands(); +} diff --git a/version/Core/Public/IHooks.h b/version/Core/Public/IHooks.h new file mode 100644 index 0000000..93ea2bd --- /dev/null +++ b/version/Core/Public/IHooks.h @@ -0,0 +1,39 @@ +#pragma once + +#include "API/Base.h" + +namespace ArkApi +{ + class ARK_API IHooks + { + public: + virtual ~IHooks() = default; + + /** + * \brief Hooks a function. Hooks are called in the reverse order. + * \param func_name Function full name + * \param detour A pointer to the detour function, which will override the target function + * \param original A pointer to the trampoline function, which will be used to call the original target function + * \return true if success, false otherwise + */ + template + bool SetHook(const std::string& func_name, LPVOID detour, T** original) + { + return SetHookInternal(func_name, detour, reinterpret_cast(original)); + } + + /** + * \brief Removes a hook from a function + * \param func_name Function full name + * \param detour A pointer to the detour function + * \return true if success, false otherwise + */ + virtual bool DisableHook(const std::string& func_name, LPVOID detour) = 0; + + private: + virtual bool SetHookInternal(const std::string& func_name, LPVOID detour, + LPVOID* original) = 0; + }; + + ARK_API IHooks& APIENTRY GetHooks(); +} diff --git a/version/Core/Public/Logger/Logger.h b/version/Core/Public/Logger/Logger.h new file mode 100644 index 0000000..f5357ae --- /dev/null +++ b/version/Core/Public/Logger/Logger.h @@ -0,0 +1,43 @@ +#pragma once + +#include "../API/Base.h" +#include "Logger/spdlog/spdlog.h" + +ARK_API std::vector& APIENTRY GetLogSinks(); + +class Log +{ +public: + Log(const Log&) = delete; + Log(Log&&) = delete; + Log& operator=(const Log&) = delete; + Log& operator=(Log&&) = delete; + + static Log& Get() + { + static Log instance; + return instance; + } + + static std::shared_ptr& GetLog() + { + return Get().logger_; + } + + void Init(const std::string& plugin_name) + { + auto& sinks = GetLogSinks(); + + logger_ = std::make_shared(plugin_name, begin(sinks), end(sinks)); + + logger_->set_pattern("%D %R [%n][%l] %v"); + logger_->flush_on(spdlog::level::info); + } + +private: + Log() = default; + ~Log() = default; + + std::shared_ptr logger_; +}; + diff --git a/version/Core/Public/Logger/spdlog/async_logger.h b/version/Core/Public/Logger/spdlog/async_logger.h new file mode 100644 index 0000000..e9fcd5f --- /dev/null +++ b/version/Core/Public/Logger/spdlog/async_logger.h @@ -0,0 +1,82 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Very fast asynchronous logger (millions of logs per second on an average desktop) +// Uses pre allocated lockfree queue for maximum throughput even under large number of threads. +// Creates a single back thread to pop messages from the queue and log them. +// +// Upon each log write the logger: +// 1. Checks if its log level is enough to log the message +// 2. Push a new copy of the message to a queue (or block the caller until space is available in the queue) +// 3. will throw spdlog_ex upon log exceptions +// Upon destruction, logs all remaining messages in the queue before destructing.. + +#include "common.h" +#include "logger.h" + +#include +#include +#include +#include + +namespace spdlog +{ + +namespace details +{ +class async_log_helper; +} + +class async_logger SPDLOG_FINAL :public logger +{ +public: + template + async_logger(const std::string& name, + const It& begin, + const It& end, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + async_logger(const std::string& logger_name, + sinks_init_list sinks, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + async_logger(const std::string& logger_name, + sink_ptr single_sink, + size_t queue_size, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + //Wait for the queue to be empty, and flush synchronously + //Warning: this can potentially last forever as we wait it to complete + void flush() override; + + // Error handler + virtual void set_error_handler(log_err_handler) override; + virtual log_err_handler error_handler() override; + +protected: + void _sink_it(details::log_msg& msg) override; + void _set_formatter(spdlog::formatter_ptr msg_formatter) override; + void _set_pattern(const std::string& pattern, pattern_time_type pattern_time) override; + +private: + std::unique_ptr _async_log_helper; +}; +} + + +#include "details/async_logger_impl.h" diff --git a/version/Core/Public/Logger/spdlog/common.h b/version/Core/Public/Logger/spdlog/common.h new file mode 100644 index 0000000..ea0b056 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/common.h @@ -0,0 +1,161 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +#include +#include +#endif + +#include "details/null_mutex.h" + +//visual studio upto 2013 does not support noexcept nor constexpr +#if defined(_MSC_VER) && (_MSC_VER < 1900) +#define SPDLOG_NOEXCEPT throw() +#define SPDLOG_CONSTEXPR +#else +#define SPDLOG_NOEXCEPT noexcept +#define SPDLOG_CONSTEXPR constexpr +#endif + +// final keyword support. On by default. See tweakme.h +#if defined(SPDLOG_NO_FINAL) +#define SPDLOG_FINAL +#else +#define SPDLOG_FINAL final +#endif + +#if defined(__GNUC__) || defined(__clang__) +#define SPDLOG_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define SPDLOG_DEPRECATED __declspec(deprecated) +#else +#define SPDLOG_DEPRECATED +#endif + +#include "fmt/fmt.h" + +namespace spdlog +{ + +class formatter; + +namespace sinks +{ +class sink; +} + +using log_clock = std::chrono::system_clock; +using sink_ptr = std::shared_ptr < sinks::sink >; +using sinks_init_list = std::initializer_list < sink_ptr >; +using formatter_ptr = std::shared_ptr; +#if defined(SPDLOG_NO_ATOMIC_LEVELS) +using level_t = details::null_atomic_int; +#else +using level_t = std::atomic; +#endif + +using log_err_handler = std::function; + +//Log level enum +namespace level +{ +typedef enum +{ + trace = 0, + debug = 1, + info = 2, + warn = 3, + err = 4, + critical = 5, + off = 6 +} level_enum; + +#if !defined(SPDLOG_LEVEL_NAMES) +#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error", "critical", "off" } +#endif +static const char* level_names[] SPDLOG_LEVEL_NAMES; + +static const char* short_level_names[] { "T", "D", "I", "W", "E", "C", "O" }; + +inline const char* to_str(spdlog::level::level_enum l) +{ + return level_names[l]; +} + +inline const char* to_short_str(spdlog::level::level_enum l) +{ + return short_level_names[l]; +} +} //level + + +// +// Async overflow policy - block by default. +// +enum class async_overflow_policy +{ + block_retry, // Block / yield / sleep until message can be enqueued + discard_log_msg // Discard the message it enqueue fails +}; + +// +// Pattern time - specific time getting to use for pattern_formatter. +// local time by default +// +enum class pattern_time_type +{ + local, // log localtime + utc // log utc +}; + +// +// Log exception +// +namespace details +{ +namespace os +{ +std::string errno_str(int err_num); +} +} +class spdlog_ex: public std::exception +{ +public: + spdlog_ex(const std::string& msg):_msg(msg) + {} + spdlog_ex(const std::string& msg, int last_errno) + { + _msg = msg + ": " + details::os::errno_str(last_errno); + } + const char* what() const SPDLOG_NOEXCEPT override + { + return _msg.c_str(); + } +private: + std::string _msg; + +}; + +// +// wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) +// +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +using filename_t = std::wstring; +#else +using filename_t = std::string; +#endif + + +} //spdlog diff --git a/version/Core/Public/Logger/spdlog/details/async_log_helper.h b/version/Core/Public/Logger/spdlog/details/async_log_helper.h new file mode 100644 index 0000000..732236c --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/async_log_helper.h @@ -0,0 +1,399 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +// async log helper : +// Process logs asynchronously using a back thread. +// +// If the internal queue of log messages reaches its max size, +// then the client call will block until there is more room. +// + +#pragma once + +#include "../common.h" +#include "../sinks/sink.h" +#include "../details/mpmc_bounded_q.h" +#include "../details/log_msg.h" +#include "../details/os.h" +#include "../formatter.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ + +class async_log_helper +{ + // Async msg to move to/from the queue + // Movable only. should never be copied + enum class async_msg_type + { + log, + flush, + terminate + }; + struct async_msg + { + std::string logger_name; + level::level_enum level; + log_clock::time_point time; + size_t thread_id; + std::string txt; + async_msg_type msg_type; + size_t msg_id; + + async_msg() = default; + ~async_msg() = default; + + +async_msg(async_msg&& other) SPDLOG_NOEXCEPT: + logger_name(std::move(other.logger_name)), + level(std::move(other.level)), + time(std::move(other.time)), + thread_id(other.thread_id), + txt(std::move(other.txt)), + msg_type(std::move(other.msg_type)), + msg_id(other.msg_id) + {} + + async_msg(async_msg_type m_type): + level(level::info), + thread_id(0), + msg_type(m_type), + msg_id(0) + {} + + async_msg& operator=(async_msg&& other) SPDLOG_NOEXCEPT + { + logger_name = std::move(other.logger_name); + level = other.level; + time = std::move(other.time); + thread_id = other.thread_id; + txt = std::move(other.txt); + msg_type = other.msg_type; + msg_id = other.msg_id; + return *this; + } + + // never copy or assign. should only be moved.. + async_msg(const async_msg&) = delete; + async_msg& operator=(const async_msg& other) = delete; + + // construct from log_msg + async_msg(const details::log_msg& m): + level(m.level), + time(m.time), + thread_id(m.thread_id), + txt(m.raw.data(), m.raw.size()), + msg_type(async_msg_type::log), + msg_id(m.msg_id) + { +#ifndef SPDLOG_NO_NAME + logger_name = *m.logger_name; +#endif + } + + + // copy into log_msg + void fill_log_msg(log_msg &msg) + { + msg.logger_name = &logger_name; + msg.level = level; + msg.time = time; + msg.thread_id = thread_id; + msg.raw << txt; + msg.msg_id = msg_id; + } + }; + +public: + + using item_type = async_msg; + using q_type = details::mpmc_bounded_queue; + + using clock = std::chrono::steady_clock; + + + async_log_helper(formatter_ptr formatter, + const std::vector& sinks, + size_t queue_size, + const log_err_handler err_handler, + const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, + const std::function& worker_warmup_cb = nullptr, + const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), + const std::function& worker_teardown_cb = nullptr); + + void log(const details::log_msg& msg); + + // stop logging and join the back thread + ~async_log_helper(); + + void set_formatter(formatter_ptr); + + void flush(bool wait_for_q); + + void set_error_handler(spdlog::log_err_handler err_handler); + +private: + formatter_ptr _formatter; + std::vector> _sinks; + + // queue of messages to log + q_type _q; + + log_err_handler _err_handler; + + bool _flush_requested; + + bool _terminate_requested; + + + // overflow policy + const async_overflow_policy _overflow_policy; + + // worker thread warmup callback - one can set thread priority, affinity, etc + const std::function _worker_warmup_cb; + + // auto periodic sink flush parameter + const std::chrono::milliseconds _flush_interval_ms; + + // worker thread teardown callback + const std::function _worker_teardown_cb; + + // worker thread + std::thread _worker_thread; + + void push_msg(async_msg&& new_msg); + + // worker thread main loop + void worker_loop(); + + // pop next message from the queue and process it. will set the last_pop to the pop time + // return false if termination of the queue is required + bool process_next_msg(log_clock::time_point& last_pop, log_clock::time_point& last_flush); + + void handle_flush_interval(log_clock::time_point& now, log_clock::time_point& last_flush); + + // sleep,yield or return immediately using the time passed since last message as a hint + static void sleep_or_yield(const spdlog::log_clock::time_point& now, const log_clock::time_point& last_op_time); + + // wait until the queue is empty + void wait_empty_q(); + +}; +} +} + +/////////////////////////////////////////////////////////////////////////////// +// async_sink class implementation +/////////////////////////////////////////////////////////////////////////////// +inline spdlog::details::async_log_helper::async_log_helper( + formatter_ptr formatter, + const std::vector& sinks, + size_t queue_size, + log_err_handler err_handler, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb): + _formatter(formatter), + _sinks(sinks), + _q(queue_size), + _err_handler(err_handler), + _flush_requested(false), + _terminate_requested(false), + _overflow_policy(overflow_policy), + _worker_warmup_cb(worker_warmup_cb), + _flush_interval_ms(flush_interval_ms), + _worker_teardown_cb(worker_teardown_cb), + _worker_thread(&async_log_helper::worker_loop, this) +{} + +// Send to the worker thread termination message(level=off) +// and wait for it to finish gracefully +inline spdlog::details::async_log_helper::~async_log_helper() +{ + try + { + push_msg(async_msg(async_msg_type::terminate)); + _worker_thread.join(); + } + catch (...) // don't crash in destructor + { + } +} + + +//Try to push and block until succeeded (if the policy is not to discard when the queue is full) +inline void spdlog::details::async_log_helper::log(const details::log_msg& msg) +{ + push_msg(async_msg(msg)); +} + +inline void spdlog::details::async_log_helper::push_msg(details::async_log_helper::async_msg&& new_msg) +{ + if (!_q.enqueue(std::move(new_msg)) && _overflow_policy != async_overflow_policy::discard_log_msg) + { + auto last_op_time = details::os::now(); + auto now = last_op_time; + do + { + now = details::os::now(); + sleep_or_yield(now, last_op_time); + } + while (!_q.enqueue(std::move(new_msg))); + } +} + +// optionally wait for the queue be empty and request flush from the sinks +inline void spdlog::details::async_log_helper::flush(bool wait_for_q) +{ + push_msg(async_msg(async_msg_type::flush)); + if (wait_for_q) + wait_empty_q(); //return when queue is empty +} + +inline void spdlog::details::async_log_helper::worker_loop() +{ + if (_worker_warmup_cb) _worker_warmup_cb(); + auto last_pop = details::os::now(); + auto last_flush = last_pop; + auto active = true; + while (active) + { + try + { + active = process_next_msg(last_pop, last_flush); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch(...) + { + _err_handler("Unknown exeption in async logger worker loop."); + } + } + if (_worker_teardown_cb) _worker_teardown_cb(); + + +} + +// process next message in the queue +// return true if this thread should still be active (while no terminate msg was received) +inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_point& last_pop, log_clock::time_point& last_flush) +{ + async_msg incoming_async_msg; + + if (_q.dequeue(incoming_async_msg)) + { + last_pop = details::os::now(); + switch (incoming_async_msg.msg_type) + { + case async_msg_type::flush: + _flush_requested = true; + break; + + case async_msg_type::terminate: + _flush_requested = true; + _terminate_requested = true; + break; + + default: + log_msg incoming_log_msg; + incoming_async_msg.fill_log_msg(incoming_log_msg); + _formatter->format(incoming_log_msg); + for (auto &s : _sinks) + { + if (s->should_log(incoming_log_msg.level)) + { + s->log(incoming_log_msg); + } + } + } + return true; + } + + // Handle empty queue.. + // This is the only place where the queue can terminate or flush to avoid losing messages already in the queue + else + { + auto now = details::os::now(); + handle_flush_interval(now, last_flush); + sleep_or_yield(now, last_pop); + return !_terminate_requested; + } +} + +// flush all sinks if _flush_interval_ms has expired +inline void spdlog::details::async_log_helper::handle_flush_interval(log_clock::time_point& now, log_clock::time_point& last_flush) +{ + auto should_flush = _flush_requested || (_flush_interval_ms != std::chrono::milliseconds::zero() && now - last_flush >= _flush_interval_ms); + if (should_flush) + { + for (auto &s : _sinks) + s->flush(); + now = last_flush = details::os::now(); + _flush_requested = false; + } +} + +inline void spdlog::details::async_log_helper::set_formatter(formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; +} + + +// spin, yield or sleep. use the time passed since last message as a hint +inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_clock::time_point& now, const spdlog::log_clock::time_point& last_op_time) +{ + using namespace std::this_thread; + using std::chrono::milliseconds; + using std::chrono::microseconds; + + auto time_since_op = now - last_op_time; + + // spin upto 50 micros + if (time_since_op <= microseconds(50)) + return; + + // yield upto 150 micros + if (time_since_op <= microseconds(100)) + return std::this_thread::yield(); + + // sleep for 20 ms upto 200 ms + if (time_since_op <= milliseconds(200)) + return sleep_for(milliseconds(20)); + + // sleep for 500 ms + return sleep_for(milliseconds(500)); +} + +// wait for the queue to be empty +inline void spdlog::details::async_log_helper::wait_empty_q() +{ + auto last_op = details::os::now(); + while (!_q.is_empty()) + { + sleep_or_yield(details::os::now(), last_op); + } +} + +inline void spdlog::details::async_log_helper::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; +} + + + diff --git a/version/Core/Public/Logger/spdlog/details/async_logger_impl.h b/version/Core/Public/Logger/spdlog/details/async_logger_impl.h new file mode 100644 index 0000000..8373211 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/async_logger_impl.h @@ -0,0 +1,107 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Async Logger implementation +// Use an async_sink (queue per logger) to perform the logging in a worker thread + +#include "../details/async_log_helper.h" +#include "../async_logger.h" + +#include +#include +#include +#include + +template +inline spdlog::async_logger::async_logger(const std::string& logger_name, + const It& begin, + const It& end, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + logger(logger_name, begin, end), + _async_log_helper(new details::async_log_helper(_formatter, _sinks, queue_size, _err_handler, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb)) +{ +} + +inline spdlog::async_logger::async_logger(const std::string& logger_name, + sinks_init_list sinks_list, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + async_logger(logger_name, sinks_list.begin(), sinks_list.end(), queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} + +inline spdlog::async_logger::async_logger(const std::string& logger_name, + sink_ptr single_sink, + size_t queue_size, + const async_overflow_policy overflow_policy, + const std::function& worker_warmup_cb, + const std::chrono::milliseconds& flush_interval_ms, + const std::function& worker_teardown_cb) : + async_logger(logger_name, +{ + single_sink +}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {} + + +inline void spdlog::async_logger::flush() +{ + _async_log_helper->flush(true); +} + +// Error handler +inline void spdlog::async_logger::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; + _async_log_helper->set_error_handler(err_handler); + +} +inline spdlog::log_err_handler spdlog::async_logger::error_handler() +{ + return _err_handler; +} + + +inline void spdlog::async_logger::_set_formatter(spdlog::formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; + _async_log_helper->set_formatter(_formatter); +} + +inline void spdlog::async_logger::_set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _formatter = std::make_shared(pattern, pattern_time); + _async_log_helper->set_formatter(_formatter); +} + + +inline void spdlog::async_logger::_sink_it(details::log_msg& msg) +{ + try + { +#if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) + _incr_msg_counter(msg); +#endif + _async_log_helper->log(msg); + if (_should_flush_on(msg)) + _async_log_helper->flush(false); // do async flush + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch(...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } + +} diff --git a/version/Core/Public/Logger/spdlog/details/file_helper.h b/version/Core/Public/Logger/spdlog/details/file_helper.h new file mode 100644 index 0000000..c131fc9 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/file_helper.h @@ -0,0 +1,146 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Helper class for file sink +// When failing to open a file, retry several times(5) with small delay between the tries(10 ms) +// Throw spdlog_ex exception on errors + +#include "../details/os.h" +#include "../details/log_msg.h" + +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ + +class file_helper +{ + +public: + const int open_tries = 5; + const int open_interval = 10; + + explicit file_helper() : + _fd(nullptr) + {} + + file_helper(const file_helper&) = delete; + file_helper& operator=(const file_helper&) = delete; + + ~file_helper() + { + close(); + } + + + void open(const filename_t& fname, bool truncate = false) + { + + close(); + auto *mode = truncate ? SPDLOG_FILENAME_T("wb") : SPDLOG_FILENAME_T("ab"); + _filename = fname; + for (int tries = 0; tries < open_tries; ++tries) + { + if (!os::fopen_s(&_fd, fname, mode)) + return; + + std::this_thread::sleep_for(std::chrono::milliseconds(open_interval)); + } + + throw spdlog_ex("Failed opening file " + os::filename_to_str(_filename) + " for writing", errno); + } + + void reopen(bool truncate) + { + if (_filename.empty()) + throw spdlog_ex("Failed re opening file - was not opened before"); + open(_filename, truncate); + + } + + void flush() + { + std::fflush(_fd); + } + + void close() + { + if (_fd) + { + std::fclose(_fd); + _fd = nullptr; + } + } + + void write(const log_msg& msg) + { + size_t msg_size = msg.formatted.size(); + auto data = msg.formatted.data(); + if (std::fwrite(data, 1, msg_size, _fd) != msg_size) + throw spdlog_ex("Failed writing to file " + os::filename_to_str(_filename), errno); + } + + size_t size() const + { + if (!_fd) + throw spdlog_ex("Cannot use size() on closed file " + os::filename_to_str(_filename)); + return os::filesize(_fd); + } + + const filename_t& filename() const + { + return _filename; + } + + static bool file_exists(const filename_t& fname) + { + return os::file_exists(fname); + } + + // + // return file path and its extension: + // + // "mylog.txt" => ("mylog", ".txt") + // "mylog" => ("mylog", "") + // "mylog." => ("mylog.", "") + // "/dir1/dir2/mylog.txt" => ("/dir1/dir2/mylog", ".txt") + // + // the starting dot in filenames is ignored (hidden files): + // + // ".mylog" => (".mylog". "") + // "my_folder/.mylog" => ("my_folder/.mylog", "") + // "my_folder/.mylog.txt" => ("my_folder/.mylog", ".txt") + static std::tuple split_by_extenstion(const spdlog::filename_t& fname) + { + auto ext_index = fname.rfind('.'); + + // no valid extension found - return whole path and empty string as extension + if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1) + return std::make_tuple(fname, spdlog::filename_t()); + + // treat casese like "/etc/rc.d/somelogfile or "/abc/.hiddenfile" + //auto folder_index = fname.find('\\', ext_index); + auto folder_index = fname.rfind(details::os::folder_sep); + if (folder_index != fname.npos && folder_index >= ext_index - 1) + return std::make_tuple(fname, spdlog::filename_t()); + + // finally - return a valid base and extnetion tuple + return std::make_tuple(fname.substr(0, ext_index), fname.substr(ext_index)); + } +private: + FILE* _fd; + filename_t _filename; +}; +} +} diff --git a/version/Core/Public/Logger/spdlog/details/log_msg.h b/version/Core/Public/Logger/spdlog/details/log_msg.h new file mode 100644 index 0000000..a9fe920 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/log_msg.h @@ -0,0 +1,50 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../common.h" +#include "../details/os.h" + + +#include +#include + +namespace spdlog +{ +namespace details +{ +struct log_msg +{ + log_msg() = default; + log_msg(const std::string *loggers_name, level::level_enum lvl) : + logger_name(loggers_name), + level(lvl), + msg_id(0) + { +#ifndef SPDLOG_NO_DATETIME + time = os::now(); +#endif + +#ifndef SPDLOG_NO_THREAD_ID + thread_id = os::thread_id(); +#endif + } + + log_msg(const log_msg& other) = delete; + log_msg& operator=(log_msg&& other) = delete; + log_msg(log_msg&& other) = delete; + + + const std::string *logger_name; + level::level_enum level; + log_clock::time_point time; + size_t thread_id; + fmt::MemoryWriter raw; + fmt::MemoryWriter formatted; + size_t msg_id; +}; +} +} diff --git a/version/Core/Public/Logger/spdlog/details/logger_impl.h b/version/Core/Public/Logger/spdlog/details/logger_impl.h new file mode 100644 index 0000000..a71ae10 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/logger_impl.h @@ -0,0 +1,373 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../logger.h" +#include "../sinks/stdout_sinks.h" + +#include +#include + +// create logger with given name, sinks and the default pattern formatter +// all other ctors will call this one +template +inline spdlog::logger::logger(const std::string& logger_name, const It& begin, const It& end): + _name(logger_name), + _sinks(begin, end), + _formatter(std::make_shared("%+")), + _level(level::info), + _flush_level(level::off), + _last_err_time(0), + _msg_counter(1) // message counter will start from 1. 0-message id will be reserved for controll messages +{ + _err_handler = [this](const std::string &msg) + { + this->_default_err_handler(msg); + }; +} + +// ctor with sinks as init list +inline spdlog::logger::logger(const std::string& logger_name, sinks_init_list sinks_list): + logger(logger_name, sinks_list.begin(), sinks_list.end()) +{} + + +// ctor with single sink +inline spdlog::logger::logger(const std::string& logger_name, spdlog::sink_ptr single_sink): + logger(logger_name, +{ + single_sink +}) +{} + + +inline spdlog::logger::~logger() = default; + + +inline void spdlog::logger::set_formatter(spdlog::formatter_ptr msg_formatter) +{ + _set_formatter(msg_formatter); +} + +inline void spdlog::logger::set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _set_pattern(pattern, pattern_time); +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Args&... args) +{ + if (!should_log(lvl)) return; + + try + { + details::log_msg log_msg(&_name, lvl); + +#if defined(SPDLOG_FMT_PRINTF) + fmt::printf(log_msg.raw, fmt, args...); +#else + log_msg.raw.write(fmt, args...); +#endif + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch(...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const char* msg) +{ + if (!should_log(lvl)) return; + try + { + details::log_msg log_msg(&_name, lvl); + log_msg.raw << msg; + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const T& msg) +{ + if (!should_log(lvl)) return; + try + { + details::log_msg log_msg(&_name, lvl); + log_msg.raw << msg; + _sink_it(log_msg); + } + catch (const std::exception &ex) + { + _err_handler(ex.what()); + } + catch (...) + { + _err_handler("Unknown exception in logger " + _name); + throw; + } +} + + +template +inline void spdlog::logger::trace(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::trace, fmt, arg1, args...); +} + +template +inline void spdlog::logger::debug(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::debug, fmt, arg1, args...); +} + +template +inline void spdlog::logger::info(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::info, fmt, arg1, args...); +} + +template +inline void spdlog::logger::warn(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::warn, fmt, arg1, args...); +} + +template +inline void spdlog::logger::error(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::err, fmt, arg1, args...); +} + +template +inline void spdlog::logger::critical(const char* fmt, const Arg1 &arg1, const Args&... args) +{ + log(level::critical, fmt, arg1, args...); +} + + +template +inline void spdlog::logger::trace(const T& msg) +{ + log(level::trace, msg); +} + +template +inline void spdlog::logger::debug(const T& msg) +{ + log(level::debug, msg); +} + + +template +inline void spdlog::logger::info(const T& msg) +{ + log(level::info, msg); +} + + +template +inline void spdlog::logger::warn(const T& msg) +{ + log(level::warn, msg); +} + +template +inline void spdlog::logger::error(const T& msg) +{ + log(level::err, msg); +} + +template +inline void spdlog::logger::critical(const T& msg) +{ + log(level::critical, msg); +} + + + +#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT +#include +#include + +template +inline void spdlog::logger::log(level::level_enum lvl, const wchar_t* msg) +{ + std::wstring_convert > conv; + + log(lvl, conv.to_bytes(msg)); +} + +template +inline void spdlog::logger::log(level::level_enum lvl, const wchar_t* fmt, const Args&... args) +{ + fmt::WMemoryWriter wWriter; + + wWriter.write(fmt, args...); + log(lvl, wWriter.c_str()); +} + +template +inline void spdlog::logger::trace(const wchar_t* fmt, const Args&... args) +{ + log(level::trace, fmt, args...); +} + +template +inline void spdlog::logger::debug(const wchar_t* fmt, const Args&... args) +{ + log(level::debug, fmt, args...); +} + +template +inline void spdlog::logger::info(const wchar_t* fmt, const Args&... args) +{ + log(level::info, fmt, args...); +} + + +template +inline void spdlog::logger::warn(const wchar_t* fmt, const Args&... args) +{ + log(level::warn, fmt, args...); +} + +template +inline void spdlog::logger::error(const wchar_t* fmt, const Args&... args) +{ + log(level::err, fmt, args...); +} + +template +inline void spdlog::logger::critical(const wchar_t* fmt, const Args&... args) +{ + log(level::critical, fmt, args...); +} + +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT + + + +// +// name and level +// +inline const std::string& spdlog::logger::name() const +{ + return _name; +} + +inline void spdlog::logger::set_level(spdlog::level::level_enum log_level) +{ + _level.store(log_level); +} + +inline void spdlog::logger::set_error_handler(spdlog::log_err_handler err_handler) +{ + _err_handler = err_handler; +} + +inline spdlog::log_err_handler spdlog::logger::error_handler() +{ + return _err_handler; +} + + +inline void spdlog::logger::flush_on(level::level_enum log_level) +{ + _flush_level.store(log_level); +} + +inline spdlog::level::level_enum spdlog::logger::level() const +{ + return static_cast(_level.load(std::memory_order_relaxed)); +} + +inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) const +{ + return msg_level >= _level.load(std::memory_order_relaxed); +} + +// +// protected virtual called at end of each user log call (if enabled) by the line_logger +// +inline void spdlog::logger::_sink_it(details::log_msg& msg) +{ +#if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) + _incr_msg_counter(msg); +#endif + _formatter->format(msg); + for (auto &sink : _sinks) + { + if( sink->should_log( msg.level)) + { + sink->log(msg); + } + } + + if(_should_flush_on(msg)) + flush(); +} + +inline void spdlog::logger::_set_pattern(const std::string& pattern, pattern_time_type pattern_time) +{ + _formatter = std::make_shared(pattern, pattern_time); +} +inline void spdlog::logger::_set_formatter(formatter_ptr msg_formatter) +{ + _formatter = msg_formatter; +} + +inline void spdlog::logger::flush() +{ + for (auto& sink : _sinks) + sink->flush(); +} + +inline void spdlog::logger::_default_err_handler(const std::string &msg) +{ + auto now = time(nullptr); + if (now - _last_err_time < 60) + return; + auto tm_time = details::os::localtime(now); + char date_buf[100]; + std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); + details::log_msg err_msg; + err_msg.formatted.write("[*** LOG ERROR ***] [{}] [{}] [{}]{}", name(), msg, date_buf, details::os::eol); + sinks::stderr_sink_mt::instance()->log(err_msg); + _last_err_time = now; +} + +inline bool spdlog::logger::_should_flush_on(const details::log_msg &msg) +{ + const auto flush_level = _flush_level.load(std::memory_order_relaxed); + return (msg.level >= flush_level) && (msg.level != level::off); +} + +inline void spdlog::logger::_incr_msg_counter(details::log_msg &msg) +{ + msg.msg_id = _msg_counter.fetch_add(1, std::memory_order_relaxed); +} + +inline const std::vector& spdlog::logger::sinks() const +{ + return _sinks; +} + diff --git a/version/Core/Public/Logger/spdlog/details/mpmc_bounded_q.h b/version/Core/Public/Logger/spdlog/details/mpmc_bounded_q.h new file mode 100644 index 0000000..102df85 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/mpmc_bounded_q.h @@ -0,0 +1,176 @@ +/* +A modified version of Bounded MPMC queue by Dmitry Vyukov. + +Original code from: +http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue + +licensed by Dmitry Vyukov under the terms below: + +Simplified BSD license + +Copyright (c) 2010-2011 Dmitry Vyukov. All rights reserved. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list +of conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY DMITRY VYUKOV "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL DMITRY VYUKOV OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the authors and +should not be interpreted as representing official policies, either expressed or implied, of Dmitry Vyukov. +*/ + +/* +The code in its current form adds the license below: + +Copyright(c) 2015 Gabi Melman. +Distributed under the MIT License (http://opensource.org/licenses/MIT) + +*/ + +#pragma once + +#include "../common.h" + +#include +#include + +namespace spdlog +{ +namespace details +{ + +template +class mpmc_bounded_queue +{ +public: + + using item_type = T; + mpmc_bounded_queue(size_t buffer_size) + :max_size_(buffer_size), + buffer_(new cell_t[buffer_size]), + buffer_mask_(buffer_size - 1) + { + //queue size must be power of two + if (!((buffer_size >= 2) && ((buffer_size & (buffer_size - 1)) == 0))) + throw spdlog_ex("async logger queue size must be power of two"); + + for (size_t i = 0; i != buffer_size; i += 1) + buffer_[i].sequence_.store(i, std::memory_order_relaxed); + enqueue_pos_.store(0, std::memory_order_relaxed); + dequeue_pos_.store(0, std::memory_order_relaxed); + } + + ~mpmc_bounded_queue() + { + delete[] buffer_; + } + + + bool enqueue(T&& data) + { + cell_t* cell; + size_t pos = enqueue_pos_.load(std::memory_order_relaxed); + for (;;) + { + cell = &buffer_[pos & buffer_mask_]; + size_t seq = cell->sequence_.load(std::memory_order_acquire); + intptr_t dif = static_cast(seq) - static_cast(pos); + if (dif == 0) + { + if (enqueue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed)) + break; + } + else if (dif < 0) + { + return false; + } + else + { + pos = enqueue_pos_.load(std::memory_order_relaxed); + } + } + cell->data_ = std::move(data); + cell->sequence_.store(pos + 1, std::memory_order_release); + return true; + } + + bool dequeue(T& data) + { + cell_t* cell; + size_t pos = dequeue_pos_.load(std::memory_order_relaxed); + for (;;) + { + cell = &buffer_[pos & buffer_mask_]; + size_t seq = + cell->sequence_.load(std::memory_order_acquire); + intptr_t dif = static_cast(seq) - static_cast(pos + 1); + if (dif == 0) + { + if (dequeue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed)) + break; + } + else if (dif < 0) + return false; + else + pos = dequeue_pos_.load(std::memory_order_relaxed); + } + data = std::move(cell->data_); + cell->sequence_.store(pos + buffer_mask_ + 1, std::memory_order_release); + return true; + } + + bool is_empty() + { + size_t front, front1, back; + // try to take a consistent snapshot of front/tail. + do + { + front = enqueue_pos_.load(std::memory_order_acquire); + back = dequeue_pos_.load(std::memory_order_acquire); + front1 = enqueue_pos_.load(std::memory_order_relaxed); + } + while (front != front1); + return back == front; + } + +private: + struct cell_t + { + std::atomic sequence_; + T data_; + }; + + size_t const max_size_; + + static size_t const cacheline_size = 64; + typedef char cacheline_pad_t[cacheline_size]; + + cacheline_pad_t pad0_; + cell_t* const buffer_; + size_t const buffer_mask_; + cacheline_pad_t pad1_; + std::atomic enqueue_pos_; + cacheline_pad_t pad2_; + std::atomic dequeue_pos_; + cacheline_pad_t pad3_; + + mpmc_bounded_queue(mpmc_bounded_queue const&) = delete; + void operator= (mpmc_bounded_queue const&) = delete; +}; + +} // ns details +} // ns spdlog diff --git a/version/Core/Public/Logger/spdlog/details/null_mutex.h b/version/Core/Public/Logger/spdlog/details/null_mutex.h new file mode 100644 index 0000000..67b0aee --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/null_mutex.h @@ -0,0 +1,45 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include +// null, no cost dummy "mutex" and dummy "atomic" int + +namespace spdlog +{ +namespace details +{ +struct null_mutex +{ + void lock() {} + void unlock() {} + bool try_lock() + { + return true; + } +}; + +struct null_atomic_int +{ + int value; + null_atomic_int() = default; + + null_atomic_int(int val):value(val) + {} + + int load(std::memory_order) const + { + return value; + } + + void store(int val) + { + value = val; + } +}; + +} +} diff --git a/version/Core/Public/Logger/spdlog/details/os.h b/version/Core/Public/Logger/spdlog/details/os.h new file mode 100644 index 0000000..aaf949e --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/os.h @@ -0,0 +1,479 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// +#pragma once + +#include "../common.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 + +#ifndef NOMINMAX +#define NOMINMAX //prevent windows redefining min/max +#endif + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include // _get_pid support +#include // _get_osfhandle and _isatty support + +#ifdef __MINGW32__ +#include +#endif + +#else // unix + +#include +#include + +#ifdef __linux__ +#include //Use gettid() syscall under linux to get thread id + +#elif __FreeBSD__ +#include //Use thr_self() syscall under FreeBSD to get thread id +#endif + +#endif //unix + +#ifndef __has_feature // Clang - feature checking macros. +#define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + + +namespace spdlog +{ +namespace details +{ +namespace os +{ + +inline spdlog::log_clock::time_point now() +{ + +#if defined __linux__ && defined SPDLOG_CLOCK_COARSE + timespec ts; + ::clock_gettime(CLOCK_REALTIME_COARSE, &ts); + return std::chrono::time_point( + std::chrono::duration_cast( + std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec))); + + +#else + return log_clock::now(); +#endif + +} +inline std::tm localtime(const std::time_t &time_tt) +{ + +#ifdef _WIN32 + std::tm tm; + localtime_s(&tm, &time_tt); +#else + std::tm tm; + localtime_r(&time_tt, &tm); +#endif + return tm; +} + +inline std::tm localtime() +{ + std::time_t now_t = time(nullptr); + return localtime(now_t); +} + + +inline std::tm gmtime(const std::time_t &time_tt) +{ + +#ifdef _WIN32 + std::tm tm; + gmtime_s(&tm, &time_tt); +#else + std::tm tm; + gmtime_r(&time_tt, &tm); +#endif + return tm; +} + +inline std::tm gmtime() +{ + std::time_t now_t = time(nullptr); + return gmtime(now_t); +} +inline bool operator==(const std::tm& tm1, const std::tm& tm2) +{ + return (tm1.tm_sec == tm2.tm_sec && + tm1.tm_min == tm2.tm_min && + tm1.tm_hour == tm2.tm_hour && + tm1.tm_mday == tm2.tm_mday && + tm1.tm_mon == tm2.tm_mon && + tm1.tm_year == tm2.tm_year && + tm1.tm_isdst == tm2.tm_isdst); +} + +inline bool operator!=(const std::tm& tm1, const std::tm& tm2) +{ + return !(tm1 == tm2); +} + +// eol definition +#if !defined (SPDLOG_EOL) +#ifdef _WIN32 +#define SPDLOG_EOL "\r\n" +#else +#define SPDLOG_EOL "\n" +#endif +#endif + +SPDLOG_CONSTEXPR static const char* eol = SPDLOG_EOL; +SPDLOG_CONSTEXPR static int eol_size = sizeof(SPDLOG_EOL) - 1; + + + +// folder separator +#ifdef _WIN32 +SPDLOG_CONSTEXPR static const char folder_sep = '\\'; +#else +SPDLOG_CONSTEXPR static const char folder_sep = '/'; +#endif + + +inline void prevent_child_fd(FILE *f) +{ +#ifdef _WIN32 + auto file_handle = (HANDLE)_get_osfhandle(_fileno(f)); + if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) + throw spdlog_ex("SetHandleInformation failed", errno); +#else + auto fd = fileno(f); + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + throw spdlog_ex("fcntl with FD_CLOEXEC failed", errno); +#endif +} + + +//fopen_s on non windows for writing +inline int fopen_s(FILE** fp, const filename_t& filename, const filename_t& mode) +{ +#ifdef _WIN32 +#ifdef SPDLOG_WCHAR_FILENAMES + *fp = _wfsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); +#else + *fp = _fsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); +#endif +#else //unix + *fp = fopen((filename.c_str()), mode.c_str()); +#endif + +#ifdef SPDLOG_PREVENT_CHILD_FD + if (*fp != nullptr) + prevent_child_fd(*fp); +#endif + return *fp == nullptr; +} + + +inline int remove(const filename_t &filename) +{ +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) + return _wremove(filename.c_str()); +#else + return std::remove(filename.c_str()); +#endif +} + +inline int rename(const filename_t& filename1, const filename_t& filename2) +{ +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) + return _wrename(filename1.c_str(), filename2.c_str()); +#else + return std::rename(filename1.c_str(), filename2.c_str()); +#endif +} + + +//Return if file exists +inline bool file_exists(const filename_t& filename) +{ +#ifdef _WIN32 +#ifdef SPDLOG_WCHAR_FILENAMES + auto attribs = GetFileAttributesW(filename.c_str()); +#else + auto attribs = GetFileAttributesA(filename.c_str()); +#endif + return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY)); +#else //common linux/unix all have the stat system call + struct stat buffer; + return (stat(filename.c_str(), &buffer) == 0); +#endif +} + + + + +//Return file size according to open FILE* object +inline size_t filesize(FILE *f) +{ + if (f == nullptr) + throw spdlog_ex("Failed getting file size. fd is null"); +#if defined ( _WIN32) && !defined(__CYGWIN__) + int fd = _fileno(f); +#if _WIN64 //64 bits + struct _stat64 st; + if (_fstat64(fd, &st) == 0) + return st.st_size; + +#else //windows 32 bits + long ret = _filelength(fd); + if (ret >= 0) + return static_cast(ret); +#endif + +#else // unix + int fd = fileno(f); + //64 bits(but not in osx or cygwin, where fstat64 is deprecated) +#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) + struct stat64 st; + if (fstat64(fd, &st) == 0) + return static_cast(st.st_size); +#else // unix 32 bits or cygwin + struct stat st; + if (fstat(fd, &st) == 0) + return static_cast(st.st_size); +#endif +#endif + throw spdlog_ex("Failed getting file size from fd", errno); +} + + + + +//Return utc offset in minutes or throw spdlog_ex on failure +inline int utc_minutes_offset(const std::tm& tm = details::os::localtime()) +{ + +#ifdef _WIN32 +#if _WIN32_WINNT < _WIN32_WINNT_WS08 + TIME_ZONE_INFORMATION tzinfo; + auto rv = GetTimeZoneInformation(&tzinfo); +#else + DYNAMIC_TIME_ZONE_INFORMATION tzinfo; + auto rv = GetDynamicTimeZoneInformation(&tzinfo); +#endif + if (rv == TIME_ZONE_ID_INVALID) + throw spdlog::spdlog_ex("Failed getting timezone info. ", errno); + + int offset = -tzinfo.Bias; + if (tm.tm_isdst) + offset -= tzinfo.DaylightBias; + else + offset -= tzinfo.StandardBias; + return offset; +#else + +#if defined(sun) || defined(__sun) + // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris + struct helper + { + static long int calculate_gmt_offset(const std::tm & localtm = details::os::localtime(), const std::tm & gmtm = details::os::gmtime()) + { + int local_year = localtm.tm_year + (1900 - 1); + int gmt_year = gmtm.tm_year + (1900 - 1); + + long int days = ( + // difference in day of year + localtm.tm_yday - gmtm.tm_yday + + // + intervening leap days + + ((local_year >> 2) - (gmt_year >> 2)) + - (local_year / 100 - gmt_year / 100) + + ((local_year / 100 >> 2) - (gmt_year / 100 >> 2)) + + // + difference in years * 365 */ + + (long int)(local_year - gmt_year) * 365 + ); + + long int hours = (24 * days) + (localtm.tm_hour - gmtm.tm_hour); + long int mins = (60 * hours) + (localtm.tm_min - gmtm.tm_min); + long int secs = (60 * mins) + (localtm.tm_sec - gmtm.tm_sec); + + return secs; + } + }; + + long int offset_seconds = helper::calculate_gmt_offset(tm); +#else + long int offset_seconds = tm.tm_gmtoff; +#endif + + return static_cast(offset_seconds / 60); +#endif +} + +//Return current thread id as size_t +//It exists because the std::this_thread::get_id() is much slower(especially under VS 2013) +inline size_t _thread_id() +{ +#ifdef _WIN32 + return static_cast(::GetCurrentThreadId()); +#elif __linux__ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21) +# define SYS_gettid __NR_gettid +# endif + return static_cast(syscall(SYS_gettid)); +#elif __FreeBSD__ + long tid; + thr_self(&tid); + return static_cast(tid); +#elif __APPLE__ + uint64_t tid; + pthread_threadid_np(nullptr, &tid); + return static_cast(tid); +#else //Default to standard C++11 (other Unix) + return static_cast(std::hash()(std::this_thread::get_id())); +#endif +} + +//Return current thread id as size_t (from thread local storage) +inline size_t thread_id() +{ +#if defined(SPDLOG_DISABLE_TID_CACHING) || (defined(_MSC_VER) && (_MSC_VER < 1900)) || (defined(__clang__) && !__has_feature(cxx_thread_local)) + return _thread_id(); +#else // cache thread id in tls + static thread_local const size_t tid = _thread_id(); + return tid; +#endif + + +} + + +// wchar support for windows file names (SPDLOG_WCHAR_FILENAMES must be defined) +#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES) +#define SPDLOG_FILENAME_T(s) L ## s +inline std::string filename_to_str(const filename_t& filename) +{ + std::wstring_convert, wchar_t> c; + return c.to_bytes(filename); +} +#else +#define SPDLOG_FILENAME_T(s) s +inline std::string filename_to_str(const filename_t& filename) +{ + return filename; +} +#endif + +inline std::string errno_to_string(char[256], char* res) +{ + return std::string(res); +} + +inline std::string errno_to_string(char buf[256], int res) +{ + if (res == 0) + { + return std::string(buf); + } + else + { + return "Unknown error"; + } +} + +// Return errno string (thread safe) +inline std::string errno_str(int err_num) +{ + char buf[256]; + SPDLOG_CONSTEXPR auto buf_size = sizeof(buf); + +#ifdef _WIN32 + if (strerror_s(buf, buf_size, err_num) == 0) + return std::string(buf); + else + return "Unknown error"; + +#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \ + ((_POSIX_C_SOURCE >= 200112L) && ! defined(_GNU_SOURCE)) // posix version + + if (strerror_r(err_num, buf, buf_size) == 0) + return std::string(buf); + else + return "Unknown error"; + +#else // gnu version (might not use the given buf, so its retval pointer must be used) + auto err = strerror_r(err_num, buf, buf_size); // let compiler choose type + return errno_to_string(buf, err); // use overloading to select correct stringify function +#endif +} + +inline int pid() +{ + +#ifdef _WIN32 + return ::_getpid(); +#else + return static_cast(::getpid()); +#endif + +} + + +// Determine if the terminal supports colors +// Source: https://github.com/agauniyal/rang/ +inline bool is_color_terminal() +{ +#ifdef _WIN32 + return true; +#else + static constexpr const char* Terms[] = + { + "ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", + "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm" + }; + + const char *env_p = std::getenv("TERM"); + if (env_p == nullptr) + { + return false; + } + + static const bool result = std::any_of( + std::begin(Terms), std::end(Terms), [&](const char* term) + { + return std::strstr(env_p, term) != nullptr; + }); + return result; +#endif +} + + +// Detrmine if the terminal attached +// Source: https://github.com/agauniyal/rang/ +inline bool in_terminal(FILE* file) +{ + +#ifdef _WIN32 + return _isatty(_fileno(file)) ? true : false; +#else + return isatty(fileno(file)) ? true : false; +#endif +} +} //os +} //details +} //spdlog diff --git a/version/Core/Public/Logger/spdlog/details/pattern_formatter_impl.h b/version/Core/Public/Logger/spdlog/details/pattern_formatter_impl.h new file mode 100644 index 0000000..a73f5de --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/pattern_formatter_impl.h @@ -0,0 +1,686 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../formatter.h" +#include "../details/log_msg.h" +#include "../details/os.h" +#include "../fmt/fmt.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +class flag_formatter +{ +public: + virtual ~flag_formatter() + {} + virtual void format(details::log_msg& msg, const std::tm& tm_time) = 0; +}; + +/////////////////////////////////////////////////////////////////////// +// name & level pattern appenders +/////////////////////////////////////////////////////////////////////// +namespace +{ +class name_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << *msg.logger_name; + } +}; +} + +// log level appender +class level_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << level::to_str(msg.level); + } +}; + +// short log level appender +class short_level_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << level::to_short_str(msg.level); + } +}; + +/////////////////////////////////////////////////////////////////////// +// Date time pattern appenders +/////////////////////////////////////////////////////////////////////// + +static const char* ampm(const tm& t) +{ + return t.tm_hour >= 12 ? "PM" : "AM"; +} + +static int to12h(const tm& t) +{ + return t.tm_hour > 12 ? t.tm_hour - 12 : t.tm_hour; +} + +//Abbreviated weekday name +static const std::string days[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; +class a_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << days[tm_time.tm_wday]; + } +}; + +//Full weekday name +static const std::string full_days[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; +class A_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << full_days[tm_time.tm_wday]; + } +}; + +//Abbreviated month +static const std::string months[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" }; +class b_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << months[tm_time.tm_mon]; + } +}; + +//Full month name +static const std::string full_months[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; +class B_formatter:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << full_months[tm_time.tm_mon]; + } +}; + + +//write 2 ints separated by sep with padding of 2 +static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, char sep) +{ + w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0'); + return w; +} + +//write 3 ints separated by sep with padding of 2 +static fmt::MemoryWriter& pad_n_join(fmt::MemoryWriter& w, int v1, int v2, int v3, char sep) +{ + w << fmt::pad(v1, 2, '0') << sep << fmt::pad(v2, 2, '0') << sep << fmt::pad(v3, 2, '0'); + return w; +} + + +//Date and time representation (Thu Aug 23 15:35:46 2014) +class c_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << days[tm_time.tm_wday] << ' ' << months[tm_time.tm_mon] << ' ' << tm_time.tm_mday << ' '; + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec, ':') << ' ' << tm_time.tm_year + 1900; + } +}; + + +// year - 2 digit +class C_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_year % 100, 2, '0'); + } +}; + + + +// Short MM/DD/YY date, equivalent to %m/%d/%y 08/23/01 +class D_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_mon + 1, tm_time.tm_mday, tm_time.tm_year % 100, '/'); + } +}; + + +// year - 4 digit +class Y_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << tm_time.tm_year + 1900; + } +}; + +// month 1-12 +class m_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_mon + 1, 2, '0'); + } +}; + +// day of month 1-31 +class d_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_mday, 2, '0'); + } +}; + +// hours in 24 format 0-23 +class H_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_hour, 2, '0'); + } +}; + +// hours in 12 format 1-12 +class I_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(to12h(tm_time), 2, '0'); + } +}; + +// minutes 0-59 +class M_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_min, 2, '0'); + } +}; + +// seconds 0-59 +class S_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << fmt::pad(tm_time.tm_sec, 2, '0'); + } +}; + +// milliseconds +class e_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto millis = std::chrono::duration_cast(duration).count() % 1000; + msg.formatted << fmt::pad(static_cast(millis), 3, '0'); + } +}; + +// microseconds +class f_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto micros = std::chrono::duration_cast(duration).count() % 1000000; + msg.formatted << fmt::pad(static_cast(micros), 6, '0'); + } +}; + +// nanoseconds +class F_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto ns = std::chrono::duration_cast(duration).count() % 1000000000; + msg.formatted << fmt::pad(static_cast(ns), 9, '0'); + } +}; + +class E_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + auto duration = msg.time.time_since_epoch(); + auto seconds = std::chrono::duration_cast(duration).count(); + msg.formatted << seconds; + } +}; + +// AM/PM +class p_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + msg.formatted << ampm(tm_time); + } +}; + + +// 12 hour clock 02:55:02 pm +class r_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, to12h(tm_time), tm_time.tm_min, tm_time.tm_sec, ':') << ' ' << ampm(tm_time); + } +}; + +// 24-hour HH:MM time, equivalent to %H:%M +class R_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, ':'); + } +}; + +// ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S +class T_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { + pad_n_join(msg.formatted, tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec, ':'); + } +}; + +// ISO 8601 offset from UTC in timezone (+-HH:MM) +class z_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + const std::chrono::seconds cache_refresh = std::chrono::seconds(5); + + z_formatter():_last_update(std::chrono::seconds(0)), _offset_minutes(0) + {} + z_formatter(const z_formatter&) = delete; + z_formatter& operator=(const z_formatter&) = delete; + + void format(details::log_msg& msg, const std::tm& tm_time) override + { +#ifdef _WIN32 + int total_minutes = get_cached_offset(msg, tm_time); +#else + // No need to chache under gcc, + // it is very fast (already stored in tm.tm_gmtoff) + int total_minutes = os::utc_minutes_offset(tm_time); +#endif + bool is_negative = total_minutes < 0; + char sign; + if (is_negative) + { + total_minutes = -total_minutes; + sign = '-'; + } + else + { + sign = '+'; + } + + int h = total_minutes / 60; + int m = total_minutes % 60; + msg.formatted << sign; + pad_n_join(msg.formatted, h, m, ':'); + } +private: + log_clock::time_point _last_update; + int _offset_minutes; + std::mutex _mutex; + + int get_cached_offset(const log_msg& msg, const std::tm& tm_time) + { + using namespace std::chrono; + std::lock_guard l(_mutex); + if (msg.time - _last_update >= cache_refresh) + { + _offset_minutes = os::utc_minutes_offset(tm_time); + _last_update = msg.time; + } + return _offset_minutes; + } +}; + + + +// Thread id +class t_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << msg.thread_id; + } +}; + +// Current pid +class pid_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << details::os::pid(); + } +}; + +// message counter formatter +class i_formatter SPDLOG_FINAL :public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << fmt::pad(msg.msg_id, 6, '0'); + } +}; + +class v_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << fmt::StringRef(msg.raw.data(), msg.raw.size()); + } +}; + +class ch_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + explicit ch_formatter(char ch): _ch(ch) + {} + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << _ch; + } +private: + char _ch; +}; + + +//aggregate user chars to display as is +class aggregate_formatter SPDLOG_FINAL:public flag_formatter +{ +public: + aggregate_formatter() + {} + void add_ch(char ch) + { + _str += ch; + } + void format(details::log_msg& msg, const std::tm&) override + { + msg.formatted << _str; + } +private: + std::string _str; +}; + +// Full info formatter +// pattern: [%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v +class full_formatter SPDLOG_FINAL:public flag_formatter +{ + void format(details::log_msg& msg, const std::tm& tm_time) override + { +#ifndef SPDLOG_NO_DATETIME + auto duration = msg.time.time_since_epoch(); + auto millis = std::chrono::duration_cast(duration).count() % 1000; + + /* Slower version(while still very fast - about 3.2 million lines/sec under 10 threads), + msg.formatted.write("[{:d}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}.{:03d}] [{}] [{}] {} ", + tm_time.tm_year + 1900, + tm_time.tm_mon + 1, + tm_time.tm_mday, + tm_time.tm_hour, + tm_time.tm_min, + tm_time.tm_sec, + static_cast(millis), + msg.logger_name, + level::to_str(msg.level), + msg.raw.str());*/ + + + // Faster (albeit uglier) way to format the line (5.6 million lines/sec under 10 threads) + msg.formatted << '[' << static_cast(tm_time.tm_year + 1900) << '-' + << fmt::pad(static_cast(tm_time.tm_mon + 1), 2, '0') << '-' + << fmt::pad(static_cast(tm_time.tm_mday), 2, '0') << ' ' + << fmt::pad(static_cast(tm_time.tm_hour), 2, '0') << ':' + << fmt::pad(static_cast(tm_time.tm_min), 2, '0') << ':' + << fmt::pad(static_cast(tm_time.tm_sec), 2, '0') << '.' + << fmt::pad(static_cast(millis), 3, '0') << "] "; + + //no datetime needed +#else + (void)tm_time; +#endif + +#ifndef SPDLOG_NO_NAME + msg.formatted << '[' << *msg.logger_name << "] "; +#endif + + msg.formatted << '[' << level::to_str(msg.level) << "] "; + msg.formatted << fmt::StringRef(msg.raw.data(), msg.raw.size()); + } +}; + + + +} +} +/////////////////////////////////////////////////////////////////////////////// +// pattern_formatter inline impl +/////////////////////////////////////////////////////////////////////////////// +inline spdlog::pattern_formatter::pattern_formatter(const std::string& pattern, pattern_time_type pattern_time) + : _pattern_time(pattern_time) +{ + compile_pattern(pattern); +} + +inline void spdlog::pattern_formatter::compile_pattern(const std::string& pattern) +{ + auto end = pattern.end(); + std::unique_ptr user_chars; + for (auto it = pattern.begin(); it != end; ++it) + { + if (*it == '%') + { + if (user_chars) //append user chars found so far + _formatters.push_back(std::move(user_chars)); + + if (++it != end) + handle_flag(*it); + else + break; + } + else // chars not following the % sign should be displayed as is + { + if (!user_chars) + user_chars = std::unique_ptr(new details::aggregate_formatter()); + user_chars->add_ch(*it); + } + } + if (user_chars) //append raw chars found so far + { + _formatters.push_back(std::move(user_chars)); + } + +} +inline void spdlog::pattern_formatter::handle_flag(char flag) +{ + switch (flag) + { + // logger name + case 'n': + _formatters.push_back(std::unique_ptr(new details::name_formatter())); + break; + + case 'l': + _formatters.push_back(std::unique_ptr(new details::level_formatter())); + break; + + case 'L': + _formatters.push_back(std::unique_ptr(new details::short_level_formatter())); + break; + + case('t'): + _formatters.push_back(std::unique_ptr(new details::t_formatter())); + break; + + case('v'): + _formatters.push_back(std::unique_ptr(new details::v_formatter())); + break; + + case('a'): + _formatters.push_back(std::unique_ptr(new details::a_formatter())); + break; + + case('A'): + _formatters.push_back(std::unique_ptr(new details::A_formatter())); + break; + + case('b'): + case('h'): + _formatters.push_back(std::unique_ptr(new details::b_formatter())); + break; + + case('B'): + _formatters.push_back(std::unique_ptr(new details::B_formatter())); + break; + case('c'): + _formatters.push_back(std::unique_ptr(new details::c_formatter())); + break; + + case('C'): + _formatters.push_back(std::unique_ptr(new details::C_formatter())); + break; + + case('Y'): + _formatters.push_back(std::unique_ptr(new details::Y_formatter())); + break; + + case('D'): + case('x'): + + _formatters.push_back(std::unique_ptr(new details::D_formatter())); + break; + + case('m'): + _formatters.push_back(std::unique_ptr(new details::m_formatter())); + break; + + case('d'): + _formatters.push_back(std::unique_ptr(new details::d_formatter())); + break; + + case('H'): + _formatters.push_back(std::unique_ptr(new details::H_formatter())); + break; + + case('I'): + _formatters.push_back(std::unique_ptr(new details::I_formatter())); + break; + + case('M'): + _formatters.push_back(std::unique_ptr(new details::M_formatter())); + break; + + case('S'): + _formatters.push_back(std::unique_ptr(new details::S_formatter())); + break; + + case('e'): + _formatters.push_back(std::unique_ptr(new details::e_formatter())); + break; + + case('f'): + _formatters.push_back(std::unique_ptr(new details::f_formatter())); + break; + case('F'): + _formatters.push_back(std::unique_ptr(new details::F_formatter())); + break; + + case('E'): + _formatters.push_back(std::unique_ptr(new details::E_formatter())); + break; + + case('p'): + _formatters.push_back(std::unique_ptr(new details::p_formatter())); + break; + + case('r'): + _formatters.push_back(std::unique_ptr(new details::r_formatter())); + break; + + case('R'): + _formatters.push_back(std::unique_ptr(new details::R_formatter())); + break; + + case('T'): + case('X'): + _formatters.push_back(std::unique_ptr(new details::T_formatter())); + break; + + case('z'): + _formatters.push_back(std::unique_ptr(new details::z_formatter())); + break; + + case ('+'): + _formatters.push_back(std::unique_ptr(new details::full_formatter())); + break; + + case ('P'): + _formatters.push_back(std::unique_ptr(new details::pid_formatter())); + break; + + + case ('i'): + _formatters.push_back(std::unique_ptr(new details::i_formatter())); + break; + + default: //Unknown flag appears as is + _formatters.push_back(std::unique_ptr(new details::ch_formatter('%'))); + _formatters.push_back(std::unique_ptr(new details::ch_formatter(flag))); + break; + } +} + +inline std::tm spdlog::pattern_formatter::get_time(details::log_msg& msg) +{ + if (_pattern_time == pattern_time_type::local) + return details::os::localtime(log_clock::to_time_t(msg.time)); + else + return details::os::gmtime(log_clock::to_time_t(msg.time)); +} + +inline void spdlog::pattern_formatter::format(details::log_msg& msg) +{ + +#ifndef SPDLOG_NO_DATETIME + auto tm_time = get_time(msg); +#else + std::tm tm_time; +#endif + for (auto &f : _formatters) + { + f->format(msg, tm_time); + } + //write eol + msg.formatted.write(details::os::eol, details::os::eol_size); +} diff --git a/version/Core/Public/Logger/spdlog/details/registry.h b/version/Core/Public/Logger/spdlog/details/registry.h new file mode 100644 index 0000000..1064488 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/registry.h @@ -0,0 +1,214 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Loggers registy of unique name->logger pointer +// An attempt to create a logger with an already existing name will be ignored +// If user requests a non existing logger, nullptr will be returned +// This class is thread safe + +#include "../details/null_mutex.h" +#include "../logger.h" +#include "../async_logger.h" +#include "../common.h" + +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +template class registry_t +{ +public: + + void register_logger(std::shared_ptr logger) + { + std::lock_guard lock(_mutex); + auto logger_name = logger->name(); + throw_if_exists(logger_name); + _loggers[logger_name] = logger; + } + + + std::shared_ptr get(const std::string& logger_name) + { + std::lock_guard lock(_mutex); + auto found = _loggers.find(logger_name); + return found == _loggers.end() ? nullptr : found->second; + } + + template + std::shared_ptr create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end) + { + std::lock_guard lock(_mutex); + throw_if_exists(logger_name); + std::shared_ptr new_logger; + if (_async_mode) + new_logger = std::make_shared(logger_name, sinks_begin, sinks_end, _async_q_size, _overflow_policy, _worker_warmup_cb, _flush_interval_ms, _worker_teardown_cb); + else + new_logger = std::make_shared(logger_name, sinks_begin, sinks_end); + + if (_formatter) + new_logger->set_formatter(_formatter); + + if (_err_handler) + new_logger->set_error_handler(_err_handler); + + new_logger->set_level(_level); + + + //Add to registry + _loggers[logger_name] = new_logger; + return new_logger; + } + + template + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, const It& sinks_begin, const It& sinks_end) + { + std::lock_guard lock(_mutex); + throw_if_exists(logger_name); + auto new_logger = std::make_shared(logger_name, sinks_begin, sinks_end, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb); + + if (_formatter) + new_logger->set_formatter(_formatter); + + if (_err_handler) + new_logger->set_error_handler(_err_handler); + + new_logger->set_level(_level); + + //Add to registry + _loggers[logger_name] = new_logger; + return new_logger; + } + + void apply_all(std::function)> fun) + { + std::lock_guard lock(_mutex); + for (auto &l : _loggers) + fun(l.second); + } + + void drop(const std::string& logger_name) + { + std::lock_guard lock(_mutex); + _loggers.erase(logger_name); + } + + void drop_all() + { + std::lock_guard lock(_mutex); + _loggers.clear(); + } + std::shared_ptr create(const std::string& logger_name, sinks_init_list sinks) + { + return create(logger_name, sinks.begin(), sinks.end()); + } + + std::shared_ptr create(const std::string& logger_name, sink_ptr sink) + { + return create(logger_name, { sink }); + } + + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, sinks_init_list sinks) + { + return create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks.begin(), sinks.end()); + } + + std::shared_ptr create_async(const std::string& logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb, sink_ptr sink) + { + return create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, { sink }); + } + + void formatter(formatter_ptr f) + { + std::lock_guard lock(_mutex); + _formatter = f; + for (auto& l : _loggers) + l.second->set_formatter(_formatter); + } + + void set_pattern(const std::string& pattern) + { + std::lock_guard lock(_mutex); + _formatter = std::make_shared(pattern); + for (auto& l : _loggers) + l.second->set_formatter(_formatter); + } + + void set_level(level::level_enum log_level) + { + std::lock_guard lock(_mutex); + for (auto& l : _loggers) + l.second->set_level(log_level); + _level = log_level; + } + + void set_error_handler(log_err_handler handler) + { + for (auto& l : _loggers) + l.second->set_error_handler(handler); + _err_handler = handler; + } + + void set_async_mode(size_t q_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) + { + std::lock_guard lock(_mutex); + _async_mode = true; + _async_q_size = q_size; + _overflow_policy = overflow_policy; + _worker_warmup_cb = worker_warmup_cb; + _flush_interval_ms = flush_interval_ms; + _worker_teardown_cb = worker_teardown_cb; + } + + void set_sync_mode() + { + std::lock_guard lock(_mutex); + _async_mode = false; + } + + static registry_t& instance() + { + static registry_t s_instance; + return s_instance; + } + +private: + registry_t() {} + registry_t(const registry_t&) = delete; + registry_t& operator=(const registry_t&) = delete; + + void throw_if_exists(const std::string &logger_name) + { + if (_loggers.find(logger_name) != _loggers.end()) + throw spdlog_ex("logger with name '" + logger_name + "' already exists"); + } + Mutex _mutex; + std::unordered_map > _loggers; + formatter_ptr _formatter; + level::level_enum _level = level::info; + log_err_handler _err_handler; + bool _async_mode = false; + size_t _async_q_size = 0; + async_overflow_policy _overflow_policy = async_overflow_policy::block_retry; + std::function _worker_warmup_cb = nullptr; + std::chrono::milliseconds _flush_interval_ms; + std::function _worker_teardown_cb = nullptr; +}; +#ifdef SPDLOG_NO_REGISTRY_MUTEX +typedef registry_t registry; +#else +typedef registry_t registry; +#endif +} +} diff --git a/version/Core/Public/Logger/spdlog/details/spdlog_impl.h b/version/Core/Public/Logger/spdlog/details/spdlog_impl.h new file mode 100644 index 0000000..17d4a48 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/details/spdlog_impl.h @@ -0,0 +1,263 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// +// Global registry functions +// +#include "../spdlog.h" +#include "../details/registry.h" +#include "../sinks/file_sinks.h" +#include "../sinks/stdout_sinks.h" +#ifdef SPDLOG_ENABLE_SYSLOG +#include "../sinks/syslog_sink.h" +#endif + +#ifdef _WIN32 +#include "../sinks/wincolor_sink.h" +#else +#include "../sinks/ansicolor_sink.h" +#endif + + +#ifdef __ANDROID__ +#include "../sinks/android_sink.h" +#endif + +#include +#include +#include +#include + +inline void spdlog::register_logger(std::shared_ptr logger) +{ + return details::registry::instance().register_logger(logger); +} + +inline std::shared_ptr spdlog::get(const std::string& name) +{ + return details::registry::instance().get(name); +} + +inline void spdlog::drop(const std::string &name) +{ + details::registry::instance().drop(name); +} + +// Create multi/single threaded simple file logger +inline std::shared_ptr spdlog::basic_logger_mt(const std::string& logger_name, const filename_t& filename, bool truncate) +{ + return create(logger_name, filename, truncate); +} + +inline std::shared_ptr spdlog::basic_logger_st(const std::string& logger_name, const filename_t& filename, bool truncate) +{ + return create(logger_name, filename, truncate); +} + +// Create multi/single threaded rotating file logger +inline std::shared_ptr spdlog::rotating_logger_mt(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files) +{ + return create(logger_name, filename, max_file_size, max_files); +} + +inline std::shared_ptr spdlog::rotating_logger_st(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files) +{ + return create(logger_name, filename, max_file_size, max_files); +} + +// Create file logger which creates new file at midnight): +inline std::shared_ptr spdlog::daily_logger_mt(const std::string& logger_name, const filename_t& filename, int hour, int minute) +{ + return create(logger_name, filename, hour, minute); +} + +inline std::shared_ptr spdlog::daily_logger_st(const std::string& logger_name, const filename_t& filename, int hour, int minute) +{ + return create(logger_name, filename, hour, minute); +} + + +// +// stdout/stderr loggers +// +inline std::shared_ptr spdlog::stdout_logger_mt(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stdout_sink_mt::instance()); +} + +inline std::shared_ptr spdlog::stdout_logger_st(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stdout_sink_st::instance()); +} + +inline std::shared_ptr spdlog::stderr_logger_mt(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stderr_sink_mt::instance()); +} + +inline std::shared_ptr spdlog::stderr_logger_st(const std::string& logger_name) +{ + return spdlog::details::registry::instance().create(logger_name, spdlog::sinks::stderr_sink_st::instance()); +} + +// +// stdout/stderr color loggers +// +#ifdef _WIN32 +inline std::shared_ptr spdlog::stdout_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stdout_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + + +inline std::shared_ptr spdlog::stderr_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +#else //ansi terminal colors + +inline std::shared_ptr spdlog::stdout_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stdout_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_mt(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} + +inline std::shared_ptr spdlog::stderr_color_st(const std::string& logger_name) +{ + auto sink = std::make_shared(); + return spdlog::details::registry::instance().create(logger_name, sink); +} +#endif + +#ifdef SPDLOG_ENABLE_SYSLOG +// Create syslog logger +inline std::shared_ptr spdlog::syslog_logger(const std::string& logger_name, const std::string& syslog_ident, int syslog_option, int syslog_facility) +{ + return create(logger_name, syslog_ident, syslog_option, syslog_facility); +} +#endif + +#ifdef __ANDROID__ +inline std::shared_ptr spdlog::android_logger(const std::string& logger_name, const std::string& tag) +{ + return create(logger_name, tag); +} +#endif + +// Create and register a logger a single sink +inline std::shared_ptr spdlog::create(const std::string& logger_name, const spdlog::sink_ptr& sink) +{ + return details::registry::instance().create(logger_name, sink); +} + +//Create logger with multiple sinks + +inline std::shared_ptr spdlog::create(const std::string& logger_name, spdlog::sinks_init_list sinks) +{ + return details::registry::instance().create(logger_name, sinks); +} + + +template +inline std::shared_ptr spdlog::create(const std::string& logger_name, Args... args) +{ + sink_ptr sink = std::make_shared(args...); + return details::registry::instance().create(logger_name, { sink }); +} + + +template +inline std::shared_ptr spdlog::create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end) +{ + return details::registry::instance().create(logger_name, sinks_begin, sinks_end); +} + +// Create and register an async logger with a single sink +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, const sink_ptr& sink, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sink); +} + +// Create and register an async logger with multiple sinks +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb ) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks); +} + +template +inline std::shared_ptr spdlog::create_async(const std::string& logger_name, const It& sinks_begin, const It& sinks_end, size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + return details::registry::instance().create_async(logger_name, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb, sinks_begin, sinks_end); +} + +inline void spdlog::set_formatter(spdlog::formatter_ptr f) +{ + details::registry::instance().formatter(f); +} + +inline void spdlog::set_pattern(const std::string& format_string) +{ + return details::registry::instance().set_pattern(format_string); +} + +inline void spdlog::set_level(level::level_enum log_level) +{ + return details::registry::instance().set_level(log_level); +} + +inline void spdlog::set_error_handler(log_err_handler handler) +{ + return details::registry::instance().set_error_handler(handler); +} + + +inline void spdlog::set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy, const std::function& worker_warmup_cb, const std::chrono::milliseconds& flush_interval_ms, const std::function& worker_teardown_cb) +{ + details::registry::instance().set_async_mode(queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb); +} + +inline void spdlog::set_sync_mode() +{ + details::registry::instance().set_sync_mode(); +} + +inline void spdlog::apply_all(std::function)> fun) +{ + details::registry::instance().apply_all(fun); +} + +inline void spdlog::drop_all() +{ + details::registry::instance().drop_all(); +} diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/container.h b/version/Core/Public/Logger/spdlog/fmt/bundled/container.h new file mode 100644 index 0000000..cb6303f --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/container.h @@ -0,0 +1,82 @@ +/* + Formatting library for C++ - standard container utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_CONTAINER_H_ +#define FMT_CONTAINER_H_ + +#include "format.h" + +namespace fmt { + +namespace internal { + +/** + \rst + A "buffer" that appends data to a standard container (e.g. typically a + ``std::vector`` or ``std::basic_string``). + \endrst + */ +template +class ContainerBuffer : public Buffer { + private: + Container& container_; + + protected: + virtual void grow(std::size_t size) FMT_OVERRIDE { + container_.resize(size); + this->ptr_ = &container_[0]; + this->capacity_ = size; + } + + public: + explicit ContainerBuffer(Container& container) : container_(container) { + this->size_ = container_.size(); + if (this->size_ > 0) { + this->ptr_ = &container_[0]; + this->capacity_ = this->size_; + } + } +}; +} // namespace internal + +/** + \rst + This class template provides operations for formatting and appending data + to a standard *container* like ``std::vector`` or ``std::basic_string``. + + **Example**:: + + void vecformat(std::vector& dest, fmt::BasicCStringRef format, + fmt::ArgList args) { + fmt::BasicContainerWriter > appender(dest); + appender.write(format, args); + } + FMT_VARIADIC(void, vecformat, std::vector&, + fmt::BasicCStringRef); + \endrst + */ +template +class BasicContainerWriter + : public BasicWriter { + private: + internal::ContainerBuffer buffer_; + + public: + /** + \rst + Constructs a :class:`fmt::BasicContainerWriter` object. + \endrst + */ + explicit BasicContainerWriter(Container& dest) + : BasicWriter(buffer_), buffer_(dest) {} +}; + +} // namespace fmt + +#endif // FMT_CONTAINER_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/format.cc b/version/Core/Public/Logger/spdlog/fmt/bundled/format.cc new file mode 100644 index 0000000..2d236bc --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/format.cc @@ -0,0 +1,495 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "format.h" + +#include + +#include +#include +#include +#include +#include +#include // for std::ptrdiff_t + +#if defined(_WIN32) && defined(__MINGW32__) +# include +#endif + +#if FMT_USE_WINDOWS_H +# if !defined(FMT_HEADER_ONLY) && !defined(WIN32_LEAN_AND_MEAN) +# define WIN32_LEAN_AND_MEAN +# endif +# if defined(NOMINMAX) || defined(FMT_WIN_MINMAX) +# include +# else +# define NOMINMAX +# include +# undef NOMINMAX +# endif +#endif + +#if FMT_EXCEPTIONS +# define FMT_TRY try +# define FMT_CATCH(x) catch (x) +#else +# define FMT_TRY if (true) +# define FMT_CATCH(x) if (false) +#endif + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4702) // unreachable code +// Disable deprecation warning for strerror. The latter is not called but +// MSVC fails to detect it. +# pragma warning(disable: 4996) +#endif + +// Dummy implementations of strerror_r and strerror_s called if corresponding +// system functions are not available. +FMT_MAYBE_UNUSED +static inline fmt::internal::Null<> strerror_r(int, char *, ...) { + return fmt::internal::Null<>(); +} +FMT_MAYBE_UNUSED +static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) { + return fmt::internal::Null<>(); +} + +namespace fmt { + +FMT_FUNC internal::RuntimeError::~RuntimeError() FMT_DTOR_NOEXCEPT {} +FMT_FUNC FormatError::~FormatError() FMT_DTOR_NOEXCEPT {} +FMT_FUNC SystemError::~SystemError() FMT_DTOR_NOEXCEPT {} + +namespace { + +#ifndef _MSC_VER +# define FMT_SNPRINTF snprintf +#else // _MSC_VER +inline int fmt_snprintf(char *buffer, size_t size, const char *format, ...) { + va_list args; + va_start(args, format); + int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args); + va_end(args); + return result; +} +# define FMT_SNPRINTF fmt_snprintf +#endif // _MSC_VER + +#if defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT) +# define FMT_SWPRINTF snwprintf +#else +# define FMT_SWPRINTF swprintf +#endif // defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT) + +const char RESET_COLOR[] = "\x1b[0m"; + +typedef void (*FormatFunc)(Writer &, int, StringRef); + +// Portable thread-safe version of strerror. +// Sets buffer to point to a string describing the error code. +// This can be either a pointer to a string stored in buffer, +// or a pointer to some static immutable string. +// Returns one of the following values: +// 0 - success +// ERANGE - buffer is not large enough to store the error message +// other - failure +// Buffer should be at least of size 1. +int safe_strerror( + int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT { + FMT_ASSERT(buffer != FMT_NULL && buffer_size != 0, "invalid buffer"); + + class StrError { + private: + int error_code_; + char *&buffer_; + std::size_t buffer_size_; + + // A noop assignment operator to avoid bogus warnings. + void operator=(const StrError &) {} + + // Handle the result of XSI-compliant version of strerror_r. + int handle(int result) { + // glibc versions before 2.13 return result in errno. + return result == -1 ? errno : result; + } + + // Handle the result of GNU-specific version of strerror_r. + int handle(char *message) { + // If the buffer is full then the message is probably truncated. + if (message == buffer_ && strlen(buffer_) == buffer_size_ - 1) + return ERANGE; + buffer_ = message; + return 0; + } + + // Handle the case when strerror_r is not available. + int handle(internal::Null<>) { + return fallback(strerror_s(buffer_, buffer_size_, error_code_)); + } + + // Fallback to strerror_s when strerror_r is not available. + int fallback(int result) { + // If the buffer is full then the message is probably truncated. + return result == 0 && strlen(buffer_) == buffer_size_ - 1 ? + ERANGE : result; + } + +#ifdef __c2__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + + // Fallback to strerror if strerror_r and strerror_s are not available. + int fallback(internal::Null<>) { + errno = 0; + buffer_ = strerror(error_code_); + return errno; + } + +#ifdef __c2__ +# pragma clang diagnostic pop +#endif + + public: + StrError(int err_code, char *&buf, std::size_t buf_size) + : error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {} + + int run() { + return handle(strerror_r(error_code_, buffer_, buffer_size_)); + } + }; + return StrError(error_code, buffer, buffer_size).run(); +} + +void format_error_code(Writer &out, int error_code, + StringRef message) FMT_NOEXCEPT { + // Report error code making sure that the output fits into + // INLINE_BUFFER_SIZE to avoid dynamic memory allocation and potential + // bad_alloc. + out.clear(); + static const char SEP[] = ": "; + static const char ERROR_STR[] = "error "; + // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. + std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2; + typedef internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(error_code); + if (internal::is_negative(error_code)) { + abs_value = 0 - abs_value; + ++error_code_size; + } + error_code_size += internal::count_digits(abs_value); + if (message.size() <= internal::INLINE_BUFFER_SIZE - error_code_size) + out << message << SEP; + out << ERROR_STR << error_code; + assert(out.size() <= internal::INLINE_BUFFER_SIZE); +} + +void report_error(FormatFunc func, int error_code, + StringRef message) FMT_NOEXCEPT { + MemoryWriter full_message; + func(full_message, error_code, message); + // Use Writer::data instead of Writer::c_str to avoid potential memory + // allocation. + std::fwrite(full_message.data(), full_message.size(), 1, stderr); + std::fputc('\n', stderr); +} +} // namespace + +FMT_FUNC void SystemError::init( + int err_code, CStringRef format_str, ArgList args) { + error_code_ = err_code; + MemoryWriter w; + format_system_error(w, err_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + +template +int internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, value) : + FMT_SNPRINTF(buffer, size, format, precision, value); + } + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, width, value) : + FMT_SNPRINTF(buffer, size, format, width, precision, value); +} + +template +int internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + FMT_SWPRINTF(buffer, size, format, value) : + FMT_SWPRINTF(buffer, size, format, precision, value); + } + return precision < 0 ? + FMT_SWPRINTF(buffer, size, format, width, value) : + FMT_SWPRINTF(buffer, size, format, width, precision, value); +} + +template +const char internal::BasicData::DIGITS[] = + "0001020304050607080910111213141516171819" + "2021222324252627282930313233343536373839" + "4041424344454647484950515253545556575859" + "6061626364656667686970717273747576777879" + "8081828384858687888990919293949596979899"; + +#define FMT_POWERS_OF_10(factor) \ + factor * 10, \ + factor * 100, \ + factor * 1000, \ + factor * 10000, \ + factor * 100000, \ + factor * 1000000, \ + factor * 10000000, \ + factor * 100000000, \ + factor * 1000000000 + +template +const uint32_t internal::BasicData::POWERS_OF_10_32[] = { + 0, FMT_POWERS_OF_10(1) +}; + +template +const uint64_t internal::BasicData::POWERS_OF_10_64[] = { + 0, + FMT_POWERS_OF_10(1), + FMT_POWERS_OF_10(ULongLong(1000000000)), + // Multiply several constants instead of using a single long long constant + // to avoid warnings about C++98 not supporting long long. + ULongLong(1000000000) * ULongLong(1000000000) * 10 +}; + +FMT_FUNC void internal::report_unknown_type(char code, const char *type) { + (void)type; + if (std::isprint(static_cast(code))) { + FMT_THROW(FormatError( + format("unknown format code '{}' for {}", code, type))); + } + FMT_THROW(FormatError( + format("unknown format code '\\x{:02x}' for {}", + static_cast(code), type))); +} + +#if FMT_USE_WINDOWS_H + +FMT_FUNC internal::UTF8ToUTF16::UTF8ToUTF16(StringRef s) { + static const char ERROR_MSG[] = "cannot convert string from UTF-8 to UTF-16"; + if (s.size() > INT_MAX) + FMT_THROW(WindowsError(ERROR_INVALID_PARAMETER, ERROR_MSG)); + int s_size = static_cast(s.size()); + int length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, FMT_NULL, 0); + if (length == 0) + FMT_THROW(WindowsError(GetLastError(), ERROR_MSG)); + buffer_.resize(length + 1); + length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, &buffer_[0], length); + if (length == 0) + FMT_THROW(WindowsError(GetLastError(), ERROR_MSG)); + buffer_[length] = 0; +} + +FMT_FUNC internal::UTF16ToUTF8::UTF16ToUTF8(WStringRef s) { + if (int error_code = convert(s)) { + FMT_THROW(WindowsError(error_code, + "cannot convert string from UTF-16 to UTF-8")); + } +} + +FMT_FUNC int internal::UTF16ToUTF8::convert(WStringRef s) { + if (s.size() > INT_MAX) + return ERROR_INVALID_PARAMETER; + int s_size = static_cast(s.size()); + int length = WideCharToMultiByte( + CP_UTF8, 0, s.data(), s_size, FMT_NULL, 0, FMT_NULL, FMT_NULL); + if (length == 0) + return GetLastError(); + buffer_.resize(length + 1); + length = WideCharToMultiByte( + CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, FMT_NULL, FMT_NULL); + if (length == 0) + return GetLastError(); + buffer_[length] = 0; + return 0; +} + +FMT_FUNC void WindowsError::init( + int err_code, CStringRef format_str, ArgList args) { + error_code_ = err_code; + MemoryWriter w; + internal::format_windows_error(w, err_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + +FMT_FUNC void internal::format_windows_error( + Writer &out, int error_code, StringRef message) FMT_NOEXCEPT { + FMT_TRY { + MemoryBuffer buffer; + buffer.resize(INLINE_BUFFER_SIZE); + for (;;) { + wchar_t *system_message = &buffer[0]; + int result = FormatMessageW( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + FMT_NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + system_message, static_cast(buffer.size()), FMT_NULL); + if (result != 0) { + UTF16ToUTF8 utf8_message; + if (utf8_message.convert(system_message) == ERROR_SUCCESS) { + out << message << ": " << utf8_message; + return; + } + break; + } + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + break; // Can't get error message, report error code instead. + buffer.resize(buffer.size() * 2); + } + } FMT_CATCH(...) {} + fmt::format_error_code(out, error_code, message); // 'fmt::' is for bcc32. +} + +#endif // FMT_USE_WINDOWS_H + +FMT_FUNC void format_system_error( + Writer &out, int error_code, StringRef message) FMT_NOEXCEPT { + FMT_TRY { + internal::MemoryBuffer buffer; + buffer.resize(internal::INLINE_BUFFER_SIZE); + for (;;) { + char *system_message = &buffer[0]; + int result = safe_strerror(error_code, system_message, buffer.size()); + if (result == 0) { + out << message << ": " << system_message; + return; + } + if (result != ERANGE) + break; // Can't get error message, report error code instead. + buffer.resize(buffer.size() * 2); + } + } FMT_CATCH(...) {} + fmt::format_error_code(out, error_code, message); // 'fmt::' is for bcc32. +} + +template +void internal::FixedBuffer::grow(std::size_t) { + FMT_THROW(std::runtime_error("buffer overflow")); +} + +FMT_FUNC internal::Arg internal::FormatterBase::do_get_arg( + unsigned arg_index, const char *&error) { + internal::Arg arg = args_[arg_index]; + switch (arg.type) { + case internal::Arg::NONE: + error = "argument index out of range"; + break; + case internal::Arg::NAMED_ARG: + arg = *static_cast(arg.pointer); + break; + default: + /*nothing*/; + } + return arg; +} + +FMT_FUNC void report_system_error( + int error_code, fmt::StringRef message) FMT_NOEXCEPT { + // 'fmt::' is for bcc32. + report_error(format_system_error, error_code, message); +} + +#if FMT_USE_WINDOWS_H +FMT_FUNC void report_windows_error( + int error_code, fmt::StringRef message) FMT_NOEXCEPT { + // 'fmt::' is for bcc32. + report_error(internal::format_windows_error, error_code, message); +} +#endif + +FMT_FUNC void print(std::FILE *f, CStringRef format_str, ArgList args) { + MemoryWriter w; + w.write(format_str, args); + std::fwrite(w.data(), 1, w.size(), f); +} + +FMT_FUNC void print(CStringRef format_str, ArgList args) { + print(stdout, format_str, args); +} + +FMT_FUNC void print_colored(Color c, CStringRef format, ArgList args) { + char escape[] = "\x1b[30m"; + escape[3] = static_cast('0' + c); + std::fputs(escape, stdout); + print(format, args); + std::fputs(RESET_COLOR, stdout); +} + +#ifndef FMT_HEADER_ONLY + +template struct internal::BasicData; + +// Explicit instantiations for char. + +template void internal::FixedBuffer::grow(std::size_t); + +template FMT_API int internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, double value); + +template FMT_API int internal::CharTraits::format_float( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, long double value); + +// Explicit instantiations for wchar_t. + +template void internal::FixedBuffer::grow(std::size_t); + +template FMT_API int internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, double value); + +template FMT_API int internal::CharTraits::format_float( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, long double value); + +#endif // FMT_HEADER_ONLY + +} // namespace fmt + +#ifdef _MSC_VER +# pragma warning(pop) +#endif diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/format.h b/version/Core/Public/Logger/spdlog/fmt/bundled/format.h new file mode 100644 index 0000000..561a9e0 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/format.h @@ -0,0 +1,4173 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FMT_FORMAT_H_ +#define FMT_FORMAT_H_ + +#define FMT_INCLUDE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for std::pair +#undef FMT_INCLUDE + +// The fmt library version in the form major * 10000 + minor * 100 + patch. +#define FMT_VERSION 40100 + +#if defined(__has_include) +# define FMT_HAS_INCLUDE(x) __has_include(x) +#else +# define FMT_HAS_INCLUDE(x) 0 +#endif + +#if (FMT_HAS_INCLUDE() && __cplusplus > 201402L) || \ + (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) +# include +# define FMT_HAS_STRING_VIEW 1 +#else +# define FMT_HAS_STRING_VIEW 0 +#endif + +#if defined _SECURE_SCL && _SECURE_SCL +# define FMT_SECURE_SCL _SECURE_SCL +#else +# define FMT_SECURE_SCL 0 +#endif + +#if FMT_SECURE_SCL +# include +#endif + +#ifdef _MSC_VER +# define FMT_MSC_VER _MSC_VER +#else +# define FMT_MSC_VER 0 +#endif + +#if FMT_MSC_VER && FMT_MSC_VER <= 1500 +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; +typedef __int64 intmax_t; +#else +#include +#endif + +#if !defined(FMT_HEADER_ONLY) && defined(_WIN32) +# ifdef FMT_EXPORT +# define FMT_API __declspec(dllexport) +# elif defined(FMT_SHARED) +# define FMT_API __declspec(dllimport) +# endif +#endif +#ifndef FMT_API +# define FMT_API +#endif + +#ifdef __GNUC__ +# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# define FMT_GCC_EXTENSION __extension__ +# if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic push +// Disable the warning about "long long" which is sometimes reported even +// when using __extension__. +# pragma GCC diagnostic ignored "-Wlong-long" +// Disable the warning about declaration shadowing because it affects too +// many valid cases. +# pragma GCC diagnostic ignored "-Wshadow" +// Disable the warning about implicit conversions that may change the sign of +// an integer; silencing it otherwise would require many explicit casts. +# pragma GCC diagnostic ignored "-Wsign-conversion" +# endif +# if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__ +# define FMT_HAS_GXX_CXX11 1 +# endif +#else +# define FMT_GCC_VERSION 0 +# define FMT_GCC_EXTENSION +# define FMT_HAS_GXX_CXX11 0 +#endif + +#if defined(__INTEL_COMPILER) +# define FMT_ICC_VERSION __INTEL_COMPILER +#elif defined(__ICL) +# define FMT_ICC_VERSION __ICL +#endif + +#if defined(__clang__) && !defined(FMT_ICC_VERSION) +# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +# pragma clang diagnostic ignored "-Wpadded" +#endif + +#ifdef __GNUC_LIBSTD__ +# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100 + __GNUC_LIBSTD_MINOR__) +#endif + +#ifdef __has_feature +# define FMT_HAS_FEATURE(x) __has_feature(x) +#else +# define FMT_HAS_FEATURE(x) 0 +#endif + +#ifdef __has_builtin +# define FMT_HAS_BUILTIN(x) __has_builtin(x) +#else +# define FMT_HAS_BUILTIN(x) 0 +#endif + +#ifdef __has_cpp_attribute +# define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define FMT_HAS_CPP_ATTRIBUTE(x) 0 +#endif + +#if FMT_HAS_CPP_ATTRIBUTE(maybe_unused) +# define FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED +// VC++ 1910 support /std: option and that will set _MSVC_LANG macro +// Clang with Microsoft CodeGen doesn't define _MSVC_LANG macro +#elif defined(_MSVC_LANG) && _MSVC_LANG > 201402 && _MSC_VER >= 1910 +# define FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED +#endif + +#ifdef FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED +# define FMT_MAYBE_UNUSED [[maybe_unused]] +// g++/clang++ also support [[gnu::unused]]. However, we don't use it. +#elif defined(__GNUC__) +# define FMT_MAYBE_UNUSED __attribute__((unused)) +#else +# define FMT_MAYBE_UNUSED +#endif + +// Use the compiler's attribute noreturn +#if defined(__MINGW32__) || defined(__MINGW64__) +# define FMT_NORETURN __attribute__((noreturn)) +#elif FMT_HAS_CPP_ATTRIBUTE(noreturn) && __cplusplus >= 201103L +# define FMT_NORETURN [[noreturn]] +#else +# define FMT_NORETURN +#endif + +#ifndef FMT_USE_VARIADIC_TEMPLATES +// Variadic templates are available in GCC since version 4.4 +// (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ +// since version 2013. +# define FMT_USE_VARIADIC_TEMPLATES \ + (FMT_HAS_FEATURE(cxx_variadic_templates) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800) +#endif + +#ifndef FMT_USE_RVALUE_REFERENCES +// Don't use rvalue references when compiling with clang and an old libstdc++ +// as the latter doesn't provide std::move. +# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402 +# define FMT_USE_RVALUE_REFERENCES 0 +# else +# define FMT_USE_RVALUE_REFERENCES \ + (FMT_HAS_FEATURE(cxx_rvalue_references) || \ + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1600) +# endif +#endif + +#if __cplusplus >= 201103L || FMT_MSC_VER >= 1700 +# define FMT_USE_ALLOCATOR_TRAITS 1 +#else +# define FMT_USE_ALLOCATOR_TRAITS 0 +#endif + +// Check if exceptions are disabled. +#if defined(__GNUC__) && !defined(__EXCEPTIONS) +# define FMT_EXCEPTIONS 0 +#endif +#if FMT_MSC_VER && !_HAS_EXCEPTIONS +# define FMT_EXCEPTIONS 0 +#endif +#ifndef FMT_EXCEPTIONS +# define FMT_EXCEPTIONS 1 +#endif + +#ifndef FMT_THROW +# if FMT_EXCEPTIONS +# define FMT_THROW(x) throw x +# else +# define FMT_THROW(x) assert(false) +# endif +#endif + +// Define FMT_USE_NOEXCEPT to make fmt use noexcept (C++11 feature). +#ifndef FMT_USE_NOEXCEPT +# define FMT_USE_NOEXCEPT 0 +#endif + +#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_DETECTED_NOEXCEPT noexcept +#else +# define FMT_DETECTED_NOEXCEPT throw() +#endif + +#ifndef FMT_NOEXCEPT +# if FMT_EXCEPTIONS +# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT +# else +# define FMT_NOEXCEPT +# endif +#endif + +// This is needed because GCC still uses throw() in its headers when exceptions +// are disabled. +#if FMT_GCC_VERSION +# define FMT_DTOR_NOEXCEPT FMT_DETECTED_NOEXCEPT +#else +# define FMT_DTOR_NOEXCEPT FMT_NOEXCEPT +#endif + +#ifndef FMT_OVERRIDE +# if (defined(FMT_USE_OVERRIDE) && FMT_USE_OVERRIDE) || FMT_HAS_FEATURE(cxx_override) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_OVERRIDE override +# else +# define FMT_OVERRIDE +# endif +#endif + +#ifndef FMT_NULL +# if FMT_HAS_FEATURE(cxx_nullptr) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1600 +# define FMT_NULL nullptr +# else +# define FMT_NULL NULL +# endif +#endif + +// A macro to disallow the copy constructor and operator= functions +// This should be used in the private: declarations for a class +#ifndef FMT_USE_DELETED_FUNCTIONS +# define FMT_USE_DELETED_FUNCTIONS 0 +#endif + +#if FMT_USE_DELETED_FUNCTIONS || FMT_HAS_FEATURE(cxx_deleted_functions) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800 +# define FMT_DELETED_OR_UNDEFINED = delete +# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&) = delete; \ + TypeName& operator=(const TypeName&) = delete +#else +# define FMT_DELETED_OR_UNDEFINED +# define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&); \ + TypeName& operator=(const TypeName&) +#endif + +#ifndef FMT_USE_DEFAULTED_FUNCTIONS +# define FMT_USE_DEFAULTED_FUNCTIONS 0 +#endif + +#ifndef FMT_DEFAULTED_COPY_CTOR +# if FMT_USE_DEFAULTED_FUNCTIONS || FMT_HAS_FEATURE(cxx_defaulted_functions) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800 +# define FMT_DEFAULTED_COPY_CTOR(TypeName) \ + TypeName(const TypeName&) = default; +# else +# define FMT_DEFAULTED_COPY_CTOR(TypeName) +# endif +#endif + +#ifndef FMT_USE_USER_DEFINED_LITERALS +// All compilers which support UDLs also support variadic templates. This +// makes the fmt::literals implementation easier. However, an explicit check +// for variadic templates is added here just in case. +// For Intel's compiler both it and the system gcc/msc must support UDLs. +# if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES && \ + (FMT_HAS_FEATURE(cxx_user_literals) || \ + (FMT_GCC_VERSION >= 407 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900) && \ + (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) +# define FMT_USE_USER_DEFINED_LITERALS 1 +# else +# define FMT_USE_USER_DEFINED_LITERALS 0 +# endif +#endif + +#ifndef FMT_USE_EXTERN_TEMPLATES +# define FMT_USE_EXTERN_TEMPLATES \ + (FMT_CLANG_VERSION >= 209 || (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11)) +#endif + +#ifdef FMT_HEADER_ONLY +// If header only do not use extern templates. +# undef FMT_USE_EXTERN_TEMPLATES +# define FMT_USE_EXTERN_TEMPLATES 0 +#endif + +#ifndef FMT_ASSERT +# define FMT_ASSERT(condition, message) assert((condition) && message) +#endif + +// __builtin_clz is broken in clang with Microsoft CodeGen: +// https://github.com/fmtlib/fmt/issues/519 +#ifndef _MSC_VER +# if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz) +# define FMT_BUILTIN_CLZ(n) __builtin_clz(n) +# endif + +# if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll) +# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) +# endif +#endif + +// Some compilers masquerade as both MSVC and GCC-likes or +// otherwise support __builtin_clz and __builtin_clzll, so +// only define FMT_BUILTIN_CLZ using the MSVC intrinsics +// if the clz and clzll builtins are not available. +#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(_MANAGED) +# include // _BitScanReverse, _BitScanReverse64 + +namespace fmt { +namespace internal { +// avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning +# ifndef __clang__ +# pragma intrinsic(_BitScanReverse) +# endif +inline uint32_t clz(uint32_t x) { + unsigned long r = 0; + _BitScanReverse(&r, x); + + assert(x != 0); + // Static analysis complains about using uninitialized data + // "r", but the only way that can happen is if "x" is 0, + // which the callers guarantee to not happen. +# pragma warning(suppress: 6102) + return 31 - r; +} +# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n) + +// avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning +# if defined(_WIN64) && !defined(__clang__) +# pragma intrinsic(_BitScanReverse64) +# endif + +inline uint32_t clzll(uint64_t x) { + unsigned long r = 0; +# ifdef _WIN64 + _BitScanReverse64(&r, x); +# else + // Scan the high 32 bits. + if (_BitScanReverse(&r, static_cast(x >> 32))) + return 63 - (r + 32); + + // Scan the low 32 bits. + _BitScanReverse(&r, static_cast(x)); +# endif + + assert(x != 0); + // Static analysis complains about using uninitialized data + // "r", but the only way that can happen is if "x" is 0, + // which the callers guarantee to not happen. +# pragma warning(suppress: 6102) + return 63 - r; +} +# define FMT_BUILTIN_CLZLL(n) fmt::internal::clzll(n) +} +} +#endif + +namespace fmt { +namespace internal { +struct DummyInt { + int data[2]; + operator int() const { return 0; } +}; +typedef std::numeric_limits FPUtil; + +// Dummy implementations of system functions such as signbit and ecvt called +// if the latter are not available. +inline DummyInt signbit(...) { return DummyInt(); } +inline DummyInt _ecvt_s(...) { return DummyInt(); } +inline DummyInt isinf(...) { return DummyInt(); } +inline DummyInt _finite(...) { return DummyInt(); } +inline DummyInt isnan(...) { return DummyInt(); } +inline DummyInt _isnan(...) { return DummyInt(); } + +// A helper function to suppress bogus "conditional expression is constant" +// warnings. +template +inline T const_check(T value) { return value; } +} +} // namespace fmt + +namespace std { +// Standard permits specialization of std::numeric_limits. This specialization +// is used to resolve ambiguity between isinf and std::isinf in glibc: +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891 +// and the same for isnan and signbit. +template <> +class numeric_limits : + public std::numeric_limits { + public: + // Portable version of isinf. + template + static bool isinfinity(T x) { + using namespace fmt::internal; + // The resolution "priority" is: + // isinf macro > std::isinf > ::isinf > fmt::internal::isinf + if (const_check(sizeof(isinf(x)) == sizeof(bool) || + sizeof(isinf(x)) == sizeof(int))) { + return isinf(x) != 0; + } + return !_finite(static_cast(x)); + } + + // Portable version of isnan. + template + static bool isnotanumber(T x) { + using namespace fmt::internal; + if (const_check(sizeof(isnan(x)) == sizeof(bool) || + sizeof(isnan(x)) == sizeof(int))) { + return isnan(x) != 0; + } + return _isnan(static_cast(x)) != 0; + } + + // Portable version of signbit. + static bool isnegative(double x) { + using namespace fmt::internal; + if (const_check(sizeof(signbit(x)) == sizeof(bool) || + sizeof(signbit(x)) == sizeof(int))) { + return signbit(x) != 0; + } + if (x < 0) return true; + if (!isnotanumber(x)) return false; + int dec = 0, sign = 0; + char buffer[2]; // The buffer size must be >= 2 or _ecvt_s will fail. + _ecvt_s(buffer, sizeof(buffer), x, 0, &dec, &sign); + return sign != 0; + } +}; +} // namespace std + +namespace fmt { + +// Fix the warning about long long on older versions of GCC +// that don't support the diagnostic pragma. +FMT_GCC_EXTENSION typedef long long LongLong; +FMT_GCC_EXTENSION typedef unsigned long long ULongLong; + +#if FMT_USE_RVALUE_REFERENCES +using std::move; +#endif + +template +class BasicWriter; + +typedef BasicWriter Writer; +typedef BasicWriter WWriter; + +template +class ArgFormatter; + +struct FormatSpec; + +template +class BasicPrintfArgFormatter; + +template > +class BasicFormatter; + +/** + \rst + A string reference. It can be constructed from a C string or + ``std::basic_string``. + + You can use one of the following typedefs for common character types: + + +------------+-------------------------+ + | Type | Definition | + +============+=========================+ + | StringRef | BasicStringRef | + +------------+-------------------------+ + | WStringRef | BasicStringRef | + +------------+-------------------------+ + + This class is most useful as a parameter type to allow passing + different types of strings to a function, for example:: + + template + std::string format(StringRef format_str, const Args & ... args); + + format("{}", 42); + format(std::string("{}"), 42); + \endrst + */ +template +class BasicStringRef { + private: + const Char *data_; + std::size_t size_; + + public: + /** Constructs a string reference object from a C string and a size. */ + BasicStringRef(const Char *s, std::size_t size) : data_(s), size_(size) {} + + /** + \rst + Constructs a string reference object from a C string computing + the size with ``std::char_traits::length``. + \endrst + */ + BasicStringRef(const Char *s) + : data_(s), size_(std::char_traits::length(s)) {} + + /** + \rst + Constructs a string reference from a ``std::basic_string`` object. + \endrst + */ + template + BasicStringRef( + const std::basic_string, Allocator> &s) + : data_(s.c_str()), size_(s.size()) {} + +#if FMT_HAS_STRING_VIEW + /** + \rst + Constructs a string reference from a ``std::basic_string_view`` object. + \endrst + */ + BasicStringRef( + const std::basic_string_view> &s) + : data_(s.data()), size_(s.size()) {} + + /** + \rst + Converts a string reference to an ``std::string_view`` object. + \endrst + */ + explicit operator std::basic_string_view() const FMT_NOEXCEPT { + return std::basic_string_view(data_, size_); + } +#endif + + /** + \rst + Converts a string reference to an ``std::string`` object. + \endrst + */ + std::basic_string to_string() const { + return std::basic_string(data_, size_); + } + + /** Returns a pointer to the string data. */ + const Char *data() const { return data_; } + + /** Returns the string size. */ + std::size_t size() const { return size_; } + + // Lexicographically compare this string reference to other. + int compare(BasicStringRef other) const { + std::size_t size = size_ < other.size_ ? size_ : other.size_; + int result = std::char_traits::compare(data_, other.data_, size); + if (result == 0) + result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1); + return result; + } + + friend bool operator==(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) == 0; + } + friend bool operator!=(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) != 0; + } + friend bool operator<(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) < 0; + } + friend bool operator<=(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) <= 0; + } + friend bool operator>(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) > 0; + } + friend bool operator>=(BasicStringRef lhs, BasicStringRef rhs) { + return lhs.compare(rhs) >= 0; + } +}; + +typedef BasicStringRef StringRef; +typedef BasicStringRef WStringRef; + +/** + \rst + A reference to a null terminated string. It can be constructed from a C + string or ``std::basic_string``. + + You can use one of the following typedefs for common character types: + + +-------------+--------------------------+ + | Type | Definition | + +=============+==========================+ + | CStringRef | BasicCStringRef | + +-------------+--------------------------+ + | WCStringRef | BasicCStringRef | + +-------------+--------------------------+ + + This class is most useful as a parameter type to allow passing + different types of strings to a function, for example:: + + template + std::string format(CStringRef format_str, const Args & ... args); + + format("{}", 42); + format(std::string("{}"), 42); + \endrst + */ +template +class BasicCStringRef { + private: + const Char *data_; + + public: + /** Constructs a string reference object from a C string. */ + BasicCStringRef(const Char *s) : data_(s) {} + + /** + \rst + Constructs a string reference from a ``std::basic_string`` object. + \endrst + */ + template + BasicCStringRef( + const std::basic_string, Allocator> &s) + : data_(s.c_str()) {} + + /** Returns the pointer to a C string. */ + const Char *c_str() const { return data_; } +}; + +typedef BasicCStringRef CStringRef; +typedef BasicCStringRef WCStringRef; + +/** A formatting error such as invalid format string. */ +class FormatError : public std::runtime_error { + public: + explicit FormatError(CStringRef message) + : std::runtime_error(message.c_str()) {} + FormatError(const FormatError &ferr) : std::runtime_error(ferr) {} + FMT_API ~FormatError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE; +}; + +namespace internal { + +// MakeUnsigned::Type gives an unsigned type corresponding to integer type T. +template +struct MakeUnsigned { typedef T Type; }; + +#define FMT_SPECIALIZE_MAKE_UNSIGNED(T, U) \ + template <> \ + struct MakeUnsigned { typedef U Type; } + +FMT_SPECIALIZE_MAKE_UNSIGNED(char, unsigned char); +FMT_SPECIALIZE_MAKE_UNSIGNED(signed char, unsigned char); +FMT_SPECIALIZE_MAKE_UNSIGNED(short, unsigned short); +FMT_SPECIALIZE_MAKE_UNSIGNED(int, unsigned); +FMT_SPECIALIZE_MAKE_UNSIGNED(long, unsigned long); +FMT_SPECIALIZE_MAKE_UNSIGNED(LongLong, ULongLong); + +// Casts nonnegative integer to unsigned. +template +inline typename MakeUnsigned::Type to_unsigned(Int value) { + FMT_ASSERT(value >= 0, "negative value"); + return static_cast::Type>(value); +} + +// The number of characters to store in the MemoryBuffer object itself +// to avoid dynamic memory allocation. +enum { INLINE_BUFFER_SIZE = 500 }; + +#if FMT_SECURE_SCL +// Use checked iterator to avoid warnings on MSVC. +template +inline stdext::checked_array_iterator make_ptr(T *ptr, std::size_t size) { + return stdext::checked_array_iterator(ptr, size); +} +#else +template +inline T *make_ptr(T *ptr, std::size_t) { return ptr; } +#endif +} // namespace internal + +/** + \rst + A buffer supporting a subset of ``std::vector``'s operations. + \endrst + */ +template +class Buffer { + private: + FMT_DISALLOW_COPY_AND_ASSIGN(Buffer); + + protected: + T *ptr_; + std::size_t size_; + std::size_t capacity_; + + Buffer(T *ptr = FMT_NULL, std::size_t capacity = 0) + : ptr_(ptr), size_(0), capacity_(capacity) {} + + /** + \rst + Increases the buffer capacity to hold at least *size* elements updating + ``ptr_`` and ``capacity_``. + \endrst + */ + virtual void grow(std::size_t size) = 0; + + public: + virtual ~Buffer() {} + + /** Returns the size of this buffer. */ + std::size_t size() const { return size_; } + + /** Returns the capacity of this buffer. */ + std::size_t capacity() const { return capacity_; } + + /** + Resizes the buffer. If T is a POD type new elements may not be initialized. + */ + void resize(std::size_t new_size) { + if (new_size > capacity_) + grow(new_size); + size_ = new_size; + } + + /** + \rst + Reserves space to store at least *capacity* elements. + \endrst + */ + void reserve(std::size_t capacity) { + if (capacity > capacity_) + grow(capacity); + } + + void clear() FMT_NOEXCEPT { size_ = 0; } + + void push_back(const T &value) { + if (size_ == capacity_) + grow(size_ + 1); + ptr_[size_++] = value; + } + + /** Appends data to the end of the buffer. */ + template + void append(const U *begin, const U *end); + + T &operator[](std::size_t index) { return ptr_[index]; } + const T &operator[](std::size_t index) const { return ptr_[index]; } +}; + +template +template +void Buffer::append(const U *begin, const U *end) { + FMT_ASSERT(end >= begin, "negative value"); + std::size_t new_size = size_ + static_cast(end - begin); + if (new_size > capacity_) + grow(new_size); + std::uninitialized_copy(begin, end, + internal::make_ptr(ptr_, capacity_) + size_); + size_ = new_size; +} + +namespace internal { + +// A memory buffer for trivially copyable/constructible types with the first +// SIZE elements stored in the object itself. +template > +class MemoryBuffer : private Allocator, public Buffer { + private: + T data_[SIZE]; + + // Deallocate memory allocated by the buffer. + void deallocate() { + if (this->ptr_ != data_) Allocator::deallocate(this->ptr_, this->capacity_); + } + + protected: + void grow(std::size_t size) FMT_OVERRIDE; + + public: + explicit MemoryBuffer(const Allocator &alloc = Allocator()) + : Allocator(alloc), Buffer(data_, SIZE) {} + ~MemoryBuffer() FMT_OVERRIDE { deallocate(); } + +#if FMT_USE_RVALUE_REFERENCES + private: + // Move data from other to this buffer. + void move(MemoryBuffer &other) { + Allocator &this_alloc = *this, &other_alloc = other; + this_alloc = std::move(other_alloc); + this->size_ = other.size_; + this->capacity_ = other.capacity_; + if (other.ptr_ == other.data_) { + this->ptr_ = data_; + std::uninitialized_copy(other.data_, other.data_ + this->size_, + make_ptr(data_, this->capacity_)); + } else { + this->ptr_ = other.ptr_; + // Set pointer to the inline array so that delete is not called + // when deallocating. + other.ptr_ = other.data_; + } + } + + public: + MemoryBuffer(MemoryBuffer &&other) { + move(other); + } + + MemoryBuffer &operator=(MemoryBuffer &&other) { + assert(this != &other); + deallocate(); + move(other); + return *this; + } +#endif + + // Returns a copy of the allocator associated with this buffer. + Allocator get_allocator() const { return *this; } +}; + +template +void MemoryBuffer::grow(std::size_t size) { + std::size_t new_capacity = this->capacity_ + this->capacity_ / 2; + if (size > new_capacity) + new_capacity = size; +#if FMT_USE_ALLOCATOR_TRAITS + T *new_ptr = + std::allocator_traits::allocate(*this, new_capacity, FMT_NULL); +#else + T *new_ptr = this->allocate(new_capacity, FMT_NULL); +#endif + // The following code doesn't throw, so the raw pointer above doesn't leak. + std::uninitialized_copy(this->ptr_, this->ptr_ + this->size_, + make_ptr(new_ptr, new_capacity)); + std::size_t old_capacity = this->capacity_; + T *old_ptr = this->ptr_; + this->capacity_ = new_capacity; + this->ptr_ = new_ptr; + // deallocate may throw (at least in principle), but it doesn't matter since + // the buffer already uses the new storage and will deallocate it in case + // of exception. + if (old_ptr != data_) + Allocator::deallocate(old_ptr, old_capacity); +} + +// A fixed-size buffer. +template +class FixedBuffer : public fmt::Buffer { + public: + FixedBuffer(Char *array, std::size_t size) : fmt::Buffer(array, size) {} + + protected: + FMT_API void grow(std::size_t size) FMT_OVERRIDE; +}; + +template +class BasicCharTraits { + public: +#if FMT_SECURE_SCL + typedef stdext::checked_array_iterator CharPtr; +#else + typedef Char *CharPtr; +#endif + static Char cast(int value) { return static_cast(value); } +}; + +template +class CharTraits; + +template <> +class CharTraits : public BasicCharTraits { + private: + // Conversion from wchar_t to char is not allowed. + static char convert(wchar_t); + + public: + static char convert(char value) { return value; } + + // Formats a floating-point number. + template + FMT_API static int format_float(char *buffer, std::size_t size, + const char *format, unsigned width, int precision, T value); +}; + +#if FMT_USE_EXTERN_TEMPLATES +extern template int CharTraits::format_float + (char *buffer, std::size_t size, + const char* format, unsigned width, int precision, double value); +extern template int CharTraits::format_float + (char *buffer, std::size_t size, + const char* format, unsigned width, int precision, long double value); +#endif + +template <> +class CharTraits : public BasicCharTraits { + public: + static wchar_t convert(char value) { return value; } + static wchar_t convert(wchar_t value) { return value; } + + template + FMT_API static int format_float(wchar_t *buffer, std::size_t size, + const wchar_t *format, unsigned width, int precision, T value); +}; + +#if FMT_USE_EXTERN_TEMPLATES +extern template int CharTraits::format_float + (wchar_t *buffer, std::size_t size, + const wchar_t* format, unsigned width, int precision, double value); +extern template int CharTraits::format_float + (wchar_t *buffer, std::size_t size, + const wchar_t* format, unsigned width, int precision, long double value); +#endif + +// Checks if a number is negative - used to avoid warnings. +template +struct SignChecker { + template + static bool is_negative(T value) { return value < 0; } +}; + +template <> +struct SignChecker { + template + static bool is_negative(T) { return false; } +}; + +// Returns true if value is negative, false otherwise. +// Same as (value < 0) but doesn't produce warnings if T is an unsigned type. +template +inline bool is_negative(T value) { + return SignChecker::is_signed>::is_negative(value); +} + +// Selects uint32_t if FitsIn32Bits is true, uint64_t otherwise. +template +struct TypeSelector { typedef uint32_t Type; }; + +template <> +struct TypeSelector { typedef uint64_t Type; }; + +template +struct IntTraits { + // Smallest of uint32_t and uint64_t that is large enough to represent + // all values of T. + typedef typename + TypeSelector::digits <= 32>::Type MainType; +}; + +FMT_API FMT_NORETURN void report_unknown_type(char code, const char *type); + +// Static data is placed in this class template to allow header-only +// configuration. +template +struct FMT_API BasicData { + static const uint32_t POWERS_OF_10_32[]; + static const uint64_t POWERS_OF_10_64[]; + static const char DIGITS[]; +}; + +#if FMT_USE_EXTERN_TEMPLATES +extern template struct BasicData; +#endif + +typedef BasicData<> Data; + +#ifdef FMT_BUILTIN_CLZLL +// Returns the number of decimal digits in n. Leading zeros are not counted +// except for n == 0 in which case count_digits returns 1. +inline unsigned count_digits(uint64_t n) { + // Based on http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10 + // and the benchmark https://github.com/localvoid/cxx-benchmark-count-digits. + int t = (64 - FMT_BUILTIN_CLZLL(n | 1)) * 1233 >> 12; + return to_unsigned(t) - (n < Data::POWERS_OF_10_64[t]) + 1; +} +#else +// Fallback version of count_digits used when __builtin_clz is not available. +inline unsigned count_digits(uint64_t n) { + unsigned count = 1; + for (;;) { + // Integer division is slow so do it for a group of four digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + if (n < 10) return count; + if (n < 100) return count + 1; + if (n < 1000) return count + 2; + if (n < 10000) return count + 3; + n /= 10000u; + count += 4; + } +} +#endif + +#ifdef FMT_BUILTIN_CLZ +// Optional version of count_digits for better performance on 32-bit platforms. +inline unsigned count_digits(uint32_t n) { + int t = (32 - FMT_BUILTIN_CLZ(n | 1)) * 1233 >> 12; + return to_unsigned(t) - (n < Data::POWERS_OF_10_32[t]) + 1; +} +#endif + +// A functor that doesn't add a thousands separator. +struct NoThousandsSep { + template + void operator()(Char *) {} +}; + +// A functor that adds a thousands separator. +class ThousandsSep { + private: + fmt::StringRef sep_; + + // Index of a decimal digit with the least significant digit having index 0. + unsigned digit_index_; + + public: + explicit ThousandsSep(fmt::StringRef sep) : sep_(sep), digit_index_(0) {} + + template + void operator()(Char *&buffer) { + if (++digit_index_ % 3 != 0) + return; + buffer -= sep_.size(); + std::uninitialized_copy(sep_.data(), sep_.data() + sep_.size(), + internal::make_ptr(buffer, sep_.size())); + } +}; + +// Formats a decimal unsigned integer value writing into buffer. +// thousands_sep is a functor that is called after writing each char to +// add a thousands separator if necessary. +template +inline void format_decimal(Char *buffer, UInt value, unsigned num_digits, + ThousandsSep thousands_sep) { + buffer += num_digits; + while (value >= 100) { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = static_cast((value % 100) * 2); + value /= 100; + *--buffer = Data::DIGITS[index + 1]; + thousands_sep(buffer); + *--buffer = Data::DIGITS[index]; + thousands_sep(buffer); + } + if (value < 10) { + *--buffer = static_cast('0' + value); + return; + } + unsigned index = static_cast(value * 2); + *--buffer = Data::DIGITS[index + 1]; + thousands_sep(buffer); + *--buffer = Data::DIGITS[index]; +} + +template +inline void format_decimal(Char *buffer, UInt value, unsigned num_digits) { + format_decimal(buffer, value, num_digits, NoThousandsSep()); + return; +} + +#ifndef _WIN32 +# define FMT_USE_WINDOWS_H 0 +#elif !defined(FMT_USE_WINDOWS_H) +# define FMT_USE_WINDOWS_H 1 +#endif + +// Define FMT_USE_WINDOWS_H to 0 to disable use of windows.h. +// All the functionality that relies on it will be disabled too. +#if FMT_USE_WINDOWS_H +// A converter from UTF-8 to UTF-16. +// It is only provided for Windows since other systems support UTF-8 natively. +class UTF8ToUTF16 { + private: + MemoryBuffer buffer_; + + public: + FMT_API explicit UTF8ToUTF16(StringRef s); + operator WStringRef() const { return WStringRef(&buffer_[0], size()); } + size_t size() const { return buffer_.size() - 1; } + const wchar_t *c_str() const { return &buffer_[0]; } + std::wstring str() const { return std::wstring(&buffer_[0], size()); } +}; + +// A converter from UTF-16 to UTF-8. +// It is only provided for Windows since other systems support UTF-8 natively. +class UTF16ToUTF8 { + private: + MemoryBuffer buffer_; + + public: + UTF16ToUTF8() {} + FMT_API explicit UTF16ToUTF8(WStringRef s); + operator StringRef() const { return StringRef(&buffer_[0], size()); } + size_t size() const { return buffer_.size() - 1; } + const char *c_str() const { return &buffer_[0]; } + std::string str() const { return std::string(&buffer_[0], size()); } + + // Performs conversion returning a system error code instead of + // throwing exception on conversion error. This method may still throw + // in case of memory allocation error. + FMT_API int convert(WStringRef s); +}; + +FMT_API void format_windows_error(fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT; +#endif + +// A formatting argument value. +struct Value { + template + struct StringValue { + const Char *value; + std::size_t size; + }; + + typedef void (*FormatFunc)( + void *formatter, const void *arg, void *format_str_ptr); + + struct CustomValue { + const void *value; + FormatFunc format; + }; + + union { + int int_value; + unsigned uint_value; + LongLong long_long_value; + ULongLong ulong_long_value; + double double_value; + long double long_double_value; + const void *pointer; + StringValue string; + StringValue sstring; + StringValue ustring; + StringValue wstring; + CustomValue custom; + }; + + enum Type { + NONE, NAMED_ARG, + // Integer types should go first, + INT, UINT, LONG_LONG, ULONG_LONG, BOOL, CHAR, LAST_INTEGER_TYPE = CHAR, + // followed by floating-point types. + DOUBLE, LONG_DOUBLE, LAST_NUMERIC_TYPE = LONG_DOUBLE, + CSTRING, STRING, WSTRING, POINTER, CUSTOM + }; +}; + +// A formatting argument. It is a trivially copyable/constructible type to +// allow storage in internal::MemoryBuffer. +struct Arg : Value { + Type type; +}; + +template +struct NamedArg; +template +struct NamedArgWithType; + +template +struct Null {}; + +// A helper class template to enable or disable overloads taking wide +// characters and strings in MakeValue. +template +struct WCharHelper { + typedef Null Supported; + typedef T Unsupported; +}; + +template +struct WCharHelper { + typedef T Supported; + typedef Null Unsupported; +}; + +typedef char Yes[1]; +typedef char No[2]; + +template +T &get(); + +// These are non-members to workaround an overload resolution bug in bcc32. +Yes &convert(fmt::ULongLong); +No &convert(...); + +template +struct ConvertToIntImpl { + enum { value = ENABLE_CONVERSION }; +}; + +template +struct ConvertToIntImpl2 { + enum { value = false }; +}; + +template +struct ConvertToIntImpl2 { + enum { + // Don't convert numeric types. + value = ConvertToIntImpl::is_specialized>::value + }; +}; + +template +struct ConvertToInt { + enum { + enable_conversion = sizeof(fmt::internal::convert(get())) == sizeof(Yes) + }; + enum { value = ConvertToIntImpl2::value }; +}; + +#define FMT_DISABLE_CONVERSION_TO_INT(Type) \ + template <> \ + struct ConvertToInt { enum { value = 0 }; } + +// Silence warnings about convering float to int. +FMT_DISABLE_CONVERSION_TO_INT(float); +FMT_DISABLE_CONVERSION_TO_INT(double); +FMT_DISABLE_CONVERSION_TO_INT(long double); + +template +struct EnableIf {}; + +template +struct EnableIf { typedef T type; }; + +template +struct Conditional { typedef T type; }; + +template +struct Conditional { typedef F type; }; + +// For bcc32 which doesn't understand ! in template arguments. +template +struct Not { enum { value = 0 }; }; + +template <> +struct Not { enum { value = 1 }; }; + +template +struct FalseType { enum { value = 0 }; }; + +template struct LConvCheck { + LConvCheck(int) {} +}; + +// Returns the thousands separator for the current locale. +// We check if ``lconv`` contains ``thousands_sep`` because on Android +// ``lconv`` is stubbed as an empty struct. +template +inline StringRef thousands_sep( + LConv *lc, LConvCheck = 0) { + return lc->thousands_sep; +} + +inline fmt::StringRef thousands_sep(...) { return ""; } + +#define FMT_CONCAT(a, b) a##b + +#if FMT_GCC_VERSION >= 303 +# define FMT_UNUSED __attribute__((unused)) +#else +# define FMT_UNUSED +#endif + +#ifndef FMT_USE_STATIC_ASSERT +# define FMT_USE_STATIC_ASSERT 0 +#endif + +#if FMT_USE_STATIC_ASSERT || FMT_HAS_FEATURE(cxx_static_assert) || \ + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1600 +# define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message) +#else +# define FMT_CONCAT_(a, b) FMT_CONCAT(a, b) +# define FMT_STATIC_ASSERT(cond, message) \ + typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1 : -1] FMT_UNUSED +#endif + +template +void format_arg(Formatter&, ...) { + FMT_STATIC_ASSERT(FalseType::value, + "Cannot format argument. To enable the use of ostream " + "operator<< include fmt/ostream.h. Otherwise provide " + "an overload of format_arg."); +} + +// Makes an Arg object from any type. +template +class MakeValue : public Arg { + public: + typedef typename Formatter::Char Char; + + private: + // The following two methods are private to disallow formatting of + // arbitrary pointers. If you want to output a pointer cast it to + // "void *" or "const void *". In particular, this forbids formatting + // of "[const] volatile char *" which is printed as bool by iostreams. + // Do not implement! + template + MakeValue(const T *value); + template + MakeValue(T *value); + + // The following methods are private to disallow formatting of wide + // characters and strings into narrow strings as in + // fmt::format("{}", L"test"); + // To fix this, use a wide format string: fmt::format(L"{}", L"test"). +#if !FMT_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED) + MakeValue(typename WCharHelper::Unsupported); +#endif + MakeValue(typename WCharHelper::Unsupported); + MakeValue(typename WCharHelper::Unsupported); + MakeValue(typename WCharHelper::Unsupported); +#if FMT_HAS_STRING_VIEW + MakeValue(typename WCharHelper::Unsupported); +#endif + MakeValue(typename WCharHelper::Unsupported); + + void set_string(StringRef str) { + string.value = str.data(); + string.size = str.size(); + } + + void set_string(WStringRef str) { + wstring.value = str.data(); + wstring.size = str.size(); + } + + // Formats an argument of a custom type, such as a user-defined class. + template + static void format_custom_arg( + void *formatter, const void *arg, void *format_str_ptr) { + format_arg(*static_cast(formatter), + *static_cast(format_str_ptr), + *static_cast(arg)); + } + + public: + MakeValue() {} + +#define FMT_MAKE_VALUE_(Type, field, TYPE, rhs) \ + MakeValue(Type value) { field = rhs; } \ + static uint64_t type(Type) { return Arg::TYPE; } + +#define FMT_MAKE_VALUE(Type, field, TYPE) \ + FMT_MAKE_VALUE_(Type, field, TYPE, value) + + FMT_MAKE_VALUE(bool, int_value, BOOL) + FMT_MAKE_VALUE(short, int_value, INT) + FMT_MAKE_VALUE(unsigned short, uint_value, UINT) + FMT_MAKE_VALUE(int, int_value, INT) + FMT_MAKE_VALUE(unsigned, uint_value, UINT) + + MakeValue(long value) { + // To minimize the number of types we need to deal with, long is + // translated either to int or to long long depending on its size. + if (const_check(sizeof(long) == sizeof(int))) + int_value = static_cast(value); + else + long_long_value = value; + } + static uint64_t type(long) { + return sizeof(long) == sizeof(int) ? Arg::INT : Arg::LONG_LONG; + } + + MakeValue(unsigned long value) { + if (const_check(sizeof(unsigned long) == sizeof(unsigned))) + uint_value = static_cast(value); + else + ulong_long_value = value; + } + static uint64_t type(unsigned long) { + return sizeof(unsigned long) == sizeof(unsigned) ? + Arg::UINT : Arg::ULONG_LONG; + } + + FMT_MAKE_VALUE(LongLong, long_long_value, LONG_LONG) + FMT_MAKE_VALUE(ULongLong, ulong_long_value, ULONG_LONG) + FMT_MAKE_VALUE(float, double_value, DOUBLE) + FMT_MAKE_VALUE(double, double_value, DOUBLE) + FMT_MAKE_VALUE(long double, long_double_value, LONG_DOUBLE) + FMT_MAKE_VALUE(signed char, int_value, INT) + FMT_MAKE_VALUE(unsigned char, uint_value, UINT) + FMT_MAKE_VALUE(char, int_value, CHAR) + +#if __cplusplus >= 201103L + template < + typename T, + typename = typename std::enable_if< + std::is_enum::value && ConvertToInt::value>::type> + MakeValue(T value) { int_value = value; } + + template < + typename T, + typename = typename std::enable_if< + std::is_enum::value && ConvertToInt::value>::type> + static uint64_t type(T) { return Arg::INT; } +#endif + +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) + MakeValue(typename WCharHelper::Supported value) { + int_value = value; + } + static uint64_t type(wchar_t) { return Arg::CHAR; } +#endif + +#define FMT_MAKE_STR_VALUE(Type, TYPE) \ + MakeValue(Type value) { set_string(value); } \ + static uint64_t type(Type) { return Arg::TYPE; } + + FMT_MAKE_VALUE(char *, string.value, CSTRING) + FMT_MAKE_VALUE(const char *, string.value, CSTRING) + FMT_MAKE_VALUE(signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(const signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(unsigned char *, ustring.value, CSTRING) + FMT_MAKE_VALUE(const unsigned char *, ustring.value, CSTRING) + FMT_MAKE_STR_VALUE(const std::string &, STRING) +#if FMT_HAS_STRING_VIEW + FMT_MAKE_STR_VALUE(const std::string_view &, STRING) +#endif + FMT_MAKE_STR_VALUE(StringRef, STRING) + FMT_MAKE_VALUE_(CStringRef, string.value, CSTRING, value.c_str()) + +#define FMT_MAKE_WSTR_VALUE(Type, TYPE) \ + MakeValue(typename WCharHelper::Supported value) { \ + set_string(value); \ + } \ + static uint64_t type(Type) { return Arg::TYPE; } + + FMT_MAKE_WSTR_VALUE(wchar_t *, WSTRING) + FMT_MAKE_WSTR_VALUE(const wchar_t *, WSTRING) + FMT_MAKE_WSTR_VALUE(const std::wstring &, WSTRING) +#if FMT_HAS_STRING_VIEW + FMT_MAKE_WSTR_VALUE(const std::wstring_view &, WSTRING) +#endif + FMT_MAKE_WSTR_VALUE(WStringRef, WSTRING) + + FMT_MAKE_VALUE(void *, pointer, POINTER) + FMT_MAKE_VALUE(const void *, pointer, POINTER) + + template + MakeValue(const T &value, + typename EnableIf::value>::value, int>::type = 0) { + custom.value = &value; + custom.format = &format_custom_arg; + } + + template + static typename EnableIf::value>::value, uint64_t>::type + type(const T &) { + return Arg::CUSTOM; + } + + // Additional template param `Char_` is needed here because make_type always + // uses char. + template + MakeValue(const NamedArg &value) { pointer = &value; } + template + MakeValue(const NamedArgWithType &value) { pointer = &value; } + + template + static uint64_t type(const NamedArg &) { return Arg::NAMED_ARG; } + template + static uint64_t type(const NamedArgWithType &) { return Arg::NAMED_ARG; } +}; + +template +class MakeArg : public Arg { +public: + MakeArg() { + type = Arg::NONE; + } + + template + MakeArg(const T &value) + : Arg(MakeValue(value)) { + type = static_cast(MakeValue::type(value)); + } +}; + +template +struct NamedArg : Arg { + BasicStringRef name; + + template + NamedArg(BasicStringRef argname, const T &value) + : Arg(MakeArg< BasicFormatter >(value)), name(argname) {} +}; + +template +struct NamedArgWithType : NamedArg { + NamedArgWithType(BasicStringRef argname, const T &value) + : NamedArg(argname, value) {} +}; + +class RuntimeError : public std::runtime_error { + protected: + RuntimeError() : std::runtime_error("") {} + RuntimeError(const RuntimeError &rerr) : std::runtime_error(rerr) {} + FMT_API ~RuntimeError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE; +}; + +template +class ArgMap; +} // namespace internal + +/** An argument list. */ +class ArgList { + private: + // To reduce compiled code size per formatting function call, types of first + // MAX_PACKED_ARGS arguments are passed in the types_ field. + uint64_t types_; + union { + // If the number of arguments is less than MAX_PACKED_ARGS, the argument + // values are stored in values_, otherwise they are stored in args_. + // This is done to reduce compiled code size as storing larger objects + // may require more code (at least on x86-64) even if the same amount of + // data is actually copied to stack. It saves ~10% on the bloat test. + const internal::Value *values_; + const internal::Arg *args_; + }; + + internal::Arg::Type type(unsigned index) const { + return type(types_, index); + } + + template + friend class internal::ArgMap; + + public: + // Maximum number of arguments with packed types. + enum { MAX_PACKED_ARGS = 16 }; + + ArgList() : types_(0) {} + + ArgList(ULongLong types, const internal::Value *values) + : types_(types), values_(values) {} + ArgList(ULongLong types, const internal::Arg *args) + : types_(types), args_(args) {} + + uint64_t types() const { return types_; } + + /** Returns the argument at specified index. */ + internal::Arg operator[](unsigned index) const { + using internal::Arg; + Arg arg; + bool use_values = type(MAX_PACKED_ARGS - 1) == Arg::NONE; + if (index < MAX_PACKED_ARGS) { + Arg::Type arg_type = type(index); + internal::Value &val = arg; + if (arg_type != Arg::NONE) + val = use_values ? values_[index] : args_[index]; + arg.type = arg_type; + return arg; + } + if (use_values) { + // The index is greater than the number of arguments that can be stored + // in values, so return a "none" argument. + arg.type = Arg::NONE; + return arg; + } + for (unsigned i = MAX_PACKED_ARGS; i <= index; ++i) { + if (args_[i].type == Arg::NONE) + return args_[i]; + } + return args_[index]; + } + + static internal::Arg::Type type(uint64_t types, unsigned index) { + unsigned shift = index * 4; + uint64_t mask = 0xf; + return static_cast( + (types & (mask << shift)) >> shift); + } +}; + +#define FMT_DISPATCH(call) static_cast(this)->call + +/** + \rst + An argument visitor based on the `curiously recurring template pattern + `_. + + To use `~fmt::ArgVisitor` define a subclass that implements some or all of the + visit methods with the same signatures as the methods in `~fmt::ArgVisitor`, + for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. Then calling + `~fmt::ArgVisitor::visit` for some argument will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::ArgVisitor` will be called. + + **Example**:: + + class MyArgVisitor : public fmt::ArgVisitor { + public: + void visit_int(int value) { fmt::print("{}", value); } + void visit_double(double value) { fmt::print("{}", value ); } + }; + \endrst + */ +template +class ArgVisitor { + private: + typedef internal::Arg Arg; + + public: + void report_unhandled_arg() {} + + Result visit_unhandled_arg() { + FMT_DISPATCH(report_unhandled_arg()); + return Result(); + } + + /** Visits an ``int`` argument. **/ + Result visit_int(int value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``long long`` argument. **/ + Result visit_long_long(LongLong value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an ``unsigned`` argument. **/ + Result visit_uint(unsigned value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an ``unsigned long long`` argument. **/ + Result visit_ulong_long(ULongLong value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``bool`` argument. **/ + Result visit_bool(bool value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits a ``char`` or ``wchar_t`` argument. **/ + Result visit_char(int value) { + return FMT_DISPATCH(visit_any_int(value)); + } + + /** Visits an argument of any integral type. **/ + template + Result visit_any_int(T) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a ``double`` argument. **/ + Result visit_double(double value) { + return FMT_DISPATCH(visit_any_double(value)); + } + + /** Visits a ``long double`` argument. **/ + Result visit_long_double(long double value) { + return FMT_DISPATCH(visit_any_double(value)); + } + + /** Visits a ``double`` or ``long double`` argument. **/ + template + Result visit_any_double(T) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a null-terminated C string (``const char *``) argument. **/ + Result visit_cstring(const char *) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a string argument. **/ + Result visit_string(Arg::StringValue) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a wide string argument. **/ + Result visit_wstring(Arg::StringValue) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits a pointer argument. **/ + Result visit_pointer(const void *) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** Visits an argument of a custom (user-defined) type. **/ + Result visit_custom(Arg::CustomValue) { + return FMT_DISPATCH(visit_unhandled_arg()); + } + + /** + \rst + Visits an argument dispatching to the appropriate visit method based on + the argument type. For example, if the argument type is ``double`` then + the `~fmt::ArgVisitor::visit_double()` method of the *Impl* class will be + called. + \endrst + */ + Result visit(const Arg &arg) { + switch (arg.type) { + case Arg::NONE: + case Arg::NAMED_ARG: + FMT_ASSERT(false, "invalid argument type"); + break; + case Arg::INT: + return FMT_DISPATCH(visit_int(arg.int_value)); + case Arg::UINT: + return FMT_DISPATCH(visit_uint(arg.uint_value)); + case Arg::LONG_LONG: + return FMT_DISPATCH(visit_long_long(arg.long_long_value)); + case Arg::ULONG_LONG: + return FMT_DISPATCH(visit_ulong_long(arg.ulong_long_value)); + case Arg::BOOL: + return FMT_DISPATCH(visit_bool(arg.int_value != 0)); + case Arg::CHAR: + return FMT_DISPATCH(visit_char(arg.int_value)); + case Arg::DOUBLE: + return FMT_DISPATCH(visit_double(arg.double_value)); + case Arg::LONG_DOUBLE: + return FMT_DISPATCH(visit_long_double(arg.long_double_value)); + case Arg::CSTRING: + return FMT_DISPATCH(visit_cstring(arg.string.value)); + case Arg::STRING: + return FMT_DISPATCH(visit_string(arg.string)); + case Arg::WSTRING: + return FMT_DISPATCH(visit_wstring(arg.wstring)); + case Arg::POINTER: + return FMT_DISPATCH(visit_pointer(arg.pointer)); + case Arg::CUSTOM: + return FMT_DISPATCH(visit_custom(arg.custom)); + } + return Result(); + } +}; + +enum Alignment { + ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC +}; + +// Flags. +enum { + SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8, + CHAR_FLAG = 0x10 // Argument has char type - used in error reporting. +}; + +// An empty format specifier. +struct EmptySpec {}; + +// A type specifier. +template +struct TypeSpec : EmptySpec { + Alignment align() const { return ALIGN_DEFAULT; } + unsigned width() const { return 0; } + int precision() const { return -1; } + bool flag(unsigned) const { return false; } + char type() const { return TYPE; } + char type_prefix() const { return TYPE; } + char fill() const { return ' '; } +}; + +// A width specifier. +struct WidthSpec { + unsigned width_; + // Fill is always wchar_t and cast to char if necessary to avoid having + // two specialization of WidthSpec and its subclasses. + wchar_t fill_; + + WidthSpec(unsigned width, wchar_t fill) : width_(width), fill_(fill) {} + + unsigned width() const { return width_; } + wchar_t fill() const { return fill_; } +}; + +// An alignment specifier. +struct AlignSpec : WidthSpec { + Alignment align_; + + AlignSpec(unsigned width, wchar_t fill, Alignment align = ALIGN_DEFAULT) + : WidthSpec(width, fill), align_(align) {} + + Alignment align() const { return align_; } + + int precision() const { return -1; } +}; + +// An alignment and type specifier. +template +struct AlignTypeSpec : AlignSpec { + AlignTypeSpec(unsigned width, wchar_t fill) : AlignSpec(width, fill) {} + + bool flag(unsigned) const { return false; } + char type() const { return TYPE; } + char type_prefix() const { return TYPE; } +}; + +// A full format specifier. +struct FormatSpec : AlignSpec { + unsigned flags_; + int precision_; + char type_; + + FormatSpec( + unsigned width = 0, char type = 0, wchar_t fill = ' ') + : AlignSpec(width, fill), flags_(0), precision_(-1), type_(type) {} + + bool flag(unsigned f) const { return (flags_ & f) != 0; } + int precision() const { return precision_; } + char type() const { return type_; } + char type_prefix() const { return type_; } +}; + +// An integer format specifier. +template , typename Char = char> +class IntFormatSpec : public SpecT { + private: + T value_; + + public: + IntFormatSpec(T val, const SpecT &spec = SpecT()) + : SpecT(spec), value_(val) {} + + T value() const { return value_; } +}; + +// A string format specifier. +template +class StrFormatSpec : public AlignSpec { + private: + const Char *str_; + + public: + template + StrFormatSpec(const Char *str, unsigned width, FillChar fill) + : AlignSpec(width, fill), str_(str) { + internal::CharTraits::convert(FillChar()); + } + + const Char *str() const { return str_; } +}; + +/** + Returns an integer format specifier to format the value in base 2. + */ +IntFormatSpec > bin(int value); + +/** + Returns an integer format specifier to format the value in base 8. + */ +IntFormatSpec > oct(int value); + +/** + Returns an integer format specifier to format the value in base 16 using + lower-case letters for the digits above 9. + */ +IntFormatSpec > hex(int value); + +/** + Returns an integer formatter format specifier to format in base 16 using + upper-case letters for the digits above 9. + */ +IntFormatSpec > hexu(int value); + +/** + \rst + Returns an integer format specifier to pad the formatted argument with the + fill character to the specified width using the default (right) numeric + alignment. + + **Example**:: + + MemoryWriter out; + out << pad(hex(0xcafe), 8, '0'); + // out.str() == "0000cafe" + + \endrst + */ +template +IntFormatSpec, Char> pad( + int value, unsigned width, Char fill = ' '); + +#define FMT_DEFINE_INT_FORMATTERS(TYPE) \ +inline IntFormatSpec > bin(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'b'>()); \ +} \ + \ +inline IntFormatSpec > oct(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'o'>()); \ +} \ + \ +inline IntFormatSpec > hex(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'x'>()); \ +} \ + \ +inline IntFormatSpec > hexu(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'X'>()); \ +} \ + \ +template \ +inline IntFormatSpec > pad( \ + IntFormatSpec > f, unsigned width) { \ + return IntFormatSpec >( \ + f.value(), AlignTypeSpec(width, ' ')); \ +} \ + \ +/* For compatibility with older compilers we provide two overloads for pad, */ \ +/* one that takes a fill character and one that doesn't. In the future this */ \ +/* can be replaced with one overload making the template argument Char */ \ +/* default to char (C++11). */ \ +template \ +inline IntFormatSpec, Char> pad( \ + IntFormatSpec, Char> f, \ + unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + f.value(), AlignTypeSpec(width, fill)); \ +} \ + \ +inline IntFormatSpec > pad( \ + TYPE value, unsigned width) { \ + return IntFormatSpec >( \ + value, AlignTypeSpec<0>(width, ' ')); \ +} \ + \ +template \ +inline IntFormatSpec, Char> pad( \ + TYPE value, unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + value, AlignTypeSpec<0>(width, fill)); \ +} + +FMT_DEFINE_INT_FORMATTERS(int) +FMT_DEFINE_INT_FORMATTERS(long) +FMT_DEFINE_INT_FORMATTERS(unsigned) +FMT_DEFINE_INT_FORMATTERS(unsigned long) +FMT_DEFINE_INT_FORMATTERS(LongLong) +FMT_DEFINE_INT_FORMATTERS(ULongLong) + +/** + \rst + Returns a string formatter that pads the formatted argument with the fill + character to the specified width using the default (left) string alignment. + + **Example**:: + + std::string s = str(MemoryWriter() << pad("abc", 8)); + // s == "abc " + + \endrst + */ +template +inline StrFormatSpec pad( + const Char *str, unsigned width, Char fill = ' ') { + return StrFormatSpec(str, width, fill); +} + +inline StrFormatSpec pad( + const wchar_t *str, unsigned width, char fill = ' ') { + return StrFormatSpec(str, width, fill); +} + +namespace internal { + +template +class ArgMap { + private: + typedef std::vector< + std::pair, internal::Arg> > MapType; + typedef typename MapType::value_type Pair; + + MapType map_; + + public: + void init(const ArgList &args); + + const internal::Arg *find(const fmt::BasicStringRef &name) const { + // The list is unsorted, so just return the first matching name. + for (typename MapType::const_iterator it = map_.begin(), end = map_.end(); + it != end; ++it) { + if (it->first == name) + return &it->second; + } + return FMT_NULL; + } +}; + +template +void ArgMap::init(const ArgList &args) { + if (!map_.empty()) + return; + typedef internal::NamedArg NamedArg; + const NamedArg *named_arg = FMT_NULL; + bool use_values = + args.type(ArgList::MAX_PACKED_ARGS - 1) == internal::Arg::NONE; + if (use_values) { + for (unsigned i = 0;/*nothing*/; ++i) { + internal::Arg::Type arg_type = args.type(i); + switch (arg_type) { + case internal::Arg::NONE: + return; + case internal::Arg::NAMED_ARG: + named_arg = static_cast(args.values_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + break; + default: + /*nothing*/; + } + } + return; + } + for (unsigned i = 0; i != ArgList::MAX_PACKED_ARGS; ++i) { + internal::Arg::Type arg_type = args.type(i); + if (arg_type == internal::Arg::NAMED_ARG) { + named_arg = static_cast(args.args_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + } + } + for (unsigned i = ArgList::MAX_PACKED_ARGS;/*nothing*/; ++i) { + switch (args.args_[i].type) { + case internal::Arg::NONE: + return; + case internal::Arg::NAMED_ARG: + named_arg = static_cast(args.args_[i].pointer); + map_.push_back(Pair(named_arg->name, *named_arg)); + break; + default: + /*nothing*/; + } + } +} + +template +class ArgFormatterBase : public ArgVisitor { + private: + BasicWriter &writer_; + Spec &spec_; + + FMT_DISALLOW_COPY_AND_ASSIGN(ArgFormatterBase); + + void write_pointer(const void *p) { + spec_.flags_ = HASH_FLAG; + spec_.type_ = 'x'; + writer_.write_int(reinterpret_cast(p), spec_); + } + + // workaround MSVC two-phase lookup issue + typedef internal::Arg Arg; + + protected: + BasicWriter &writer() { return writer_; } + Spec &spec() { return spec_; } + + void write(bool value) { + const char *str_value = value ? "true" : "false"; + Arg::StringValue str = { str_value, std::strlen(str_value) }; + writer_.write_str(str, spec_); + } + + void write(const char *value) { + Arg::StringValue str = {value, value ? std::strlen(value) : 0}; + writer_.write_str(str, spec_); + } + + public: + typedef Spec SpecType; + + ArgFormatterBase(BasicWriter &w, Spec &s) + : writer_(w), spec_(s) {} + + template + void visit_any_int(T value) { writer_.write_int(value, spec_); } + + template + void visit_any_double(T value) { writer_.write_double(value, spec_); } + + void visit_bool(bool value) { + if (spec_.type_) { + visit_any_int(value); + return; + } + write(value); + } + + void visit_char(int value) { + if (spec_.type_ && spec_.type_ != 'c') { + spec_.flags_ |= CHAR_FLAG; + writer_.write_int(value, spec_); + return; + } + if (spec_.align_ == ALIGN_NUMERIC || spec_.flags_ != 0) + FMT_THROW(FormatError("invalid format specifier for char")); + typedef typename BasicWriter::CharPtr CharPtr; + Char fill = internal::CharTraits::cast(spec_.fill()); + CharPtr out = CharPtr(); + const unsigned CHAR_SIZE = 1; + if (spec_.width_ > CHAR_SIZE) { + out = writer_.grow_buffer(spec_.width_); + if (spec_.align_ == ALIGN_RIGHT) { + std::uninitialized_fill_n(out, spec_.width_ - CHAR_SIZE, fill); + out += spec_.width_ - CHAR_SIZE; + } else if (spec_.align_ == ALIGN_CENTER) { + out = writer_.fill_padding(out, spec_.width_, + internal::const_check(CHAR_SIZE), fill); + } else { + std::uninitialized_fill_n(out + CHAR_SIZE, + spec_.width_ - CHAR_SIZE, fill); + } + } else { + out = writer_.grow_buffer(CHAR_SIZE); + } + *out = internal::CharTraits::cast(value); + } + + void visit_cstring(const char *value) { + if (spec_.type_ == 'p') + return write_pointer(value); + write(value); + } + + // Qualification with "internal" here and below is a workaround for nvcc. + void visit_string(internal::Arg::StringValue value) { + writer_.write_str(value, spec_); + } + + using ArgVisitor::visit_wstring; + + void visit_wstring(internal::Arg::StringValue value) { + writer_.write_str(value, spec_); + } + + void visit_pointer(const void *value) { + if (spec_.type_ && spec_.type_ != 'p') + report_unknown_type(spec_.type_, "pointer"); + write_pointer(value); + } +}; + +class FormatterBase { + private: + ArgList args_; + int next_arg_index_; + + // Returns the argument with specified index. + FMT_API Arg do_get_arg(unsigned arg_index, const char *&error); + + protected: + const ArgList &args() const { return args_; } + + explicit FormatterBase(const ArgList &args) { + args_ = args; + next_arg_index_ = 0; + } + + // Returns the next argument. + Arg next_arg(const char *&error) { + if (next_arg_index_ >= 0) + return do_get_arg(internal::to_unsigned(next_arg_index_++), error); + error = "cannot switch from manual to automatic argument indexing"; + return Arg(); + } + + // Checks if manual indexing is used and returns the argument with + // specified index. + Arg get_arg(unsigned arg_index, const char *&error) { + return check_no_auto_index(error) ? do_get_arg(arg_index, error) : Arg(); + } + + bool check_no_auto_index(const char *&error) { + if (next_arg_index_ > 0) { + error = "cannot switch from automatic to manual argument indexing"; + return false; + } + next_arg_index_ = -1; + return true; + } + + template + void write(BasicWriter &w, const Char *start, const Char *end) { + if (start != end) + w << BasicStringRef(start, internal::to_unsigned(end - start)); + } +}; +} // namespace internal + +/** + \rst + An argument formatter based on the `curiously recurring template pattern + `_. + + To use `~fmt::BasicArgFormatter` define a subclass that implements some or + all of the visit methods with the same signatures as the methods in + `~fmt::ArgVisitor`, for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. When a formatting + function processes an argument, it will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::BasicArgFormatter` or its superclass + will be called. + \endrst + */ +template +class BasicArgFormatter : public internal::ArgFormatterBase { + private: + BasicFormatter &formatter_; + const Char *format_; + + public: + /** + \rst + Constructs an argument formatter object. + *formatter* is a reference to the main formatter object, *spec* contains + format specifier information for standard argument types, and *fmt* points + to the part of the format string being parsed for custom argument types. + \endrst + */ + BasicArgFormatter(BasicFormatter &formatter, + Spec &spec, const Char *fmt) + : internal::ArgFormatterBase(formatter.writer(), spec), + formatter_(formatter), format_(fmt) {} + + /** Formats an argument of a custom (user-defined) type. */ + void visit_custom(internal::Arg::CustomValue c) { + c.format(&formatter_, c.value, &format_); + } +}; + +/** The default argument formatter. */ +template +class ArgFormatter : + public BasicArgFormatter, Char, FormatSpec> { + public: + /** Constructs an argument formatter object. */ + ArgFormatter(BasicFormatter &formatter, + FormatSpec &spec, const Char *fmt) + : BasicArgFormatter, + Char, FormatSpec>(formatter, spec, fmt) {} +}; + +/** This template formats data and writes the output to a writer. */ +template +class BasicFormatter : private internal::FormatterBase { + public: + /** The character type for the output. */ + typedef CharType Char; + + private: + BasicWriter &writer_; + internal::ArgMap map_; + + FMT_DISALLOW_COPY_AND_ASSIGN(BasicFormatter); + + using internal::FormatterBase::get_arg; + + // Checks if manual indexing is used and returns the argument with + // specified name. + internal::Arg get_arg(BasicStringRef arg_name, const char *&error); + + // Parses argument index and returns corresponding argument. + internal::Arg parse_arg_index(const Char *&s); + + // Parses argument name and returns corresponding argument. + internal::Arg parse_arg_name(const Char *&s); + + public: + /** + \rst + Constructs a ``BasicFormatter`` object. References to the arguments and + the writer are stored in the formatter object so make sure they have + appropriate lifetimes. + \endrst + */ + BasicFormatter(const ArgList &args, BasicWriter &w) + : internal::FormatterBase(args), writer_(w) {} + + /** Returns a reference to the writer associated with this formatter. */ + BasicWriter &writer() { return writer_; } + + /** Formats stored arguments and writes the output to the writer. */ + void format(BasicCStringRef format_str); + + // Formats a single argument and advances format_str, a format string pointer. + const Char *format(const Char *&format_str, const internal::Arg &arg); +}; + +// Generates a comma-separated list with results of applying f to +// numbers 0..n-1. +# define FMT_GEN(n, f) FMT_GEN##n(f) +# define FMT_GEN1(f) f(0) +# define FMT_GEN2(f) FMT_GEN1(f), f(1) +# define FMT_GEN3(f) FMT_GEN2(f), f(2) +# define FMT_GEN4(f) FMT_GEN3(f), f(3) +# define FMT_GEN5(f) FMT_GEN4(f), f(4) +# define FMT_GEN6(f) FMT_GEN5(f), f(5) +# define FMT_GEN7(f) FMT_GEN6(f), f(6) +# define FMT_GEN8(f) FMT_GEN7(f), f(7) +# define FMT_GEN9(f) FMT_GEN8(f), f(8) +# define FMT_GEN10(f) FMT_GEN9(f), f(9) +# define FMT_GEN11(f) FMT_GEN10(f), f(10) +# define FMT_GEN12(f) FMT_GEN11(f), f(11) +# define FMT_GEN13(f) FMT_GEN12(f), f(12) +# define FMT_GEN14(f) FMT_GEN13(f), f(13) +# define FMT_GEN15(f) FMT_GEN14(f), f(14) + +namespace internal { +inline uint64_t make_type() { return 0; } + +template +inline uint64_t make_type(const T &arg) { + return MakeValue< BasicFormatter >::type(arg); +} + +template +struct ArgArray; + +template +struct ArgArray { + // '+' is used to silence GCC -Wduplicated-branches warning. + typedef Value Type[N > 0 ? N : +1]; + + template + static Value make(const T &value) { +#ifdef __clang__ + Value result = MakeValue(value); + // Workaround a bug in Apple LLVM version 4.2 (clang-425.0.28) of clang: + // https://github.com/fmtlib/fmt/issues/276 + (void)result.custom.format; + return result; +#else + return MakeValue(value); +#endif + } +}; + +template +struct ArgArray { + typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE + + template + static Arg make(const T &value) { return MakeArg(value); } +}; + +#if FMT_USE_VARIADIC_TEMPLATES +template +inline uint64_t make_type(const Arg &first, const Args & ... tail) { + return make_type(first) | (make_type(tail...) << 4); +} + +#else + +struct ArgType { + uint64_t type; + + ArgType() : type(0) {} + + template + ArgType(const T &arg) : type(make_type(arg)) {} +}; + +# define FMT_ARG_TYPE_DEFAULT(n) ArgType t##n = ArgType() + +inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { + return t0.type | (t1.type << 4) | (t2.type << 8) | (t3.type << 12) | + (t4.type << 16) | (t5.type << 20) | (t6.type << 24) | (t7.type << 28) | + (t8.type << 32) | (t9.type << 36) | (t10.type << 40) | (t11.type << 44) | + (t12.type << 48) | (t13.type << 52) | (t14.type << 56); +} +#endif +} // namespace internal + +# define FMT_MAKE_TEMPLATE_ARG(n) typename T##n +# define FMT_MAKE_ARG_TYPE(n) T##n +# define FMT_MAKE_ARG(n) const T##n &v##n +# define FMT_ASSIGN_char(n) \ + arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) +# define FMT_ASSIGN_wchar_t(n) \ + arr[n] = fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) + +#if FMT_USE_VARIADIC_TEMPLATES +// Defines a variadic function returning void. +# define FMT_VARIADIC_VOID(func, arg_type) \ + template \ + void func(arg_type arg0, const Args & ... args) { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + func(arg0, fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } + +// Defines a variadic constructor. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + template \ + ctor(arg0_type arg0, arg1_type arg1, const Args & ... args) { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + func(arg0, arg1, fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } + +#else + +# define FMT_MAKE_REF(n) \ + fmt::internal::MakeValue< fmt::BasicFormatter >(v##n) +# define FMT_MAKE_REF2(n) v##n + +// Defines a wrapper for a function taking one argument of type arg_type +// and n additional arguments of arbitrary types. +# define FMT_WRAP1(func, arg_type, n) \ + template \ + inline void func(arg_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgArray::Type array = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func(arg1, fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array)); \ + } + +// Emulates a variadic function returning void on a pre-C++11 compiler. +# define FMT_VARIADIC_VOID(func, arg_type) \ + inline void func(arg_type arg) { func(arg, fmt::ArgList()); } \ + FMT_WRAP1(func, arg_type, 1) FMT_WRAP1(func, arg_type, 2) \ + FMT_WRAP1(func, arg_type, 3) FMT_WRAP1(func, arg_type, 4) \ + FMT_WRAP1(func, arg_type, 5) FMT_WRAP1(func, arg_type, 6) \ + FMT_WRAP1(func, arg_type, 7) FMT_WRAP1(func, arg_type, 8) \ + FMT_WRAP1(func, arg_type, 9) FMT_WRAP1(func, arg_type, 10) + +# define FMT_CTOR(ctor, func, arg0_type, arg1_type, n) \ + template \ + ctor(arg0_type arg0, arg1_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgArray::Type array = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func(arg0, arg1, fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), array)); \ + } + +// Emulates a variadic constructor on a pre-C++11 compiler. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 1) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 2) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 3) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 4) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 5) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 6) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 7) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 8) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 9) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 10) +#endif + +// Generates a comma-separated list with results of applying f to pairs +// (argument, index). +#define FMT_FOR_EACH1(f, x0) f(x0, 0) +#define FMT_FOR_EACH2(f, x0, x1) \ + FMT_FOR_EACH1(f, x0), f(x1, 1) +#define FMT_FOR_EACH3(f, x0, x1, x2) \ + FMT_FOR_EACH2(f, x0 ,x1), f(x2, 2) +#define FMT_FOR_EACH4(f, x0, x1, x2, x3) \ + FMT_FOR_EACH3(f, x0, x1, x2), f(x3, 3) +#define FMT_FOR_EACH5(f, x0, x1, x2, x3, x4) \ + FMT_FOR_EACH4(f, x0, x1, x2, x3), f(x4, 4) +#define FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5) \ + FMT_FOR_EACH5(f, x0, x1, x2, x3, x4), f(x5, 5) +#define FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6) \ + FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5), f(x6, 6) +#define FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7) \ + FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6), f(x7, 7) +#define FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8) \ + FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7), f(x8, 8) +#define FMT_FOR_EACH10(f, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ + FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8), f(x9, 9) + +/** + An error returned by an operating system or a language runtime, + for example a file opening error. +*/ +class SystemError : public internal::RuntimeError { + private: + FMT_API void init(int err_code, CStringRef format_str, ArgList args); + + protected: + int error_code_; + + typedef char Char; // For FMT_VARIADIC_CTOR. + + SystemError() {} + + public: + /** + \rst + Constructs a :class:`fmt::SystemError` object with a description + formatted with `fmt::format_system_error`. *message* and additional + arguments passed into the constructor are formatted similarly to + `fmt::format`. + + **Example**:: + + // This throws a SystemError with the description + // cannot open file 'madeup': No such file or directory + // or similar (system message may vary). + const char *filename = "madeup"; + std::FILE *file = std::fopen(filename, "r"); + if (!file) + throw fmt::SystemError(errno, "cannot open file '{}'", filename); + \endrst + */ + SystemError(int error_code, CStringRef message) { + init(error_code, message, ArgList()); + } + FMT_DEFAULTED_COPY_CTOR(SystemError) + FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef) + + FMT_API ~SystemError() FMT_DTOR_NOEXCEPT FMT_OVERRIDE; + + int error_code() const { return error_code_; } +}; + +/** + \rst + Formats an error returned by an operating system or a language runtime, + for example a file opening error, and writes it to *out* in the following + form: + + .. parsed-literal:: + **: ** + + where ** is the passed message and ** is + the system message corresponding to the error code. + *error_code* is a system error code as given by ``errno``. + If *error_code* is not a valid error code such as -1, the system message + may look like "Unknown error -1" and is platform-dependent. + \endrst + */ +FMT_API void format_system_error(fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT; + +/** + \rst + This template provides operations for formatting and writing data into + a character stream. The output is stored in a buffer provided by a subclass + such as :class:`fmt::BasicMemoryWriter`. + + You can use one of the following typedefs for common character types: + + +---------+----------------------+ + | Type | Definition | + +=========+======================+ + | Writer | BasicWriter | + +---------+----------------------+ + | WWriter | BasicWriter | + +---------+----------------------+ + + \endrst + */ +template +class BasicWriter { + private: + // Output buffer. + Buffer &buffer_; + + FMT_DISALLOW_COPY_AND_ASSIGN(BasicWriter); + + typedef typename internal::CharTraits::CharPtr CharPtr; + +#if FMT_SECURE_SCL + // Returns pointer value. + static Char *get(CharPtr p) { return p.base(); } +#else + static Char *get(Char *p) { return p; } +#endif + + // Fills the padding around the content and returns the pointer to the + // content area. + static CharPtr fill_padding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill); + + // Grows the buffer by n characters and returns a pointer to the newly + // allocated area. + CharPtr grow_buffer(std::size_t n) { + std::size_t size = buffer_.size(); + buffer_.resize(size + n); + return internal::make_ptr(&buffer_[size], n); + } + + // Writes an unsigned decimal integer. + template + Char *write_unsigned_decimal(UInt value, unsigned prefix_size = 0) { + unsigned num_digits = internal::count_digits(value); + Char *ptr = get(grow_buffer(prefix_size + num_digits)); + internal::format_decimal(ptr + prefix_size, value, num_digits); + return ptr; + } + + // Writes a decimal integer. + template + void write_decimal(Int value) { + typedef typename internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(value); + if (internal::is_negative(value)) { + abs_value = 0 - abs_value; + *write_unsigned_decimal(abs_value, 1) = '-'; + } else { + write_unsigned_decimal(abs_value, 0); + } + } + + // Prepare a buffer for integer formatting. + CharPtr prepare_int_buffer(unsigned num_digits, + const EmptySpec &, const char *prefix, unsigned prefix_size) { + unsigned size = prefix_size + num_digits; + CharPtr p = grow_buffer(size); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + return p + size - 1; + } + + template + CharPtr prepare_int_buffer(unsigned num_digits, + const Spec &spec, const char *prefix, unsigned prefix_size); + + // Formats an integer. + template + void write_int(T value, Spec spec); + + // Formats a floating-point number (double or long double). + template + void write_double(T value, const Spec &spec); + + // Writes a formatted string. + template + CharPtr write_str(const StrChar *s, std::size_t size, const AlignSpec &spec); + + template + void write_str(const internal::Arg::StringValue &str, + const Spec &spec); + + // This following methods are private to disallow writing wide characters + // and strings to a char stream. If you want to print a wide string as a + // pointer as std::ostream does, cast it to const void*. + // Do not implement! + void operator<<(typename internal::WCharHelper::Unsupported); + void operator<<( + typename internal::WCharHelper::Unsupported); + + // Appends floating-point length specifier to the format string. + // The second argument is only used for overload resolution. + void append_float_length(Char *&format_ptr, long double) { + *format_ptr++ = 'L'; + } + + template + void append_float_length(Char *&, T) {} + + template + friend class internal::ArgFormatterBase; + + template + friend class BasicPrintfArgFormatter; + + protected: + /** + Constructs a ``BasicWriter`` object. + */ + explicit BasicWriter(Buffer &b) : buffer_(b) {} + + public: + /** + \rst + Destroys a ``BasicWriter`` object. + \endrst + */ + virtual ~BasicWriter() {} + + /** + Returns the total number of characters written. + */ + std::size_t size() const { return buffer_.size(); } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const Char *data() const FMT_NOEXCEPT { return &buffer_[0]; } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const Char *c_str() const { + std::size_t size = buffer_.size(); + buffer_.reserve(size + 1); + buffer_[size] = '\0'; + return &buffer_[0]; + } + + /** + \rst + Returns the content of the output buffer as an `std::string`. + \endrst + */ + std::basic_string str() const { + return std::basic_string(&buffer_[0], buffer_.size()); + } + + /** + \rst + Writes formatted data. + + *args* is an argument list representing arbitrary arguments. + + **Example**:: + + MemoryWriter out; + out.write("Current point:\n"); + out.write("({:+f}, {:+f})", -3.14, 3.14); + + This will write the following output to the ``out`` object: + + .. code-block:: none + + Current point: + (-3.140000, +3.140000) + + The output can be accessed using :func:`data()`, :func:`c_str` or + :func:`str` methods. + + See also :ref:`syntax`. + \endrst + */ + void write(BasicCStringRef format, ArgList args) { + BasicFormatter(args, *this).format(format); + } + FMT_VARIADIC_VOID(write, BasicCStringRef) + + BasicWriter &operator<<(int value) { + write_decimal(value); + return *this; + } + BasicWriter &operator<<(unsigned value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(long value) { + write_decimal(value); + return *this; + } + BasicWriter &operator<<(unsigned long value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(LongLong value) { + write_decimal(value); + return *this; + } + + /** + \rst + Formats *value* and writes it to the stream. + \endrst + */ + BasicWriter &operator<<(ULongLong value) { + return *this << IntFormatSpec(value); + } + + BasicWriter &operator<<(double value) { + write_double(value, FormatSpec()); + return *this; + } + + /** + \rst + Formats *value* using the general format for floating-point numbers + (``'g'``) and writes it to the stream. + \endrst + */ + BasicWriter &operator<<(long double value) { + write_double(value, FormatSpec()); + return *this; + } + + /** + Writes a character to the stream. + */ + BasicWriter &operator<<(char value) { + buffer_.push_back(value); + return *this; + } + + BasicWriter &operator<<( + typename internal::WCharHelper::Supported value) { + buffer_.push_back(value); + return *this; + } + + /** + \rst + Writes *value* to the stream. + \endrst + */ + BasicWriter &operator<<(fmt::BasicStringRef value) { + const Char *str = value.data(); + buffer_.append(str, str + value.size()); + return *this; + } + + BasicWriter &operator<<( + typename internal::WCharHelper::Supported value) { + const char *str = value.data(); + buffer_.append(str, str + value.size()); + return *this; + } + + template + BasicWriter &operator<<(IntFormatSpec spec) { + internal::CharTraits::convert(FillChar()); + write_int(spec.value(), spec); + return *this; + } + + template + BasicWriter &operator<<(const StrFormatSpec &spec) { + const StrChar *s = spec.str(); + write_str(s, std::char_traits::length(s), spec); + return *this; + } + + void clear() FMT_NOEXCEPT { buffer_.clear(); } + + Buffer &buffer() FMT_NOEXCEPT { return buffer_; } +}; + +template +template +typename BasicWriter::CharPtr BasicWriter::write_str( + const StrChar *s, std::size_t size, const AlignSpec &spec) { + CharPtr out = CharPtr(); + if (spec.width() > size) { + out = grow_buffer(spec.width()); + Char fill = internal::CharTraits::cast(spec.fill()); + if (spec.align() == ALIGN_RIGHT) { + std::uninitialized_fill_n(out, spec.width() - size, fill); + out += spec.width() - size; + } else if (spec.align() == ALIGN_CENTER) { + out = fill_padding(out, spec.width(), size, fill); + } else { + std::uninitialized_fill_n(out + size, spec.width() - size, fill); + } + } else { + out = grow_buffer(size); + } + std::uninitialized_copy(s, s + size, out); + return out; +} + +template +template +void BasicWriter::write_str( + const internal::Arg::StringValue &s, const Spec &spec) { + // Check if StrChar is convertible to Char. + internal::CharTraits::convert(StrChar()); + if (spec.type_ && spec.type_ != 's') + internal::report_unknown_type(spec.type_, "string"); + const StrChar *str_value = s.value; + std::size_t str_size = s.size; + if (str_size == 0) { + if (!str_value) { + FMT_THROW(FormatError("string pointer is null")); + } + } + std::size_t precision = static_cast(spec.precision_); + if (spec.precision_ >= 0 && precision < str_size) + str_size = precision; + write_str(str_value, str_size, spec); +} + +template +typename BasicWriter::CharPtr + BasicWriter::fill_padding( + CharPtr buffer, unsigned total_size, + std::size_t content_size, wchar_t fill) { + std::size_t padding = total_size - content_size; + std::size_t left_padding = padding / 2; + Char fill_char = internal::CharTraits::cast(fill); + std::uninitialized_fill_n(buffer, left_padding, fill_char); + buffer += left_padding; + CharPtr content = buffer; + std::uninitialized_fill_n(buffer + content_size, + padding - left_padding, fill_char); + return content; +} + +template +template +typename BasicWriter::CharPtr + BasicWriter::prepare_int_buffer( + unsigned num_digits, const Spec &spec, + const char *prefix, unsigned prefix_size) { + unsigned width = spec.width(); + Alignment align = spec.align(); + Char fill = internal::CharTraits::cast(spec.fill()); + if (spec.precision() > static_cast(num_digits)) { + // Octal prefix '0' is counted as a digit, so ignore it if precision + // is specified. + if (prefix_size > 0 && prefix[prefix_size - 1] == '0') + --prefix_size; + unsigned number_size = + prefix_size + internal::to_unsigned(spec.precision()); + AlignSpec subspec(number_size, '0', ALIGN_NUMERIC); + if (number_size >= width) + return prepare_int_buffer(num_digits, subspec, prefix, prefix_size); + buffer_.reserve(width); + unsigned fill_size = width - number_size; + if (align != ALIGN_LEFT) { + CharPtr p = grow_buffer(fill_size); + std::uninitialized_fill(p, p + fill_size, fill); + } + CharPtr result = prepare_int_buffer( + num_digits, subspec, prefix, prefix_size); + if (align == ALIGN_LEFT) { + CharPtr p = grow_buffer(fill_size); + std::uninitialized_fill(p, p + fill_size, fill); + } + return result; + } + unsigned size = prefix_size + num_digits; + if (width <= size) { + CharPtr p = grow_buffer(size); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + return p + size - 1; + } + CharPtr p = grow_buffer(width); + CharPtr end = p + width; + if (align == ALIGN_LEFT) { + std::uninitialized_copy(prefix, prefix + prefix_size, p); + p += size; + std::uninitialized_fill(p, end, fill); + } else if (align == ALIGN_CENTER) { + p = fill_padding(p, width, size, fill); + std::uninitialized_copy(prefix, prefix + prefix_size, p); + p += size; + } else { + if (align == ALIGN_NUMERIC) { + if (prefix_size != 0) { + p = std::uninitialized_copy(prefix, prefix + prefix_size, p); + size -= prefix_size; + } + } else { + std::uninitialized_copy(prefix, prefix + prefix_size, end - size); + } + std::uninitialized_fill(p, end - size, fill); + p = end; + } + return p - 1; +} + +template +template +void BasicWriter::write_int(T value, Spec spec) { + unsigned prefix_size = 0; + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType abs_value = static_cast(value); + char prefix[4] = ""; + if (internal::is_negative(value)) { + prefix[0] = '-'; + ++prefix_size; + abs_value = 0 - abs_value; + } else if (spec.flag(SIGN_FLAG)) { + prefix[0] = spec.flag(PLUS_FLAG) ? '+' : ' '; + ++prefix_size; + } + switch (spec.type()) { + case 0: case 'd': { + unsigned num_digits = internal::count_digits(abs_value); + CharPtr p = prepare_int_buffer(num_digits, spec, prefix, prefix_size) + 1; + internal::format_decimal(get(p), abs_value, 0); + break; + } + case 'x': case 'X': { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type_prefix(); + } + unsigned num_digits = 0; + do { + ++num_digits; + } while ((n >>= 4) != 0); + Char *p = get(prepare_int_buffer( + num_digits, spec, prefix, prefix_size)); + n = abs_value; + const char *digits = spec.type() == 'x' ? + "0123456789abcdef" : "0123456789ABCDEF"; + do { + *p-- = digits[n & 0xf]; + } while ((n >>= 4) != 0); + break; + } + case 'b': case 'B': { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type_prefix(); + } + unsigned num_digits = 0; + do { + ++num_digits; + } while ((n >>= 1) != 0); + Char *p = get(prepare_int_buffer(num_digits, spec, prefix, prefix_size)); + n = abs_value; + do { + *p-- = static_cast('0' + (n & 1)); + } while ((n >>= 1) != 0); + break; + } + case 'o': { + UnsignedType n = abs_value; + if (spec.flag(HASH_FLAG)) + prefix[prefix_size++] = '0'; + unsigned num_digits = 0; + do { + ++num_digits; + } while ((n >>= 3) != 0); + Char *p = get(prepare_int_buffer(num_digits, spec, prefix, prefix_size)); + n = abs_value; + do { + *p-- = static_cast('0' + (n & 7)); + } while ((n >>= 3) != 0); + break; + } + case 'n': { + unsigned num_digits = internal::count_digits(abs_value); + fmt::StringRef sep = ""; +#if !(defined(ANDROID) || defined(__ANDROID__)) + sep = internal::thousands_sep(std::localeconv()); +#endif + unsigned size = static_cast( + num_digits + sep.size() * ((num_digits - 1) / 3)); + CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1; + internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep)); + break; + } + default: + internal::report_unknown_type( + spec.type(), spec.flag(CHAR_FLAG) ? "char" : "integer"); + break; + } +} + +template +template +void BasicWriter::write_double(T value, const Spec &spec) { + // Check type. + char type = spec.type(); + bool upper = false; + switch (type) { + case 0: + type = 'g'; + break; + case 'e': case 'f': case 'g': case 'a': + break; + case 'F': +#if FMT_MSC_VER + // MSVC's printf doesn't support 'F'. + type = 'f'; +#endif + // Fall through. + case 'E': case 'G': case 'A': + upper = true; + break; + default: + internal::report_unknown_type(type, "double"); + break; + } + + char sign = 0; + // Use isnegative instead of value < 0 because the latter is always + // false for NaN. + if (internal::FPUtil::isnegative(static_cast(value))) { + sign = '-'; + value = -value; + } else if (spec.flag(SIGN_FLAG)) { + sign = spec.flag(PLUS_FLAG) ? '+' : ' '; + } + + if (internal::FPUtil::isnotanumber(value)) { + // Format NaN ourselves because sprintf's output is not consistent + // across platforms. + std::size_t nan_size = 4; + const char *nan = upper ? " NAN" : " nan"; + if (!sign) { + --nan_size; + ++nan; + } + CharPtr out = write_str(nan, nan_size, spec); + if (sign) + *out = sign; + return; + } + + if (internal::FPUtil::isinfinity(value)) { + // Format infinity ourselves because sprintf's output is not consistent + // across platforms. + std::size_t inf_size = 4; + const char *inf = upper ? " INF" : " inf"; + if (!sign) { + --inf_size; + ++inf; + } + CharPtr out = write_str(inf, inf_size, spec); + if (sign) + *out = sign; + return; + } + + std::size_t offset = buffer_.size(); + unsigned width = spec.width(); + if (sign) { + buffer_.reserve(buffer_.size() + (width > 1u ? width : 1u)); + if (width > 0) + --width; + ++offset; + } + + // Build format string. + enum { MAX_FORMAT_SIZE = 10}; // longest format: %#-*.*Lg + Char format[MAX_FORMAT_SIZE]; + Char *format_ptr = format; + *format_ptr++ = '%'; + unsigned width_for_sprintf = width; + if (spec.flag(HASH_FLAG)) + *format_ptr++ = '#'; + if (spec.align() == ALIGN_CENTER) { + width_for_sprintf = 0; + } else { + if (spec.align() == ALIGN_LEFT) + *format_ptr++ = '-'; + if (width != 0) + *format_ptr++ = '*'; + } + if (spec.precision() >= 0) { + *format_ptr++ = '.'; + *format_ptr++ = '*'; + } + + append_float_length(format_ptr, value); + *format_ptr++ = type; + *format_ptr = '\0'; + + // Format using snprintf. + Char fill = internal::CharTraits::cast(spec.fill()); + unsigned n = 0; + Char *start = FMT_NULL; + for (;;) { + std::size_t buffer_size = buffer_.capacity() - offset; +#if FMT_MSC_VER + // MSVC's vsnprintf_s doesn't work with zero size, so reserve + // space for at least one extra character to make the size non-zero. + // Note that the buffer's capacity will increase by more than 1. + if (buffer_size == 0) { + buffer_.reserve(offset + 1); + buffer_size = buffer_.capacity() - offset; + } +#endif + start = &buffer_[offset]; + int result = internal::CharTraits::format_float( + start, buffer_size, format, width_for_sprintf, spec.precision(), value); + if (result >= 0) { + n = internal::to_unsigned(result); + if (offset + n < buffer_.capacity()) + break; // The buffer is large enough - continue with formatting. + buffer_.reserve(offset + n + 1); + } else { + // If result is negative we ask to increase the capacity by at least 1, + // but as std::vector, the buffer grows exponentially. + buffer_.reserve(buffer_.capacity() + 1); + } + } + if (sign) { + if ((spec.align() != ALIGN_RIGHT && spec.align() != ALIGN_DEFAULT) || + *start != ' ') { + *(start - 1) = sign; + sign = 0; + } else { + *(start - 1) = fill; + } + ++n; + } + if (spec.align() == ALIGN_CENTER && spec.width() > n) { + width = spec.width(); + CharPtr p = grow_buffer(width); + std::memmove(get(p) + (width - n) / 2, get(p), n * sizeof(Char)); + fill_padding(p, spec.width(), n, fill); + return; + } + if (spec.fill() != ' ' || sign) { + while (*start == ' ') + *start++ = fill; + if (sign) + *(start - 1) = sign; + } + grow_buffer(n); +} + +/** + \rst + This class template provides operations for formatting and writing data + into a character stream. The output is stored in a memory buffer that grows + dynamically. + + You can use one of the following typedefs for common character types + and the standard allocator: + + +---------------+-----------------------------------------------------+ + | Type | Definition | + +===============+=====================================================+ + | MemoryWriter | BasicMemoryWriter> | + +---------------+-----------------------------------------------------+ + | WMemoryWriter | BasicMemoryWriter> | + +---------------+-----------------------------------------------------+ + + **Example**:: + + MemoryWriter out; + out << "The answer is " << 42 << "\n"; + out.write("({:+f}, {:+f})", -3.14, 3.14); + + This will write the following output to the ``out`` object: + + .. code-block:: none + + The answer is 42 + (-3.140000, +3.140000) + + The output can be converted to an ``std::string`` with ``out.str()`` or + accessed as a C string with ``out.c_str()``. + \endrst + */ +template > +class BasicMemoryWriter : public BasicWriter { + private: + internal::MemoryBuffer buffer_; + + public: + explicit BasicMemoryWriter(const Allocator& alloc = Allocator()) + : BasicWriter(buffer_), buffer_(alloc) {} + +#if FMT_USE_RVALUE_REFERENCES + /** + \rst + Constructs a :class:`fmt::BasicMemoryWriter` object moving the content + of the other object to it. + \endrst + */ + BasicMemoryWriter(BasicMemoryWriter &&other) + : BasicWriter(buffer_), buffer_(std::move(other.buffer_)) { + } + + /** + \rst + Moves the content of the other ``BasicMemoryWriter`` object to this one. + \endrst + */ + BasicMemoryWriter &operator=(BasicMemoryWriter &&other) { + buffer_ = std::move(other.buffer_); + return *this; + } +#endif +}; + +typedef BasicMemoryWriter MemoryWriter; +typedef BasicMemoryWriter WMemoryWriter; + +/** + \rst + This class template provides operations for formatting and writing data + into a fixed-size array. For writing into a dynamically growing buffer + use :class:`fmt::BasicMemoryWriter`. + + Any write method will throw ``std::runtime_error`` if the output doesn't fit + into the array. + + You can use one of the following typedefs for common character types: + + +--------------+---------------------------+ + | Type | Definition | + +==============+===========================+ + | ArrayWriter | BasicArrayWriter | + +--------------+---------------------------+ + | WArrayWriter | BasicArrayWriter | + +--------------+---------------------------+ + \endrst + */ +template +class BasicArrayWriter : public BasicWriter { + private: + internal::FixedBuffer buffer_; + + public: + /** + \rst + Constructs a :class:`fmt::BasicArrayWriter` object for *array* of the + given size. + \endrst + */ + BasicArrayWriter(Char *array, std::size_t size) + : BasicWriter(buffer_), buffer_(array, size) {} + + /** + \rst + Constructs a :class:`fmt::BasicArrayWriter` object for *array* of the + size known at compile time. + \endrst + */ + template + explicit BasicArrayWriter(Char (&array)[SIZE]) + : BasicWriter(buffer_), buffer_(array, SIZE) {} +}; + +typedef BasicArrayWriter ArrayWriter; +typedef BasicArrayWriter WArrayWriter; + +// Reports a system error without throwing an exception. +// Can be used to report errors from destructors. +FMT_API void report_system_error(int error_code, + StringRef message) FMT_NOEXCEPT; + +#if FMT_USE_WINDOWS_H + +/** A Windows error. */ +class WindowsError : public SystemError { + private: + FMT_API void init(int error_code, CStringRef format_str, ArgList args); + + public: + /** + \rst + Constructs a :class:`fmt::WindowsError` object with the description + of the form + + .. parsed-literal:: + **: ** + + where ** is the formatted message and ** is the + system message corresponding to the error code. + *error_code* is a Windows error code as given by ``GetLastError``. + If *error_code* is not a valid error code such as -1, the system message + will look like "error -1". + + **Example**:: + + // This throws a WindowsError with the description + // cannot open file 'madeup': The system cannot find the file specified. + // or similar (system message may vary). + const char *filename = "madeup"; + LPOFSTRUCT of = LPOFSTRUCT(); + HFILE file = OpenFile(filename, &of, OF_READ); + if (file == HFILE_ERROR) { + throw fmt::WindowsError(GetLastError(), + "cannot open file '{}'", filename); + } + \endrst + */ + WindowsError(int error_code, CStringRef message) { + init(error_code, message, ArgList()); + } + FMT_VARIADIC_CTOR(WindowsError, init, int, CStringRef) +}; + +// Reports a Windows error without throwing an exception. +// Can be used to report errors from destructors. +FMT_API void report_windows_error(int error_code, + StringRef message) FMT_NOEXCEPT; + +#endif + +enum Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE }; + +/** + Formats a string and prints it to stdout using ANSI escape sequences + to specify color (experimental). + Example: + print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23); + */ +FMT_API void print_colored(Color c, CStringRef format, ArgList args); + +/** + \rst + Formats arguments and returns the result as a string. + + **Example**:: + + std::string message = format("The answer is {}", 42); + \endrst +*/ +inline std::string format(CStringRef format_str, ArgList args) { + MemoryWriter w; + w.write(format_str, args); + return w.str(); +} + +inline std::wstring format(WCStringRef format_str, ArgList args) { + WMemoryWriter w; + w.write(format_str, args); + return w.str(); +} + +/** + \rst + Prints formatted data to the file *f*. + + **Example**:: + + print(stderr, "Don't {}!", "panic"); + \endrst + */ +FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args); + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + print("Elapsed time: {0:.2f} seconds", 1.23); + \endrst + */ +FMT_API void print(CStringRef format_str, ArgList args); + +/** + Fast integer formatter. + */ +class FormatInt { + private: + // Buffer should be large enough to hold all digits (digits10 + 1), + // a sign and a null character. + enum {BUFFER_SIZE = std::numeric_limits::digits10 + 3}; + mutable char buffer_[BUFFER_SIZE]; + char *str_; + + // Formats value in reverse and returns the number of digits. + char *format_decimal(ULongLong value) { + char *buffer_end = buffer_ + BUFFER_SIZE - 1; + while (value >= 100) { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = static_cast((value % 100) * 2); + value /= 100; + *--buffer_end = internal::Data::DIGITS[index + 1]; + *--buffer_end = internal::Data::DIGITS[index]; + } + if (value < 10) { + *--buffer_end = static_cast('0' + value); + return buffer_end; + } + unsigned index = static_cast(value * 2); + *--buffer_end = internal::Data::DIGITS[index + 1]; + *--buffer_end = internal::Data::DIGITS[index]; + return buffer_end; + } + + void FormatSigned(LongLong value) { + ULongLong abs_value = static_cast(value); + bool negative = value < 0; + if (negative) + abs_value = 0 - abs_value; + str_ = format_decimal(abs_value); + if (negative) + *--str_ = '-'; + } + + public: + explicit FormatInt(int value) { FormatSigned(value); } + explicit FormatInt(long value) { FormatSigned(value); } + explicit FormatInt(LongLong value) { FormatSigned(value); } + explicit FormatInt(unsigned value) : str_(format_decimal(value)) {} + explicit FormatInt(unsigned long value) : str_(format_decimal(value)) {} + explicit FormatInt(ULongLong value) : str_(format_decimal(value)) {} + + /** Returns the number of characters written to the output buffer. */ + std::size_t size() const { + return internal::to_unsigned(buffer_ - str_ + BUFFER_SIZE - 1); + } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const char *data() const { return str_; } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const char *c_str() const { + buffer_[BUFFER_SIZE - 1] = '\0'; + return str_; + } + + /** + \rst + Returns the content of the output buffer as an ``std::string``. + \endrst + */ + std::string str() const { return std::string(str_, size()); } +}; + +// Formats a decimal integer value writing into buffer and returns +// a pointer to the end of the formatted string. This function doesn't +// write a terminating null character. +template +inline void format_decimal(char *&buffer, T value) { + typedef typename internal::IntTraits::MainType MainType; + MainType abs_value = static_cast(value); + if (internal::is_negative(value)) { + *buffer++ = '-'; + abs_value = 0 - abs_value; + } + if (abs_value < 100) { + if (abs_value < 10) { + *buffer++ = static_cast('0' + abs_value); + return; + } + unsigned index = static_cast(abs_value * 2); + *buffer++ = internal::Data::DIGITS[index]; + *buffer++ = internal::Data::DIGITS[index + 1]; + return; + } + unsigned num_digits = internal::count_digits(abs_value); + internal::format_decimal(buffer, abs_value, num_digits); + buffer += num_digits; +} + +/** + \rst + Returns a named argument for formatting functions. + + **Example**:: + + print("Elapsed time: {s:.2f} seconds", arg("s", 1.23)); + + \endrst + */ +template +inline internal::NamedArgWithType arg(StringRef name, const T &arg) { + return internal::NamedArgWithType(name, arg); +} + +template +inline internal::NamedArgWithType arg(WStringRef name, const T &arg) { + return internal::NamedArgWithType(name, arg); +} + +// The following two functions are deleted intentionally to disable +// nested named arguments as in ``format("{}", arg("a", arg("b", 42)))``. +template +void arg(StringRef, const internal::NamedArg&) FMT_DELETED_OR_UNDEFINED; +template +void arg(WStringRef, const internal::NamedArg&) FMT_DELETED_OR_UNDEFINED; +} + +#if FMT_GCC_VERSION +// Use the system_header pragma to suppress warnings about variadic macros +// because suppressing -Wvariadic-macros with the diagnostic pragma doesn't +// work. It is used at the end because we want to suppress as little warnings +// as possible. +# pragma GCC system_header +#endif + +// This is used to work around VC++ bugs in handling variadic macros. +#define FMT_EXPAND(args) args + +// Returns the number of arguments. +// Based on https://groups.google.com/forum/#!topic/comp.std.c/d-6Mj5Lko_s. +#define FMT_NARG(...) FMT_NARG_(__VA_ARGS__, FMT_RSEQ_N()) +#define FMT_NARG_(...) FMT_EXPAND(FMT_ARG_N(__VA_ARGS__)) +#define FMT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N +#define FMT_RSEQ_N() 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define FMT_FOR_EACH_(N, f, ...) \ + FMT_EXPAND(FMT_CONCAT(FMT_FOR_EACH, N)(f, __VA_ARGS__)) +#define FMT_FOR_EACH(f, ...) \ + FMT_EXPAND(FMT_FOR_EACH_(FMT_NARG(__VA_ARGS__), f, __VA_ARGS__)) + +#define FMT_ADD_ARG_NAME(type, index) type arg##index +#define FMT_GET_ARG_NAME(type, index) arg##index + +#if FMT_USE_VARIADIC_TEMPLATES +# define FMT_VARIADIC_(Const, Char, ReturnType, func, call, ...) \ + template \ + ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const Args & ... args) Const { \ + typedef fmt::internal::ArgArray ArgArray; \ + typename ArgArray::Type array{ \ + ArgArray::template make >(args)...}; \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(fmt::internal::make_type(args...), array)); \ + } +#else +// Defines a wrapper for a function taking __VA_ARGS__ arguments +// and n additional arguments of arbitrary types. +# define FMT_WRAP(Const, Char, ReturnType, func, call, n, ...) \ + template \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + FMT_GEN(n, FMT_MAKE_ARG)) Const { \ + fmt::internal::ArgArray::Type arr; \ + FMT_GEN(n, FMT_ASSIGN_##Char); \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList( \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), arr)); \ + } + +# define FMT_VARIADIC_(Const, Char, ReturnType, func, call, ...) \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) Const { \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList()); \ + } \ + FMT_WRAP(Const, Char, ReturnType, func, call, 1, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 2, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 3, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 4, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 5, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 6, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 7, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 8, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 9, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 10, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 11, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 12, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 13, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 14, __VA_ARGS__) \ + FMT_WRAP(Const, Char, ReturnType, func, call, 15, __VA_ARGS__) +#endif // FMT_USE_VARIADIC_TEMPLATES + +/** + \rst + Defines a variadic function with the specified return type, function name + and argument types passed as variable arguments to this macro. + + **Example**:: + + void print_error(const char *file, int line, const char *format, + fmt::ArgList args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args); + } + FMT_VARIADIC(void, print_error, const char *, int, const char *) + + ``FMT_VARIADIC`` is used for compatibility with legacy C++ compilers that + don't implement variadic templates. You don't have to use this macro if + you don't need legacy compiler support and can use variadic templates + directly:: + + template + void print_error(const char *file, int line, const char *format, + const Args & ... args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args...); + } + \endrst + */ +#define FMT_VARIADIC(ReturnType, func, ...) \ + FMT_VARIADIC_(, char, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_VARIADIC_CONST(ReturnType, func, ...) \ + FMT_VARIADIC_(const, char, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_VARIADIC_W(ReturnType, func, ...) \ + FMT_VARIADIC_(, wchar_t, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_VARIADIC_CONST_W(ReturnType, func, ...) \ + FMT_VARIADIC_(const, wchar_t, ReturnType, func, return func, __VA_ARGS__) + +#define FMT_CAPTURE_ARG_(id, index) ::fmt::arg(#id, id) + +#define FMT_CAPTURE_ARG_W_(id, index) ::fmt::arg(L###id, id) + +/** + \rst + Convenient macro to capture the arguments' names and values into several + ``fmt::arg(name, value)``. + + **Example**:: + + int x = 1, y = 2; + print("point: ({x}, {y})", FMT_CAPTURE(x, y)); + // same as: + // print("point: ({x}, {y})", arg("x", x), arg("y", y)); + + \endrst + */ +#define FMT_CAPTURE(...) FMT_FOR_EACH(FMT_CAPTURE_ARG_, __VA_ARGS__) + +#define FMT_CAPTURE_W(...) FMT_FOR_EACH(FMT_CAPTURE_ARG_W_, __VA_ARGS__) + +namespace fmt { +FMT_VARIADIC(std::string, format, CStringRef) +FMT_VARIADIC_W(std::wstring, format, WCStringRef) +FMT_VARIADIC(void, print, CStringRef) +FMT_VARIADIC(void, print, std::FILE *, CStringRef) +FMT_VARIADIC(void, print_colored, Color, CStringRef) + +namespace internal { +template +inline bool is_name_start(Char c) { + return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c; +} + +// Parses an unsigned integer advancing s to the end of the parsed input. +// This function assumes that the first character of s is a digit. +template +unsigned parse_nonnegative_int(const Char *&s) { + assert('0' <= *s && *s <= '9'); + unsigned value = 0; + // Convert to unsigned to prevent a warning. + unsigned max_int = (std::numeric_limits::max)(); + unsigned big = max_int / 10; + do { + // Check for overflow. + if (value > big) { + value = max_int + 1; + break; + } + value = value * 10 + (*s - '0'); + ++s; + } while ('0' <= *s && *s <= '9'); + // Convert to unsigned to prevent a warning. + if (value > max_int) + FMT_THROW(FormatError("number is too big")); + return value; +} + +inline void require_numeric_argument(const Arg &arg, char spec) { + if (arg.type > Arg::LAST_NUMERIC_TYPE) { + std::string message = + fmt::format("format specifier '{}' requires numeric argument", spec); + FMT_THROW(fmt::FormatError(message)); + } +} + +template +void check_sign(const Char *&s, const Arg &arg) { + char sign = static_cast(*s); + require_numeric_argument(arg, sign); + if (arg.type == Arg::UINT || arg.type == Arg::ULONG_LONG) { + FMT_THROW(FormatError(fmt::format( + "format specifier '{}' requires signed argument", sign))); + } + ++s; +} +} // namespace internal + +template +inline internal::Arg BasicFormatter::get_arg( + BasicStringRef arg_name, const char *&error) { + if (check_no_auto_index(error)) { + map_.init(args()); + const internal::Arg *arg = map_.find(arg_name); + if (arg) + return *arg; + error = "argument not found"; + } + return internal::Arg(); +} + +template +inline internal::Arg BasicFormatter::parse_arg_index(const Char *&s) { + const char *error = FMT_NULL; + internal::Arg arg = *s < '0' || *s > '9' ? + next_arg(error) : get_arg(internal::parse_nonnegative_int(s), error); + if (error) { + FMT_THROW(FormatError( + *s != '}' && *s != ':' ? "invalid format string" : error)); + } + return arg; +} + +template +inline internal::Arg BasicFormatter::parse_arg_name(const Char *&s) { + assert(internal::is_name_start(*s)); + const Char *start = s; + Char c; + do { + c = *++s; + } while (internal::is_name_start(c) || ('0' <= c && c <= '9')); + const char *error = FMT_NULL; + internal::Arg arg = get_arg(BasicStringRef(start, s - start), error); + if (error) + FMT_THROW(FormatError(error)); + return arg; +} + +template +const Char *BasicFormatter::format( + const Char *&format_str, const internal::Arg &arg) { + using internal::Arg; + const Char *s = format_str; + typename ArgFormatter::SpecType spec; + if (*s == ':') { + if (arg.type == Arg::CUSTOM) { + arg.custom.format(this, arg.custom.value, &s); + return s; + } + ++s; + // Parse fill and alignment. + if (Char c = *s) { + const Char *p = s + 1; + spec.align_ = ALIGN_DEFAULT; + do { + switch (*p) { + case '<': + spec.align_ = ALIGN_LEFT; + break; + case '>': + spec.align_ = ALIGN_RIGHT; + break; + case '=': + spec.align_ = ALIGN_NUMERIC; + break; + case '^': + spec.align_ = ALIGN_CENTER; + break; + } + if (spec.align_ != ALIGN_DEFAULT) { + if (p != s) { + if (c == '}') break; + if (c == '{') + FMT_THROW(FormatError("invalid fill character '{'")); + s += 2; + spec.fill_ = c; + } else ++s; + if (spec.align_ == ALIGN_NUMERIC) + require_numeric_argument(arg, '='); + break; + } + } while (--p >= s); + } + + // Parse sign. + switch (*s) { + case '+': + check_sign(s, arg); + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '-': + check_sign(s, arg); + spec.flags_ |= MINUS_FLAG; + break; + case ' ': + check_sign(s, arg); + spec.flags_ |= SIGN_FLAG; + break; + } + + if (*s == '#') { + require_numeric_argument(arg, '#'); + spec.flags_ |= HASH_FLAG; + ++s; + } + + // Parse zero flag. + if (*s == '0') { + require_numeric_argument(arg, '0'); + spec.align_ = ALIGN_NUMERIC; + spec.fill_ = '0'; + ++s; + } + + // Parse width. + if ('0' <= *s && *s <= '9') { + spec.width_ = internal::parse_nonnegative_int(s); + } else if (*s == '{') { + ++s; + Arg width_arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + if (*s++ != '}') + FMT_THROW(FormatError("invalid format string")); + ULongLong value = 0; + switch (width_arg.type) { + case Arg::INT: + if (width_arg.int_value < 0) + FMT_THROW(FormatError("negative width")); + value = width_arg.int_value; + break; + case Arg::UINT: + value = width_arg.uint_value; + break; + case Arg::LONG_LONG: + if (width_arg.long_long_value < 0) + FMT_THROW(FormatError("negative width")); + value = width_arg.long_long_value; + break; + case Arg::ULONG_LONG: + value = width_arg.ulong_long_value; + break; + default: + FMT_THROW(FormatError("width is not integer")); + } + unsigned max_int = (std::numeric_limits::max)(); + if (value > max_int) + FMT_THROW(FormatError("number is too big")); + spec.width_ = static_cast(value); + } + + // Parse precision. + if (*s == '.') { + ++s; + spec.precision_ = 0; + if ('0' <= *s && *s <= '9') { + spec.precision_ = internal::parse_nonnegative_int(s); + } else if (*s == '{') { + ++s; + Arg precision_arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + if (*s++ != '}') + FMT_THROW(FormatError("invalid format string")); + ULongLong value = 0; + switch (precision_arg.type) { + case Arg::INT: + if (precision_arg.int_value < 0) + FMT_THROW(FormatError("negative precision")); + value = precision_arg.int_value; + break; + case Arg::UINT: + value = precision_arg.uint_value; + break; + case Arg::LONG_LONG: + if (precision_arg.long_long_value < 0) + FMT_THROW(FormatError("negative precision")); + value = precision_arg.long_long_value; + break; + case Arg::ULONG_LONG: + value = precision_arg.ulong_long_value; + break; + default: + FMT_THROW(FormatError("precision is not integer")); + } + unsigned max_int = (std::numeric_limits::max)(); + if (value > max_int) + FMT_THROW(FormatError("number is too big")); + spec.precision_ = static_cast(value); + } else { + FMT_THROW(FormatError("missing precision specifier")); + } + if (arg.type <= Arg::LAST_INTEGER_TYPE || arg.type == Arg::POINTER) { + FMT_THROW(FormatError( + fmt::format("precision not allowed in {} format specifier", + arg.type == Arg::POINTER ? "pointer" : "integer"))); + } + } + + // Parse type. + if (*s != '}' && *s) + spec.type_ = static_cast(*s++); + } + + if (*s++ != '}') + FMT_THROW(FormatError("missing '}' in format string")); + + // Format argument. + ArgFormatter(*this, spec, s - 1).visit(arg); + return s; +} + +template +void BasicFormatter::format(BasicCStringRef format_str) { + const Char *s = format_str.c_str(); + const Char *start = s; + while (*s) { + Char c = *s++; + if (c != '{' && c != '}') continue; + if (*s == c) { + write(writer_, start, s); + start = ++s; + continue; + } + if (c == '}') + FMT_THROW(FormatError("unmatched '}' in format string")); + write(writer_, start, s - 1); + internal::Arg arg = internal::is_name_start(*s) ? + parse_arg_name(s) : parse_arg_index(s); + start = s = format(s, arg); + } + write(writer_, start, s); +} + +template +struct ArgJoin { + It first; + It last; + BasicCStringRef sep; + + ArgJoin(It first, It last, const BasicCStringRef& sep) : + first(first), + last(last), + sep(sep) {} +}; + +template +ArgJoin join(It first, It last, const BasicCStringRef& sep) { + return ArgJoin(first, last, sep); +} + +template +ArgJoin join(It first, It last, const BasicCStringRef& sep) { + return ArgJoin(first, last, sep); +} + +#if FMT_HAS_GXX_CXX11 +template +auto join(const Range& range, const BasicCStringRef& sep) + -> ArgJoin { + return join(std::begin(range), std::end(range), sep); +} + +template +auto join(const Range& range, const BasicCStringRef& sep) + -> ArgJoin { + return join(std::begin(range), std::end(range), sep); +} +#endif + +template +void format_arg(fmt::BasicFormatter &f, + const Char *&format_str, const ArgJoin& e) { + const Char* end = format_str; + if (*end == ':') + ++end; + while (*end && *end != '}') + ++end; + if (*end != '}') + FMT_THROW(FormatError("missing '}' in format string")); + + It it = e.first; + if (it != e.last) { + const Char* save = format_str; + f.format(format_str, internal::MakeArg >(*it++)); + while (it != e.last) { + f.writer().write(e.sep); + format_str = save; + f.format(format_str, internal::MakeArg >(*it++)); + } + } + format_str = end + 1; +} +} // namespace fmt + +#if FMT_USE_USER_DEFINED_LITERALS +namespace fmt { +namespace internal { + +template +struct UdlFormat { + const Char *str; + + template + auto operator()(Args && ... args) const + -> decltype(format(str, std::forward(args)...)) { + return format(str, std::forward(args)...); + } +}; + +template +struct UdlArg { + const Char *str; + + template + NamedArgWithType operator=(T &&value) const { + return {str, std::forward(value)}; + } +}; + +} // namespace internal + +inline namespace literals { + +/** + \rst + C++11 literal equivalent of :func:`fmt::format`. + + **Example**:: + + using namespace fmt::literals; + std::string message = "The answer is {}"_format(42); + \endrst + */ +inline internal::UdlFormat +operator"" _format(const char *s, std::size_t) { return {s}; } +inline internal::UdlFormat +operator"" _format(const wchar_t *s, std::size_t) { return {s}; } + +/** + \rst + C++11 literal equivalent of :func:`fmt::arg`. + + **Example**:: + + using namespace fmt::literals; + print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); + \endrst + */ +inline internal::UdlArg +operator"" _a(const char *s, std::size_t) { return {s}; } +inline internal::UdlArg +operator"" _a(const wchar_t *s, std::size_t) { return {s}; } + +} // inline namespace literals +} // namespace fmt +#endif // FMT_USE_USER_DEFINED_LITERALS + +// Restore warnings. +#if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic pop +#endif + +#if defined(__clang__) && !defined(FMT_ICC_VERSION) +# pragma clang diagnostic pop +#endif + +#ifdef FMT_HEADER_ONLY +# define FMT_FUNC inline +# include "format.cc" +#else +# define FMT_FUNC +#endif + +#endif // FMT_FORMAT_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.cc b/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.cc new file mode 100644 index 0000000..2d443f7 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.cc @@ -0,0 +1,35 @@ +/* + Formatting library for C++ - std::ostream support + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "ostream.h" + +namespace fmt { + +namespace internal { +FMT_FUNC void write(std::ostream &os, Writer &w) { + const char *data = w.data(); + typedef internal::MakeUnsigned::Type UnsignedStreamSize; + UnsignedStreamSize size = w.size(); + UnsignedStreamSize max_size = + internal::to_unsigned((std::numeric_limits::max)()); + do { + UnsignedStreamSize n = size <= max_size ? size : max_size; + os.write(data, static_cast(n)); + data += n; + size -= n; + } while (size != 0); +} +} + +FMT_FUNC void print(std::ostream &os, CStringRef format_str, ArgList args) { + MemoryWriter w; + w.write(format_str, args); + internal::write(os, w); +} +} // namespace fmt diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.h b/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.h new file mode 100644 index 0000000..6848aac --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/ostream.h @@ -0,0 +1,108 @@ +/* + Formatting library for C++ - std::ostream support + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_OSTREAM_H_ +#define FMT_OSTREAM_H_ + +#include "format.h" +#include + +namespace fmt { + +namespace internal { + +template +class FormatBuf : public std::basic_streambuf { + private: + typedef typename std::basic_streambuf::int_type int_type; + typedef typename std::basic_streambuf::traits_type traits_type; + + Buffer &buffer_; + + public: + FormatBuf(Buffer &buffer) : buffer_(buffer) {} + + protected: + // The put-area is actually always empty. This makes the implementation + // simpler and has the advantage that the streambuf and the buffer are always + // in sync and sputc never writes into uninitialized memory. The obvious + // disadvantage is that each call to sputc always results in a (virtual) call + // to overflow. There is no disadvantage here for sputn since this always + // results in a call to xsputn. + + int_type overflow(int_type ch = traits_type::eof()) FMT_OVERRIDE { + if (!traits_type::eq_int_type(ch, traits_type::eof())) + buffer_.push_back(static_cast(ch)); + return ch; + } + + std::streamsize xsputn(const Char *s, std::streamsize count) FMT_OVERRIDE { + buffer_.append(s, s + count); + return count; + } +}; + +Yes &convert(std::ostream &); + +struct DummyStream : std::ostream { + DummyStream(); // Suppress a bogus warning in MSVC. + + // Hide all operator<< overloads from std::ostream. + template + typename EnableIf::type operator<<(const T &); +}; + +No &operator<<(std::ostream &, int); + +template +struct ConvertToIntImpl { + // Convert to int only if T doesn't have an overloaded operator<<. + enum { + value = sizeof(convert(get() << get())) == sizeof(No) + }; +}; + +// Write the content of w to os. +FMT_API void write(std::ostream &os, Writer &w); +} // namespace internal + +// Formats a value. +template +void format_arg(BasicFormatter &f, + const Char *&format_str, const T &value) { + internal::MemoryBuffer buffer; + + internal::FormatBuf format_buf(buffer); + std::basic_ostream output(&format_buf); + output.exceptions(std::ios_base::failbit | std::ios_base::badbit); + output << value; + + BasicStringRef str(&buffer[0], buffer.size()); + typedef internal::MakeArg< BasicFormatter > MakeArg; + format_str = f.format(format_str, MakeArg(str)); +} + +/** + \rst + Prints formatted data to the stream *os*. + + **Example**:: + + print(cerr, "Don't {}!", "panic"); + \endrst + */ +FMT_API void print(std::ostream &os, CStringRef format_str, ArgList args); +FMT_VARIADIC(void, print, std::ostream &, CStringRef) +} // namespace fmt + +#ifdef FMT_HEADER_ONLY +# include "ostream.cc" +#endif + +#endif // FMT_OSTREAM_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/posix.cc b/version/Core/Public/Logger/spdlog/fmt/bundled/posix.cc new file mode 100644 index 0000000..356668c --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/posix.cc @@ -0,0 +1,241 @@ +/* + A C++ interface to POSIX functions. + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +// Disable bogus MSVC warnings. +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif + +#include "posix.h" + +#include +#include +#include + +#ifndef _WIN32 +# include +#else +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# include + +# define O_CREAT _O_CREAT +# define O_TRUNC _O_TRUNC + +# ifndef S_IRUSR +# define S_IRUSR _S_IREAD +# endif + +# ifndef S_IWUSR +# define S_IWUSR _S_IWRITE +# endif + +# ifdef __MINGW32__ +# define _SH_DENYNO 0x40 +# endif + +#endif // _WIN32 + +#ifdef fileno +# undef fileno +#endif + +namespace { +#ifdef _WIN32 +// Return type of read and write functions. +typedef int RWResult; + +// On Windows the count argument to read and write is unsigned, so convert +// it from size_t preventing integer overflow. +inline unsigned convert_rwcount(std::size_t count) { + return count <= UINT_MAX ? static_cast(count) : UINT_MAX; +} +#else +// Return type of read and write functions. +typedef ssize_t RWResult; + +inline std::size_t convert_rwcount(std::size_t count) { return count; } +#endif +} + +fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT { + if (file_ && FMT_SYSTEM(fclose(file_)) != 0) + fmt::report_system_error(errno, "cannot close file"); +} + +fmt::BufferedFile::BufferedFile( + fmt::CStringRef filename, fmt::CStringRef mode) { + FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0); + if (!file_) + FMT_THROW(SystemError(errno, "cannot open file {}", filename)); +} + +void fmt::BufferedFile::close() { + if (!file_) + return; + int result = FMT_SYSTEM(fclose(file_)); + file_ = FMT_NULL; + if (result != 0) + FMT_THROW(SystemError(errno, "cannot close file")); +} + +// A macro used to prevent expansion of fileno on broken versions of MinGW. +#define FMT_ARGS + +int fmt::BufferedFile::fileno() const { + int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_)); + if (fd == -1) + FMT_THROW(SystemError(errno, "cannot get file descriptor")); + return fd; +} + +fmt::File::File(fmt::CStringRef path, int oflag) { + int mode = S_IRUSR | S_IWUSR; +#if defined(_WIN32) && !defined(__MINGW32__) + fd_ = -1; + FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode)); +#else + FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode))); +#endif + if (fd_ == -1) + FMT_THROW(SystemError(errno, "cannot open file {}", path)); +} + +fmt::File::~File() FMT_NOEXCEPT { + // Don't retry close in case of EINTR! + // See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html + if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0) + fmt::report_system_error(errno, "cannot close file"); +} + +void fmt::File::close() { + if (fd_ == -1) + return; + // Don't retry close in case of EINTR! + // See http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html + int result = FMT_POSIX_CALL(close(fd_)); + fd_ = -1; + if (result != 0) + FMT_THROW(SystemError(errno, "cannot close file")); +} + +fmt::LongLong fmt::File::size() const { +#ifdef _WIN32 + // Use GetFileSize instead of GetFileSizeEx for the case when _WIN32_WINNT + // is less than 0x0500 as is the case with some default MinGW builds. + // Both functions support large file sizes. + DWORD size_upper = 0; + HANDLE handle = reinterpret_cast(_get_osfhandle(fd_)); + DWORD size_lower = FMT_SYSTEM(GetFileSize(handle, &size_upper)); + if (size_lower == INVALID_FILE_SIZE) { + DWORD error = GetLastError(); + if (error != NO_ERROR) + FMT_THROW(WindowsError(GetLastError(), "cannot get file size")); + } + fmt::ULongLong long_size = size_upper; + return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower; +#else + typedef struct stat Stat; + Stat file_stat = Stat(); + if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1) + FMT_THROW(SystemError(errno, "cannot get file attributes")); + FMT_STATIC_ASSERT(sizeof(fmt::LongLong) >= sizeof(file_stat.st_size), + "return type of File::size is not large enough"); + return file_stat.st_size; +#endif +} + +std::size_t fmt::File::read(void *buffer, std::size_t count) { + RWResult result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count)))); + if (result < 0) + FMT_THROW(SystemError(errno, "cannot read from file")); + return internal::to_unsigned(result); +} + +std::size_t fmt::File::write(const void *buffer, std::size_t count) { + RWResult result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count)))); + if (result < 0) + FMT_THROW(SystemError(errno, "cannot write to file")); + return internal::to_unsigned(result); +} + +fmt::File fmt::File::dup(int fd) { + // Don't retry as dup doesn't return EINTR. + // http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html + int new_fd = FMT_POSIX_CALL(dup(fd)); + if (new_fd == -1) + FMT_THROW(SystemError(errno, "cannot duplicate file descriptor {}", fd)); + return File(new_fd); +} + +void fmt::File::dup2(int fd) { + int result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); + if (result == -1) { + FMT_THROW(SystemError(errno, + "cannot duplicate file descriptor {} to {}", fd_, fd)); + } +} + +void fmt::File::dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT { + int result = 0; + FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); + if (result == -1) + ec = ErrorCode(errno); +} + +void fmt::File::pipe(File &read_end, File &write_end) { + // Close the descriptors first to make sure that assignments don't throw + // and there are no leaks. + read_end.close(); + write_end.close(); + int fds[2] = {}; +#ifdef _WIN32 + // Make the default pipe capacity same as on Linux 2.6.11+. + enum { DEFAULT_CAPACITY = 65536 }; + int result = FMT_POSIX_CALL(pipe(fds, DEFAULT_CAPACITY, _O_BINARY)); +#else + // Don't retry as the pipe function doesn't return EINTR. + // http://pubs.opengroup.org/onlinepubs/009696799/functions/pipe.html + int result = FMT_POSIX_CALL(pipe(fds)); +#endif + if (result != 0) + FMT_THROW(SystemError(errno, "cannot create pipe")); + // The following assignments don't throw because read_fd and write_fd + // are closed. + read_end = File(fds[0]); + write_end = File(fds[1]); +} + +fmt::BufferedFile fmt::File::fdopen(const char *mode) { + // Don't retry as fdopen doesn't return EINTR. + FILE *f = FMT_POSIX_CALL(fdopen(fd_, mode)); + if (!f) + FMT_THROW(SystemError(errno, "cannot associate stream with file descriptor")); + BufferedFile file(f); + fd_ = -1; + return file; +} + +long fmt::getpagesize() { +#ifdef _WIN32 + SYSTEM_INFO si; + GetSystemInfo(&si); + return si.dwPageSize; +#else + long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE)); + if (size < 0) + FMT_THROW(SystemError(errno, "cannot get memory page size")); + return size; +#endif +} diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/posix.h b/version/Core/Public/Logger/spdlog/fmt/bundled/posix.h new file mode 100644 index 0000000..88512de --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/posix.h @@ -0,0 +1,367 @@ +/* + A C++ interface to POSIX functions. + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_POSIX_H_ +#define FMT_POSIX_H_ + +#if defined(__MINGW32__) || defined(__CYGWIN__) +// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. +# undef __STRICT_ANSI__ +#endif + +#include +#include // for O_RDONLY +#include // for locale_t +#include +#include // for strtod_l + +#include + +#if defined __APPLE__ || defined(__FreeBSD__) +# include // for LC_NUMERIC_MASK on OS X +#endif + +#include "format.h" + +#ifndef FMT_POSIX +# if defined(_WIN32) && !defined(__MINGW32__) +// Fix warnings about deprecated symbols. +# define FMT_POSIX(call) _##call +# else +# define FMT_POSIX(call) call +# endif +#endif + +// Calls to system functions are wrapped in FMT_SYSTEM for testability. +#ifdef FMT_SYSTEM +# define FMT_POSIX_CALL(call) FMT_SYSTEM(call) +#else +# define FMT_SYSTEM(call) call +# ifdef _WIN32 +// Fix warnings about deprecated symbols. +# define FMT_POSIX_CALL(call) ::_##call +# else +# define FMT_POSIX_CALL(call) ::call +# endif +#endif + +// Retries the expression while it evaluates to error_result and errno +// equals to EINTR. +#ifndef _WIN32 +# define FMT_RETRY_VAL(result, expression, error_result) \ + do { \ + result = (expression); \ + } while (result == error_result && errno == EINTR) +#else +# define FMT_RETRY_VAL(result, expression, error_result) result = (expression) +#endif + +#define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1) + +namespace fmt { + +// An error code. +class ErrorCode { + private: + int value_; + + public: + explicit ErrorCode(int value = 0) FMT_NOEXCEPT : value_(value) {} + + int get() const FMT_NOEXCEPT { return value_; } +}; + +// A buffered file. +class BufferedFile { + private: + FILE *file_; + + friend class File; + + explicit BufferedFile(FILE *f) : file_(f) {} + + public: + // Constructs a BufferedFile object which doesn't represent any file. + BufferedFile() FMT_NOEXCEPT : file_(FMT_NULL) {} + + // Destroys the object closing the file it represents if any. + FMT_API ~BufferedFile() FMT_NOEXCEPT; + +#if !FMT_USE_RVALUE_REFERENCES + // Emulate a move constructor and a move assignment operator if rvalue + // references are not supported. + + private: + // A proxy object to emulate a move constructor. + // It is private to make it impossible call operator Proxy directly. + struct Proxy { + FILE *file; + }; + +public: + // A "move constructor" for moving from a temporary. + BufferedFile(Proxy p) FMT_NOEXCEPT : file_(p.file) {} + + // A "move constructor" for moving from an lvalue. + BufferedFile(BufferedFile &f) FMT_NOEXCEPT : file_(f.file_) { + f.file_ = FMT_NULL; + } + + // A "move assignment operator" for moving from a temporary. + BufferedFile &operator=(Proxy p) { + close(); + file_ = p.file; + return *this; + } + + // A "move assignment operator" for moving from an lvalue. + BufferedFile &operator=(BufferedFile &other) { + close(); + file_ = other.file_; + other.file_ = FMT_NULL; + return *this; + } + + // Returns a proxy object for moving from a temporary: + // BufferedFile file = BufferedFile(...); + operator Proxy() FMT_NOEXCEPT { + Proxy p = {file_}; + file_ = FMT_NULL; + return p; + } + +#else + private: + FMT_DISALLOW_COPY_AND_ASSIGN(BufferedFile); + + public: + BufferedFile(BufferedFile &&other) FMT_NOEXCEPT : file_(other.file_) { + other.file_ = FMT_NULL; + } + + BufferedFile& operator=(BufferedFile &&other) { + close(); + file_ = other.file_; + other.file_ = FMT_NULL; + return *this; + } +#endif + + // Opens a file. + FMT_API BufferedFile(CStringRef filename, CStringRef mode); + + // Closes the file. + FMT_API void close(); + + // Returns the pointer to a FILE object representing this file. + FILE *get() const FMT_NOEXCEPT { return file_; } + + // We place parentheses around fileno to workaround a bug in some versions + // of MinGW that define fileno as a macro. + FMT_API int (fileno)() const; + + void print(CStringRef format_str, const ArgList &args) { + fmt::print(file_, format_str, args); + } + FMT_VARIADIC(void, print, CStringRef) +}; + +// A file. Closed file is represented by a File object with descriptor -1. +// Methods that are not declared with FMT_NOEXCEPT may throw +// fmt::SystemError in case of failure. Note that some errors such as +// closing the file multiple times will cause a crash on Windows rather +// than an exception. You can get standard behavior by overriding the +// invalid parameter handler with _set_invalid_parameter_handler. +class File { + private: + int fd_; // File descriptor. + + // Constructs a File object with a given descriptor. + explicit File(int fd) : fd_(fd) {} + + public: + // Possible values for the oflag argument to the constructor. + enum { + RDONLY = FMT_POSIX(O_RDONLY), // Open for reading only. + WRONLY = FMT_POSIX(O_WRONLY), // Open for writing only. + RDWR = FMT_POSIX(O_RDWR) // Open for reading and writing. + }; + + // Constructs a File object which doesn't represent any file. + File() FMT_NOEXCEPT : fd_(-1) {} + + // Opens a file and constructs a File object representing this file. + FMT_API File(CStringRef path, int oflag); + +#if !FMT_USE_RVALUE_REFERENCES + // Emulate a move constructor and a move assignment operator if rvalue + // references are not supported. + + private: + // A proxy object to emulate a move constructor. + // It is private to make it impossible call operator Proxy directly. + struct Proxy { + int fd; + }; + + public: + // A "move constructor" for moving from a temporary. + File(Proxy p) FMT_NOEXCEPT : fd_(p.fd) {} + + // A "move constructor" for moving from an lvalue. + File(File &other) FMT_NOEXCEPT : fd_(other.fd_) { + other.fd_ = -1; + } + + // A "move assignment operator" for moving from a temporary. + File &operator=(Proxy p) { + close(); + fd_ = p.fd; + return *this; + } + + // A "move assignment operator" for moving from an lvalue. + File &operator=(File &other) { + close(); + fd_ = other.fd_; + other.fd_ = -1; + return *this; + } + + // Returns a proxy object for moving from a temporary: + // File file = File(...); + operator Proxy() FMT_NOEXCEPT { + Proxy p = {fd_}; + fd_ = -1; + return p; + } + +#else + private: + FMT_DISALLOW_COPY_AND_ASSIGN(File); + + public: + File(File &&other) FMT_NOEXCEPT : fd_(other.fd_) { + other.fd_ = -1; + } + + File& operator=(File &&other) { + close(); + fd_ = other.fd_; + other.fd_ = -1; + return *this; + } +#endif + + // Destroys the object closing the file it represents if any. + FMT_API ~File() FMT_NOEXCEPT; + + // Returns the file descriptor. + int descriptor() const FMT_NOEXCEPT { return fd_; } + + // Closes the file. + FMT_API void close(); + + // Returns the file size. The size has signed type for consistency with + // stat::st_size. + FMT_API LongLong size() const; + + // Attempts to read count bytes from the file into the specified buffer. + FMT_API std::size_t read(void *buffer, std::size_t count); + + // Attempts to write count bytes from the specified buffer to the file. + FMT_API std::size_t write(const void *buffer, std::size_t count); + + // Duplicates a file descriptor with the dup function and returns + // the duplicate as a file object. + FMT_API static File dup(int fd); + + // Makes fd be the copy of this file descriptor, closing fd first if + // necessary. + FMT_API void dup2(int fd); + + // Makes fd be the copy of this file descriptor, closing fd first if + // necessary. + FMT_API void dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT; + + // Creates a pipe setting up read_end and write_end file objects for reading + // and writing respectively. + FMT_API static void pipe(File &read_end, File &write_end); + + // Creates a BufferedFile object associated with this file and detaches + // this File object from the file. + FMT_API BufferedFile fdopen(const char *mode); +}; + +// Returns the memory page size. +long getpagesize(); + +#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \ + !defined(__ANDROID__) && !defined(__CYGWIN__) +# define FMT_LOCALE +#endif + +#ifdef FMT_LOCALE +// A "C" numeric locale. +class Locale { + private: +# ifdef _MSC_VER + typedef _locale_t locale_t; + + enum { LC_NUMERIC_MASK = LC_NUMERIC }; + + static locale_t newlocale(int category_mask, const char *locale, locale_t) { + return _create_locale(category_mask, locale); + } + + static void freelocale(locale_t locale) { + _free_locale(locale); + } + + static double strtod_l(const char *nptr, char **endptr, _locale_t locale) { + return _strtod_l(nptr, endptr, locale); + } +# endif + + locale_t locale_; + + FMT_DISALLOW_COPY_AND_ASSIGN(Locale); + + public: + typedef locale_t Type; + + Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", FMT_NULL)) { + if (!locale_) + FMT_THROW(fmt::SystemError(errno, "cannot create locale")); + } + ~Locale() { freelocale(locale_); } + + Type get() const { return locale_; } + + // Converts string to floating-point number and advances str past the end + // of the parsed input. + double strtod(const char *&str) const { + char *end = FMT_NULL; + double result = strtod_l(str, &end, locale_); + str = end; + return result; + } +}; +#endif // FMT_LOCALE +} // namespace fmt + +#if !FMT_USE_RVALUE_REFERENCES +namespace std { +// For compatibility with C++98. +inline fmt::BufferedFile &move(fmt::BufferedFile &f) { return f; } +inline fmt::File &move(fmt::File &f) { return f; } +} +#endif + +#endif // FMT_POSIX_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/printf.cc b/version/Core/Public/Logger/spdlog/fmt/bundled/printf.cc new file mode 100644 index 0000000..95d7a36 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/printf.cc @@ -0,0 +1,32 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "format.h" +#include "printf.h" + +namespace fmt { + +template +void printf(BasicWriter &w, BasicCStringRef format, ArgList args); + +FMT_FUNC int fprintf(std::FILE *f, CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + std::size_t size = w.size(); + return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast(size); +} + +#ifndef FMT_HEADER_ONLY + +template void PrintfFormatter::format(CStringRef format); +template void PrintfFormatter::format(WCStringRef format); + +#endif // FMT_HEADER_ONLY + +} // namespace fmt diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/printf.h b/version/Core/Public/Logger/spdlog/fmt/bundled/printf.h new file mode 100644 index 0000000..46205a7 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/printf.h @@ -0,0 +1,603 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_PRINTF_H_ +#define FMT_PRINTF_H_ + +#include // std::fill_n +#include // std::numeric_limits + +#include "ostream.h" + +namespace fmt { +namespace internal { + +// Checks if a value fits in int - used to avoid warnings about comparing +// signed and unsigned integers. +template +struct IntChecker { + template + static bool fits_in_int(T value) { + unsigned max = std::numeric_limits::max(); + return value <= max; + } + static bool fits_in_int(bool) { return true; } +}; + +template <> +struct IntChecker { + template + static bool fits_in_int(T value) { + return value >= std::numeric_limits::min() && + value <= std::numeric_limits::max(); + } + static bool fits_in_int(int) { return true; } +}; + +class PrecisionHandler : public ArgVisitor { + public: + void report_unhandled_arg() { + FMT_THROW(FormatError("precision is not integer")); + } + + template + int visit_any_int(T value) { + if (!IntChecker::is_signed>::fits_in_int(value)) + FMT_THROW(FormatError("number is too big")); + return static_cast(value); + } +}; + +// IsZeroInt::visit(arg) returns true iff arg is a zero integer. +class IsZeroInt : public ArgVisitor { + public: + template + bool visit_any_int(T value) { return value == 0; } +}; + +// returns the default type for format specific "%s" +class DefaultType : public ArgVisitor { + public: + char visit_char(int) { return 'c'; } + + char visit_bool(bool) { return 's'; } + + char visit_pointer(const void *) { return 'p'; } + + template + char visit_any_int(T) { return 'd'; } + + template + char visit_any_double(T) { return 'g'; } + + char visit_unhandled_arg() { return 's'; } +}; + +template +struct is_same { + enum { value = 0 }; +}; + +template +struct is_same { + enum { value = 1 }; +}; + +// An argument visitor that converts an integer argument to T for printf, +// if T is an integral type. If T is void, the argument is converted to +// corresponding signed or unsigned type depending on the type specifier: +// 'd' and 'i' - signed, other - unsigned) +template +class ArgConverter : public ArgVisitor, void> { + private: + internal::Arg &arg_; + wchar_t type_; + + FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter); + + public: + ArgConverter(internal::Arg &arg, wchar_t type) + : arg_(arg), type_(type) {} + + void visit_bool(bool value) { + if (type_ != 's') + visit_any_int(value); + } + + void visit_char(int value) { + if (type_ != 's') + visit_any_int(value); + } + + template + void visit_any_int(U value) { + bool is_signed = type_ == 'd' || type_ == 'i'; + if (type_ == 's') { + is_signed = std::numeric_limits::is_signed; + } + + using internal::Arg; + typedef typename internal::Conditional< + is_same::value, U, T>::type TargetType; + if (const_check(sizeof(TargetType) <= sizeof(int))) { + // Extra casts are used to silence warnings. + if (is_signed) { + arg_.type = Arg::INT; + arg_.int_value = static_cast(static_cast(value)); + } else { + arg_.type = Arg::UINT; + typedef typename internal::MakeUnsigned::Type Unsigned; + arg_.uint_value = static_cast(static_cast(value)); + } + } else { + if (is_signed) { + arg_.type = Arg::LONG_LONG; + // glibc's printf doesn't sign extend arguments of smaller types: + // std::printf("%lld", -42); // prints "4294967254" + // but we don't have to do the same because it's a UB. + arg_.long_long_value = static_cast(value); + } else { + arg_.type = Arg::ULONG_LONG; + arg_.ulong_long_value = + static_cast::Type>(value); + } + } + } +}; + +// Converts an integer argument to char for printf. +class CharConverter : public ArgVisitor { + private: + internal::Arg &arg_; + + FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter); + + public: + explicit CharConverter(internal::Arg &arg) : arg_(arg) {} + + template + void visit_any_int(T value) { + arg_.type = internal::Arg::CHAR; + arg_.int_value = static_cast(value); + } +}; + +// Checks if an argument is a valid printf width specifier and sets +// left alignment if it is negative. +class WidthHandler : public ArgVisitor { + private: + FormatSpec &spec_; + + FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler); + + public: + explicit WidthHandler(FormatSpec &spec) : spec_(spec) {} + + void report_unhandled_arg() { + FMT_THROW(FormatError("width is not integer")); + } + + template + unsigned visit_any_int(T value) { + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType width = static_cast(value); + if (internal::is_negative(value)) { + spec_.align_ = ALIGN_LEFT; + width = 0 - width; + } + unsigned int_max = std::numeric_limits::max(); + if (width > int_max) + FMT_THROW(FormatError("number is too big")); + return static_cast(width); + } +}; +} // namespace internal + +/** + \rst + A ``printf`` argument formatter based on the `curiously recurring template + pattern `_. + + To use `~fmt::BasicPrintfArgFormatter` define a subclass that implements some + or all of the visit methods with the same signatures as the methods in + `~fmt::ArgVisitor`, for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. When a formatting + function processes an argument, it will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::BasicPrintfArgFormatter` or its + superclass will be called. + \endrst + */ +template +class BasicPrintfArgFormatter : + public internal::ArgFormatterBase { + private: + void write_null_pointer() { + this->spec().type_ = 0; + this->write("(nil)"); + } + + typedef internal::ArgFormatterBase Base; + + public: + /** + \rst + Constructs an argument formatter object. + *writer* is a reference to the output writer and *spec* contains format + specifier information for standard argument types. + \endrst + */ + BasicPrintfArgFormatter(BasicWriter &w, Spec &s) + : internal::ArgFormatterBase(w, s) {} + + /** Formats an argument of type ``bool``. */ + void visit_bool(bool value) { + Spec &fmt_spec = this->spec(); + if (fmt_spec.type_ != 's') + return this->visit_any_int(value); + fmt_spec.type_ = 0; + this->write(value); + } + + /** Formats a character. */ + void visit_char(int value) { + const Spec &fmt_spec = this->spec(); + BasicWriter &w = this->writer(); + if (fmt_spec.type_ && fmt_spec.type_ != 'c') + w.write_int(value, fmt_spec); + typedef typename BasicWriter::CharPtr CharPtr; + CharPtr out = CharPtr(); + if (fmt_spec.width_ > 1) { + Char fill = ' '; + out = w.grow_buffer(fmt_spec.width_); + if (fmt_spec.align_ != ALIGN_LEFT) { + std::fill_n(out, fmt_spec.width_ - 1, fill); + out += fmt_spec.width_ - 1; + } else { + std::fill_n(out + 1, fmt_spec.width_ - 1, fill); + } + } else { + out = w.grow_buffer(1); + } + *out = static_cast(value); + } + + /** Formats a null-terminated C string. */ + void visit_cstring(const char *value) { + if (value) + Base::visit_cstring(value); + else if (this->spec().type_ == 'p') + write_null_pointer(); + else + this->write("(null)"); + } + + /** Formats a pointer. */ + void visit_pointer(const void *value) { + if (value) + return Base::visit_pointer(value); + this->spec().type_ = 0; + write_null_pointer(); + } + + /** Formats an argument of a custom (user-defined) type. */ + void visit_custom(internal::Arg::CustomValue c) { + BasicFormatter formatter(ArgList(), this->writer()); + const Char format_str[] = {'}', 0}; + const Char *format = format_str; + c.format(&formatter, c.value, &format); + } +}; + +/** The default printf argument formatter. */ +template +class PrintfArgFormatter : + public BasicPrintfArgFormatter, Char, FormatSpec> { + public: + /** Constructs an argument formatter object. */ + PrintfArgFormatter(BasicWriter &w, FormatSpec &s) + : BasicPrintfArgFormatter, Char, FormatSpec>(w, s) {} +}; + +/** This template formats data and writes the output to a writer. */ +template > +class PrintfFormatter : private internal::FormatterBase { + private: + BasicWriter &writer_; + + void parse_flags(FormatSpec &spec, const Char *&s); + + // Returns the argument with specified index or, if arg_index is equal + // to the maximum unsigned value, the next argument. + internal::Arg get_arg( + const Char *s, + unsigned arg_index = (std::numeric_limits::max)()); + + // Parses argument index, flags and width and returns the argument index. + unsigned parse_header(const Char *&s, FormatSpec &spec); + + public: + /** + \rst + Constructs a ``PrintfFormatter`` object. References to the arguments and + the writer are stored in the formatter object so make sure they have + appropriate lifetimes. + \endrst + */ + explicit PrintfFormatter(const ArgList &al, BasicWriter &w) + : FormatterBase(al), writer_(w) {} + + /** Formats stored arguments and writes the output to the writer. */ + void format(BasicCStringRef format_str); +}; + +template +void PrintfFormatter::parse_flags(FormatSpec &spec, const Char *&s) { + for (;;) { + switch (*s++) { + case '-': + spec.align_ = ALIGN_LEFT; + break; + case '+': + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '0': + spec.fill_ = '0'; + break; + case ' ': + spec.flags_ |= SIGN_FLAG; + break; + case '#': + spec.flags_ |= HASH_FLAG; + break; + default: + --s; + return; + } + } +} + +template +internal::Arg PrintfFormatter::get_arg(const Char *s, + unsigned arg_index) { + (void)s; + const char *error = FMT_NULL; + internal::Arg arg = arg_index == std::numeric_limits::max() ? + next_arg(error) : FormatterBase::get_arg(arg_index - 1, error); + if (error) + FMT_THROW(FormatError(!*s ? "invalid format string" : error)); + return arg; +} + +template +unsigned PrintfFormatter::parse_header( + const Char *&s, FormatSpec &spec) { + unsigned arg_index = std::numeric_limits::max(); + Char c = *s; + if (c >= '0' && c <= '9') { + // Parse an argument index (if followed by '$') or a width possibly + // preceded with '0' flag(s). + unsigned value = internal::parse_nonnegative_int(s); + if (*s == '$') { // value is an argument index + ++s; + arg_index = value; + } else { + if (c == '0') + spec.fill_ = '0'; + if (value != 0) { + // Nonzero value means that we parsed width and don't need to + // parse it or flags again, so return now. + spec.width_ = value; + return arg_index; + } + } + } + parse_flags(spec, s); + // Parse width. + if (*s >= '0' && *s <= '9') { + spec.width_ = internal::parse_nonnegative_int(s); + } else if (*s == '*') { + ++s; + spec.width_ = internal::WidthHandler(spec).visit(get_arg(s)); + } + return arg_index; +} + +template +void PrintfFormatter::format(BasicCStringRef format_str) { + const Char *start = format_str.c_str(); + const Char *s = start; + while (*s) { + Char c = *s++; + if (c != '%') continue; + if (*s == c) { + write(writer_, start, s); + start = ++s; + continue; + } + write(writer_, start, s - 1); + + FormatSpec spec; + spec.align_ = ALIGN_RIGHT; + + // Parse argument index, flags and width. + unsigned arg_index = parse_header(s, spec); + + // Parse precision. + if (*s == '.') { + ++s; + if ('0' <= *s && *s <= '9') { + spec.precision_ = static_cast(internal::parse_nonnegative_int(s)); + } else if (*s == '*') { + ++s; + spec.precision_ = internal::PrecisionHandler().visit(get_arg(s)); + } else { + spec.precision_ = 0; + } + } + + using internal::Arg; + Arg arg = get_arg(s, arg_index); + if (spec.flag(HASH_FLAG) && internal::IsZeroInt().visit(arg)) + spec.flags_ &= ~internal::to_unsigned(HASH_FLAG); + if (spec.fill_ == '0') { + if (arg.type <= Arg::LAST_NUMERIC_TYPE) + spec.align_ = ALIGN_NUMERIC; + else + spec.fill_ = ' '; // Ignore '0' flag for non-numeric types. + } + + // Parse length and convert the argument to the required type. + using internal::ArgConverter; + switch (*s++) { + case 'h': + if (*s == 'h') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'l': + if (*s == 'l') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'j': + ArgConverter(arg, *s).visit(arg); + break; + case 'z': + ArgConverter(arg, *s).visit(arg); + break; + case 't': + ArgConverter(arg, *s).visit(arg); + break; + case 'L': + // printf produces garbage when 'L' is omitted for long double, no + // need to do the same. + break; + default: + --s; + ArgConverter(arg, *s).visit(arg); + } + + // Parse type. + if (!*s) + FMT_THROW(FormatError("invalid format string")); + spec.type_ = static_cast(*s++); + + if (spec.type_ == 's') { + // set the format type to the default if 's' is specified + spec.type_ = internal::DefaultType().visit(arg); + } + + if (arg.type <= Arg::LAST_INTEGER_TYPE) { + // Normalize type. + switch (spec.type_) { + case 'i': case 'u': + spec.type_ = 'd'; + break; + case 'c': + // TODO: handle wchar_t + internal::CharConverter(arg).visit(arg); + break; + } + } + + start = s; + + // Format argument. + AF(writer_, spec).visit(arg); + } + write(writer_, start, s); +} + +inline void printf(Writer &w, CStringRef format, ArgList args) { + PrintfFormatter(args, w).format(format); +} +FMT_VARIADIC(void, printf, Writer &, CStringRef) + +inline void printf(WWriter &w, WCStringRef format, ArgList args) { + PrintfFormatter(args, w).format(format); +} +FMT_VARIADIC(void, printf, WWriter &, WCStringRef) + +/** + \rst + Formats arguments and returns the result as a string. + + **Example**:: + + std::string message = fmt::sprintf("The answer is %d", 42); + \endrst +*/ +inline std::string sprintf(CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + return w.str(); +} +FMT_VARIADIC(std::string, sprintf, CStringRef) + +inline std::wstring sprintf(WCStringRef format, ArgList args) { + WMemoryWriter w; + printf(w, format, args); + return w.str(); +} +FMT_VARIADIC_W(std::wstring, sprintf, WCStringRef) + +/** + \rst + Prints formatted data to the file *f*. + + **Example**:: + + fmt::fprintf(stderr, "Don't %s!", "panic"); + \endrst + */ +FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args); +FMT_VARIADIC(int, fprintf, std::FILE *, CStringRef) + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + fmt::printf("Elapsed time: %.2f seconds", 1.23); + \endrst + */ +inline int printf(CStringRef format, ArgList args) { + return fprintf(stdout, format, args); +} +FMT_VARIADIC(int, printf, CStringRef) + +/** + \rst + Prints formatted data to the stream *os*. + + **Example**:: + + fprintf(cerr, "Don't %s!", "panic"); + \endrst + */ +inline int fprintf(std::ostream &os, CStringRef format_str, ArgList args) { + MemoryWriter w; + printf(w, format_str, args); + internal::write(os, w); + return static_cast(w.size()); +} +FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef) +} // namespace fmt + +#ifdef FMT_HEADER_ONLY +# include "printf.cc" +#endif + +#endif // FMT_PRINTF_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/string.h b/version/Core/Public/Logger/spdlog/fmt/bundled/string.h new file mode 100644 index 0000000..05996eb --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/string.h @@ -0,0 +1,148 @@ +/* + Formatting library for C++ - string utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifdef FMT_INCLUDE +# error "Add the fmt's parent directory and not fmt itself to includes." +#endif + +#ifndef FMT_STRING_H_ +#define FMT_STRING_H_ + +#include "format.h" + +namespace fmt { + +namespace internal { + +// A buffer that stores data in ``std::basic_string``. +template > +class StringBuffer : public Buffer { + public: + typedef std::basic_string, Allocator> StringType; + + private: + StringType data_; + + protected: + virtual void grow(std::size_t size) FMT_OVERRIDE { + data_.resize(size); + this->ptr_ = &data_[0]; + this->capacity_ = size; + } + + public: + explicit StringBuffer(const Allocator &allocator = Allocator()) + : data_(allocator) {} + + // Moves the data to ``str`` clearing the buffer. + void move_to(StringType &str) { + data_.resize(this->size_); + str.swap(data_); + this->capacity_ = this->size_ = 0; + this->ptr_ = FMT_NULL; + } +}; +} // namespace internal + +/** + \rst + This class template provides operations for formatting and writing data + into a character stream. The output is stored in a ``std::basic_string`` + that grows dynamically. + + You can use one of the following typedefs for common character types + and the standard allocator: + + +---------------+----------------------------+ + | Type | Definition | + +===============+============================+ + | StringWriter | BasicStringWriter | + +---------------+----------------------------+ + | WStringWriter | BasicStringWriter | + +---------------+----------------------------+ + + **Example**:: + + StringWriter out; + out << "The answer is " << 42 << "\n"; + + This will write the following output to the ``out`` object: + + .. code-block:: none + + The answer is 42 + + The output can be moved to a ``std::basic_string`` with ``out.move_to()``. + \endrst + */ +template > +class BasicStringWriter : public BasicWriter { + private: + internal::StringBuffer buffer_; + + public: + /** + \rst + Constructs a :class:`fmt::BasicStringWriter` object. + \endrst + */ + explicit BasicStringWriter(const Allocator &allocator = Allocator()) + : BasicWriter(buffer_), buffer_(allocator) {} + + /** + \rst + Moves the buffer content to *str* clearing the buffer. + \endrst + */ + void move_to(std::basic_string, Allocator> &str) { + buffer_.move_to(str); + } +}; + +typedef BasicStringWriter StringWriter; +typedef BasicStringWriter WStringWriter; + +/** + \rst + Converts *value* to ``std::string`` using the default format for type *T*. + + **Example**:: + + #include "fmt/string.h" + + std::string answer = fmt::to_string(42); + \endrst + */ +template +std::string to_string(const T &value) { + fmt::MemoryWriter w; + w << value; + return w.str(); +} + +/** + \rst + Converts *value* to ``std::wstring`` using the default format for type *T*. + + **Example**:: + + #include "fmt/string.h" + + std::wstring answer = fmt::to_wstring(42); + \endrst + */ +template +std::wstring to_wstring(const T &value) { + fmt::WMemoryWriter w; + w << value; + return w.str(); +} +} + +#endif // FMT_STRING_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/bundled/time.h b/version/Core/Public/Logger/spdlog/fmt/bundled/time.h new file mode 100644 index 0000000..c98b0e0 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/bundled/time.h @@ -0,0 +1,143 @@ +/* + Formatting library for C++ - time formatting + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_TIME_H_ +#define FMT_TIME_H_ + +#include "format.h" +#include + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4702) // unreachable code +# pragma warning(disable: 4996) // "deprecated" functions +#endif + +namespace fmt { +template +void format_arg(BasicFormatter &f, + const char *&format_str, const std::tm &tm) { + if (*format_str == ':') + ++format_str; + const char *end = format_str; + while (*end && *end != '}') + ++end; + if (*end != '}') + FMT_THROW(FormatError("missing '}' in format string")); + internal::MemoryBuffer format; + format.append(format_str, end + 1); + format[format.size() - 1] = '\0'; + Buffer &buffer = f.writer().buffer(); + std::size_t start = buffer.size(); + for (;;) { + std::size_t size = buffer.capacity() - start; + std::size_t count = std::strftime(&buffer[start], size, &format[0], &tm); + if (count != 0) { + buffer.resize(start + count); + break; + } + if (size >= format.size() * 256) { + // If the buffer is 256 times larger than the format string, assume + // that `strftime` gives an empty result. There doesn't seem to be a + // better way to distinguish the two cases: + // https://github.com/fmtlib/fmt/issues/367 + break; + } + const std::size_t MIN_GROWTH = 10; + buffer.reserve(buffer.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH)); + } + format_str = end + 1; +} + +namespace internal{ +inline Null<> localtime_r(...) { return Null<>(); } +inline Null<> localtime_s(...) { return Null<>(); } +inline Null<> gmtime_r(...) { return Null<>(); } +inline Null<> gmtime_s(...) { return Null<>(); } +} + +// Thread-safe replacement for std::localtime +inline std::tm localtime(std::time_t time) { + struct LocalTime { + std::time_t time_; + std::tm tm_; + + LocalTime(std::time_t t): time_(t) {} + + bool run() { + using namespace fmt::internal; + return handle(localtime_r(&time_, &tm_)); + } + + bool handle(std::tm *tm) { return tm != FMT_NULL; } + + bool handle(internal::Null<>) { + using namespace fmt::internal; + return fallback(localtime_s(&tm_, &time_)); + } + + bool fallback(int res) { return res == 0; } + + bool fallback(internal::Null<>) { + using namespace fmt::internal; + std::tm *tm = std::localtime(&time_); + if (tm) tm_ = *tm; + return tm != FMT_NULL; + } + }; + LocalTime lt(time); + if (lt.run()) + return lt.tm_; + // Too big time values may be unsupported. + FMT_THROW(fmt::FormatError("time_t value out of range")); + return std::tm(); +} + +// Thread-safe replacement for std::gmtime +inline std::tm gmtime(std::time_t time) { + struct GMTime { + std::time_t time_; + std::tm tm_; + + GMTime(std::time_t t): time_(t) {} + + bool run() { + using namespace fmt::internal; + return handle(gmtime_r(&time_, &tm_)); + } + + bool handle(std::tm *tm) { return tm != FMT_NULL; } + + bool handle(internal::Null<>) { + using namespace fmt::internal; + return fallback(gmtime_s(&tm_, &time_)); + } + + bool fallback(int res) { return res == 0; } + + bool fallback(internal::Null<>) { + std::tm *tm = std::gmtime(&time_); + if (tm != FMT_NULL) tm_ = *tm; + return tm != FMT_NULL; + } + }; + GMTime gt(time); + if (gt.run()) + return gt.tm_; + // Too big time values may be unsupported. + FMT_THROW(fmt::FormatError("time_t value out of range")); + return std::tm(); +} +} //namespace fmt + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#endif // FMT_TIME_H_ diff --git a/version/Core/Public/Logger/spdlog/fmt/fmt.h b/version/Core/Public/Logger/spdlog/fmt/fmt.h new file mode 100644 index 0000000..92ca4e5 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/fmt.h @@ -0,0 +1,34 @@ +// +// Copyright(c) 2016 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// +// Include a bundled header-only copy of fmtlib or an external one. +// By default spdlog include its own copy. +// + +#if !defined(SPDLOG_FMT_EXTERNAL) + +#ifndef FMT_HEADER_ONLY +#define FMT_HEADER_ONLY +#endif +#ifndef FMT_USE_WINDOWS_H +#define FMT_USE_WINDOWS_H 0 +#endif +#include "bundled/format.h" +#if defined(SPDLOG_FMT_PRINTF) +#include "bundled/printf.h" +#endif + +#else //external fmtlib + +#include +#if defined(SPDLOG_FMT_PRINTF) +#include +#endif + +#endif + diff --git a/version/Core/Public/Logger/spdlog/fmt/ostr.h b/version/Core/Public/Logger/spdlog/fmt/ostr.h new file mode 100644 index 0000000..5cdd5cd --- /dev/null +++ b/version/Core/Public/Logger/spdlog/fmt/ostr.h @@ -0,0 +1,17 @@ +// +// Copyright(c) 2016 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// include external or bundled copy of fmtlib's ostream support +// +#if !defined(SPDLOG_FMT_EXTERNAL) +#include "fmt.h" +#include "bundled/ostream.h" +#else +#include +#endif + + diff --git a/version/Core/Public/Logger/spdlog/formatter.h b/version/Core/Public/Logger/spdlog/formatter.h new file mode 100644 index 0000000..8bf0f43 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/formatter.h @@ -0,0 +1,47 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "details/log_msg.h" + +#include +#include +#include + +namespace spdlog +{ +namespace details +{ +class flag_formatter; +} + +class formatter +{ +public: + virtual ~formatter() {} + virtual void format(details::log_msg& msg) = 0; +}; + +class pattern_formatter SPDLOG_FINAL : public formatter +{ + +public: + explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local); + pattern_formatter(const pattern_formatter&) = delete; + pattern_formatter& operator=(const pattern_formatter&) = delete; + void format(details::log_msg& msg) override; +private: + const std::string _pattern; + const pattern_time_type _pattern_time; + std::vector> _formatters; + std::tm get_time(details::log_msg& msg); + void handle_flag(char flag); + void compile_pattern(const std::string& pattern); +}; +} + +#include "details/pattern_formatter_impl.h" + diff --git a/version/Core/Public/Logger/spdlog/logger.h b/version/Core/Public/Logger/spdlog/logger.h new file mode 100644 index 0000000..742f667 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/logger.h @@ -0,0 +1,110 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +// Thread safe logger (except for set_pattern(..), set_formatter(..) and set_error_handler()) +// Has name, log level, vector of std::shared sink pointers and formatter +// Upon each log write the logger: +// 1. Checks if its log level is enough to log the message +// 2. Format the message using the formatter function +// 3. Pass the formatted message to its sinks to performa the actual logging + +#include "sinks/base_sink.h" +#include "common.h" + +#include +#include +#include + +namespace spdlog +{ + +class logger +{ +public: + logger(const std::string& logger_name, sink_ptr single_sink); + logger(const std::string& name, sinks_init_list); + template + logger(const std::string& name, const It& begin, const It& end); + + virtual ~logger(); + logger(const logger&) = delete; + logger& operator=(const logger&) = delete; + + + template void log(level::level_enum lvl, const char* fmt, const Args&... args); + template void log(level::level_enum lvl, const char* msg); + template void trace(const char* fmt, const Arg1&, const Args&... args); + template void debug(const char* fmt, const Arg1&, const Args&... args); + template void info(const char* fmt, const Arg1&, const Args&... args); + template void warn(const char* fmt, const Arg1&, const Args&... args); + template void error(const char* fmt, const Arg1&, const Args&... args); + template void critical(const char* fmt, const Arg1&, const Args&... args); + + +#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT + template void log(level::level_enum lvl, const wchar_t* msg); + template void log(level::level_enum lvl, const wchar_t* fmt, const Args&... args); + template void trace(const wchar_t* fmt, const Args&... args); + template void debug(const wchar_t* fmt, const Args&... args); + template void info(const wchar_t* fmt, const Args&... args); + template void warn(const wchar_t* fmt, const Args&... args); + template void error(const wchar_t* fmt, const Args&... args); + template void critical(const wchar_t* fmt, const Args&... args); +#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT + + template void log(level::level_enum lvl, const T&); + template void trace(const T&); + template void debug(const T&); + template void info(const T&); + template void warn(const T&); + template void error(const T&); + template void critical(const T&); + + bool should_log(level::level_enum) const; + void set_level(level::level_enum); + level::level_enum level() const; + const std::string& name() const; + void set_pattern(const std::string&, pattern_time_type = pattern_time_type::local); + void set_formatter(formatter_ptr); + + // automatically call flush() if message level >= log_level + void flush_on(level::level_enum log_level); + + virtual void flush(); + + const std::vector& sinks() const; + + // error handler + virtual void set_error_handler(log_err_handler); + virtual log_err_handler error_handler(); + +protected: + virtual void _sink_it(details::log_msg&); + virtual void _set_pattern(const std::string&, pattern_time_type); + virtual void _set_formatter(formatter_ptr); + + // default error handler: print the error to stderr with the max rate of 1 message/minute + virtual void _default_err_handler(const std::string &msg); + + // return true if the given message level should trigger a flush + bool _should_flush_on(const details::log_msg&); + + // increment the message count (only if defined(SPDLOG_ENABLE_MESSAGE_COUNTER)) + void _incr_msg_counter(details::log_msg &msg); + + const std::string _name; + std::vector _sinks; + formatter_ptr _formatter; + spdlog::level_t _level; + spdlog::level_t _flush_level; + log_err_handler _err_handler; + std::atomic _last_err_time; + std::atomic _msg_counter; +}; +} + +#include "details/logger_impl.h" diff --git a/version/Core/Public/Logger/spdlog/sinks/android_sink.h b/version/Core/Public/Logger/spdlog/sinks/android_sink.h new file mode 100644 index 0000000..63f6d87 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/android_sink.h @@ -0,0 +1,90 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(__ANDROID__) + +#include "sink.h" + +#include +#include +#include +#include +#include + +#if !defined(SPDLOG_ANDROID_RETRIES) +#define SPDLOG_ANDROID_RETRIES 2 +#endif + +namespace spdlog +{ +namespace sinks +{ + +/* +* Android sink (logging using __android_log_write) +* __android_log_write is thread-safe. No lock is needed. +*/ +class android_sink : public sink +{ +public: + explicit android_sink(const std::string& tag = "spdlog", bool use_raw_msg = false): _tag(tag), _use_raw_msg(use_raw_msg) {} + + void log(const details::log_msg& msg) override + { + const android_LogPriority priority = convert_to_android(msg.level); + const char *msg_output = (_use_raw_msg ? msg.raw.c_str() : msg.formatted.c_str()); + + // See system/core/liblog/logger_write.c for explanation of return value + int ret = __android_log_write(priority, _tag.c_str(), msg_output); + int retry_count = 0; + while ((ret == -11/*EAGAIN*/) && (retry_count < SPDLOG_ANDROID_RETRIES)) + { + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + ret = __android_log_write(priority, _tag.c_str(), msg_output); + retry_count++; + } + + if (ret < 0) + { + throw spdlog_ex("__android_log_write() failed", ret); + } + } + + void flush() override + { + } + +private: + static android_LogPriority convert_to_android(spdlog::level::level_enum level) + { + switch(level) + { + case spdlog::level::trace: + return ANDROID_LOG_VERBOSE; + case spdlog::level::debug: + return ANDROID_LOG_DEBUG; + case spdlog::level::info: + return ANDROID_LOG_INFO; + case spdlog::level::warn: + return ANDROID_LOG_WARN; + case spdlog::level::err: + return ANDROID_LOG_ERROR; + case spdlog::level::critical: + return ANDROID_LOG_FATAL; + default: + return ANDROID_LOG_DEFAULT; + } + } + + std::string _tag; + bool _use_raw_msg; +}; + +} +} + +#endif diff --git a/version/Core/Public/Logger/spdlog/sinks/ansicolor_sink.h b/version/Core/Public/Logger/spdlog/sinks/ansicolor_sink.h new file mode 100644 index 0000000..2909731 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/ansicolor_sink.h @@ -0,0 +1,133 @@ +// +// Copyright(c) 2017 spdlog authors. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "base_sink.h" +#include "../common.h" +#include "../details/os.h" + +#include +#include + +namespace spdlog +{ +namespace sinks +{ + +/** + * This sink prefixes the output with an ANSI escape sequence color code depending on the severity + * of the message. + * If no color terminal detected, omit the escape codes. + */ +template +class ansicolor_sink: public base_sink +{ +public: + ansicolor_sink(FILE* file): target_file_(file) + { + should_do_colors_ = details::os::in_terminal(file) && details::os::is_color_terminal(); + colors_[level::trace] = cyan; + colors_[level::debug] = cyan; + colors_[level::info] = reset; + colors_[level::warn] = yellow + bold; + colors_[level::err] = red + bold; + colors_[level::critical] = bold + on_red; + colors_[level::off] = reset; + } + virtual ~ansicolor_sink() + { + _flush(); + } + + void set_color(level::level_enum color_level, const std::string& color) + { + std::lock_guard lock(base_sink::_mutex); + colors_[color_level] = color; + } + + /// Formatting codes + const std::string reset = "\033[00m"; + const std::string bold = "\033[1m"; + const std::string dark = "\033[2m"; + const std::string underline = "\033[4m"; + const std::string blink = "\033[5m"; + const std::string reverse = "\033[7m"; + const std::string concealed = "\033[8m"; + + // Foreground colors + const std::string grey = "\033[30m"; + const std::string red = "\033[31m"; + const std::string green = "\033[32m"; + const std::string yellow = "\033[33m"; + const std::string blue = "\033[34m"; + const std::string magenta = "\033[35m"; + const std::string cyan = "\033[36m"; + const std::string white = "\033[37m"; + + /// Background colors + const std::string on_grey = "\033[40m"; + const std::string on_red = "\033[41m"; + const std::string on_green = "\033[42m"; + const std::string on_yellow = "\033[43m"; + const std::string on_blue = "\033[44m"; + const std::string on_magenta = "\033[45m"; + const std::string on_cyan = "\033[46m"; + const std::string on_white = "\033[47m"; + +protected: + virtual void _sink_it(const details::log_msg& msg) override + { + // Wrap the originally formatted message in color codes. + // If color is not supported in the terminal, log as is instead. + if (should_do_colors_) + { + const std::string& prefix = colors_[msg.level]; + fwrite(prefix.data(), sizeof(char), prefix.size(), target_file_); + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_); + fwrite(reset.data(), sizeof(char), reset.size(), target_file_); + } + else + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_); + } + _flush(); + } + + void _flush() override + { + fflush(target_file_); + } + FILE* target_file_; + bool should_do_colors_; + std::map colors_; +}; + + +template +class ansicolor_stdout_sink: public ansicolor_sink +{ +public: + ansicolor_stdout_sink(): ansicolor_sink(stdout) + {} +}; + +template +class ansicolor_stderr_sink: public ansicolor_sink +{ +public: + ansicolor_stderr_sink(): ansicolor_sink(stderr) + {} +}; + +typedef ansicolor_stdout_sink ansicolor_stdout_sink_mt; +typedef ansicolor_stdout_sink ansicolor_stdout_sink_st; + +typedef ansicolor_stderr_sink ansicolor_stderr_sink_mt; +typedef ansicolor_stderr_sink ansicolor_stderr_sink_st; + +} // namespace sinks +} // namespace spdlog + diff --git a/version/Core/Public/Logger/spdlog/sinks/base_sink.h b/version/Core/Public/Logger/spdlog/sinks/base_sink.h new file mode 100644 index 0000000..23c8565 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/base_sink.h @@ -0,0 +1,51 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once +// +// base sink templated over a mutex (either dummy or real) +// concrete implementation should only override the _sink_it method. +// all locking is taken care of here so no locking needed by the implementers.. +// + +#include "sink.h" +#include "../formatter.h" +#include "../common.h" +#include "../details/log_msg.h" + +#include + +namespace spdlog +{ +namespace sinks +{ +template +class base_sink:public sink +{ +public: + base_sink():_mutex() {} + virtual ~base_sink() = default; + + base_sink(const base_sink&) = delete; + base_sink& operator=(const base_sink&) = delete; + + void log(const details::log_msg& msg) SPDLOG_FINAL override + { + std::lock_guard lock(_mutex); + _sink_it(msg); + } + void flush() SPDLOG_FINAL override + { + std::lock_guard lock(_mutex); + _flush(); + } + +protected: + virtual void _sink_it(const details::log_msg& msg) = 0; + virtual void _flush() = 0; + Mutex _mutex; +}; +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/dist_sink.h b/version/Core/Public/Logger/spdlog/sinks/dist_sink.h new file mode 100644 index 0000000..537efe1 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/dist_sink.h @@ -0,0 +1,72 @@ +// +// Copyright (c) 2015 David Schury, Gabi Melman +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../details/log_msg.h" +#include "../details/null_mutex.h" +#include "base_sink.h" +#include "sink.h" + +#include +#include +#include +#include + +// Distribution sink (mux). Stores a vector of sinks which get called when log is called + +namespace spdlog +{ +namespace sinks +{ +template +class dist_sink: public base_sink +{ +public: + explicit dist_sink() :_sinks() {} + dist_sink(const dist_sink&) = delete; + dist_sink& operator=(const dist_sink&) = delete; + virtual ~dist_sink() = default; + +protected: + std::vector> _sinks; + + void _sink_it(const details::log_msg& msg) override + { + for (auto &sink : _sinks) + { + if( sink->should_log( msg.level)) + { + sink->log(msg); + } + } + } + + void _flush() override + { + for (auto &sink : _sinks) + sink->flush(); + } + +public: + + + void add_sink(std::shared_ptr sink) + { + std::lock_guard lock(base_sink::_mutex); + _sinks.push_back(sink); + } + + void remove_sink(std::shared_ptr sink) + { + std::lock_guard lock(base_sink::_mutex); + _sinks.erase(std::remove(_sinks.begin(), _sinks.end(), sink), _sinks.end()); + } +}; + +typedef dist_sink dist_sink_mt; +typedef dist_sink dist_sink_st; +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/file_sinks.h b/version/Core/Public/Logger/spdlog/sinks/file_sinks.h new file mode 100644 index 0000000..e785617 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/file_sinks.h @@ -0,0 +1,253 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "base_sink.h" +#include "../details/null_mutex.h" +#include "../details/file_helper.h" +#include "../fmt/fmt.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* + * Trivial file sink with single file as target + */ +template +class simple_file_sink SPDLOG_FINAL : public base_sink < Mutex > +{ +public: + explicit simple_file_sink(const filename_t &filename, bool truncate = false):_force_flush(false) + { + _file_helper.open(filename, truncate); + } + + void set_force_flush(bool force_flush) + { + _force_flush = force_flush; + } + +protected: + void _sink_it(const details::log_msg& msg) override + { + _file_helper.write(msg); + if(_force_flush) + _file_helper.flush(); + } + void _flush() override + { + _file_helper.flush(); + } +private: + details::file_helper _file_helper; + bool _force_flush; +}; + +typedef simple_file_sink simple_file_sink_mt; +typedef simple_file_sink simple_file_sink_st; + +/* + * Rotating file sink based on size + */ +template +class rotating_file_sink SPDLOG_FINAL : public base_sink < Mutex > +{ +public: + rotating_file_sink(const filename_t &base_filename, + std::size_t max_size, std::size_t max_files) : + _base_filename(base_filename), + _max_size(max_size), + _max_files(max_files), + _current_size(0), + _file_helper() + { + _file_helper.open(calc_filename(_base_filename, 0)); + _current_size = _file_helper.size(); //expensive. called only once + } + + // calc filename according to index and file extension if exists. + // e.g. calc_filename("logs/mylog.txt, 3) => "logs/mylog.3.txt". + static filename_t calc_filename(const filename_t& filename, std::size_t index) + { + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + if (index) + { + filename_t basename, ext; + std::tie(basename, ext) = details::file_helper::split_by_extenstion(filename); + w.write(SPDLOG_FILENAME_T("{}.{}{}"), basename, index, ext); + } + else + { + w.write(SPDLOG_FILENAME_T("{}"), filename); + } + return w.str(); + } + +protected: + void _sink_it(const details::log_msg& msg) override + { + _current_size += msg.formatted.size(); + if (_current_size > _max_size) + { + _rotate(); + _current_size = msg.formatted.size(); + } + _file_helper.write(msg); + } + + void _flush() override + { + _file_helper.flush(); + } + + +private: + // Rotate files: + // log.txt -> log.1.txt + // log.1.txt -> log.2.txt + // log.2.txt -> log.3.txt + // log.3.txt -> delete + void _rotate() + { + using details::os::filename_to_str; + _file_helper.close(); + for (auto i = _max_files; i > 0; --i) + { + filename_t src = calc_filename(_base_filename, i - 1); + filename_t target = calc_filename(_base_filename, i); + + if (details::file_helper::file_exists(target)) + { + if (details::os::remove(target) != 0) + { + throw spdlog_ex("rotating_file_sink: failed removing " + filename_to_str(target), errno); + } + } + if (details::file_helper::file_exists(src) && details::os::rename(src, target)) + { + throw spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno); + } + } + _file_helper.reopen(true); + } + filename_t _base_filename; + std::size_t _max_size; + std::size_t _max_files; + std::size_t _current_size; + details::file_helper _file_helper; +}; + +typedef rotating_file_sink rotating_file_sink_mt; +typedef rotating_file_sinkrotating_file_sink_st; + +/* + * Default generator of daily log file names. + */ +struct default_daily_file_name_calculator +{ + // Create filename for the form filename.YYYY-MM-DD_hh-mm.ext + static filename_t calc_filename(const filename_t& filename) + { + std::tm tm = spdlog::details::os::localtime(); + filename_t basename, ext; + std::tie(basename, ext) = details::file_helper::split_by_extenstion(filename); + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + w.write(SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}_{:02d}-{:02d}{}"), basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, ext); + return w.str(); + } +}; + +/* + * Generator of daily log file names in format basename.YYYY-MM-DD.ext + */ +struct dateonly_daily_file_name_calculator +{ + // Create filename for the form basename.YYYY-MM-DD + static filename_t calc_filename(const filename_t& filename) + { + std::tm tm = spdlog::details::os::localtime(); + filename_t basename, ext; + std::tie(basename, ext) = details::file_helper::split_by_extenstion(filename); + std::conditional::value, fmt::MemoryWriter, fmt::WMemoryWriter>::type w; + w.write(SPDLOG_FILENAME_T("{}_{:04d}-{:02d}-{:02d}{}"), basename, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, ext); + return w.str(); + } +}; + +/* + * Rotating file sink based on date. rotates at midnight + */ +template +class daily_file_sink SPDLOG_FINAL :public base_sink < Mutex > +{ +public: + //create daily file sink which rotates on given time + daily_file_sink( + const filename_t& base_filename, + int rotation_hour, + int rotation_minute) : _base_filename(base_filename), + _rotation_h(rotation_hour), + _rotation_m(rotation_minute) + { + if (rotation_hour < 0 || rotation_hour > 23 || rotation_minute < 0 || rotation_minute > 59) + throw spdlog_ex("daily_file_sink: Invalid rotation time in ctor"); + _rotation_tp = _next_rotation_tp(); + _file_helper.open(FileNameCalc::calc_filename(_base_filename)); + } + + +protected: + void _sink_it(const details::log_msg& msg) override + { + if (std::chrono::system_clock::now() >= _rotation_tp) + { + _file_helper.open(FileNameCalc::calc_filename(_base_filename)); + _rotation_tp = _next_rotation_tp(); + } + _file_helper.write(msg); + } + + void _flush() override + { + _file_helper.flush(); + } + +private: + std::chrono::system_clock::time_point _next_rotation_tp() + { + auto now = std::chrono::system_clock::now(); + time_t tnow = std::chrono::system_clock::to_time_t(now); + tm date = spdlog::details::os::localtime(tnow); + date.tm_hour = _rotation_h; + date.tm_min = _rotation_m; + date.tm_sec = 0; + auto rotation_time = std::chrono::system_clock::from_time_t(std::mktime(&date)); + if (rotation_time > now) + return rotation_time; + else + return std::chrono::system_clock::time_point(rotation_time + std::chrono::hours(24)); + } + + filename_t _base_filename; + int _rotation_h; + int _rotation_m; + std::chrono::system_clock::time_point _rotation_tp; + details::file_helper _file_helper; +}; + +typedef daily_file_sink daily_file_sink_mt; +typedef daily_file_sink daily_file_sink_st; +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/msvc_sink.h b/version/Core/Public/Logger/spdlog/sinks/msvc_sink.h new file mode 100644 index 0000000..22b52c8 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/msvc_sink.h @@ -0,0 +1,51 @@ +// +// Copyright(c) 2016 Alexander Dalshov. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(_WIN32) + +#include "base_sink.h" +#include "../details/null_mutex.h" + +#include + +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* +* MSVC sink (logging using OutputDebugStringA) +*/ +template +class msvc_sink : public base_sink < Mutex > +{ +public: + explicit msvc_sink() + { + } + + + +protected: + void _sink_it(const details::log_msg& msg) override + { + OutputDebugStringA(msg.formatted.c_str()); + } + + void _flush() override + {} +}; + +typedef msvc_sink msvc_sink_mt; +typedef msvc_sink msvc_sink_st; + +} +} + +#endif diff --git a/version/Core/Public/Logger/spdlog/sinks/null_sink.h b/version/Core/Public/Logger/spdlog/sinks/null_sink.h new file mode 100644 index 0000000..7605ac6 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/null_sink.h @@ -0,0 +1,34 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "base_sink.h" +#include "../details/null_mutex.h" + +#include + +namespace spdlog +{ +namespace sinks +{ + +template +class null_sink : public base_sink < Mutex > +{ +protected: + void _sink_it(const details::log_msg&) override + {} + + void _flush() override + {} + +}; +typedef null_sink null_sink_st; +typedef null_sink null_sink_mt; + +} +} + diff --git a/version/Core/Public/Logger/spdlog/sinks/ostream_sink.h b/version/Core/Public/Logger/spdlog/sinks/ostream_sink.h new file mode 100644 index 0000000..1e5b261 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/ostream_sink.h @@ -0,0 +1,47 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../details/null_mutex.h" +#include "base_sink.h" + +#include +#include + +namespace spdlog +{ +namespace sinks +{ +template +class ostream_sink: public base_sink +{ +public: + explicit ostream_sink(std::ostream& os, bool force_flush=false) :_ostream(os), _force_flush(force_flush) {} + ostream_sink(const ostream_sink&) = delete; + ostream_sink& operator=(const ostream_sink&) = delete; + virtual ~ostream_sink() = default; + +protected: + void _sink_it(const details::log_msg& msg) override + { + _ostream.write(msg.formatted.data(), msg.formatted.size()); + if (_force_flush) + _ostream.flush(); + } + + void _flush() override + { + _ostream.flush(); + } + + std::ostream& _ostream; + bool _force_flush; +}; + +typedef ostream_sink ostream_sink_mt; +typedef ostream_sink ostream_sink_st; +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/sink.h b/version/Core/Public/Logger/spdlog/sinks/sink.h new file mode 100644 index 0000000..af61b54 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/sink.h @@ -0,0 +1,53 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + + +#pragma once + +#include "../details/log_msg.h" + +namespace spdlog +{ +namespace sinks +{ +class sink +{ +public: + sink() + { + _level = level::trace; + } + + virtual ~sink() {} + virtual void log(const details::log_msg& msg) = 0; + virtual void flush() = 0; + + bool should_log(level::level_enum msg_level) const; + void set_level(level::level_enum log_level); + level::level_enum level() const; + +private: + level_t _level; + +}; + +inline bool sink::should_log(level::level_enum msg_level) const +{ + return msg_level >= _level.load(std::memory_order_relaxed); +} + +inline void sink::set_level(level::level_enum log_level) +{ + _level.store(log_level); +} + +inline level::level_enum sink::level() const +{ + return static_cast(_level.load(std::memory_order_relaxed)); +} + +} +} + diff --git a/version/Core/Public/Logger/spdlog/sinks/stdout_sinks.h b/version/Core/Public/Logger/spdlog/sinks/stdout_sinks.h new file mode 100644 index 0000000..dfbfccd --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/stdout_sinks.h @@ -0,0 +1,77 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../details/null_mutex.h" +#include "base_sink.h" + +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ + +template +class stdout_sink SPDLOG_FINAL : public base_sink +{ + using MyType = stdout_sink; +public: + stdout_sink() + {} + static std::shared_ptr instance() + { + static std::shared_ptr instance = std::make_shared(); + return instance; + } +protected: + void _sink_it(const details::log_msg& msg) override + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), stdout); + _flush(); + } + + void _flush() override + { + fflush(stdout); + } +}; + +typedef stdout_sink stdout_sink_st; +typedef stdout_sink stdout_sink_mt; + + +template +class stderr_sink SPDLOG_FINAL : public base_sink +{ + using MyType = stderr_sink; +public: + stderr_sink() + {} + static std::shared_ptr instance() + { + static std::shared_ptr instance = std::make_shared(); + return instance; + } +protected: + void _sink_it(const details::log_msg& msg) override + { + fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), stderr); + _flush(); + } + + void _flush() override + { + fflush(stderr); + } +}; + +typedef stderr_sink stderr_sink_mt; +typedef stderr_sink stderr_sink_st; +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/syslog_sink.h b/version/Core/Public/Logger/spdlog/sinks/syslog_sink.h new file mode 100644 index 0000000..c4a726a --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/syslog_sink.h @@ -0,0 +1,81 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "../common.h" + +#ifdef SPDLOG_ENABLE_SYSLOG + +#include "sink.h" +#include "../details/log_msg.h" + +#include +#include +#include + + +namespace spdlog +{ +namespace sinks +{ +/** + * Sink that write to syslog using the `syscall()` library call. + * + * Locking is not needed, as `syslog()` itself is thread-safe. + */ +class syslog_sink : public sink +{ +public: + // + syslog_sink(const std::string& ident = "", int syslog_option=0, int syslog_facility=LOG_USER): + _ident(ident) + { + _priorities[static_cast(level::trace)] = LOG_DEBUG; + _priorities[static_cast(level::debug)] = LOG_DEBUG; + _priorities[static_cast(level::info)] = LOG_INFO; + _priorities[static_cast(level::warn)] = LOG_WARNING; + _priorities[static_cast(level::err)] = LOG_ERR; + _priorities[static_cast(level::critical)] = LOG_CRIT; + _priorities[static_cast(level::off)] = LOG_INFO; + + //set ident to be program name if empty + ::openlog(_ident.empty()? nullptr:_ident.c_str(), syslog_option, syslog_facility); + } + ~syslog_sink() + { + ::closelog(); + } + + syslog_sink(const syslog_sink&) = delete; + syslog_sink& operator=(const syslog_sink&) = delete; + + void log(const details::log_msg &msg) override + { + ::syslog(syslog_prio_from_level(msg), "%s", msg.raw.str().c_str()); + } + + void flush() override + { + } + + +private: + std::array _priorities; + //must store the ident because the man says openlog might use the pointer as is and not a string copy + const std::string _ident; + + // + // Simply maps spdlog's log level to syslog priority level. + // + int syslog_prio_from_level(const details::log_msg &msg) const + { + return _priorities[static_cast(msg.level)]; + } +}; +} +} + +#endif diff --git a/version/Core/Public/Logger/spdlog/sinks/wincolor_sink.h b/version/Core/Public/Logger/spdlog/sinks/wincolor_sink.h new file mode 100644 index 0000000..c1757b1 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/wincolor_sink.h @@ -0,0 +1,122 @@ +// +// Copyright(c) 2016 spdlog +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#include "base_sink.h" +#include "../details/null_mutex.h" +#include "../common.h" + +#include +#include +#include +#include + +namespace spdlog +{ +namespace sinks +{ +/* + * Windows color console sink. Uses WriteConsoleA to write to the console with colors + */ +template +class wincolor_sink: public base_sink +{ +public: + const WORD BOLD = FOREGROUND_INTENSITY; + const WORD RED = FOREGROUND_RED; + const WORD CYAN = FOREGROUND_GREEN | FOREGROUND_BLUE; + const WORD WHITE = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; + const WORD YELLOW = FOREGROUND_RED | FOREGROUND_GREEN; + const WORD GREEN = FOREGROUND_GREEN; + + wincolor_sink(HANDLE std_handle): out_handle_(std_handle) + { + colors_[level::trace] = CYAN; + colors_[level::debug] = CYAN; + colors_[level::info] = GREEN; + colors_[level::warn] = YELLOW | BOLD; + colors_[level::err] = RED | BOLD; // red bold + colors_[level::critical] = BACKGROUND_RED | WHITE | BOLD; // white bold on red background + colors_[level::off] = 0; + } + + virtual ~wincolor_sink() + { + this->flush(); + } + + wincolor_sink(const wincolor_sink& other) = delete; + wincolor_sink& operator=(const wincolor_sink& other) = delete; + +protected: + virtual void _sink_it(const details::log_msg& msg) override + { + auto color = colors_[msg.level]; + auto orig_attribs = set_console_attribs(color); + WriteConsoleA(out_handle_, msg.formatted.data(), static_cast(msg.formatted.size()), nullptr, nullptr); + SetConsoleTextAttribute(out_handle_, orig_attribs); //reset to orig colors + } + + virtual void _flush() override + { + // windows console always flushed? + } + + // change the color for the given level + void set_color(level::level_enum level, WORD color) + { + std::lock_guard lock(base_sink::_mutex); + colors_[level] = color; + } + +private: + HANDLE out_handle_; + std::map colors_; + + // set color and return the orig console attributes (for resetting later) + WORD set_console_attribs(WORD attribs) + { + CONSOLE_SCREEN_BUFFER_INFO orig_buffer_info; + GetConsoleScreenBufferInfo(out_handle_, &orig_buffer_info); + WORD back_color = orig_buffer_info.wAttributes; + // retrieve the current background color + back_color &= ~(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); + // keep the background color unchanged + SetConsoleTextAttribute(out_handle_, attribs | back_color); + return orig_buffer_info.wAttributes; //return orig attribs + } +}; + +// +// windows color console to stdout +// +template +class wincolor_stdout_sink: public wincolor_sink +{ +public: + wincolor_stdout_sink() : wincolor_sink(GetStdHandle(STD_OUTPUT_HANDLE)) + {} +}; + +typedef wincolor_stdout_sink wincolor_stdout_sink_mt; +typedef wincolor_stdout_sink wincolor_stdout_sink_st; + +// +// windows color console to stderr +// +template +class wincolor_stderr_sink: public wincolor_sink +{ +public: + wincolor_stderr_sink() : wincolor_sink(GetStdHandle(STD_ERROR_HANDLE)) + {} +}; + +typedef wincolor_stderr_sink wincolor_stderr_sink_mt; +typedef wincolor_stderr_sink wincolor_stderr_sink_st; + +} +} diff --git a/version/Core/Public/Logger/spdlog/sinks/windebug_sink.h b/version/Core/Public/Logger/spdlog/sinks/windebug_sink.h new file mode 100644 index 0000000..c22e952 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/sinks/windebug_sink.h @@ -0,0 +1,29 @@ +// +// Copyright(c) 2017 Alexander Dalshov. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(_WIN32) + +#include "msvc_sink.h" + +namespace spdlog +{ +namespace sinks +{ + +/* +* Windows debug sink (logging using OutputDebugStringA, synonym for msvc_sink) +*/ +template +using windebug_sink = msvc_sink; + +typedef msvc_sink_mt windebug_sink_mt; +typedef msvc_sink_st windebug_sink_st; + +} +} + +#endif diff --git a/version/Core/Public/Logger/spdlog/spdlog.h b/version/Core/Public/Logger/spdlog/spdlog.h new file mode 100644 index 0000000..6907086 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/spdlog.h @@ -0,0 +1,188 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// +// spdlog main header file. +// see example.cpp for usage example + +#pragma once + +#define SPDLOG_VERSION "0.16.2" + +#include "tweakme.h" +#include "common.h" +#include "logger.h" + +#include +#include +#include +#include + +namespace spdlog +{ + +// +// Return an existing logger or nullptr if a logger with such name doesn't exist. +// example: spdlog::get("my_logger")->info("hello {}", "world"); +// +std::shared_ptr get(const std::string& name); + + +// +// Set global formatting +// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v"); +// +void set_pattern(const std::string& format_string); +void set_formatter(formatter_ptr f); + +// +// Set global logging level for +// +void set_level(level::level_enum log_level); + +// +// Set global error handler +// +void set_error_handler(log_err_handler); + +// +// Turn on async mode (off by default) and set the queue size for each async_logger. +// effective only for loggers created after this call. +// queue_size: size of queue (must be power of 2): +// Each logger will pre-allocate a dedicated queue with queue_size entries upon construction. +// +// async_overflow_policy (optional, block_retry by default): +// async_overflow_policy::block_retry - if queue is full, block until queue has room for the new log entry. +// async_overflow_policy::discard_log_msg - never block and discard any new messages when queue overflows. +// +// worker_warmup_cb (optional): +// callback function that will be called in worker thread upon start (can be used to init stuff like thread affinity) +// +// worker_teardown_cb (optional): +// callback function that will be called in worker thread upon exit +// +void set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Turn off async mode +void set_sync_mode(); + + +// +// Create and register multi/single threaded basic file logger. +// Basic logger simply writes to given file without any limitations or rotations. +// +std::shared_ptr basic_logger_mt(const std::string& logger_name, const filename_t& filename, bool truncate = false); +std::shared_ptr basic_logger_st(const std::string& logger_name, const filename_t& filename, bool truncate = false); + +// +// Create and register multi/single threaded rotating file logger +// +std::shared_ptr rotating_logger_mt(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files); +std::shared_ptr rotating_logger_st(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files); + +// +// Create file logger which creates new file on the given time (default in midnight): +// +std::shared_ptr daily_logger_mt(const std::string& logger_name, const filename_t& filename, int hour=0, int minute=0); +std::shared_ptr daily_logger_st(const std::string& logger_name, const filename_t& filename, int hour=0, int minute=0); + +// +// Create and register stdout/stderr loggers +// +std::shared_ptr stdout_logger_mt(const std::string& logger_name); +std::shared_ptr stdout_logger_st(const std::string& logger_name); +std::shared_ptr stderr_logger_mt(const std::string& logger_name); +std::shared_ptr stderr_logger_st(const std::string& logger_name); +// +// Create and register colored stdout/stderr loggers +// +std::shared_ptr stdout_color_mt(const std::string& logger_name); +std::shared_ptr stdout_color_st(const std::string& logger_name); +std::shared_ptr stderr_color_mt(const std::string& logger_name); +std::shared_ptr stderr_color_st(const std::string& logger_name); + + +// +// Create and register a syslog logger +// +#ifdef SPDLOG_ENABLE_SYSLOG +std::shared_ptr syslog_logger(const std::string& logger_name, const std::string& ident = "", int syslog_option = 0, int syslog_facilty = (1<<3)); +#endif + +#if defined(__ANDROID__) +std::shared_ptr android_logger(const std::string& logger_name, const std::string& tag = "spdlog"); +#endif + +// Create and register a logger with a single sink +std::shared_ptr create(const std::string& logger_name, const sink_ptr& sink); + +// Create and register a logger with multiple sinks +std::shared_ptr create(const std::string& logger_name, sinks_init_list sinks); +template +std::shared_ptr create(const std::string& logger_name, const It& sinks_begin, const It& sinks_end); + + +// Create and register a logger with templated sink type +// Example: +// spdlog::create("mylog", "dailylog_filename"); +template +std::shared_ptr create(const std::string& logger_name, Args...); + +// Create and register an async logger with a single sink +std::shared_ptr create_async(const std::string& logger_name, const sink_ptr& sink, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Create and register an async logger with multiple sinks +std::shared_ptr create_async(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); +template +std::shared_ptr create_async(const std::string& logger_name, const It& sinks_begin, const It& sinks_end, size_t queue_size, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const std::function& worker_warmup_cb = nullptr, const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(), const std::function& worker_teardown_cb = nullptr); + +// Register the given logger with the given name +void register_logger(std::shared_ptr logger); + +// Apply a user defined function on all registered loggers +// Example: +// spdlog::apply_all([&](std::shared_ptr l) {l->flush();}); +void apply_all(std::function)> fun); + +// Drop the reference to the given logger +void drop(const std::string &name); + +// Drop all references from the registry +void drop_all(); + + +/////////////////////////////////////////////////////////////////////////////// +// +// Trace & Debug can be switched on/off at compile time for zero cost debug statements. +// Uncomment SPDLOG_DEBUG_ON/SPDLOG_TRACE_ON in tweakme.h to enable. +// SPDLOG_TRACE(..) will also print current file and line. +// +// Example: +// spdlog::set_level(spdlog::level::trace); +// SPDLOG_TRACE(my_logger, "some trace message"); +// SPDLOG_TRACE(my_logger, "another trace message {} {}", 1, 2); +// SPDLOG_DEBUG(my_logger, "some debug message {} {}", 3, 4); +/////////////////////////////////////////////////////////////////////////////// + +#ifdef SPDLOG_TRACE_ON +#define SPDLOG_STR_H(x) #x +#define SPDLOG_STR_HELPER(x) SPDLOG_STR_H(x) +#ifdef _MSC_VER +#define SPDLOG_TRACE(logger, ...) logger->trace("[ " __FILE__ "(" SPDLOG_STR_HELPER(__LINE__) ") ] " __VA_ARGS__) +#else +#define SPDLOG_TRACE(logger, ...) logger->trace("[ " __FILE__ ":" SPDLOG_STR_HELPER(__LINE__) " ] " __VA_ARGS__) +#endif +#else +#define SPDLOG_TRACE(logger, ...) +#endif + +#ifdef SPDLOG_DEBUG_ON +#define SPDLOG_DEBUG(logger, ...) logger->debug(__VA_ARGS__) +#else +#define SPDLOG_DEBUG(logger, ...) +#endif + +} + + +#include "details/spdlog_impl.h" diff --git a/version/Core/Public/Logger/spdlog/tweakme.h b/version/Core/Public/Logger/spdlog/tweakme.h new file mode 100644 index 0000000..ad01a09 --- /dev/null +++ b/version/Core/Public/Logger/spdlog/tweakme.h @@ -0,0 +1,160 @@ +// +// Copyright(c) 2015 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +/////////////////////////////////////////////////////////////////////////////// +// +// Edit this file to squeeze more performance, and to customize supported features +// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Under Linux, the much faster CLOCK_REALTIME_COARSE clock can be used. +// This clock is less accurate - can be off by dozens of millis - depending on the kernel HZ. +// Uncomment to use it instead of the regular clock. +// +// #define SPDLOG_CLOCK_COARSE +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if date/time logging is not needed and never appear in the log pattern. +// This will prevent spdlog from querying the clock on each log call. +// +// WARNING: If the log pattern contains any date/time while this flag is on, the result is undefined. +// You must set new pattern(spdlog::set_pattern(..") without any date/time in it +// +// #define SPDLOG_NO_DATETIME +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if thread id logging is not needed (i.e. no %t in the log pattern). +// This will prevent spdlog from querying the thread id on each log call. +// +// WARNING: If the log pattern contains thread id (i.e, %t) while this flag is on, the result is undefined. +// +// #define SPDLOG_NO_THREAD_ID +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to prevent spdlog from caching thread ids in thread local storage. +// By default spdlog saves thread ids in tls to gain a few micros for each call. +// +// WARNING: if your program forks, UNCOMMENT this flag to prevent undefined thread ids in the children logs. +// +// #define SPDLOG_DISABLE_TID_CACHING +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if logger name logging is not needed. +// This will prevent spdlog from copying the logger name on each log call. +// +// #define SPDLOG_NO_NAME +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable the SPDLOG_DEBUG/SPDLOG_TRACE macros. +// +// #define SPDLOG_DEBUG_ON +// #define SPDLOG_TRACE_ON +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to avoid locking in the registry operations (spdlog::get(), spdlog::drop() spdlog::register()). +// Use only if your code never modifies concurrently the registry. +// Note that upon creating a logger the registry is modified by spdlog.. +// +// #define SPDLOG_NO_REGISTRY_MUTEX +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to avoid spdlog's usage of atomic log levels +// Use only if your code never modifies a logger's log levels concurrently by different threads. +// +// #define SPDLOG_NO_ATOMIC_LEVELS +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable usage of wchar_t for file names on Windows. +// +// #define SPDLOG_WCHAR_FILENAMES +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows) +// +// #define SPDLOG_EOL ";-)\n" +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to use your own copy of the fmt library instead of spdlog's copy. +// In this case spdlog will try to include so set your -I flag accordingly. +// +// #define SPDLOG_FMT_EXTERNAL +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to use printf-style messages in your logs instead of the usual +// format-style used by default. +// +// #define SPDLOG_FMT_PRINTF +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable syslog (disabled by default) +// +// #define SPDLOG_ENABLE_SYSLOG +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable wchar_t support (convert to utf8) +// +// #define SPDLOG_WCHAR_TO_UTF8_SUPPORT +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to prevent child processes from inheriting log file descriptors +// +// #define SPDLOG_PREVENT_CHILD_FD +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment if your compiler doesn't support the "final" keyword. +// The final keyword allows more optimizations in release +// mode with recent compilers. See GCC's documentation for -Wsuggest-final-types +// for instance. +// +// #define SPDLOG_NO_FINAL +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to enable message counting feature. +// Use the %i in the logger pattern to display log message sequence id. +// +// #define SPDLOG_ENABLE_MESSAGE_COUNTER +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Uncomment to customize level names (e.g. "MT TRACE") +// +// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING", "MY ERROR", "MY CRITICAL", "OFF" } +/////////////////////////////////////////////////////////////////////////////// diff --git a/version/Core/Public/Tools.h b/version/Core/Public/Tools.h new file mode 100644 index 0000000..b01ba74 --- /dev/null +++ b/version/Core/Public/Tools.h @@ -0,0 +1,17 @@ +#pragma once + +#include "API/Base.h" + +#include + +namespace ArkApi::Tools +{ + ARK_API std::string GetCurrentDir(); + ARK_API std::wstring ConvertToWideStr(const std::string& text); + ARK_API std::string ConvertToAnsiStr(const std::wstring& text); + + /** + * \brief Returns true if plugin was loaded, false otherwise + */ + ARK_API bool IsPluginLoaded(const std::string& plugin_name); +} diff --git a/ArkApi/MinHook.h b/version/MinHook.h similarity index 100% rename from ArkApi/MinHook.h rename to version/MinHook.h diff --git a/version/json.hpp b/version/json.hpp new file mode 100644 index 0000000..5b0b0ea --- /dev/null +++ b/version/json.hpp @@ -0,0 +1,14874 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.0.1 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +Copyright (c) 2013-2017 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef NLOHMANN_JSON_HPP +#define NLOHMANN_JSON_HPP + +#include // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform +#include // array +#include // assert +#include // and, not, or +#include // lconv, localeconv +#include // isfinite, labs, ldexp, signbit +#include // nullptr_t, ptrdiff_t, size_t +#include // int64_t, uint64_t +#include // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull +#include // memcpy, strlen +#include // forward_list +#include // function, hash, less +#include // initializer_list +#include // hex +#include // istream, ostream +#include // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator +#include // numeric_limits +#include // locale +#include // map +#include // addressof, allocator, allocator_traits, unique_ptr +#include // accumulate +#include // stringstream +#include // getline, stoi, string, to_string +#include // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type +#include // declval, forward, make_pair, move, pair, swap +#include // valarray +#include // vector + +// exclude unsupported compilers +#if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) +#else + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(!!(x), 1) + #define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +template +struct adl_serializer; + +// forward declaration of basic_json (required to split the class) +template class ObjectType = std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = adl_serializer> +class basic_json; + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + + +/*! +@brief unnamed namespace with internal helper functions + +This namespace collects some functions that could not be defined inside the +@ref basic_json class. + +@since version 2.1.0 +*/ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] byte_ the byte index where the error occurred (or 0 if the + position cannot be determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t&. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + + + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + discarded ///< discarded by the the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string +- furthermore, each type is not smaller than itself +- discarded values are not comparable + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); + return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index]; +} + + +///////////// +// helpers // +///////////// + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +template +using uncvref_t = typename std::remove_cv::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template +struct merge_and_renumber; + +template +struct merge_and_renumber, index_sequence> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template +using index_sequence_for = make_index_sequence; + +/* +Implementation of two C++17 constructs: conjunction, negation. This is needed +to avoid evaluating all the traits in a condition + +For example: not std::is_same::value and has_value_type::value +will not compile when T = void (on MSVC at least). Whereas +conjunction>, has_value_type>::value will +stop evaluating if negation<...>::value == false + +Please note that those constructs must be used with caution, since symbols can +become very long quickly (which can slow down compilation and cause MSVC +internal compiler errors). Only use it when you have to (see example ahead). +*/ +template struct conjunction : std::true_type {}; +template struct conjunction : B1 {}; +template +struct conjunction : std::conditional, B1>::type {}; + +template struct negation : std::integral_constant {}; + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + + +////////////////// +// constructors // +////////////////// + +template struct external_constructor; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_type = value_t::array; + j.m_value = arr; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.assert_invariant(); + } + + template::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + j.m_type = value_t::array; + j.m_value.array = j.template create(begin(arr), end(arr)); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, const std::vector& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + } + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_type = value_t::object; + j.m_value = obj; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_type = value_t::object; + j.m_value.object = j.template create(begin(obj), end(obj)); + j.assert_invariant(); + } +}; + + +//////////////////////// +// has_/is_ functions // +//////////////////////// + +/*! +@brief Helper to determine whether there's a key_type for T. + +This helper is used to tell associative containers apart from other containers +such as sequence containers. For instance, `std::map` passes the test as it +contains a `mapped_type`, whereas `std::vector` fails the test. + +@sa http://stackoverflow.com/a/7728728/266378 +@since version 1.0.0, overworked in version 2.0.6 +*/ +#define NLOHMANN_JSON_HAS_HELPER(type) \ + template struct has_##type { \ + private: \ + template \ + static int detect(U &&); \ + static void detect(...); \ + public: \ + static constexpr bool value = \ + std::is_integral()))>::value; \ + } + +NLOHMANN_JSON_HAS_HELPER(mapped_type); +NLOHMANN_JSON_HAS_HELPER(key_type); +NLOHMANN_JSON_HAS_HELPER(value_type); +NLOHMANN_JSON_HAS_HELPER(iterator); + +#undef NLOHMANN_JSON_HAS_HELPER + + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl +{ + static constexpr auto value = + std::is_constructible::value and + std::is_constructible::value; +}; + +template +struct is_compatible_object_type +{ + static auto constexpr value = is_compatible_object_type_impl < + conjunction>, + has_mapped_type, + has_key_type>::value, + typename BasicJsonType::object_t, CompatibleObjectType >::value; +}; + +template +struct is_basic_json_nested_type +{ + static auto constexpr value = std::is_same::value or + std::is_same::value or + std::is_same::value or + std::is_same::value; +}; + +template +struct is_compatible_array_type +{ + static auto constexpr value = + conjunction>, + negation>, + negation>, + negation>, + has_value_type, + has_iterator>::value; +}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + std::is_constructible::value and + CompatibleLimits::is_integer and + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type +{ + static constexpr auto value = + is_compatible_integer_type_impl < + std::is_integral::value and + not std::is_same::value, + RealIntegerType, CompatibleNumberIntegerType >::value; +}; + + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json +{ + private: + // also check the return type of from_json + template::from_json( + std::declval(), std::declval()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json +{ + private: + template::from_json(std::declval()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +template +struct has_to_json +{ + private: + template::to_json( + std::declval(), std::declval()))> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + + +///////////// +// to_json // +///////////// + +template::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor::construct(j, b); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor::construct(j, s); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor::construct(j, std::move(s)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type::type; + external_constructor::construct(j, static_cast(e)); +} + +template +void to_json(BasicJsonType& j, const std::vector& e) +{ + external_constructor::construct(j, e); +} + +template::value or + std::is_same::value, + int> = 0> +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor::construct(j, arr); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, std::valarray arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor::construct(j, obj); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor::construct(j, std::move(obj)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, T (&arr)[N]) +{ + external_constructor::construct(j, arr); +} + +template +void to_json(BasicJsonType& j, const std::pair& p) +{ + j = {p.first, p.second}; +} + +template +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence) +{ + j = {std::get(t)...}; +} + +template +void to_json(BasicJsonType& j, const std::tuple& t) +{ + to_json_tuple_impl(j, t, index_sequence_for {}); +} + +/////////////// +// from_json // +/////////////// + +// overloads for basic_json template parameters +template::value and + not std::is_same::value, + int> = 0> +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_UNLIKELY(not j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()))); + } + b = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + s = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type::type val; + get_arithmetic_value(j, val); + e = static_cast(val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::array_t& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + arr = *j.template get_ptr(); +} + +// forward_list doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get(); + }); +} + +// valarray doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + l.resize(j.size()); + std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l)); +} + +template +void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0> /*unused*/) +{ + using std::end; + + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); +} + +template +auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval()), + void()) +{ + using std::end; + + arr.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); +} + +template +void from_json_array_impl(const BasicJsonType& j, std::array& arr, priority_tag<2> /*unused*/) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template::value and + std::is_convertible::value and + not std::is_same::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleArrayType& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + + from_json_array_impl(j, arr, priority_tag<2> {}); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleObjectType& obj) +{ + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()))); + } + + auto inner_object = j.template get_ptr(); + using value_type = typename CompatibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(obj, obj.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get()); + }); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value, + int> = 0> +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::boolean: + { + val = static_cast(*j.template get_ptr()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template +void from_json(const BasicJsonType& j, std::pair& p) +{ + p = {j.at(0).template get(), j.at(1).template get()}; +} + +template +void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence) +{ + t = std::make_tuple(j.at(Idx).template get::type>()...); +} + +template +void from_json(const BasicJsonType& j, std::tuple& t) +{ + from_json_tuple_impl(j, t, index_sequence_for {}); +} + +struct to_json_fn +{ + private: + template + auto call(BasicJsonType& j, T&& val, priority_tag<1> /*unused*/) const noexcept(noexcept(to_json(j, std::forward(val)))) + -> decltype(to_json(j, std::forward(val)), void()) + { + return to_json(j, std::forward(val)); + } + + template + void call(BasicJsonType& /*unused*/, T&& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find to_json() method in T's namespace"); + +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template + void operator()(BasicJsonType& j, T&& val) const + noexcept(noexcept(std::declval().call(j, std::forward(val), priority_tag<1> {}))) + { + return call(j, std::forward(val), priority_tag<1> {}); + } +}; + +struct from_json_fn +{ + private: + template + auto call(const BasicJsonType& j, T& val, priority_tag<1> /*unused*/) const + noexcept(noexcept(from_json(j, val))) + -> decltype(from_json(j, val), void()) + { + return from_json(j, val); + } + + template + void call(const BasicJsonType& /*unused*/, T& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find from_json() method in T's namespace"); +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template + void operator()(const BasicJsonType& j, T& val) const + noexcept(noexcept(std::declval().call(j, val, priority_tag<1> {}))) + { + return call(j, val, priority_tag<1> {}); + } +}; + +// taken from ranges-v3 +template +struct static_const +{ + static constexpr T value{}; +}; + +template +constexpr T static_const::value; + +//////////////////// +// input adapters // +//////////////////// + +/*! +@brief abstract input adapter interface + +Produces a stream of std::char_traits::int_type characters from a +std::istream, a buffer, or some other input type. Accepts the return of exactly +one non-EOF character for future input. The int_type characters returned +consist of all valid char values as positive values (typically unsigned char), +plus an EOF value outside that range, specified by the value of the function +std::char_traits::eof(). This value is typically -1, but could be any +arbitrary value which is not a valid char value. +*/ +struct input_adapter_protocol +{ + /// get a character [0,255] or std::char_traits::eof(). + virtual std::char_traits::int_type get_character() = 0; + /// restore the last non-eof() character to input + virtual void unget_character() = 0; + virtual ~input_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +using input_adapter_t = std::shared_ptr; + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter : public input_adapter_protocol +{ + public: + ~input_stream_adapter() override + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags + is.clear(); + } + + explicit input_stream_adapter(std::istream& i) + : is(i), sb(*i.rdbuf()) + { + // skip byte order mark + std::char_traits::int_type c; + if ((c = get_character()) == 0xEF) + { + if ((c = get_character()) == 0xBB) + { + if ((c = get_character()) == 0xBF) + { + return; // Ignore BOM + } + else if (c != std::char_traits::eof()) + { + is.unget(); + } + is.putback('\xBB'); + } + else if (c != std::char_traits::eof()) + { + is.unget(); + } + is.putback('\xEF'); + } + else if (c != std::char_traits::eof()) + { + is.unget(); // no byte order mark; process as usual + } + } + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + + // std::istream/std::streambuf use std::char_traits::to_int_type, to + // ensure that std::char_traits::eof() and the character 0xFF do not + // end up as the same value, eg. 0xFFFFFFFF. + std::char_traits::int_type get_character() override + { + return sb.sbumpc(); + } + + void unget_character() override + { + sb.sungetc(); // is.unget() avoided for performance + } + + private: + /// the associated input stream + std::istream& is; + std::streambuf& sb; +}; + +/// input adapter for buffer input +class input_buffer_adapter : public input_adapter_protocol +{ + public: + input_buffer_adapter(const char* b, const std::size_t l) + : cursor(b), limit(b + l), start(b) + { + // skip byte order mark + if (l >= 3 and b[0] == '\xEF' and b[1] == '\xBB' and b[2] == '\xBF') + { + cursor += 3; + } + } + + // delete because of pointer members + input_buffer_adapter(const input_buffer_adapter&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&) = delete; + + std::char_traits::int_type get_character() noexcept override + { + if (JSON_LIKELY(cursor < limit)) + { + return std::char_traits::to_int_type(*(cursor++)); + } + + return std::char_traits::eof(); + } + + void unget_character() noexcept override + { + if (JSON_LIKELY(cursor > start)) + { + --cursor; + } + } + + private: + /// pointer to the current character + const char* cursor; + /// pointer past the last character + const char* limit; + /// pointer to the first character + const char* start; +}; + +class input_adapter +{ + public: + // native support + + /// input adapter for input stream + input_adapter(std::istream& i) + : ia(std::make_shared(i)) {} + + /// input adapter for input stream + input_adapter(std::istream&& i) + : ia(std::make_shared(i)) {} + + /// input adapter for buffer + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, + int>::type = 0> + input_adapter(CharT b, std::size_t l) + : ia(std::make_shared(reinterpret_cast(b), l)) {} + + // derived support + + /// input adapter for string literal + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, + int>::type = 0> + input_adapter(CharT b) + : input_adapter(reinterpret_cast(b), + std::strlen(reinterpret_cast(b))) {} + + /// input adapter for iterator range with contiguous storage + template::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + input_adapter(IteratorType first, IteratorType last) + { + // assertion to check that the iterator range is indeed contiguous, + // see http://stackoverflow.com/a/35008842/266378 for more discussion + assert(std::accumulate( + first, last, std::pair(true, 0), + [&first](std::pair res, decltype(*first) val) + { + res.first &= (val == *(std::next(std::addressof(*first), res.second++))); + return res; + }).first); + + // assertion to check that each element is 1 byte long + static_assert( + sizeof(typename std::iterator_traits::value_type) == 1, + "each element in the iterator range must have the size of 1 byte"); + + const auto len = static_cast(std::distance(first, last)); + if (JSON_LIKELY(len > 0)) + { + // there is at least one element: use the address of first + ia = std::make_shared(reinterpret_cast(&(*first)), len); + } + else + { + // the address of first cannot be used: use nullptr + ia = std::make_shared(nullptr, len); + } + } + + /// input adapter for array + template + input_adapter(T (&array)[N]) + : input_adapter(std::begin(array), std::end(array)) {} + + /// input adapter for contiguous container + template::value and + std::is_base_of()))>::iterator_category>::value, + int>::type = 0> + input_adapter(const ContiguousContainer& c) + : input_adapter(std::begin(c), std::end(c)) {} + + operator input_adapter_t() + { + return ia; + } + + private: + /// the actual adapter + input_adapter_t ia = nullptr; +}; + +////////////////////// +// lexer and parser // +////////////////////// + +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template +class lexer +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return ""; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case lexer::token_type::value_unsigned: + case lexer::token_type::value_integer: + case lexer::token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return ""; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + default: // catch non-enum values + return "unknown token"; // LCOV_EXCL_LINE + } + } + + explicit lexer(detail::input_adapter_t adapter) + : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer& operator=(lexer&) = delete; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + static char get_decimal_point() noexcept + { + const auto loc = localeconv(); + assert(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + assert(current == 'u'); + int codepoint = 0; + + const auto factors = { 12, 8, 4, 0 }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' and current <= '9') + { + codepoint += ((current - 0x30) << factor); + } + else if (current >= 'A' and current <= 'F') + { + codepoint += ((current - 0x37) << factor); + } + else if (current >= 'a' and current <= 'f') + { + codepoint += ((current - 0x57) << factor); + } + else + { + return -1; + } + } + + assert(0x0000 <= codepoint and codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list ranges) + { + assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_LIKELY(*range <= current and current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 7159. While + scanning, bytes are escaped and copied into buffer yytext. Then the function + returns successfully, yytext is *not* null-terminated (as it may contain \0 + bytes), and yytext.size() is the number of bytes in the string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset yytext (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + assert(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_LIKELY(get() == '\\' and get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = + // high surrogate occupies the most significant 22 bits + (codepoint1 << 10) + // low surrogate occupies the least significant 15 bits + + codepoint2 + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00; + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(codepoint); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(0xC0 | (codepoint >> 6)); + add(0x80 | (codepoint & 0x3F)); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(0xE0 | (codepoint >> 12)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(0xF0 | (codepoint >> 18)); + add(0x80 | ((codepoint >> 12) & 0x3F)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + error_message = "invalid string: control character must be escaped"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_UNLIKELY(not next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 7159. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 7159. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in yytext. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() + { + // reset yytext to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + // all other characters are rejected outside scan_number() + assert(false); // LCOV_EXCL_LINE + } + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_unsigned = static_cast(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_integer = static_cast(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, yytext.data(), &endptr); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + token_type scan_literal(const char* literal_text, const std::size_t length, + token_type return_type) + { + assert(current == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_UNLIKELY(get() != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset yytext; current character is beginning of token + void reset() noexcept + { + yytext.clear(); + token_string.clear(); + token_string.push_back(std::char_traits::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + std::char_traits::int_type get() + { + ++chars_read; + current = ia->get_character(); + if (JSON_LIKELY(current != std::char_traits::eof())) + { + token_string.push_back(std::char_traits::to_char_type(current)); + } + return current; + } + + /// unget current character (return it again on next get) + void unget() + { + --chars_read; + if (JSON_LIKELY(current != std::char_traits::eof())) + { + ia->unget_character(); + assert(token_string.size() != 0); + token_string.pop_back(); + } + } + + /// add a character to yytext + void add(int c) + { + yytext.push_back(std::char_traits::to_char_type(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + std::string move_string() + { + return std::move(yytext); + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr std::size_t get_position() const noexcept + { + return chars_read; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if ('\x00' <= c and c <= '\x1F') + { + // escape control characters + std::stringstream ss; + ss << "(c) << ">"; + result += ss.str(); + } + else + { + // add character as is + result.push_back(c); + } + } + + return result; + } + + /// return syntax error message + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + token_type scan() + { + // read next character and ignore whitespace + do + { + get(); + } + while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + return scan_literal("true", 4, token_type::literal_true); + case 'f': + return scan_literal("false", 5, token_type::literal_false); + case 'n': + return scan_literal("null", 4, token_type::literal_null); + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + detail::input_adapter_t ia = nullptr; + + /// the current character + std::char_traits::int_type current = std::char_traits::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// raw input token string (for error messages) + std::vector token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + std::string yytext {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char decimal_point_char = '.'; +}; + +/*! +@brief syntax analysis + +This class implements a recursive decent parser. +*/ +template +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using lexer_t = lexer; + using token_type = typename lexer_t::token_type; + + public: + enum class parse_event_t : uint8_t + { + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value + }; + + using parser_callback_t = + std::function; + + /// a parser reading from an input adapter + explicit parser(detail::input_adapter_t adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true) + : callback(cb), m_lexer(adapter), allow_exceptions(allow_exceptions_) + {} + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + // read first token + get_token(); + + parse_internal(true, result); + result.assert_invariant(); + + // in strict mode, input must be completely read + if (strict) + { + get_token(); + expect(token_type::end_of_input); + } + + // in case of an error, return discarded value + if (errored) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + // read first token + get_token(); + + if (not accept_internal()) + { + return false; + } + + // strict => last token must be EOF + return not strict or (get_token() == token_type::end_of_input); + } + + private: + /*! + @brief the actual parser + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse_internal(bool keep, BasicJsonType& result) + { + // never parse after a parse error was detected + assert(not errored); + + // start with a discarded value + if (not result.is_discarded()) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + + switch (last_token) + { + case token_type::begin_object: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::object_start, result); + } + + if (not callback or keep) + { + // explicitly set result to object to cope with {} + result.m_type = value_t::object; + result.m_value = value_t::object; + } + } + + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + std::string key; + BasicJsonType value; + while (true) + { + // store key + if (not expect(token_type::value_string)) + { + return; + } + key = m_lexer.move_string(); + + bool keep_tag = false; + if (keep) + { + if (callback) + { + BasicJsonType k(key); + keep_tag = callback(depth, parse_event_t::key, k); + } + else + { + keep_tag = true; + } + } + + // parse separator (:) + get_token(); + if (not expect(token_type::name_separator)) + { + return; + } + + // parse and add value + get_token(); + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and keep_tag and not value.is_discarded()) + { + result.m_value.object->emplace(std::move(key), std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + if (not expect(token_type::end_object)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::begin_array: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::array_start, result); + } + + if (not callback or keep) + { + // explicitly set result to array to cope with [] + result.m_type = value_t::array; + result.m_value = value_t::array; + } + } + + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + if (callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + BasicJsonType value; + while (true) + { + // parse value + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and not value.is_discarded()) + { + result.m_value.array->push_back(std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + if (not expect(token_type::end_array)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::literal_null: + { + result.m_type = value_t::null; + break; + } + + case token_type::value_string: + { + result.m_type = value_t::string; + result.m_value = m_lexer.move_string(); + break; + } + + case token_type::literal_true: + { + result.m_type = value_t::boolean; + result.m_value = true; + break; + } + + case token_type::literal_false: + { + result.m_type = value_t::boolean; + result.m_value = false; + break; + } + + case token_type::value_unsigned: + { + result.m_type = value_t::number_unsigned; + result.m_value = m_lexer.get_number_unsigned(); + break; + } + + case token_type::value_integer: + { + result.m_type = value_t::number_integer; + result.m_value = m_lexer.get_number_integer(); + break; + } + + case token_type::value_float: + { + result.m_type = value_t::number_float; + result.m_value = m_lexer.get_number_float(); + + // throw in case of infinity or NAN + if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float))) + { + if (allow_exceptions) + { + JSON_THROW(out_of_range::create(406, "number overflow parsing '" + + m_lexer.get_token_string() + "'")); + } + expect(token_type::uninitialized); + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + if (not expect(token_type::uninitialized)) + { + return; + } + break; // LCOV_EXCL_LINE + } + + default: + { + // the last token was unexpected; we expected a value + if (not expect(token_type::literal_or_value)) + { + return; + } + break; // LCOV_EXCL_LINE + } + } + + if (keep and callback and not callback(depth, parse_event_t::value, result)) + { + result.m_type = value_t::discarded; + } + } + + /*! + @brief the actual acceptor + + @invariant 1. The last token is not yet processed. Therefore, the caller + of this function must make sure a token has been read. + 2. When this function returns, the last token is processed. + That is, the last read character was already considered. + + This invariant makes sure that no token needs to be "unput". + */ + bool accept_internal() + { + switch (last_token) + { + case token_type::begin_object: + { + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + return true; + } + + // parse values + while (true) + { + // parse key + if (last_token != token_type::value_string) + { + return false; + } + + // parse separator (:) + get_token(); + if (last_token != token_type::name_separator) + { + return false; + } + + // parse value + get_token(); + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + return (last_token == token_type::end_object); + } + } + + case token_type::begin_array: + { + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + return true; + } + + // parse values + while (true) + { + // parse value + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + return (last_token == token_type::end_array); + } + } + + case token_type::value_float: + { + // reject infinity or NAN + return std::isfinite(m_lexer.get_number_float()); + } + + case token_type::literal_false: + case token_type::literal_null: + case token_type::literal_true: + case token_type::value_integer: + case token_type::value_string: + case token_type::value_unsigned: + return true; + + default: // the last token was unexpected + return false; + } + } + + /// get next token from lexer + token_type get_token() + { + return (last_token = m_lexer.scan()); + } + + /*! + @throw parse_error.101 if expected token did not occur + */ + bool expect(token_type t) + { + if (JSON_UNLIKELY(t != last_token)) + { + errored = true; + expected = t; + if (allow_exceptions) + { + throw_exception(); + } + else + { + return false; + } + } + + return true; + } + + [[noreturn]] void throw_exception() const + { + std::string error_msg = "syntax error - "; + if (last_token == token_type::parse_error) + { + error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + + m_lexer.get_token_string() + "'"; + } + else + { + error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); + } + + JSON_THROW(parse_error::create(101, m_lexer.get_position(), error_msg)); + } + + private: + /// current level of recursion + int depth = 0; + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether a syntax error occurred + bool errored = false; + /// possible reason for the syntax error + token_type expected = token_type::uninitialized; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +/////////////// +// iterators // +/////////////// + +/*! +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + public: + using difference_type = std::ptrdiff_t; + + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type i) + { + auto result = *this; + result += i; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + friend std::ostream& operator<<(std::ostream& os, primitive_iterator_t it) + { + return os << it.m_it; + } + + primitive_iterator_t& operator++() + { + ++m_it; + return *this; + } + + primitive_iterator_t const operator++(int) + { + auto result = *this; + m_it++; + return result; + } + + primitive_iterator_t& operator--() + { + --m_it; + return *this; + } + + primitive_iterator_t const operator--(int) + { + auto result = *this; + m_it--; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) + { + m_it -= n; + return *this; + } + + private: + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits::min)(); +}; + +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; + +template class iteration_proxy; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class + +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. + +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). + +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template +class iter_impl +{ + /// allow basic_json to access private members + friend iter_impl::value, typename std::remove_const::type, const BasicJsonType>::type>; + friend BasicJsonType; + friend iteration_proxy; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json::type>::value, + "iter_impl only accepts (const) basic_json"); + + public: + + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + /// default constructor + iter_impl() = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) {} + + /*! + @brief converting assignment + @param[in,out] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl::type>& other) noexcept + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + private: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->end(); + break; + } + + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return &*m_it.array_iterator; + } + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator++(int) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator--(int) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator==(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator!=(const iter_impl& other) const + { + return not operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators")); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return not other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return not operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return not operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators")); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + typename object_t::key_type key() const + { + assert(m_object != nullptr); + + if (JSON_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators")); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + private: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator::type> m_it = {}; +}; + +/// proxy class for the iterator_wrapper functions +template class iteration_proxy +{ + private: + /// helper class for iteration + class iteration_proxy_internal + { + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + + public: + explicit iteration_proxy_internal(IteratorType it) noexcept : anchor(it) {} + + /// dereference operator (needed for range-based for) + iteration_proxy_internal& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_internal& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_internal& o) const noexcept + { + return anchor != o.anchor; + } + + /// return key of the iterator + std::string key() const + { + assert(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + return std::to_string(array_index); + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + default: + return ""; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } + }; + + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_internal begin() noexcept + { + return iteration_proxy_internal(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_internal end() noexcept + { + return iteration_proxy_internal(container.end()); + } +}; + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](http://en.cppreference.com/w/cpp/concept/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template +class json_reverse_iterator : public std::reverse_iterator +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator const operator++(int) + { + return static_cast(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator const operator--(int) + { + return static_cast(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; + +///////////////////// +// output adapters // +///////////////////// + +/// abstract output adapter interface +template struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +template +using output_adapter_t = std::shared_ptr>; + +/// output adapter for byte vectors +template +class output_vector_adapter : public output_adapter_protocol +{ + public: + explicit output_vector_adapter(std::vector& vec) : v(vec) {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + std::copy(s, s + length, std::back_inserter(v)); + } + + private: + std::vector& v; +}; + +/// output adapter for output streams +template +class output_stream_adapter : public output_adapter_protocol +{ + public: + explicit output_stream_adapter(std::basic_ostream& s) : stream(s) {} + + void write_character(CharType c) override + { + stream.put(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast(length)); + } + + private: + std::basic_ostream& stream; +}; + +/// output adapter for basic_string +template +class output_string_adapter : public output_adapter_protocol +{ + public: + explicit output_string_adapter(std::basic_string& s) : str(s) {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + std::basic_string& str; +}; + +template +class output_adapter +{ + public: + output_adapter(std::vector& vec) + : oa(std::make_shared>(vec)) {} + + output_adapter(std::basic_ostream& s) + : oa(std::make_shared>(s)) {} + + output_adapter(std::basic_string& s) + : oa(std::make_shared>(s)) {} + + operator output_adapter_t() + { + return oa; + } + + private: + output_adapter_t oa = nullptr; +}; + +////////////////////////////// +// binary reader and writer // +////////////////////////////// + +/*! +@brief deserialization of CBOR and MessagePack values +*/ +template +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(input_adapter_t adapter) : ia(std::move(adapter)) + { + assert(ia); + } + + /*! + @brief create a JSON value from CBOR input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from CBOR input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_cbor(const bool strict) + { + const auto res = parse_cbor_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief create a JSON value from MessagePack input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from MessagePack input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_msgpack(const bool strict) + { + const auto res = parse_msgpack_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief determine system byte order + + @return true if and only if system's byte order is little endian + + @note from http://stackoverflow.com/a/1001328/266378 + */ + static constexpr bool little_endianess(int num = 1) noexcept + { + return (*reinterpret_cast(&num) == 1); + } + + private: + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + */ + BasicJsonType parse_cbor_internal(const bool get_char = true) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return static_cast(current); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + return get_number(); + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + return get_number(); + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + return get_number(); + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + return get_number(); + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return static_cast(0x20 - 1 - current); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + // must be uint8_t ! + return static_cast(-1) - get_number(); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + return static_cast(-1) - get_number(); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + return static_cast(-1) - get_number(); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + return static_cast(-1) - + static_cast(get_number()); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + return get_cbor_string(); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + { + return get_cbor_array(current & 0x1F); + } + + case 0x98: // array (one-byte uint8_t for n follows) + { + return get_cbor_array(get_number()); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + return get_cbor_array(get_number()); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + return get_cbor_array(get_number()); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + return get_cbor_array(get_number()); + } + + case 0x9F: // array (indefinite length) + { + BasicJsonType result = value_t::array; + while (get() != 0xFF) + { + result.push_back(parse_cbor_internal(false)); + } + return result; + } + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + { + return get_cbor_object(current & 0x1F); + } + + case 0xB8: // map (one-byte uint8_t for n follows) + { + return get_cbor_object(get_number()); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + return get_cbor_object(get_number()); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + return get_cbor_object(get_number()); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + return get_cbor_object(get_number()); + } + + case 0xBF: // map (indefinite length) + { + BasicJsonType result = value_t::object; + while (get() != 0xFF) + { + auto key = get_cbor_string(); + result[key] = parse_cbor_internal(); + } + return result; + } + + case 0xF4: // false + { + return false; + } + + case 0xF5: // true + { + return true; + } + + case 0xF6: // null + { + return value_t::null; + } + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const int byte1 = get(); + check_eof(); + const int byte2 = get(); + check_eof(); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const int half = (byte1 << 8) + byte2; + const int exp = (half >> 10) & 0x1F; + const int mant = half & 0x3FF; + double val; + if (exp == 0) + { + val = std::ldexp(mant, -24); + } + else if (exp != 31) + { + val = std::ldexp(mant + 1024, exp - 25); + } + else + { + val = (mant == 0) ? std::numeric_limits::infinity() + : std::numeric_limits::quiet_NaN(); + } + return (half & 0x8000) != 0 ? -val : val; + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + return get_number(); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + return get_number(); + } + + default: // anything else (0xFF is handled inside the other types) + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, "error reading CBOR; last byte: 0x" + ss.str())); + } + } + } + + BasicJsonType parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return static_cast(current); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + { + return get_msgpack_object(current & 0x0F); + } + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + { + return get_msgpack_array(current & 0x0F); + } + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + return get_msgpack_string(); + + case 0xC0: // nil + return value_t::null; + + case 0xC2: // false + return false; + + case 0xC3: // true + return true; + + case 0xCA: // float 32 + return get_number(); + + case 0xCB: // float 64 + return get_number(); + + case 0xCC: // uint 8 + return get_number(); + + case 0xCD: // uint 16 + return get_number(); + + case 0xCE: // uint 32 + return get_number(); + + case 0xCF: // uint 64 + return get_number(); + + case 0xD0: // int 8 + return get_number(); + + case 0xD1: // int 16 + return get_number(); + + case 0xD2: // int 32 + return get_number(); + + case 0xD3: // int 64 + return get_number(); + + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + return get_msgpack_string(); + + case 0xDC: // array 16 + { + return get_msgpack_array(get_number()); + } + + case 0xDD: // array 32 + { + return get_msgpack_array(get_number()); + } + + case 0xDE: // map 16 + { + return get_msgpack_object(get_number()); + } + + case 0xDF: // map 32 + { + return get_msgpack_object(get_number()); + } + + // positive fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return static_cast(current); + + default: // anything else + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, + "error reading MessagePack; last byte: 0x" + ss.str())); + } + } + } + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits::eof()` in that case. + + @return character read from the input + */ + int get() + { + ++chars_read; + return (current = ia->get_character()); + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + + @return number of type @a NumberType + + @note This function needs to respect the system's endianess, because + bytes in CBOR and MessagePack are stored in network order (big + endian) and therefore need reordering on little endian systems. + + @throw parse_error.110 if input has less than `sizeof(NumberType)` bytes + */ + template NumberType get_number() + { + // step 1: read input into array with system's byte order + std::array vec; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + check_eof(); + + // reverse byte order prior to conversion if necessary + if (is_little_endian) + { + vec[sizeof(NumberType) - i - 1] = static_cast(current); + } + else + { + vec[i] = static_cast(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + NumberType result; + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return result; + } + + /*! + @brief create a string by reading characters from the input + + @param[in] len number of bytes to read + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref check_eof() detects the end of + the input before we run out of string memory. + + @return string created by reading @a len bytes + + @throw parse_error.110 if input has less than @a len bytes + */ + template + std::string get_string(const NumberType len) + { + std::string result; + std::generate_n(std::back_inserter(result), len, [this]() + { + get(); + check_eof(); + return static_cast(current); + }); + return result; + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_cbor_string() + { + check_eof(); + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(current & 0x1F); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + return get_string(get_number()); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + return get_string(get_number()); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + return get_string(get_number()); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + return get_string(get_number()); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + std::string result; + while (get() != 0xFF) + { + check_eof(); + result.push_back(static_cast(current)); + } + return result; + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, "expected a CBOR string; last byte: 0x" + ss.str())); + } + } + } + + template + BasicJsonType get_cbor_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_cbor_internal(); + }); + return result; + } + + template + BasicJsonType get_cbor_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_cbor_string(); + auto val = parse_cbor_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_msgpack_string() + { + check_eof(); + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(current & 0x1F); + } + + case 0xD9: // str 8 + { + return get_string(get_number()); + } + + case 0xDA: // str 16 + { + return get_string(get_number()); + } + + case 0xDB: // str 32 + { + return get_string(get_number()); + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, + "expected a MessagePack string; last byte: 0x" + ss.str())); + } + } + } + + template + BasicJsonType get_msgpack_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_msgpack_internal(); + }); + return result; + } + + template + BasicJsonType get_msgpack_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_msgpack_string(); + auto val = parse_msgpack_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief check if input ended + @throw parse_error.110 if input ended + */ + void check_eof(const bool expect_eof = false) const + { + if (expect_eof) + { + if (JSON_UNLIKELY(current != std::char_traits::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "expected end of input")); + } + } + else + { + if (JSON_UNLIKELY(current == std::char_traits::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + } + } + } + + private: + /// input adapter + input_adapter_t ia = nullptr; + + /// the current character + int current = std::char_traits::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianess + const bool is_little_endian = little_endianess(); +}; + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template +class binary_writer +{ + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t adapter) : oa(adapter) + { + assert(oa); + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(static_cast(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_value.boolean + ? static_cast(0xF5) + : static_cast(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_value.number_integer <= 0x17) + { + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x18)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x19)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x1A)); + write_number(static_cast(j.m_value.number_integer)); + } + else + { + oa->write_character(static_cast(0x1B)); + write_number(static_cast(j.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_value.number_integer; + if (j.m_value.number_integer >= -24) + { + write_number(static_cast(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x38)); + write_number(static_cast(positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x39)); + write_number(static_cast(positive_number)); + } + else if (positive_number <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x3A)); + write_number(static_cast(positive_number)); + } + else + { + oa->write_character(static_cast(0x3B)); + write_number(static_cast(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= 0x17) + { + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x18)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x19)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + oa->write_character(static_cast(0x1A)); + write_number(static_cast(j.m_value.number_unsigned)); + } + else + { + oa->write_character(static_cast(0x1B)); + write_number(static_cast(j.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: // Double-Precision Float + { + oa->write_character(static_cast(0xFB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast(0x60 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast(0x78)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast(0x79)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast(0x7A)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast(0x7B)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast(0x80 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast(0x98)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast(0x99)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast(0x9A)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast(0x9B)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast(0xA0 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast(0xB8)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast(0xB9)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast(0xBA)); + write_number(static_cast(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast(0xBB)); + write_number(static_cast(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + default: + break; + } + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(static_cast(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_value.boolean + ? static_cast(0xC3) + : static_cast(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 8 + oa->write_character(static_cast(0xCC)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 16 + oa->write_character(static_cast(0xCD)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 32 + oa->write_character(static_cast(0xCE)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 64 + oa->write_character(static_cast(0xCF)); + write_number(static_cast(j.m_value.number_integer)); + } + } + else + { + if (j.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() and + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 8 + oa->write_character(static_cast(0xD0)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() and + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 16 + oa->write_character(static_cast(0xD1)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() and + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 32 + oa->write_character(static_cast(0xD2)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits::min)() and + j.m_value.number_integer <= (std::numeric_limits::max)()) + { + // int 64 + oa->write_character(static_cast(0xD3)); + write_number(static_cast(j.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 8 + oa->write_character(static_cast(0xCC)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 16 + oa->write_character(static_cast(0xCD)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 32 + oa->write_character(static_cast(0xCE)); + write_number(static_cast(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits::max)()) + { + // uint 64 + oa->write_character(static_cast(0xCF)); + write_number(static_cast(j.m_value.number_integer)); + } + break; + } + + case value_t::number_float: // float 64 + { + oa->write_character(static_cast(0xCB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast(0xA0 | N)); + } + else if (N <= 255) + { + // str 8 + oa->write_character(static_cast(0xD9)); + write_number(static_cast(N)); + } + else if (N <= 65535) + { + // str 16 + oa->write_character(static_cast(0xDA)); + write_number(static_cast(N)); + } + else if (N <= 4294967295) + { + // str 32 + oa->write_character(static_cast(0xDB)); + write_number(static_cast(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast(0x90 | N)); + } + else if (N <= 0xFFFF) + { + // array 16 + oa->write_character(static_cast(0xDC)); + write_number(static_cast(N)); + } + else if (N <= 0xFFFFFFFF) + { + // array 32 + oa->write_character(static_cast(0xDD)); + write_number(static_cast(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast(0x80 | (N & 0xF))); + } + else if (N <= 65535) + { + // map 16 + oa->write_character(static_cast(0xDE)); + write_number(static_cast(N)); + } + else if (N <= 4294967295) + { + // map 32 + oa->write_character(static_cast(0xDF)); + write_number(static_cast(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + default: + break; + } + } + + private: + /* + @brief write a number to output input + + @param[in] n number of type @a NumberType + @tparam NumberType the type of the number + + @note This function needs to respect the system's endianess, because bytes + in CBOR and MessagePack are stored in network order (big endian) and + therefore need reordering on little endian systems. + */ + template void write_number(NumberType n) + { + // step 1: write number to array of length NumberType + std::array vec; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + private: + /// whether we can assume little endianess + const bool is_little_endian = binary_reader::little_endianess(); + + /// the output + output_adapter_t oa = nullptr; +}; + +/////////////////// +// serialization // +/////////////////// + +template +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + */ + serializer(output_adapter_t s, const char ichar) + : o(std::move(s)), loc(std::localeconv()), + thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)), + decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)), + indent_char(ichar), indent_string(512, indent_char) {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_type) + { + case value_t::object: + { + if (val.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(not val.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(not val.m_value.array->empty()); + dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::boolean: + { + if (val.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + } + } + + private: + /*! + @brief returns the number of expected bytes following in UTF-8 string + + @param[in] u the first byte of a UTF-8 string + @return the number of expected bytes following + */ + static constexpr std::size_t bytes_following(const uint8_t u) + { + return ((u <= 127) ? 0 + : ((192 <= u and u <= 223) ? 1 + : ((224 <= u and u <= 239) ? 2 + : ((240 <= u and u <= 247) ? 3 : std::string::npos)))); + } + + /*! + @brief calculates the extra space to escape a JSON string + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + @return the number of characters required to escape string @a s + + @complexity Linear in the length of string @a s. + */ + static std::size_t extra_space(const string_t& s, + const bool ensure_ascii) noexcept + { + std::size_t res = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + // control characters that can be escaped with a backslash + case '"': + case '\\': + case '\b': + case '\f': + case '\n': + case '\r': + case '\t': + { + // from c (1 byte) to \x (2 bytes) + res += 1; + break; + } + + // control characters that need \uxxxx escaping + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x0B: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + // from c (1 byte) to \uxxxx (6 bytes) + res += 5; + break; + } + + default: + { + if (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F)) + { + const auto bytes = bytes_following(static_cast(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + if (bytes == 3) + { + // codepoints that need 4 bytes (i.e., 3 additional + // bytes) in UTF-8 need a surrogate pair when \u + // escaping is used: from 4 bytes to \uxxxx\uxxxx + // (12 bytes) + res += (12 - bytes - 1); + } + else + { + // from x bytes to \uxxxx (6 bytes) + res += (6 - bytes - 1); + } + + // skip the additional bytes + i += bytes; + } + break; + } + } + } + + return res; + } + + static void escape_codepoint(int codepoint, string_t& result, std::size_t& pos) + { + // expecting a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // the last written character was the backslash before the 'u' + assert(result[pos] == '\\'); + + // write the 'u' + result[++pos] = 'u'; + + // convert a number 0..15 to its hex representation (0..f) + static const std::array hexify = + { + { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' + } + }; + + if (codepoint < 0x10000) + { + // codepoints U+0000..U+FFFF can be represented as \uxxxx. + result[++pos] = hexify[(codepoint >> 12) & 0x0F]; + result[++pos] = hexify[(codepoint >> 8) & 0x0F]; + result[++pos] = hexify[(codepoint >> 4) & 0x0F]; + result[++pos] = hexify[codepoint & 0x0F]; + } + else + { + // codepoints U+10000..U+10FFFF need a surrogate pair to be + // represented as \uxxxx\uxxxx. + // http://www.unicode.org/faq/utf_bom.html#utf16-4 + codepoint -= 0x10000; + const int high_surrogate = 0xD800 | ((codepoint >> 10) & 0x3FF); + const int low_surrogate = 0xDC00 | (codepoint & 0x3FF); + result[++pos] = hexify[(high_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[high_surrogate & 0x0F]; + ++pos; // backslash is already in output + result[++pos] = 'u'; + result[++pos] = hexify[(low_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[low_surrogate & 0x0F]; + } + + ++pos; + } + + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) const + { + throw_if_invalid_utf8(s); + + const auto space = extra_space(s, ensure_ascii); + if (space == 0) + { + o->write_characters(s.c_str(), s.size()); + return; + } + + // create a result string of necessary size + string_t result(s.size() + space, '\\'); + std::size_t pos = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + case '"': // quotation mark (0x22) + { + result[pos + 1] = '"'; + pos += 2; + break; + } + + case '\\': // reverse solidus (0x5C) + { + // nothing to change + pos += 2; + break; + } + + case '\b': // backspace (0x08) + { + result[pos + 1] = 'b'; + pos += 2; + break; + } + + case '\f': // formfeed (0x0C) + { + result[pos + 1] = 'f'; + pos += 2; + break; + } + + case '\n': // newline (0x0A) + { + result[pos + 1] = 'n'; + pos += 2; + break; + } + + case '\r': // carriage return (0x0D) + { + result[pos + 1] = 'r'; + pos += 2; + break; + } + + case '\t': // horizontal tab (0x09) + { + result[pos + 1] = 't'; + pos += 2; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((0x00 <= s[i] and s[i] <= 0x1F) or + (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F))) + { + const auto bytes = bytes_following(static_cast(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + // check that the additional bytes are present + assert(i + bytes < s.size()); + + // to use \uxxxx escaping, we first need to calculate + // the codepoint from the UTF-8 bytes + int codepoint = 0; + + // bytes is unsigned type: + assert(bytes <= 3); + switch (bytes) + { + case 0: + { + codepoint = s[i] & 0xFF; + break; + } + + case 1: + { + codepoint = ((s[i] & 0x3F) << 6) + + (s[i + 1] & 0x7F); + break; + } + + case 2: + { + codepoint = ((s[i] & 0x1F) << 12) + + ((s[i + 1] & 0x7F) << 6) + + (s[i + 2] & 0x7F); + break; + } + + case 3: + { + codepoint = ((s[i] & 0xF) << 18) + + ((s[i + 1] & 0x7F) << 12) + + ((s[i + 2] & 0x7F) << 6) + + (s[i + 3] & 0x7F); + break; + } + + default: + break; // LCOV_EXCL_LINE + } + + escape_codepoint(codepoint, result, pos); + i += bytes; + } + else + { + // all other characters are added as-is + result[pos++] = s[i]; + } + break; + } + } + } + + assert(pos == result.size()); + o->write_characters(result.c_str(), result.size()); + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template::value or + std::is_same::value, + int> = 0> + void dump_integer(NumberType x) + { + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + const bool is_negative = (x <= 0) and (x != 0); // see issue #755 + std::size_t i = 0; + + while (x != 0) + { + // spare 1 byte for '\0' + assert(i < number_buffer.size() - 1); + + const auto digit = std::labs(static_cast(x % 10)); + number_buffer[i++] = static_cast('0' + digit); + x /= 10; + } + + if (is_negative) + { + // make sure there is capacity for the '-' + assert(i < number_buffer.size() - 2); + number_buffer[i++] = '-'; + } + + std::reverse(number_buffer.begin(), number_buffer.begin() + i); + o->write_characters(number_buffer.data(), i); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (not std::isfinite(x) or std::isnan(x)) + { + o->write_characters("null", 4); + return; + } + + // get number of digits for a text -> float -> text round-trip + static constexpr auto d = std::numeric_limits::digits10; + + // the actual conversion + std::ptrdiff_t len = snprintf(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + assert(len > 0); + // check if buffer was large enough + assert(static_cast(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + const auto end = std::remove(number_buffer.begin(), + number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + assert((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' and decimal_point != '.') + { + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast(len)); + + // determine if need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return (c == '.' or c == 'e'); + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in] byte next byte to decode + + @note The function has been edited: a std::array is used and the code + point is not calculated. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static void decode(uint8_t& state, const uint8_t byte) + { + static const std::array utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + const uint8_t type = utf8d[byte]; + state = utf8d[256u + state * 16u + type]; + } + + /*! + @brief throw an exception if a string is not UTF-8 encoded + + @param[in] str UTF-8 string to check + @throw type_error.316 if passed string is not UTF-8 encoded + + @since version 3.0.0 + */ + static void throw_if_invalid_utf8(const std::string& str) + { + // start with state 0 (= accept) + uint8_t state = 0; + + for (size_t i = 0; i < str.size(); ++i) + { + const auto byte = static_cast(str[i]); + decode(state, byte); + if (state == 1) + { + // state 1 means reject + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast(byte); + JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str())); + } + } + + if (state != 0) + { + // we finish reading, but do not accept: string was incomplete + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast(static_cast(str.back())); + JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str())); + } + } + + private: + /// the output of the serializer + output_adapter_t o = nullptr; + + /// a (hopefully) large enough character buffer + std::array number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// the indentation character + const char indent_char; + + /// the indentation string + string_t indent_string; +}; + +template +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true) + {} + + json_ref(const value_type& value) + : value_ref(const_cast(&value)), is_rvalue(false) + {} + + json_ref(std::initializer_list init) + : owned_value(init), value_ref(&owned_value), is_rvalue(true) + {} + + template + json_ref(Args&& ... args) + : owned_value(std::forward(args)...), value_ref(&owned_value), is_rvalue(true) + {} + + // class should be movable only + json_ref(json_ref&&) = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + + value_type moved_or_copied() const + { + if (is_rvalue) + { + return std::move(*value_ref); + } + return *value_ref; + } + + value_type const& operator*() const + { + return *static_cast(value_ref); + } + + value_type const* operator->() const + { + return static_cast(value_ref); + } + + private: + mutable value_type owned_value = nullptr; + value_type* value_ref = nullptr; + const bool is_rvalue; +}; + +} // namespace detail + +/// namespace to hold default `to_json` / `from_json` functions +namespace +{ +constexpr const auto& to_json = detail::static_const::value; +constexpr const auto& from_json = detail::static_const::value; +} + + +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template +struct adl_serializer +{ + /*! + @brief convert a JSON value to any value type + + This function is usually called by the `get()` function of the + @ref basic_json class (either explicit or via conversion operators). + + @param[in] j JSON value to read from + @param[in,out] val value to write to + */ + template + static void from_json(BasicJsonType&& j, ValueType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward(j), val))) + { + ::nlohmann::from_json(std::forward(j), val); + } + + /*! + @brief convert any value type to a JSON value + + This function is usually called by the constructors of the @ref basic_json + class. + + @param[in,out] j JSON value to write to + @param[in] val value to read from + */ + template + static void to_json(BasicJsonType& j, ValueType&& val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward(val)))) + { + ::nlohmann::to_json(j, std::forward(val)); + } +}; + +/*! +@brief JSON Pointer + +A JSON pointer defines a string syntax for identifying a specific value +within a JSON document. It can be used with functions `at` and +`operator[]`. Furthermore, JSON pointers are the base for JSON patches. + +@sa [RFC 6901](https://tools.ietf.org/html/rfc6901) + +@since version 2.0.0 +*/ +class json_pointer +{ + /// allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + public: + /*! + @brief create JSON pointer + + Create a JSON pointer according to the syntax described in + [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3). + + @param[in] s string representing the JSON pointer; if omitted, the empty + string is assumed which references the whole JSON value + + @throw parse_error.107 if the given JSON pointer @a s is nonempty and + does not begin with a slash (`/`); see example below + + @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s + is not followed by `0` (representing `~`) or `1` (representing `/`); + see example below + + @liveexample{The example shows the construction several valid JSON + pointers as well as the exceptional behavior.,json_pointer} + + @since version 2.0.0 + */ + explicit json_pointer(const std::string& s = "") : reference_tokens(split(s)) {} + + /*! + @brief return a string representation of the JSON pointer + + @invariant For each JSON pointer `ptr`, it holds: + @code {.cpp} + ptr == json_pointer(ptr.to_string()); + @endcode + + @return a string representation of the JSON pointer + + @liveexample{The example shows the result of `to_string`., + json_pointer__to_string} + + @since version 2.0.0 + */ + std::string to_string() const noexcept + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + escape(b); + }); + } + + /// @copydoc to_string() + operator std::string() const + { + return to_string(); + } + + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw out_of_range.404 if string @a s could not be converted to an integer + */ + static int array_index(const std::string& s) + { + size_t processed_chars = 0; + const int res = std::stoi(s, &processed_chars); + + // check if the string was completely read + if (JSON_UNLIKELY(processed_chars != s.size())) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'")); + } + + return res; + } + + private: + /*! + @brief remove and return last reference pointer + @throw out_of_range.405 if JSON pointer has no parent + */ + std::string pop_back() + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + auto last = reference_tokens.back(); + reference_tokens.pop_back(); + return last; + } + + /// return whether pointer points to the root document + bool is_root() const + { + return reference_tokens.empty(); + } + + json_pointer top() const + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const; + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector split(const std::string& reference_string) + { + std::vector result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, + "JSON pointer must be empty or begin with '/' - was: '" + + reference_string + "'")); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == string::npos+1 = 0 + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == std::string::npos) + start = slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != std::string::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + assert(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_UNLIKELY(pos == reference_token.size() - 1 or + (reference_token[pos + 1] != '0' and + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'")); + } + } + + // finally, store the reference token + unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + /*! + @brief replace all occurrences of a substring by another string + + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t + @param[in] f the substring to replace with @a t + @param[in] t the string to replace @a f + + @pre The search string @a f must not be empty. **This precondition is + enforced with an assertion.** + + @since version 2.0.0 + */ + static void replace_substring(std::string& s, const std::string& f, + const std::string& t) + { + assert(not f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != std::string::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} + } + + /// escape "~"" to "~0" and "/" to "~1" + static std::string escape(std::string s) + { + replace_substring(s, "~", "~0"); + replace_substring(s, "/", "~1"); + return s; + } + + /// unescape "~1" to tilde and "~0" to slash (order is important!) + static void unescape(std::string& s) + { + replace_substring(s, "~1", "/"); + replace_substring(s, "~0", "~"); + } + + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static void flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result); + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static NLOHMANN_BASIC_JSON_TPL + unflatten(const NLOHMANN_BASIC_JSON_TPL& value); + + friend bool operator==(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + friend bool operator!=(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + /// the reference tokens + std::vector reference_tokens; +}; + +/*! +@brief a class to store JSON values + +@tparam ObjectType type for JSON objects (`std::map` by default; will be used +in @ref object_t) +@tparam ArrayType type for JSON arrays (`std::vector` by default; will be used +in @ref array_t) +@tparam StringType type for JSON strings and object keys (`std::string` by +default; will be used in @ref string_t) +@tparam BooleanType type for JSON booleans (`bool` by default; will be used +in @ref boolean_t) +@tparam NumberIntegerType type for JSON integer numbers (`int64_t` by +default; will be used in @ref number_integer_t) +@tparam NumberUnsignedType type for JSON unsigned integer numbers (@c +`uint64_t` by default; will be used in @ref number_unsigned_t) +@tparam NumberFloatType type for JSON floating-point numbers (`double` by +default; will be used in @ref number_float_t) +@tparam AllocatorType type of the allocator to use (`std::allocator` by +default) +@tparam JSONSerializer the serializer to resolve internal calls to `to_json()` +and `from_json()` (@ref adl_serializer by default) + +@requirement The class satisfies the following concept requirements: +- Basic + - [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible): + JSON values can be default constructed. The result will be a JSON null + value. + - [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible): + A JSON value can be constructed from an rvalue argument. + - [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible): + A JSON value can be copy-constructed from an lvalue expression. + - [MoveAssignable](http://en.cppreference.com/w/cpp/concept/MoveAssignable): + A JSON value van be assigned from an rvalue argument. + - [CopyAssignable](http://en.cppreference.com/w/cpp/concept/CopyAssignable): + A JSON value can be copy-assigned from an lvalue expression. + - [Destructible](http://en.cppreference.com/w/cpp/concept/Destructible): + JSON values can be destructed. +- Layout + - [StandardLayoutType](http://en.cppreference.com/w/cpp/concept/StandardLayoutType): + JSON values have + [standard layout](http://en.cppreference.com/w/cpp/language/data_members#Standard_layout): + All non-static data members are private and standard layout types, the + class has no virtual functions or (virtual) base classes. +- Library-wide + - [EqualityComparable](http://en.cppreference.com/w/cpp/concept/EqualityComparable): + JSON values can be compared with `==`, see @ref + operator==(const_reference,const_reference). + - [LessThanComparable](http://en.cppreference.com/w/cpp/concept/LessThanComparable): + JSON values can be compared with `<`, see @ref + operator<(const_reference,const_reference). + - [Swappable](http://en.cppreference.com/w/cpp/concept/Swappable): + Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of + other compatible types, using unqualified function call @ref swap(). + - [NullablePointer](http://en.cppreference.com/w/cpp/concept/NullablePointer): + JSON values can be compared against `std::nullptr_t` objects which are used + to model the `null` value. +- Container + - [Container](http://en.cppreference.com/w/cpp/concept/Container): + JSON values can be used like STL containers and provide iterator access. + - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer); + JSON values can be used like STL containers and provide reverse iterator + access. + +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@internal +@note ObjectType trick from http://stackoverflow.com/a/9860911 +@endinternal + +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json +{ + private: + template friend struct detail::external_constructor; + friend ::nlohmann::json_pointer; + friend ::nlohmann::detail::parser; + friend ::nlohmann::detail::serializer; + template + friend class ::nlohmann::detail::iter_impl; + template + friend class ::nlohmann::detail::binary_writer; + template + friend class ::nlohmann::detail::binary_reader; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer; + using parser = ::nlohmann::detail::parser; + + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template + using internal_iterator = ::nlohmann::detail::internal_iterator; + template + using iter_impl = ::nlohmann::detail::iter_impl; + template + using iteration_proxy = ::nlohmann::detail::iteration_proxy; + template using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator; + + template + using output_adapter_t = ::nlohmann::detail::output_adapter_t; + + using binary_reader = ::nlohmann::detail::binary_reader; + template using binary_writer = ::nlohmann::detail::binary_writer; + + using serializer = ::nlohmann::detail::serializer; + + public: + using value_t = detail::value_t; + /// @copydoc nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer; + template + using json_serializer = JSONSerializer; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list>; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + /// @copydoc detail::exception + using exception = detail::exception; + /// @copydoc detail::parse_error + using parse_error = detail::parse_error; + /// @copydoc detail::invalid_iterator + using invalid_iterator = detail::invalid_iterator; + /// @copydoc detail::type_error + using type_error = detail::type_error; + /// @copydoc detail::out_of_range + using out_of_range = detail::out_of_range; + /// @copydoc detail::other_error + using other_error = detail::other_error; + + /// @} + + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType; + + /// the type of an element pointer + using pointer = typename std::allocator_traits::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl; + /// a const iterator for a basic_json container + using const_iterator = iter_impl; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator; + + /// @} + + + /*! + @brief returns the allocator associated with the container + */ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /*! + @brief returns version information on the library + + This function returns a JSON object with information about the library, + including the version number and information on the platform and compiler. + + @return JSON object holding version information + key | description + ----------- | --------------- + `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). + `copyright` | The copyright line for the library as string. + `name` | The name of the library as string. + `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. + `url` | The URL of the project as string. + `version` | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string). + + @liveexample{The following code shows an example output of the `meta()` + function.,meta} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @complexity Constant. + + @since 2.1.0 + */ + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2017 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"] = + { + {"string", "3.0.1"}, {"major", 3}, {"minor", 0}, {"patch", 1} + }; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__)}}; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#ifdef __cplusplus + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + +#if defined(JSON_HAS_CPP_14) + // Use transparent comparator if possible, combined with perfect forwarding + // on find() and count() calls prevents unnecessary string construction. + using object_comparator_t = std::less<>; +#else + using object_comparator_t = std::less; +#endif + + /*! + @brief a type for an object + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + > An object is an unordered collection of zero or more name/value pairs, + > where a name is a string and a value is a string, number, boolean, null, + > object, or array. + + To store objects in C++, a type is defined by the template parameters + described below. + + @tparam ObjectType the container to store objects (e.g., `std::map` or + `std::unordered_map`) + @tparam StringType the type of the keys or names (e.g., `std::string`). + The comparison function `std::less` is used to order elements + inside the container. + @tparam AllocatorType the allocator to use for objects (e.g., + `std::allocator`) + + #### Default type + + With the default values for @a ObjectType (`std::map`), @a StringType + (`std::string`), and @a AllocatorType (`std::allocator`), the default + value for @a object_t is: + + @code {.cpp} + std::map< + std::string, // key_type + basic_json, // value_type + std::less, // key_compare + std::allocator> // allocator_type + > + @endcode + + #### Behavior + + The choice of @a object_t influences the behavior of the JSON class. With + the default type, objects have the following behavior: + + - When all names are unique, objects will be interoperable in the sense + that all software implementations receiving that object will agree on + the name-value mappings. + - When the names within an object are not unique, later stored name/value + pairs overwrite previously stored name/value pairs, leaving the used + names unique. For instance, `{"key": 1}` and `{"key": 2, "key": 1}` will + be treated as equal and both stored as `{"key": 1}`. + - Internally, name/value pairs are stored in lexicographical order of the + names. Objects will also be serialized (see @ref dump) in this order. + For instance, `{"b": 1, "a": 2}` and `{"a": 2, "b": 1}` will be stored + and serialized as `{"a": 2, "b": 1}`. + - When comparing objects, the order of the name/value pairs is irrelevant. + This makes objects interoperable in the sense that they will not be + affected by these differences. For instance, `{"b": 1, "a": 2}` and + `{"a": 2, "b": 1}` will be treated as equal. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the object's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON object. + + #### Storage + + Objects are stored as pointers in a @ref basic_json type. That is, for any + access to object values, a pointer of type `object_t*` must be + dereferenced. + + @sa @ref array_t -- type for an array value + + @since version 1.0.0 + + @note The order name/value pairs are added to the object is *not* + preserved by the library. Therefore, iterating an object may return + name/value pairs in a different order than they were originally stored. In + fact, keys will be traversed in alphabetical order as `std::map` with + `std::less` is used by default. Please note this behavior conforms to [RFC + 7159](http://rfc7159.net/rfc7159), because any order implements the + specified "unordered" nature of JSON objects. + */ + using object_t = ObjectType>>; + + /*! + @brief a type for an array + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: + > An array is an ordered sequence of zero or more values. + + To store objects in C++, a type is defined by the template parameters + explained below. + + @tparam ArrayType container type to store arrays (e.g., `std::vector` or + `std::list`) + @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`) + + #### Default type + + With the default values for @a ArrayType (`std::vector`) and @a + AllocatorType (`std::allocator`), the default value for @a array_t is: + + @code {.cpp} + std::vector< + basic_json, // value_type + std::allocator // allocator_type + > + @endcode + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the array's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON array. + + #### Storage + + Arrays are stored as pointers in a @ref basic_json type. That is, for any + access to array values, a pointer of type `array_t*` must be dereferenced. + + @sa @ref object_t -- type for an object value + + @since version 1.0.0 + */ + using array_t = ArrayType>; + + /*! + @brief a type for a string + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + > A string is a sequence of zero or more Unicode characters. + + To store objects in C++, a type is defined by the template parameter + described below. Unicode values are split by the JSON class into + byte-sized characters during deserialization. + + @tparam StringType the container to store strings (e.g., `std::string`). + Note this container is used for keys/names in objects, see @ref object_t. + + #### Default type + + With the default values for @a StringType (`std::string`), the default + value for @a string_t is: + + @code {.cpp} + std::string + @endcode + + #### Encoding + + Strings are stored in UTF-8 encoding. Therefore, functions like + `std::string::size()` or `std::string::length()` return the number of + bytes in the string rather than the number of characters or glyphs. + + #### String comparison + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > Software implementations are typically required to test names of object + > members for equality. Implementations that transform the textual + > representation into sequences of Unicode code units and then perform the + > comparison numerically, code unit by code unit, are interoperable in the + > sense that implementations will agree in all cases on equality or + > inequality of two strings. For example, implementations that compare + > strings with escaped characters unconverted may incorrectly find that + > `"a\\b"` and `"a\u005Cb"` are not equal. + + This implementation is interoperable as it does compare strings code unit + by code unit. + + #### Storage + + String values are stored as pointers in a @ref basic_json type. That is, + for any access to string values, a pointer of type `string_t*` must be + dereferenced. + + @since version 1.0.0 + */ + using string_t = StringType; + + /*! + @brief a type for a boolean + + [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + type which differentiates the two literals `true` and `false`. + + To store objects in C++, a type is defined by the template parameter @a + BooleanType which chooses the type to use. + + #### Default type + + With the default values for @a BooleanType (`bool`), the default value for + @a boolean_t is: + + @code {.cpp} + bool + @endcode + + #### Storage + + Boolean values are stored directly inside a @ref basic_json type. + + @since version 1.0.0 + */ + using boolean_t = BooleanType; + + /*! + @brief a type for a number (integer) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store integer numbers in C++, a type is defined by the template + parameter @a NumberIntegerType which chooses the type to use. + + #### Default type + + With the default values for @a NumberIntegerType (`int64_t`), the default + value for @a number_integer_t is: + + @code {.cpp} + int64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `9223372036854775807` (INT64_MAX) and the minimal integer number + that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers + that are out of range will yield over/underflow when used in a + constructor. During deserialization, too large or small integer numbers + will be automatically be stored as @ref number_unsigned_t or @ref + number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange of the exactly supported range [INT64_MIN, + INT64_MAX], this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_integer_t = NumberIntegerType; + + /*! + @brief a type for a number (unsigned) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store unsigned integer numbers in C++, a type is defined by the + template parameter @a NumberUnsignedType which chooses the type to use. + + #### Default type + + With the default values for @a NumberUnsignedType (`uint64_t`), the + default value for @a number_unsigned_t is: + + @code {.cpp} + uint64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `18446744073709551615` (UINT64_MAX) and the minimal integer + number that can be stored is `0`. Integer numbers that are out of range + will yield over/underflow when used in a constructor. During + deserialization, too large or small integer numbers will be automatically + be stored as @ref number_integer_t or @ref number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange (when considered in conjunction with the + number_integer_t type) of the exactly supported range [0, UINT64_MAX], + this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + @sa @ref number_integer_t -- type for number values (integer) + + @since version 2.0.0 + */ + using number_unsigned_t = NumberUnsignedType; + + /*! + @brief a type for a number (floating-point) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store floating-point numbers in C++, a type is defined by the template + parameter @a NumberFloatType which chooses the type to use. + + #### Default type + + With the default values for @a NumberFloatType (`double`), the default + value for @a number_float_t is: + + @code {.cpp} + double + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in floating-point literals will be ignored. Internally, + the value will be stored as decimal number. For instance, the C++ + floating-point literal `01.2` will be serialized to `1.2`. During + deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > This specification allows implementations to set limits on the range and + > precision of numbers accepted. Since software that implements IEEE + > 754-2008 binary64 (double precision) numbers is generally available and + > widely used, good interoperability can be achieved by implementations + > that expect no more precision or range than these provide, in the sense + > that implementations will approximate JSON numbers within the expected + > precision. + + This implementation does exactly follow this approach, as it uses double + precision floating-point numbers. Note values smaller than + `-1.79769313486232e+308` and values greater than `1.79769313486232e+308` + will be stored as NaN internally and be serialized to `null`. + + #### Storage + + Floating-point number values are stored directly inside a @ref basic_json + type. + + @sa @ref number_integer_t -- type for number values (integer) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_float_t = NumberFloatType; + + /// @} + + private: + + /// helper for exception-safe object creation + template + static T* create(Args&& ... args) + { + AllocatorType alloc; + using AllocatorTraits = std::allocator_traits>; + + auto deleter = [&](T * object) + { + AllocatorTraits::deallocate(alloc, object, 1); + }; + std::unique_ptr object(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, object.get(), std::forward(args)...); + assert(object != nullptr); + return object.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create(); + break; + } + + case value_t::array: + { + array = create(); + break; + } + + case value_t::string: + { + string = create(""); + break; + } + + case value_t::boolean: + { + boolean = boolean_t(false); + break; + } + + case value_t::number_integer: + { + number_integer = number_integer_t(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = number_unsigned_t(0); + break; + } + + case value_t::number_float: + { + number_float = number_float_t(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.0.1")); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) + { + string = create(value); + } + + /// constructor for rvalue strings + json_value(string_t&& value) + { + string = create(std::move(value)); + } + + /// constructor for objects + json_value(const object_t& value) + { + object = create(value); + } + + /// constructor for rvalue objects + json_value(object_t&& value) + { + object = create(std::move(value)); + } + + /// constructor for arrays + json_value(const array_t& value) + { + array = create(value); + } + + /// constructor for rvalue arrays + json_value(array_t&& value) + { + array = create(std::move(value)); + } + + void destroy(value_t t) + { + switch (t) + { + case value_t::object: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, object); + std::allocator_traits::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, array); + std::allocator_traits::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, string); + std::allocator_traits::deallocate(alloc, string, 1); + break; + } + + default: + { + break; + } + } + } + }; + + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + */ + void assert_invariant() const + { + assert(m_type != value_t::object or m_value.object != nullptr); + assert(m_type != value_t::array or m_value.array != nullptr); + assert(m_type != value_t::string or m_value.string != nullptr); + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /*! + @brief parser event types + + The parser callback distinguishes the following events: + - `object_start`: the parser read `{` and started to process a JSON object + - `key`: the parser read a key of a value in an object + - `object_end`: the parser read `}` and finished processing a JSON object + - `array_start`: the parser read `[` and started to process a JSON array + - `array_end`: the parser read `]` and finished processing a JSON array + - `value`: the parser finished reading a JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + @sa @ref parser_callback_t for more information and examples + */ + using parse_event_t = typename parser::parse_event_t; + + /*! + @brief per-element parser callback type + + With a parser callback function, the result of parsing a JSON text can be + influenced. When passed to @ref parse, it is called on certain events + (passed as @ref parse_event_t via parameter @a event) with a set recursion + depth @a depth and context JSON value @a parsed. The return value of the + callback function is a boolean indicating whether the element that emitted + the callback shall be kept or not. + + We distinguish six scenarios (determined by the event type) in which the + callback function can be called. The following table describes the values + of the parameters @a depth, @a event, and @a parsed. + + parameter @a event | description | parameter @a depth | parameter @a parsed + ------------------ | ----------- | ------------------ | ------------------- + parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded + parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key + parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object + parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded + parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array + parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + Discarding a value (i.e., returning `false`) has different effects + depending on the context in which function was called: + + - Discarded values in structured types are skipped. That is, the parser + will behave as if the discarded value was never read. + - In case a value outside a structured type is skipped, it is replaced + with `null`. This case happens if the top-level element is skipped. + + @param[in] depth the depth of the recursion during parsing + + @param[in] event an event of type parse_event_t indicating the context in + the callback function has been called + + @param[in,out] parsed the current intermediate parse result; note that + writing to this value has no effect for parse_event_t::key events + + @return Whether the JSON value which called the function during parsing + should be kept (`true`) or not (`false`). In the latter case, it is either + skipped completely or replaced by an empty discarded object. + + @sa @ref parse for examples + + @since version 1.0.0 + */ + using parser_callback_t = typename parser::parser_callback_t; + + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /*! + @brief create an empty value with a given type + + Create an empty JSON value with a given type. The value will be default + initialized with an empty value which depends on the type: + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @param[in] v the type of the value to create + + @complexity Constant. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows the constructor for different @ref + value_t values,basic_json__value_t} + + @sa @ref clear() -- restores the postcondition of this constructor + + @since version 1.0.0 + */ + basic_json(const value_t v) + : m_type(v), m_value(v) + { + assert_invariant(); + } + + /*! + @brief create a null object + + Create a `null` JSON value. It either takes a null pointer as parameter + (explicitly creating `null`) or no parameter (implicitly creating `null`). + The passed null pointer itself is not read -- it is only used to choose + the right constructor. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @liveexample{The following code shows the constructor with and without a + null pointer parameter.,basic_json__nullptr_t} + + @since version 1.0.0 + */ + basic_json(std::nullptr_t = nullptr) noexcept + : basic_json(value_t::null) + { + assert_invariant(); + } + + /*! + @brief create a JSON value + + This is a "catch all" constructor for all compatible JSON types; that is, + types for which a `to_json()` method exists. The constructor forwards the + parameter @a val to that method (to `json_serializer::to_json` method + with `U = uncvref_t`, to be exact). + + Template type @a CompatibleType includes, but is not limited to, the + following types: + - **arrays**: @ref array_t and all kinds of compatible containers such as + `std::vector`, `std::deque`, `std::list`, `std::forward_list`, + `std::array`, `std::valarray`, `std::set`, `std::unordered_set`, + `std::multiset`, and `std::unordered_multiset` with a `value_type` from + which a @ref basic_json value can be constructed. + - **objects**: @ref object_t and all kinds of compatible associative + containers such as `std::map`, `std::unordered_map`, `std::multimap`, + and `std::unordered_multimap` with a `key_type` compatible to + @ref string_t and a `value_type` from which a @ref basic_json value can + be constructed. + - **strings**: @ref string_t, string literals, and all compatible string + containers can be used. + - **numbers**: @ref number_integer_t, @ref number_unsigned_t, + @ref number_float_t, and all convertible number types such as `int`, + `size_t`, `int64_t`, `float` or `double` can be used. + - **boolean**: @ref boolean_t / `bool` can be used. + + See the examples below. + + @tparam CompatibleType a type such that: + - @a CompatibleType is not derived from `std::istream`, + - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move + constructors), + - @a CompatibleType is not a @ref basic_json nested type (e.g., + @ref json_pointer, @ref iterator, etc ...) + - @ref @ref json_serializer has a + `to_json(basic_json_t&, CompatibleType&&)` method + + @tparam U = `uncvref_t` + + @param[in] val the value to be forwarded to the respective constructor + + @complexity Usually linear in the size of the passed @a val, also + depending on the implementation of the called `to_json()` + method. + + @exceptionsafety Depends on the called constructor. For types directly + supported by the library (i.e., all types for which no `to_json()` function + was provided), strong guarantee holds: if an exception is thrown, there are + no changes to any JSON value. + + @liveexample{The following code shows the constructor with several + compatible types.,basic_json__CompatibleType} + + @since version 2.1.0 + */ + template, + detail::enable_if_t::value and + not std::is_same::value and + not detail::is_basic_json_nested_type< + basic_json_t, U>::value and + detail::has_to_json::value, + int> = 0> + basic_json(CompatibleType && val) noexcept(noexcept(JSONSerializer::to_json( + std::declval(), std::forward(val)))) + { + JSONSerializer::to_json(*this, std::forward(val)); + assert_invariant(); + } + + /*! + @brief create a container (array or object) from an initializer list + + Creates a JSON value of type array or object from the passed initializer + list @a init. In case @a type_deduction is `true` (default), the type of + the JSON value to be created is deducted from the initializer list @a init + according to the following rules: + + 1. If the list is empty, an empty JSON object value `{}` is created. + 2. If the list consists of pairs whose first element is a string, a JSON + object value is created where the first elements of the pairs are + treated as keys and the second elements are as values. + 3. In all other cases, an array is created. + + The rules aim to create the best fit between a C++ initializer list and + JSON values. The rationale is as follows: + + 1. The empty initializer list is written as `{}` which is exactly an empty + JSON object. + 2. C++ has no way of describing mapped types other than to list a list of + pairs. As JSON requires that keys must be of type string, rule 2 is the + weakest constraint one can pose on initializer lists to interpret them + as an object. + 3. In all other cases, the initializer list could not be interpreted as + JSON object type, so interpreting it as JSON array type is safe. + + With the rules described above, the following JSON values cannot be + expressed by an initializer list: + + - the empty array (`[]`): use @ref array(initializer_list_t) + with an empty initializer list in this case + - arrays whose elements satisfy rule 2: use @ref + array(initializer_list_t) with the same initializer list + in this case + + @note When used without parentheses around an empty initializer list, @ref + basic_json() is called instead of this function, yielding the JSON null + value. + + @param[in] init initializer list with JSON values + + @param[in] type_deduction internal parameter; when set to `true`, the type + of the JSON value is deducted from the initializer list @a init; when set + to `false`, the type provided via @a manual_type is forced. This mode is + used by the functions @ref array(initializer_list_t) and + @ref object(initializer_list_t). + + @param[in] manual_type internal parameter; when @a type_deduction is set + to `false`, the created JSON value will use the provided type (only @ref + value_t::array and @ref value_t::object are valid); when @a type_deduction + is set to `true`, this parameter has no effect + + @throw type_error.301 if @a type_deduction is `false`, @a manual_type is + `value_t::object`, but @a init contains an element which is not a pair + whose first element is a string. In this case, the constructor could not + create an object. If @a type_deduction would have be `true`, an array + would have been created. See @ref object(initializer_list_t) + for an example. + + @complexity Linear in the size of the initializer list @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows how JSON values are created from + initializer lists.,basic_json__list_init_t} + + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref& element_ref) + { + return (element_ref->is_array() and element_ref->size() == 2 and (*element_ref)[0].is_string()); + }); + + // adjust type if type deduction is not wanted + if (not type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_UNLIKELY(manual_type == value_t::object and not is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list")); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_type = value_t::object; + m_value = value_t::object; + + std::for_each(init.begin(), init.end(), [this](const detail::json_ref& element_ref) + { + auto element = element_ref.moved_or_copied(); + m_value.object->emplace( + std::move(*((*element.m_value.array)[0].m_value.string)), + std::move((*element.m_value.array)[1])); + }); + } + else + { + // the initializer list describes an array -> create array + m_type = value_t::array; + m_value.array = create(init.begin(), init.end()); + } + + assert_invariant(); + } + + /*! + @brief explicitly create an array from an initializer list + + Creates a JSON array value from a given initializer list. That is, given a + list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the + initializer list is empty, the empty array `[]` is created. + + @note This function is only needed to express two edge cases that cannot + be realized with the initializer list constructor (@ref + basic_json(initializer_list_t, bool, value_t)). These cases + are: + 1. creating an array whose elements are all pairs whose first element is a + string -- in this case, the initializer list constructor would create an + object, taking the first elements as keys + 2. creating an empty array -- passing the empty initializer list to the + initializer list constructor yields an empty object + + @param[in] init initializer list with JSON values to create an array from + (optional) + + @return JSON array value + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `array` + function.,array} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /*! + @brief explicitly create an object from an initializer list + + Creates a JSON object value from a given initializer list. The initializer + lists elements must be pairs, and their first elements must be strings. If + the initializer list is empty, the empty object `{}` is created. + + @note This function is only added for symmetry reasons. In contrast to the + related function @ref array(initializer_list_t), there are + no cases which can only be expressed by this function. That is, any + initializer list @a init can also be passed to the initializer list + constructor @ref basic_json(initializer_list_t, bool, value_t). + + @param[in] init initializer list to create an object from (optional) + + @return JSON object value + + @throw type_error.301 if @a init is not a list of pairs whose first + elements are strings. In this case, no object can be created. When such a + value is passed to @ref basic_json(initializer_list_t, bool, value_t), + an array would have been created from the passed initializer list @a init. + See example below. + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `object` + function.,object} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + + @since version 1.0.0 + */ + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /*! + @brief construct an array with count copies of given value + + Constructs a JSON array value by creating @a cnt copies of a passed value. + In case @a cnt is `0`, an empty array is created. + + @param[in] cnt the number of JSON copies of @a val to create + @param[in] val the JSON value to copy + + @post `std::distance(begin(),end()) == cnt` holds. + + @complexity Linear in @a cnt. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows examples for the @ref + basic_json(size_type\, const basic_json&) + constructor.,basic_json__size_type_basic_json} + + @since version 1.0.0 + */ + basic_json(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create(cnt, val); + assert_invariant(); + } + + /*! + @brief construct a JSON container given an iterator range + + Constructs the JSON value with the contents of the range `[first, last)`. + The semantics depends on the different types a JSON value can have: + - In case of a null type, invalid_iterator.206 is thrown. + - In case of other primitive types (number, boolean, or string), @a first + must be `begin()` and @a last must be `end()`. In this case, the value is + copied. Otherwise, invalid_iterator.204 is thrown. + - In case of structured types (array, object), the constructor behaves as + similar versions for `std::vector` or `std::map`; that is, a JSON array + or object is constructed from the values in the range. + + @tparam InputIT an input iterator type (@ref iterator or @ref + const_iterator) + + @param[in] first begin of the range to copy from (included) + @param[in] last end of the range to copy from (excluded) + + @pre Iterators @a first and @a last must be initialized. **This + precondition is enforced with an assertion (see warning).** If + assertions are switched off, a violation of this precondition yields + undefined behavior. + + @pre Range `[first, last)` is valid. Usually, this precondition cannot be + checked efficiently. Only certain edge cases are detected; see the + description of the exceptions below. A violation of this precondition + yields undefined behavior. + + @warning A precondition is enforced with a runtime assertion that will + result in calling `std::abort` if this precondition is not met. + Assertions can be disabled by defining `NDEBUG` at compile time. + See http://en.cppreference.com/w/cpp/error/assert for more + information. + + @throw invalid_iterator.201 if iterators @a first and @a last are not + compatible (i.e., do not belong to the same JSON value). In this case, + the range `[first, last)` is undefined. + @throw invalid_iterator.204 if iterators @a first and @a last belong to a + primitive type (number, boolean, or string), but @a first does not point + to the first element any more. In this case, the range `[first, last)` is + undefined. See example code below. + @throw invalid_iterator.206 if iterators @a first and @a last belong to a + null value. In this case, the range `[first, last)` is undefined. + + @complexity Linear in distance between @a first and @a last. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows several ways to create JSON values by + specifying a subrange with iterators.,basic_json__InputIt_InputIt} + + @since version 1.0.0 + */ + template::value or + std::is_same::value, int>::type = 0> + basic_json(InputIT first, InputIT last) + { + assert(first.m_object != nullptr); + assert(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible")); + } + + // copy type from first iterator + m_type = first.m_object->m_type; + + // check if iterator range is complete for primitive values + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + break; + } + + default: + break; + } + + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = first.m_object->m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = first.m_object->m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value.number_float = first.m_object->m_value.number_float; + break; + } + + case value_t::boolean: + { + m_value.boolean = first.m_object->m_value.boolean; + break; + } + + case value_t::string: + { + m_value = *first.m_object->m_value.string; + break; + } + + case value_t::object: + { + m_value.object = create(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_value.array = create(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + + std::string(first.m_object->type_name()))); + } + + assert_invariant(); + } + + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + /// @private + basic_json(const detail::json_ref& ref) + : basic_json(ref.moved_or_copied()) + {} + + /*! + @brief copy constructor + + Creates a copy of a given JSON value. + + @param[in] other the JSON value to copy + + @post `*this == other` + + @complexity Linear in the size of @a other. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - As postcondition, it holds: `other == basic_json(other)`. + + @liveexample{The following code shows an example for the copy + constructor.,basic_json__basic_json} + + @since version 1.0.0 + */ + basic_json(const basic_json& other) + : m_type(other.m_type) + { + // check of passed value is valid + other.assert_invariant(); + + switch (m_type) + { + case value_t::object: + { + m_value = *other.m_value.object; + break; + } + + case value_t::array: + { + m_value = *other.m_value.array; + break; + } + + case value_t::string: + { + m_value = *other.m_value.string; + break; + } + + case value_t::boolean: + { + m_value = other.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_value = other.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value = other.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value = other.m_value.number_float; + break; + } + + default: + break; + } + + assert_invariant(); + } + + /*! + @brief move constructor + + Move constructor. Constructs a JSON value with the contents of the given + value @a other using move semantics. It "steals" the resources from @a + other and leaves it as JSON null value. + + @param[in,out] other value to move to this object + + @post `*this` has the same value as @a other before the call. + @post @a other is a JSON null value. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @requirement This function helps `basic_json` satisfying the + [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible) + requirements. + + @liveexample{The code below shows the move constructor explicitly called + via std::move.,basic_json__moveconstructor} + + @since version 1.0.0 + */ + basic_json(basic_json&& other) noexcept + : m_type(std::move(other.m_type)), + m_value(std::move(other.m_value)) + { + // check that passed value is valid + other.assert_invariant(); + + // invalidate payload + other.m_type = value_t::null; + other.m_value = {}; + + assert_invariant(); + } + + /*! + @brief copy assignment + + Copy assignment operator. Copies a JSON value via the "copy and swap" + strategy: It is expressed in terms of the copy constructor, destructor, + and the `swap()` member function. + + @param[in] other value to copy from + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + + @liveexample{The code below shows and example for the copy assignment. It + creates a copy of value `a` which is then swapped with `b`. Finally\, the + copy of `a` (which is the null value after the swap) is + destroyed.,basic_json__copyassignment} + + @since version 1.0.0 + */ + reference& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible::value and + std::is_nothrow_move_assignable::value and + std::is_nothrow_move_constructible::value and + std::is_nothrow_move_assignable::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_type, other.m_type); + swap(m_value, other.m_value); + + assert_invariant(); + return *this; + } + + /*! + @brief destructor + + Destroys the JSON value and frees all allocated memory. + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - All stored elements are destroyed and all memory is freed. + + @since version 1.0.0 + */ + ~basic_json() + { + assert_invariant(); + m_value.destroy(m_type); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /*! + @brief serialization + + Serialization function for JSON values. The function tries to mimic + Python's `json.dumps()` function, and currently supports its @a indent + and @a ensure_ascii parameters. + + @param[in] indent If indent is nonnegative, then array elements and object + members will be pretty-printed with that indent level. An indent level of + `0` will only insert newlines. `-1` (the default) selects the most compact + representation. + @param[in] indent_char The character to use for indentation if @a indent is + greater than `0`. The default is ` ` (space). + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + + @return string containing the serialization of the JSON value + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @liveexample{The following example shows the effect of different @a indent\, + @a indent_char\, and @a ensure_ascii parameters to the result of the + serialization.,dump} + + @see https://docs.python.org/2/library/json.html#json.dump + + @since version 1.0.0; indentation character @a indent_char, option + @a ensure_ascii and exceptions added in version 3.0.0 + */ + string_t dump(const int indent = -1, const char indent_char = ' ', + const bool ensure_ascii = false) const + { + string_t result; + serializer s(detail::output_adapter(result), indent_char); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /*! + @brief return the type of the JSON value (explicit) + + Return the type of the JSON value as a value from the @ref value_t + enumeration. + + @return the type of the JSON value + Value type | return value + ------------------------- | ------------------------- + null | value_t::null + boolean | value_t::boolean + string | value_t::string + number (integer) | value_t::number_integer + number (unsigned integer) | value_t::number_unsigned + number (floating-point) | value_t::number_float + object | value_t::object + array | value_t::array + discarded | value_t::discarded + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `type()` for all JSON + types.,type} + + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr value_t type() const noexcept + { + return m_type; + } + + /*! + @brief return whether type is primitive + + This function returns true if and only if the JSON type is primitive + (string, number, boolean, or null). + + @return `true` if type is primitive (string, number, boolean, or null), + `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_primitive()` for all JSON + types.,is_primitive} + + @sa @ref is_structured() -- returns whether JSON value is structured + @sa @ref is_null() -- returns whether JSON value is `null` + @sa @ref is_string() -- returns whether JSON value is a string + @sa @ref is_boolean() -- returns whether JSON value is a boolean + @sa @ref is_number() -- returns whether JSON value is a number + + @since version 1.0.0 + */ + constexpr bool is_primitive() const noexcept + { + return is_null() or is_string() or is_boolean() or is_number(); + } + + /*! + @brief return whether type is structured + + This function returns true if and only if the JSON type is structured + (array or object). + + @return `true` if type is structured (array or object), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_structured()` for all JSON + types.,is_structured} + + @sa @ref is_primitive() -- returns whether value is primitive + @sa @ref is_array() -- returns whether value is an array + @sa @ref is_object() -- returns whether value is an object + + @since version 1.0.0 + */ + constexpr bool is_structured() const noexcept + { + return is_array() or is_object(); + } + + /*! + @brief return whether value is null + + This function returns true if and only if the JSON value is null. + + @return `true` if type is null, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_null()` for all JSON + types.,is_null} + + @since version 1.0.0 + */ + constexpr bool is_null() const noexcept + { + return (m_type == value_t::null); + } + + /*! + @brief return whether value is a boolean + + This function returns true if and only if the JSON value is a boolean. + + @return `true` if type is boolean, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_boolean()` for all JSON + types.,is_boolean} + + @since version 1.0.0 + */ + constexpr bool is_boolean() const noexcept + { + return (m_type == value_t::boolean); + } + + /*! + @brief return whether value is a number + + This function returns true if and only if the JSON value is a number. This + includes both integer (signed and unsigned) and floating-point values. + + @return `true` if type is number (regardless whether integer, unsigned + integer or floating-type), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number()` for all JSON + types.,is_number} + + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number() const noexcept + { + return is_number_integer() or is_number_float(); + } + + /*! + @brief return whether value is an integer number + + This function returns true if and only if the JSON value is a signed or + unsigned integer number. This excludes floating-point values. + + @return `true` if type is an integer or unsigned integer number, `false` + otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_integer()` for all + JSON types.,is_number_integer} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number_integer() const noexcept + { + return (m_type == value_t::number_integer or m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is an unsigned integer number + + This function returns true if and only if the JSON value is an unsigned + integer number. This excludes floating-point and signed integer values. + + @return `true` if type is an unsigned integer number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_unsigned()` for all + JSON types.,is_number_unsigned} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 2.0.0 + */ + constexpr bool is_number_unsigned() const noexcept + { + return (m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is a floating-point number + + This function returns true if and only if the JSON value is a + floating-point number. This excludes signed and unsigned integer values. + + @return `true` if type is a floating-point number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_float()` for all + JSON types.,is_number_float} + + @sa @ref is_number() -- check if value is number + @sa @ref is_number_integer() -- check if value is an integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + + @since version 1.0.0 + */ + constexpr bool is_number_float() const noexcept + { + return (m_type == value_t::number_float); + } + + /*! + @brief return whether value is an object + + This function returns true if and only if the JSON value is an object. + + @return `true` if type is object, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_object()` for all JSON + types.,is_object} + + @since version 1.0.0 + */ + constexpr bool is_object() const noexcept + { + return (m_type == value_t::object); + } + + /*! + @brief return whether value is an array + + This function returns true if and only if the JSON value is an array. + + @return `true` if type is array, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_array()` for all JSON + types.,is_array} + + @since version 1.0.0 + */ + constexpr bool is_array() const noexcept + { + return (m_type == value_t::array); + } + + /*! + @brief return whether value is a string + + This function returns true if and only if the JSON value is a string. + + @return `true` if type is string, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_string()` for all JSON + types.,is_string} + + @since version 1.0.0 + */ + constexpr bool is_string() const noexcept + { + return (m_type == value_t::string); + } + + /*! + @brief return whether value is discarded + + This function returns true if and only if the JSON value was discarded + during parsing with a callback function (see @ref parser_callback_t). + + @note This function will always be `false` for JSON values after parsing. + That is, discarded values can only occur during parsing, but will be + removed when inside a structured value or replaced by null in other cases. + + @return `true` if type is discarded, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_discarded()` for all JSON + types.,is_discarded} + + @since version 1.0.0 + */ + constexpr bool is_discarded() const noexcept + { + return (m_type == value_t::discarded); + } + + /*! + @brief return the type of the JSON value (implicit) + + Implicitly return the type of the JSON value as a value from the @ref + value_t enumeration. + + @return the type of the JSON value + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies the @ref value_t operator for + all JSON types.,operator__value_t} + + @sa @ref type() -- return the type of the JSON value (explicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr operator value_t() const noexcept + { + return m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_LIKELY(is_boolean())) + { + return m_value.boolean; + } + + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()))); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto ptr = obj.template get_ptr::type>(); + + if (JSON_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()))); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template::type, basic_json_t>::value, + int> = 0> + basic_json get() const + { + return *this; + } + + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map`.,get__ValueType_const} + + @since version 2.1.0 + */ + template, + detail::enable_if_t < + not std::is_same::value and + detail::has_from_json::value and + not detail::has_non_default_from_json::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer::from_json(std::declval(), std::declval()))) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get(), which is why we + // still need the uncvref + static_assert(not std::is_reference::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + static_assert(std::is_default_constructible::value, + "types must be DefaultConstructible when used with get()"); + + ValueType ret; + JSONSerializer::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and **not** [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer `from_json()` method throws + + @since version 2.1.0 + */ + template, + detail::enable_if_t::value and + detail::has_non_default_from_json::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer::from_json(std::declval()))) + { + static_assert(not std::is_reference::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return JSONSerializer::from_json(*this); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template::value, int>::type = 0> + PointerType get() noexcept + { + // delegate the call to get_ptr + return get_ptr(); + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template::value, int>::type = 0> + constexpr const PointerType get() const noexcept + { + // delegate the call to get_ptr + return get_ptr(); + } + + /*! + @brief get a pointer value (implicit) + + Implicit pointer access to the internally stored JSON value. No copies are + made. + + @warning Writing data to the pointee of the result yields an undefined + state. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. Enforced by a static + assertion. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get_ptr} + + @since version 1.0.0 + */ + template::value, int>::type = 0> + PointerType get_ptr() noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast(nullptr)); + } + + /*! + @brief get a pointer value (implicit) + @copydoc get_ptr() + */ + template::value and + std::is_const::type>::value, int>::type = 0> + constexpr const PointerType get_ptr() const noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + or std::is_same::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast(nullptr)); + } + + /*! + @brief get a reference value (implicit) + + Implicit reference access to the internally stored JSON value. No copies + are made. + + @warning Writing data to the referee of the result yields an undefined + state. + + @tparam ReferenceType reference type; must be a reference to @ref array_t, + @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or + @ref number_float_t. Enforced by static assertion. + + @return reference to the internally stored JSON value if the requested + reference type @a ReferenceType fits to the JSON value; throws + type_error.303 otherwise + + @throw type_error.303 in case passed type @a ReferenceType is incompatible + with the stored JSON value; see example below + + @complexity Constant. + + @liveexample{The example shows several calls to `get_ref()`.,get_ref} + + @since version 1.1.0 + */ + template::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl(*this); + } + + /*! + @brief get a reference value (implicit) + @copydoc get_ref() + */ + template::value and + std::is_const::type>::value, int>::type = 0> + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + not std::is_pointer::value and + not std::is_same>::value and + not std::is_same::value +#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 + and not std::is_same>::value +#endif +#if defined(JSON_HAS_CPP_17) + and not std::is_same::value +#endif + , int >::type = 0 > + operator ValueType() const + { + // delegate the call to get<>() const + return get(); + } + + /// @} + + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /*! + @brief access specified array element with bounds checking + + Returns a reference to the element at specified location @a idx, with + bounds checking. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__size_type} + */ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element with bounds checking + + Returns a const reference to the element at specified location @a idx, + with bounds checking. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__size_type_const} + */ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a reference to the element at with specified key @a key, with + bounds checking. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__object_t_key_type} + */ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a const reference to the element at with specified key @a key, + with bounds checking. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__object_t_key_type_const} + */ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element + + Returns a reference to the element at specified location @a idx. + + @note If @a idx is beyond the range of the array (i.e., `idx >= size()`), + then the array is silently filled up with `null` values to make `idx` a + valid reference to the last stored element. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array or null; in that + cases, using the [] operator with an index makes no sense. + + @complexity Constant if @a idx is in the range of the array. Otherwise + linear in `idx - size()`. + + @liveexample{The example below shows how array elements can be read and + written using `[]` operator. Note the addition of `null` + values.,operatorarray__size_type} + + @since version 1.0.0 + */ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_type = value_t::array; + m_value.array = create(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_value.array->size()) + { + m_value.array->insert(m_value.array->end(), + idx - m_value.array->size() + 1, + basic_json()); + } + + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified array element + + Returns a const reference to the element at specified location @a idx. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array; in that case, + using the [] operator with an index makes no sense. + + @complexity Constant. + + @liveexample{The example below shows how array elements can be read using + the `[]` operator.,operatorarray__size_type_const} + + @since version 1.0.0 + */ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + reference operator[](const typename object_t::key_type& key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template + reference operator[](T* key) + { + // implicitly convert null to object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // at only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template + const_reference operator[](T* key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(key); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const typename object_t::key_type&), this function + does not throw if the given key @a key was not found. + + @note Unlike @ref operator[](const typename object_t::key_type& key), this + function does not implicitly add an element to the position defined by @a + key. This function is furthermore also applicable to const objects. + + @param[in] key key of the element to access + @param[in] default_value the value to return if @a key is not found + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an object; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + + @since version 1.0.0 + */ + template::value, int>::type = 0> + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return *it; + } + + return default_value; + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const typename object_t::key_type&, ValueType) const + */ + string_t value(const typename object_t::key_type& key, const char* default_value) const + { + return value(key, string_t(default_value)); + } + + /*! + @brief access specified object element via JSON Pointer with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(ptr); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const json_pointer&), this function does not throw + if the given key @a key was not found. + + @param[in] ptr a JSON pointer to the element to access + @param[in] default_value the value to return if @a ptr found no value + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an objec; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value_ptr} + + @sa @ref operator[](const json_pointer&) for unchecked access by reference + + @since version 2.0.2 + */ + template::value, int>::type = 0> + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this); + } + JSON_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const json_pointer&, ValueType) const + */ + string_t value(const json_pointer& ptr, const char* default_value) const + { + return value(ptr, string_t(default_value)); + } + + /*! + @brief access the first element + + Returns a reference to the first element in the container. For a JSON + container `c`, the expression `c.front()` is equivalent to `*c.begin()`. + + @return In case of a structured type (array or object), a reference to the + first element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on `null` value + + @liveexample{The following code shows an example for `front()`.,front} + + @sa @ref back() -- access the last element + + @since version 1.0.0 + */ + reference front() + { + return *begin(); + } + + /*! + @copydoc basic_json::front() + */ + const_reference front() const + { + return *cbegin(); + } + + /*! + @brief access the last element + + Returns a reference to the last element in the container. For a JSON + container `c`, the expression `c.back()` is equivalent to + @code {.cpp} + auto tmp = c.end(); + --tmp; + return *tmp; + @endcode + + @return In case of a structured type (array or object), a reference to the + last element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on a `null` value. See example + below. + + @liveexample{The following code shows an example for `back()`.,back} + + @sa @ref front() -- access the first element + + @since version 1.0.0 + */ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /*! + @copydoc basic_json::back() + */ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /*! + @brief remove element given an iterator + + Removes the element specified by iterator @a pos. The iterator @a pos must + be valid and dereferenceable. Thus the `end()` iterator (which is valid, + but is not dereferenceable) cannot be used as a value for @a pos. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] pos iterator to the element to remove + @return Iterator following the last removed element. If the iterator @a + pos refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.202 if called on an iterator which does not belong + to the current JSON value; example: `"iterator does not fit current + value"` + @throw invalid_iterator.205 if called on a primitive type with invalid + iterator (i.e., any iterator which is not `begin()`); example: `"iterator + out of range"` + + @complexity The complexity depends on the type: + - objects: amortized constant + - arrays: linear in distance between @a pos and the end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType} + + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template::value or + std::is_same::value, int>::type + = 0> + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range")); + } + + if (is_string()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove elements given an iterator range + + Removes the element specified by the range `[first; last)`. The iterator + @a first does not need to be dereferenceable if `first == last`: erasing + an empty range is a no-op. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] first iterator to the beginning of the range to remove + @param[in] last iterator past the end of the range to remove + @return Iterator following the last removed element. If the iterator @a + second refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.203 if called on iterators which does not belong + to the current JSON value; example: `"iterators do not fit current value"` + @throw invalid_iterator.204 if called on a primitive type with invalid + iterators (i.e., if `first != begin()` and `last != end()`); example: + `"iterators out of range"` + + @complexity The complexity depends on the type: + - objects: `log(size()) + std::distance(first, last)` + - arrays: linear in the distance between @a first and @a last, plus linear + in the distance between @a last and end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType_IteratorType} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template::value or + std::is_same::value, int>::type + = 0> + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != first.m_object or this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_LIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + + if (is_string()) + { + AllocatorType alloc; + std::allocator_traits::destroy(alloc, m_value.string); + std::allocator_traits::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove element from a JSON object given a key + + Removes elements from a JSON object with the key value @a key. + + @param[in] key value of the elements to remove + + @return Number of elements removed. If @a ObjectType is the default + `std::map` type, the return value will always be `0` (@a key was not + found) or `1` (@a key was found). + + @post References and iterators to the erased elements are invalidated. + Other references and iterators are not affected. + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + + @complexity `log(size()) + count(key)` + + @liveexample{The example shows the effect of `erase()`.,erase__key_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + size_type erase(const typename object_t::key_type& key) + { + // this erase only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->erase(key); + } + + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + /*! + @brief remove element from a JSON array given an index + + Removes element from a JSON array at the index @a idx. + + @param[in] idx index of the element to remove + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + @throw out_of_range.401 when `idx >= size()`; example: `"array index 17 + is out of range"` + + @complexity Linear in distance between @a idx and the end of the container. + + @liveexample{The example shows the effect of `erase()`.,erase__size_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + + @since version 1.0.0 + */ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_LIKELY(is_array())) + { + if (JSON_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + + m_value.array->erase(m_value.array->begin() + static_cast(idx)); + } + else + { + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + } + + /// @} + + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /*! + @brief find an element in a JSON object + + Finds an element in a JSON object with key equivalent to @a key. If the + element is not found or the JSON value is not an object, end() is + returned. + + @note This method always returns @ref end() when executed on a JSON type + that is not an object. + + @param[in] key key value of the element to search for. + + @return Iterator to an element with key equivalent to @a key. If no such + element is found or the JSON value is not an object, past-the-end (see + @ref end()) iterator is returned. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `find()` is used.,find__key_type} + + @since version 1.0.0 + */ + template + iterator find(KeyT&& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward(key)); + } + + return result; + } + + /*! + @brief find an element in a JSON object + @copydoc find(KeyT&&) + */ + template + const_iterator find(KeyT&& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward(key)); + } + + return result; + } + + /*! + @brief returns the number of occurrences of a key in a JSON object + + Returns the number of elements with key @a key. If ObjectType is the + default `std::map` type, the return value will always be `0` (@a key was + not found) or `1` (@a key was found). + + @note This method always returns `0` when executed on a JSON type that is + not an object. + + @param[in] key key value of the element to count + + @return Number of elements with key @a key. If the JSON value is not an + object, the return value will be `0`. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `count()` is used.,count} + + @since version 1.0.0 + */ + template + size_type count(KeyT&& key) const + { + // return 0 for all nonobject types + return is_object() ? m_value.object->count(std::forward(key)) : 0; + } + + /// @} + + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /*! + @brief returns an iterator to the first element + + Returns an iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `begin()`.,begin} + + @sa @ref cbegin() -- returns a const iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /*! + @copydoc basic_json::cbegin() + */ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /*! + @brief returns a const iterator to the first element + + Returns a const iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast(*this).begin()`. + + @liveexample{The following code shows an example for `cbegin()`.,cbegin} + + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /*! + @brief returns an iterator to one past the last element + + Returns an iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `end()`.,end} + + @sa @ref cend() -- returns a const iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /*! + @copydoc basic_json::cend() + */ + const_iterator end() const noexcept + { + return cend(); + } + + /*! + @brief returns a const iterator to one past the last element + + Returns a const iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast(*this).end()`. + + @liveexample{The following code shows an example for `cend()`.,cend} + + @sa @ref end() -- returns an iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /*! + @brief returns an iterator to the reverse-beginning + + Returns an iterator to the reverse-beginning; that is, the last element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(end())`. + + @liveexample{The following code shows an example for `rbegin()`.,rbegin} + + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /*! + @copydoc basic_json::crbegin() + */ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /*! + @brief returns an iterator to the reverse-end + + Returns an iterator to the reverse-end; that is, one before the first + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(begin())`. + + @liveexample{The following code shows an example for `rend()`.,rend} + + @sa @ref crend() -- returns a const reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /*! + @copydoc basic_json::crend() + */ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /*! + @brief returns a const reverse iterator to the last element + + Returns a const iterator to the reverse-beginning; that is, the last + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast(*this).rbegin()`. + + @liveexample{The following code shows an example for `crbegin()`.,crbegin} + + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /*! + @brief returns a const reverse iterator to one before the first + + Returns a const reverse iterator to the reverse-end; that is, one before + the first element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast(*this).rend()`. + + @liveexample{The following code shows an example for `crend()`.,crend} + + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /*! + @brief wrapper to access iterator member functions in range-based for + + This function allows to access @ref iterator::key() and @ref + iterator::value() during range-based for loops. In these loops, a + reference to the JSON values is returned, so there is no access to the + underlying iterator. + + For loop without iterator_wrapper: + + @code{cpp} + for (auto it = j_object.begin(); it != j_object.end(); ++it) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + Range-based for loop without iterator proxy: + + @code{cpp} + for (auto it : j_object) + { + // "it" is of type json::reference and has no key() member + std::cout << "value: " << it << '\n'; + } + @endcode + + Range-based for loop with iterator proxy: + + @code{cpp} + for (auto it : json::iterator_wrapper(j_object)) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + @note When iterating over an array, `key()` will return the index of the + element as string (see example). + + @param[in] ref reference to a JSON value + @return iteration proxy object wrapping @a ref with an interface to use in + range-based for loops + + @liveexample{The following code shows how the wrapper is used,iterator_wrapper} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @note The name of this function is not yet final and may change in the + future. + */ + static iteration_proxy iterator_wrapper(reference ref) + { + return iteration_proxy(ref); + } + + /*! + @copydoc iterator_wrapper(reference) + */ + static iteration_proxy iterator_wrapper(const_reference ref) + { + return iteration_proxy(ref); + } + + /// @} + + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /*! + @brief checks whether the container is empty. + + Checks if a JSON value has no elements (i.e. whether its @ref size is `0`). + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `true` + boolean | `false` + string | `false` + number | `false` + object | result of function `object_t::empty()` + array | result of function `array_t::empty()` + + @liveexample{The following code uses `empty()` to check if a JSON + object contains any elements.,empty} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `empty()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return whether a string stored as JSON value + is empty - it returns whether the JSON container itself is empty which is + false in the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `begin() == end()`. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + bool empty() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_value.object->empty(); + } + + default: + { + // all other types are nonempty + return false; + } + } + } + + /*! + @brief returns the number of elements + + Returns the number of elements in a JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` + boolean | `1` + string | `1` + number | `1` + object | result of function object_t::size() + array | result of function array_t::size() + + @liveexample{The following code calls `size()` on the different value + types.,size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their size() functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return the length of a string stored as JSON + value - it returns the number of elements in the JSON value which is 1 in + the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `std::distance(begin(), end())`. + + @sa @ref empty() -- checks whether the container is empty + @sa @ref max_size() -- returns the maximal number of elements + + @since version 1.0.0 + */ + size_type size() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_value.object->size(); + } + + default: + { + // all other types have size 1 + return 1; + } + } + } + + /*! + @brief returns the maximum possible number of elements + + Returns the maximum number of elements a JSON value is able to hold due to + system or library implementation limitations, i.e. `std::distance(begin(), + end())` for the JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` (same as `size()`) + boolean | `1` (same as `size()`) + string | `1` (same as `size()`) + number | `1` (same as `size()`) + object | result of function `object_t::max_size()` + array | result of function `array_t::max_size()` + + @liveexample{The following code calls `max_size()` on the different value + types. Note the output is implementation specific.,max_size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `max_size()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of returning `b.size()` where `b` is the largest + possible JSON value. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + size_type max_size() const noexcept + { + switch (m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_value.object->max_size(); + } + + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /*! + @brief clears the contents + + Clears the content of a JSON value and resets it to the default value as + if @ref basic_json(value_t) would have been called with the current value + type from @ref type(): + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @post Has the same effect as calling + @code {.cpp} + *this = basic_json(type()); + @endcode + + @liveexample{The example below shows the effect of `clear()` to different + JSON types.,clear} + + @complexity Linear in the size of the JSON value. + + @iterators All iterators, pointers and references related to this container + are invalidated. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @sa @ref basic_json(value_t) -- constructor that creates an object with the + same value than calling `clear()` + + @since version 1.0.0 + */ + void clear() noexcept + { + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_value.boolean = false; + break; + } + + case value_t::string: + { + m_value.string->clear(); + break; + } + + case value_t::array: + { + m_value.array->clear(); + break; + } + + case value_t::object: + { + m_value.object->clear(); + break; + } + + default: + break; + } + } + + /*! + @brief add an object to an array + + Appends the given element @a val to the end of the JSON value. If the + function is called on a JSON null value, an empty array is created before + appending @a val. + + @param[in] val the value to add to the JSON array + + @throw type_error.308 when called on a type other than JSON array or + null; example: `"cannot use push_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON array. Note how the `null` value was silently + converted to a JSON array.,push_back} + + @since version 1.0.0 + */ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + m_value.array->push_back(std::move(val)); + // invalidate object + val.m_type = value_t::null; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array + m_value.array->push_back(val); + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + Inserts the given element @a val to the JSON object. If the function is + called on a JSON null value, an empty object is created before inserting + @a val. + + @param[in] val the value to add to the JSON object + + @throw type_error.308 when called on a type other than JSON object or + null; example: `"cannot use push_back() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON object. Note how the `null` value was silently + converted to a JSON object.,push_back__object_t__value} + + @since version 1.0.0 + */ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array + m_value.object->insert(val); + } + + /*! + @brief add an object to an object + @copydoc push_back(const typename object_t::value_type&) + */ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + This function allows to use `push_back` with an initializer list. In case + + 1. the current value is an object, + 2. the initializer list @a init contains only two elements, and + 3. the first element of @a init is a string, + + @a init is converted into an object element and added using + @ref push_back(const typename object_t::value_type&). Otherwise, @a init + is converted to a JSON value and added using @ref push_back(basic_json&&). + + @param[in] init an initializer list + + @complexity Linear in the size of the initializer list @a init. + + @note This function is required to resolve an ambiguous overload error, + because pairs like `{"key", "value"}` can be both interpreted as + `object_t::value_type` or `std::initializer_list`, see + https://github.com/nlohmann/json/issues/235 for more information. + + @liveexample{The example shows how initializer lists are treated as + objects when possible.,push_back__initializer_list} + */ + void push_back(initializer_list_t init) + { + if (is_object() and init.size() == 2 and (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /*! + @brief add an object to an object + @copydoc push_back(initializer_list_t) + */ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /*! + @brief add an object to an array + + Creates a JSON value from the passed parameters @a args to the end of the + JSON value. If the function is called on a JSON null value, an empty array + is created before appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @throw type_error.311 when called on a type other than JSON array or + null; example: `"cannot use emplace_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` can be used to add + elements to a JSON array. Note how the `null` value was silently converted + to a JSON array.,emplace_back} + + @since version 2.0.8 + */ + template + void emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + m_value.array->emplace_back(std::forward(args)...); + } + + /*! + @brief add an object to an object if key does not exist + + Inserts a new element into a JSON object constructed in-place with the + given @a args if there is no element with the key in the container. If the + function is called on a JSON null value, an empty object is created before + appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @return a pair consisting of an iterator to the inserted element, or the + already-existing element if no insertion happened, and a bool + denoting whether the insertion took place. + + @throw type_error.311 when called on a type other than JSON object or + null; example: `"cannot use emplace() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `emplace()` can be used to add elements + to a JSON object. Note how the `null` value was silently converted to a + JSON object. Further note how no value is added if there was already one + value stored with the same key.,emplace} + + @since version 2.0.8 + */ + template + std::pair emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_value.object->emplace(std::forward(args)...); + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /*! + @brief inserts element + + Inserts element @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] val element to insert + @return iterator pointing to the inserted @a val. + + @throw type_error.309 if called on JSON values other than arrays; + example: `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Constant plus linear in the distance between @a pos and end of + the container. + + @liveexample{The example shows how `insert()` is used.,insert} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts element + @copydoc insert(const_iterator, const basic_json&) + */ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /*! + @brief inserts elements + + Inserts @a cnt copies of @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] cnt number of copies of @a val to insert + @param[in] val element to insert + @return iterator pointing to the first element inserted, or @a pos if + `cnt==0` + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Linear in @a cnt plus linear in the distance between @a pos + and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__count} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)` before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + @throw invalid_iterator.211 if @a first or @a last are iterators into + container for which insert is called; example: `"passed iterators may not + belong to container"` + + @return iterator pointing to the first element inserted, or @a pos if + `first==last` + + @complexity Linear in `std::distance(first, last)` plus linear in the + distance between @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__range} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + if (JSON_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert( + pos.m_it.array_iterator, + first.m_it.array_iterator, + last.m_it.array_iterator); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from initializer list @a ilist before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] ilist initializer list to insert the values from + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @return iterator pointing to the first element inserted, or @a pos if + `ilist` is empty + + @complexity Linear in `ilist.size()` plus linear in the distance between + @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__ilist} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist.begin(), ilist.end()); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)`. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than objects; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number + of elements to insert. + + @liveexample{The example shows how `insert()` is used.,insert__range_object} + + @since version 3.0.0 + */ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from JSON object @a j and overwrites existing keys. + + @param[in] j JSON object to read values from + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_reference j) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(j.type_name()))); + } + + for (auto it = j.cbegin(); it != j.cend(); ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from from range `[first, last)` and overwrites existing + keys. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used__range.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_iterator first, const_iterator last) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object() + or not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + for (auto it = first; it != last; ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of the JSON value with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other JSON value to exchange the contents with + + @complexity Constant. + + @liveexample{The example below shows how JSON values can be swapped with + `swap()`.,swap__reference} + + @since version 1.0.0 + */ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible::value and + std::is_nothrow_move_assignable::value and + std::is_nothrow_move_constructible::value and + std::is_nothrow_move_assignable::value + ) + { + std::swap(m_type, other.m_type); + std::swap(m_value, other.m_value); + assert_invariant(); + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON array with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other array to exchange the contents with + + @throw type_error.310 when JSON value is not an array; example: `"cannot + use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how arrays can be swapped with + `swap()`.,swap__array_t} + + @since version 1.0.0 + */ + void swap(array_t& other) + { + // swap only works for arrays + if (JSON_LIKELY(is_array())) + { + std::swap(*(m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON object with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other object to exchange the contents with + + @throw type_error.310 when JSON value is not an object; example: + `"cannot use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how objects can be swapped with + `swap()`.,swap__object_t} + + @since version 1.0.0 + */ + void swap(object_t& other) + { + // swap only works for objects + if (JSON_LIKELY(is_object())) + { + std::swap(*(m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON string with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other string to exchange the contents with + + @throw type_error.310 when JSON value is not a string; example: `"cannot + use swap() with boolean"` + + @complexity Constant. + + @liveexample{The example below shows how strings can be swapped with + `swap()`.,swap__string_t} + + @since version 1.0.0 + */ + void swap(string_t& other) + { + // swap only works for strings + if (JSON_LIKELY(is_string())) + { + std::swap(*(m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /// @} + + public: + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + /*! + @brief comparison: equal + + Compares two JSON values for equality according to the following rules: + - Two JSON values are equal if (1) they are from the same type and (2) + their stored values are the same according to their respective + `operator==`. + - Integer and floating-point numbers are automatically converted before + comparison. Note than two NaN values are always treated as unequal. + - Two JSON null values are equal. + + @note Floating-point inside JSON values numbers are compared with + `json::number_float_t::operator==` which is `double::operator==` by + default. To compare floating-point while respecting an epsilon, an alternative + [comparison function](https://github.com/mariokonrad/marnav/blob/master/src/marnav/math/floatingpoint.hpp#L34-#L39) + could be used, for instance + @code {.cpp} + template::value, T>::type> + inline bool is_same(T a, T b, T epsilon = std::numeric_limits::epsilon()) noexcept + { + return std::abs(a - b) <= epsilon; + } + @endcode + + @note NaN values never compare equal to themselves or to other NaN values. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are equal + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Linear. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__equal} + + @since version 1.0.0 + */ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array == *rhs.m_value.array); + + case value_t::object: + return (*lhs.m_value.object == *rhs.m_value.object); + + case value_t::null: + return true; + + case value_t::string: + return (*lhs.m_value.string == *rhs.m_value.string); + + case value_t::boolean: + return (lhs.m_value.boolean == rhs.m_value.boolean); + + case value_t::number_integer: + return (lhs.m_value.number_integer == rhs.m_value.number_integer); + + case value_t::number_unsigned: + return (lhs.m_value.number_unsigned == rhs.m_value.number_unsigned); + + case value_t::number_float: + return (lhs.m_value.number_float == rhs.m_value.number_float); + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return (static_cast(lhs.m_value.number_integer) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return (lhs.m_value.number_float == static_cast(rhs.m_value.number_integer)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return (static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_float == static_cast(rhs.m_value.number_unsigned)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return (static_cast(lhs.m_value.number_unsigned) == rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_integer == static_cast(rhs.m_value.number_unsigned)); + } + + return false; + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs == basic_json(rhs)); + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) == rhs); + } + + /*! + @brief comparison: not equal + + Compares two JSON values for inequality by calculating `not (lhs == rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are not equal + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__notequal} + + @since version 1.0.0 + */ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs == rhs); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs != basic_json(rhs)); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) != rhs); + } + + /*! + @brief comparison: less than + + Compares whether one JSON value @a lhs is less than another JSON value @a + rhs according to the following rules: + - If @a lhs and @a rhs have the same type, the values are compared using + the default `<` operator. + - Integer and floating-point numbers are automatically converted before + comparison + - In case @a lhs and @a rhs have different types, the values are ignored + and the order of the types is considered, see + @ref operator<(const value_t, const value_t). + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__less} + + @since version 1.0.0 + */ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array) < (*rhs.m_value.array); + + case value_t::object: + return *lhs.m_value.object < *rhs.m_value.object; + + case value_t::null: + return false; + + case value_t::string: + return *lhs.m_value.string < *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean < rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer < rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float < rhs.m_value.number_float; + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_integer) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float < static_cast(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float < static_cast(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer < static_cast(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return static_cast(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; + } + + // We only reach this line if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + return operator<(lhs_type, rhs_type); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs < basic_json(rhs)); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) < rhs); + } + + /*! + @brief comparison: less than or equal + + Compares whether one JSON value @a lhs is less than or equal to another + JSON value by calculating `not (rhs < lhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greater} + + @since version 1.0.0 + */ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + return not (rhs < lhs); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs <= basic_json(rhs)); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) <= rhs); + } + + /*! + @brief comparison: greater than + + Compares whether one JSON value @a lhs is greater than another + JSON value by calculating `not (lhs <= rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__lessequal} + + @since version 1.0.0 + */ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs <= rhs); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs > basic_json(rhs)); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) > rhs); + } + + /*! + @brief comparison: greater than or equal + + Compares whether one JSON value @a lhs is greater than or equal to another + JSON value by calculating `not (lhs < rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greaterequal} + + @since version 1.0.0 + */ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs < rhs); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs >= basic_json(rhs)); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template::value, int>::type = 0> + friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) >= rhs); + } + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ + + /*! + @brief serialize to stream + + Serialize the given JSON value @a j to the output stream @a o. The JSON + value will be serialized using the @ref dump member function. + + - The indentation of the output can be controlled with the member variable + `width` of the output stream @a o. For instance, using the manipulator + `std::setw(4)` on @a o sets the indentation level to `4` and the + serialization result is the same as calling `dump(4)`. + + - The indentation character can be controlled with the member variable + `fill` of the output stream @a o. For instance, the manipulator + `std::setfill('\\t')` sets indentation to use a tab character rather than + the default space character. + + @param[in,out] o stream to serialize to + @param[in] j JSON value to serialize + + @return the stream @a o + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @liveexample{The example below shows the serialization with different + parameters to `width` to adjust the indentation level.,operator_serialize} + + @since version 1.0.0; indentation character added in version 3.0.0 + */ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = (o.width() > 0); + const auto indentation = (pretty_print ? o.width() : 0); + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter(o), o.fill()); + s.dump(j, pretty_print, false, static_cast(indentation)); + return o; + } + + /*! + @brief serialize to stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator<<(std::ostream&, const basic_json&) + instead; that is, replace calls like `j >> o;` with `o << j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } + + /// @} + + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /*! + @brief deserialize from a compatible input + + This function reads from a compatible input. Examples are: + - an array of 1-byte values + - strings with character/literal type with size of 1 byte + - input streams + - container with contiguous storage of 1-byte values. Compatible container + types include `std::vector`, `std::string`, `std::array`, + `std::valarray`, and `std::initializer_list`. Furthermore, C-style + arrays can be used with `std::begin()`/`std::end()`. User-defined + containers can be used as long as they implement random-access iterators + and a contiguous storage. + + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @pre The container storage is contiguous. Violating this precondition + yields undefined behavior. **This precondition is enforced with an + assertion.** + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with a noncompliant container and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @param[in] i input to read from + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + + @return result of the deserialization + + @throw parse_error.101 if a parse error occurs; example: `""unexpected end + of input; expected string literal""` + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an array.,parse__array__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__string__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__istream__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function reading + from a contiguous container.,parse__contiguouscontainer__parser_callback_t} + + @since version 2.0.3 (contiguous containers) + */ + static basic_json parse(detail::input_adapter i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + /*! + @copydoc basic_json parse(detail::input_adapter, const parser_callback_t) + */ + static basic_json parse(detail::input_adapter& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + static bool accept(detail::input_adapter i) + { + return parser(i).accept(true); + } + + static bool accept(detail::input_adapter& i) + { + return parser(i).accept(true); + } + + /*! + @brief deserialize from an iterator range with contiguous storage + + This function reads from an iterator range of a container with contiguous + storage of 1-byte values. Compatible container types include + `std::vector`, `std::string`, `std::array`, `std::valarray`, and + `std::initializer_list`. Furthermore, C-style arrays can be used with + `std::begin()`/`std::end()`. User-defined containers can be used as long + as they implement random-access iterators and a contiguous storage. + + @pre The iterator range is contiguous. Violating this precondition yields + undefined behavior. **This precondition is enforced with an assertion.** + @pre Each element in the range has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with noncompliant iterators and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @tparam IteratorType iterator of container with contiguous storage + @param[in] first begin of the range to parse (included) + @param[in] last end of the range to parse (excluded) + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return result of the deserialization + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an iterator range.,parse__iteratortype__parser_callback_t} + + @since version 2.0.3 + */ + template::iterator_category>::value, int>::type = 0> + static basic_json parse(IteratorType first, IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(detail::input_adapter(first, last), cb, allow_exceptions).parse(true, result); + return result; + } + + template::iterator_category>::value, int>::type = 0> + static bool accept(IteratorType first, IteratorType last) + { + return parser(detail::input_adapter(first, last)).accept(true); + } + + /*! + @brief deserialize from stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator>>(std::istream&, basic_json&) + instead; that is, replace calls like `j << i;` with `i >> j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /*! + @brief deserialize from stream + + Deserializes an input stream to a JSON value. + + @param[in,out] i input stream to read a serialized JSON value from + @param[in,out] j JSON value to write the deserialized input to + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below shows how a JSON value is constructed by + reading a serialization from a stream.,operator_deserialize} + + @sa parse(std::istream&, const parser_callback_t) for a variant with a + parser callback function to filter values while parsing + + @since version 1.0.0 + */ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } + + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /*! + @brief return the type as string + + Returns the type name as string to be used in error messages - usually to + indicate that a function was called on a wrong JSON type. + + @return a string representation of a the @a m_type member: + Value type | return value + ----------- | ------------- + null | `"null"` + boolean | `"boolean"` + string | `"string"` + number | `"number"` (for all number types) + object | `"object"` + array | `"array"` + discarded | `"discarded"` + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Constant. + + @liveexample{The following code exemplifies `type_name()` for all JSON + types.,type_name} + + @sa @ref type() -- return the type of the JSON value + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + + @since version 1.0.0, public since 2.1.0, `const char*` and `noexcept` + since 3.0.0 + */ + const char* type_name() const noexcept + { + { + switch (m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::discarded: + return "discarded"; + default: + return "number"; + } + } + } + + + private: + ////////////////////// + // member variables // + ////////////////////// + + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /*! + @brief create a CBOR serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the CBOR (Concise + Binary Object Representation) serialization format. CBOR is a binary + serialization format which aims to be more compact than JSON itself, yet + more efficient to parse. + + The library uses the following mapping from JSON values types to + CBOR types according to the CBOR specification (RFC 7049): + + JSON value type | value/range | CBOR type | first byte + --------------- | ------------------------------------------ | ---------------------------------- | --------------- + null | `null` | Null | 0xF6 + boolean | `true` | True | 0xF5 + boolean | `false` | False | 0xF4 + number_integer | -9223372036854775808..-2147483649 | Negative integer (8 bytes follow) | 0x3B + number_integer | -2147483648..-32769 | Negative integer (4 bytes follow) | 0x3A + number_integer | -32768..-129 | Negative integer (2 bytes follow) | 0x39 + number_integer | -128..-25 | Negative integer (1 byte follow) | 0x38 + number_integer | -24..-1 | Negative integer | 0x20..0x37 + number_integer | 0..23 | Integer | 0x00..0x17 + number_integer | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_integer | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_integer | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_integer | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_unsigned | 0..23 | Integer | 0x00..0x17 + number_unsigned | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_unsigned | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_unsigned | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_unsigned | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_float | *any value* | Double-Precision Float | 0xFB + string | *length*: 0..23 | UTF-8 string | 0x60..0x77 + string | *length*: 23..255 | UTF-8 string (1 byte follow) | 0x78 + string | *length*: 256..65535 | UTF-8 string (2 bytes follow) | 0x79 + string | *length*: 65536..4294967295 | UTF-8 string (4 bytes follow) | 0x7A + string | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow) | 0x7B + array | *size*: 0..23 | array | 0x80..0x97 + array | *size*: 23..255 | array (1 byte follow) | 0x98 + array | *size*: 256..65535 | array (2 bytes follow) | 0x99 + array | *size*: 65536..4294967295 | array (4 bytes follow) | 0x9A + array | *size*: 4294967296..18446744073709551615 | array (8 bytes follow) | 0x9B + object | *size*: 0..23 | map | 0xA0..0xB7 + object | *size*: 23..255 | map (1 byte follow) | 0xB8 + object | *size*: 256..65535 | map (2 bytes follow) | 0xB9 + object | *size*: 65536..4294967295 | map (4 bytes follow) | 0xBA + object | *size*: 4294967296..18446744073709551615 | map (8 bytes follow) | 0xBB + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a CBOR value. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @note The following CBOR types are not used in the conversion: + - byte strings (0x40..0x5F) + - UTF-8 strings terminated by "break" (0x7F) + - arrays terminated by "break" (0x9F) + - maps terminated by "break" (0xBF) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + - half and single-precision floats (0xF9-0xFA) + - break (0xFF) + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in CBOR format.,to_cbor} + + @sa http://cbor.io + @sa @ref from_cbor(const std::vector&, const size_t) for the + analogous deserialization + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + + @since version 2.0.9 + */ + static std::vector to_cbor(const basic_json& j) + { + std::vector result; + to_cbor(j, result); + return result; + } + + static void to_cbor(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_cbor(j); + } + + static void to_cbor(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_cbor(j); + } + + /*! + @brief create a MessagePack serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the MessagePack + serialization format. MessagePack is a binary serialization format which + aims to be more compact than JSON itself, yet more efficient to parse. + + The library uses the following mapping from JSON values types to + MessagePack types according to the MessagePack specification: + + JSON value type | value/range | MessagePack type | first byte + --------------- | --------------------------------- | ---------------- | ---------- + null | `null` | nil | 0xC0 + boolean | `true` | true | 0xC3 + boolean | `false` | false | 0xC2 + number_integer | -9223372036854775808..-2147483649 | int64 | 0xD3 + number_integer | -2147483648..-32769 | int32 | 0xD2 + number_integer | -32768..-129 | int16 | 0xD1 + number_integer | -128..-33 | int8 | 0xD0 + number_integer | -32..-1 | negative fixint | 0xE0..0xFF + number_integer | 0..127 | positive fixint | 0x00..0x7F + number_integer | 128..255 | uint 8 | 0xCC + number_integer | 256..65535 | uint 16 | 0xCD + number_integer | 65536..4294967295 | uint 32 | 0xCE + number_integer | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_unsigned | 0..127 | positive fixint | 0x00..0x7F + number_unsigned | 128..255 | uint 8 | 0xCC + number_unsigned | 256..65535 | uint 16 | 0xCD + number_unsigned | 65536..4294967295 | uint 32 | 0xCE + number_unsigned | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_float | *any value* | float 64 | 0xCB + string | *length*: 0..31 | fixstr | 0xA0..0xBF + string | *length*: 32..255 | str 8 | 0xD9 + string | *length*: 256..65535 | str 16 | 0xDA + string | *length*: 65536..4294967295 | str 32 | 0xDB + array | *size*: 0..15 | fixarray | 0x90..0x9F + array | *size*: 16..65535 | array 16 | 0xDC + array | *size*: 65536..4294967295 | array 32 | 0xDD + object | *size*: 0..15 | fix map | 0x80..0x8F + object | *size*: 16..65535 | map 16 | 0xDE + object | *size*: 65536..4294967295 | map 32 | 0xDF + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a MessagePack value. + + @note The following values can **not** be converted to a MessagePack value: + - strings with more than 4294967295 bytes + - arrays with more than 4294967295 elements + - objects with more than 4294967295 elements + + @note The following MessagePack types are not used in the conversion: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - float 32 (0xCA) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in MessagePack format.,to_msgpack} + + @sa http://msgpack.org + @sa @ref from_msgpack(const std::vector&, const size_t) for the + analogous deserialization + @sa @ref to_cbor(const basic_json& for the related CBOR format + + @since version 2.0.9 + */ + static std::vector to_msgpack(const basic_json& j) + { + std::vector result; + to_msgpack(j, result); + return result; + } + + static void to_msgpack(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_msgpack(j); + } + + static void to_msgpack(const basic_json& j, detail::output_adapter o) + { + binary_writer(o).write_msgpack(j); + } + + /*! + @brief create a JSON value from an input in CBOR format + + Deserializes a given input @a i to a JSON value using the CBOR (Concise + Binary Object Representation) serialization format. + + The library maps CBOR types to JSON value types as follows: + + CBOR type | JSON value type | first byte + ---------------------- | --------------- | ---------- + Integer | number_unsigned | 0x00..0x17 + Unsigned integer | number_unsigned | 0x18 + Unsigned integer | number_unsigned | 0x19 + Unsigned integer | number_unsigned | 0x1A + Unsigned integer | number_unsigned | 0x1B + Negative integer | number_integer | 0x20..0x37 + Negative integer | number_integer | 0x38 + Negative integer | number_integer | 0x39 + Negative integer | number_integer | 0x3A + Negative integer | number_integer | 0x3B + Negative integer | number_integer | 0x40..0x57 + UTF-8 string | string | 0x60..0x77 + UTF-8 string | string | 0x78 + UTF-8 string | string | 0x79 + UTF-8 string | string | 0x7A + UTF-8 string | string | 0x7B + UTF-8 string | string | 0x7F + array | array | 0x80..0x97 + array | array | 0x98 + array | array | 0x99 + array | array | 0x9A + array | array | 0x9B + array | array | 0x9F + map | object | 0xA0..0xB7 + map | object | 0xB8 + map | object | 0xB9 + map | object | 0xBA + map | object | 0xBB + map | object | 0xBF + False | `false` | 0xF4 + True | `true` | 0xF5 + Nill | `null` | 0xF6 + Half-Precision Float | number_float | 0xF9 + Single-Precision Float | number_float | 0xFA + Double-Precision Float | number_float | 0xFB + + @warning The mapping is **incomplete** in the sense that not all CBOR + types can be converted to a JSON value. The following CBOR types + are not supported and will yield parse errors (parse_error.112): + - byte strings (0x40..0x5F) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + + @warning CBOR allows map keys of any type, whereas JSON only allows + strings as keys in object values. Therefore, CBOR maps with keys + other than UTF-8 strings are rejected (parse_error.113). + + @note Any CBOR output created @ref to_cbor can be successfully parsed by + @ref from_cbor. + + @param[in] i an input in CBOR format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @return deserialized JSON value + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from CBOR were + used in the given input @a v or if the input is not valid CBOR + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in CBOR + format to a JSON value.,from_cbor} + + @sa http://cbor.io + @sa @ref to_cbor(const basic_json&) for the analogous serialization + @sa @ref from_msgpack(detail::input_adapter, const bool) for the + related MessagePack format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_cbor(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_cbor(strict); + } + + /*! + @copydoc from_cbor(detail::input_adapter, const bool) + */ + template::value, int> = 0> + static basic_json from_cbor(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward(a1), std::forward(a2))).parse_cbor(strict); + } + + /*! + @brief create a JSON value from an input in MessagePack format + + Deserializes a given input @a i to a JSON value using the MessagePack + serialization format. + + The library maps MessagePack types to JSON value types as follows: + + MessagePack type | JSON value type | first byte + ---------------- | --------------- | ---------- + positive fixint | number_unsigned | 0x00..0x7F + fixmap | object | 0x80..0x8F + fixarray | array | 0x90..0x9F + fixstr | string | 0xA0..0xBF + nil | `null` | 0xC0 + false | `false` | 0xC2 + true | `true` | 0xC3 + float 32 | number_float | 0xCA + float 64 | number_float | 0xCB + uint 8 | number_unsigned | 0xCC + uint 16 | number_unsigned | 0xCD + uint 32 | number_unsigned | 0xCE + uint 64 | number_unsigned | 0xCF + int 8 | number_integer | 0xD0 + int 16 | number_integer | 0xD1 + int 32 | number_integer | 0xD2 + int 64 | number_integer | 0xD3 + str 8 | string | 0xD9 + str 16 | string | 0xDA + str 32 | string | 0xDB + array 16 | array | 0xDC + array 32 | array | 0xDD + map 16 | object | 0xDE + map 32 | object | 0xDF + negative fixint | number_integer | 0xE0-0xFF + + @warning The mapping is **incomplete** in the sense that not all + MessagePack types can be converted to a JSON value. The following + MessagePack types are not supported and will yield parse errors: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @param[in] i an input in MessagePack format convertible to an input + adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from MessagePack were + used in the given input @a i or if the input is not valid MessagePack + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + MessagePack format to a JSON value.,from_msgpack} + + @sa http://msgpack.org + @sa @ref to_msgpack(const basic_json&) for the analogous serialization + @sa @ref from_cbor(detail::input_adapter, const bool) for the related CBOR + format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_msgpack(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_msgpack(strict); + } + + /*! + @copydoc from_msgpack(detail::input_adapter, const bool) + */ + template::value, int> = 0> + static basic_json from_msgpack(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward(a1), std::forward(a2))).parse_msgpack(strict); + } + + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. Similar to @ref operator[](const typename + object_t::key_type&), `null` values are created in arrays and objects if + necessary. + + In particular: + - If the JSON pointer points to an object key that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. + - If the JSON pointer points to an array index that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. All indices between the current maximum and the given + index are also filled with `null`. + - The special value `-` is treated as a synonym for the index past the + end. + + @param[in] ptr a JSON pointer + + @return reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer} + + @since version 2.0.0 + */ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. The function does not change the JSON + value; no `null` values are created. In particular, the the special value + `-` yields an exception. + + @param[in] ptr JSON pointer to the desired element + + @return const reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} + + @since version 2.0.0 + */ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a reference to the element at with specified JSON pointer @a ptr, + with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer} + */ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a const reference to the element at with specified JSON pointer @a + ptr, with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer_const} + */ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + /*! + @brief return flattened JSON value + + The function creates a JSON object whose keys are JSON pointers (see [RFC + 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all + primitive. The original JSON value can be restored using the @ref + unflatten() function. + + @return an object that maps JSON pointers to primitive values + + @note Empty objects and arrays are flattened to `null` and will not be + reconstructed correctly by the @ref unflatten() function. + + @complexity Linear in the size the JSON value. + + @liveexample{The following code shows how a JSON object is flattened to an + object whose keys consist of JSON pointers.,flatten} + + @sa @ref unflatten() for the reverse function + + @since version 2.0.0 + */ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /*! + @brief unflatten a previously flattened JSON value + + The function restores the arbitrary nesting of a JSON value that has been + flattened before using the @ref flatten() function. The JSON value must + meet certain constraints: + 1. The value must be an object. + 2. The keys must be JSON pointers (see + [RFC 6901](https://tools.ietf.org/html/rfc6901)) + 3. The mapped values must be primitive JSON types. + + @return the original JSON from a flattened version + + @note Empty objects and arrays are flattened by @ref flatten() to `null` + values and can not unflattened to their original type. Apart from + this example, for a JSON value `j`, the following is always true: + `j == j.flatten().unflatten()`. + + @complexity Linear in the size the JSON value. + + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + + @liveexample{The following code shows how a flattened JSON object is + unflattened into the original nested JSON object.,unflatten} + + @sa @ref flatten() for the reverse function + + @since version 2.0.0 + */ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /*! + @brief applies a JSON patch + + [JSON Patch](http://jsonpatch.com) defines a JSON document structure for + expressing a sequence of operations to apply to a JSON) document. With + this function, a JSON Patch is applied to the current JSON value by + executing all operations from the patch. + + @param[in] json_patch JSON patch document + @return patched document + + @note The application of a patch is atomic: Either all operations succeed + and the patched document is returned or an exception is thrown. In + any case, the original value is not changed: the patch is applied + to a copy of the value. + + @throw parse_error.104 if the JSON patch does not consist of an array of + objects + + @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory + attributes are missing); example: `"operation add must have member path"` + + @throw out_of_range.401 if an array index is out of range. + + @throw out_of_range.403 if a JSON pointer inside the patch could not be + resolved successfully in the current JSON value; example: `"key baz not + found"` + + @throw out_of_range.405 if JSON pointer has no parent ("add", "remove", + "move") + + @throw other_error.501 if "test" operation was unsuccessful + + @complexity Linear in the size of the JSON value and the length of the + JSON patch. As usually only a fraction of the JSON value is affected by + the patch, the complexity can usually be neglected. + + @liveexample{The following code shows how a JSON patch is applied to a + value.,patch} + + @sa @ref diff -- create a JSON patch by comparing two JSON values + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901) + + @since version 2.0.0 + */ + basic_json patch(const basic_json& json_patch) const + { + // make a working copy to apply the patch to + basic_json result = *this; + + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.is_root()) + { + result = val; + } + else + { + // make sure the top element of the pointer exists + json_pointer top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result[ptr]; + + switch (parent.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::array_index(last_path); + if (JSON_UNLIKELY(static_cast(idx) > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + else + { + // default case: insert add offset + parent.insert(parent.begin() + static_cast(idx), val); + } + } + break; + } + + default: + { + // if there exists a parent it cannot be primitive + assert(false); // LCOV_EXCL_LINE + } + } + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [&result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found")); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(static_cast(json_pointer::array_index(last_path))); + } + }; + + // type check: top level value must be an array + if (JSON_UNLIKELY(not json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json& + { + // find value + auto it = val.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; + + // check if desired value is present + if (JSON_UNLIKELY(it == val.m_value.object->end())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'")); + } + + // check if result is of type string + if (JSON_UNLIKELY(string_type and not it->second.is_string())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'")); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_UNLIKELY(not val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // collect mandatory members + const std::string op = get_value("op", "op", true); + const std::string path = get_value(op, "path", true); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const std::string from_path = get_value("move", "from", true); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const std::string from_path = get_value("copy", "from", true); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_UNLIKELY(not success)) + { + JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump())); + } + + break; + } + + case patch_operations::invalid: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid")); + } + } + } + + return result; + } + + /*! + @brief creates a diff as a JSON patch + + Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can + be changed into the value @a target by calling @ref patch function. + + @invariant For two JSON values @a source and @a target, the following code + yields always `true`: + @code {.cpp} + source.patch(diff(source, target)) == target; + @endcode + + @note Currently, only `remove`, `add`, and `replace` operations are + generated. + + @param[in] source JSON value to compare from + @param[in] target JSON value to compare against + @param[in] path helper value to create JSON pointers + + @return a JSON patch to convert the @a source to @a target + + @complexity Linear in the lengths of @a source and @a target. + + @liveexample{The following code shows how a JSON patch is created as a + diff for two JSON values.,diff} + + @sa @ref patch -- apply a JSON patch + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + + @since version 2.0.0 + */ + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + } + else + { + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() and i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // i now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", path + "/" + std::to_string(i)} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", path + "/" + std::to_string(i)}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto key = json_pointer::escape(it.key()); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path + "/" + key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path + "/" + key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto key = json_pointer::escape(it.key()); + result.push_back( + { + {"op", "add"}, {"path", path + "/" + key}, + {"value", it.value()} + }); + } + } + + break; + } + + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + } + + return result; + } + + /// @} +}; + +///////////// +// presets // +///////////// + +/*! +@brief default JSON class + +This type is the default specialization of the @ref basic_json class which +uses the standard template types. + +@since version 1.0.0 +*/ +using json = basic_json<>; + +////////////////// +// json_pointer // +////////////////// + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + auto result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->m_type) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + JSON_TRY + { + result = &result->operator[](static_cast(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten")); + } + } + + return *result; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->m_type == detail::value_t::null) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const char x) + { + return (x >= '0' and x <= '9'); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums or reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // use unchecked array access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +void json_pointer::flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result) +{ + switch (value.m_type) + { + case detail::value_t::array: + { + if (value.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_value.array->size(); ++i) + { + flatten(reference_string + "/" + std::to_string(i), + value.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_value.object) + { + flatten(reference_string + "/" + escape(element.first), element.second, result); + } + } + break; + } + + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL +json_pointer::unflatten(const NLOHMANN_BASIC_JSON_TPL& value) +{ + if (JSON_UNLIKELY(not value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened")); + } + + NLOHMANN_BASIC_JSON_TPL result; + + // iterate the JSON object values + for (const auto& element : *value.m_value.object) + { + if (JSON_UNLIKELY(not element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive")); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; +} + +inline bool operator==(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return (lhs.reference_tokens == rhs.reference_tokens); +} + +inline bool operator!=(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return not (lhs == rhs); +} +} // namespace nlohmann + + +/////////////////////// +// nonmember support // +/////////////////////// + +// specialization of std::swap, and std::hash +namespace std +{ +/*! +@brief exchanges the values of two JSON objects + +@since version 1.0.0 +*/ +template<> +inline void swap(nlohmann::json& j1, + nlohmann::json& j2) noexcept( + is_nothrow_move_constructible::value and + is_nothrow_move_assignable::value + ) +{ + j1.swap(j2); +} + +/// hash value for JSON objects +template<> +struct hash +{ + /*! + @brief return a hash value for a JSON object + + @since version 1.0.0 + */ + std::size_t operator()(const nlohmann::json& j) const + { + // a naive hashing via the string representation + const auto& h = hash(); + return h(j.dump()); + } +}; + +/// specialization for std::less +/// @note: do not remove the space after '<', +/// see https://github.com/nlohmann/json/pull/679 +template<> +struct less< ::nlohmann::detail::value_t> +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(nlohmann::detail::value_t lhs, + nlohmann::detail::value_t rhs) const noexcept + { + return nlohmann::detail::operator<(lhs, rhs); + } +}; + +} // namespace std + +/*! +@brief user-defined string literal for JSON values + +This operator implements a user-defined string literal for JSON objects. It +can be used by adding `"_json"` to a string literal and returns a JSON object +if no parse error occurred. + +@param[in] s a string representation of a JSON object +@param[in] n the length of string @a s +@return a JSON object + +@since version 1.0.0 +*/ +inline nlohmann::json operator "" _json(const char* s, std::size_t n) +{ + return nlohmann::json::parse(s, s + n); +} + +/*! +@brief user-defined string literal for JSON pointer + +This operator implements a user-defined string literal for JSON Pointers. It +can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer +object if no parse error occurred. + +@param[in] s a string representation of a JSON Pointer +@param[in] n the length of string @a s +@return a JSON pointer object + +@since version 2.0.0 +*/ +inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +// restore GCC/clang diagnostic settings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic pop +#endif +#if defined(__clang__) + #pragma GCC diagnostic pop +#endif + +// clean up +#undef JSON_CATCH +#undef JSON_THROW +#undef JSON_TRY +#undef JSON_LIKELY +#undef JSON_UNLIKELY +#undef JSON_DEPRECATED +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL + +#endif diff --git a/version/version.cpp b/version/version.cpp new file mode 100644 index 0000000..fe4547e --- /dev/null +++ b/version/version.cpp @@ -0,0 +1,118 @@ +#include +#include +#include + +#include "Core/Private/PDBReader/PDBReader.h" +#include "Core/Private/Offsets.h" +#include "Core/Private/HooksImpl.h" +#include "Core/Private/PluginManager/PluginManager.h" +#include "Core/Public/Logger/Logger.h" + +#pragma comment(lib, "libMinHook.x64.lib") + +HINSTANCE m_hinst_dll = nullptr; +extern "C" UINT_PTR mProcs[17]{0}; + +LPCSTR import_names[] = { + "GetFileVersionInfoA", "GetFileVersionInfoByHandle", "GetFileVersionInfoExA", "GetFileVersionInfoExW", + "GetFileVersionInfoSizeA", "GetFileVersionInfoSizeExA", "GetFileVersionInfoSizeExW", "GetFileVersionInfoSizeW", + "GetFileVersionInfoW", "VerFindFileA", "VerFindFileW", "VerInstallFileA", "VerInstallFileW", "VerLanguageNameA", + "VerLanguageNameW", "VerQueryValueA", "VerQueryValueW" +}; + +void OpenConsole() +{ + AllocConsole(); + FILE* p_cout; + freopen_s(&p_cout, "conout$", "w", stdout); +} + +void Init() +{ + using namespace ArkApi; + + namespace fs = std::experimental::filesystem; + + OpenConsole(); + + const std::string current_dir = Tools::GetCurrentDir(); + + if (!fs::exists(current_dir + "/logs")) + fs::create_directory(current_dir + "/logs"); + + Log::Get().Init("API"); + + Log::GetLog()->info("-----------------------------------------------"); + Log::GetLog()->info("ARK: Server Api V{}", API_VERSION); + Log::GetLog()->info("Loading...\n"); + + PdbReader pdb_reader; + + std::unordered_map offsets_dump; + std::unordered_map bitfields_dump; + + try + { + const std::wstring dir = Tools::ConvertToWideStr(current_dir); + pdb_reader.Read(dir + L"/ShooterGameServer.pdb", &offsets_dump, &bitfields_dump); + } + catch (const std::exception& error) + { + Log::GetLog()->critical("Failed to read pdb - {}", error.what()); + return; + } + + Offsets::Get().Init(move(offsets_dump), move(bitfields_dump)); + + InitHooks(); + + Log::GetLog()->info("API was successfully loaded"); + Log::GetLog()->info("-----------------------------------------------\n"); +} + +BOOL WINAPI DllMain(HINSTANCE hinst_dll, DWORD fdw_reason, LPVOID) +{ + if (fdw_reason == DLL_PROCESS_ATTACH) + { + DisableThreadLibraryCalls(hinst_dll); + + CHAR sysDir[MAX_PATH]; + GetSystemDirectoryA(sysDir, MAX_PATH); + + char buffer[MAX_PATH]; + sprintf_s(buffer, "%s\\version.dll", sysDir); + + m_hinst_dll = LoadLibraryA(buffer); + if (!m_hinst_dll) + return FALSE; + + for (int i = 0; i < 17; i++) + mProcs[i] = reinterpret_cast(GetProcAddress(m_hinst_dll, import_names[i])); + + Init(); + } + else if (fdw_reason == DLL_PROCESS_DETACH) + { + FreeLibrary(m_hinst_dll); + } + + return TRUE; +} + +extern "C" void GetFileVersionInfoA_wrapper(); +extern "C" void GetFileVersionInfoByHandle_wrapper(); +extern "C" void GetFileVersionInfoExA_wrapper(); +extern "C" void GetFileVersionInfoExW_wrapper(); +extern "C" void GetFileVersionInfoSizeA_wrapper(); +extern "C" void GetFileVersionInfoSizeExA_wrapper(); +extern "C" void GetFileVersionInfoSizeExW_wrapper(); +extern "C" void GetFileVersionInfoSizeW_wrapper(); +extern "C" void GetFileVersionInfoW_wrapper(); +extern "C" void VerFindFileA_wrapper(); +extern "C" void VerFindFileW_wrapper(); +extern "C" void VerInstallFileA_wrapper(); +extern "C" void VerInstallFileW_wrapper(); +extern "C" void VerLanguageNameA_wrapper(); +extern "C" void VerLanguageNameW_wrapper(); +extern "C" void VerQueryValueA_wrapper(); +extern "C" void VerQueryValueW_wrapper(); diff --git a/version/version.def b/version/version.def new file mode 100644 index 0000000..8014ac7 --- /dev/null +++ b/version/version.def @@ -0,0 +1,19 @@ +LIBRARY version.dll +EXPORTS + GetFileVersionInfoA=GetFileVersionInfoA_wrapper @1 + GetFileVersionInfoByHandle=GetFileVersionInfoByHandle_wrapper @2 + GetFileVersionInfoExA=GetFileVersionInfoExA_wrapper @3 + GetFileVersionInfoExW=GetFileVersionInfoExW_wrapper @4 + GetFileVersionInfoSizeA=GetFileVersionInfoSizeA_wrapper @5 + GetFileVersionInfoSizeExA=GetFileVersionInfoSizeExA_wrapper @6 + GetFileVersionInfoSizeExW=GetFileVersionInfoSizeExW_wrapper @7 + GetFileVersionInfoSizeW=GetFileVersionInfoSizeW_wrapper @8 + GetFileVersionInfoW=GetFileVersionInfoW_wrapper @9 + VerFindFileA=VerFindFileA_wrapper @10 + VerFindFileW=VerFindFileW_wrapper @11 + VerInstallFileA=VerInstallFileA_wrapper @12 + VerInstallFileW=VerInstallFileW_wrapper @13 + VerLanguageNameA=VerLanguageNameA_wrapper @14 + VerLanguageNameW=VerLanguageNameW_wrapper @15 + VerQueryValueA=VerQueryValueA_wrapper @16 + VerQueryValueW=VerQueryValueW_wrapper @17 diff --git a/version/version.vcxproj b/version/version.vcxproj new file mode 100644 index 0000000..7b5410b --- /dev/null +++ b/version/version.vcxproj @@ -0,0 +1,205 @@ + + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3941E9F8-2E29-4D69-8717-F74562ED5301} + Win32Proj + version + 10.0.16299.0 + + + + DynamicLibrary + true + NotSet + v141 + + + DynamicLibrary + false + true + Unicode + v141 + + + + + + + + + + + + + + true + + + false + false + $(VSInstallDir)\DIA SDK\include;$(IncludePath) + ..\lib;$(VSInstallDir)\DIA SDK\lib;$(LibraryPath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;VERSION_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + version.def + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;VERSION_EXPORTS;ARK_EXPORTS;%(PreprocessorDefinitions) + stdcpp17 + ..\version\Core\Public; + + + Windows + true + true + true + version.def + $(OutDir)ArkApi.lib + /NODEFAULTLIB:libcmt.lib %(AdditionalOptions) + + + + + + + \ No newline at end of file diff --git a/version/version.vcxproj.filters b/version/version.vcxproj.filters new file mode 100644 index 0000000..08f2856 --- /dev/null +++ b/version/version.vcxproj.filters @@ -0,0 +1,379 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {8459530a-8c34-4442-9c72-41d1f2b4ed4a} + + + {58ecb7c7-5963-411e-8af4-bfde7a5c0466} + + + {4729f632-a6ea-4679-9628-06a96a09ceec} + + + {3af78517-b4a1-423a-b8bf-82de3c526ca3} + + + {5a6460f4-583c-4223-b1d3-84dab2aa2a92} + + + {1980c993-18a4-4f4c-8a15-4c4dc2a3aeee} + + + {51e7b043-f4d4-4c19-81d2-aa2dc3d69f61} + + + {48905ed3-7f75-4ad8-8cf9-01b6a5f69fea} + + + {3138185d-1378-4bb6-a9ae-08b8972ffc94} + + + {25cd0b19-4654-4a59-b866-3b5fc5212b3c} + + + {c59ecc14-3b90-48b5-8590-0ee401072790} + + + {030646fa-2497-4cda-a5aa-aaa3ce8b62a0} + + + {86ba6556-e359-4181-9cbe-0da239eb01dc} + + + {9a7b4335-8b2c-4c9f-93dd-5813289c1092} + + + {6a4a5f46-b2f1-44be-a346-e9c28a995f81} + + + {643f871e-e418-4209-be16-61663f188652} + + + {4ab4f7ea-2a4e-47f1-8dd6-78c06e6fa40c} + + + {e949db5b-8a3f-4ca4-b6b4-5cca87260ec1} + + + {84ca9881-961a-4a9f-b527-7cf45ea98693} + + + + + + + + + + Core\Private\PDBReader + + + Core\Public\API + + + Core\Public\API + + + Core\Public\API\UE + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Public\API\ARK + + + Core\Private + + + Core\Public + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE + + + Core\Private\PluginManager + + + Core\Public + + + Core\Private + + + Core\Public + + + Core\Public + + + Core\Private + + + Core\Private + + + Core\Private + + + Core\Public\API + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Misc + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Misc + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\HAL + + + Core\Public\API\UE\GenericPlatform + + + Core\Public\API\UE\GenericPlatform + + + Core\Public\API\UE\GenericPlatform + + + Core\Public\API\UE\Windows + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Misc + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Delegates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Containers\Algo + + + Core\Public\API\UE\Containers\Algo + + + Core\Public\API\UE\Containers\Algo + + + Core\Public\API\UE\Containers\Algo\Impl + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Containers\Algo + + + Core\Public\API\UE\Containers + + + Core\Public\API\UE\Templates + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Misc + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Math + + + Core\Public\API\UE + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Math + + + Core\Public\API\UE\Templates + + + Core\Public\Logger + + + + + + Core\Private\PDBReader + + + Core\Private + + + Core\Private + + + Core\Private + + + Core\Private + + + Core\Private + + + Core\Private\PluginManager + + + Core\Private + + + Core\Private + + + Core\Private + + + + + + \ No newline at end of file diff --git a/version/version_asm.asm b/version/version_asm.asm new file mode 100644 index 0000000..fb05b68 --- /dev/null +++ b/version/version_asm.asm @@ -0,0 +1,54 @@ +.code +extern mProcs:QWORD +GetFileVersionInfoA_wrapper proc + jmp mProcs[0*8] +GetFileVersionInfoA_wrapper endp +GetFileVersionInfoByHandle_wrapper proc + jmp mProcs[1*8] +GetFileVersionInfoByHandle_wrapper endp +GetFileVersionInfoExA_wrapper proc + jmp mProcs[2*8] +GetFileVersionInfoExA_wrapper endp +GetFileVersionInfoExW_wrapper proc + jmp mProcs[3*8] +GetFileVersionInfoExW_wrapper endp +GetFileVersionInfoSizeA_wrapper proc + jmp mProcs[4*8] +GetFileVersionInfoSizeA_wrapper endp +GetFileVersionInfoSizeExA_wrapper proc + jmp mProcs[5*8] +GetFileVersionInfoSizeExA_wrapper endp +GetFileVersionInfoSizeExW_wrapper proc + jmp mProcs[6*8] +GetFileVersionInfoSizeExW_wrapper endp +GetFileVersionInfoSizeW_wrapper proc + jmp mProcs[7*8] +GetFileVersionInfoSizeW_wrapper endp +GetFileVersionInfoW_wrapper proc + jmp mProcs[8*8] +GetFileVersionInfoW_wrapper endp +VerFindFileA_wrapper proc + jmp mProcs[9*8] +VerFindFileA_wrapper endp +VerFindFileW_wrapper proc + jmp mProcs[10*8] +VerFindFileW_wrapper endp +VerInstallFileA_wrapper proc + jmp mProcs[11*8] +VerInstallFileA_wrapper endp +VerInstallFileW_wrapper proc + jmp mProcs[12*8] +VerInstallFileW_wrapper endp +VerLanguageNameA_wrapper proc + jmp mProcs[13*8] +VerLanguageNameA_wrapper endp +VerLanguageNameW_wrapper proc + jmp mProcs[14*8] +VerLanguageNameW_wrapper endp +VerQueryValueA_wrapper proc + jmp mProcs[15*8] +VerQueryValueA_wrapper endp +VerQueryValueW_wrapper proc + jmp mProcs[16*8] +VerQueryValueW_wrapper endp +end