StackLocation.h 622 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * StackLocation.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 "../constants/EntityIdentifiers.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. struct StackLocation
  14. {
  15. ObjectInstanceID army;
  16. SlotID slot;
  17. StackLocation() = default;
  18. StackLocation(const ObjectInstanceID & army, const SlotID & slot)
  19. : army(army)
  20. , slot(slot)
  21. {
  22. }
  23. template<typename Handler>
  24. void serialize(Handler & h)
  25. {
  26. h & army;
  27. h & slot;
  28. }
  29. };
  30. VCMI_LIB_NAMESPACE_END