diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index 7f17ba1..dd7557f 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -900,7 +900,8 @@ - "$(OutDir)injector.exe" powershell -nop -c "& {sleep 15}" + "$(OutDir)injector.exe" +powershell -nop -c "& {sleep 20}" $(OutDir)_noexist.nope;%(Outputs) $(TargetPath);%(Inputs) diff --git a/cheat-library/src/appdata/il2cpp-types-ptr.h b/cheat-library/src/appdata/il2cpp-types-ptr.h index 29ca488..dfe6565 100644 --- a/cheat-library/src/appdata/il2cpp-types-ptr.h +++ b/cheat-library/src/appdata/il2cpp-types-ptr.h @@ -12,6 +12,7 @@ DO_TYPEDEF(0x0967B508, Int32); // v 2.7 DO_TYPEDEF(0x0968AD88, LCChestPlugin); DO_TYPEDEF(0x09688FD8, SceneTreeObject); +DO_TYPEDEF(0x0969D1F8, MoleMole_ActorModifier); //// v 2.6 //DO_SINGLETONEDEF(0x0B3442D8, Singleton_1_MoleMole_MapModule_); diff --git a/cheat-library/src/appdata/il2cpp-types.h b/cheat-library/src/appdata/il2cpp-types.h index 36ed667..3060455 100644 --- a/cheat-library/src/appdata/il2cpp-types.h +++ b/cheat-library/src/appdata/il2cpp-types.h @@ -4118,6 +4118,10 @@ namespace app { uint16_t _value; }; + struct SimpleSafeInt16 { + uint16_t _value; + }; + struct Quaternion { float x; float y; @@ -11728,6 +11732,178 @@ namespace app { struct MoleMole_VCBaseSetDitherValue__Fields fields; }; + enum class MoleMole_Config_AbilityState__Enum : uint64_t { + None = 0x0000000000000000, + Invincible = 0x0000000000000001, + DenyLockOn = 0x0000000000000002, + IsGhostToAllied = 0x0000000000000004, + IsGhostToEnemy = 0x0000000000000008, + ElementBurning = 0x0000000000000010, + ElementWet = 0x0000000000000020, + ElementFrozen = 0x0000000000000080, + LockHP = 0x0000000000000200, + IgnoreTriggerBullet = 0x0000000000000400, + ElementShock = 0x0000000000000800, + Struggle = 0x0000000000001000, + ElementRock = 0x0000000000002000, + ElementIce = 0x0000000000008000, + ElementFreeze = 0x0000000000010000, + AttackUp = 0x0000000000020000, + DefenseUp = 0x0000000000040000, + SpeedUp = 0x0000000000080000, + DefenseDown = 0x0000000000100000, + SpeedDown = 0x0000000000200000, + ElementWind = 0x0000000000400000, + ElementElectric = 0x0000000000800000, + ElementFire = 0x0000000001000000, + NoHeal = 0x0000000002000000, + Limbo = 0x0000000004000000, + MuteTaunt = 0x0000000008000000, + ElementPetrifaction = 0x0000000010000000, + IgnoreAddEnergy = 0x0000000040000000, + ElementGrass = 0x0000000080000000, + ElementOverdose = 0x0000000100000000, + Corruption = 0x0000000200000000, + UnlockFrequencyLimit = 0x0000000400000000, + ElementDeadTime = 0x0000000800000000, + }; + + enum class MoleMole_Config_ModifierTimeScale__Enum : int32_t { + Owner = 0x00000000, + Level = 0x00000001, + }; + + enum class MoleMole_Config_ModifierStacking__Enum : int32_t { + Refresh = 0x00000000, + Unique = 0x00000001, + Prolong = 0x00000002, + RefreshAndAddDurability = 0x00000003, + Multiple = 0x00000004, + MultipleRefresh = 0x00000005, + MultipleRefreshNoRemove = 0x00000006, + MultipleAllRefresh = 0x00000007, + GlobalUnique = 0x00000008, + Overlap = 0x00000009, + RefreshUniqueDurability = 0x0000000a, + }; + + enum class MoleMole_Config_ConfigAbilityModifier_MoleMole_Config_ConfigAbilityModifier_ModifierMPBehavior__Enum : int32_t { + NormallySynced = 0x00000000, + MuteRemoteAuthorityOnly = 0x00000001, + }; + + struct __declspec(align(8)) MoleMole_Config_ConfigAbilityModifier__Fields { + MoleMole_Config_ModifierTimeScale__Enum _timeScale; + MoleMole_Config_ModifierStacking__Enum _stacking; + struct MoleMole_Config_ConfigModifierStackingOption* _stackingOption; + bool _isBuff; + bool _isDebuff; + struct String* _modifierName; + bool _isUnique; + struct MoleMole_Config_DynamicFloat* _duration; + ElementType__Enum _elementType; + struct MoleMole_Config_DynamicFloat* _elementDurability; + struct SimpleSafeFloat maxElementDurabilityRawNum; + struct SimpleSafeFloat purgeIncrementRawNum; + bool _isElementDurabilityMutable; + bool _forceTriggerBurning; + bool _overrideWeaponElement; + struct MoleMole_Config_DynamicFloat* _thinkInterval; + struct MoleMole_Config_ConfigAbilityMixin__Array* _modifierMixins; + bool _trimThinkInterval; + struct Dictionary_2_System_String_MoleMole_Config_DynamicFloat_* _properties; + MoleMole_Config_AbilityState__Enum _state; + struct MoleMole_Config_ConfigAbilityStateOption* _stateOption; + bool _muteStateDisplayEffect; + bool _applyAttackerWitchTimeRatio; + struct MoleMole_Config_ConfigAbilityAction__Array* _onAdded; + struct MoleMole_Config_ConfigAbilityAction__Array* _onRemoved; + struct MoleMole_Config_ConfigAbilityAction__Array* _onBeingHit; + struct MoleMole_Config_ConfigAbilityAction__Array* _onAttackLanded; + struct MoleMole_Config_ConfigAbilityAction__Array* _onHittingOther; + struct MoleMole_Config_ConfigAbilityAction__Array* _onThinkInterval; + struct MoleMole_Config_ConfigAbilityAction__Array* CLKOPBOIEEH; + struct MoleMole_Config_ConfigAbilityAction__Array* PBDDACFFPOE; + bool _onThinkIntervalIsFixedUpdate; + struct MoleMole_Config_ConfigAbilityAction__Array* _onKill; + struct MoleMole_Config_ConfigAbilityAction__Array* _onCrash; + struct MoleMole_Config_ConfigAbilityAction__Array* _onAvatarIn; + struct MoleMole_Config_ConfigAbilityAction__Array* _onAvatarOut; + struct MoleMole_Config_ConfigAbilityAction__Array* _onVehicleIn; + struct MoleMole_Config_ConfigAbilityAction__Array* _onVehicleOut; + struct MoleMole_Config_ConfigAbilityAction__Array* _onZoneEnter; + struct MoleMole_Config_ConfigAbilityAction__Array* _onZoneExit; + struct MoleMole_Config_ConfigAbilityAction__Array* _onReconnect; + struct MoleMole_Config_ConfigAbilityAction__Array* _onChangeAuthority; + struct MoleMole_Config_EntityType__Enum__Array* _forbiddenEntities; + bool _fireEventWhenApply; + bool _isDurabilityGlobal; + bool _tickThinkIntervalAfterDie; + bool _thinkIntervalIgnoreTimeScale; + bool _reduceDurablityIgnoreTimeScale; + bool _isLimitedProperties; + bool _forceSyncToRemote; + void* buffIDRawNum; + bool _retainWhenDurabilityIsZero; + struct OCDGDLOKFEB__Enum__Array* HFBALDBFOOH; + int32_t fullNameHashCode; + int32_t configLocalID; + MoleMole_Config_ConfigAbilityModifier_MoleMole_Config_ConfigAbilityModifier_ModifierMPBehavior__Enum mpBehavior; + bool isAuthorityOnly; + }; + + struct MoleMole_Config_ConfigAbilityModifier { + struct MoleMole_Config_ConfigAbilityModifier__Class* klass; + MonitorData* monitor; + struct MoleMole_Config_ConfigAbilityModifier__Fields fields; + }; + + struct __declspec(align(8)) HKMHAGBLLMK__Fields { + struct MoleMole_BaseAbilityMixin__Array* JGLDNAPGGGC; + struct List_1_System_ValueTuple_2__1* JFLGBBBFBLF; + struct List_1_System_ValueTuple_2__2* EFOPNOEMFBI; + struct List_1_MoleMole_Config_ConfigAbilityAction__1* PGICFJEDMAE; + struct List_1_System_ValueTuple_3__1* CGBNAMBLDOE; + struct IList_1_MoleMole_BaseAbilityMixin_* LOGOJNMHLIF; + }; + + struct MoleMole_ActorModifier__Fields { + HKMHAGBLLMK__Fields _; + struct MoleMole_ActorAbility* parentAbility; + uint32_t parentAbilityInstanceID; + struct MoleMole_Config_ConfigAbility* _parentAbilityConfig; + uint32_t parentAbilityEntityID; + uint32_t _applyEntityId_k__BackingField; + struct MoleMole_LCAbility* owner; + struct MoleMole_Config_ConfigAbilityModifier* _config; + struct Dictionary_2_MoleMole_EncryptedString_System_Int32_* stackIndices; + int32_t _parentOwnedIx; + uint32_t instancedModifierID; + struct MoleMole_ActorModifier* attachedInstancedModifier; + uint32_t attachedModifierOwnerEntityId; + uint32_t attachedModifierInstancedModifierId; + bool attachedModifierIsServerBuff; + int32_t attachedModifierNameHash; + bool isAttachedParentAbility; + bool PBDIKHPKHLF; + struct Action_1_MoleMole_ActorModifier_* onDetached; + uint32_t serverBuffUid; + struct Action_1_Nullable_1_Single_* onDurabilityEmpty; + bool _isValid_k__BackingField; + uint64_t _modifierStartTime_k__BackingField; + bool isModifierInvalidByServer; + bool hasAddedAbilityState; + float thinkInterval; + float reduceElementRatio; + float PHKNIPMALFB; + }; + + struct MoleMole_ActorModifier { + struct MoleMole_ActorModifier__Class* klass; + MonitorData* monitor; + struct MoleMole_ActorModifier__Fields fields; + }; + struct Button_1 { struct Button_1__Class* klass; MonitorData* monitor; diff --git a/cheat-library/src/user/cheat/player/GodMode.cpp b/cheat-library/src/user/cheat/player/GodMode.cpp index 484d3db..bc1ae8d 100644 --- a/cheat-library/src/user/cheat/player/GodMode.cpp +++ b/cheat-library/src/user/cheat/player/GodMode.cpp @@ -6,11 +6,6 @@ namespace cheat::feature { - static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method); - static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method); - static void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method); - static bool MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method); - GodMode::GodMode() : Feature(), NFEX(f_Enabled, "God mode", "m_GodMode", "Player", false, false), NF(f_AltGodMode, "Alternative God Mode", "Player", false) @@ -56,7 +51,7 @@ namespace cheat::feature } // Attack immunity (return false when target is avatar, that mean avatar entity isn't attackable) - static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method) + bool GodMode::Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method) { auto& gm = GodMode::GetInstance(); auto& manager = game::EntityManager::instance(); @@ -70,7 +65,7 @@ namespace cheat::feature // Raised when avatar fall on ground. // Sending fall speed, and how many time pass from gain max fall speed (~30m/s). // To disable fall damage reset reachMaxDownVelocityTime and decrease fall velocity. - static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method) + void GodMode::VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method) { auto& gm = GodMode::GetInstance(); if ((gm.f_Enabled || gm.f_AltGodMode) && -velocity.y > 13) @@ -84,7 +79,7 @@ namespace cheat::feature } // Analog function for disable attack damage (Thanks to Taiga74164) - static void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method) + void GodMode::LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method) { auto& gm = GodMode::GetInstance(); auto& manager = game::EntityManager::instance(); @@ -95,13 +90,61 @@ namespace cheat::feature } // Environmental damage immunity (Thanks to RELOADED#7236 / GitHub: @34736384) - static bool MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method) + bool GodMode::MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method) { - auto& gm = GodMode::GetInstance(); - if (gm.f_AltGodMode/* || gm.f_Enabled*/) - return FALSE; + if (GetInstance().NeedBlockHanlerModifierThinkTimeUp(arg)) + return false; return CALL_ORIGIN(MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook, __this, delay, arg, method); } -} + bool GodMode::NeedBlockHanlerModifierThinkTimeUp(app::Object* arg) + { + if (!f_AltGodMode) + return false; + + auto actorModifier = CastTo(arg, *app::MoleMole_ActorModifier__TypeInfo); + if (actorModifier == nullptr) + return false; + + static std::vector modifierBlacklist + { + "BlackMud", + "SERVER_ClimateAbility", + "ElectricWater", + "SeiraiThunder", + "UNIQUE_Monster_", + "Monster_Shougun" + }; + + std::string modifierName = il2cppi_to_string(actorModifier->fields._config->fields._modifierName); + for (auto& forbiddenModifierName : modifierBlacklist) + if (modifierName.find(forbiddenModifierName) != std::string::npos) + return true; + + return false; + } + + // ____________________________________________________________________________________________________________ + // | Name | Description | + // |------------------------------------------------------------------------|-----------------------------------| + // | SERVER_ClimateAbility_Cold_Area | Sheer cold | + // | SERVER_ClimateAbility_Cold_Lv1 | Sheer cold | + // | SERVER_ClimateAbility_Cold_Lv2 | Sheer cold | + // | SERVER_ClimateAbility_TsurumiMist_Area | Electric debuff | + // | SERVER_ClimateAbility_TatariRegion_Area | Electric debuff | + // | SERVER_ClimateAbility_TatariRegion_Lv1 | Electric debuff | + // | SERVER_ClimateAbility_TatariRegion_Lv2 | Electric debuff | + // | SERVER_ClimateAbility_SeiraiStorm_Area | Serai Island | + // | SERVER_ClimateAbility_SeiraiStorm_Lv1 | Serai Island | + // | SERVER_ClimateAbility_SeiraiStorm_Lv2 | Serai Island | + // | SERVER_ClimateAbility_TsurumiMist_Area | Tsurumi Island | + // | ElectricWaterAreaModifier | All electric water in inazuma | + // | BlackMudAreaBuff_Avatar | | + // | BlackMudAreaBuff_Avatar02 | | + // | WaterAreaModifier | | + // | SeiraiThunder_Manager | | + // | UNIQUE_Monster_Shougun_Mitakenarukami_BurstAtk02_NotInShieldPredicated | | + // | Monster_Shougun_Mitakenarukami_BurstAtk02_NotInShieldAtk | | + // |------------------------------------------------------------------------|-----------------------------------| +} \ No newline at end of file diff --git a/cheat-library/src/user/cheat/player/GodMode.h b/cheat-library/src/user/cheat/player/GodMode.h index 79baf5a..94ce8ed 100644 --- a/cheat-library/src/user/cheat/player/GodMode.h +++ b/cheat-library/src/user/cheat/player/GodMode.h @@ -16,10 +16,18 @@ namespace cheat::feature const FeatureGUIInfo& GetGUIInfo() const override; void DrawMain() override; - virtual bool NeedStatusDraw() const override; + bool NeedStatusDraw() const override; void DrawStatus() override; private: + + bool NeedBlockHanlerModifierThinkTimeUp(app::Object* arg); + static bool MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method); + + static void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method); + static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method); + static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method); + GodMode(); }; }