X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2Fstates%2FSelectSpell.cpp;h=a9c06cceccc912ca59e3530ce361e52b7fbb2880;hb=222167ba3722dc7f47ff7510006bd516e0010a50;hp=62e7c4619c4646eaaf81be6f679d84c7b11a8824;hpb=b6469d8a22e60335fd8d9304569e648310ddc399;p=l2e.git diff --git a/src/battle/states/SelectSpell.cpp b/src/battle/states/SelectSpell.cpp index 62e7c46..a9c06cc 100644 --- a/src/battle/states/SelectSpell.cpp +++ b/src/battle/states/SelectSpell.cpp @@ -37,6 +37,8 @@ void SelectSpell::ExitState(Application &c, SDL_Surface *screen) { void SelectSpell::ResumeState(Application &ctrl, SDL_Surface *screen) { if (battle->ActiveHeroTargets().HasSelected()) { + battle->SetAttackType(AttackChoice::MAGIC); + battle->ActiveHeroAttackChoice().SetSpell(battle->GetSpellMenu().Selected()); ctrl.PopState(); } } @@ -51,7 +53,7 @@ void SelectSpell::Resize(int width, int height) { } -void SelectSpell::HandleInput(const Input &input) { +void SelectSpell::HandleEvents(const Input &input) { if (input.JustPressed(Input::ACTION_A)) { if (battle->GetSpellMenu().SelectedIsEnabled()) { const Spell *spell(battle->GetSpellMenu().Selected());