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

Method notifyCreatureCannotFindBed

source/game/Player.cpp:523–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523void Player::notifyCreatureCannotFindBed(Creature& creature)
524{
525 if(mCreatureCannotFindBed <= 0.0f)
526 {
527 mCreatureCannotFindBed = CREATURE_CANNOT_FIND_BED_TIME_COUNT;
528
529 std::string chatMsg = creature.getName() + " cannot find room for a bed";
530 ServerNotification *serverNotification = new ServerNotification(
531 ServerNotificationType::chatServer, this);
532 serverNotification->mPacket << chatMsg << EventShortNoticeType::genericGameInfo;
533 ODServer::getSingleton().queueServerNotification(serverNotification);
534
535 std::vector<Seat*> seats;
536 seats.push_back(getSeat());
537 mGameMap->fireRelativeSound(seats, SoundRelativeKeeperStatements::CreatureNoBed);
538 }
539}
540
541void Player::notifyCreatureCannotFindFood(Creature& creature)
542{

Callers 1

handleFindHomeMethod · 0.80

Calls 2

fireRelativeSoundMethod · 0.80

Tested by

no test coverage detected