mirror of
https://github.com/ApfelTeeSaft/Blizzard.git
synced 2026-08-26 19:23:30 +00:00
atp just go fuck yourself 4.20
This commit is contained in:
@@ -111,81 +111,6 @@ namespace ActorNamespace
|
||||
return;
|
||||
}
|
||||
|
||||
// Create CheatManager
|
||||
try
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "Setting up CheatManager...");
|
||||
|
||||
auto engine = Globals::GetEngine();
|
||||
if (!engine)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to get engine for CheatManager setup");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "Engine retrieved successfully");
|
||||
|
||||
if (!engine->GameInstance)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "GameInstance is null");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "GameInstance validated");
|
||||
|
||||
if (!engine->GameInstance->LocalPlayers.IsValid() || engine->GameInstance->LocalPlayers.Num() == 0)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "LocalPlayers array is invalid or empty");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "LocalPlayers array validated, count: %d", engine->GameInstance->LocalPlayers.Num());
|
||||
|
||||
auto localPlayer = engine->GameInstance->LocalPlayers[0];
|
||||
if (!localPlayer)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "First LocalPlayer is null");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "First LocalPlayer validated");
|
||||
|
||||
auto playerController = localPlayer->PlayerController;
|
||||
if (!playerController)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "PlayerController is null");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "PlayerController validated");
|
||||
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "Spawning CheatManager object...");
|
||||
auto gameplayStatics = SDK::UGameplayStatics::GetDefaultObj();
|
||||
if (!gameplayStatics)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to get UGameplayStatics default object");
|
||||
return;
|
||||
}
|
||||
|
||||
auto cheatManagerClass = SDK::UCheatManager::StaticClass();
|
||||
if (!cheatManagerClass)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to get UCheatManager static class");
|
||||
return;
|
||||
}
|
||||
|
||||
auto NewCheatManager = gameplayStatics->SpawnObject(cheatManagerClass, playerController);
|
||||
if (!NewCheatManager)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to spawn CheatManager object");
|
||||
return;
|
||||
}
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "CheatManager object spawned successfully");
|
||||
|
||||
playerController->CheatManager = (SDK::UCheatManager*)(NewCheatManager);
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "CheatManager assigned to PlayerController successfully");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Exception during CheatManager setup");
|
||||
return;
|
||||
}
|
||||
|
||||
Logging::SafeLog(ELogEvent::Info, ELogType::Athena, "=== ACTOR NAMESPACE INITIALIZATION COMPLETED SUCCESSFULLY ===");
|
||||
}
|
||||
catch (...)
|
||||
|
||||
+58
-9
@@ -423,14 +423,63 @@ namespace ProcessEventNamespace
|
||||
void Initialize()
|
||||
{
|
||||
// Globals::CreateHook(Globals::GetAddress(SDK::Offsets::ProcessEvent), ProcessEventHook, (void**)&ProcessEvent);
|
||||
Globals::CreateHook(Globals::GetAddress(0x236E670), hkCollectGarbage);
|
||||
Globals::CreateHook(Globals::GetAddress(0x240F4A0), hkReadyToStartMatch, (void**)(&oReadyToStartMatch));
|
||||
Globals::CreateHook(Globals::GetAddress(0x1072E40), hkServerReadyToStartMatch, (void**)(&oServerReadyToStartMatch));
|
||||
Globals::CreateHook(Globals::GetAddress(0x1071E10), hkServerExecuteInventoryItem);
|
||||
Globals::CreateHook(Globals::GetAddress(0x107B910), ServerAttemptAircraftJumpHook);
|
||||
Globals::CreateHook(Globals::GetAddress(0x1073830), hkServerReturnToMainMenu);
|
||||
Globals::CreateHook(Globals::GetAddress(0x1084A90), hkServerHandlePickup, (void**)(&oServerHandlePickup));
|
||||
Globals::CreateHook(Globals::GetAddress(0x10715A0), hkServerCreateBuildingActor);
|
||||
Globals::CreateHook(Globals::GetAddress(0x1072D80), hkServerPlayEmoteItem);
|
||||
|
||||
auto result1 = Globals::CreateHook(Globals::GetAddress(0x236E670), hkCollectGarbage);
|
||||
if (result1 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook CollectGarbage: %d", result1);
|
||||
return;
|
||||
}
|
||||
|
||||
auto result2 = Globals::CreateHook(Globals::GetAddress(0x240F4A0), hkReadyToStartMatch, (void**)(&oReadyToStartMatch));
|
||||
if (result2 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ReadyToStartMatch: %d", result1);
|
||||
return;
|
||||
}
|
||||
auto result3 = Globals::CreateHook(Globals::GetAddress(0x1072E40), hkServerReadyToStartMatch, (void**)(&oServerReadyToStartMatch));
|
||||
if (result3 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerReadyToStartMatch: %d", result1);
|
||||
return;
|
||||
}
|
||||
|
||||
auto result4 = Globals::CreateHook(Globals::GetAddress(0x1071E10), hkServerExecuteInventoryItem);
|
||||
if (result4 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerExecuteInventoryItem: %d", result1);
|
||||
return;
|
||||
}
|
||||
auto result5 = Globals::CreateHook(Globals::GetAddress(0x107B910), ServerAttemptAircraftJumpHook);
|
||||
if (result5 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerAttemptAircraftJump: %d", result1);
|
||||
return;
|
||||
}
|
||||
auto result6 = Globals::CreateHook(Globals::GetAddress(0x1073830), hkServerReturnToMainMenu);
|
||||
if (result6 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerReturnToMainMenu: %d", result1);
|
||||
return;
|
||||
}
|
||||
auto result7 = Globals::CreateHook(Globals::GetAddress(0x1084A90), hkServerHandlePickup, (void**)(&oServerHandlePickup));
|
||||
if (result7 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerHandlePickup: %d", result1);
|
||||
return;
|
||||
}
|
||||
|
||||
auto result8 = Globals::CreateHook(Globals::GetAddress(0x10715A0), hkServerCreateBuildingActor);
|
||||
if (result8 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerCreateBuildingActor: %d", result1);
|
||||
return;
|
||||
}
|
||||
auto result9 = Globals::CreateHook(Globals::GetAddress(0x1072D80), hkServerPlayEmoteItem);
|
||||
if (result9 != MH_OK)
|
||||
{
|
||||
Logging::SafeLog(ELogEvent::Error, ELogType::Athena, "Failed to hook ServerPlayEmoteItem: %d", result1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
-12
@@ -41,7 +41,7 @@ namespace Replication
|
||||
return Channel;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int PrepConnections(SDK::UNetDriver* NetDriver)
|
||||
@@ -113,7 +113,7 @@ namespace Replication
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SDK::UNetConnection* GetOwningConnection(SDK::AActor* Actor)
|
||||
@@ -125,6 +125,8 @@ namespace Replication
|
||||
return ((SDK::APlayerController*)Actor)->NetConnection;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void BuildConsiderList(SDK::UNetDriver* NetDriver, std::vector<FNetworkObjectInfo*>& OutConsiderList)
|
||||
@@ -139,11 +141,6 @@ namespace Replication
|
||||
if (!Actor)
|
||||
continue;
|
||||
|
||||
if (!Actor)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Actor->bActorIsBeingDestroyed)
|
||||
{
|
||||
continue;
|
||||
@@ -171,8 +168,11 @@ namespace Replication
|
||||
}
|
||||
}
|
||||
|
||||
if (Actors.GetData())
|
||||
{
|
||||
SDK::FreeInternal((__int64)Actors.GetData());
|
||||
Actors.SetData(0);
|
||||
}
|
||||
Actors.SetData(nullptr);
|
||||
Actors.SetNum(0);
|
||||
Actors.SetMax(0);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ namespace Replication
|
||||
|
||||
for (int32_t ChildIdx = 0; ChildIdx < Connection->Children.Num(); ChildIdx++)
|
||||
{
|
||||
if (Connection->Children[ChildIdx]->PlayerController != NULL)
|
||||
if (Connection->Children[ChildIdx]->PlayerController != nullptr)
|
||||
{
|
||||
SendClientAdjustment(Connection->Children[ChildIdx]->PlayerController);
|
||||
}
|
||||
@@ -229,23 +229,26 @@ namespace Replication
|
||||
{
|
||||
if (ReplicateActor(Channel))
|
||||
{
|
||||
// bim bim bam bam
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ConsiderList.empty();
|
||||
for (auto* Info : ConsiderList)
|
||||
{
|
||||
delete Info;
|
||||
}
|
||||
ConsiderList.clear();
|
||||
}
|
||||
|
||||
void InitOffsets()
|
||||
{
|
||||
|
||||
CreateChannel = decltype(CreateChannel)(Globals::GetAddress(0x2105540));
|
||||
SetChannelActor = decltype(SetChannelActor)(Globals::GetAddress(0x1F9C260));
|
||||
ReplicateActor = decltype(ReplicateActor)(Globals::GetAddress(0x1F97D80));
|
||||
CallPreReplication = decltype(CallPreReplication)(Globals::GetAddress(0x1D84F70));
|
||||
SendClientAdjustment = decltype(SendClientAdjustment)(Globals::GetAddress(0x1D84F70));
|
||||
SendClientAdjustment = decltype(SendClientAdjustment)(Globals::GetAddress(0x221FEC0));
|
||||
ActorChannelClose = decltype(ActorChannelClose)(Globals::GetAddress(0x1F7E9C0));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user