]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/SpellMenu.cpp
lousy but working implementation of spell swapping
[l2e.git] / src / menu / SpellMenu.cpp
index 3be722bffa550313b9005d408a166268bb68b329..57989ed2a9396e659fc0fa5cb5a416f0830d0b94 100644 (file)
@@ -132,7 +132,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();
                }