mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Fixed moving creatures in garison in heroWindow
This commit is contained in:
parent
8fca3147b3
commit
d7b5099b6f
@ -134,4 +134,5 @@ public:
|
||||
|
||||
//friends
|
||||
friend void CArtPlace::clickLeft(tribool down);
|
||||
friend CPlayerInterface;
|
||||
};
|
||||
|
@ -345,6 +345,7 @@ void CGarrisonInt::deleteSlots()
|
||||
void CGarrisonInt::recreateSlots()
|
||||
{
|
||||
splitting = false;
|
||||
highlighted = NULL;
|
||||
deactiveteSlots();
|
||||
deleteSlots();
|
||||
createSlots();
|
||||
@ -1913,11 +1914,18 @@ void CPlayerInterface::garrisonChanged(const CGObjectInstance * obj)
|
||||
SDL_FreeSurface(heroWins[hh->subID]);
|
||||
heroWins[hh->subID] = infoWin(hh);
|
||||
}
|
||||
if(castleInt == curint) //opened town window - redraw town garrsion slots (change is within hero garr)
|
||||
CHeroWindow * hw = dynamic_cast<CHeroWindow *>(curint);
|
||||
if(hw)
|
||||
{
|
||||
hw->garInt->recreateSlots();
|
||||
hw->garInt->show();
|
||||
}
|
||||
else if(castleInt == curint) //opened town window - redraw town garrsion slots (change is within hero garr)
|
||||
{
|
||||
castleInt->garr->highlighted = NULL;
|
||||
castleInt->garr->recreateSlots();
|
||||
}
|
||||
|
||||
}
|
||||
else if (obj->ID == 98) //town
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user