Skip to content

Commit 5ad2c5b

Browse files
committed
Merging
2 parents 5d747ff + 0d4238c commit 5ad2c5b

File tree

5 files changed

+198
-253
lines changed

5 files changed

+198
-253
lines changed

AsaApi/Core/Private/Offsets.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,46 @@ namespace API
4949

5050
DWORD64 Offsets::GetAddress(const void* base, const std::string& name)
5151
{
52+
#ifdef API_DEBUG
53+
if (!offsets_dump_.contains(name))
54+
{
55+
Log::GetLog()->critical("Failed to get the offset of {}.", name);
56+
Log::GetLog()->flush();
57+
Sleep(10000);
58+
throw;
59+
}
60+
#endif
61+
5262
return reinterpret_cast<DWORD64>(base) + static_cast<DWORD64>(offsets_dump_[name]);
5363
}
5464

5565
LPVOID Offsets::GetAddress(const std::string& name)
5666
{
67+
#ifdef API_DEBUG
68+
if (!offsets_dump_.contains(name))
69+
{
70+
Log::GetLog()->critical("Failed to get the offset of {}.", name);
71+
Log::GetLog()->flush();
72+
Sleep(10000);
73+
throw;
74+
}
75+
#endif
76+
5777
return reinterpret_cast<LPVOID>(module_base_ + static_cast<DWORD64>(offsets_dump_[name]));
5878
}
5979

6080
LPVOID Offsets::GetDataAddress(const std::string& name)
6181
{
82+
#ifdef API_DEBUG
83+
if (!offsets_dump_.contains(name))
84+
{
85+
Log::GetLog()->critical("Failed to get the offset of {}.", name);
86+
Log::GetLog()->flush();
87+
Sleep(10000);
88+
throw;
89+
}
90+
#endif
91+
6292
return reinterpret_cast<LPVOID>(data_base_ + static_cast<DWORD64>(offsets_dump_[name]));
6393
}
6494

@@ -74,6 +104,16 @@ namespace API
74104

75105
BitField Offsets::GetBitFieldInternal(const void* base, const std::string& name)
76106
{
107+
#ifdef API_DEBUG
108+
if (!bitfields_dump_.contains(name))
109+
{
110+
Log::GetLog()->critical("Failed to get the bitfield address of {}.", name);
111+
Log::GetLog()->flush();
112+
Sleep(10000);
113+
throw;
114+
}
115+
#endif
116+
77117
const auto bf = bitfields_dump_[name];
78118
auto cf = BitField();
79119
cf.bit_position = bf.bit_position;

AsaApi/Core/Public/API/ARK/GameMode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,7 @@ struct AShooterGameMode : APrimalGameMode
23852385
void LoadBanListFromString(FString* FileString, bool GlobalList) { NativeCall<void, FString*, bool>(this, "AShooterGameMode.LoadBanListFromString(FString&,bool)", FileString, GlobalList); }
23862386
//FString* GetSaveDirectoryName(FString* result, ESaveType::Type SaveType, bool RemoveSavedArksDir) { return NativeCall<FString*, FString*, ESaveType::Type, bool>(this, "AShooterGameMode.GetSaveDirectoryName(FString&,ESaveType::Type,bool)", result, SaveType, RemoveSavedArksDir); }
23872387
static FString* GeneratePGMapFolderName() { return NativeCall<FString*>(nullptr, "AShooterGameMode.GeneratePGMapFolderName()"); }
2388-
FString* GetMapName(FString* result) { return NativeCall<FString*, FString*>(this, "AShooterGameMode.GetMapName(FString&)", result); }
2388+
FString* GetMapName(FString* result) { return NativeCall<FString*, FString*>(this, "AShooterGameMode.GetMapName()", result); }
23892389
void UpdateSaveBackupFiles() { NativeCall<void>(this, "AShooterGameMode.UpdateSaveBackupFiles()"); }
23902390
void LoadTribeIds_Process(unsigned int theTribeID) { NativeCall<void, unsigned int>(this, "AShooterGameMode.LoadTribeIds_Process(unsignedint)", theTribeID); }
23912391
void LoadTribeIds() { NativeCall<void>(this, "AShooterGameMode.LoadTribeIds()"); }

0 commit comments

Comments
 (0)