diff --git a/client/windows/QuickRecruitmentWindow.cpp b/client/windows/QuickRecruitmentWindow.cpp index 4c478593b..da54a57a2 100644 --- a/client/windows/QuickRecruitmentWindow.cpp +++ b/client/windows/QuickRecruitmentWindow.cpp @@ -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()) diff --git a/lib/constants/EntityIdentifiers.h b/lib/constants/EntityIdentifiers.h index b3688a093..84e2824d0 100644 --- a/lib/constants/EntityIdentifiers.h +++ b/lib/constants/EntityIdentifiers.h @@ -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,