add item for auto challenge in sumeru

add bomb , dreamland spirit for auto challenge in sumeru
This commit is contained in:
Miya 2022-08-28 01:04:33 +08:00
parent 00e5766071
commit 6572cb07a2
2 changed files with 13 additions and 6 deletions

View File

@ -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_" };

View File

@ -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());
}