mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
fix recruitment & icons
This commit is contained in:
parent
ebeeff5aa3
commit
abd1a1940a
@ -106,7 +106,16 @@ void QuickRecruitmentWindow::purchaseUnits()
|
||||
{
|
||||
if(selected->slider->getValue())
|
||||
{
|
||||
auto onRecruit = [=](CreatureID id, int count){ LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, selected->creatureOnTheCard->getLevel()-1); };
|
||||
int level = 0;
|
||||
int i = 0;
|
||||
for(auto c : town->town->creatures)
|
||||
{
|
||||
for(auto c2 : c)
|
||||
if(c2 == selected->creatureOnTheCard->getId())
|
||||
level = i;
|
||||
i++;
|
||||
}
|
||||
auto onRecruit = [=](CreatureID id, int count){ LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); };
|
||||
CreatureID crid = selected->creatureOnTheCard->getId();
|
||||
SlotID dstslot = town -> getSlotFor(crid);
|
||||
if(!dstslot.validSlot())
|
||||
|
@ -298,7 +298,7 @@ public:
|
||||
HORDE_2_UPGR, GRAIL, EXTRA_TOWN_HALL, EXTRA_CITY_HALL, EXTRA_CAPITOL,
|
||||
DWELL_FIRST=30, DWELL_LVL_2, DWELL_LVL_3, DWELL_LVL_4, DWELL_LVL_5, DWELL_LVL_6, DWELL_LAST=36,
|
||||
DWELL_UP_FIRST=37, DWELL_LVL_2_UP, DWELL_LVL_3_UP, DWELL_LVL_4_UP, DWELL_LVL_5_UP,
|
||||
DWELL_LVL_6_UP, DWELL_UP_LAST=43, DWELL_LVL_8_UP, DWELL_LVL_8,
|
||||
DWELL_LVL_6_UP, DWELL_UP_LAST=43, DWELL_LVL_8_UP=50, DWELL_LVL_8=57,
|
||||
|
||||
DWELL_LVL_1 = DWELL_FIRST,
|
||||
DWELL_LVL_7 = DWELL_LAST,
|
||||
|
Loading…
x
Reference in New Issue
Block a user