diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index acb3964..0827961 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -221,7 +221,8 @@ namespace cheat::game::filters SimpleFilter JadeplumeTerrorshroom = { EntityType__Enum_1::Monster, "Fungus_Raptor" }; SimpleFilter RishbolandTiger = { EntityType__Enum_1::Monster, "_Megamoth_" }; SimpleFilter ShaggySumpterBeast = { EntityType__Enum_1::Monster, "_Panther" }; - SimpleFilter Spincrocodile = { EntityType__Enum_1::Monster, "_Gator" }; + SimpleFilter Spincrocodile = { EntityType__Enum_1::Monster, "_Gator" }; + SimpleFilter SentryTurrets = { EntityType__Enum_1::Field, "SentryTurrets_" }; } namespace plant diff --git a/cheat-library/src/user/cheat/game/filters.h b/cheat-library/src/user/cheat/game/filters.h index 04d2f74..8a9f2a2 100644 --- a/cheat-library/src/user/cheat/game/filters.h +++ b/cheat-library/src/user/cheat/game/filters.h @@ -220,7 +220,8 @@ namespace cheat::game::filters extern SimpleFilter Beisht; extern SimpleFilter RishbolandTiger; extern SimpleFilter ShaggySumpterBeast; - extern SimpleFilter Spincrocodile; + extern SimpleFilter Spincrocodile; + extern SimpleFilter SentryTurrets; } namespace plant diff --git a/cheat-library/src/user/cheat/player/NoCD.cpp b/cheat-library/src/user/cheat/player/NoCD.cpp index eec629a..d6dc429 100644 --- a/cheat-library/src/user/cheat/player/NoCD.cpp +++ b/cheat-library/src/user/cheat/player/NoCD.cpp @@ -11,14 +11,14 @@ namespace cheat::feature static bool LCAvatarCombat_OnSkillStart(app::LCAvatarCombat* __this, uint32_t skillID, float cdMultipler, MethodInfo* method); static bool LCAvatarCombat_IsSkillInCD_1(app::LCAvatarCombat* __this, app::LCAvatarCombat_LCAvatarCombat_SkillInfo* skillInfo, MethodInfo* method); - static void ActorAbilityPlugin_AddDynamicFloatWithRange_Hook(void* __this, app::String* key, float value, float minValue, float maxValue, + static void ActorAbilityPlugin_AddDynamicFloatWithRange_Hook(app::MoleMole_ActorAbilityPlugin* __this, app::String* key, float value, float minValue, float maxValue, bool forceDoAtRemote, MethodInfo* method); static std::list abilityLog; NoCD::NoCD() : Feature(), NF(f_AbilityReduce, "Reduce Skill/Burst Cooldown", "NoCD", false), - NF(f_TimerReduce, "Reduce Timer", "NoCD", 1.f), + NF(f_TimerReduce, "Reduce Timer", "NoCD", 1.f), NF(f_UtimateMaxEnergy, "Burst max energy", "NoCD", false), NF(f_Sprint, "No Sprint Cooldown", "NoCD", false), NF(f_InstantBow, "Instant bow", "NoCD", false) @@ -28,6 +28,7 @@ namespace cheat::feature HookManager::install(app::MoleMole_HumanoidMoveFSM_CheckSprintCooldown, HumanoidMoveFSM_CheckSprintCooldown_Hook); HookManager::install(app::MoleMole_ActorAbilityPlugin_AddDynamicFloatWithRange, ActorAbilityPlugin_AddDynamicFloatWithRange_Hook); + } const FeatureGUIInfo& NoCD::GetGUIInfo() const @@ -153,21 +154,26 @@ namespace cheat::feature // value - increase value // min and max - bounds of charge. // So, to charge make full charge m_Instantly, just replace value to maxValue. - static void ActorAbilityPlugin_AddDynamicFloatWithRange_Hook(void* __this, app::String* key, float value, float minValue, float maxValue, + static void ActorAbilityPlugin_AddDynamicFloatWithRange_Hook(app::MoleMole_ActorAbilityPlugin* __this, app::String* key, float value, float minValue, float maxValue, bool forceDoAtRemote, MethodInfo* method) { std::time_t t = std::time(nullptr); - auto logEntry = fmt::format("{:%H:%M:%S} | Key: {} value {}.", fmt::localtime(t), il2cppi_to_string(key), value); + auto logEntry = fmt::format("{:%H:%M:%S} | Key: {} value: {} | min: {} | max: {}.", fmt::localtime(t), il2cppi_to_string(key), value, minValue, maxValue); abilityLog.push_front(logEntry); if (abilityLog.size() > 50) abilityLog.pop_back(); - + NoCD& noCD = NoCD::GetInstance(); // This function is calling not only for bows, so if don't put key filter it cause various game mechanic bugs. // For now only "_Enchanted_Time" found for bow charging, maybe there are more. Need to continue research. if (noCD.f_InstantBow && il2cppi_to_string(key) == "_Enchanted_Time") + { value = maxValue; + __this->fields.nextValidAbilityID = 36; // HotFix Yelan, Fishl | It's essentially a game bug. | RyujinZX#7832 + } + CALL_ORIGIN(ActorAbilityPlugin_AddDynamicFloatWithRange_Hook, __this, key, value, minValue, maxValue, forceDoAtRemote, method); } + } diff --git a/cheat-library/src/user/cheat/player/RapidFire.cpp b/cheat-library/src/user/cheat/player/RapidFire.cpp index 4d5dcd2..bcad5ee 100644 --- a/cheat-library/src/user/cheat/player/RapidFire.cpp +++ b/cheat-library/src/user/cheat/player/RapidFire.cpp @@ -186,12 +186,13 @@ namespace cheat::feature bool IsValidByFilter(game::Entity* entity) { if (game::filters::combined::OrganicTargets.IsValid(entity) || + game::filters::monster::SentryTurrets.IsValid(entity) || game::filters::combined::Ores.IsValid(entity) || game::filters::puzzle::Geogranum.IsValid(entity) || game::filters::puzzle::LargeRockPile.IsValid(entity) || game::filters::puzzle::SmallRockPile.IsValid(entity)) return true; - return false; + return false; } // Raises when any entity do hit event. @@ -207,6 +208,7 @@ namespace cheat::feature auto& manager = game::EntityManager::instance(); auto originalTarget = manager.entity(targetID); + if (!IsValidByFilter(originalTarget)) return CALL_ORIGIN(LCBaseCombat_DoHitEntity_Hook, __this, targetID, attackResult, ignoreCheckCanBeHitInMP, method); @@ -236,6 +238,7 @@ namespace cheat::feature } for (const auto& entity : validEntities) { + if (rapidFire.f_MultiHit) { int attackCount = rapidFire.GetAttackCount(__this, entity->runtimeID(), attackResult); for (int i = 0; i < attackCount; i++)