Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
13.5 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hotline1337 committed Mar 11, 2023
1 parent 492ea33 commit 9928813
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.0f };
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

1 comment on commit 9928813

@synnty
Copy link

@synnty synnty commented on 9928813 Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fork the tft skinchanger and also update it?

Please sign in to comment.