1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Extend Bonus.addInfo to integer vector (#427)

* changed Bonus::additionalInfo to integer vector

* fixed deserialization for old savegames

* removed newline from JsonNode::toJson()

* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format

* removed unnecessary init in Bonus constructor
This commit is contained in:
Henning Koehler
2018-03-12 18:20:18 +13:00
committed by Alexander Shishkin
parent 83c6ffbda0
commit 7f76648a7c
11 changed files with 199 additions and 41 deletions

View File

@ -1890,7 +1890,7 @@ UpgradeInfo CGameState::getUpgradeInfo(const CStackInstance &stack)
TBonusListPtr lista = h->getBonuses(Selector::typeSubtype(Bonus::SPECIAL_UPGRADE, base->idNumber));
for(const std::shared_ptr<Bonus> it : *lista)
{
auto nid = CreatureID(it->additionalInfo);
auto nid = CreatureID(it->additionalInfo[0]);
if (nid != base->idNumber) //in very specific case the upgrade is available by default (?)
{
ret.newID.push_back(nid);