Skip to content

Commit

Permalink
ayy lmao 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf49406 committed Jan 12, 2025
1 parent 7d2743f commit 2f53408
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions SourceSDK/CreateInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "../Dota2Patcher.h"
#include "../Memory.h"

class Interfase {
class Interface {
public:
std::optional<uintptr_t> base() {
const auto base_ptr = Memory::read_memory<uintptr_t>(this);
Expand All @@ -28,16 +28,16 @@ class Interfase {
return std::string(name.value());
}

std::optional<Interfase*> next() {
std::optional<Interface*> next() {
const auto next_ptr = Memory::read_memory<uintptr_t>(this + 0x10);
if (next_ptr.value_or(0) == 0)
return std::nullopt;

return (Interfase*)next_ptr.value();
return (Interface*)next_ptr.value();
}
};

class CreateInterface : public Interfase {
class CreateInterface : public Interface {
public:
bool get_create_interface(std::string module_name) {
const auto CreateInterface_base = Memory::pattern_scan(module_name, Patches::Patterns::CreateInterface);
Expand All @@ -56,7 +56,7 @@ class CreateInterface : public Interfase {

printf("[+] %s CreateInterface -> [%p]\n", module_name.c_str(), (void*)CreateInterfaceFn.value());

pCreateInterface_ = (Interfase*)CreateInterfaceFn.value();
pCreateInterface_ = (Interface*)CreateInterfaceFn.value();
return true;
}

Expand All @@ -66,7 +66,7 @@ class CreateInterface : public Interfase {
return;
}

Interfase* iface = pCreateInterface_;
Interface* iface = pCreateInterface_;

while (true) {
const auto name = iface->name();
Expand Down Expand Up @@ -94,5 +94,5 @@ class CreateInterface : public Interfase {
}

private:
Interfase* pCreateInterface_ = nullptr;
Interface* pCreateInterface_ = nullptr;
};

0 comments on commit 2f53408

Please sign in to comment.