mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-18 03:21:27 +02:00
Merge pull request #161 from vmarkovtsev/issue/2076
Fix 2076 Grail removal
This commit is contained in:
commit
6a7b1a1737
@ -362,6 +362,10 @@ DLL_LINKAGE void RemoveObject::applyGs( CGameState *gs )
|
|||||||
p->heroes -= h;
|
p->heroes -= h;
|
||||||
h->detachFrom(h->whereShouldBeAttached(gs));
|
h->detachFrom(h->whereShouldBeAttached(gs));
|
||||||
h->tempOwner = PlayerColor::NEUTRAL; //no one owns beaten hero
|
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)
|
if(h->visitedTown)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user