1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Artifact Merchant: selling artifacts. Messy, but completes H3 town structures functionalities.

BTW updating screen after closing marketplace is broken.
This commit is contained in:
Michał W. Urbańczyk
2011-04-22 21:51:10 +00:00
parent 4ac2d32985
commit d092eaf9d1
10 changed files with 265 additions and 74 deletions

View File

@@ -2171,6 +2171,14 @@ void CPlayerInterface::artifactPut(const ArtifactLocation &al)
void CPlayerInterface::artifactRemoved(const ArtifactLocation &al)
{
boost::unique_lock<boost::recursive_mutex> un(*pim);
BOOST_FOREACH(IShowActivable *isa, GH.listInt)
{
if(isa->type & IShowActivable::WITH_ARTIFACTS)
{
BOOST_FOREACH(CArtifactsOfHero *aoh, (dynamic_cast<CWindowWithArtifacts*>(isa))->artSets)
aoh->artifactRemoved(al);
}
}
}
void CPlayerInterface::artifactMoved(const ArtifactLocation &src, const ArtifactLocation &dst)