From 44b38173c6156f5d55d54dd1a003cd52a4da643b Mon Sep 17 00:00:00 2001 From: osuphobia <78858975+osuphobia@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:32:52 +0800 Subject: [PATCH] Fix enchantment (#78739) * Fix #78735 * fix `clear()` --- src/magic_enchantment.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index 46f1bd6a39a14..69e5dc15d72d6 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -1466,12 +1466,19 @@ void enchant_cache::clear() skill_values_multiply.clear(); damage_values_add.clear(); damage_values_multiply.clear(); + armor_values_add.clear(); + armor_values_multiply.clear(); + extra_damage_add.clear(); + extra_damage_multiply.clear(); special_vision_vector.clear(); hit_me_effect.clear(); hit_you_effect.clear(); ench_effects.clear(); + emitter.reset(); mutations.clear(); modified_bodyparts.clear(); + intermittent_activation.clear(); + details.clear(); } bool enchant_cache::operator==( const enchant_cache &rhs ) const