]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/SelectAttackType.cpp
added item select state
[l2e.git] / src / battle / states / SelectAttackType.cpp
index 7dd06f6217b8e610f49828b891994b020ef20c1d..c5e0bba3b580ebcd20886fed04996f54f590b130 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "SelectAttackType.h"
 
+#include "SelectItem.h"
 #include "SelectMoveAction.h"
 #include "SelectSpell.h"
 #include "../AttackChoice.h"
@@ -82,8 +83,7 @@ void SelectAttackType::HandleInput(const Input &input) {
                                battle->NextHero();
                                break;
                        case AttackChoice::ITEM:
-                               // TODO: switch to item select
-                               battle->NextHero();
+                               ctrl->PushState(new SelectItem(battle, this));
                                break;
                        default:
                                throw std::logic_error("selected invalid attack type");