diff --git a/lib/mapping/CMapHeader.h b/lib/mapping/CMapHeader.h index 3be7fc58e..4f72ec311 100644 --- a/lib/mapping/CMapHeader.h +++ b/lib/mapping/CMapHeader.h @@ -264,7 +264,12 @@ public: h & width; h & height; h & twoLevel; - h & difficulty; + // FIXME: we should serialize enum's according to their underlying type + // should be fixed when we are making breaking change to save compatiblity + static_assert(Handler::Version::MINIMAL < Handler::Version::RELEASE_143); + uint8_t difficultyInteger = static_cast(difficulty); + h & difficultyInteger; + difficulty = static_cast(difficultyInteger); h & levelLimit; h & areAnyPlayers; h & players;