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

Commit

Permalink
Fix #268
Browse files Browse the repository at this point in the history
  • Loading branch information
R3nzTheCodeGOD committed Nov 22, 2022
1 parent 1765c2e commit e27e23d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 5 additions & 7 deletions R3nzSkin/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,6 @@ void Hooks::init() noexcept

const auto hash{ fnv::hash_runtime(minion->get_character_data_stack()->base_skin.model.str) };

if (minion->isJungle()) {
const auto config_entry{ cheatManager.config->current_combo_jungle_mob_skin_index.find(hash) };
if (config_entry != cheatManager.config->current_combo_jungle_mob_skin_index.end() && config_entry->second != 0)
changeSkinForObject(minion, config_entry->second - 1);
continue;
}

if (const auto owner{ minion->getGoldRedirectTarget() }; owner) {
if (hash == FNV("JammerDevice") || hash == FNV("SightWard") || hash == FNV("YellowTrinket") || hash == FNV("VisionWard") || hash == FNV("BlueTrinket") || hash == FNV("TestCubeRender10Vision")) {
if (!player || owner == player) {
Expand All @@ -438,6 +431,11 @@ void Hooks::init() noexcept
continue;
}

if (const auto config_entry{ cheatManager.config->current_combo_jungle_mob_skin_index.find(hash) }; config_entry != cheatManager.config->current_combo_jungle_mob_skin_index.end() && config_entry->second != 0) {
changeSkinForObject(minion, config_entry->second - 1);
continue;
}

// Just LocalPlayer
if ((hash == FNV("NunuSnowball") && playerHash == FNV("Nunu")) || (hash == FNV("KindredWolf") && playerHash == FNV("Kindred")) || (hash == FNV("QuinnValor") && playerHash == FNV("Quinn")))
changeSkinForObject(minion, player->get_character_data_stack()->base_skin.skin);
Expand Down
10 changes: 9 additions & 1 deletion R3nzSkin/SDK/GameObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ class GameObject {
CLASS_GETTER_P(std::string, get_name, offsets::GameObject::Name)
CLASS_GETTER(std::int32_t, get_team, offsets::GameObject::Team)


// Returns true for lane minions.
[[nodiscard]] bool isLaneMinion() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsLaneMinion>(std::uintptr_t(this)); }

// Returns true for blue, red and crab.
[[nodiscard]] bool isEliteMinion() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsEliteMinion>(std::uintptr_t(this)); }

// Returns true for dragon, baron, and rift.
[[nodiscard]] bool isEpicMinion() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsEpicMinion>(std::uintptr_t(this)); }

// Returns true for minion.
[[nodiscard]] bool isMinion() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsMinion>(std::uintptr_t(this)); }

// Returns true for objects that both teams can damage, such as jungle objects, gangplain barrels, etc.
[[nodiscard]] bool isJungle() const noexcept { return invoker.invokeThiscall<bool, offsets::GameObject::VTable::IsJungle>(std::uintptr_t(this)); }
};

0 comments on commit e27e23d

Please sign in to comment.