summaryrefslogtreecommitdiffstats
path: root/pokemod/Store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Store.cpp')
-rw-r--r--pokemod/Store.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp
index a8ba35d8..10c40dbd 100644
--- a/pokemod/Store.cpp
+++ b/pokemod/Store.cpp
@@ -82,15 +82,12 @@ void Store::setItem(const int item, const bool state)
emit(error(bounds("item")));
return;
}
- if (state)
+ if (state && !m_item.contains(item))
{
- if (!m_item.contains(item))
- {
- m_item.append(item);
- emit(changed());
- }
+ m_item.append(item);
+ emit(changed());
}
- else
+ else if (m_item.contains(item))
{
m_item.removeAll(item);
emit(changed());