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

Method hasCarryEntitySpot

source/traps/Trap.cpp:313–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313bool Trap::hasCarryEntitySpot(GameEntity* carriedEntity)
314{
315 if(getNbNeededCraftedTrap() <= 0)
316 return false;
317
318 if(carriedEntity->getObjectType() != GameEntityType::craftedTrap)
319 return false;
320
321 CraftedTrap* craftedTrap = static_cast<CraftedTrap*>(carriedEntity);
322 if(craftedTrap->getTrapType() != getType())
323 return false;
324
325 return true;
326}
327
328Tile* Trap::askSpotForCarriedEntity(GameEntity* carriedEntity)
329{

Callers 2

handleGrabEntityMethod · 0.45

Calls 2

getObjectTypeMethod · 0.45
getTrapTypeMethod · 0.45

Tested by

no test coverage detected