From: Daniel Karbach Date: Sun, 18 Nov 2012 16:15:19 +0000 (+0100) Subject: lousy but working implementation of spell swapping X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=aacd6d095d1e200cee6033fbf8221bea9a6c3112;p=l2e.git lousy but working implementation of spell swapping --- diff --git a/src/menu/SpellMenu.cpp b/src/menu/SpellMenu.cpp index 3be722b..57989ed 100644 --- a/src/menu/SpellMenu.cpp +++ b/src/menu/SpellMenu.cpp @@ -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(); }