Merge branch 'Akebi-Group:master' into master
This commit is contained in:
commit
c9a7fc31ef
@ -24,6 +24,7 @@
|
|||||||
<ClInclude Include="src\user\cheat\visuals\AnimationChanger.h" />
|
<ClInclude Include="src\user\cheat\visuals\AnimationChanger.h" />
|
||||||
<ClInclude Include="src\user\cheat\visuals\TextureChanger.h" />
|
<ClInclude Include="src\user\cheat\visuals\TextureChanger.h" />
|
||||||
<ClInclude Include="src\user\cheat\visuals\FreeCamera.h" />
|
<ClInclude Include="src\user\cheat\visuals\FreeCamera.h" />
|
||||||
|
<ClInclude Include="src\user\cheat\world\AutoChallenge.h" />
|
||||||
<ClInclude Include="src\user\cheat\world\AutoSeelie.h" />
|
<ClInclude Include="src\user\cheat\world\AutoSeelie.h" />
|
||||||
<ClInclude Include="src\user\cheat\world\CustomWeather.h" />
|
<ClInclude Include="src\user\cheat\world\CustomWeather.h" />
|
||||||
<ClInclude Include="src\user\cheat\world\FakeTime.h" />
|
<ClInclude Include="src\user\cheat\world\FakeTime.h" />
|
||||||
@ -117,6 +118,7 @@
|
|||||||
<ClCompile Include="src\user\cheat\visuals\AnimationChanger.cpp" />
|
<ClCompile Include="src\user\cheat\visuals\AnimationChanger.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\visuals\TextureChanger.cpp" />
|
<ClCompile Include="src\user\cheat\visuals\TextureChanger.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\visuals\FreeCamera.cpp" />
|
<ClCompile Include="src\user\cheat\visuals\FreeCamera.cpp" />
|
||||||
|
<ClCompile Include="src\user\cheat\world\AutoChallenge.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\world\AutoSeelie.cpp" />
|
<ClCompile Include="src\user\cheat\world\AutoSeelie.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\world\CustomWeather.cpp" />
|
<ClCompile Include="src\user\cheat\world\CustomWeather.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\world\FakeTime.cpp" />
|
<ClCompile Include="src\user\cheat\world\FakeTime.cpp" />
|
||||||
|
@ -255,6 +255,9 @@
|
|||||||
<ClInclude Include="src\user\cheat\visuals\AnimationChanger.h">
|
<ClInclude Include="src\user\cheat\visuals\AnimationChanger.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\user\cheat\world\AutoChallenge.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Font Include="res\Ruda-Bold.ttf" />
|
<Font Include="res\Ruda-Bold.ttf" />
|
||||||
@ -468,6 +471,9 @@
|
|||||||
<ClCompile Include="src\user\cheat\visuals\AnimationChanger.cpp">
|
<ClCompile Include="src\user\cheat\visuals\AnimationChanger.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\user\cheat\world\AutoChallenge.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="res\res.rc">
|
<ResourceCompile Include="res\res.rc">
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <cheat/world/AutoFish.h>
|
#include <cheat/world/AutoFish.h>
|
||||||
#include <cheat/world/AutoCook.h>
|
#include <cheat/world/AutoCook.h>
|
||||||
|
#include <cheat/world/AutoChallenge.h>
|
||||||
#include <cheat/world/CustomWeather.h>
|
#include <cheat/world/CustomWeather.h>
|
||||||
|
|
||||||
#include <cheat/visuals/NoFog.h>
|
#include <cheat/visuals/NoFog.h>
|
||||||
@ -97,6 +98,7 @@ namespace cheat
|
|||||||
FEAT_INST(FreezeEnemies),
|
FEAT_INST(FreezeEnemies),
|
||||||
FEAT_INST(ElementalSight),
|
FEAT_INST(ElementalSight),
|
||||||
FEAT_INST(KillAura),
|
FEAT_INST(KillAura),
|
||||||
|
FEAT_INST(AutoChallenge),
|
||||||
FEAT_INST(MobVacuum),
|
FEAT_INST(MobVacuum),
|
||||||
FEAT_INST(FakeTime),
|
FEAT_INST(FakeTime),
|
||||||
|
|
||||||
|
@ -320,7 +320,8 @@ namespace cheat::game::filters
|
|||||||
WhitelistFilter DreamForm = { {EntityType__Enum_1::Field, EntityType__Enum_1::Platform }, "_AnimalSeelie" };
|
WhitelistFilter DreamForm = { {EntityType__Enum_1::Field, EntityType__Enum_1::Platform }, "_AnimalSeelie" };
|
||||||
SimpleFilter StarlightCoalescence = { EntityType__Enum_1::Field, "_PaperStar" };
|
SimpleFilter StarlightCoalescence = { EntityType__Enum_1::Field, "_PaperStar" };
|
||||||
SimpleFilter TheRavenForum = { EntityType__Enum_1::Gadget, "_NightCrowStatue" };
|
SimpleFilter TheRavenForum = { EntityType__Enum_1::Gadget, "_NightCrowStatue" };
|
||||||
|
WhitelistFilter TimeTrialChallengeCollection = { { EntityType__Enum_1::Field, EntityType__Enum_1::Gadget }, { "SkillObj_EmptyGadget", "_GlideChampOrb" } };
|
||||||
|
SimpleFilter Bombbarrel = { EntityType__Enum_1::Gadget, "_Bombbarrel" };
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace combined
|
namespace combined
|
||||||
|
@ -320,6 +320,8 @@ namespace cheat::game::filters
|
|||||||
extern WhitelistFilter DreamForm;
|
extern WhitelistFilter DreamForm;
|
||||||
extern SimpleFilter StarlightCoalescence;
|
extern SimpleFilter StarlightCoalescence;
|
||||||
extern SimpleFilter TheRavenForum;
|
extern SimpleFilter TheRavenForum;
|
||||||
|
extern WhitelistFilter TimeTrialChallengeCollection;
|
||||||
|
extern SimpleFilter Bombbarrel;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace combined
|
namespace combined
|
||||||
|
@ -13,11 +13,17 @@ namespace cheat::feature
|
|||||||
return inst.OnRecordUserData(nType);
|
return inst.OnRecordUserData(nType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int CrashReporter_Hook(__int64 a1, __int64 a2, const char* a3)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ProtectionBypass::ProtectionBypass() : Feature(),
|
ProtectionBypass::ProtectionBypass() : Feature(),
|
||||||
NFEX(f_Enabled, "Disable Protection", "m_DisableMhyProt", "General", true, false),
|
NFEX(f_Enabled, "Disable Protection", "m_DisableMhyProt", "General", true, false),
|
||||||
m_CorrectSignatures({})
|
m_CorrectSignatures({})
|
||||||
{
|
{
|
||||||
HookManager::install(app::Unity_RecordUserData, RecordUserData_Hook);
|
HookManager::install(app::Unity_RecordUserData, RecordUserData_Hook);
|
||||||
|
HookManager::install(app::CrashReporter, CrashReporter_Hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProtectionBypass::Init()
|
void ProtectionBypass::Init()
|
||||||
|
@ -79,36 +79,41 @@ namespace cheat::feature
|
|||||||
static bool afterDash = false;
|
static bool afterDash = false;
|
||||||
|
|
||||||
auto& manager = game::EntityManager::instance();
|
auto& manager = game::EntityManager::instance();
|
||||||
if (manager.avatar()->runtimeID() != entityId)
|
auto entity = manager.entity(entityId);
|
||||||
return;
|
if (entity->type() == app::EntityType__Enum_1::Vehicle || entity->isAvatar())
|
||||||
|
|
||||||
// LOG_DEBUG("Movement packet: %s", magic_enum::enum_name(syncInfo->fields.motionState).data());
|
|
||||||
if (f_Enabled && f_PacketReplacement)
|
|
||||||
{
|
{
|
||||||
auto state = syncInfo->fields.motionState;
|
// LOG_DEBUG("Movement packet: %s", magic_enum::enum_name(syncInfo->fields.motionState).data());
|
||||||
switch (state)
|
if (f_Enabled && f_PacketReplacement)
|
||||||
{
|
{
|
||||||
case app::MotionState__Enum::MotionDash:
|
auto state = syncInfo->fields.motionState;
|
||||||
case app::MotionState__Enum::MotionClimb:
|
switch (state)
|
||||||
case app::MotionState__Enum::MotionClimbJump:
|
{
|
||||||
case app::MotionState__Enum::MotionStandbyToClimb:
|
case app::MotionState__Enum::MotionDash:
|
||||||
case app::MotionState__Enum::MotionSwimDash:
|
case app::MotionState__Enum::MotionClimb:
|
||||||
case app::MotionState__Enum::MotionSwimIdle:
|
case app::MotionState__Enum::MotionClimbJump:
|
||||||
case app::MotionState__Enum::MotionSwimMove:
|
case app::MotionState__Enum::MotionStandbyToClimb:
|
||||||
case app::MotionState__Enum::MotionSwimJump:
|
case app::MotionState__Enum::MotionSwimDash:
|
||||||
case app::MotionState__Enum::MotionFly:
|
case app::MotionState__Enum::MotionSwimIdle:
|
||||||
case app::MotionState__Enum::MotionFight:
|
case app::MotionState__Enum::MotionSwimMove:
|
||||||
case app::MotionState__Enum::MotionDashBeforeShake:
|
case app::MotionState__Enum::MotionSwimJump:
|
||||||
case app::MotionState__Enum::MotionDangerDash:
|
case app::MotionState__Enum::MotionFly:
|
||||||
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
|
case app::MotionState__Enum::MotionFight:
|
||||||
break;
|
case app::MotionState__Enum::MotionDashBeforeShake:
|
||||||
case app::MotionState__Enum::MotionJump:
|
case app::MotionState__Enum::MotionDangerDash:
|
||||||
if (afterDash)
|
|
||||||
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
|
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
|
||||||
break;
|
break;
|
||||||
|
case app::MotionState__Enum::MotionJump:
|
||||||
|
if (afterDash)
|
||||||
|
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
|
||||||
|
break;
|
||||||
|
case app::MotionState__Enum::MotionSkiffDash:
|
||||||
|
case app::MotionState__Enum::MotionSkiffPoweredDash:
|
||||||
|
syncInfo->fields.motionState = app::MotionState__Enum::MotionSkiffNormal;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (state != app::MotionState__Enum::MotionJump && state != app::MotionState__Enum::MotionFallOnGround)
|
||||||
|
afterDash = state == app::MotionState__Enum::MotionDash;
|
||||||
}
|
}
|
||||||
if (state != app::MotionState__Enum::MotionJump && state != app::MotionState__Enum::MotionFallOnGround)
|
|
||||||
afterDash = state == app::MotionState__Enum::MotionDash;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ namespace cheat::feature
|
|||||||
app::GameObject* mainCam = nullptr;
|
app::GameObject* mainCam = nullptr;
|
||||||
app::Object_1* freeCamObj = nullptr;
|
app::Object_1* freeCamObj = nullptr;
|
||||||
app::Object_1* mainCamObj = nullptr;
|
app::Object_1* mainCamObj = nullptr;
|
||||||
|
app::GameObject* damageOverlay = nullptr;
|
||||||
|
app::GameObject* hpOverlay = nullptr;
|
||||||
app::Transform* freeCam_Transform;
|
app::Transform* freeCam_Transform;
|
||||||
app::Component_1* freeCam_Camera;
|
app::Component_1* freeCam_Camera;
|
||||||
app::Component_1* mainCam_Camera;
|
app::Component_1* mainCam_Camera;
|
||||||
@ -22,6 +24,8 @@ namespace cheat::feature
|
|||||||
FreeCamera::FreeCamera() : Feature(),
|
FreeCamera::FreeCamera() : Feature(),
|
||||||
NF(f_Enabled, "Free Camera", "Visuals::FreeCamera", false),
|
NF(f_Enabled, "Free Camera", "Visuals::FreeCamera", false),
|
||||||
NF(f_FreezeAnimation, "Freeze Character Animation", "Visuals::FreeCamera", false),
|
NF(f_FreezeAnimation, "Freeze Character Animation", "Visuals::FreeCamera", false),
|
||||||
|
NF(f_DamageOverlay, "Damage Overlay", "Visuals::FreeCamera", false),
|
||||||
|
NF(f_HpOverlay, "Enemy HP Overlay", "Visuals::FreeCamera", false),
|
||||||
NF(f_Speed, "Speed", "Visuals::FreeCamera", 1.0f),
|
NF(f_Speed, "Speed", "Visuals::FreeCamera", 1.0f),
|
||||||
NF(f_LookSens, "Look Sensitivity", "Visuals::FreeCamera", 1.0f),
|
NF(f_LookSens, "Look Sensitivity", "Visuals::FreeCamera", 1.0f),
|
||||||
NF(f_RollSpeed, "Roll Speed", "Visuals::FreeCamera", 1.0f),
|
NF(f_RollSpeed, "Roll Speed", "Visuals::FreeCamera", 1.0f),
|
||||||
@ -52,7 +56,13 @@ namespace cheat::feature
|
|||||||
void FreeCamera::DrawMain()
|
void FreeCamera::DrawMain()
|
||||||
{
|
{
|
||||||
ConfigWidget("Enable", f_Enabled);
|
ConfigWidget("Enable", f_Enabled);
|
||||||
ConfigWidget("Freeze Character Animation", f_FreezeAnimation, "Freezes the active character's animation.\nAfter disabling, jump to un-freeze your character.");
|
ConfigWidget("Freeze Character Animation", f_FreezeAnimation, "Freezes the active character's animation.");
|
||||||
|
if (f_Enabled)
|
||||||
|
{
|
||||||
|
ConfigWidget("Toggle Damage Overlay", f_DamageOverlay, "Remove damage output overlay");
|
||||||
|
ConfigWidget("Toggle Enemy HP Overlay", f_HpOverlay, "Remove enemy HP overlay");
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginTable("FreeCameraDrawTable", 1, ImGuiTableFlags_NoBordersInBody))
|
if (ImGui::BeginTable("FreeCameraDrawTable", 1, ImGuiTableFlags_NoBordersInBody))
|
||||||
{
|
{
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
@ -245,9 +255,23 @@ namespace cheat::feature
|
|||||||
}
|
}
|
||||||
if (freeCamObj)
|
if (freeCamObj)
|
||||||
EnableFreeCam();
|
EnableFreeCam();
|
||||||
|
|
||||||
|
if (damageOverlay == nullptr)
|
||||||
|
damageOverlay = app::GameObject_Find(string_to_il2cppi("/Canvas/Pages/InLevelMainPage/GrpMainPage/ParticleDamageTextContainer"), nullptr);
|
||||||
|
else
|
||||||
|
app::GameObject_SetActive(damageOverlay, !f_DamageOverlay, nullptr);
|
||||||
|
|
||||||
|
if (hpOverlay == nullptr)
|
||||||
|
hpOverlay = app::GameObject_Find(string_to_il2cppi("AvatarBoardCanvasV2(Clone)"), nullptr);
|
||||||
|
else
|
||||||
|
app::GameObject_SetActive(hpOverlay, !f_DamageOverlay, nullptr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DisableFreeCam();
|
DisableFreeCam();
|
||||||
|
damageOverlay = nullptr;
|
||||||
|
hpOverlay = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// Taiga#5555: There's probably be a better way of implementing this. But for now, this is just what I came up with.
|
// Taiga#5555: There's probably be a better way of implementing this. But for now, this is just what I came up with.
|
||||||
auto& manager = game::EntityManager::instance();
|
auto& manager = game::EntityManager::instance();
|
||||||
@ -256,17 +280,24 @@ namespace cheat::feature
|
|||||||
if (animator == nullptr && rigidBody == nullptr)
|
if (animator == nullptr && rigidBody == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
static bool changed = false;
|
||||||
|
|
||||||
if (f_FreezeAnimation)
|
if (f_FreezeAnimation)
|
||||||
{
|
{
|
||||||
//auto constraints = app::Rigidbody_get_constraints(rigidBody, nullptr);
|
//auto constraints = app::Rigidbody_get_constraints(rigidBody, nullptr);
|
||||||
//LOG_DEBUG("%s", magic_enum::enum_name(constraints).data());
|
//LOG_DEBUG("%s", magic_enum::enum_name(constraints).data());
|
||||||
app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezePosition, nullptr);
|
app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezePosition, nullptr);
|
||||||
app::Animator_set_speed(animator, 0.f, nullptr);
|
app::Animator_set_speed(animator, 0.f, nullptr);
|
||||||
|
changed = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezeRotation, nullptr);
|
app::Rigidbody_set_constraints(rigidBody, app::RigidbodyConstraints__Enum::FreezeRotation, nullptr);
|
||||||
app::Animator_set_speed(animator, 1.f, nullptr);
|
if (!changed)
|
||||||
|
{
|
||||||
|
app::Animator_set_speed(animator, 1.f, nullptr);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,6 +9,8 @@ namespace cheat::feature
|
|||||||
public:
|
public:
|
||||||
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
||||||
config::Field<config::Toggle<Hotkey>> f_FreezeAnimation;
|
config::Field<config::Toggle<Hotkey>> f_FreezeAnimation;
|
||||||
|
config::Field<bool> f_DamageOverlay;
|
||||||
|
config::Field<bool> f_HpOverlay;
|
||||||
config::Field<float> f_Speed;
|
config::Field<float> f_Speed;
|
||||||
config::Field<float> f_LookSens;
|
config::Field<float> f_LookSens;
|
||||||
config::Field<float> f_RollSpeed;
|
config::Field<float> f_RollSpeed;
|
||||||
|
85
cheat-library/src/user/cheat/world/AutoChallenge.cpp
Normal file
85
cheat-library/src/user/cheat/world/AutoChallenge.cpp
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
#include "AutoChallenge.h"
|
||||||
|
|
||||||
|
#include <cheat/events.h>
|
||||||
|
#include <cheat/game/EntityManager.h>
|
||||||
|
#include <cheat/game/filters.h>
|
||||||
|
|
||||||
|
namespace cheat::feature
|
||||||
|
{
|
||||||
|
|
||||||
|
AutoChallenge::AutoChallenge() : Feature(),
|
||||||
|
NF(f_Enabled, "Auto challenge", "AutoChallenge", false),
|
||||||
|
NF(f_BombDestroy, "Bomb destroy", "AutoChallenge", false),
|
||||||
|
NF(f_Delay, "Collect delay", "AutoChallenge", 1000),
|
||||||
|
NF(f_Range, "Collect range", "AutoChallenge", 20.f)
|
||||||
|
{
|
||||||
|
events::GameUpdateEvent += MY_METHOD_HANDLER(AutoChallenge::OnGameUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
const FeatureGUIInfo& AutoChallenge::GetGUIInfo() const
|
||||||
|
{
|
||||||
|
static const FeatureGUIInfo info{ "Auto Challenge", "World", true };
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoChallenge::DrawMain()
|
||||||
|
{
|
||||||
|
ConfigWidget("Enabled", f_Enabled, "Auto collect time challenge item");
|
||||||
|
ImGui::SameLine();
|
||||||
|
ConfigWidget("Destroy Bomb", f_BombDestroy, "Auto destroy bombbarrel");
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextColored(ImColor(255, 165, 0, 255), "I haven't tested how high the risk is");
|
||||||
|
ImGui::SetNextItemWidth(200.f);
|
||||||
|
ConfigWidget("Range", f_Range, 0.1f, 0.f, 300.f, "Collect range.");
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SetNextItemWidth(200.f);
|
||||||
|
ConfigWidget("Delay", f_Delay, 1, 0, 2000, "Collect delay.");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AutoChallenge::NeedStatusDraw() const
|
||||||
|
{
|
||||||
|
return f_Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoChallenge::DrawStatus()
|
||||||
|
{
|
||||||
|
ImGui::Text("Challenge [%.01fm]", f_Range.value());
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoChallenge& AutoChallenge::GetInstance()
|
||||||
|
{
|
||||||
|
static AutoChallenge instance;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoChallenge::OnGameUpdate()
|
||||||
|
{
|
||||||
|
static uint64_t lastTime = 0;
|
||||||
|
auto timestamp = app::MoleMole_TimeUtil_get_NowTimeStamp(nullptr);
|
||||||
|
|
||||||
|
if (!f_Enabled || lastTime + f_Delay > timestamp)
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto& entityManager = game::EntityManager::instance();
|
||||||
|
auto avatarEntity = entityManager.avatar();
|
||||||
|
|
||||||
|
for (auto& entity : entityManager.entities(game::filters::puzzle::TimeTrialChallengeCollection))
|
||||||
|
{
|
||||||
|
if (avatarEntity->distance(entity) > f_Range)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto combat = entity->combat();
|
||||||
|
if (combat != nullptr)
|
||||||
|
{
|
||||||
|
auto combatProp = combat->fields._combatProperty_k__BackingField;
|
||||||
|
auto maxHP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.maxHP, nullptr);
|
||||||
|
// so many entities named "SkillObj_EmptyGadget", but the collection's hp is 99999.f
|
||||||
|
if (maxHP > 99998 && maxHP < 99999.9)
|
||||||
|
{
|
||||||
|
entity->setRelativePosition(avatarEntity->relativePosition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
cheat-library/src/user/cheat/world/AutoChallenge.h
Normal file
30
cheat-library/src/user/cheat/world/AutoChallenge.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <cheat-base/cheat/Feature.h>
|
||||||
|
#include <cheat-base/config/config.h>
|
||||||
|
|
||||||
|
namespace cheat::feature
|
||||||
|
{
|
||||||
|
|
||||||
|
class AutoChallenge : public Feature
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
||||||
|
config::Field<config::Toggle<Hotkey>> f_BombDestroy;
|
||||||
|
config::Field<int> f_Delay;
|
||||||
|
config::Field<float> f_Range;
|
||||||
|
|
||||||
|
static AutoChallenge& GetInstance();
|
||||||
|
|
||||||
|
void OnGameUpdate();
|
||||||
|
|
||||||
|
const FeatureGUIInfo& GetGUIInfo() const override;
|
||||||
|
void DrawMain() override;
|
||||||
|
|
||||||
|
virtual bool NeedStatusDraw() const override;
|
||||||
|
void DrawStatus() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
AutoChallenge();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,7 @@
|
|||||||
#include <cheat/events.h>
|
#include <cheat/events.h>
|
||||||
#include <cheat/game/SimpleFilter.h>
|
#include <cheat/game/SimpleFilter.h>
|
||||||
#include <cheat/game/EntityManager.h>
|
#include <cheat/game/EntityManager.h>
|
||||||
|
#include <cheat/world/AutoChallenge.h>
|
||||||
#include <cheat/game/filters.h>
|
#include <cheat/game/filters.h>
|
||||||
|
|
||||||
namespace cheat::feature
|
namespace cheat::feature
|
||||||
@ -81,7 +82,17 @@ namespace cheat::feature
|
|||||||
{
|
{
|
||||||
auto& manager = game::EntityManager::instance();
|
auto& manager = game::EntityManager::instance();
|
||||||
auto& autoDestroy = AutoDestroy::GetInstance();
|
auto& autoDestroy = AutoDestroy::GetInstance();
|
||||||
|
auto& autoChallenge = AutoChallenge::GetInstance();
|
||||||
auto entity = __this->fields._._._entity;
|
auto entity = __this->fields._._._entity;
|
||||||
|
// call origin ReduceModifierDurability without correct modifierDurabilityIndex will coz game crash.
|
||||||
|
// so use this hook function to destroy challenge's bombbarrel
|
||||||
|
if (autoChallenge.f_Enabled && autoChallenge.f_BombDestroy &&
|
||||||
|
autoChallenge.f_Range > manager.avatar()->distance(entity) &&
|
||||||
|
game::filters::puzzle::Bombbarrel.IsValid(manager.entity(entity))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
reduceDurability = 1000.f;
|
||||||
|
}
|
||||||
if (autoDestroy.f_Enabled &&
|
if (autoDestroy.f_Enabled &&
|
||||||
autoDestroy.f_Range > manager.avatar()->distance(entity) &&
|
autoDestroy.f_Range > manager.avatar()->distance(entity) &&
|
||||||
(
|
(
|
||||||
|
Loading…
Reference in New Issue
Block a user