mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fixed compilation issues caused by merge
This commit is contained in:
@ -120,7 +120,7 @@ void CGarrisonSlot::clickRight(tribool down, bool previousState)
|
||||
{
|
||||
if(down && creature)
|
||||
{
|
||||
GH.pushInt(createCreWindow(myStack, CCreatureWindow::ARMY));
|
||||
GH.pushInt(new CStackWindow(myStack, true));
|
||||
}
|
||||
}
|
||||
void CGarrisonSlot::clickLeft(tribool down, bool previousState)
|
||||
@ -137,9 +137,9 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState)
|
||||
|
||||
bool canUpgrade = getObj()->tempOwner == LOCPLINT->playerID && pom.oldID>=0; //upgrade is possible
|
||||
bool canDismiss = getObj()->tempOwner == LOCPLINT->playerID && (getObj()->stacksCount()>1 || !getObj()->needsLastStack());
|
||||
std::function<void()> upgr = nullptr;
|
||||
std::function<void(CreatureID)> upgr = nullptr;
|
||||
std::function<void()> dism = nullptr;
|
||||
if(canUpgrade) upgr = [=] { LOCPLINT->cb->upgradeCreature(getObj(), ID, pom.newID[0]); };
|
||||
if(canUpgrade) upgr = [=] (CreatureID newID) { LOCPLINT->cb->upgradeCreature(getObj(), ID, newID); };
|
||||
if(canDismiss) dism = [=] { LOCPLINT->cb->dismissCreature(getObj(), ID); };
|
||||
|
||||
owner->selectSlot(nullptr);
|
||||
@ -150,8 +150,7 @@ void CGarrisonSlot::clickLeft(tribool down, bool previousState)
|
||||
|
||||
redraw();
|
||||
refr = true;
|
||||
CIntObject *creWindow = createCreWindow(myStack, CCreatureWindow::HERO, upgr, dism, &pom);
|
||||
GH.pushInt(creWindow);
|
||||
GH.pushInt(new CStackWindow(myStack, dism, pom, upgr));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user