]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/SpellMenu.cpp
added capsule attack/animation handling
[l2e.git] / src / menu / SpellMenu.cpp
index 3be722bffa550313b9005d408a166268bb68b329..bb66d3c6fcbddff09d6ae5187a0c2b72e3b540fa 100644 (file)
@@ -1,15 +1,9 @@
-/*
- * SpellMenu.cpp
- *
- *  Created on: Nov 18, 2012
- *      Author: holy
- */
-
 #include "SpellMenu.h"
 
 #include "HeroStatus.h"
 #include "PartyMenu.h"
 #include "Resources.h"
+#include "../app/Application.h"
 #include "../app/Input.h"
 #include "../common/GameConfig.h"
 #include "../common/GameState.h"
@@ -132,7 +126,8 @@ void SpellMenu::HandleEvents(const Input &input) {
                                // TODO: use spell
                        }
                } else {
-                       // TODO: swap spells
+                       std::swap(GetHero().Spells().at(spellMenu.SelectedIndex()),
+                                       GetHero().Spells().at(spellMenu.SecondaryIndex()));
                        spellMenu.SwapSelected();
                        spellMenu.SetActive();
                }