mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Merge pull request #5086 from kdmcser/commander_no_melee_penalty
Ensure the commander has no melee penalty when gaining the SHOOT ability
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