summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 251204df4..9d1279e3f 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -596,4 +596,23 @@ impHandler0(cleanFonts)
return true;
}
+impHandler(trade)
+{
+ if (!actorManager)
+ return false;
+
+ const Being *being = actorManager->findBeingByName(
+ event.args, ActorType::PLAYER);
+ if (!being)
+ being = localPlayer->getTarget();
+ if (being)
+ {
+ Net::getTradeHandler()->request(being);
+ tradePartnerName = being->getName();
+ if (tradeWindow)
+ tradeWindow->clear();
+ }
+ return true;
+}
+
} // namespace Actions