Ver código fonte

Fix 2076 Grail removal

Vadim Markovtsev 9 anos atrás
pai
commit
a74fbff34f
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      lib/NetPacksLib.cpp

+ 4 - 0
lib/NetPacksLib.cpp

@@ -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)
 		{