1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

* WIP on event condition format

* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
This commit is contained in:
AlexVinS
2016-11-13 13:38:42 +03:00
parent 5127061e28
commit a85b4cf2a5
70 changed files with 18728 additions and 687 deletions

View File

@@ -281,6 +281,7 @@ CHeroHandler::CHeroHandler()
for (int i = 0; i < GameConstants::SKILL_QUANTITY; ++i)
{
VLC->modh->identifiers.registerObject("core", "skill", NSecondarySkill::names[i], i);
VLC->modh->identifiers.registerObject("core", "secondarySkill", NSecondarySkill::names[i], i);
}
loadObstacles();
loadTerrains();
@@ -542,7 +543,7 @@ void CHeroHandler::loadObject(std::string scope, std::string name, const JsonNod
{
auto object = loadFromJson(data, normalizeIdentifier(scope, "core", name));
object->ID = HeroTypeID(heroes.size());
object->imageIndex = heroes.size() + 30; // 2 special frames + some extra portraits
object->imageIndex = heroes.size() + GameConstants::HERO_PORTRAIT_SHIFT; // 2 special frames + some extra portraits
heroes.push_back(object);