1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Little fix in highlight in CGarrisonSlot.

This commit is contained in:
FeniksFire 2017-03-17 21:24:55 +01:00
parent 3de891b4b4
commit 68c618cb99

View File

@ -514,11 +514,14 @@ void CGarrisonInt::setSplittingMode(bool on)
if (inSplittingMode || on)
{
for(CGarrisonSlot * slot : slotsUp)
slot->setHighlight( ( on && (slot->our() || slot->ally()) && (slot->creature == nullptr || slot->creature == getSelection()->creature)));
for(CGarrisonSlot * slot : slotsDown)
slot->setHighlight( ( on && (slot->our() || slot->ally()) && (slot->creature == nullptr || slot->creature == getSelection()->creature)));
for(CGarrisonSlot * slot : slotsUp){
if(slot!=getSelection())
slot->setHighlight( ( on && (slot->our() || slot->ally()) && (slot->creature == nullptr || slot->creature == getSelection()->creature)));
}
for(CGarrisonSlot * slot : slotsDown){
if(slot!=getSelection())
slot->setHighlight( ( on && (slot->our() || slot->ally()) && (slot->creature == nullptr || slot->creature == getSelection()->creature)));
}
inSplittingMode = on;
}
}