diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-26 13:30:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-26 13:30:24 +0300 |
commit | 1a9330a5f6cd753b4155ac74db104cb0ffa095c9 (patch) | |
tree | d3d24cfc1101b99e2055a9330b2e31522512f0c3 /src/actions | |
parent | 793e570728840dd788f9104e54828c1530016d61 (diff) | |
download | mv-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.gz mv-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.bz2 mv-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.tar.xz mv-1a9330a5f6cd753b4155ac74db104cb0ffa095c9.zip |
Allow open cart window only if cart status effect enabled.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/windows.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index 9a7743590..91d965748 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -22,6 +22,8 @@ #include "actions/actiondef.h" +#include "being/localplayer.h" + #include "gui/dialogsmanager.h" #include "gui/windows/bankwindow.h" @@ -277,8 +279,12 @@ impHandler0(bankWindowShow) impHandler0(cartWindowShow) { - if (!serverFeatures->haveCart()) + if (!serverFeatures->haveCart() + || !localPlayer + || !localPlayer->getHaveCart()) + { return false; + } showHideWindow(cartWindow); return true; |