1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00
This commit is contained in:
DjWarmonger
2010-08-15 07:39:07 +00:00
parent fd45cd0a6d
commit 2ec775cb46
2 changed files with 7 additions and 13 deletions

View File

@@ -1960,12 +1960,12 @@ UpgradeInfo CGameState::getUpgradeInfo(const CStackInstance &stack)
if(stack.armyObj->ID == TOWNI_TYPE)
t = static_cast<const CGTownInstance *>(stack.armyObj);
else if(h)
{ //TODO: check if hero specialty makes some upgrades possible
{ //hero speciality
BonusList lista = h->speciality.getBonuses(Selector::typeSybtype(Bonus::SPECIAL_UPGRADE, base->idNumber));
for (BonusList::iterator it = lista.begin(); it != lista.end(); it++)
{
ui16 nid = it->additionalInfo;
if (nid != base->idNumber) //sharpshooter appears to be default upgrade of minor creatures (?)
if (nid != base->idNumber) //in very specific case the upgrade is avaliable by default (?)
{
ret.newID.push_back(nid);
ret.cost.push_back(costDiff(VLC->creh->creatures[nid]->cost, base->cost));