RumorState.h 778 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * RumorState.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. VCMI_LIB_NAMESPACE_BEGIN
  12. struct DLL_LINKAGE RumorState
  13. {
  14. enum ERumorType : ui8
  15. {
  16. TYPE_NONE = 0, TYPE_RAND, TYPE_SPECIAL, TYPE_MAP
  17. };
  18. enum ERumorTypeSpecial : ui8
  19. {
  20. RUMOR_OBELISKS = 208,
  21. RUMOR_ARTIFACTS = 209,
  22. RUMOR_ARMY = 210,
  23. RUMOR_INCOME = 211,
  24. RUMOR_GRAIL = 212
  25. };
  26. ERumorType type;
  27. std::map<ERumorType, std::pair<int, int>> last;
  28. RumorState(){type = TYPE_NONE;};
  29. bool update(int id, int extra);
  30. template <typename Handler> void serialize(Handler &h)
  31. {
  32. h & type;
  33. h & last;
  34. }
  35. };
  36. VCMI_LIB_NAMESPACE_END