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

Method isDropHandPossible

source/game/Player.cpp:298–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296
297
298bool Player::isDropHandPossible(Tile *t, unsigned int index)
299{
300 // if we have a creature to drop
301 if (index >= mObjectsInHand.size())
302 {
303 OD_LOG_ERR("seatId=" + Helper::toString(getSeat()->getId()) + ", index=" + Helper::toString(index) + ", size=" + Helper::toString(mObjectsInHand.size()));
304 return false;
305 }
306
307 GameEntity* entity = mObjectsInHand[index];
308 return entity->tryDrop(getSeat(), t);
309}
310
311void Player::dropHand(Tile *t, unsigned int index)
312{

Callers 3

mousePressedMethod · 0.80
mousePressedMethod · 0.80

Calls 3

toStringFunction · 0.70
getIdMethod · 0.45
tryDropMethod · 0.45

Tested by

no test coverage detected