1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Fix 2076 Grail removal

This commit is contained in:
Vadim Markovtsev
2016-01-20 14:22:12 +03:00
parent b19e082f37
commit a74fbff34f

View File

@ -362,6 +362,10 @@ DLL_LINKAGE void RemoveObject::applyGs( CGameState *gs )
p->heroes -= h;
h->detachFrom(h->whereShouldBeAttached(gs));
h->tempOwner = PlayerColor::NEUTRAL; //no one owns beaten hero
vstd::erase_if(h->artifactsInBackpack, [](const ArtSlotInfo& asi)
{
return asi.artifact->artType->id == ArtifactID::GRAIL;
});
if(h->visitedTown)
{