Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
937 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface for the client to interact with the CTradingSession
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef TF_TRADING_H
  8. #define TF_TRADING_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class CEconItemView;
  13. /**
  14. * @return CSteamID of the client
  15. */
  16. CSteamID Trading_GetLocalPlayerSteamID();
  17. /**
  18. * Request a trade session with the player by player index (i.e. in the same game)
  19. * @param iPlayerIdx
  20. */
  21. void Trading_RequestTrade( int iPlayerIdx );
  22. /**
  23. * Request a trade session with the player by CSteamID
  24. * @param steamID
  25. */
  26. void Trading_RequestTrade( const CSteamID &steamID );
  27. /**
  28. * Sends a gift to the player with the given steamID
  29. * @param steamID
  30. * @param giftItem
  31. */
  32. void Trading_SendGift( const CSteamID &steamID, const CEconItemView& giftItem );
  33. #endif // TF_TRADING_H