Skip to content

Commit

Permalink
Merge branch 'R3nzTheCodeGOD:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
good-ideal authored Mar 12, 2023
2 parents 2eb0256 + 9928813 commit 944a93a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions R3nzSkin/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Config {
float fontScale{ 1.4f };
bool heroName{ true };
bool quickSkinChange{ false };
bool shouldReassignSkin{ false };
// player
std::int32_t current_combo_skin_index{ 0 };

Expand Down
20 changes: 20 additions & 0 deletions R3nzSkin/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,26 @@ namespace d3d_vtable {
const auto client{ cheatManager.memory->client };
if (client && client->game_state == GGameState_s::Running) {
cheatManager.hooks->init();

/* 13.5 reset fix */
const auto player{ cheatManager.memory->localPlayer };
if (!cheatManager.config->shouldReassignSkin && player->get_health() == player->get_max_health())
{
if (player)
{
if (cheatManager.config->current_combo_skin_index > 0)
{
const auto& values{ cheatManager.database->champions_skins[fnv::hash_runtime(player->get_character_data_stack()->base_skin.model.str)] };
player->change_skin(values[cheatManager.config->current_combo_skin_index - 1].model_name, values[cheatManager.config->current_combo_skin_index - 1].skin_id);
cheatManager.config->shouldReassignSkin = true;
}
}
}
else
{
cheatManager.config->shouldReassignSkin = false;
}

if (cheatManager.gui->is_open) {
if (is_d3d11)
::ImGui_ImplDX11_NewFrame();
Expand Down
2 changes: 2 additions & 0 deletions R3nzSkin/SDK/GameObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class GameObject {
public:
CLASS_GETTER_P(std::string, get_name, offsets::GameObject::Name)
CLASS_GETTER(std::int32_t, get_team, offsets::GameObject::Team)
CLASS_GETTER(std::int32_t, get_health, offsets::GameObject::Health)
CLASS_GETTER(std::int32_t, get_max_health, offsets::GameObject::MaxHealth)

// Returns true for lane minions.
[[nodiscard]] bool isLaneMinion() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsLaneMinion>(std::uintptr_t(this)); }
Expand Down
4 changes: 3 additions & 1 deletion R3nzSkin/offsets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ namespace offsets {
};
enum {
Team = 0x34,
Name = 0x54
Name = 0x54,
Health = 0xE7C,
MaxHealth = Health + 0x10
};
};

Expand Down

0 comments on commit 944a93a

Please sign in to comment.