mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Removed pointer to VLC entity from CStackBasicDescriptor
This commit is contained in:
@ -185,7 +185,7 @@ void Rewardable::Interface::grantRewardAfterLevelup(const Rewardable::VisitInfo
|
||||
|
||||
for(const auto & change : info.reward.creaturesChange)
|
||||
{
|
||||
if (heroStack->type->getId() == change.first)
|
||||
if (heroStack->getId() == change.first)
|
||||
{
|
||||
StackLocation location(hero, slot.first);
|
||||
cb->changeStackType(location, change.second.toCreature());
|
||||
@ -199,7 +199,7 @@ void Rewardable::Interface::grantRewardAfterLevelup(const Rewardable::VisitInfo
|
||||
{
|
||||
CCreatureSet creatures;
|
||||
for(const auto & crea : info.reward.creatures)
|
||||
creatures.addToSlot(creatures.getFreeSlot(), new CStackInstance(crea.type, crea.count));
|
||||
creatures.addToSlot(creatures.getFreeSlot(), new CStackInstance(crea.getCreature(), crea.count));
|
||||
|
||||
if(auto * army = dynamic_cast<const CArmedInstance*>(this)) //TODO: to fix that, CArmedInstance must be split on map instance part and interface part
|
||||
cb->giveCreatures(army, hero, creatures, false);
|
||||
|
Reference in New Issue
Block a user