mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
All objects that can be owned by player now implement IOwnableObject
This commit is contained in:
@@ -1943,7 +1943,7 @@ void SetObjectProperty::applyGs(CGameState *gs)
|
||||
|
||||
auto * cai = dynamic_cast<CArmedInstance *>(obj);
|
||||
|
||||
if(what == ObjProperty::OWNER)
|
||||
if(what == ObjProperty::OWNER && obj->asOwnable())
|
||||
{
|
||||
PlayerColor oldOwner = obj->getOwner();
|
||||
PlayerColor newOwner = identifier.as<PlayerColor>();
|
||||
|
||||
Reference in New Issue
Block a user