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.

88 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds defintion for game ammo types
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #ifndef CS_BLACKMARKET_H
  10. #define CS_BLACKMARKET_H
  11. #include "cs_weapon_parse.h"
  12. #ifdef CLIENT_DLL
  13. #include "c_cs_player.h"
  14. #else
  15. #include "cs_player.h"
  16. #endif
  17. #ifdef _WIN32
  18. #pragma once
  19. #endif
  20. struct blackmarket_items_t
  21. {
  22. const char *pClassname;
  23. int iDefaultPrice;
  24. };
  25. extern blackmarket_items_t blackmarket_items[];
  26. void BlackMarketAddWeapon( const char *pWeaponName, CCSPlayer *pBuyer );
  27. enum
  28. {
  29. KEVLAR_PRICE = 650,
  30. HELMET_PRICE = 350,
  31. ASSAULTSUIT_PRICE = 1000,
  32. DEFUSEKIT_PRICE = 200,
  33. NVG_PRICE = 1250,
  34. SHIELD_PRICE = 2200
  35. };
  36. #ifndef CLIENT_DLL
  37. class CBlackMarketElement
  38. {
  39. public:
  40. DECLARE_CLASS_NOBASE( CBlackMarketElement );
  41. // For CNetworkVars.
  42. void NetworkStateChanged();
  43. void NetworkStateChanged( void *pVar );
  44. CBlackMarketElement()
  45. {
  46. m_iPrice = 0;
  47. m_iTimesBought = 0;
  48. m_iWeaponID = 0;
  49. }
  50. CNetworkVar( int, m_iPrice );
  51. CNetworkVar( int, m_iWeaponID );
  52. int m_iTimesBought;
  53. };
  54. #else
  55. class C_BlackMarketElement
  56. {
  57. public:
  58. // This allows the datatables to access private members.
  59. ALLOW_DATATABLES_PRIVATE_ACCESS();
  60. int m_iWeaponID;
  61. int m_iPrice;
  62. };
  63. #define CBlackMarketElement C_BlackMarketElement
  64. #endif
  65. #endif // CS_BLACKMARKET_H