OSDN Git Service

[Refactor] #3286 Removed player-redraw-types.h
[hengbandforosx/hengbandosx.git] / src / mspell / mspell-dispel.cpp
index e04d80f..59de9d4 100644 (file)
@@ -1,7 +1,5 @@
 #include "mspell/mspell-dispel.h"
 #include "blue-magic/blue-magic-checker.h"
-#include "core/player-redraw-types.h"
-#include "core/player-update-types.h"
 #include "core/speed-table.h"
 #include "core/window-redrawer.h"
 #include "mind/mind-force-trainer.h"
@@ -29,6 +27,7 @@
 #include "status/sight-setter.h"
 #include "status/temporary-resistance.h"
 #include "system/player-type-definition.h"
+#include "system/redrawing-flags-updater.h"
 #include "view/display-messages.h"
 
 /*!
@@ -96,8 +95,19 @@ static void dispel_player(PlayerType *player_ptr)
         }
 
         player_ptr->action = ACTION_NONE;
-        player_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
-        player_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
+        auto &rfu = RedrawingFlagsUpdater::get_instance();
+        const auto flags_srf = {
+            StatusRedrawingFlag::BONUS,
+            StatusRedrawingFlag::HP,
+            StatusRedrawingFlag::MONSTER_STATUSES,
+        };
+        rfu.set_flags(flags_srf);
+        const auto flags_mwrf = {
+            MainWindowRedrawingFlag::MAP,
+            MainWindowRedrawingFlag::TIMED_EFFECT,
+            MainWindowRedrawingFlag::ACTION,
+        };
+        rfu.set_flags(flags_mwrf);
         player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
         player_ptr->energy_need += ENERGY_NEED();
     }