-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathSotStuff.h
579 lines (487 loc) · 11.6 KB
/
SotStuff.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
#pragma once
#include "Vector.h"
#include "Process.h"
#include "Offsets.h"
#include <vector>
#include <cstdint>
#include <type_traits>
class text
{
public:
char word[64];
};
class textx
{
public:
wchar_t word[64];
};
struct FGuid
{
int A; // 0x0000(0x0004) (Edit, ZeroConstructor, SaveGame, IsPlainOldData)
int B; // 0x0004(0x0004) (Edit, ZeroConstructor, SaveGame, IsPlainOldData)
int C; // 0x0008(0x0004) (Edit, ZeroConstructor, SaveGame, IsPlainOldData)
int D; // 0x000C(0x0004) (Edit, ZeroConstructor, SaveGame, IsPlainOldData)
FGuid() : A(0), B(0), C(0), D(0) {}
FGuid(int a, int b, int c, int d) : A(a), B(b), C(c), D(d) {}
bool operator==(const FGuid& other)
{
return A == other.A && B == other.B && C == other.C && D == other.D;
}
bool operator!=(const FGuid& other)
{
return A != other.A || B != other.B || C != other.C || D != other.D;
}
};
struct Player
{
Vector3 position, angles;
float health, maxhealth;
int distance;
FGuid crewID, allyID;
std::string name, heldItem;
};
struct Camera
{
Vector3 position, angles;
float fov;
};
struct Ships
{
FGuid crewID;
std::string type;
};
class cSOT
{
public:
Player localPlayer;
Player Pirates[24];
Camera localCamera;
Ships Ships[6];
std::vector<Vector2> XMarks;
};
template<class TEnum>
class TEnumAsByte
{
public:
inline TEnumAsByte()
{
}
inline TEnumAsByte(TEnum _value)
: value(static_cast<uint8_t>(_value))
{
}
explicit inline TEnumAsByte(int32_t _value)
: value(static_cast<uint8_t>(_value))
{
}
explicit inline TEnumAsByte(uint8_t _value)
: value(_value)
{
}
inline operator TEnum() const
{
return (TEnum)value;
}
inline TEnum GetValue() const
{
return (TEnum)value;
}
private:
uint8_t value;
};
enum EBootyTypes
{
// sdk -> sot_athena_structs.hpp
EBootyTypes__Invalid = 0,
EBootyTypes__BountySkull = 1,
EBootyTypes__MerchantCrate = 2,
EBootyTypes__GunpowderBarrel = 3,
EBootyTypes__AncientChest = 4,
EBootyTypes__PirateLordBooty = 5,
EBootyTypes__BoxOfSecrets = 6,
EBootyTypes__MermaidGem = 7,
EBootyTypes__CollectorsChest = 8,
EBootyTypes__DroppedPouch = 9,
EBootyTypes__Food = 10,
EBootyTypes__TaleArtifact = 11,
EBootyTypes__CampaignBooty = 12,
EBootyTypes__ReapersBounty = 13,
EBootyTypes__RitualSkull = 14,
EBootyTypes__AshenBooty = 15,
EBootyTypes__EmissaryFlotsam = 16,
EBootyTypes__GoldMound = 17,
EBootyTypes__EBootyTypes_MAX = 18
};
template<class T>
class TArray
{
public:
int Length() const
{
return m_nCount;
}
bool IsValid() const
{
if (m_nCount > m_nMax)
return false;
if (!m_Data)
return false;
return true;
}
bool IsValidIndex(int32_t i) const
{
return i < m_nCount;
}
template<typename U = T>
typename std::enable_if<std::is_pointer<U>::value, typename std::remove_pointer<U>::type>::type GetValue(int32_t index) const
{
auto offset = Mem->Read<uintptr_t>(m_Data + sizeof(uintptr_t) * index);
return Mem->Read<typename std::remove_pointer<U>::type>(offset);
}
template<typename U = T>
typename std::enable_if<!std::is_pointer<U>::value, U>::type GetValue(int32_t index) const
{
return Mem->Read<U>(m_Data + sizeof(U) * index);
}
template<typename U = T, typename std::enable_if<std::is_pointer<U>::value, int32_t>::type = 0>
uintptr_t GetValuePtr(int32_t index) const
{
return Mem->Read<uintptr_t>(m_Data + sizeof(uintptr_t) * index);
}
template<typename U = T, typename std::enable_if<!std::is_pointer<U>::value, int32_t>::type = 0>
uintptr_t GetValuePtr(int32_t index) const
{
return m_Data + sizeof(U) * index;
}
template<typename U = T>
void SetValue(int32_t index, U value) const
{
return Mem->Write(this->GetValuePtr(index), value);
}
template<typename U = T>
typename std::enable_if<std::is_pointer<U>::value, typename std::remove_pointer<U>::type>::type operator[](int32_t index) const
{
return GetValue<U>(index);
}
template<typename U = T>
typename std::enable_if<!std::is_pointer<U>::value, U>::type operator[](int32_t index) const
{
return GetValue<U>(index);
}
private:
uintptr_t m_Data;
int32_t m_nCount;
int32_t m_nMax;
};
struct FQuat {
float X;
float Y;
float Z;
float W;
};
struct FTransform
{
struct FQuat Rotation; // 0x0000(0x0010) (Edit, BlueprintVisible, SaveGame, IsPlainOldData)
struct Vector3 Translation; // 0x0010(0x000C) (Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData)
struct Vector3 Scale3D; // 0x0020(0x000C) (Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData)
unsigned char UnknownData01[0x4]; // 0x002C(0x0004) MISSED OFFSET
};
struct FAlliance
{
struct FGuid AllianceId; // 0x0000(0x0010) (ZeroConstructor, IsPlainOldData)
TArray<struct FGuid> Crews; // 0x0010(0x0010) (ZeroConstructor)
unsigned char AllianceIndex; // 0x0020(0x0001) (ZeroConstructor, IsPlainOldData)
unsigned char UnknownData00[0x7]; // 0x0021(0x0007) MISSED OFFSET
};
class AAllianceService
{
public:
TArray<struct FAlliance> GetAlliances();
private:
char __pad0x4B0[0x4B0];
TArray<struct FAlliance> Alliances;
};
class Chunk
{
char __pad0x0[0x1000];
};
class USceneComponent
{
public:
Vector3 GetPosition();
Vector3 GetRotation();
private:
char __pad0x130[0x140];
FTransform transform;
char __pad0x60[0x60];
Vector3 relativePosition;
Vector3 relativeAngles;
};
class APlayerState
{
public:
std::wstring GetName();
private:
char __pad0x0[0x1000];
};
class UHealthComponent
{
public:
int GetHealth();
int GetMaxHealth();
private:
unsigned char UnknownData00[0xD8]; // 2.0.17 health fix
float maxHealth;
float health;
unsigned char UnknownData01[0xC4];
};
class UItemDesc
{
public:
std::wstring GetName();
private:
char __pad0x0[0x28];
uintptr_t m_pName;
};
class AItemInfo
{
public:
UItemDesc GetItemDesc();
private:
char __pad0x0[0x1000];
};
class AWieldableItem
{
public:
AItemInfo GetItemInfo();
private:
char __pad0x0[0x1000];
};
class UWieldedItemComponent
{
public:
AWieldableItem GetWieldedItem();
public:
char __pad0x0[0x1000];
};
class AActor
{
public:
int GetID();
USceneComponent GetRootComponent();
APlayerState GetPlayerState();
UWieldedItemComponent GetWieldedItemComponent();
UHealthComponent GetHealthComponent();
bool operator==(const AActor& rhs) const
{
return *(uintptr_t*)(this->__pad0x0 + Offsets.AActor.rootComponent) == *(uintptr_t*)(rhs.__pad0x0 + Offsets.AActor.rootComponent);
}
bool operator!=(const AActor& rhs) const
{
return *(uintptr_t*)(this->__pad0x0 + Offsets.AActor.rootComponent) != *(uintptr_t*)(rhs.__pad0x0 + Offsets.AActor.rootComponent);
}
private:
char __pad0x0[0x1000];
};
struct FCrew
{
public:
TArray<class APlayerState*> GetPlayers();
std::string GetShipType();
FGuid GetCrewID();
private:
FGuid CrewID;
char __pad0x10[0x10];
TArray<class APlayerState*> Players;
char __pad0x30[0x30];
int maxPlayersOnShip;
char __pad0x64[0x1C];
};// 0x0080
class ACrewService
{
public:
TArray<struct FCrew> GetCrews();
private:
char __pad0x0[0x1000];
};
class UCrewOwnershipComponent
{
public:
FGuid GetCrewId();
private:
char __pad0x0[0x100];
};
class AShip
{
public:
UCrewOwnershipComponent GetCrewOwnershipComponent();
uintptr_t GetOwningActor();
private:
char __pad0x0[0x1000];
};
class ULevel
{
public:
TArray<Chunk*> GetActors() const;
private:
char __pad0xA0[0xA0];
TArray<Chunk*> m_Actors;
};
class AFauna
{
public:
std::wstring GetName();
private:
char __pad0x0[0x1000];
};
class APlayerCameraManager
{
public:
Vector3 GetCameraPosition();
Vector3 GetCameraRotation();
float GetCameraFOV();
private:
char __pad0x0[0x4E0]; // 2.0.17.2 / credit: shynd <3
Vector3 position;
Vector3 rotation;
char __pad0x10[0x10];
float fov;
};
struct FName
{
int nameId;
char __pad0x4[0x4];
};
class APlayerController
{
public:
AActor GetActor();
APlayerCameraManager GetCameraManager();
Vector3 GetPlayerAngles();
public:
char __pad0x0[0x1000];
};
class ULocalPlayer
{
public:
APlayerController GetPlayerController();
void SetPlayerAngles(Vector3 angles);
private:
char __pad0x0[0x1000];
};
class UGameInstance
{
public:
ULocalPlayer GetLocalPlayer();
private:
char __pad0x0[0x100];
};
class cUWorld
{
public:
ULevel GetLevel() const;
UGameInstance GetGameInstance() const;
public:
char __pad0x0[0x1000];
};
struct FXMarksTheSpotMapMark
{
struct Vector2 Position; // 0x0000(0x0008) (BlueprintVisible, ZeroConstructor, IsPlainOldData)
float Rotation; // 0x0008(0x0004) (BlueprintVisible, ZeroConstructor, IsPlainOldData)
};
class AXMarksTheSpotMap
{
public:
TArray<struct FXMarksTheSpotMapMark> GetMarks();
private:
char __pad0x0[0x08D0];
TArray<struct FXMarksTheSpotMapMark> Marks;
};
class ABootyItemInfo
{
public:
UItemDesc GetItemDesc();
int GetBootyType();
int GetRareityId();
private:
char __pad0x0[0x1000];
};
class AItemProxy
{
public:
ABootyItemInfo GetBootyItemInfo();
private:
char __pad0x0[0x1000];
};
class UObject
{
public:
char __pad0x0[0x18];
int nameId;
};
// 0x0030
class FWorldMapShipLocation
{
public:
FGuid GetCrewId();
UObject GetUObject();
private:
FGuid crewId;
char __pad0x10[0x18];
uintptr_t m_pUObject;
};
class AMapTable
{
public:
Vector2 GetServerCenter();
TArray<struct Vector2> GetMapPins();
TArray<class FWorldMapShipLocation> GetTrackedShips();
TArray<struct Vector3> GetTrackedBootyItemLocations();
private:
char __pad0x0[0x1000];
};
// ScriptStruct Athena.Island
// 0x0050
struct FIsland
{
int IslandNameId;
char __pad0x4[0x4];
byte IslandType;
unsigned char UnknownData00[0x7];
char __pad0x10[0x8];
Vector3 IslandBoundsCentre;
float IslandBoundsRadius;
float IslandTriggerRadius;
float IslandSafeZoneRadius;
char __pad0x30[0x20];
};
struct UIslandDataAssetEntry
{
public:
int GetNameID();
std::wstring GetName();
private:
char __pad0x0[0x28];
int IslandNameId;
char __pad0x2C[0x84];
uintptr_t IslandName;
};
class UIslandDataAsset
{
public:
TArray<class UIslandDataAssetEntry> GetIslandDataAssetEntry();
private:
char __pad0x0[0x48];
TArray<class UIslandDataAssetEntry> IslandDataEntries;
};
class AIslandService
{
public:
TArray<struct FIsland> GetIslandArray();
UIslandDataAsset GetIslandDataAsset();
private:
char __pad0x0[0x510];
uintptr_t m_pIslandDataAsset;
TArray<struct FIsland> IslandArray;
};
extern cSOT* SOT;