mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
BattleInfo stacks are now unique_ptr's
This commit is contained in:
@ -341,9 +341,9 @@ const IBonusBearer* CStack::getBonusBearer() const
|
||||
|
||||
bool CStack::unitHasAmmoCart(const battle::Unit * unit) const
|
||||
{
|
||||
for(const CStack * st : battle->stacks)
|
||||
for(const auto & st : battle->stacks)
|
||||
{
|
||||
if(battle->battleMatchOwner(st, unit, true) && st->unitType()->getId() == CreatureID::AMMO_CART)
|
||||
if(battle->battleMatchOwner(st.get(), unit, true) && st->unitType()->getId() == CreatureID::AMMO_CART)
|
||||
{
|
||||
return st->alive();
|
||||
}
|
||||
|
Reference in New Issue
Block a user