1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

vcmi: specialize native terrain entity

Specialize native terrain entity for all object that have
native terrain. Allow creatures to take global bonuses into
account when checking for native terrain.
This commit is contained in:
Konstantin
2023-04-05 18:56:28 +03:00
parent 6d9859932b
commit 0f5f4c69ec
14 changed files with 122 additions and 8 deletions

View File

@ -413,6 +413,11 @@ int32_t CUnitState::creatureIconIndex() const
return unitType()->getIconIndex();
}
FactionID CUnitState::getFaction() const
{
return unitType()->getFaction();
}
int32_t CUnitState::getCasterUnitId() const
{
return static_cast<int32_t>(unitId());