summaryrefslogtreecommitdiff
path: root/game/client/econ/econ_trading.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/econ/econ_trading.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/econ/econ_trading.h')
-rw-r--r--game/client/econ/econ_trading.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/game/client/econ/econ_trading.h b/game/client/econ/econ_trading.h
new file mode 100644
index 0000000..9557dd9
--- /dev/null
+++ b/game/client/econ/econ_trading.h
@@ -0,0 +1,40 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface for the client to interact with the CTradingSession
+//
+// $NoKeywords: $
+//=============================================================================
+
+#ifndef TF_TRADING_H
+#define TF_TRADING_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+class CEconItemView;
+
+/**
+ * @return CSteamID of the client
+ */
+CSteamID Trading_GetLocalPlayerSteamID();
+
+/**
+ * Request a trade session with the player by player index (i.e. in the same game)
+ * @param iPlayerIdx
+ */
+void Trading_RequestTrade( int iPlayerIdx );
+
+/**
+ * Request a trade session with the player by CSteamID
+ * @param steamID
+ */
+void Trading_RequestTrade( const CSteamID &steamID );
+
+/**
+ * Sends a gift to the player with the given steamID
+ * @param steamID
+ * @param giftItem
+ */
+void Trading_SendGift( const CSteamID &steamID, const CEconItemView& giftItem );
+
+#endif // TF_TRADING_H