summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/tradewindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 27a8c658e..fe0ca85f1 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -51,6 +51,7 @@
#include "resources/item/item.h"
+#include "net/serverfeatures.h"
#include "net/tradehandler.h"
#include "utils/delete2.h"
@@ -527,6 +528,18 @@ bool TradeWindow::checkItem(const Item *const item) const
}
return false;
}
+ if (serverFeatures->haveSecureTrades() &&
+ item->isEquipped() == Equipped_true)
+ {
+ if (localChatTab)
+ {
+ localChatTab->chatLog(
+ // TRANSLATORS: trade error
+ _("Failed adding item. You can not trade equipped items."),
+ ChatMsgType::BY_SERVER);
+ }
+ return false;
+ }
return true;
}