IUnitInfo.h 921 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #include "BattleSide.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. class CCreature;
  15. namespace battle
  16. {
  17. class Unit;
  18. class DLL_LINKAGE IUnitEnvironment
  19. {
  20. public:
  21. virtual bool unitHasAmmoCart(const Unit * unit) const = 0; //todo: handle ammo cart with bonus system
  22. virtual PlayerColor unitEffectiveOwner(const Unit * unit) const = 0;
  23. };
  24. class DLL_LINKAGE IUnitInfo
  25. {
  26. public:
  27. virtual int32_t unitBaseAmount() const = 0;
  28. virtual uint32_t unitId() const = 0;
  29. virtual BattleSide unitSide() const = 0;
  30. virtual PlayerColor unitOwner() const = 0;
  31. virtual SlotID unitSlot() const = 0;
  32. virtual const CCreature * unitType() const = 0;
  33. };
  34. }
  35. VCMI_LIB_NAMESPACE_END