From 66efb07e5205188f2066d9efa8b37f8d796b925e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Wed, 17 Jan 2024 07:45:53 +0100 Subject: [PATCH] More --- lib/rmg/modificators/TreasurePlacer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rmg/modificators/TreasurePlacer.cpp b/lib/rmg/modificators/TreasurePlacer.cpp index 504fe9a78..20c12e2eb 100644 --- a/lib/rmg/modificators/TreasurePlacer.cpp +++ b/lib/rmg/modificators/TreasurePlacer.cpp @@ -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(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(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(factory->create());