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

Method notifyWorkerAction

source/game/Player.cpp:790–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

788}
789
790void Player::notifyWorkerAction(Creature& worker, CreatureActionType actionType)
791{
792 uint32_t index = static_cast<uint32_t>(actionType);
793 if(index >= mWorkersActions.size())
794 {
795 OD_LOG_ERR("Invalid index seatId=" + Helper::toString(getId()) + ", value=" + Helper::toString(index) + ", size=" + Helper::toString(mWorkersActions.size()));
796 return;
797 }
798
799 mWorkersActions[index]++;
800}
801
802void Player::notifyWorkerStopsAction(Creature& worker, CreatureActionType actionType)
803{

Calls 1

toStringFunction · 0.70

Tested by

no test coverage detected