/
SDK.h
1110 lines (943 loc) · 27.4 KB
/
SDK.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#pragma once
#include <Windows.h>
#include <UE4/UE4.h>
#include <string>
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
struct FNameEntry
{
uint32_t Index;
uint32_t pad;
FNameEntry* HashNext;
char AnsiName[1024];
const int GetIndex() const { return Index >> 1; }
const char* GetAnsiName() const { return AnsiName; }
};
class TNameEntryArray
{
public:
bool IsValidIndex(uint32_t index) const { return index < NumElements; }
FNameEntry const* GetById(uint32_t index) const { return *GetItemPtr(index); }
FNameEntry const* const* GetItemPtr(uint32_t Index) const {
const auto ChunkIndex = Index / 16384;
const auto WithinChunkIndex = Index % 16384;
const auto Chunk = Chunks[ChunkIndex];
return Chunk + WithinChunkIndex;
}
FNameEntry** Chunks[128];
uint32_t NumElements = 0;
uint32_t NumChunks = 0;
};
struct FName
{
int ComparisonIndex = 0;
int Number = 0;
static inline TNameEntryArray* GNames = nullptr;
static const char* GetNameByIdFast(int Id) {
auto NameEntry = GNames->GetById(Id);
if (!NameEntry) return nullptr;
return NameEntry->GetAnsiName();
}
static std::string GetNameById(int Id) {
auto NameEntry = GNames->GetById(Id);
if (!NameEntry) return std::string();
return NameEntry->GetAnsiName();
}
const char* GetNameFast() const {
auto NameEntry = GNames->GetById(ComparisonIndex);
if (!NameEntry) return nullptr;
return NameEntry->GetAnsiName();
}
const std::string GetName() const {
auto NameEntry = GNames->GetById(ComparisonIndex);
if (!NameEntry) return std::string();
return NameEntry->GetAnsiName();
};
inline bool operator==(const FName& other) const {
return ComparisonIndex == other.ComparisonIndex;
};
FName() {}
FName(const char* find) {
for (auto i = 6000u; i < GNames->NumElements; i++)
{
auto name = GetNameByIdFast(i);
if (!name) continue;
if (strcmp(name, find) == 0) {
ComparisonIndex = i;
return;
};
}
}
};
struct FUObjectItem
{
class UObject* Object;
int Flags;
int ClusterIndex;
int SerialNumber;
int pad;
};
struct TUObjectArray
{
FUObjectItem* Objects;
int MaxElements;
int NumElements;
class UObject* GetByIndex(int index) { return Objects[index].Object; }
};
class UClass;
class UObject
{
public:
UObject(UObject* addr) { *this = addr; }
static inline TUObjectArray* GObjects = nullptr;
void* Vtable; // 0x0
int ObjectFlags; // 0x8
int InternalIndex; // 0xC
UClass* Class; // 0x10
FName Name; // 0x18
UObject* Outer; // 0x20
std::string GetName() const;
const char* GetNameFast() const;
std::string GetFullName() const;
template<typename T>
static T* FindObject(const std::string& name)
{
for (int i = 0; i < GObjects->NumElements; ++i)
{
auto object = GObjects->GetByIndex(i);
if (object == nullptr)
{
continue;
}
if (object->GetFullName() == name)
{
return static_cast<T*>(object);
}
}
return nullptr;
}
static UClass* FindClass(const std::string& name)
{
return FindObject<UClass>(name);
}
template<typename T>
static T* GetObjectCasted(uint32_t index)
{
return static_cast<T*>(GObjects->GetByIndex(index));
}
bool IsA(UClass* cmp) const;
static UClass* StaticClass()
{
static auto ptr = UObject::FindObject<UClass>("Class CoreUObject.Object");
return ptr;
}
};
class UField : public UObject
{
public:
using UObject::UObject;
UField* Next;
};
class UProperty : public UField
{
public:
int ArrayDim;
int ElementSize;
uint64_t PropertyFlags;
char pad[0xC];
int Offset_Internal;
UProperty* PropertyLinkNext;
UProperty* NextRef;
UProperty* DestructorLinkNext;
UProperty* PostConstructLinkNext;
};
class UStruct : public UField
{
public:
using UField::UField;
UStruct* SuperField;
UField* Children;
int PropertySize;
int MinAlignment;
TArray<uint8_t> Script;
UProperty* PropertyLink;
UProperty* RefLink;
UProperty* DestructorLink;
UProperty* PostConstructLink;
TArray<UObject*> ScriptObjectReferences;
};
class UFunction : public UStruct
{
public:
int FunctionFlags;
uint16_t RepOffset;
uint8_t NumParms;
char pad;
uint16_t ParmsSize;
uint16_t ReturnValueOffset;
uint16_t RPCId;
uint16_t RPCResponseId;
UProperty* FirstPropertyToInit;
UFunction* EventGraphFunction; //0x00A0
int EventGraphCallOffset;
char pad_0x00AC[0x4]; //0x00AC
void* Func; //0x00B0
};
inline void ProcessEvent(void* obj, UFunction* function, void* parms)
{
auto vtable = *reinterpret_cast<void***>(obj);
reinterpret_cast<void(*)(void*, UFunction*, void*)>(vtable[59])(obj, function, parms);
}
class UClass : public UStruct
{
public:
using UStruct::UStruct;
unsigned char UnknownData00[0x138]; // 0x0088(0x0138) MISSED OFFSET
template<typename T>
inline T* CreateDefaultObject()
{
return static_cast<T*>(CreateDefaultObject());
}
};
class FString : public TArray<wchar_t>
{
public:
inline FString()
{
};
FString(const wchar_t* other)
{
Max = Count = *other ? static_cast<int>(std::wcslen(other)) + 1 : 0;
if (Count)
{
Data = const_cast<wchar_t*>(other);
}
};
FString(const wchar_t* other, int count)
{
Data = const_cast<wchar_t*>(other);;
Max = Count = count;
};
inline bool IsValid() const
{
return Data != nullptr;
}
inline const wchar_t* wide() const
{
return Data;
}
int multi(char* name, int size) const
{
return WideCharToMultiByte(CP_UTF8, 0, Data, Count, name, size, nullptr, nullptr) - 1;
}
};
enum class EPlayerActivityType : uint8_t
{
None = 0,
Bailing = 1,
Cannon = 2,
Cannon_END = 3,
Capstan = 4,
Capstan_END = 5,
CarryingBooty = 6,
CarryingBooty_END = 7,
Dead = 8,
Dead_END = 9,
Digging = 10,
Dousing = 11,
EmptyingBucket = 12,
Harpoon = 13,
Harpoon_END = 14,
LoseHealth = 15,
Repairing = 16,
Sails = 17,
Sails_END = 18,
Wheel = 19,
Wheel_END = 20
};
struct FPirateDescription
{
};
struct APlayerState {
char pad[0x0478]; // 0x0
FString PlayerName; // 0x0478
EPlayerActivityType GetPlayerActivity()
{
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaPlayerState.GetPlayerActivity");
EPlayerActivityType activity;
ProcessEvent(this, fn, &activity);
return activity;
}
FPirateDescription GetPirateDesc()
{
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaPlayerState.GetPirateDesc");
FPirateDescription desc;
ProcessEvent(this, fn, &desc);
return desc;
}
};
struct FMinimalViewInfo {
FVector Location;
FRotator Rotation;
char UnknownData00[0x10];
float FOV;
};
struct FCameraCacheEntry {
float TimeStamp;
char pad[0xC];
FMinimalViewInfo POV;
};
struct APlayerCameraManager {
char pad[0x04D0];
FCameraCacheEntry CameraCache;
FVector GetCameraLocation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerCameraManager.GetCameraLocation");
FVector location;
ProcessEvent(this, fn, &location);
return location;
};
FRotator GetCameraRotation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerCameraManager.GetCameraRotation");
FRotator rotation;
ProcessEvent(this, fn, &rotation);
return rotation;
}
};
struct FKey
{
FName KeyName;
unsigned char UnknownData00[0x18] = {};
FKey() {};
FKey(const char* InName) : KeyName(FName(InName)) {}
};
struct AController {
char pad_0000[0x0488]; //0x0000
class ACharacter* Character; //0x0488
char pad_0480[0x70]; // 0x490
APlayerCameraManager* PlayerCameraManager; //0x0500
char pad_04f8[0x1049]; // 0x0508
bool IdleDisconnectEnabled; // 0x1551(0x0001)
void SendToConsole(FString& cmd){
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.SendToConsole");
ProcessEvent(this, fn, &cmd);
}
bool ProjectWorldLocationToScreen(const FVector& WorldLocation, FVector2D& ScreenLocation) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.ProjectWorldLocationToScreen");
struct
{
FVector WorldLocation;
FVector2D ScreenLocation;
bool ReturnValue = false;
} params;
params.WorldLocation = WorldLocation;
ProcessEvent(this, fn, ¶ms);
ScreenLocation = params.ScreenLocation;
return params.ReturnValue;
}
bool WasInputKeyJustPressed(const FKey& Key) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.WasInputKeyJustPressed");
struct
{
FKey Key;
bool ReturnValue = false;
} params;
params.Key = Key;
ProcessEvent(this, fn, ¶ms);
return params.ReturnValue;
}
FRotator GetControlRotation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Pawn.GetControlRotation");
struct FRotator rotation;
ProcessEvent(this, fn, &rotation);
return rotation;
}
FRotator GetDesiredRotation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Pawn.GetDesiredRotation");
struct FRotator rotation;
ProcessEvent(this, fn, &rotation);
return rotation;
}
void AddYawInput(float Val) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.AddYawInput");
ProcessEvent(this, fn, &Val);
}
void AddPitchInput(float Val) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.AddPitchInput");
ProcessEvent(this, fn, &Val);
}
void FOV(float NewFOV) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.PlayerController.FOV");
ProcessEvent(this, fn, &NewFOV);
}
bool LineOfSightTo(ACharacter* Other, const FVector& ViewPoint, const bool bAlternateChecks ) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Controller.LineOfSightTo");
struct {
ACharacter* Other = nullptr;
FVector ViewPoint;
bool bAlternateChecks = false;
bool ReturnValue = false;
} params;
params.Other = Other;
params.ViewPoint = ViewPoint;
params.bAlternateChecks = bAlternateChecks;
ProcessEvent(this, fn, ¶ms);
return params.ReturnValue;
}
};
struct UHealthComponent {
float GetMaxHealth() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.HealthComponent.GetMaxHealth");
float health = 0.f;
ProcessEvent(this, fn, &health);
return health;
}
float GetCurrentHealth() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.HealthComponent.GetCurrentHealth");
float health = 0.f;
ProcessEvent(this, fn, &health);
return health;
};
};
struct USkeletalMeshComponent {
char pad[0x590];
TArray<FTransform> SpaceBasesArray[2];
int CurrentEditableSpaceBases;
int CurrentReadSpaceBases;
FName GetBoneName(int BoneIndex)
{
static auto fn = UObject::FindObject<UFunction>("Function Engine.SkinnedMeshComponent.GetBoneName");
struct
{
int BoneIndex = 0;
FName ReturnValue;
} params;
params.BoneIndex = BoneIndex;
ProcessEvent(this, fn, ¶ms);
return params.ReturnValue;
}
FTransform K2_GetComponentToWorld() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.SceneComponent.K2_GetComponentToWorld");
FTransform CompToWorld;
ProcessEvent(this, fn, &CompToWorld);
return CompToWorld;
}
bool GetBone(const uint32_t id, const FMatrix& componentToWorld, FVector& pos) {
auto bones = SpaceBasesArray[CurrentReadSpaceBases];
if (id >= bones.Count) return false;
const auto& bone = bones[id];
auto boneMatrix = bone.ToMatrixWithScale();
auto world = boneMatrix * componentToWorld;
pos = { world.M[3][0], world.M[3][1], world.M[3][2] };
return true;
}
};
struct AShipInternalWater {
float GetNormalizedWaterAmount() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.ShipInternalWater.GetNormalizedWaterAmount");
float params = 0.f;
ProcessEvent(this, fn, ¶ms);
return params;
}
};
struct AHullDamage {
char pad[0x04B8];
TArray<class ACharacter*> ActiveHullDamageZones;
};
struct UDrowningComponent {
float GetOxygenLevel() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.DrowningComponent.GetOxygenLevel");
float oxygen;
ProcessEvent(this, fn, &oxygen);
return oxygen;
}
};
struct AFauna {
char pad1[0x0898];
FString* DisplayName; // 0x0898
};
enum class ESwimmingCreatureType : uint8_t
{
SwimmingCreature = 0,
Shark = 1,
TinyShark = 2,
Siren = 3,
ESwimmingCreatureType_MAX = 4
};
struct ASharkPawn {
char pad1[0x0550];
USkeletalMeshComponent* Mesh; // 0x0550
char pad2[0x5C]; // 0x0558
ESwimmingCreatureType SwimmingCreatureType; // 0x05B4
};
struct FAIEncounterSpecification
{
char pad[0x80];
FString* LocalisableName; // 0x0080
};
struct UItemDesc {
char pad[0x0028];
FString* Title; // 0x0028(0x0038)
};
struct AItemInfo {
char pad[0x04C8];
UItemDesc* Desc; // 0x04C8
};
struct UWieldedItemComponent {
char pad[0x0298]; // 0x0
ACharacter* CurrentlyWieldedItem; // 0x0298
};
struct FWeaponProjectileParams {
char pad[0x10];
float Velocity;
};
struct FProjectileWeaponParameters {
char pad[0x0054];
float ProjectileMaximumRange; // 0x0054
char pad2[0x18]; // 0x58
FWeaponProjectileParams AmmoParams; // 0x0070
};
struct AProjectileWeapon {
char pad[0x0848]; // 0
FProjectileWeaponParameters WeaponParameters; // 0x0848
};
struct UWorldMapIslandDataAsset {
char pad[0x48];
FVector WorldSpaceCameraPosition; // 0x48
};
struct UIslandDataAssetEntry {
char pad[0x40];
UWorldMapIslandDataAsset* WorldMapData; // 0x0040
char pad2[0x68]; // 0x48
FString* LocalisedName; // 0x00B0
};
struct UIslandDataAsset
{
char pad[0x0048];
TArray<UIslandDataAssetEntry*> IslandDataEntries; // 0x0048
};
struct AIslandService {
char pad[0x04E8];
UIslandDataAsset* IslandDataAsset; // 0x04E8
};
struct ASlidingDoor {
char pad_0x0[0x05CC];
FVector InitialDoorMeshLocation; // 0x0514
void OpenDoor() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.SkeletonFortDoor.OpenDoor");
ProcessEvent(this, fn, nullptr);
}
};
struct USceneComponent {
FVector K2_GetComponentLocation() {
FVector location;
static auto fn = UObject::FindObject<UFunction>("Function Engine.SceneComponent.K2_GetComponentLocation");
ProcessEvent(this, fn, &location);
return location;
}
};
struct APuzzleVault {
char pad[0x1090];
ASlidingDoor* OuterDoor; // 0x1080
};
struct FCrew
{
char pad[0x20];
TArray<APlayerState*> Players; // 0x0020(0x0010) (ZeroConstructor)
char pad2[0x50];
};
struct ACrewService {
char pad[0x0638];
TArray<FCrew> Crews; // 0x0638
};
struct AShipService
{
int GetNumShips()
{
static auto fn = UObject::FindObject<UFunction>("Function Athena.ShipService.GetNumShips");
int num;
ProcessEvent(this, fn, &num);
return num;
}
};
struct AKrakenService
{
char pad[0x05B8];
class AKraken* Kraken; // 0x05B8(0x0008)
bool IsKrakenActive() {
static auto fn = UObject::FindObject<UFunction>("Function Kraken.KrakenService.IsKrakenActive");
bool isActive;
ProcessEvent(this, fn, &isActive);
return isActive;
}
void RequestKrakenWithLocation(const FVector& SpawnLocation, ACharacter* SpawnedForActor) {
static auto fn = UObject::FindObject<UFunction>("Function Kraken.KrakenService.RequestKrakenWithLocation");
struct {
FVector SpawnLocation;
ACharacter* SpawnedForActor = nullptr;
} params;
params = { SpawnLocation, SpawnedForActor };
ProcessEvent(this, fn, ¶ms);
}
void DismissKraken()
{
static auto fn = UObject::FindObject<UFunction>("Function Kraken.KrakenService.DismissKraken");
ProcessEvent(this, fn, nullptr);
}
};
struct AAthenaGameState {
char pad[0x0658];
UINT64* WindService; // 0x0658
UINT64* PlayerManagerService; // 0x0660
AShipService* ShipService; // 0x0668
UINT64* WatercraftService; // 0x0670
UINT64* TimeService; // 0x0678
UINT64* WaterService; // 0x0680
UINT64* StormService; // 0x0688
ACrewService* CrewService; // 0x0690
UINT64* ContestZoneService;
UINT64* ContestRowboatsService;
class AIslandService* IslandService; // 0x06A8(0x0008)
class ANPCService* NPCService; // 0x06B0(0x0008)
class ASkellyFortService* SkellyFortService; // 0x06B8(0x0008)
class AAIDioramaService* AIDioramaService; // 0x06C0(0x0008)
class AAshenLordEncounterService* AshenLordEncounterService; // 0x06C8(0x0008)
class AAggressiveGhostShipsEncounterService* AggressiveGhostShipsEncounterService; // 0x06D0(0x0008)
class ATallTaleService* TallTaleService; // 0x06D8(0x0008)
class AAIShipObstacleService* AIShipObstacleService; // 0x06E0(0x0008)
class AAIShipService* AIShipService; // 0x06E8(0x0008)
class AAITargetService* AITargetService; // 0x06F0(0x0008)
class UShipLiveryCatalogueService* ShipLiveryCatalogueService; // 0x06F8(0x0008)
class AContestManagerService* ContestManagerService; // 0x0700(0x0008)
class ADrawDebugService* DrawDebugService; // 0x0708(0x0008)
class AWorldEventZoneService* WorldEventZoneService; // 0x0710(0x0008)
class UWorldResourceRegistry* WorldResourceRegistry; // 0x0718(0x0008)
class AKrakenService* KrakenService; // 0x0720(0x0008)
class UPlayerNameService* PlayerNameService; // 0x0728(0x0008)
class ATinySharkService* TinySharkService; // 0x0730(0x0008)
class AProjectileService* ProjectileService; // 0x0738(0x0008)
class UServerNotificationsService* ServerNotificationsService; // 0x0740(0x0008)
class AAIManagerService* AIManagerService; // 0x0748(0x0008)
class AAIEncounterService* AIEncounterService; // 0x0750(0x0008)
class AAIEncounterGenerationService* AIEncounterGenerationService; // 0x0758(0x0008)
class UEncounterService* EncounterService; // 0x0760(0x0008)
class UGameEventSchedulerService* GameEventSchedulerService; // 0x0768(0x0008)
class UHideoutService* HideoutService; // 0x0770(0x0008)
class UAthenaStreamedLevelService* StreamedLevelService; // 0x0778(0x0008)
class ULocationProviderService* LocationProviderService; // 0x0780(0x0008)
class AHoleService* HoleService; // 0x0788(0x0008)
class ULoadoutService* LoadoutService; // 0x0790(0x0008)
class UOcclusionService* OcclusionService; // 0x0798(0x0008)
class UPetsService* PetsService; // 0x07A0(0x0008)
};
struct UCharacterMovementComponent {
FVector GetCurrentAcceleration() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.CharacterMovementComponent.GetCurrentAcceleration");
FVector acceleration;
ProcessEvent(this, fn, &acceleration);
return acceleration;
}
};
struct AHarpoonLauncher {
char pad[0x0BA0];
FRotator rotation;
void Server_RequestAim(float InPitch, float InYaw)
{
static auto fn = UObject::FindObject<UFunction>("Function Athena.HarpoonLauncher.Server_RequestAim");
struct {
float InPitch;
float InYaw;
} params;
params.InPitch = InPitch;
params.InYaw = InYaw;
ProcessEvent(this, fn, ¶ms);
}
};
class ACharacter : public UObject {
public:
char pad1[0x468]; // 0x28
APlayerState* PlayerState; // 0x0490
char pad2[0x10]; // 0x0498
AController* Controller; // 0x04A8
char pad3[0x28]; // 0x4B0
USkeletalMeshComponent* Mesh; // 0x04D8
UCharacterMovementComponent* CharacterMovement; // 0x04E0
char pad4[0x3B8]; // 0x4E8
UWieldedItemComponent* WieldedItemComponent; // 0x08A0
char pad5[0x20]; // 0x08A8
UHealthComponent* HealthComponent; // 0x08C8
char pad6[0x428]; // 0x8D0
UDrowningComponent* DrowningComponent; // 0x0CF8
void ReceiveTick(float DeltaSeconds)
{
static auto fn = UObject::FindObject<UFunction>("Function Engine.ActorComponent.ReceiveTick");
ProcessEvent(this, fn, &DeltaSeconds);
}
void GetActorBounds(bool bOnlyCollidingComponents, FVector& Origin, FVector& BoxExtent) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Actor.GetActorBounds");
struct
{
bool bOnlyCollidingComponents = false;
FVector Origin;
FVector BoxExtent;
} params;
params.bOnlyCollidingComponents = bOnlyCollidingComponents;
ProcessEvent(this, fn, ¶ms);
Origin = params.Origin;
BoxExtent = params.BoxExtent;
}
ACharacter* GetCurrentShip() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaCharacter.GetCurrentShip");
ACharacter* ReturnValue;
ProcessEvent(this, fn, &ReturnValue);
return ReturnValue;
}
ACharacter* GetAttachParentActor() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Actor.GetAttachParentActor");
ACharacter* ReturnValue;
ProcessEvent(this, fn, &ReturnValue);
return ReturnValue;
};
ACharacter* GetWieldedItem() {
if (!WieldedItemComponent) return nullptr;
return WieldedItemComponent->CurrentlyWieldedItem;
}
FVector GetVelocity() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Actor.GetVelocity");
FVector velocity;
ProcessEvent(this, fn, &velocity);
return velocity;
}
AItemInfo* GetItemInfo() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.ItemProxy.GetItemInfo");
AItemInfo* info = nullptr;
ProcessEvent(this, fn, &info);
return info;
}
void CureAllAilings() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaCharacter.CureAllAilings");
ProcessEvent(this, fn, nullptr);
}
void Kill(uint8_t DeathType) {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaCharacter.Kill");
ProcessEvent(this, fn, &DeathType);
}
bool IsDead() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaCharacter.IsDead");
bool isDead = true;
ProcessEvent(this, fn, &isDead);
return isDead;
}
bool IsInWater() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaCharacter.IsInWater");
bool isInWater = false;
ProcessEvent(this, fn, &isInWater);
return isInWater;
}
FRotator K2_GetActorRotation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Actor.K2_GetActorRotation");
FRotator params;
ProcessEvent(this, fn, ¶ms);
return params;
}
FVector K2_GetActorLocation() {
static auto fn = UObject::FindObject<UFunction>("Function Engine.Actor.K2_GetActorLocation");
FVector params;
ProcessEvent(this, fn, ¶ms);
return params;
}
inline bool isSkeleton() {
static auto obj = UObject::FindClass("Class Athena.AthenaAICharacter");
return IsA(obj);
}
inline bool isPlayer() {
static auto obj = UObject::FindClass("Class Athena.AthenaPlayerCharacter");
return IsA(obj);
}
inline bool isPuzzleVault() {
static auto obj = UObject::FindClass("Class Athena.PuzzleVault");
return IsA(obj);
}
inline bool isShip() {
static auto obj = UObject::FindClass("Class Athena.Ship");
return IsA(obj);
}
inline bool isHarpoon() {
static auto obj = UObject::FindClass("Class Athena.HarpoonLauncher");
return IsA(obj);
}
inline bool isFarShip() {
static auto obj = UObject::FindClass("Class Athena.ShipNetProxy");
return IsA(obj);
}
inline bool isItem() {
static auto obj = UObject::FindClass("Class Athena.ItemProxy");
return IsA(obj);
}
inline bool isShipwreck() {
static auto obj = UObject::FindClass("Class Athena.Shipwreck");
return IsA(obj);
}
inline bool isShark() {
static auto obj = UObject::FindClass("Class Athena.SharkPawn");
return IsA(obj);
}
inline bool isAnimal() {
static auto obj = UObject::FindClass("Class AthenaAI.Fauna");
return IsA(obj);
}
bool isWeapon() {
static auto obj = UObject::FindClass("Class Athena.ProjectileWeapon");
return IsA(obj);
}
bool isBarrel() {
static auto obj = UObject::FindClass("Class Athena.StorageContainer");
return IsA(obj);
}
bool isWorldSettings() {
static auto obj = UObject::FindClass("Class Engine.WorldSettings");
return IsA(obj);
}
bool isBuriedTreasure() {
static auto obj = UObject::FindClass("Class Athena.BuriedTreasureLocation");
return IsA(obj);
}
FAIEncounterSpecification GetAIEncounterSpec() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.AthenaAICharacter.GetAIEncounterSpec");
FAIEncounterSpecification spec;
ProcessEvent(this, fn, &spec);
return spec;
}
AHullDamage* GetHullDamage() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.Ship.GetHullDamage");
AHullDamage* params = nullptr;
ProcessEvent(this, fn, ¶ms);
return params;
}
AShipInternalWater* GetInternalWater() {
static auto fn = UObject::FindObject<UFunction>("Function Athena.Ship.GetInternalWater");
AShipInternalWater* params = nullptr;
ProcessEvent(this, fn, ¶ms);
return params;
}
};
class UKismetMathLibrary {
private:
static inline UClass* defaultObj;
public:
static bool Init() {
return defaultObj = UObject::FindObject<UClass>("Class Engine.KismetMathLibrary");
}
static FRotator NormalizedDeltaRotator(const struct FRotator& A, const struct FRotator& B) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.KismetMathLibrary.NormalizedDeltaRotator");
struct
{
struct FRotator A;
struct FRotator B;
struct FRotator ReturnValue;
} params;
params.A = A;
params.B = B;
ProcessEvent(defaultObj, fn, ¶ms);
return params.ReturnValue;
};
static FRotator FindLookAtRotation(const FVector& Start, const FVector& Target) {
static auto fn = UObject::FindObject<UFunction>("Function Engine.KismetMathLibrary.FindLookAtRotation");