commit
f017b8d08b
@ -15,6 +15,7 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="src\user\cheat\world\FakeTime.h" />
|
||||||
<ClInclude Include="src\user\cheat\debugger.h">
|
<ClInclude Include="src\user\cheat\debugger.h">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WS|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WS|x64'">false</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
@ -131,6 +132,7 @@
|
|||||||
<Font Include="res\Ruda-ExtraBold.ttf" />
|
<Font Include="res\Ruda-ExtraBold.ttf" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\user\cheat\world\FakeTime.cpp" />
|
||||||
<ClCompile Include="src\user\cheat\debugger.cpp">
|
<ClCompile Include="src\user\cheat\debugger.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WS|x64'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WS|x64'">false</ExcludedFromBuild>
|
||||||
|
@ -225,6 +225,9 @@
|
|||||||
<ClInclude Include="src\user\cheat\world\AutoCook.h">
|
<ClInclude Include="src\user\cheat\world\AutoCook.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="src\user\cheat\world\FakeTime.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="src\user\cheat\visuals\ProfileChanger.h">
|
<ClInclude Include="src\user\cheat\visuals\ProfileChanger.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -426,6 +429,9 @@
|
|||||||
<ClCompile Include="src\user\cheat\debugger.cpp">
|
<ClCompile Include="src\user\cheat\debugger.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\user\cheat\world\FakeTime.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\user\cheat\visuals\ProfileChanger.cpp">
|
<ClCompile Include="src\user\cheat\visuals\ProfileChanger.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -319,6 +319,9 @@ DO_APP_FUNC(0x06552F50, Rect, RectTransform_get_rect, (RectTransform* __this, Me
|
|||||||
DO_APP_FUNC(0x06677BD0, float, Canvas_get_scaleFactor, (/*Canvas**/void* __this, MethodInfo* method));
|
DO_APP_FUNC(0x06677BD0, float, Canvas_get_scaleFactor, (/*Canvas**/void* __this, MethodInfo* method));
|
||||||
|
|
||||||
|
|
||||||
|
DO_APP_FUNC(0x00935700, void, LevelTimeManager_SetInternalTimeOfDay, (/*LevelTimeManager**/void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method));
|
||||||
|
|
||||||
|
|
||||||
// Singletons
|
// Singletons
|
||||||
DO_APP_FUNC(0x05189A90, void*, Singleton_GetInstance, (MethodInfo* method));
|
DO_APP_FUNC(0x05189A90, void*, Singleton_GetInstance, (MethodInfo* method));
|
||||||
DO_APP_FUNC_METHODINFO(0x096EA3B0, Singleton_1_MoleMole_MapModule__get_Instance__MethodInfo);
|
DO_APP_FUNC_METHODINFO(0x096EA3B0, Singleton_1_MoleMole_MapModule__get_Instance__MethodInfo);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <cheat/world/MobVacuum.h>
|
#include <cheat/world/MobVacuum.h>
|
||||||
#include <cheat/world/AutoTreeFarm.h>
|
#include <cheat/world/AutoTreeFarm.h>
|
||||||
#include <cheat/world/AutoDestroy.h>
|
#include <cheat/world/AutoDestroy.h>
|
||||||
|
#include <cheat/world/FakeTime.h>
|
||||||
|
|
||||||
#include <cheat/teleport/ChestTeleport.h>
|
#include <cheat/teleport/ChestTeleport.h>
|
||||||
#include <cheat/teleport/MapTeleport.h>
|
#include <cheat/teleport/MapTeleport.h>
|
||||||
@ -86,6 +87,7 @@ namespace cheat
|
|||||||
FEAT_INST(ElementalSight),
|
FEAT_INST(ElementalSight),
|
||||||
FEAT_INST(KillAura),
|
FEAT_INST(KillAura),
|
||||||
FEAT_INST(MobVacuum),
|
FEAT_INST(MobVacuum),
|
||||||
|
FEAT_INST(FakeTime),
|
||||||
|
|
||||||
FEAT_INST(ChestTeleport),
|
FEAT_INST(ChestTeleport),
|
||||||
FEAT_INST(OculiTeleport),
|
FEAT_INST(OculiTeleport),
|
||||||
|
67
cheat-library/src/user/cheat/world/FakeTime.cpp
Normal file
67
cheat-library/src/user/cheat/world/FakeTime.cpp
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#include "pch-il2cpp.h"
|
||||||
|
#include "FakeTime.h"
|
||||||
|
#include <cheat/events.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace cheat::feature
|
||||||
|
{
|
||||||
|
//CNLouisLiu
|
||||||
|
void* LevelTimeManager = NULL;
|
||||||
|
FakeTime::FakeTime() : Feature(),
|
||||||
|
NF(f_Enabled, "FakeTime", "Enabled", false),
|
||||||
|
NF(f_TimeHour, "FakeTime", "TimeHour", 12),
|
||||||
|
NF(f_TimeMinute, "FakeTime", "TimeMinute", 0)
|
||||||
|
{
|
||||||
|
HookManager::install(app::LevelTimeManager_SetInternalTimeOfDay, LevelTimeManager_SetInternalTimeOfDay_Hook);
|
||||||
|
|
||||||
|
events::GameUpdateEvent += MY_METHOD_HANDLER(FakeTime::OnGameUpdate);
|
||||||
|
}
|
||||||
|
FakeTime& FakeTime::GetInstance()
|
||||||
|
{
|
||||||
|
static FakeTime instance;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
const FeatureGUIInfo& FakeTime::GetGUIInfo() const
|
||||||
|
{
|
||||||
|
static const FeatureGUIInfo info{ "FakeTime", "World", true };
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
void FakeTime::DrawMain()
|
||||||
|
{
|
||||||
|
ConfigWidget("Enabled", f_Enabled, "Keep game time the same");
|
||||||
|
ConfigWidget("TimeHour", f_TimeHour, 1, 0, 24);
|
||||||
|
ConfigWidget("TimeMinute", f_TimeMinute, 1, 0, 60);
|
||||||
|
}
|
||||||
|
bool FakeTime::NeedStatusDraw() const
|
||||||
|
{
|
||||||
|
return f_Enabled;
|
||||||
|
}
|
||||||
|
void FakeTime::DrawStatus()
|
||||||
|
{
|
||||||
|
ImGui::Text("FakeTime|%d:%d", f_TimeHour.value(), f_TimeMinute.value());
|
||||||
|
}
|
||||||
|
float FakeTime::ConversionTime() {
|
||||||
|
|
||||||
|
float time = float(f_TimeHour);
|
||||||
|
float timemin = f_TimeMinute / 60;
|
||||||
|
return time + timemin;
|
||||||
|
}
|
||||||
|
void FakeTime::OnGameUpdate()
|
||||||
|
{
|
||||||
|
if (LevelTimeManager != NULL && f_Enabled) {
|
||||||
|
auto& faketime = GetInstance();
|
||||||
|
CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, faketime.ConversionTime(), false, false, (MethodInfo*)0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void FakeTime::LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method) {
|
||||||
|
float Hours = inHours;
|
||||||
|
auto& faketime = GetInstance();
|
||||||
|
if (faketime.f_Enabled)
|
||||||
|
{
|
||||||
|
Hours = faketime.ConversionTime();
|
||||||
|
}
|
||||||
|
CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, __this, Hours, force, refreshEnviroTime, method);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
cheat-library/src/user/cheat/world/FakeTime.h
Normal file
23
cheat-library/src/user/cheat/world/FakeTime.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
namespace cheat::feature
|
||||||
|
{
|
||||||
|
|
||||||
|
class FakeTime : public Feature
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
||||||
|
config::Field<int> f_TimeHour;
|
||||||
|
config::Field<int> f_TimeMinute;
|
||||||
|
|
||||||
|
static FakeTime& GetInstance();
|
||||||
|
void OnGameUpdate();
|
||||||
|
const FeatureGUIInfo& GetGUIInfo() const override;
|
||||||
|
void DrawMain() override;
|
||||||
|
virtual bool NeedStatusDraw() const override;
|
||||||
|
void DrawStatus() override;
|
||||||
|
private:
|
||||||
|
static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method);
|
||||||
|
float ConversionTime();
|
||||||
|
FakeTime();
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user