summaryrefslogtreecommitdiff
path: root/src/gui/outfitwindow.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-03-26 15:11:38 -0400
committerChuck Miller <shadowmil@gmail.com>2010-03-26 16:44:25 -0400
commit73e66042017a6421234d2a8293d0d5c2ca10055b (patch)
tree22e20fa1de75e2737b3daf2432f1a8b82dda9338 /src/gui/outfitwindow.cpp
parent3be9cace41bcef4b7bf55bffea5d3596bd588e7e (diff)
downloadmana-73e66042017a6421234d2a8293d0d5c2ca10055b.tar.gz
mana-73e66042017a6421234d2a8293d0d5c2ca10055b.tar.bz2
mana-73e66042017a6421234d2a8293d0d5c2ca10055b.tar.xz
mana-73e66042017a6421234d2a8293d0d5c2ca10055b.zip
Reduce the amount of "Unable to unequip item" when changing outfits.
It will still do it at times because of lag. But this reduced it for me by about 80% Reviewed-by: Jared Adams
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r--src/gui/outfitwindow.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index c7a22fd6..89bf47da 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -162,6 +162,9 @@ void OutfitWindow::action(const gcn::ActionEvent &event)
void OutfitWindow::wearOutfit(int outfit)
{
+ if (mItemsUnequip[outfit])
+ unequipNotInOutfit(outfit);
+
Item *item;
for (int i = 0; i < OUTFIT_ITEM_COUNT; i++)
{
@@ -172,11 +175,6 @@ void OutfitWindow::wearOutfit(int outfit)
Net::getInventoryHandler()->equipItem(item);
}
}
-
- if (mItemsUnequip[outfit])
- {
- unequipNotInOutfit(outfit);
- }
}
void OutfitWindow::copyOutfit(int outfit)