Clone of PhatAC @ https://github.com/floaterxk/PhatAC

Item.h 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #pragma once
  2. enum eEquipSlot
  3. {
  4. eEquipSlotNone = 0,
  5. eEquipSlotMelee = 1,
  6. eEquipSlotMissile = 2,
  7. eEquipSlotShield = 3
  8. };
  9. enum eEquipType
  10. {
  11. eEquipTypeNone = 0,
  12. eEquipTypeMelee = 1,
  13. eEquipTypeMissile = 2,
  14. eEquipTypeAmmo = 3,
  15. eEquipTypeShield = 4
  16. };
  17. enum eSlotType
  18. {
  19. eSlotItem = 0,
  20. eSlotContainer = 1,
  21. eSlotFoci = 2
  22. };
  23. #define CA_HEAD 0x00000001
  24. #define CA_CHEST_UNDERWEAR 0x00000002
  25. #define CA_GIRTH_UNDERWEAR 0x00000004
  26. #define CA_UPPERARMS_UNDERWEAR 0x00000008
  27. #define CA_LOWERARMS_UNDERWEAR 0x00000010
  28. #define CA_HANDS 0x00000020
  29. #define CA_UPPERLEGS_UNDERWEAR 0x00000040
  30. #define CA_LOWERLEGS_UNDERWEAR 0x00000080
  31. #define CA_FEET 0x00000100
  32. #define CA_CHEST 0x00000200
  33. #define CA_GIRTH 0x00000400
  34. #define CA_UPPERARMS 0x00000800
  35. #define CA_LOWERARMS 0x00001000
  36. #define CA_UPPERLEGS 0x00002000
  37. #define CA_LOWERLEGS 0x00004000
  38. #define CA_WEAPON_MELEE 0x00100000
  39. #define CA_SHIELD 0x00200000
  40. #define CA_WEAPON_PROJECTILE 0x00400000
  41. #define CA_WEAPON_AMMUNITION 0x00800000
  42. #define CA_WEAPON_FOCUS 0x01000000
  43. class CBaseItem : public CPhysicsObj
  44. {
  45. public:
  46. CBaseItem();
  47. ~CBaseItem();
  48. virtual BOOL IsItem() { return TRUE; }
  49. BOOL IsContained();
  50. BOOL IsWielded();
  51. virtual DWORD GetLandcell();
  52. virtual DWORD GetContainerID();
  53. virtual DWORD GetWielderID();
  54. CPhysicsObj* GetWorldContainer();
  55. CPhysicsObj* GetWorldWielder();
  56. virtual void SetWorldContainer(DWORD dwCell, CPhysicsObj *pContainer);
  57. virtual void SetWorldWielder(DWORD dwCell, CPhysicsObj *pWielder);
  58. virtual void SetWorldCoverage(DWORD dwCell, DWORD dwCoverage);
  59. virtual DWORD GetEquipSlot() { return m_dwEquipSlot; }
  60. virtual DWORD GetEquipType() { return m_dwEquipType; }
  61. virtual DWORD GetCoverage1() { return m_dwCoverage1; }
  62. virtual DWORD GetCoverage2() { return m_dwCoverage2; }
  63. virtual DWORD GetCoverage3() { return m_dwCoverage3; }
  64. virtual DWORD GetSlotType() { return eSlotItem; }
  65. virtual BOOL HasBurden() { return TRUE; }
  66. virtual BOOL HasValue() { return TRUE; }
  67. virtual BOOL HasCoverage();
  68. BOOL CanEquip();
  69. // protected:
  70. BYTE m_bWieldSequence;
  71. BYTE m_bContainSequence;
  72. BYTE m_bCoverSequence;
  73. CPhysicsObj* m_pWielder;
  74. CPhysicsObj* m_pContainer;
  75. };
  76. class CBaseWand : public CBaseItem
  77. {
  78. public:
  79. CBaseWand();
  80. };
  81. class CBaseArmor : public CBaseItem
  82. {
  83. public:
  84. CBaseArmor();
  85. };
  86. class CAcademyCoat : public CBaseArmor
  87. {
  88. public:
  89. CAcademyCoat();
  90. };
  91. class CTuskerHelm : public CBaseArmor
  92. {
  93. public:
  94. CTuskerHelm();
  95. };
  96. class CBoboHelm : public CBaseArmor
  97. {
  98. public:
  99. CBoboHelm();
  100. };
  101. class CPhatRobe : public CBaseArmor
  102. {
  103. public:
  104. CPhatRobe();
  105. };
  106. class CEnvoyShield : public CBaseItem
  107. {
  108. public:
  109. CEnvoyShield();
  110. };