mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
vcmi: massive refactoring v1
This commit is contained in:
@ -88,7 +88,7 @@ ui32 CStack::level() const
|
||||
if(base)
|
||||
return base->getLevel(); //creature or commander
|
||||
else
|
||||
return std::max(1, static_cast<int>(getCreature()->level)); //war machine, clone etc
|
||||
return std::max(1, static_cast<int>(getCreature()->getLevel())); //war machine, clone etc
|
||||
}
|
||||
|
||||
si32 CStack::magicResistance() const
|
||||
@ -342,7 +342,7 @@ bool CStack::unitHasAmmoCart(const battle::Unit * unit) const
|
||||
{
|
||||
for(const CStack * st : battle->stacks)
|
||||
{
|
||||
if(battle->battleMatchOwner(st, unit, true) && st->getCreature()->idNumber == CreatureID::AMMO_CART)
|
||||
if(battle->battleMatchOwner(st, unit, true) && st->getCreature()->getId() == CreatureID::AMMO_CART)
|
||||
{
|
||||
return st->alive();
|
||||
}
|
||||
|
Reference in New Issue
Block a user