mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Fix lambda capture
This commit is contained in:
parent
253f1dc7e6
commit
a568a9b3fb
@ -488,7 +488,7 @@ void TreasurePlacer::addAllPossibleObjects()
|
|||||||
int randomAppearance = chooseRandomAppearance(zone.getRand(), Obj::SEER_HUT, zone.getTerrainType());
|
int randomAppearance = chooseRandomAppearance(zone.getRand(), Obj::SEER_HUT, zone.getTerrainType());
|
||||||
|
|
||||||
// FIXME: Remove duplicated code for gold, exp and creaure reward
|
// FIXME: Remove duplicated code for gold, exp and creaure reward
|
||||||
oi.generateObject = [creature, creaturesAmount, randomAppearance, qap, &oi, setRandomArtifact]() -> CGObjectInstance *
|
oi.generateObject = [creature, creaturesAmount, randomAppearance, &oi, setRandomArtifact]() -> CGObjectInstance *
|
||||||
{
|
{
|
||||||
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
||||||
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
||||||
@ -532,7 +532,7 @@ void TreasurePlacer::addAllPossibleObjects()
|
|||||||
oi.probability = 10;
|
oi.probability = 10;
|
||||||
oi.maxPerZone = 1;
|
oi.maxPerZone = 1;
|
||||||
|
|
||||||
oi.generateObject = [i, randomAppearance, this, qap, &oi, setRandomArtifact]() -> CGObjectInstance *
|
oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance *
|
||||||
{
|
{
|
||||||
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
||||||
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
||||||
@ -550,7 +550,7 @@ void TreasurePlacer::addAllPossibleObjects()
|
|||||||
if(!oi.templates.empty())
|
if(!oi.templates.empty())
|
||||||
possibleSeerHuts.push_back(oi);
|
possibleSeerHuts.push_back(oi);
|
||||||
|
|
||||||
oi.generateObject = [i, randomAppearance, this, qap, &oi, setRandomArtifact]() -> CGObjectInstance *
|
oi.generateObject = [i, randomAppearance, this, &oi, setRandomArtifact]() -> CGObjectInstance *
|
||||||
{
|
{
|
||||||
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
|
||||||
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
auto * obj = dynamic_cast<CGSeerHut *>(factory->create());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user