From 3cfc01907d59161e1390b8a5bcd70a45d0285631 Mon Sep 17 00:00:00 2001 From: Miya Date: Sun, 28 Aug 2022 01:04:33 +0800 Subject: [PATCH] add item for auto challenge in sumeru add bomb , dreamland spirit for auto challenge in sumeru --- cheat-library/src/user/cheat/game/filters.cpp | 4 ++-- .../src/user/cheat/world/AutoChallenge.cpp | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index ceab856..59fedef 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -325,8 +325,8 @@ namespace cheat::game::filters WhitelistFilter DreamForm = { {EntityType__Enum_1::Field, EntityType__Enum_1::Platform }, "_AnimalSeelie" }; SimpleFilter StarlightCoalescence = { EntityType__Enum_1::Field, "_PaperStar" }; SimpleFilter TheRavenForum = { EntityType__Enum_1::Gadget, "_NightCrowStatue" }; - WhitelistFilter TimeTrialChallengeCollection = { { EntityType__Enum_1::Field, EntityType__Enum_1::Gadget }, { "SkillObj_EmptyGadget", "_GlideChampOrb", "_DendroGlideChampOrb" } }; - SimpleFilter Bombbarrel = { EntityType__Enum_1::Gadget, "_Bombbarrel" }; + WhitelistFilter TimeTrialChallengeCollection = { { EntityType__Enum_1::Field, EntityType__Enum_1::Gadget }, { "SkillObj_EmptyGadget", "_GlideChampOrb", "_DendroGlideChampOrb", "_DreamlandSpirit" } }; + SimpleFilter Bombbarrel = { EntityType__Enum_1::Gadget, { "_Bombbarrel", "_XuMiBombBox" } }; SimpleFilter NurseriesInTheWilds = { EntityType__Enum_1::Field, "PlantDrawStart" }; SimpleFilter SaghiraMachine = { EntityType__Enum_1::Gadget, "FatuiMaranaWell" }; SimpleFilter StonePillarSeal = { EntityType__Enum_1::Gadget, "GrassSealRing_" }; diff --git a/cheat-library/src/user/cheat/world/AutoChallenge.cpp b/cheat-library/src/user/cheat/world/AutoChallenge.cpp index 6ff4ed5..bfff670 100644 --- a/cheat-library/src/user/cheat/world/AutoChallenge.cpp +++ b/cheat-library/src/user/cheat/world/AutoChallenge.cpp @@ -72,10 +72,17 @@ namespace cheat::feature auto combat = entity->combat(); if (combat != nullptr) { - auto combatProp = combat->fields._combatProperty_k__BackingField; - auto maxHP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.maxHP, nullptr); - // so many entities named "SkillObj_EmptyGadget", but the collection's hp is 99999.f - if (maxHP > 99998 && maxHP < 99999.9) + if (entity->name().find("SkillObj_EmptyGadget") != std::string::npos) + { + auto combatProp = combat->fields._combatProperty_k__BackingField; + auto maxHP = app::MoleMole_SafeFloat_get_Value(combatProp->fields.maxHP, nullptr); + // so many entities named "SkillObj_EmptyGadget", but the collection's hp is 99999.f + if (maxHP > 99998 && maxHP < 99999.9) + { + entity->setRelativePosition(avatarEntity->relativePosition()); + } + } + else { entity->setRelativePosition(avatarEntity->relativePosition()); }