engine/maps/source/MapUtils.cpp
// Add a message about the tile if necessary.
Add a message about the tile if necessary.
Add a message about the tile if necessary .
bool MapUtils::add_message_about_tile_if_necessary(CreaturePtr creature, TilePtr tile)
{
  bool msg_added = false;
  if (creature && tile && creature->get_is_player())
  {
    IMessageManager& manager = MM::instance(MessageTransmit::SELF, creature, creature && creature->get_is_player());
    if (tile->display_description_on_arrival() || tile->has_extra_description())
    {
      TileDescriber td(creature, tile);
      manager.add_new_message(td.describe());
      msg_added = true;
    }
    else if (tile->has_inscription())
    {
      CurrentCreatureAbilities cca;
      if (cca.can_read(creature))
      {
        manager.add_new_message(TextMessages::get_inscription_message(tile->get_inscription_sid()));
      }
      else
      {
        manager.add_new_message(StringTable::get(TileTextKeys::TILE_INSCRIPTION_ILLITERATE));
      }
      msg_added = true;
    }
  }
  return msg_added;
}
bool MapUtils :: add_message_about_tile_if_necessary ( CreaturePtr creature , TilePtr tile ) { bool msg_added = false ; if ( creature && tile && creature -> get_is_player ( ) ) { IMessageManager & manager = MM :: instance ( MessageTransmit :: SELF , creature , creature && creature -> get_is_player ( ) ) ; if ( tile -> display_description_on_arrival ( ) || tile -> has_extra_description ( ) ) { TileDescriber td ( creature , tile ) ; manager . add_new_message ( td . describe ( ) ) ; msg_added = true ; } else if ( tile -> has_inscription ( ) ) { CurrentCreatureAbilities cca ; if ( cca . can_read ( creature ) ) { manager . add_new_message ( TextMessages :: get_inscription_message ( tile -> get_inscription_sid ( ) ) ) ; } else { manager . add_new_message ( StringTable :: get ( TileTextKeys :: TILE_INSCRIPTION_ILLITERATE ) ) ; } msg_added = true ; } } return msg_added ; }
Add a message about the tile if necessary.
Add a message about the tile if necessary .