From 331f02be3325641e7b1fb2cad0e61265e05dab4b Mon Sep 17 00:00:00 2001 From: nordsoft Date: Fri, 9 Sep 2022 15:29:52 +0400 Subject: [PATCH] Fix spells amount --- lib/CCreatureHandler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/CCreatureHandler.cpp b/lib/CCreatureHandler.cpp index 8fa13ef39..d257dc9e4 100644 --- a/lib/CCreatureHandler.cpp +++ b/lib/CCreatureHandler.cpp @@ -257,7 +257,7 @@ void CCreature::addBonus(int val, Bonus::BonusType type, int subtype) if(existing.empty()) { - auto added = std::make_shared(Bonus::PERMANENT, type, Bonus::CREATURE_ABILITY, val, getIndex(), subtype, Bonus::BASE_NUMBER); + auto added = std::make_shared(Bonus::PERMANENT, type, Bonus::CREATURE_ABILITY, val, getIndex(), subtype, Bonus::ADDITIVE_VALUE); addNewBonus(added); } else @@ -611,9 +611,6 @@ CCreature * CCreatureHandler::loadFromJson(const std::string & scope, const Json if(!node["shots"].isNull()) cre->addBonus(node["shots"].Integer(), Bonus::SHOTS); - if(!node["spellPoints"].isNull()) - cre->addBonus(node["spellPoints"].Integer(), Bonus::CASTS); - loadStackExperience(cre, node["stackExperience"]); loadJsonAnimation(cre, node["graphics"]); loadCreatureJson(cre, node);