commit
4c709dcb60
@ -1,13 +1,13 @@
|
||||
{
|
||||
"game_version": "2.6",
|
||||
"game_version": "2.7",
|
||||
"modules": {
|
||||
"UnityPlayer.dll": {
|
||||
"checksum": 1499808152269523874,
|
||||
"timestamp": 132918960850629156
|
||||
"checksum": 0,
|
||||
"timestamp": 0
|
||||
},
|
||||
"UserAssembly.dll": {
|
||||
"checksum": 6469164240778644427,
|
||||
"timestamp": 132918960789354191
|
||||
"checksum": 0,
|
||||
"timestamp": 0
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -13,8 +13,8 @@
|
||||
|
||||
#include "il2cpp-metadata-version.h"
|
||||
|
||||
#define IS_SINGLETON_LOADED(className) (*app::Singleton_1_## className ##___TypeInfo != nullptr && *app::Singleton_1_ ## className ## __get_Instance__MethodInfo != nullptr)
|
||||
#define GET_SINGLETON(tpname) IS_SINGLETON_LOADED(tpname) ? reinterpret_cast<app:: ## tpname ## *>(app::Singleton_GetInstance(nullptr, *app::Singleton_1_ ## tpname ## __get_Instance__MethodInfo)) : nullptr
|
||||
#define IS_SINGLETON_LOADED(className) (/**app::Singleton_1_## className ##___TypeInfo != nullptr &&*/ *app::Singleton_1_ ## className ## __get_Instance__MethodInfo != nullptr)
|
||||
#define GET_SINGLETON(tpname) IS_SINGLETON_LOADED(tpname) ? reinterpret_cast<app:: ## tpname ## *>(app::Singleton_GetInstance(*app::Singleton_1_ ## tpname ## __get_Instance__MethodInfo)) : nullptr
|
||||
|
||||
#define INIT_ILCPP_CLASS(className, expr) (il2cpp_runtime_class_init(reinterpret_cast<Il2CppClass*>(*app::## className ##__TypeInfo)), expr)
|
||||
#define GET_STATIC_FIELDS(tpname) INIT_ILCPP_CLASS(tpname, (*app::## tpname ##__TypeInfo)->static_fields)
|
||||
|
@ -15,13 +15,13 @@ cheat::GenshinCM& cheat::GenshinCM::instance()
|
||||
|
||||
void cheat::GenshinCM::CursorSetVisibility(bool visibility)
|
||||
{
|
||||
app::Cursor_set_visible(nullptr, visibility, nullptr);
|
||||
app::Cursor_set_lockState(nullptr, visibility ? app::CursorLockMode__Enum::None : app::CursorLockMode__Enum::Locked, nullptr);
|
||||
app::Cursor_set_visible(visibility, nullptr);
|
||||
app::Cursor_set_lockState(visibility ? app::CursorLockMode__Enum::None : app::CursorLockMode__Enum::Locked, nullptr);
|
||||
}
|
||||
|
||||
bool cheat::GenshinCM::CursorGetVisibility()
|
||||
{
|
||||
return app::Cursor_get_visible(nullptr, nullptr);
|
||||
return app::Cursor_get_visible(nullptr);
|
||||
}
|
||||
|
||||
cheat::GenshinCM::GenshinCM() :
|
||||
|
@ -343,6 +343,7 @@ uintptr_t ILPatternScanner::FindFunctionEntry(uintptr_t address)
|
||||
|
||||
void ILPatternScanner::LoadMethodPointers()
|
||||
{
|
||||
/* Outdated. Need update to version 2.7
|
||||
auto info = GetMetadataInfo();
|
||||
|
||||
#define LOAD_METHOD_POINTERS(countField, field) LOG_DEBUG( #field ": %d", info->codeRegistration->##countField); \
|
||||
@ -359,6 +360,7 @@ void ILPatternScanner::LoadMethodPointers()
|
||||
|
||||
std::sort(m_MethodPointers.begin(), m_MethodPointers.end());
|
||||
LOG_DEBUG("Loaded %llu method pointers.", m_MethodPointers.size());
|
||||
*/
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -369,6 +371,7 @@ static T MetadataOffset(void* metadata, size_t sectionOffset, size_t itemIndex)
|
||||
|
||||
const MethodInfo* ILPatternScanner::GetMethodInfoFromIndex(uint32_t methodIndex)
|
||||
{
|
||||
/* Outdated. Need update to version 2.7
|
||||
SET_API_FUNC_P(Il2CppGenericMethod*, GetGenericMethodFromIndex, (uint32_t index), "40 53 48 83 EC 20 48 8B 05 ?? ?? ?? ?? 48 63");
|
||||
|
||||
GET_FUNC_BY_XREF(MethodInfo*, GetMethod, (const Il2CppGenericMethod * gmethod), "E8 ?? ?? ?? ?? 48 8B C8 0F B7 FE", 1);
|
||||
@ -383,6 +386,8 @@ const MethodInfo* ILPatternScanner::GetMethodInfoFromIndex(uint32_t methodIndex)
|
||||
return GetMethod(GetGenericMethodFromIndex(index));
|
||||
else
|
||||
return GetMethodInfoFromMethodDefinitionIndex(index);
|
||||
*/
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string ILPatternScanner::ComputeGenericParamsPrefix(const Il2CppGenericInst* inst)
|
||||
@ -466,6 +471,7 @@ std::string ILPatternScanner::ComputeInspectorMethodName(const MethodInfo* metho
|
||||
|
||||
void ILPatternScanner::LoadUsage()
|
||||
{
|
||||
/* Outdated. Need update to version 2.7.
|
||||
SET_API_FUNC_P(Il2CppClass*, GetTypeInfoFromTypeIndex, (uint32_t index), "48 83 EC 28 83 F9 FF 75");
|
||||
|
||||
auto info = GetMetadataInfo();
|
||||
@ -533,7 +539,7 @@ void ILPatternScanner::LoadUsage()
|
||||
}
|
||||
}
|
||||
}
|
||||
LoadMetadata();
|
||||
LoadMetadata();*/
|
||||
}
|
||||
|
||||
void ILPatternScanner::LoadMetadata()
|
||||
|
@ -127,7 +127,7 @@ namespace cheat
|
||||
|
||||
static uint32_t _lastUserID = 0;
|
||||
|
||||
auto playerModule = GET_SINGLETON(PlayerModule);
|
||||
auto playerModule = GET_SINGLETON(MoleMole_PlayerModule);
|
||||
if (playerModule == nullptr || playerModule->fields._accountData_k__BackingField == nullptr)
|
||||
return;
|
||||
|
||||
@ -148,7 +148,7 @@ namespace cheat
|
||||
CALL_ORIGIN(GameManager_Update_Hook, __this, method);
|
||||
}
|
||||
|
||||
static void LevelSyncCombatPlugin_RequestSceneEntityMoveReq_Hook(app::BKFGGJFIIKC* __this, uint32_t entityId, app::MotionInfo* syncInfo,
|
||||
static void LevelSyncCombatPlugin_RequestSceneEntityMoveReq_Hook(app::LevelSyncCombatPlugin* __this, uint32_t entityId, app::MotionInfo* syncInfo,
|
||||
bool isReliable, uint32_t relseq, MethodInfo* method)
|
||||
{
|
||||
events::MoveSyncEvent(entityId, syncInfo);
|
||||
@ -158,7 +158,7 @@ namespace cheat
|
||||
static void InstallEventHooks()
|
||||
{
|
||||
HookManager::install(app::GameManager_Update, GameManager_Update_Hook);
|
||||
HookManager::install(app::LevelSyncCombatPlugin_RequestSceneEntityMoveReq, LevelSyncCombatPlugin_RequestSceneEntityMoveReq_Hook);
|
||||
HookManager::install(app::MoleMole_LevelSyncCombatPlugin_RequestSceneEntityMoveReq, LevelSyncCombatPlugin_RequestSceneEntityMoveReq_Hook);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,12 +26,12 @@ namespace cheat::feature::esp::render
|
||||
|
||||
s_Camera = nullptr;
|
||||
|
||||
auto loadingManager = GET_SINGLETON(LoadingManager);
|
||||
if (loadingManager == nullptr || !app::LoadingManager_IsLoaded(loadingManager, nullptr))
|
||||
auto loadingManager = GET_SINGLETON(MoleMole_LoadingManager);
|
||||
if (loadingManager == nullptr || !app::MoleMole_LoadingManager_IsLoaded(loadingManager, nullptr))
|
||||
return;
|
||||
|
||||
SAFE_BEGIN();
|
||||
auto camera = app::Camera_get_main(nullptr, nullptr);
|
||||
auto camera = app::Camera_get_main(nullptr);
|
||||
if (camera == nullptr)
|
||||
return;
|
||||
|
||||
@ -58,8 +58,8 @@ namespace cheat::feature::esp::render
|
||||
if (pixelWidth == 0 || pixelHeight == 0)
|
||||
return;
|
||||
|
||||
auto screenWidth = app::Screen_get_width(nullptr, nullptr);
|
||||
auto screenHeight = app::Screen_get_height(nullptr, nullptr);
|
||||
auto screenWidth = app::Screen_get_width(nullptr);
|
||||
auto screenHeight = app::Screen_get_height(nullptr);
|
||||
|
||||
if (screenWidth == 0 || screenHeight == 0)
|
||||
return;
|
||||
@ -88,7 +88,7 @@ namespace cheat::feature::esp::render
|
||||
screenPos.y *= s_ResolutionScale.y;
|
||||
}
|
||||
|
||||
screenPos.y = app::Screen_get_height(nullptr, nullptr) - screenPos.y;
|
||||
screenPos.y = app::Screen_get_height(nullptr) - screenPos.y;
|
||||
return screenPos;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ namespace cheat::feature::esp::render
|
||||
|
||||
// Sometimes occurs access violation in UnityPlayer.dll
|
||||
// Callow: Have no idea what to do with it unless just catch exception
|
||||
auto bounds = app::Utils_1_GetBounds(nullptr, gameObject, nullptr);
|
||||
auto bounds = app::Utils_4_GetBounds(gameObject, nullptr);
|
||||
if (bounds.m_Extents.x < esp.f_MinSize &&
|
||||
bounds.m_Extents.y < esp.f_MinSize &&
|
||||
bounds.m_Extents.z < esp.f_MinSize)
|
||||
@ -216,7 +216,7 @@ namespace cheat::feature::esp::render
|
||||
|
||||
}
|
||||
|
||||
auto screenHeight = app::Screen_get_height(nullptr, nullptr);
|
||||
auto screenHeight = app::Screen_get_height(nullptr);
|
||||
|
||||
#define FIX_Y(field) boxScreen.##field##.y = screenHeight - boxScreen.##field##.y
|
||||
|
||||
@ -263,7 +263,7 @@ namespace cheat::feature::esp::render
|
||||
boxRect.yMax *= s_ResolutionScale.y;
|
||||
}
|
||||
|
||||
auto screenHeight = app::Screen_get_height(nullptr, nullptr);
|
||||
auto screenHeight = app::Screen_get_height(nullptr);
|
||||
boxRect.yMin = screenHeight - boxRect.yMin;
|
||||
boxRect.yMax = screenHeight - boxRect.yMax;
|
||||
return boxRect;
|
||||
|
@ -24,7 +24,7 @@ namespace cheat::game
|
||||
entityFilters[filter] = { false, 0 };
|
||||
|
||||
auto& entry = entityFilters[filter];
|
||||
auto timestamp = app::GetTimestamp(nullptr, nullptr);
|
||||
auto timestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr);
|
||||
if (entry.second + m_LifeTime > timestamp)
|
||||
return entry.first;
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace cheat::game
|
||||
app::String* GetRawName(game::Entity* entity)
|
||||
{
|
||||
SAFE_BEGIN();
|
||||
return app::BaseEntity_ToStringRelease(entity->raw(), nullptr);
|
||||
return app::MoleMole_BaseEntity_ToStringRelease(entity->raw(), nullptr);
|
||||
SAFE_ERROR();
|
||||
return nullptr;
|
||||
SAFE_END();
|
||||
@ -61,7 +61,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::BaseEntity_GetRelativePosition(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetRelativePosition(m_RawEntity, nullptr);
|
||||
}
|
||||
|
||||
app::Vector3 Entity::absolutePosition()
|
||||
@ -69,7 +69,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::BaseEntity_GetAbsolutePosition(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetAbsolutePosition(m_RawEntity, nullptr);
|
||||
}
|
||||
|
||||
app::Vector2 Entity::levelPosition()
|
||||
@ -77,7 +77,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::Miscs_GenLevelPos_1(nullptr, absolutePosition(), nullptr);
|
||||
return app::Miscs_GenLevelPos_1(absolutePosition(), nullptr);
|
||||
}
|
||||
|
||||
float Entity::distance(Entity* entity)
|
||||
@ -93,7 +93,7 @@ namespace cheat::game
|
||||
if (rawEntity == nullptr)
|
||||
return 10000;
|
||||
|
||||
auto point = app::BaseEntity_GetRelativePosition(rawEntity, nullptr);
|
||||
auto point = app::MoleMole_BaseEntity_GetRelativePosition(rawEntity, nullptr);
|
||||
return distance(point);
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return 10000;
|
||||
|
||||
auto dist = app::Vector3_Distance(nullptr, relativePosition(), point, nullptr);
|
||||
auto dist = app::Vector3_Distance(relativePosition(), point, nullptr);
|
||||
return dist;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return 10000;
|
||||
|
||||
return app::Vector2_Distance(nullptr, levelPosition(), levelPoint, nullptr);
|
||||
return app::Vector2_Distance(levelPosition(), levelPoint, nullptr);
|
||||
}
|
||||
|
||||
bool Entity::isGadget()
|
||||
@ -149,7 +149,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return;
|
||||
|
||||
app::BaseEntity_SetRelativePosition(m_RawEntity, value, true, nullptr);
|
||||
app::MoleMole_BaseEntity_SetRelativePosition(m_RawEntity, value, true, nullptr);
|
||||
}
|
||||
|
||||
void Entity::setAbsolutePosition(const app::Vector3& value)
|
||||
@ -157,15 +157,15 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return;
|
||||
|
||||
app::BaseEntity_SetAbsolutePosition(m_RawEntity, value, true, nullptr);
|
||||
app::MoleMole_BaseEntity_SetAbsolutePosition(m_RawEntity, value, true, nullptr);
|
||||
}
|
||||
|
||||
bool Entity::isLoaded()
|
||||
{
|
||||
if (m_RawEntity == nullptr || !app::BaseEntity_IsActive(m_RawEntity, nullptr))
|
||||
if (m_RawEntity == nullptr || !app::MoleMole_BaseEntity_IsActive(m_RawEntity, nullptr))
|
||||
return false;
|
||||
|
||||
m_IsLoaded = m_IsLoaded || app::BaseEntity_get_rootGameObject(m_RawEntity, nullptr);
|
||||
m_IsLoaded = m_IsLoaded || app::MoleMole_BaseEntity_get_rootGameObject(m_RawEntity, nullptr);
|
||||
return m_IsLoaded;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ namespace cheat::game
|
||||
return nullptr;
|
||||
|
||||
SAFE_BEGIN();
|
||||
return app::BaseEntity_GetMoveComponent_1(m_RawEntity, *app::BaseEntity_GetMoveComponent_1__MethodInfo);
|
||||
return app::MoleMole_BaseEntity_GetMoveComponent_1(m_RawEntity, *app::MoleMole_BaseEntity_GetMoveComponent_1__MethodInfo);
|
||||
SAFE_ERROR();
|
||||
return nullptr;
|
||||
SAFE_END();
|
||||
@ -187,7 +187,7 @@ namespace cheat::game
|
||||
return nullptr;
|
||||
|
||||
SAFE_BEGIN();
|
||||
return app::BaseEntity_GetBaseCombat(m_RawEntity, *app::BaseEntity_GetBaseCombat__MethodInfo);
|
||||
return app::MoleMole_BaseEntity_GetLogicCombatComponent_1(m_RawEntity, *app::MoleMole_BaseEntity_GetLogicCombatComponent_1__MethodInfo);
|
||||
SAFE_ERROR();
|
||||
return nullptr;
|
||||
SAFE_END();
|
||||
@ -199,7 +199,7 @@ namespace cheat::game
|
||||
return nullptr;
|
||||
|
||||
SAFE_BEGIN();
|
||||
return app::BaseEntity_GetRigidbody(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetRigidbody(m_RawEntity, nullptr);
|
||||
SAFE_ERROR();
|
||||
return nullptr;
|
||||
SAFE_END();
|
||||
@ -211,7 +211,7 @@ namespace cheat::game
|
||||
return nullptr;
|
||||
|
||||
SAFE_BEGIN();
|
||||
return app::BaseEntity_get_gameObject(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_get_gameObject(m_RawEntity, nullptr);
|
||||
SAFE_ERROR();
|
||||
return nullptr;
|
||||
SAFE_END();
|
||||
@ -222,7 +222,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::BaseEntity_GetForward(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetForward(m_RawEntity, nullptr);
|
||||
}
|
||||
|
||||
app::Vector3 Entity::back()
|
||||
@ -235,7 +235,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::BaseEntity_GetRight(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetRight(m_RawEntity, nullptr);
|
||||
}
|
||||
|
||||
app::Vector3 Entity::left()
|
||||
@ -248,7 +248,7 @@ namespace cheat::game
|
||||
if (m_RawEntity == nullptr)
|
||||
return {};
|
||||
|
||||
return app::BaseEntity_GetUp(m_RawEntity, nullptr);
|
||||
return app::MoleMole_BaseEntity_GetUp(m_RawEntity, nullptr);
|
||||
}
|
||||
|
||||
app::Vector3 Entity::down()
|
||||
|
@ -53,7 +53,7 @@ namespace cheat::game
|
||||
|
||||
SAFE_BEGIN();
|
||||
|
||||
auto logicComponentsRaw = app::BaseEntity_GetAllLogicComponents(m_RawEntity, nullptr);
|
||||
auto logicComponentsRaw = app::MoleMole_BaseEntity_GetAllLogicComponents(m_RawEntity, nullptr);
|
||||
auto logicComponents = TO_UNI_LIST(logicComponentsRaw, app::BaseComponent*);
|
||||
if (logicComponents == nullptr)
|
||||
return nullptr;
|
||||
|
@ -16,11 +16,11 @@ namespace cheat::game
|
||||
|
||||
std::vector<app::BaseEntity*> EntityManager::rawEntities()
|
||||
{
|
||||
auto entityManager = GET_SINGLETON(EntityManager);
|
||||
auto entityManager = GET_SINGLETON(MoleMole_EntityManager);
|
||||
if (entityManager == nullptr)
|
||||
return {};
|
||||
|
||||
auto entities = TO_UNI_LIST(app::EntityManager_GetEntities(entityManager, nullptr), app::BaseEntity*);
|
||||
auto entities = TO_UNI_LIST(app::MoleMole_EntityManager_GetEntities(entityManager, nullptr), app::BaseEntity*);
|
||||
if (entities == nullptr)
|
||||
return {};
|
||||
|
||||
@ -29,7 +29,7 @@ namespace cheat::game
|
||||
|
||||
for (const auto& entity : *entities)
|
||||
{
|
||||
if (entity != nullptr && app::BaseEntity_IsActive(entity, nullptr))
|
||||
if (entity != nullptr && app::MoleMole_BaseEntity_IsActive(entity, nullptr))
|
||||
aliveEntities.push_back(entity);
|
||||
}
|
||||
return aliveEntities;
|
||||
@ -73,11 +73,11 @@ namespace cheat::game
|
||||
|
||||
cheat::game::Entity* EntityManager::entity(uint32_t runtimeID, bool unsafe)
|
||||
{
|
||||
auto entityManager = GET_SINGLETON(EntityManager);
|
||||
auto entityManager = GET_SINGLETON(MoleMole_EntityManager);
|
||||
if (entityManager == nullptr)
|
||||
return nullptr;
|
||||
|
||||
auto rawEntity = app::EntityManager_GetValidEntity(entityManager, runtimeID, nullptr);
|
||||
auto rawEntity = app::MoleMole_EntityManager_GetValidEntity(entityManager, runtimeID, nullptr);
|
||||
if (unsafe)
|
||||
return new Entity(rawEntity);
|
||||
|
||||
@ -86,18 +86,18 @@ namespace cheat::game
|
||||
|
||||
cheat::game::Entity* EntityManager::avatar()
|
||||
{
|
||||
auto entityManager = GET_SINGLETON(EntityManager);
|
||||
auto entityManager = GET_SINGLETON(MoleMole_EntityManager);
|
||||
if (entityManager == nullptr)
|
||||
return s_EmptyEntity;
|
||||
|
||||
auto avatarRaw = app::EntityManager_GetCurrentAvatar(entityManager, nullptr);
|
||||
auto avatarRaw = app::MoleMole_EntityManager_GetLocalAvatarEntity(entityManager, nullptr);
|
||||
if (m_AvatarEntity.raw() != avatarRaw)
|
||||
m_AvatarEntity = Entity(avatarRaw);
|
||||
|
||||
return &m_AvatarEntity;
|
||||
}
|
||||
|
||||
bool EntityManager_RemoveEntity_Hook(app::EntityManager* __this, app::BaseEntity* entity, uint32_t specifiedRuntimeID, MethodInfo* method)
|
||||
bool EntityManager_RemoveEntity_Hook(app::MoleMole_EntityManager* __this, app::BaseEntity* entity, uint32_t specifiedRuntimeID, MethodInfo* method)
|
||||
{
|
||||
EntityManager::instance().OnRawEntityDestroy(entity);
|
||||
return CALL_ORIGIN(EntityManager_RemoveEntity_Hook, __this, entity, specifiedRuntimeID, method);
|
||||
@ -121,12 +121,12 @@ namespace cheat::game
|
||||
|
||||
EntityManager::EntityManager() : m_AvatarEntity(nullptr)
|
||||
{
|
||||
HookManager::install(app::EntityManager_RemoveEntity, EntityManager_RemoveEntity_Hook);
|
||||
HookManager::install(app::MoleMole_EntityManager_RemoveEntity, EntityManager_RemoveEntity_Hook);
|
||||
}
|
||||
|
||||
cheat::game::Entity* EntityManager::entity(app::BaseEntity* rawEntity)
|
||||
{
|
||||
if (rawEntity == nullptr || !app::BaseEntity_IsActive(rawEntity, nullptr))
|
||||
if (rawEntity == nullptr || !app::MoleMole_BaseEntity_IsActive(rawEntity, nullptr))
|
||||
return s_EmptyEntity;
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_EntityCacheLock);
|
||||
@ -142,7 +142,7 @@ namespace cheat::game
|
||||
entityDestroyEvent(entry.first);
|
||||
}
|
||||
|
||||
if (app::BaseEntity_get_rootGameObject(rawEntity, nullptr) == nullptr)
|
||||
if (app::MoleMole_BaseEntity_get_rootGameObject(rawEntity, nullptr) == nullptr)
|
||||
return s_EmptyEntity;
|
||||
|
||||
Entity* ent = new Entity(rawEntity);
|
||||
@ -158,11 +158,11 @@ namespace cheat::game
|
||||
|
||||
app::CameraEntity* EntityManager::mainCamera()
|
||||
{
|
||||
auto entityManager = GET_SINGLETON(EntityManager);
|
||||
auto entityManager = GET_SINGLETON(MoleMole_EntityManager);
|
||||
if (entityManager == nullptr)
|
||||
return nullptr;
|
||||
|
||||
auto cameraEntity = app::EntityManager_GetMainCameraEntity(entityManager, nullptr);
|
||||
auto cameraEntity = app::MoleMole_EntityManager_GetMainCameraEntity(entityManager, nullptr);
|
||||
return cameraEntity;
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ namespace cheat::game
|
||||
{
|
||||
std::vector<WaypointInfo> GetUnlockedWaypoints(uint32_t targetSceneId)
|
||||
{
|
||||
auto mapModule = GET_SINGLETON(MBHLOBDPKEC);
|
||||
auto mapModule = GET_SINGLETON(MoleMole_MapModule);
|
||||
if (mapModule == nullptr)
|
||||
return {};
|
||||
|
||||
@ -29,8 +29,8 @@ namespace cheat::game
|
||||
continue;
|
||||
|
||||
auto& config = waypoint.config->fields;
|
||||
uint16_t areaId = app::SimpleSafeUInt16_get_Value(nullptr, config.areaIdRawNum, nullptr);
|
||||
bool isAreaUnlocked = app::MapModule_IsAreaUnlock(mapModule, sceneId, areaId, nullptr);
|
||||
uint16_t areaId = app::MoleMole_SimpleSafeUInt16_get_Value(config.areaIdRawNum, nullptr);
|
||||
bool isAreaUnlocked = app::MoleMole_MapModule_IsAreaUnlock(mapModule, sceneId, areaId, nullptr);
|
||||
|
||||
if (waypoint.isUnlocked && isAreaUnlocked && !config._unlocked && !waypoint.isGroupLimit && !waypoint.isModelHidden)
|
||||
result.push_back(WaypointInfo{ sceneId, waypointId, waypoint.config->fields._tranPos, (app::MapModule_ScenePointData*)&waypoint });
|
||||
@ -45,7 +45,7 @@ namespace cheat::game
|
||||
float minDistance = -1;
|
||||
WaypointInfo result{};
|
||||
for (const auto& info : GetUnlockedWaypoints(targetSceneId)) {
|
||||
float distance = app::Vector3_Distance(nullptr, position, info.position, nullptr);
|
||||
float distance = app::Vector3_Distance(position, info.position, nullptr);
|
||||
if (minDistance < 0 || distance < minDistance)
|
||||
{
|
||||
minDistance = distance;
|
||||
@ -57,7 +57,7 @@ namespace cheat::game
|
||||
|
||||
uint32_t GetCurrentPlayerSceneID()
|
||||
{
|
||||
auto playerModule = GET_SINGLETON(PlayerModule);
|
||||
auto playerModule = GET_SINGLETON(MoleMole_PlayerModule);
|
||||
if (playerModule == nullptr)
|
||||
return 0;
|
||||
|
||||
@ -66,7 +66,7 @@ namespace cheat::game
|
||||
|
||||
uint32_t GetCurrentMapSceneID()
|
||||
{
|
||||
auto mapManager = GET_SINGLETON(MapManager);
|
||||
auto mapManager = GET_SINGLETON(MoleMole_MapManager);
|
||||
if (mapManager == nullptr)
|
||||
return 0;
|
||||
|
||||
@ -118,7 +118,7 @@ namespace cheat::game
|
||||
|
||||
app::AccountDataItem* GetAccountData()
|
||||
{
|
||||
auto playerModule = GET_SINGLETON(PlayerModule);
|
||||
auto playerModule = GET_SINGLETON(MoleMole_PlayerModule);
|
||||
if (playerModule == nullptr || playerModule->fields._accountData_k__BackingField == nullptr)
|
||||
return nullptr;
|
||||
|
||||
|
@ -97,9 +97,9 @@ namespace cheat::feature
|
||||
|
||||
// Hooking
|
||||
HookManager::install(app::MonoMiniMap_Update, InteractiveMap::MonoMiniMap_Update_Hook);
|
||||
HookManager::install(app::GadgetModule_OnGadgetInteractRsp, InteractiveMap::GadgetModule_OnGadgetInteractRsp_Hook);
|
||||
HookManager::install(app::InLevelMapPageContext_UpdateView, InteractiveMap::InLevelMapPageContext_UpdateView_Hook);
|
||||
HookManager::install(app::InLevelMapPageContext_ZoomMap, InteractiveMap::InLevelMapPageContext_ZoomMap_Hook);
|
||||
HookManager::install(app::MoleMole_GadgetModule_OnGadgetInteractRsp, InteractiveMap::GadgetModule_OnGadgetInteractRsp_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelMapPageContext_UpdateView, InteractiveMap::InLevelMapPageContext_UpdateView_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelMapPageContext_ZoomMap, InteractiveMap::InLevelMapPageContext_ZoomMap_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& InteractiveMap::GetGUIInfo() const
|
||||
@ -483,7 +483,7 @@ namespace cheat::feature
|
||||
if (nearestLabelPoint == nullptr)
|
||||
continue;
|
||||
|
||||
float distance = app::Vector2_Distance(nullptr, levelPosition, nearestLabelPoint->levelPosition, nullptr);
|
||||
float distance = app::Vector2_Distance(levelPosition, nearestLabelPoint->levelPosition, nullptr);
|
||||
if (distance < minDistance || minDistancePoint == nullptr)
|
||||
{
|
||||
minDistance = distance;
|
||||
@ -506,7 +506,7 @@ namespace cheat::feature
|
||||
if (!completed && point.completed)
|
||||
continue;
|
||||
|
||||
float distance = app::Vector2_Distance(nullptr, levelPosition, point.levelPosition, nullptr);
|
||||
float distance = app::Vector2_Distance(levelPosition, point.levelPosition, nullptr);
|
||||
if (distance < minDistance || minDistancePoint == nullptr)
|
||||
{
|
||||
minDistance = distance;
|
||||
@ -1274,11 +1274,11 @@ namespace cheat::feature
|
||||
|
||||
static bool IsMapActive()
|
||||
{
|
||||
auto uimanager = GET_SINGLETON(UIManager_1);
|
||||
auto uimanager = GET_SINGLETON(MoleMole_UIManager);
|
||||
if (uimanager == nullptr)
|
||||
return false;
|
||||
|
||||
return app::UIManager_1_HasEnableMapCamera(uimanager, nullptr);
|
||||
return app::MoleMole_UIManager_HasEnableMapCamera(uimanager, nullptr);
|
||||
}
|
||||
|
||||
static app::Rect s_MapViewRect = { 0, 0, 1, 1 };
|
||||
@ -1300,8 +1300,8 @@ namespace cheat::feature
|
||||
screenPosition.y = (levelPosition.y - s_MapViewRect.m_YMin) / s_MapViewRect.m_Height;
|
||||
|
||||
// Scaling to screen position
|
||||
screenPosition.x = screenPosition.x * app::Screen_get_width(nullptr, nullptr);
|
||||
screenPosition.y = (1.0f - screenPosition.y) * app::Screen_get_height(nullptr, nullptr);
|
||||
screenPosition.x = screenPosition.x * app::Screen_get_width(nullptr);
|
||||
screenPosition.y = (1.0f - screenPosition.y) * app::Screen_get_height(nullptr);
|
||||
|
||||
return screenPosition;
|
||||
}
|
||||
@ -1382,7 +1382,7 @@ namespace cheat::feature
|
||||
if (!mapActive)
|
||||
return;
|
||||
|
||||
auto mapManager = GET_SINGLETON(MapManager);
|
||||
auto mapManager = GET_SINGLETON(MoleMole_MapManager);
|
||||
if (mapManager == nullptr)
|
||||
return;
|
||||
|
||||
@ -1491,8 +1491,8 @@ namespace cheat::feature
|
||||
if (m_ScenesData.count(sceneID) == 0)
|
||||
return;
|
||||
|
||||
ImVec2 screenSize = { static_cast<float>(app::Screen_get_width(nullptr, nullptr)),
|
||||
static_cast<float>(app::Screen_get_height(nullptr, nullptr)) };
|
||||
ImVec2 screenSize = { static_cast<float>(app::Screen_get_width(nullptr)),
|
||||
static_cast<float>(app::Screen_get_height(nullptr)) };
|
||||
|
||||
|
||||
auto iconSize = (f_DynamicSize && s_MapViewRect.m_Width != 0.0f) ? f_IconSize * (relativeSizeX / s_MapViewRect.m_Width) : f_IconSize;
|
||||
@ -1549,7 +1549,7 @@ namespace cheat::feature
|
||||
|
||||
UPDATE_DELAY_VAR(ImCircle, _miniMapCircle, 2000);
|
||||
|
||||
auto uiManager = GET_SINGLETON(UIManager_1);
|
||||
auto uiManager = GET_SINGLETON(MoleMole_UIManager);
|
||||
if (uiManager == nullptr || uiManager->fields._sceneCanvas == nullptr)
|
||||
return {};
|
||||
|
||||
@ -1559,7 +1559,7 @@ namespace cheat::feature
|
||||
|
||||
auto mapPos = app::Transform_get_position(reinterpret_cast<app::Transform*>(back), nullptr);
|
||||
auto center = app::Camera_WorldToScreenPoint(uiManager->fields._uiCamera, mapPos, nullptr);
|
||||
center.y = app::Screen_get_height(nullptr, nullptr) - center.y;
|
||||
center.y = app::Screen_get_height(nullptr) - center.y;
|
||||
|
||||
auto mapRect = app::RectTransform_get_rect(back, nullptr);
|
||||
float scaleFactor = app::Canvas_get_scaleFactor(uiManager->fields._sceneCanvas, nullptr);
|
||||
@ -1576,7 +1576,7 @@ namespace cheat::feature
|
||||
if (_monoMiniMap == nullptr || _monoMiniMap->fields.context == nullptr)
|
||||
return 1.0f;
|
||||
|
||||
return app::InLevelMainPageContext_get_miniMapScale(_monoMiniMap->fields.context, nullptr);
|
||||
return app::MoleMole_InLevelMainPageContext_get_miniMapScale(_monoMiniMap->fields.context, nullptr);
|
||||
}
|
||||
|
||||
static float GetMinimapRotation()
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <imgui_internal.h>
|
||||
|
||||
// This module is for debug purpose, and... well.. it's shit coded ^)
|
||||
namespace cheat::feature
|
||||
namespace cheat::feature
|
||||
{
|
||||
|
||||
static bool ActorAbilityPlugin_OnEvent_Hook(void* __this, app::BaseEvent* e, MethodInfo* method);
|
||||
@ -25,35 +25,35 @@ namespace cheat::feature
|
||||
static bool csvFriendly = true;
|
||||
static bool includeHeaders = true;
|
||||
|
||||
Debug::Debug() : Feature()
|
||||
{
|
||||
Debug::Debug() : Feature()
|
||||
{
|
||||
events::GameUpdateEvent += FUNCTION_HANDLER(OnGameUpdate);
|
||||
HookManager::install(app::ActorAbilityPlugin_OnEvent, ActorAbilityPlugin_OnEvent_Hook);
|
||||
// HookManager::install(app::LuaShellManager_ReportLuaShellResult, LuaShellManager_ReportLuaShellResult_Hook);
|
||||
// HookManager::install(app::LuaShellManager_DoString, LuaShellManager_DoString_Hook);
|
||||
// HookManager::install(app::LuaEnv_DoString, LuaEnv_DoString_Hook);
|
||||
// HookManager::install(app::Lua_xlua_pushasciistring, Lua_xlua_pushasciistring_Hook);
|
||||
HookManager::install(app::MoleMole_ActorAbilityPlugin_OnEvent, ActorAbilityPlugin_OnEvent_Hook);
|
||||
// HookManager::install(app::MoleMole_LuaShellManager_ReportLuaShellResult, LuaShellManager_ReportLuaShellResult_Hook);
|
||||
// HookManager::install(app::MoleMole_LuaShellManager_DoString, LuaShellManager_DoString_Hook);
|
||||
// HookManager::install(app::LuaEnv_DoString, LuaEnv_DoString_Hook);
|
||||
// HookManager::install(app::Lua_xlua_pushasciistring, Lua_xlua_pushasciistring_Hook);
|
||||
|
||||
// HookManager::install(app::GameLogin_SendInfo_2, SendInfo_Hook);
|
||||
// LOG_DEBUG("Hooked GameLogin::SendGameInfo. Origin at 0x%p", HookManager::getOrigin(SendInfo_Hook));
|
||||
}
|
||||
// HookManager::install(app::GameLogin_SendInfo_2, SendInfo_Hook);
|
||||
// LOG_DEBUG("Hooked GameLogin::SendGameInfo. Origin at 0x%p", HookManager::getOrigin(SendInfo_Hook));
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& Debug::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "DebugInfo", "Debug", false };
|
||||
return info;
|
||||
}
|
||||
const FeatureGUIInfo& Debug::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "DebugInfo", "Debug", false };
|
||||
return info;
|
||||
}
|
||||
|
||||
Debug& Debug::GetInstance()
|
||||
{
|
||||
static Debug instance;
|
||||
return instance;
|
||||
}
|
||||
Debug& Debug::GetInstance()
|
||||
{
|
||||
static Debug instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
// Raise when player start game log in (after press a door)
|
||||
// Contains information about player system and game integrity
|
||||
static void SendInfo_Hook(app::NetworkManager_1* __this, app::GKOJAICIOPA* info, MethodInfo* method)
|
||||
static void SendInfo_Hook(app::MoleMole_NetworkManager* __this, app::GKOJAICIOPA* info, MethodInfo* method)
|
||||
{
|
||||
LOG_TRACE("Game sending game info to server.");
|
||||
LOG_TRACE("Content: ");
|
||||
@ -128,7 +128,7 @@ namespace cheat::feature
|
||||
return;
|
||||
}
|
||||
|
||||
auto singleton = GET_SINGLETON(MBHLOBDPKEC);
|
||||
auto singleton = GET_SINGLETON(MoleMole_MapModule);
|
||||
|
||||
for (const auto& [sceneId, waypoints] : waypointsGrops->pairs())
|
||||
{
|
||||
@ -152,9 +152,9 @@ namespace cheat::feature
|
||||
ImGui::Text("Object position: %s", il2cppi_to_string(location._pos).c_str());
|
||||
ImGui::Text("_unlocked: %s", location._unlocked ? "true" : "false");
|
||||
ImGui::Text("_groupLimit: %s", location._groupLimit ? "true" : "false");
|
||||
uint16_t areaId = app::SimpleSafeUInt16_get_Value(nullptr, location.areaIdRawNum, nullptr);
|
||||
uint16_t areaId = app::MoleMole_SimpleSafeUInt16_get_Value(location.areaIdRawNum, nullptr);
|
||||
ImGui::Text("areaId: %u", areaId);
|
||||
ImGui::Text("areaUnlocked: %s", app::MapModule_IsAreaUnlock(singleton, sceneId, areaId, nullptr) ? "true" : "false");
|
||||
ImGui::Text("areaUnlocked: %s", app::MoleMole_MapModule_IsAreaUnlock(singleton, sceneId, areaId, nullptr) ? "true" : "false");
|
||||
ImGui::Text("gadgetIdRawNum: %u", location.gadgetIdRawNum);
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ namespace cheat::feature
|
||||
|
||||
void DrawManagerData()
|
||||
{
|
||||
auto singleton = GET_SINGLETON(MBHLOBDPKEC);
|
||||
auto singleton = GET_SINGLETON(MoleMole_MapModule);
|
||||
if (singleton == nullptr)
|
||||
{
|
||||
ImGui::Text("Manager not initialized.");
|
||||
@ -236,10 +236,10 @@ namespace cheat::feature
|
||||
auto combat = entity->combat();
|
||||
if (combat != nullptr) {
|
||||
auto combatProp = combat->fields._combatProperty_k__BackingField;
|
||||
auto maxHP = app::SafeFloat_GetValue(nullptr, combatProp->fields.maxHP, nullptr);
|
||||
auto HP = app::SafeFloat_GetValue(nullptr, combatProp->fields.HP, nullptr);
|
||||
auto isLockHp = combatProp->fields.islockHP == nullptr || app::FixedBoolStack_get_value(combatProp->fields.islockHP, nullptr);
|
||||
auto isInvincible = combatProp->fields.isInvincible == nullptr || app::FixedBoolStack_get_value(combatProp->fields.isInvincible, nullptr);
|
||||
auto maxHP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.maxHP, nullptr);
|
||||
auto HP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.HP, nullptr);
|
||||
auto isLockHp = combatProp->fields.islockHP == nullptr || app::MoleMole_FixedBoolStack_get_value(combatProp->fields.islockHP, nullptr);
|
||||
auto isInvincible = combatProp->fields.isInvincible == nullptr || app::MoleMole_FixedBoolStack_get_value(combatProp->fields.isInvincible, nullptr);
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Combat: %s", combat == nullptr ? "No" : "Yes");
|
||||
ImGui::Text("Combat Prop: %s", combatProp == nullptr ? "No" : "Yes");
|
||||
@ -336,16 +336,16 @@ namespace cheat::feature
|
||||
// many cases we want to keep supporting. Ternary is cleaner, but not a big
|
||||
// performance hit if we keep a switch statement.
|
||||
switch (condition) {
|
||||
case Debug::TeleportCondition::Closest: {
|
||||
// We've already selected this.
|
||||
break;
|
||||
}
|
||||
case Debug::TeleportCondition::Farthest: {
|
||||
target = sortedEntities.back();
|
||||
break;
|
||||
}
|
||||
case Debug::TeleportCondition::Closest: {
|
||||
// We've already selected this.
|
||||
break;
|
||||
}
|
||||
|
||||
case Debug::TeleportCondition::Farthest: {
|
||||
target = sortedEntities.back();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Separating this logic to keep it clean and consistent.
|
||||
if (target != nullptr)
|
||||
{
|
||||
@ -500,7 +500,7 @@ namespace cheat::feature
|
||||
static bool checkOnlyShells = false;
|
||||
static bool showEmptyTypes = false;
|
||||
static Debug::EntitySortCondition sortCondition = Debug::EntitySortCondition::Distance;
|
||||
static ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_FittingPolicyScroll |
|
||||
static ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_Reorderable | ImGuiTabBarFlags_FittingPolicyScroll |
|
||||
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton | ImGuiTabBarFlags_TabListPopupButton;
|
||||
|
||||
auto& manager = game::EntityManager::instance();
|
||||
@ -529,7 +529,7 @@ namespace cheat::feature
|
||||
ImGui::Checkbox("Filter by Radius", &useRadius);
|
||||
if (!useRadius)
|
||||
ImGui::BeginDisabled();
|
||||
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(200.0);
|
||||
ImGui::SliderFloat("Radius", &radius, 0.0f, 100.0f);
|
||||
@ -767,23 +767,23 @@ namespace cheat::feature
|
||||
|
||||
void DrawPositionInfo()
|
||||
{
|
||||
auto avatarPos = app::ActorUtils_GetAvatarPos(nullptr, nullptr);
|
||||
auto avatarPos = app::ActorUtils_GetAvatarPos(nullptr);
|
||||
ImGui::Text("Avatar position: %s", il2cppi_to_string(avatarPos).c_str());
|
||||
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(nullptr, avatarPos, nullptr);
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(avatarPos, nullptr);
|
||||
ImGui::Text("Relative position: %s", il2cppi_to_string(relativePos).c_str());
|
||||
|
||||
auto levelPos = app::Miscs_GenLevelPos_1(nullptr, avatarPos, nullptr);
|
||||
auto levelPos = app::Miscs_GenLevelPos_1(avatarPos, nullptr);
|
||||
ImGui::Text("Level position: %s", il2cppi_to_string(levelPos).c_str());
|
||||
|
||||
|
||||
static app::Vector3 teleportPos = {};
|
||||
ImGui::InputFloat3("Teleport position", reinterpret_cast<float*>(&teleportPos));
|
||||
|
||||
|
||||
auto& teleport = MapTeleport::GetInstance();
|
||||
if (ImGui::Button("Map teleport"))
|
||||
teleport.TeleportTo(app::Vector2 { teleportPos.x, teleportPos.y });
|
||||
|
||||
teleport.TeleportTo(app::Vector2{ teleportPos.x, teleportPos.y });
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("World teleport"))
|
||||
@ -791,7 +791,7 @@ namespace cheat::feature
|
||||
|
||||
if (ImGui::TreeNode("Ground pos info"))
|
||||
{
|
||||
auto groundNormal = app::Miscs_CalcCurrentGroundNorm(nullptr, avatarPos, nullptr);
|
||||
auto groundNormal = app::Miscs_CalcCurrentGroundNorm(avatarPos, nullptr);
|
||||
ImGui::Text("Ground normal: %s", il2cppi_to_string(groundNormal).c_str());
|
||||
|
||||
static app::Vector3 pos{};
|
||||
@ -807,7 +807,7 @@ namespace cheat::feature
|
||||
static float length = 1000;
|
||||
ImGui::DragFloat("Raycast length", &length, 1.0f, -2000.0f, 2000.0f);
|
||||
|
||||
ImGui::Text("All: %f", app::Miscs_CalcCurrentGroundHeight_1(nullptr, avatarPos.x, avatarPos.z, avatarPos.y, length, 0xFFFFFFFF, nullptr));
|
||||
ImGui::Text("All: %f", app::Miscs_CalcCurrentGroundHeight_1(avatarPos.x, avatarPos.z, avatarPos.y, length, 0xFFFFFFFF, nullptr));
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
@ -819,7 +819,7 @@ namespace cheat::feature
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Copy All Info"))
|
||||
{
|
||||
auto text = il2cppi_to_string(avatarPos) + "\n" + il2cppi_to_string(relativePos) + "\n" + il2cppi_to_string(levelPos) + "\n" + il2cppi_to_string(app::Miscs_CalcCurrentGroundNorm(nullptr, avatarPos, nullptr));
|
||||
auto text = il2cppi_to_string(avatarPos) + "\n" + il2cppi_to_string(relativePos) + "\n" + il2cppi_to_string(levelPos) + "\n" + il2cppi_to_string(app::Miscs_CalcCurrentGroundNorm(avatarPos, nullptr));
|
||||
ImGui::SetClipboardText(text.c_str());
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -833,7 +833,7 @@ namespace cheat::feature
|
||||
for (int i = 0; i < 10; i++)
|
||||
name += std::to_string(rand() % 10);
|
||||
text = "\"name\":\"" + name + "\"," + text;
|
||||
text = "{" + text + "}";
|
||||
text = "{" + text + "}";
|
||||
ImGui::SetClipboardText(text.c_str());
|
||||
}
|
||||
|
||||
@ -841,27 +841,27 @@ namespace cheat::feature
|
||||
|
||||
void DrawMapManager()
|
||||
{
|
||||
auto mapManager = GET_SINGLETON(MapManager);
|
||||
auto mapManager = GET_SINGLETON(MoleMole_MapManager);
|
||||
if (mapManager == nullptr)
|
||||
return;
|
||||
|
||||
int temp = mapManager->fields.playerSceneID;
|
||||
ImGui::InputInt("Player scene id", &temp);
|
||||
|
||||
temp = mapManager->fields.mapSceneID;
|
||||
ImGui::InputInt("Map scene id", &temp);
|
||||
temp = mapManager->fields.mapSceneID;
|
||||
ImGui::InputInt("Map scene id", &temp);
|
||||
}
|
||||
|
||||
void DrawImGuiFocusTest()
|
||||
{
|
||||
ImGui::Text("Is any item active: %s", ImGui::IsAnyItemActive() ? "true" : "false");
|
||||
ImGui::Text("Is any item focused: %s", ImGui::IsAnyItemFocused() ? "true" : "false");
|
||||
ImGui::Text("Is any item active: %s", ImGui::IsAnyItemActive() ? "true" : "false");
|
||||
ImGui::Text("Is any item focused: %s", ImGui::IsAnyItemFocused() ? "true" : "false");
|
||||
|
||||
ImGui::Button("Test");
|
||||
auto hk = Hotkey();
|
||||
int temp = 0;
|
||||
InputHotkey("Test hotkey", &hk, false);
|
||||
ImGui::InputInt("Test input", &temp);
|
||||
ImGui::Button("Test");
|
||||
auto hk = Hotkey();
|
||||
int temp = 0;
|
||||
InputHotkey("Test hotkey", &hk, false);
|
||||
ImGui::InputInt("Test input", &temp);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> chestNames;
|
||||
@ -908,7 +908,7 @@ namespace cheat::feature
|
||||
app::GadgetState__Enum chestState = static_cast<app::GadgetState__Enum>(ownerData.gadgetState);
|
||||
ImGui::Text("Is ability locked: %s", pluginData._isLockByAbility ? "true" : "false");
|
||||
ImGui::Text("State: %s", magic_enum::enum_name(chestState).data());
|
||||
|
||||
|
||||
bool added = chestNames.count(entityName) > 0;
|
||||
|
||||
if (tempNames.count(entityName) == 0)
|
||||
@ -947,12 +947,12 @@ namespace cheat::feature
|
||||
ImGui::InputTextMultiline("Dict", &textStr);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DrawScenePropManager()
|
||||
{
|
||||
auto scenePropManager = GET_SINGLETON(ScenePropManager);
|
||||
auto scenePropManager = GET_SINGLETON(MoleMole_ScenePropManager);
|
||||
if (scenePropManager == nullptr)
|
||||
{
|
||||
ImGui::Text("Scene prop manager not loaded.");
|
||||
@ -967,7 +967,7 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
ImGui::Text("Prop count: %d", scenePropDict->count);
|
||||
|
||||
|
||||
auto& manager = game::EntityManager::instance();
|
||||
for (auto& [id, propObject] : scenePropDict->pairs())
|
||||
{
|
||||
@ -979,20 +979,20 @@ namespace cheat::feature
|
||||
auto config = tree->fields._config->fields;
|
||||
|
||||
auto pattern = config._._.scenePropPatternName;
|
||||
app::ECGLPBEEEAA__Enum value;
|
||||
bool result = app::ScenePropManager_GetTreeTypeByPattern(scenePropManager, pattern, &value, nullptr);
|
||||
app::MoleMole_Config_TreeType__Enum value;
|
||||
bool result = app::MoleMole_ScenePropManager_GetTreeTypeByPattern(scenePropManager, pattern, &value, nullptr);
|
||||
if (!result)
|
||||
continue;
|
||||
|
||||
ImGui::Text("Tree at %s, type: %s, distance %0.3f", il2cppi_to_string(pos).c_str(), magic_enum::enum_name(value).data(),
|
||||
manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(nullptr, pos, nullptr)));
|
||||
manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(pos, nullptr)));
|
||||
}
|
||||
}
|
||||
|
||||
class ItemFilter : game::IEntityFilter
|
||||
{
|
||||
public:
|
||||
ItemFilter() : ItemFilter(app::EntityType__Enum_1::None, "")
|
||||
ItemFilter() : ItemFilter(app::EntityType__Enum_1::None, "")
|
||||
{}
|
||||
|
||||
ItemFilter(app::EntityType__Enum_1 type, const std::string& name) : m_Type(type), m_Name(name)
|
||||
@ -1033,18 +1033,18 @@ namespace cheat::feature
|
||||
|
||||
nlohmann::json jRoot;
|
||||
try {
|
||||
jRoot =nlohmann::json::parse(fs);
|
||||
jRoot = nlohmann::json::parse(fs);
|
||||
}
|
||||
catch (nlohmann::detail::parse_error& parseError)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(parseError);
|
||||
LOG_ERROR("Failed to parse json");
|
||||
}
|
||||
|
||||
|
||||
for (auto& [key, value] : jRoot["filters"].items())
|
||||
simpleFilters[key] = ItemFilter(value["type"], value["name"]);
|
||||
|
||||
for (auto& value : jRoot["excluded"])
|
||||
for (auto& value : jRoot["excluded"])
|
||||
removedItems.push_back(ItemFilter(value["type"], value["name"]));
|
||||
}
|
||||
|
||||
@ -1098,20 +1098,20 @@ namespace cheat::feature
|
||||
ImGui::InputText("## Name", &keyText);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::InputText("## ItemName", &filter.m_Name);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::InputText("## ItemName", &filter.m_Name);
|
||||
ImGui::SameLine();
|
||||
|
||||
std::string typeName = std::string(magic_enum::enum_name(filter.m_Type));
|
||||
ImGui::InputText("## ItemType", &typeName);
|
||||
ImGui::InputText("## ItemType", &typeName);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::PopID();
|
||||
}
|
||||
}
|
||||
|
||||
void Debug::DrawExternal()
|
||||
{
|
||||
//auto draw = ImGui::GetBackgroundDrawList();
|
||||
void Debug::DrawExternal()
|
||||
{
|
||||
//auto draw = ImGui::GetBackgroundDrawList();
|
||||
|
||||
//std::string fpsString = fmt::format("{:.1f}/{:.1f}", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
|
||||
//draw->AddText(ImVec2(100, 100), ImColor(0, 0, 0), fpsString.c_str());
|
||||
@ -1136,14 +1136,14 @@ namespace cheat::feature
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& filter : removedItems)
|
||||
{
|
||||
if (executor.ApplyFilter(entity, reinterpret_cast<game::IEntityFilter*>(&filter)))
|
||||
{
|
||||
unexplored = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (auto& filter : removedItems)
|
||||
{
|
||||
if (executor.ApplyFilter(entity, reinterpret_cast<game::IEntityFilter*>(&filter)))
|
||||
{
|
||||
unexplored = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!unexplored)
|
||||
continue;
|
||||
@ -1169,11 +1169,11 @@ namespace cheat::feature
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
else if (selectedEntity != nullptr && ImGui::IsKeyPressed(ImGuiKey_R, false))
|
||||
{
|
||||
removedItems.push_back(ItemFilter(selectedEntity->type(), selectedEntity->name()));
|
||||
updated = true;
|
||||
}
|
||||
else if (selectedEntity != nullptr && ImGui::IsKeyPressed(ImGuiKey_R, false))
|
||||
{
|
||||
removedItems.push_back(ItemFilter(selectedEntity->type(), selectedEntity->name()));
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (selectedEntity != nullptr && ImGui::IsKeyPressed(ImGuiKey_T, false))
|
||||
{
|
||||
@ -1189,8 +1189,8 @@ namespace cheat::feature
|
||||
ImGui::Begin("Input name", nullptr, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::PushItemWidth(500);
|
||||
ImGui::InputText("Section", &tempSectionName);
|
||||
if (!ImGui::IsAnyItemActive() && !ImGui::IsMouseClicked(0))
|
||||
ImGui::SetKeyboardFocusHere(0);
|
||||
if (!ImGui::IsAnyItemActive() && !ImGui::IsMouseClicked(0))
|
||||
ImGui::SetKeyboardFocusHere(0);
|
||||
ImGui::InputText("Name", &tempName);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::End();
|
||||
@ -1203,21 +1203,21 @@ namespace cheat::feature
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape, false))
|
||||
{
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape, false))
|
||||
{
|
||||
renderer::SetInputLock(this, false);
|
||||
addingFilter = false;
|
||||
}
|
||||
addingFilter = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (updated)
|
||||
FiltetItemPickerSave();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DrawFPSGraph()
|
||||
{
|
||||
static float values[120] = {0};
|
||||
static float values[120] = { 0 };
|
||||
static int values_offset = 0;
|
||||
values[values_offset++] = ImGui::GetIO().Framerate;
|
||||
if (values_offset >= IM_ARRAYSIZE(values))
|
||||
@ -1232,43 +1232,43 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
void Debug::DrawMain()
|
||||
{
|
||||
if (ImGui::CollapsingHeader("Entity Manager", ImGuiTreeNodeFlags_None))
|
||||
DrawEntitiesData();
|
||||
{
|
||||
if (ImGui::CollapsingHeader("Entity Manager", ImGuiTreeNodeFlags_None))
|
||||
DrawEntitiesData();
|
||||
|
||||
if (ImGui::CollapsingHeader("Position", ImGuiTreeNodeFlags_None))
|
||||
{
|
||||
DrawMapManager();
|
||||
DrawPositionInfo();
|
||||
}
|
||||
if (ImGui::CollapsingHeader("Position", ImGuiTreeNodeFlags_None))
|
||||
{
|
||||
DrawMapManager();
|
||||
DrawPositionInfo();
|
||||
}
|
||||
|
||||
//if (ImGui::CollapsingHeader("Filter item picker"))
|
||||
// DrawFilterItemPicker();
|
||||
|
||||
//if (ImGui::CollapsingHeader("Chest plugin", ImGuiTreeNodeFlags_None))
|
||||
// DrawChestPlugin();
|
||||
//if (ImGui::CollapsingHeader("Chest plugin", ImGuiTreeNodeFlags_None))
|
||||
// DrawChestPlugin();
|
||||
|
||||
//if (ImGui::CollapsingHeader("Interaction manager", ImGuiTreeNodeFlags_None))
|
||||
// DrawInteractionManagerInfo();
|
||||
//if (ImGui::CollapsingHeader("Interaction manager", ImGuiTreeNodeFlags_None))
|
||||
// DrawInteractionManagerInfo();
|
||||
|
||||
if (ImGui::CollapsingHeader("Map Manager", ImGuiTreeNodeFlags_None))
|
||||
DrawManagerData();
|
||||
if (ImGui::CollapsingHeader("Map Manager", ImGuiTreeNodeFlags_None))
|
||||
DrawManagerData();
|
||||
if (ImGui::CollapsingHeader("FPS Graph", ImGuiTreeNodeFlags_None))
|
||||
DrawFPSGraph();
|
||||
}
|
||||
}
|
||||
|
||||
bool Debug::NeedInfoDraw() const
|
||||
{
|
||||
bool Debug::NeedInfoDraw() const
|
||||
{
|
||||
return showNotWritten && notWrittenChests.size() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Debug::DrawInfo()
|
||||
{
|
||||
void Debug::DrawInfo()
|
||||
{
|
||||
for (auto& name : notWrittenChests)
|
||||
{
|
||||
ImGui::Text("%s", name.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace cheat::feature
|
||||
{
|
||||
for (int i = 0; i < 4; i++) {
|
||||
LOG_TRACE("Emulating call of RecordUserData with type %d", i);
|
||||
app::Application_RecordUserData(nullptr, i, nullptr);
|
||||
app::Application_RecordUserData(i, nullptr);
|
||||
}
|
||||
|
||||
// if (m_Enabled) {
|
||||
|
@ -24,8 +24,8 @@ namespace cheat::feature
|
||||
{
|
||||
sniffer::MessageManager::Connect("genshin_packet_pipe");
|
||||
|
||||
HookManager::install(app::KcpNative_kcp_client_send_packet, KcpNative_kcp_client_send_packet_Hook);
|
||||
HookManager::install(app::KcpClient_TryDequeueEvent, KcpClient_TryDequeueEvent_Hook);
|
||||
HookManager::install(app::Kcp_KcpNative_kcp_client_send_packet, KcpNative_kcp_client_send_packet_Hook);
|
||||
HookManager::install(app::MoleMole_KcpClient_TryDequeueEvent, KcpClient_TryDequeueEvent_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& PacketSniffer::GetGUIInfo() const
|
||||
@ -183,7 +183,7 @@ namespace cheat::feature
|
||||
byteArray->max_length = length;
|
||||
memcpy_s(byteArray->vector, length, content, length);
|
||||
|
||||
app::Packet_XorEncrypt(nullptr, &byteArray, length, nullptr);
|
||||
app::MoleMole_Packet_XorEncrypt(&byteArray, length, nullptr);
|
||||
|
||||
auto result = new char[length];
|
||||
memcpy_s(result, length, byteArray->vector, length);
|
||||
@ -249,13 +249,13 @@ namespace cheat::feature
|
||||
return sniffer.OnPacketIO(evt->_evt.packet, PacketIOType::Receive);
|
||||
}
|
||||
|
||||
int32_t PacketSniffer::KcpNative_kcp_client_send_packet_Hook(void* __this, void* kcp_client, app::KcpPacket_1* packet, MethodInfo* method)
|
||||
int32_t PacketSniffer::KcpNative_kcp_client_send_packet_Hook(void* kcp_client, app::KcpPacket_1* packet, MethodInfo* method)
|
||||
{
|
||||
auto& sniffer = GetInstance();
|
||||
if (!sniffer.OnPacketIO(packet, PacketIOType::Send))
|
||||
return 0;
|
||||
|
||||
return CALL_ORIGIN(KcpNative_kcp_client_send_packet_Hook, __this, kcp_client, packet, method);
|
||||
return CALL_ORIGIN(KcpNative_kcp_client_send_packet_Hook, kcp_client, packet, method);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace cheat::feature
|
||||
|
||||
static char* EncryptXor(void* content, uint32_t length);
|
||||
static bool KcpClient_TryDequeueEvent_Hook(void* __this, app::ClientKcpEvent* evt, MethodInfo* method);
|
||||
static int32_t KcpNative_kcp_client_send_packet_Hook(void* __this, void* kcp_client, app::KcpPacket_1* packet, MethodInfo* method);
|
||||
static int32_t KcpNative_kcp_client_send_packet_Hook(void* kcp_client, app::KcpPacket_1* packet, MethodInfo* method);
|
||||
|
||||
bool OnPacketIO(app::KcpPacket_1* packet, PacketIOType type);
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ namespace cheat::feature
|
||||
GodMode::GodMode() : Feature(),
|
||||
NFEX(f_Enabled, "God mode", "m_GodMode", "Player", false, false)
|
||||
{
|
||||
// HookManager::install(app::LCBaseCombat_FireBeingHitEvent, LCBaseCombat_FireBeingHitEvent_Hook);
|
||||
// HookManager::install(app::MoleMole_LCBaseCombat_FireBeingHitEvent, LCBaseCombat_FireBeingHitEvent_Hook);
|
||||
HookManager::install(app::VCHumanoidMove_NotifyLandVelocity, VCHumanoidMove_NotifyLandVelocity_Hook);
|
||||
HookManager::install(app::Miscs_CheckTargetAttackable, Miscs_CheckTargetAttackable_Hook);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace cheat::feature
|
||||
NF(f_Enabled, "Infinite stamina", "InfiniteStamina", false),
|
||||
NF(f_PacketReplacement, "Move sync packet replacement", "InfiniteStamina", false)
|
||||
{
|
||||
HookManager::install(app::DataItem_HandleNormalProp, DataItem_HandleNormalProp_Hook);
|
||||
HookManager::install(app::MoleMole_DataItem_HandleNormalProp, DataItem_HandleNormalProp_Hook);
|
||||
|
||||
events::MoveSyncEvent += MY_METHOD_HANDLER(InfiniteStamina::OnMoveSync);
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ namespace cheat::feature
|
||||
NF(f_Sprint, "No Sprint Cooldown", "NoCD", false),
|
||||
NF(f_InstantBow, "Instant bow", "NoCD", false)
|
||||
{
|
||||
HookManager::install(app::LCAvatarCombat_IsEnergyMax, LCAvatarCombat_IsEnergyMax_Hook);
|
||||
HookManager::install(app::LCAvatarCombat_IsSkillInCD_1, LCAvatarCombat_IsSkillInCD_1);
|
||||
HookManager::install(app::MoleMole_LCAvatarCombat_IsEnergyMax, LCAvatarCombat_IsEnergyMax_Hook);
|
||||
HookManager::install(app::MoleMole_LCAvatarCombat_IsSkillInCD_1, LCAvatarCombat_IsSkillInCD_1);
|
||||
|
||||
HookManager::install(app::HumanoidMoveFSM_CheckSprintCooldown, HumanoidMoveFSM_CheckSprintCooldown_Hook);
|
||||
HookManager::install(app::ActorAbilityPlugin_AddDynamicFloatWithRange, ActorAbilityPlugin_AddDynamicFloatWithRange_Hook);
|
||||
HookManager::install(app::MoleMole_HumanoidMoveFSM_CheckSprintCooldown, HumanoidMoveFSM_CheckSprintCooldown_Hook);
|
||||
HookManager::install(app::MoleMole_ActorAbilityPlugin_AddDynamicFloatWithRange, ActorAbilityPlugin_AddDynamicFloatWithRange_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& NoCD::GetGUIInfo() const
|
||||
@ -128,11 +128,11 @@ namespace cheat::feature
|
||||
NoCD& noCD = NoCD::GetInstance();
|
||||
if (noCD.f_AbilityReduce)
|
||||
{
|
||||
auto cdTimer = app::SafeFloat_GetValue(nullptr, skillInfo->fields.cdTimer, nullptr);
|
||||
auto cdTimer = app::MoleMole_SafeFloat_get_Value(skillInfo->fields.cdTimer, nullptr);
|
||||
|
||||
if (cdTimer > noCD.f_TimerReduce * 5.0f)
|
||||
{
|
||||
struct app::SafeFloat MyValueProtect = app::SafeFloat_SetValue(nullptr, noCD.f_TimerReduce * 5.0f, nullptr);
|
||||
struct app::SafeFloat MyValueProtect = app::MoleMole_SafeFloat_set_Value(noCD.f_TimerReduce * 5.0f, nullptr);
|
||||
skillInfo->fields.cdTimer = MyValueProtect;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace cheat::feature
|
||||
NF(f_AltSpeedEnabled, "Alt speed enabled", "NoClip", false),
|
||||
NF(f_AltSpeed, "Alt speed", "NoClip", 1.0f)
|
||||
{
|
||||
HookManager::install(app::HumanoidMoveFSM_LateTick, HumanoidMoveFSM_LateTick_Hook);
|
||||
HookManager::install(app::MoleMole_HumanoidMoveFSM_LateTick, HumanoidMoveFSM_LateTick_Hook);
|
||||
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(NoClip::OnGameUpdate);
|
||||
events::MoveSyncEvent += MY_METHOD_HANDLER(NoClip::OnMoveSync);
|
||||
@ -154,7 +154,7 @@ namespace cheat::feature
|
||||
if (IsVectorZero(prevPos))
|
||||
return;
|
||||
|
||||
float deltaTime = app::Time_get_deltaTime(nullptr, nullptr);
|
||||
float deltaTime = app::Time_get_deltaTime(nullptr);
|
||||
|
||||
app::Vector3 newPos = prevPos + dir * speed * deltaTime;
|
||||
if (!f_VelocityMode)
|
||||
|
@ -22,7 +22,7 @@ namespace cheat::feature
|
||||
NF(f_MultiTarget, "Multi-target", "RapidFire", false),
|
||||
NF(f_MultiTargetRadius, "Multi-target Radius", "RapidFire", 20.0f)
|
||||
{
|
||||
HookManager::install(app::LCBaseCombat_DoHitEntity, LCBaseCombat_DoHitEntity_Hook);
|
||||
HookManager::install(app::MoleMole_LCBaseCombat_DoHitEntity, LCBaseCombat_DoHitEntity_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& RapidFire::GetGUIInfo() const
|
||||
@ -121,7 +121,7 @@ namespace cheat::feature
|
||||
return f_Multiplier;
|
||||
|
||||
auto safeHP = baseCombat->fields._combatProperty_k__BackingField->fields.HP;
|
||||
auto HP = app::SafeFloat_GetValue(nullptr, safeHP, nullptr);
|
||||
auto HP = app::MoleMole_SafeFloat_get_Value(safeHP, nullptr);
|
||||
int attackCount = (int)ceil(HP / attackDamage);
|
||||
return std::clamp(attackCount, 1, 200);
|
||||
}
|
||||
@ -140,7 +140,7 @@ namespace cheat::feature
|
||||
int countOfAttacks = f_Multiplier;
|
||||
if (f_OnePunch)
|
||||
{
|
||||
app::Formula_CalcAttackResult(targetEntity, combat->fields._combatProperty_k__BackingField,
|
||||
app::MoleMole_Formula_CalcAttackResult(combat->fields._combatProperty_k__BackingField,
|
||||
baseCombat->fields._combatProperty_k__BackingField,
|
||||
attackResult, manager.avatar()->raw(), targetEntity->raw(), nullptr);
|
||||
countOfAttacks = CalcCountToKill(attackResult->fields.damage, targetID);
|
||||
@ -162,7 +162,7 @@ namespace cheat::feature
|
||||
while (entity.isGadget())
|
||||
{
|
||||
game::Entity temp = entity;
|
||||
entity = game::Entity(app::GadgetEntity_GetOwnerEntity(reinterpret_cast<app::GadgetEntity*>(entity.raw()), nullptr));
|
||||
entity = game::Entity(app::MoleMole_GadgetEntity_GetOwnerEntity(reinterpret_cast<app::GadgetEntity*>(entity.raw()), nullptr));
|
||||
if (entity.runtimeID() == avatarID)
|
||||
return true;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace cheat::feature
|
||||
static std::string teleportName;
|
||||
ImGui::InputText("Teleport name", &teleportName);
|
||||
static std::vector<std::pair<std::string, app::Vector3>> teleports;
|
||||
app::Vector3 pos = app::ActorUtils_GetAvatarPos(nullptr, nullptr);
|
||||
app::Vector3 pos = app::ActorUtils_GetAvatarPos(nullptr);
|
||||
if (ImGui::Button("Add teleport"))
|
||||
{
|
||||
// check if already added
|
||||
|
@ -6,48 +6,48 @@
|
||||
#include <cheat/game/EntityManager.h>
|
||||
#include <cheat/game/util.h>
|
||||
|
||||
namespace cheat::feature
|
||||
namespace cheat::feature
|
||||
{
|
||||
static void InLevelMapPageContext_OnMapClicked_Hook(app::InLevelMapPageContext* __this, app::Vector2 screenPos, MethodInfo* method);
|
||||
static void InLevelMapPageContext_OnMarkClicked_Hook(app::InLevelMapPageContext* __this, app::MonoMapMark* mark, MethodInfo* method);
|
||||
static app::Vector3 LocalEntityInfoData_GetTargetPos_Hook(app::LocalEntityInfoData* __this, MethodInfo* method);
|
||||
|
||||
static bool LoadingManager_NeedTransByServer_Hook(app::LoadingManager* __this, uint32_t sceneId, app::Vector3 position, MethodInfo* method);
|
||||
static void LoadingManager_PerformPlayerTransmit_Hook(app::LoadingManager* __this, app::Vector3 position, app::EnterType__Enum someEnum,
|
||||
uint32_t someUint1, app::CMHGHBNDBMG_ECPNDLCPDIE__Enum teleportType, uint32_t someUint2, MethodInfo* method);
|
||||
static void Entity_SetPosition_Hook(app::BaseEntity* __this, app::Vector3 position, bool someBool, MethodInfo* method);
|
||||
static app::Vector3 LocalEntityInfoData_get_initPos_Hook(app::LocalEntityInfoData* __this, MethodInfo* method);
|
||||
|
||||
MapTeleport::MapTeleport() : Feature(),
|
||||
NF(f_Enabled, "Map teleport", "MapTeleport", false),
|
||||
static bool LoadingManager_NeedTransByServer_Hook(app::MoleMole_LoadingManager* __this, uint32_t sceneId, app::Vector3 position, MethodInfo* method);
|
||||
static void LoadingManager_PerformPlayerTransmit_Hook(app::MoleMole_LoadingManager* __this, app::Vector3 position, app::EnterType__Enum someEnum,
|
||||
uint32_t someUint1, app::EvtTransmitAvatar_EvtTransmitAvatar_TransmitType__Enum teleportType, uint32_t someUint2, MethodInfo* method);
|
||||
static void Entity_SetRelativePosition_Hook(app::BaseEntity* __this, app::Vector3 position, bool someBool, MethodInfo* method);
|
||||
|
||||
MapTeleport::MapTeleport() : Feature(),
|
||||
NF(f_Enabled, "Map teleport", "MapTeleport", false),
|
||||
NF(f_DetectHeight, "Auto height detect", "MapTeleport", true),
|
||||
NF(f_DefaultHeight, "Default teleport height", "MapTeleport", 300.0f),
|
||||
NF(f_Key, "Teleport key", "MapTeleport", Hotkey('T'))
|
||||
{
|
||||
{
|
||||
// Map touch
|
||||
HookManager::install(app::InLevelMapPageContext_OnMarkClicked, InLevelMapPageContext_OnMarkClicked_Hook);
|
||||
HookManager::install(app::InLevelMapPageContext_OnMapClicked, InLevelMapPageContext_OnMapClicked_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelMapPageContext_OnMarkClicked, InLevelMapPageContext_OnMarkClicked_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelMapPageContext_OnMapClicked, InLevelMapPageContext_OnMapClicked_Hook);
|
||||
|
||||
// Stage 1
|
||||
HookManager::install(app::LocalEntityInfoData_GetTargetPos, LocalEntityInfoData_GetTargetPos_Hook);
|
||||
HookManager::install(app::LoadingManager_NeedTransByServer, LoadingManager_NeedTransByServer_Hook);
|
||||
HookManager::install(app::MoleMole_LocalEntityInfoData_get_initPos, LocalEntityInfoData_get_initPos_Hook);
|
||||
HookManager::install(app::MoleMole_LoadingManager_NeedTransByServer, LoadingManager_NeedTransByServer_Hook);
|
||||
|
||||
// Stage 2
|
||||
HookManager::install(app::LoadingManager_PerformPlayerTransmit, LoadingManager_PerformPlayerTransmit_Hook);
|
||||
HookManager::install(app::MoleMole_LoadingManager_PerformPlayerTransmit, LoadingManager_PerformPlayerTransmit_Hook);
|
||||
|
||||
// Stage 3
|
||||
HookManager::install(app::Entity_SetPosition, Entity_SetPosition_Hook);
|
||||
HookManager::install(app::MoleMole_BaseEntity_SetRelativePosition, Entity_SetRelativePosition_Hook);
|
||||
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(MapTeleport::OnGameUpdate);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& MapTeleport::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info { "Map Teleport", "Teleport", true };
|
||||
return info;
|
||||
}
|
||||
const FeatureGUIInfo& MapTeleport::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "Map Teleport", "Teleport", true };
|
||||
return info;
|
||||
}
|
||||
|
||||
void MapTeleport::DrawMain()
|
||||
{
|
||||
void MapTeleport::DrawMain()
|
||||
{
|
||||
ConfigWidget("Enabled",
|
||||
f_Enabled,
|
||||
"Enable teleport-to-mark functionality.\n" \
|
||||
@ -71,13 +71,13 @@ namespace cheat::feature
|
||||
|
||||
if (!f_Enabled)
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
}
|
||||
|
||||
MapTeleport& MapTeleport::GetInstance()
|
||||
{
|
||||
static MapTeleport instance;
|
||||
return instance;
|
||||
}
|
||||
MapTeleport& MapTeleport::GetInstance()
|
||||
{
|
||||
static MapTeleport instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
// Hook for game manager needs for starting teleport in game update thread.
|
||||
// Because, when we use Teleport call in non game thread (imgui update thread for example)
|
||||
@ -88,8 +88,8 @@ namespace cheat::feature
|
||||
if (taskInfo.waitingThread)
|
||||
{
|
||||
taskInfo.waitingThread = false;
|
||||
auto someSingleton = GET_SINGLETON(LoadingManager);
|
||||
app::LoadingManager_RequestSceneTransToPoint(someSingleton, taskInfo.sceneId, taskInfo.waypointId, nullptr, nullptr);
|
||||
auto someSingleton = GET_SINGLETON(MoleMole_LoadingManager);
|
||||
app::MoleMole_LoadingManager_RequestSceneTransToPoint(someSingleton, taskInfo.sceneId, taskInfo.waypointId, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ namespace cheat::feature
|
||||
{
|
||||
LOG_DEBUG("Stage 0. Target location at %s", il2cppi_to_string(position).c_str());
|
||||
|
||||
auto avatarPosition = app::ActorUtils_GetAvatarPos(nullptr, nullptr);
|
||||
auto avatarPosition = app::ActorUtils_GetAvatarPos(nullptr);
|
||||
auto nearestWaypoint = game::FindNearestWaypoint(position, sceneId);
|
||||
|
||||
if (nearestWaypoint.data == nullptr)
|
||||
@ -109,7 +109,7 @@ namespace cheat::feature
|
||||
}
|
||||
else
|
||||
{
|
||||
float dist = app::Vector3_Distance(nullptr, position, nearestWaypoint.position, nullptr);
|
||||
float dist = app::Vector3_Distance(position, nearestWaypoint.position, nullptr);
|
||||
LOG_DEBUG("Stage 0. Found nearest waypoint { sceneId: %d; waypointId: %d } with distance %fm.",
|
||||
nearestWaypoint.sceneId, nearestWaypoint.waypointId, dist);
|
||||
}
|
||||
@ -122,7 +122,7 @@ namespace cheat::feature
|
||||
if (!mapBackground)
|
||||
return false;
|
||||
|
||||
auto uimanager = GET_SINGLETON(UIManager_1);
|
||||
auto uimanager = GET_SINGLETON(MoleMole_UIManager);
|
||||
if (uimanager == nullptr)
|
||||
return false;
|
||||
|
||||
@ -149,10 +149,10 @@ namespace cheat::feature
|
||||
|
||||
void MapTeleport::TeleportTo(app::Vector2 mapPosition)
|
||||
{
|
||||
auto worldPosition = app::Miscs_GenWorldPos(nullptr, mapPosition, nullptr);
|
||||
auto worldPosition = app::Miscs_GenWorldPos(mapPosition, nullptr);
|
||||
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(nullptr, worldPosition, nullptr);
|
||||
auto groundHeight = app::Miscs_CalcCurrentGroundHeight(nullptr, relativePos.x, relativePos.z, nullptr);
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(worldPosition, nullptr);
|
||||
auto groundHeight = app::Miscs_CalcCurrentGroundHeight(relativePos.x, relativePos.z, nullptr);
|
||||
|
||||
TeleportTo({ worldPosition.x, groundHeight > 0 ? groundHeight + 5 : f_DefaultHeight, worldPosition.z }, true, game::GetCurrentMapSceneID());
|
||||
}
|
||||
@ -188,7 +188,7 @@ namespace cheat::feature
|
||||
// Before call, game checked if distance is near (<60) to cast near teleport.
|
||||
// But it check distance to waypoint location, given by this function.
|
||||
// So, we need to replace target position to do correct check.
|
||||
void MapTeleport::OnGetTargetPos(app::Vector3& position)
|
||||
void MapTeleport::OnGetTargetPos(app::Vector3& position)
|
||||
{
|
||||
if (taskInfo.currentStage == 3)
|
||||
{
|
||||
@ -199,7 +199,7 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
// Checking is teleport is far (>60m), if it isn't we clear stage.
|
||||
void MapTeleport::OnCheckTeleportDistance(bool needTransByServer)
|
||||
void MapTeleport::OnCheckTeleportDistance(bool needTransByServer)
|
||||
{
|
||||
if (!needTransByServer && taskInfo.currentStage == 2)
|
||||
{
|
||||
@ -210,7 +210,7 @@ namespace cheat::feature
|
||||
|
||||
// After server responded, it will give us the waypoint target location to load.
|
||||
// Change it to teleport location.
|
||||
void MapTeleport::OnPerformPlayerTransmit(app::Vector3& position)
|
||||
void MapTeleport::OnPerformPlayerTransmit(app::Vector3& position)
|
||||
{
|
||||
if (taskInfo.currentStage == 2)
|
||||
{
|
||||
@ -232,17 +232,17 @@ namespace cheat::feature
|
||||
|
||||
if (taskInfo.needHeightCalculation)
|
||||
{
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(nullptr, position, nullptr);
|
||||
auto relativePos = app::WorldShiftManager_GetRelativePosition(position, nullptr);
|
||||
float groundHeight;
|
||||
switch (taskInfo.sceneId)
|
||||
{
|
||||
// Underground mines has tunnel structure, so we need to calculate height from waypoint height to prevent tp above world.
|
||||
// Underground mines has tunnel structure, so we need to calculate height from waypoint height to prevent tp above world.
|
||||
case 6: // Underground mines scene id, if it was changed, please create issue
|
||||
groundHeight = app::Miscs_CalcCurrentGroundHeight_1(nullptr, relativePos.x, relativePos.z, originPosition.y, 100,
|
||||
app::Miscs_GetSceneGroundLayerMask(nullptr, nullptr), nullptr);
|
||||
groundHeight = app::Miscs_CalcCurrentGroundHeight_1(relativePos.x, relativePos.z, originPosition.y, 100,
|
||||
app::Miscs_GetSceneGroundLayerMask(nullptr), nullptr);
|
||||
break;
|
||||
default:
|
||||
groundHeight = app::Miscs_CalcCurrentGroundWaterHeight(nullptr, relativePos.x, relativePos.z, nullptr);
|
||||
groundHeight = app::Miscs_CalcCurrentGroundWaterHeight(relativePos.x, relativePos.z, nullptr);
|
||||
break;
|
||||
}
|
||||
if (groundHeight > 0 && position.y != groundHeight)
|
||||
@ -257,17 +257,17 @@ namespace cheat::feature
|
||||
}
|
||||
}
|
||||
|
||||
static app::Vector3 LocalEntityInfoData_GetTargetPos_Hook(app::LocalEntityInfoData* __this, MethodInfo* method)
|
||||
static app::Vector3 LocalEntityInfoData_get_initPos_Hook(app::LocalEntityInfoData* __this, MethodInfo* method)
|
||||
{
|
||||
auto result = CALL_ORIGIN(LocalEntityInfoData_GetTargetPos_Hook, __this, method);
|
||||
|
||||
auto result = CALL_ORIGIN(LocalEntityInfoData_get_initPos_Hook, __this, method);
|
||||
|
||||
MapTeleport& mapTeleport = MapTeleport::GetInstance();
|
||||
mapTeleport.OnGetTargetPos(result);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool LoadingManager_NeedTransByServer_Hook(app::LoadingManager* __this, uint32_t sceneId, app::Vector3 position, MethodInfo* method)
|
||||
static bool LoadingManager_NeedTransByServer_Hook(app::MoleMole_LoadingManager* __this, uint32_t sceneId, app::Vector3 position, MethodInfo* method)
|
||||
{
|
||||
auto result = CALL_ORIGIN(LoadingManager_NeedTransByServer_Hook, __this, sceneId, position, method);
|
||||
|
||||
@ -278,8 +278,8 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
|
||||
static void LoadingManager_PerformPlayerTransmit_Hook(app::LoadingManager* __this, app::Vector3 position, app::EnterType__Enum someEnum,
|
||||
uint32_t someUint1, app::CMHGHBNDBMG_ECPNDLCPDIE__Enum teleportType, uint32_t someUint2, MethodInfo* method)
|
||||
static void LoadingManager_PerformPlayerTransmit_Hook(app::MoleMole_LoadingManager* __this, app::Vector3 position, app::EnterType__Enum someEnum,
|
||||
uint32_t someUint1, app::EvtTransmitAvatar_EvtTransmitAvatar_TransmitType__Enum teleportType, uint32_t someUint2, MethodInfo* method)
|
||||
{
|
||||
MapTeleport& mapTeleport = MapTeleport::GetInstance();
|
||||
mapTeleport.OnPerformPlayerTransmit(position);
|
||||
@ -288,7 +288,7 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
|
||||
static void Entity_SetPosition_Hook(app::BaseEntity* __this, app::Vector3 position, bool someBool, MethodInfo* method)
|
||||
static void Entity_SetRelativePosition_Hook(app::BaseEntity* __this, app::Vector3 position, bool someBool, MethodInfo* method)
|
||||
{
|
||||
auto& manager = game::EntityManager::instance();
|
||||
if (manager.avatar()->raw() == __this)
|
||||
@ -297,7 +297,7 @@ namespace cheat::feature
|
||||
mapTeleport.OnSetAvatarPosition(position);
|
||||
}
|
||||
|
||||
CALL_ORIGIN(Entity_SetPosition_Hook, __this, position, someBool, method);
|
||||
CALL_ORIGIN(Entity_SetRelativePosition_Hook, __this, position, someBool, method);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace cheat::feature
|
||||
NFEX(f_Enabled, "Camera Zoom", "CameraZoom", "Visuals", false, false),
|
||||
NF(f_Zoom, "Zoom", "CameraZoom", 200)
|
||||
{
|
||||
HookManager::install(app::SCameraModuleInitialize_SetWarningLocateRatio, SCameraModuleInitialize_SetWarningLocateRatio_Hook);
|
||||
HookManager::install(app::MoleMole_SCameraModuleInitialize_SetWarningLocateRatio, SCameraModuleInitialize_SetWarningLocateRatio_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& CameraZoom::GetGUIInfo() const
|
||||
|
@ -11,7 +11,7 @@ namespace cheat::feature
|
||||
ChestIndicator::ChestIndicator() : Feature(),
|
||||
NF(f_Enabled, "Show Chest Indicator", "ShowChest", false)
|
||||
{
|
||||
HookManager::install(app::LCIndicatorPlugin_DoCheck, IndicatorPlugin_DoCheck);
|
||||
HookManager::install(app::MoleMole_LCIndicatorPlugin_DoCheck, IndicatorPlugin_DoCheck);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& ChestIndicator::GetGUIInfo() const
|
||||
@ -48,7 +48,7 @@ namespace cheat::feature
|
||||
if (__this->fields._dataItem != nullptr)
|
||||
{
|
||||
// Base Chest not found, try improve
|
||||
app::LCIndicatorPlugin_ShowIcon(__this, nullptr);
|
||||
app::MoleMole_LCIndicatorPlugin_ShowIcon(__this, nullptr);
|
||||
}
|
||||
}
|
||||
return CALL_ORIGIN(IndicatorPlugin_DoCheck, __this, method);
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
namespace cheat::feature
|
||||
{
|
||||
static void PlayerModule_RequestPlayerCook(app::PlayerModule* __this, uint32_t recipeId, uint32_t avatarId, uint32_t qteQuality, uint32_t count, MethodInfo* method);
|
||||
static void PlayerModule_OnPlayerCookRsp(app::PlayerModule* __this, app::PlayerCookRsp* rsp, MethodInfo* method);
|
||||
static void PlayerModule_RequestPlayerCook(app::MoleMole_PlayerModule* __this, uint32_t recipeId, uint32_t avatarId, uint32_t qteQuality, uint32_t count, MethodInfo* method);
|
||||
static void PlayerModule_OnPlayerCookRsp(app::MoleMole_PlayerModule* __this, app::PlayerCookRsp* rsp, MethodInfo* method);
|
||||
|
||||
static void CookingQtePageContext_UpdateProficiency(app::CookingQtePageContext* __this, MethodInfo* method);
|
||||
static void CookingQtePageContext_SetProficiencyInfo(app::CookingQtePageContext* __this, MethodInfo* method);
|
||||
@ -18,9 +18,9 @@ namespace cheat::feature
|
||||
NF(f_Count, "Count Item", "AutoCook", 1),
|
||||
NF(f_Quality, "Quality", "AutoCook", 1)
|
||||
{
|
||||
HookManager::install(app::PlayerModule_RequestPlayerCook, PlayerModule_RequestPlayerCook);
|
||||
HookManager::install(app::PlayerModule_OnPlayerCookRsp, PlayerModule_OnPlayerCookRsp);
|
||||
HookManager::install(app::CookingQtePageContext_UpdateProficiency, CookingQtePageContext_UpdateProficiency);
|
||||
HookManager::install(app::MoleMole_PlayerModule_RequestPlayerCook, PlayerModule_RequestPlayerCook);
|
||||
HookManager::install(app::MoleMole_PlayerModule_OnPlayerCookRsp, PlayerModule_OnPlayerCookRsp);
|
||||
HookManager::install(app::MoleMole_CookingQtePageContext_UpdateProficiency, CookingQtePageContext_UpdateProficiency);
|
||||
HookManager::install(app::CookRecipeExcelConfig_get_maxProficiency, CookRecipeExcelConfig_get_maxProficiency);
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ namespace cheat::feature
|
||||
|
||||
// Auto Cooking | RyujinZX#6666
|
||||
|
||||
static void PlayerModule_RequestPlayerCook(app::PlayerModule* __this, uint32_t recipeId, uint32_t avatarId, uint32_t qteQuality, uint32_t count, MethodInfo* method)
|
||||
static void PlayerModule_RequestPlayerCook(app::MoleMole_PlayerModule* __this, uint32_t recipeId, uint32_t avatarId, uint32_t qteQuality, uint32_t count, MethodInfo* method)
|
||||
{
|
||||
AutoCook& autoCook = AutoCook::GetInstance();
|
||||
if (autoCook.f_Enabled)
|
||||
@ -69,7 +69,7 @@ namespace cheat::feature
|
||||
return CALL_ORIGIN(PlayerModule_RequestPlayerCook, __this, recipeId, avatarId, qteQuality, count, method);
|
||||
}
|
||||
|
||||
static void PlayerModule_OnPlayerCookRsp(app::PlayerModule* __this, app::PlayerCookRsp* rsp, MethodInfo* method) {
|
||||
static void PlayerModule_OnPlayerCookRsp(app::MoleMole_PlayerModule* __this, app::PlayerCookRsp* rsp, MethodInfo* method) {
|
||||
AutoCook& autoCook = AutoCook::GetInstance();
|
||||
if (autoCook.f_Enabled)
|
||||
{
|
||||
@ -99,7 +99,7 @@ namespace cheat::feature
|
||||
AutoCook& autoCook = AutoCook::GetInstance();
|
||||
if (autoCook.f_Enabled)
|
||||
{
|
||||
uint32_t maxCount = app::SimpleSafeUInt32_get_Value(nullptr, __this->fields.maxProficiencyRawNum, nullptr);
|
||||
uint32_t maxCount = app::MoleMole_SimpleSafeUInt32_get_Value(__this->fields.maxProficiencyRawNum, nullptr);
|
||||
autoCook.CookCount = maxCount;
|
||||
}
|
||||
return CALL_ORIGIN(CookRecipeExcelConfig_get_maxProficiency, __this, method);
|
||||
|
@ -20,7 +20,7 @@ namespace cheat::feature
|
||||
NF(f_DestroyDoodads, "Destroy Doodads", "AutoDestroy", false),
|
||||
NF(f_Range, "Range", "AutoDestroy", 10.0f)
|
||||
{
|
||||
HookManager::install(app::LCAbilityElement_ReduceModifierDurability, LCAbilityElement_ReduceModifierDurability_Hook);
|
||||
HookManager::install(app::MoleMole_LCAbilityElement_ReduceModifierDurability, LCAbilityElement_ReduceModifierDurability_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& AutoDestroy::GetGUIInfo() const
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <cheat/events.h>
|
||||
#include <cheat/game/util.h>
|
||||
|
||||
namespace cheat::feature
|
||||
namespace cheat::feature
|
||||
{
|
||||
AutoFish::AutoFish() : Feature(),
|
||||
NFEX(f_Enabled, "Auto Fish", "m_AutoFish", "AutoFish", false, false),
|
||||
@ -17,12 +17,12 @@ namespace cheat::feature
|
||||
{
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(AutoFish::OnGameUpdate);
|
||||
|
||||
HookManager::install(app::FishingModule_RequestFishCastRod, FishingModule_RequestFishCastRod_Hook);
|
||||
HookManager::install(app::FishingModule_onFishChosenNotify, FishingModule_onFishChosenNotify_Hook);
|
||||
HookManager::install(app::FishingModule_OnFishBiteRsp, FishingModule_OnFishBiteRsp_Hook);
|
||||
HookManager::install(app::FishingModule_OnFishBattleBeginRsp, FishingModule_OnFishBattleBeginRsp_Hook);
|
||||
HookManager::install(app::FishingModule_OnFishBattleEndRsp, FishingModule_OnFishBattleEndRsp_Hook);
|
||||
HookManager::install(app::FishingModule_OnExitFishingRsp, FishingModule_OnExitFishingRsp_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_RequestFishCastRod, FishingModule_RequestFishCastRod_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_onFishChosenNotify, FishingModule_onFishChosenNotify_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_OnFishBiteRsp, FishingModule_OnFishBiteRsp_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_OnFishBattleBeginRsp, FishingModule_OnFishBattleBeginRsp_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_OnFishBattleEndRsp, FishingModule_OnFishBattleEndRsp_Hook);
|
||||
HookManager::install(app::MoleMole_FishingModule_OnExitFishingRsp, FishingModule_OnExitFishingRsp_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& AutoFish::GetGUIInfo() const
|
||||
@ -43,11 +43,11 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
bool AutoFish::NeedStatusDraw() const
|
||||
{
|
||||
{
|
||||
return f_Enabled;
|
||||
}
|
||||
|
||||
void AutoFish::DrawStatus()
|
||||
void AutoFish::DrawStatus()
|
||||
{
|
||||
ImGui::Text("Auto Fish");
|
||||
}
|
||||
@ -58,19 +58,19 @@ namespace cheat::feature
|
||||
return instance;
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_onFishChosenNotify_Hook(void* __this, void* notify, MethodInfo* method)
|
||||
{
|
||||
void AutoFish::FishingModule_onFishChosenNotify_Hook(void* __this, void* notify, MethodInfo* method)
|
||||
{
|
||||
CALL_ORIGIN(FishingModule_onFishChosenNotify_Hook, __this, notify, method);
|
||||
|
||||
auto& autoFish = GetInstance();
|
||||
if (!autoFish.f_Enabled)
|
||||
return;
|
||||
auto& autoFish = GetInstance();
|
||||
if (!autoFish.f_Enabled)
|
||||
return;
|
||||
|
||||
app::FishingModule_RequestFishBite(__this, nullptr);
|
||||
}
|
||||
app::MoleMole_FishingModule_RequestFishBite(__this, nullptr);
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_OnFishBiteRsp_Hook(void* __this, app::FishBiteRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
void AutoFish::FishingModule_OnFishBiteRsp_Hook(void* __this, app::FishBiteRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
auto& autoFish = GetInstance();
|
||||
if (!autoFish.f_Enabled)
|
||||
{
|
||||
@ -78,30 +78,30 @@ namespace cheat::feature
|
||||
return;
|
||||
}
|
||||
|
||||
app::FishingModule_RequestFishBattleBegin(__this, nullptr);
|
||||
app::MoleMole_FishingModule_RequestFishBattleBegin(__this, nullptr);
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_OnFishBattleBeginRsp_Hook(void* __this, app::FishBattleBeginRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
auto& autoFish = GetInstance();
|
||||
if (!autoFish.f_Enabled)
|
||||
{
|
||||
void AutoFish::FishingModule_OnFishBattleBeginRsp_Hook(void* __this, app::FishBattleBeginRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
auto& autoFish = GetInstance();
|
||||
if (!autoFish.f_Enabled)
|
||||
{
|
||||
CALL_ORIGIN(FishingModule_OnFishBattleBeginRsp_Hook, __this, rsp, method);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> catchLock(autoFish.m_BattleFinishTimestampMutex);
|
||||
autoFish.m_BattleFinishTimestamp = app::GetTimestamp(nullptr, nullptr) + autoFish.f_DelayBeforeCatch;
|
||||
std::lock_guard<std::mutex> catchLock(autoFish.m_BattleFinishTimestampMutex);
|
||||
autoFish.m_BattleFinishTimestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr) + autoFish.f_DelayBeforeCatch;
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_OnFishBattleEndRsp_Hook(void* __this, app::FishBattleEndRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
void AutoFish::FishingModule_OnFishBattleEndRsp_Hook(void* __this, app::FishBattleEndRsp* rsp, MethodInfo* method)
|
||||
{
|
||||
CALL_ORIGIN(FishingModule_OnFishBattleEndRsp_Hook, __this, rsp, method);
|
||||
|
||||
auto& autoFish = GetInstance();
|
||||
|
||||
if (rsp->fields.battleResult_ == app::FishBattleResult__Enum::Cancel
|
||||
|| rsp->fields.battleResult_ == app::FishBattleResult__Enum::Exit)
|
||||
if (rsp->fields.battleResult_ == app::FishBattleResult__Enum::Cancel
|
||||
|| rsp->fields.battleResult_ == app::FishBattleResult__Enum::Exit)
|
||||
{
|
||||
std::lock_guard<std::mutex> _lock2(autoFish.m_RecastTimestampMutex);
|
||||
autoFish.m_RecastTimestamp = 0;
|
||||
@ -114,8 +114,8 @@ namespace cheat::feature
|
||||
if (rsp->fields.retcode_ != 0)
|
||||
{
|
||||
LOG_WARNING("Failed to catch fish, retrying in %u ms", autoFish.f_DelayBeforeCatch);
|
||||
std::lock_guard<std::mutex> catchLock(autoFish.m_BattleFinishTimestampMutex);
|
||||
autoFish.m_BattleFinishTimestamp = app::GetTimestamp(nullptr, nullptr) + autoFish.f_DelayBeforeCatch;
|
||||
std::lock_guard<std::mutex> catchLock(autoFish.m_BattleFinishTimestampMutex);
|
||||
autoFish.m_BattleFinishTimestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr) + autoFish.f_DelayBeforeCatch;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -123,21 +123,21 @@ namespace cheat::feature
|
||||
return;
|
||||
|
||||
std::lock_guard<std::mutex> _lock(autoFish.m_RecastTimestampMutex);
|
||||
autoFish.m_RecastTimestamp = app::GetTimestamp(nullptr, nullptr) + autoFish.f_DelayBeforeRecast;
|
||||
}
|
||||
autoFish.m_RecastTimestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr) + autoFish.f_DelayBeforeRecast;
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_OnExitFishingRsp_Hook(void* __this, void* rsp, MethodInfo* method)
|
||||
{
|
||||
void AutoFish::FishingModule_OnExitFishingRsp_Hook(void* __this, void* rsp, MethodInfo* method)
|
||||
{
|
||||
CALL_ORIGIN(FishingModule_OnExitFishingRsp_Hook, __this, rsp, method);
|
||||
|
||||
auto& autoFish = GetInstance();
|
||||
|
||||
std::lock_guard<std::mutex> _lock(autoFish.m_RecastTimestampMutex);
|
||||
autoFish.m_LastCastData.exist = false;
|
||||
}
|
||||
}
|
||||
|
||||
void AutoFish::FishingModule_RequestFishCastRod_Hook(void* __this, uint32_t baitId, uint32_t rodId, app::Vector3 pos, uint32_t rodEntityId, MethodInfo* method)
|
||||
{
|
||||
void AutoFish::FishingModule_RequestFishCastRod_Hook(void* __this, uint32_t baitId, uint32_t rodId, app::Vector3 pos, uint32_t rodEntityId, MethodInfo* method)
|
||||
{
|
||||
CALL_ORIGIN(FishingModule_RequestFishCastRod_Hook, __this, baitId, rodId, pos, rodEntityId, method);
|
||||
|
||||
auto& autoFish = GetInstance();
|
||||
@ -149,16 +149,16 @@ namespace cheat::feature
|
||||
autoFish.m_LastCastData.pos = pos;
|
||||
autoFish.m_LastCastData.rodEntityId = rodEntityId;
|
||||
|
||||
autoFish.m_RecastTimestamp = 0;
|
||||
}
|
||||
autoFish.m_RecastTimestamp = 0;
|
||||
}
|
||||
|
||||
void AutoFish::OnGameUpdate()
|
||||
{
|
||||
auto timestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr);
|
||||
|
||||
void AutoFish::OnGameUpdate()
|
||||
{
|
||||
auto timestamp = app::GetTimestamp(nullptr, nullptr);
|
||||
|
||||
std::lock_guard<std::mutex> _lock(m_BattleFinishTimestampMutex);
|
||||
std::lock_guard<std::mutex> _lock2(m_RecastTimestampMutex);
|
||||
|
||||
|
||||
if (!m_LastCastData.exist)
|
||||
return;
|
||||
|
||||
@ -166,17 +166,17 @@ namespace cheat::feature
|
||||
{
|
||||
m_BattleFinishTimestamp = 0;
|
||||
|
||||
app::FishingModule_RequestFishBattleEnd(m_LastCastData.fishingModule, app::FishBattleResult__Enum::Succ, f_DelayBeforeCatch == 4.0f,
|
||||
app::MoleMole_FishingModule_RequestFishBattleEnd(m_LastCastData.fishingModule, app::FishBattleResult__Enum::Succ, f_DelayBeforeCatch == 4.0f,
|
||||
static_cast<float>(f_DelayBeforeCatch / 1000), nullptr);
|
||||
}
|
||||
|
||||
if (m_RecastTimestamp != 0 && timestamp > m_RecastTimestamp)
|
||||
{
|
||||
m_RecastTimestamp = 0;
|
||||
if (m_RecastTimestamp != 0 && timestamp > m_RecastTimestamp)
|
||||
{
|
||||
m_RecastTimestamp = 0;
|
||||
|
||||
app::FishingModule_RequestFishCastRod(m_LastCastData.fishingModule, m_LastCastData.baitId,
|
||||
m_LastCastData.rodId, m_LastCastData.pos, m_LastCastData.rodEntityId, nullptr);
|
||||
}
|
||||
}
|
||||
app::MoleMole_FishingModule_RequestFishCastRod(m_LastCastData.fishingModule, m_LastCastData.baitId,
|
||||
m_LastCastData.rodId, m_LastCastData.pos, m_LastCastData.rodEntityId, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,9 @@ namespace cheat::feature
|
||||
toBeLootedItems(), nextLootTime(0)
|
||||
{
|
||||
// Auto loot
|
||||
HookManager::install(app::LCSelectPickup_AddInteeBtnByID, LCSelectPickup_AddInteeBtnByID_Hook);
|
||||
HookManager::install(app::LCSelectPickup_IsInPosition, LCSelectPickup_IsInPosition_Hook);
|
||||
HookManager::install(app::LCSelectPickup_IsOutPosition, LCSelectPickup_IsOutPosition_Hook);
|
||||
HookManager::install(app::MoleMole_LCSelectPickup_AddInteeBtnByID, LCSelectPickup_AddInteeBtnByID_Hook);
|
||||
HookManager::install(app::MoleMole_LCSelectPickup_IsInPosition, LCSelectPickup_IsInPosition_Hook);
|
||||
HookManager::install(app::MoleMole_LCSelectPickup_IsOutPosition, LCSelectPickup_IsOutPosition_Hook);
|
||||
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(AutoLoot::OnGameUpdate);
|
||||
}
|
||||
@ -128,14 +128,14 @@ namespace cheat::feature
|
||||
if (!f_AutoPickup)
|
||||
return false;
|
||||
|
||||
auto itemModule = GET_SINGLETON(ItemModule);
|
||||
auto itemModule = GET_SINGLETON(MoleMole_ItemModule);
|
||||
if (itemModule == nullptr)
|
||||
return false;
|
||||
|
||||
auto entityId = entity->fields._runtimeID_k__BackingField;
|
||||
if (f_DelayTime == 0)
|
||||
{
|
||||
app::ItemModule_PickItem(itemModule, entityId, nullptr);
|
||||
app::MoleMole_ItemModule_PickItem(itemModule, entityId, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ namespace cheat::feature
|
||||
if (currentTime < nextLootTime)
|
||||
return;
|
||||
|
||||
auto entityManager = GET_SINGLETON(EntityManager);
|
||||
auto entityManager = GET_SINGLETON(MoleMole_EntityManager);
|
||||
if (entityManager == nullptr)
|
||||
return;
|
||||
|
||||
@ -199,15 +199,15 @@ namespace cheat::feature
|
||||
if (!entityId)
|
||||
return;
|
||||
|
||||
auto itemModule = GET_SINGLETON(ItemModule);
|
||||
auto itemModule = GET_SINGLETON(MoleMole_ItemModule);
|
||||
if (itemModule == nullptr)
|
||||
return;
|
||||
|
||||
auto entity = app::EntityManager_GetValidEntity(entityManager, *entityId, nullptr);
|
||||
auto entity = app::MoleMole_EntityManager_GetValidEntity(entityManager, *entityId, nullptr);
|
||||
if (entity == nullptr)
|
||||
return;
|
||||
|
||||
app::ItemModule_PickItem(itemModule, *entityId, nullptr);
|
||||
app::MoleMole_ItemModule_PickItem(itemModule, *entityId, nullptr);
|
||||
nextLootTime = currentTime + (int)f_DelayTime;
|
||||
}
|
||||
|
||||
|
@ -8,29 +8,29 @@
|
||||
#include <cheat/game/util.h>
|
||||
#include <cheat/game/EntityManager.h>
|
||||
|
||||
namespace cheat::feature
|
||||
namespace cheat::feature
|
||||
{
|
||||
AutoTreeFarm::AutoTreeFarm() : Feature(),
|
||||
NF(m_Enabled, "Auto tree farm", "AutoTreeFarm", false),
|
||||
NF(m_AttackDelay, "Attack delay", "AutoTreeFarm", 150),
|
||||
NF(m_RepeatDelay, "Repeat delay", "AutoTreeFarm", 500),
|
||||
NF(m_AttackPerTree,"Attack per tree", "AutoTreeFarm", 5),
|
||||
NF(m_Range, "Range", "AutoTreeFarm", 15.0f)
|
||||
{
|
||||
AutoTreeFarm::AutoTreeFarm() : Feature(),
|
||||
NF(m_Enabled, "Auto tree farm", "AutoTreeFarm", false),
|
||||
NF(m_AttackDelay, "Attack delay", "AutoTreeFarm", 150),
|
||||
NF(m_RepeatDelay, "Repeat delay", "AutoTreeFarm", 500),
|
||||
NF(m_AttackPerTree, "Attack per tree", "AutoTreeFarm", 5),
|
||||
NF(m_Range, "Range", "AutoTreeFarm", 15.0f)
|
||||
{
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(AutoTreeFarm::OnGameUpdate);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& AutoTreeFarm::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "Auto Tree Farm", "World", true };
|
||||
return info;
|
||||
}
|
||||
const FeatureGUIInfo& AutoTreeFarm::GetGUIInfo() const
|
||||
{
|
||||
static const FeatureGUIInfo info{ "Auto Tree Farm", "World", true };
|
||||
return info;
|
||||
}
|
||||
|
||||
void AutoTreeFarm::DrawMain()
|
||||
{
|
||||
void AutoTreeFarm::DrawMain()
|
||||
{
|
||||
ImGui::TextColored(ImColor(255, 165, 0, 255), "Note. This feature is not fully tested detection-wise.\n"
|
||||
"Not recommended for main accounts or used with high values.");
|
||||
|
||||
|
||||
ConfigWidget("Enabled", m_Enabled, "Automatically attack trees in range.");
|
||||
ConfigWidget("Attack Delay (ms)", m_AttackDelay, 1, 0, 1000, "Delay before attacking the next tree (in ms).");
|
||||
ConfigWidget("Repeat Delay (ms)", m_RepeatDelay, 1, 500, 1000, "Delay before attacking the same tree (in ms).\nValues <500ms will not work.");
|
||||
@ -43,32 +43,32 @@ namespace cheat::feature
|
||||
|
||||
ConfigWidget("Range (m)", m_Range, 0.1f, 1.0f, 15.0f);
|
||||
ImGui::TextColored(ImColor(255, 165, 0, 255), "Range is softly limited to ~15m for safety purposes.");
|
||||
}
|
||||
}
|
||||
|
||||
bool AutoTreeFarm::NeedStatusDraw() const
|
||||
bool AutoTreeFarm::NeedStatusDraw() const
|
||||
{
|
||||
return m_Enabled;
|
||||
}
|
||||
return m_Enabled;
|
||||
}
|
||||
|
||||
void AutoTreeFarm::DrawStatus()
|
||||
{
|
||||
ImGui::Text("Tree Farm\n[%dms|%dms|%d|%.1fm]",
|
||||
void AutoTreeFarm::DrawStatus()
|
||||
{
|
||||
ImGui::Text("Tree Farm\n[%dms|%dms|%d|%.1fm]",
|
||||
m_AttackDelay.value(),
|
||||
m_RepeatDelay.value(),
|
||||
m_AttackPerTree.value(),
|
||||
m_Range.value());
|
||||
}
|
||||
}
|
||||
|
||||
AutoTreeFarm& AutoTreeFarm::GetInstance()
|
||||
{
|
||||
static AutoTreeFarm instance;
|
||||
return instance;
|
||||
}
|
||||
AutoTreeFarm& AutoTreeFarm::GetInstance()
|
||||
{
|
||||
static AutoTreeFarm instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
std::unordered_set<app::SceneTreeObject*> GetTreeSet()
|
||||
{
|
||||
auto scenePropManager = GET_SINGLETON(ScenePropManager);
|
||||
auto scenePropManager = GET_SINGLETON(MoleMole_ScenePropManager);
|
||||
if (scenePropManager == nullptr)
|
||||
return {};
|
||||
|
||||
@ -126,13 +126,13 @@ namespace cheat::feature
|
||||
static std::unordered_set<app::SceneTreeObject*> s_AttackQueueSet;
|
||||
static uint64_t s_LastAttackTimestamp = 0;
|
||||
|
||||
uint64_t timestamp = app::GetTimestamp(nullptr, nullptr);
|
||||
uint64_t timestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr);
|
||||
if (!m_Enabled || s_LastAttackTimestamp + m_AttackDelay > timestamp)
|
||||
return;
|
||||
|
||||
auto& manager = game::EntityManager::instance();
|
||||
auto scenePropManager = GET_SINGLETON(ScenePropManager);
|
||||
auto networkManager = GET_SINGLETON(NetworkManager_1);
|
||||
auto scenePropManager = GET_SINGLETON(MoleMole_ScenePropManager);
|
||||
auto networkManager = GET_SINGLETON(MoleMole_NetworkManager);
|
||||
if (networkManager == nullptr || scenePropManager == nullptr)
|
||||
return;
|
||||
|
||||
@ -146,29 +146,29 @@ namespace cheat::feature
|
||||
continue;
|
||||
|
||||
auto position = tree->fields._.realBounds.m_Center;
|
||||
if (manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(nullptr, position, nullptr)) > m_Range)
|
||||
if (manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(position, nullptr)) > m_Range)
|
||||
continue;
|
||||
|
||||
s_AttackQueueSet.insert(tree);
|
||||
s_AttackQueue.push(tree);
|
||||
}
|
||||
|
||||
|
||||
while (!s_AttackQueue.empty())
|
||||
{
|
||||
auto tree = s_AttackQueue.front();
|
||||
s_AttackQueue.pop();
|
||||
s_AttackQueueSet.erase(tree);
|
||||
|
||||
|
||||
if (treeSet.count(tree) == 0)
|
||||
continue;
|
||||
|
||||
auto position = tree->fields._.realBounds.m_Center;
|
||||
if (manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(nullptr, position, nullptr)) > m_Range)
|
||||
if (manager.avatar()->distance(app::WorldShiftManager_GetRelativePosition(position, nullptr)) > m_Range)
|
||||
continue;
|
||||
|
||||
app::ECGLPBEEEAA__Enum treeType;
|
||||
app::MoleMole_Config_TreeType__Enum treeType;
|
||||
auto pattern = tree->fields._config->fields._._.scenePropPatternName;
|
||||
if (!app::ScenePropManager_GetTreeTypeByPattern(scenePropManager, pattern, &treeType, nullptr))
|
||||
if (!app::MoleMole_ScenePropManager_GetTreeTypeByPattern(scenePropManager, pattern, &treeType, nullptr))
|
||||
continue;
|
||||
|
||||
if (m_AttackPerTree > 0)
|
||||
@ -183,7 +183,7 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
tree->fields._lastTreeDropTimeStamp = timestamp;
|
||||
app::NetworkManager_1_RequestHitTreeDropNotify(networkManager, position, position, treeType, nullptr);
|
||||
app::MoleMole_NetworkManager_RequestHitTreeDropNotify(networkManager, position, position, treeType, nullptr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,8 @@ namespace cheat::feature
|
||||
NF(f_FastDialog, "Fast dialog", "AutoTalk", false),
|
||||
NF(f_TimeSpeedup, "Time Speed", "AutoTalk", 5.0f)
|
||||
{
|
||||
HookManager::install(app::InLevelCutScenePageContext_UpdateView, InLevelCutScenePageContext_UpdateView_Hook);
|
||||
HookManager::install(app::InLevelCutScenePageContext_ClearView, InLevelCutScenePageContext_ClearView_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelCutScenePageContext_UpdateView, InLevelCutScenePageContext_UpdateView_Hook);
|
||||
HookManager::install(app::MoleMole_InLevelCutScenePageContext_ClearView, InLevelCutScenePageContext_ClearView_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& DialogSkip::GetGUIInfo() const
|
||||
@ -77,7 +77,7 @@ namespace cheat::feature
|
||||
return;
|
||||
|
||||
if (f_FastDialog)
|
||||
app::Time_set_timeScale(nullptr, f_TimeSpeedup, nullptr);
|
||||
app::Time_set_timeScale(f_TimeSpeedup, nullptr);
|
||||
|
||||
bool isImportant = false;
|
||||
if (f_ExcludeImportant)
|
||||
@ -107,11 +107,11 @@ namespace cheat::feature
|
||||
{
|
||||
int32_t value = 0;
|
||||
auto object = il2cpp_value_box((Il2CppClass*)*app::Int32__TypeInfo, &value);
|
||||
auto notify = app::Notify_CreateNotify_1(nullptr, app::AJAPIFPNFKP__Enum::DialogSelectItemNotify, (app::Object*)object, nullptr);
|
||||
app::TalkDialogContext_OnDialogSelectItem(talkDialog, ¬ify, nullptr);
|
||||
auto notify = app::Notify_CreateNotify_1(app::MoleMole_NotifyTypes__Enum::DialogSelectItemNotify, (app::Object*)object, nullptr);
|
||||
app::MoleMole_TalkDialogContext_OnDialogSelectItem(talkDialog, ¬ify, nullptr);
|
||||
}
|
||||
else if (!talkDialog->fields._inSelect)
|
||||
app::InLevelCutScenePageContext_OnFreeClick(context, nullptr);
|
||||
app::MoleMole_InLevelCutScenePageContext_OnFreeClick(context, nullptr);
|
||||
}
|
||||
|
||||
static void InLevelCutScenePageContext_UpdateView_Hook(app::InLevelCutScenePageContext* __this, MethodInfo* method)
|
||||
@ -126,9 +126,9 @@ namespace cheat::feature
|
||||
// Should be a better way to store the pre-dialog speed using Time_get_timeScale.
|
||||
static void InLevelCutScenePageContext_ClearView_Hook(app::InLevelCutScenePageContext* __this, MethodInfo* method)
|
||||
{
|
||||
float gameSpeed = app::Time_get_timeScale(nullptr, nullptr);
|
||||
float gameSpeed = app::Time_get_timeScale(nullptr);
|
||||
if (gameSpeed > 1.0f)
|
||||
app::Time_set_timeScale(nullptr, 1.0f, nullptr);
|
||||
app::Time_set_timeScale(1.0f, nullptr);
|
||||
CALL_ORIGIN(InLevelCutScenePageContext_ClearView_Hook, __this, method);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace cheat::feature
|
||||
DumbEnemies::DumbEnemies() : Feature(),
|
||||
NF(f_Enabled, "Dumb Enemies", "DumbEnemies", false)
|
||||
{
|
||||
HookManager::install(app::VCMonsterAIController_TryDoSkill, VCMonsterAIController_TryDoSkill_Hook);
|
||||
HookManager::install(app::MoleMole_VCMonsterAIController_TryDoSkill, VCMonsterAIController_TryDoSkill_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& DumbEnemies::GetGUIInfo() const
|
||||
|
@ -10,7 +10,7 @@ namespace cheat::feature
|
||||
ElementalSight::ElementalSight() : Feature(),
|
||||
NF(f_Enabled, "Permanent Elemental Sight", "ElementalSight", false)
|
||||
{
|
||||
HookManager::install(app::LevelSceneElementViewPlugin_Tick, LevelSceneElementViewPlugin_Tick_Hook);
|
||||
HookManager::install(app::MoleMole_LevelSceneElementViewPlugin_Tick, LevelSceneElementViewPlugin_Tick_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& ElementalSight::GetGUIInfo() const
|
||||
@ -45,7 +45,7 @@ namespace cheat::feature
|
||||
{
|
||||
ElementalSight& ElementalSight = ElementalSight::GetInstance();
|
||||
if (ElementalSight.f_Enabled)
|
||||
__this->fields.elementalSightActivated = true;
|
||||
__this->fields._triggerElementView = true;
|
||||
CALL_ORIGIN(LevelSceneElementViewPlugin_Tick_Hook, __this, inDeltaTime, method);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace cheat::feature
|
||||
NF(f_RepeatDelay, "Repeat delay time (in ms)", "KillAura", 1000)
|
||||
{
|
||||
events::GameUpdateEvent += MY_METHOD_HANDLER(KillAura::OnGameUpdate);
|
||||
HookManager::install(app::BaseMoveSyncPlugin_ConvertSyncTaskToMotionInfo, BaseMoveSyncPlugin_ConvertSyncTaskToMotionInfo_Hook);
|
||||
HookManager::install(app::MoleMole_BaseMoveSyncPlugin_ConvertSyncTaskToMotionInfo, BaseMoveSyncPlugin_ConvertSyncTaskToMotionInfo_Hook);
|
||||
}
|
||||
|
||||
const FeatureGUIInfo& KillAura::GetGUIInfo() const
|
||||
@ -84,8 +84,8 @@ namespace cheat::feature
|
||||
if (!f_Enabled || !f_DamageMode)
|
||||
return;
|
||||
|
||||
auto eventManager = GET_SINGLETON(EventManager);
|
||||
if (eventManager == nullptr || *app::CreateCrashEvent__MethodInfo == nullptr)
|
||||
auto eventManager = GET_SINGLETON(MoleMole_EventManager);
|
||||
if (eventManager == nullptr || *app::MoleMole_EventHelper_Allocate_103__MethodInfo == nullptr)
|
||||
return;
|
||||
|
||||
auto currentTime = util::GetCurrentTimeMillisec();
|
||||
@ -112,10 +112,10 @@ namespace cheat::feature
|
||||
if (combatProp == nullptr)
|
||||
continue;
|
||||
|
||||
auto maxHP = app::SafeFloat_GetValue(nullptr, combatProp->fields.maxHP, nullptr);
|
||||
auto isLockHp = combatProp->fields.islockHP == nullptr || app::FixedBoolStack_get_value(combatProp->fields.islockHP, nullptr);
|
||||
auto isInvincible = combatProp->fields.isInvincible == nullptr || app::FixedBoolStack_get_value(combatProp->fields.isInvincible, nullptr);
|
||||
auto HP = app::SafeFloat_GetValue(nullptr, combatProp->fields.HP, nullptr);
|
||||
auto maxHP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.maxHP, nullptr);
|
||||
auto isLockHp = combatProp->fields.islockHP == nullptr || app::MoleMole_FixedBoolStack_get_value(combatProp->fields.islockHP, nullptr);
|
||||
auto isInvincible = combatProp->fields.isInvincible == nullptr || app::MoleMole_FixedBoolStack_get_value(combatProp->fields.isInvincible, nullptr);
|
||||
auto HP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.HP, nullptr);
|
||||
if (maxHP < 10 || HP < 2 || isLockHp || isInvincible)
|
||||
continue;
|
||||
|
||||
@ -151,15 +151,15 @@ namespace cheat::feature
|
||||
attackSet.erase(monster->runtimeID());
|
||||
|
||||
auto combat = monster->combat();
|
||||
auto maxHP = app::SafeFloat_GetValue(nullptr, combat->fields._combatProperty_k__BackingField->fields.maxHP, nullptr);
|
||||
auto maxHP = app::MoleMole_SafeFloat_get_Value(combat->fields._combatProperty_k__BackingField->fields.maxHP, nullptr);
|
||||
|
||||
auto crashEvt = app::CreateCrashEvent(nullptr, *app::CreateCrashEvent__MethodInfo);
|
||||
app::EvtCrash_Init(crashEvt, monster->runtimeID(), nullptr);
|
||||
auto crashEvt = app::MoleMole_EventHelper_Allocate_103(*app::MoleMole_EventHelper_Allocate_103__MethodInfo);
|
||||
app::MoleMole_EvtCrash_Init(crashEvt, monster->runtimeID(), nullptr);
|
||||
crashEvt->fields.maxHp = maxHP;
|
||||
crashEvt->fields.velChange = 1000;
|
||||
crashEvt->fields.hitPos = monster->absolutePosition();
|
||||
|
||||
app::EventManager_FireEvent(eventManager, reinterpret_cast<app::BaseEvent*>(crashEvt), false, nullptr);
|
||||
app::MoleMole_EventManager_FireEvent(eventManager, reinterpret_cast<app::BaseEvent*>(crashEvt), false, nullptr);
|
||||
|
||||
monsterRepeatTimeMap[monster->runtimeID()] = currentTime + (int)f_RepeatDelay + distribution(generator);
|
||||
|
||||
|
@ -178,14 +178,14 @@ namespace cheat::feature
|
||||
uint32_t entityId = entity->runtimeID();
|
||||
app::Vector3 entityRelPos = positions->count(entityId) ? (*positions)[entityId] : entity->relativePosition();
|
||||
app::Vector3 newPosition = {};
|
||||
if (app::Vector3_Distance(nullptr, entityRelPos, targetPos, nullptr) < 0.1)
|
||||
if (app::Vector3_Distance(entityRelPos, targetPos, nullptr) < 0.1)
|
||||
{
|
||||
newPosition = targetPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
app::Vector3 dir = GetVectorDirection(entityRelPos, targetPos);
|
||||
float deltaTime = app::Time_get_deltaTime(nullptr, nullptr);
|
||||
float deltaTime = app::Time_get_deltaTime(nullptr);
|
||||
newPosition = entityRelPos + dir * f_Speed * deltaTime;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ namespace cheat::feature
|
||||
|
||||
app::Vector3 targetPos = CalcMobVacTargetPos();
|
||||
app::Vector3 entityPos = entity->relativePosition();
|
||||
if (app::Vector3_Distance(nullptr, targetPos, entityPos, nullptr) < 0.2)
|
||||
if (app::Vector3_Distance(targetPos, entityPos, nullptr) < 0.2)
|
||||
return;
|
||||
|
||||
app::Vector3 dir = GetVectorDirection(targetPos, entityPos);
|
||||
|
Loading…
Reference in New Issue
Block a user