summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-11-06 01:53:49 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 16:15:34 +0100
commit204115b64b1984fd3f0e1b524a24a808581cb80a (patch)
tree0d7e9529e468c38c00a5abf40aaa93698ac13083 /src/game.cpp
parentba02a23b63bf0a1fde2194d163ead365d2a4fdf0 (diff)
downloadmana-204115b64b1984fd3f0e1b524a24a808581cb80a.tar.gz
mana-204115b64b1984fd3f0e1b524a24a808581cb80a.tar.bz2
mana-204115b64b1984fd3f0e1b524a24a808581cb80a.tar.xz
mana-204115b64b1984fd3f0e1b524a24a808581cb80a.zip
Do not activate shortcuts if tradewindow is visible.
Conflicts: ChangeLog src/game.cpp (cherry picked from eAthena client)
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/game.cpp b/src/game.cpp
index df6d5578..3e69c28e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -595,15 +595,19 @@ void Game::handleInput()
&& !guildWindow->isWindowFocused())
{
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
- // Checks if any item shortcut is pressed.
- for (int i = KeyboardConfig::KEY_SHORTCUT_0;
- i <= KeyboardConfig::KEY_SHORTCUT_9;
- i++)
+ // Do not activate shortcuts if tradewindow is visible
+ if (!tradeWindow->isVisible())
{
- if (tKey == i) {
- itemShortcut->useItem(
- i - KeyboardConfig::KEY_SHORTCUT_0);
- break;
+ // Checks if any item shortcut is pressed.
+ for (int i = KeyboardConfig::KEY_SHORTCUT_0;
+ i <= KeyboardConfig::KEY_SHORTCUT_9;
+ i++)
+ {
+ if (tKey == i && !used) {
+ itemShortcut->useItem(
+ i - KeyboardConfig::KEY_SHORTCUT_0);
+ break;
+ }
}
}
switch (tKey) {