mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Improvements to type safety of Identifier class
- Constructor of Identifier from integer is now explicit - Lobby hero/town selection now uses Identifiers instead of int's - Removed serialization workaround for hero portraits - Added dummy objects for custom heroes portraits for ID resolver to use - HeroInstance now stores portrait ID only in case of custom portrait - Fixed loading of campaign heroes portraits on RoE maps
This commit is contained in:
@ -240,7 +240,7 @@ PlayerColor InterfaceObjectConfigurable::readPlayerColor(const JsonNode & config
|
||||
{
|
||||
logGlobal->debug("Reading PlayerColor");
|
||||
if(!config.isNull() && config.isString())
|
||||
return PlayerColor::decode(config.String());
|
||||
return PlayerColor(PlayerColor::decode(config.String()));
|
||||
|
||||
logGlobal->debug("Unknown PlayerColor attribute");
|
||||
return PlayerColor::CANNOT_DETERMINE;
|
||||
|
Reference in New Issue
Block a user