1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00
This commit is contained in:
Tomasz Zieliński 2024-01-17 07:45:53 +01:00
parent a568a9b3fb
commit 66efb07e52

View File

@ -488,7 +488,7 @@ void TreasurePlacer::addAllPossibleObjects()
int randomAppearance = chooseRandomAppearance(zone.getRand(), Obj::SEER_HUT, zone.getTerrainType());
// FIXME: Remove duplicated code for gold, exp and creaure reward
oi.generateObject = [creature, creaturesAmount, randomAppearance, &oi, setRandomArtifact]() -> CGObjectInstance *
oi.generateObject = [creature, creaturesAmount, randomAppearance, setRandomArtifact]() -> CGObjectInstance *
{
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
@ -532,7 +532,7 @@ void TreasurePlacer::addAllPossibleObjects()
oi.probability = 10;
oi.maxPerZone = 1;
oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance *
oi.generateObject = [i, randomAppearance, this, setRandomArtifact]() -> CGObjectInstance *
{
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
@ -550,7 +550,7 @@ void TreasurePlacer::addAllPossibleObjects()
if(!oi.templates.empty())
possibleSeerHuts.push_back(oi);
oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance *
oi.generateObject = [i, randomAppearance, this, setRandomArtifact]() -> CGObjectInstance *
{
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());