IUnitInfo.h 840 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * IUnitInfo.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../GameConstants.h"
  12. class CCreature;
  13. namespace battle
  14. {
  15. class Unit;
  16. class DLL_LINKAGE IUnitEnvironment
  17. {
  18. public:
  19. virtual bool unitHasAmmoCart(const Unit * unit) const = 0; //todo: handle ammo cart with bonus system
  20. virtual PlayerColor unitEffectiveOwner(const Unit * unit) const = 0;
  21. };
  22. class DLL_LINKAGE IUnitInfo
  23. {
  24. public:
  25. virtual int32_t unitBaseAmount() const = 0;
  26. virtual uint32_t unitId() const = 0;
  27. virtual ui8 unitSide() const = 0;
  28. virtual PlayerColor unitOwner() const = 0;
  29. virtual SlotID unitSlot() const = 0;
  30. virtual const CCreature * unitType() const = 0;
  31. };
  32. }