mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
add multi-bonuses support for creature speical skills
This commit is contained in:
@@ -259,10 +259,13 @@ void CGameHandler::levelUpCommander (const CCommanderInstance * c, int skill)
|
||||
}
|
||||
else if (skill >= 100)
|
||||
{
|
||||
scp.which = SetCommanderProperty::SPECIAL_SKILL;
|
||||
scp.accumulatedBonus = *VLC->creh->skillRequirements.at(skill-100).first;
|
||||
scp.additionalInfo = skill; //unnormalized
|
||||
sendAndApply(scp);
|
||||
for(auto & bonus : VLC->creh->skillRequirements.at(skill - 100).first)
|
||||
{
|
||||
scp.which = SetCommanderProperty::SPECIAL_SKILL;
|
||||
scp.accumulatedBonus = *bonus;
|
||||
scp.additionalInfo = skill; //unnormalized
|
||||
sendAndApply(scp);
|
||||
}
|
||||
}
|
||||
expGiven(hero);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user