1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Update town visual on capturing

This commit is contained in:
Ivan Savenko
2023-03-15 00:30:58 +02:00
parent 844bf9b9ab
commit 39f2bef1ab
2 changed files with 36 additions and 29 deletions

View File

@@ -604,6 +604,13 @@ void ApplyClientNetPackVisitor::visitSetObjectProperty(SetObjectProperty & pack)
if(gs.isVisible(gs.getObjInstance(pack.id), it->first))
callInterfaceIfPresent(cl, it->first, &IGameEventsReceiver::objectPropertyChanged, &pack);
}
if (pack.what == ObjProperty::OWNER)
{
// invalidate section of map view with our objec and force an update with new flag color
CGI->mh->onObjectInstantRemove(gs.getObjInstance(pack.id));
CGI->mh->onObjectInstantAdd(gs.getObjInstance(pack.id));
}
}
void ApplyClientNetPackVisitor::visitHeroLevelUp(HeroLevelUp & pack)