TNameEntryArray*GetGNames(){
return(TNameEntryArray*)getPointer(UE4+0x4431AE4);
}

static UEngine *GEngine = 0;
UWorld *GetWorld() {
    while (!GEngine) {
 GEngine = UObject::FindObject<UEngine>("UAEGameEngine Transient.UAEGameEngine_1");
 sleep(1);
   }
    if (GEngine) {
    auto ViewPort = GEngine->GameViewport;
if (ViewPort) {
   return ViewPort->World;
}   }
    return 0;
}
#include <vector>
std::vector<AActor*> getActors()
{
	auto World = GetWorld();
	if (!World)
		return std::vector<AActor*>();
	auto PersistentLevel = World->PersistentLevel;
	if (!PersistentLevel)
		return std::vector<AActor*>();
	auto Actors = *(TArray<AActor*> *)((uintptr_t)PersistentLevel + 0x70);
	std::vector<AActor*> actors;
	for (int i = 0; i < Actors.Num(); i++)
	{
		auto Actor = Actors[i];
		if (Actor)
		{
			actors.push_back(Actor);
		}
	}
	return actors;
}



struct sRegion {
    uintptr_t start, end;
};

std::vector<sRegion> trapRegions;

bool isObjectInvalid(UObject *obj) {
    if (!IsPtrValid(obj)) {
        return true;
    }

    if (!IsPtrValid(obj->ClassPrivate)) {
        return true;
    }

    if (obj->InternalIndex <= 0) {
        return true;
    }

    if (obj->NamePrivate.ComparisonIndex <= 0) {
        return true;
    }

    if ((uintptr_t)(obj) % sizeof(uintptr_t) != 0x0 && (uintptr_t)(obj) % sizeof(uintptr_t) != 0x4) {
        return true;
    }

    if (std::any_of(trapRegions.begin(), trapRegions.end(), [obj](sRegion region) { return ((uintptr_t) obj) >= region.start && ((uintptr_t) obj) <= region.end; }) ||
        std::any_of(trapRegions.begin(), trapRegions.end(), [obj](sRegion region) { return ((uintptr_t) obj->ClassPrivate) >= region.start && ((uintptr_t) obj->ClassPrivate) <= region.end; })) {
        return true;
    }

    return false;
}

AUAEGameMode *GameMode=0;
ASTExtraPlayerCharacter *PlayerCharacter=0;
ASTExtraPlayerController *PlayerController2=0;
APlayerController *PlayerController=0;
AGameNetworkManager *NetworkManager = 0;
void GetActor(){

         auto Actors = getActors();
        for (int i = 0; i < Actors.size(); i++) {
            auto Actor = Actors[i];
            if (isObjectInvalid(Actor))
                continue;
            
            if (Actor->IsA(AGameNetworkManager::StaticClass())) {
                NetworkManager = (AGameNetworkManager *) Actor;
                break;
            }
      
			}
        }
        
void 获取对象(){
auto Actors = getActors();
        for (int i = 0; i < Actors.size(); i++) {
            auto Actor = Actors[i];

            
            if (Actor->IsA(AUAEGameMode::StaticClass())) {
                GameMode = (AUAEGameMode *) Actor;
                break;
            }
        }
        for (int i = 0; i < Actors.size(); i++) {
            auto Actor = Actors[i];

            
            if (Actor->IsA(ASTExtraPlayerCharacter::StaticClass())) {
                PlayerCharacter = (ASTExtraPlayerCharacter *) Actor;
                break;
            }
        }
        for (int i = 0; i < Actors.size(); i++) {
            auto Actor = Actors[i];

            
            if (Actor->IsA(ASTExtraPlayerController::StaticClass())) {
                PlayerController2 = (ASTExtraPlayerController *) Actor;
                break;
            }
        }
        for (int i = 0; i < Actors.size(); i++) {
            auto Actor = Actors[i];

            
            if (Actor->IsA(APlayerController::StaticClass())) {
                PlayerController = (APlayerController *) Actor;
                break;
            }
        }
}
void 修复(){
获取对象();
GameMode->bEnableClimbing=true;
GameMode->bEnableDamage=true;
GameMode->bEnableDamage=20;
}