MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getCoveringTrap

Method getCoveringTrap

source/entities/Tile.cpp:1689–1698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1687}
1688
1689Trap* Tile::getCoveringTrap() const
1690{
1691 if(mCoveringBuilding == nullptr)
1692 return nullptr;
1693
1694 if(mCoveringBuilding->getObjectType() != GameEntityType::trap)
1695 return nullptr;
1696
1697 return static_cast<Trap*>(mCoveringBuilding);
1698}
1699
1700bool Tile::checkCoveringTrapType(TrapType type) const
1701{

Callers 2

sellTrapTilesMethod · 0.80
sellTrapTilesEditorMethod · 0.80

Calls 1

getObjectTypeMethod · 0.45

Tested by

no test coverage detected