purchaserequestevent.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Commando *
  23. * *
  24. * $Archive:: /Commando/Code/commando/purchaserequestevent.h $*
  25. * *
  26. * $Author:: Patrick $*
  27. * *
  28. * $Modtime:: 1/05/02 5:45p $*
  29. * *
  30. * $Revision:: 5 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef __PURCHASEREQUESTEVENT_H__
  36. #define __PURCHASEREQUESTEVENT_H__
  37. #include "netevent.h"
  38. #include "netclassids.h"
  39. #include "vendor.h"
  40. //-----------------------------------------------------------------------------
  41. //
  42. // A C->S mirrored object for C&C mode purchase requests
  43. //
  44. class cPurchaseRequestEvent : public cNetEvent
  45. {
  46. public:
  47. cPurchaseRequestEvent(void);
  48. void Init(VendorClass::PURCHASE_TYPE type, int item_index, int alt_skin_index);
  49. virtual void Export_Creation(BitStreamClass &packet);
  50. virtual void Import_Creation(BitStreamClass &packet);
  51. virtual uint32 Get_Network_Class_ID(void) const {return NETCLASSID_PURCHASEREQUESTEVENT;}
  52. private:
  53. virtual void Act(void);
  54. int SenderId;
  55. int PurchaseType;
  56. int ItemIndex;
  57. int AltSkinIndex;
  58. };
  59. //-----------------------------------------------------------------------------
  60. #endif // __PURCHASEREQUESTEVENT_H__