/** \~russian .
 *        ,   .  
 *    @ref Map "".       @b CITY.TXT.
 *
 ** \~english Location.
 * This is the circles on a global map of the world have witnessed a definite place.
 * Each location may contain a lot of maps. Information on the locations contained in a file @b CITY.TXT.
 *
 * \~ @ingroup Server
 * @see Map
 */
class Location
{
public:
	/** \~russian  . */
	const uint Id;

	/** \~russian   .
	 *
	 * -  @c 0,    - @c 0x3C00FF00.
	 *
	 * @note          @b _colors.fos.
	 *
	 */
	uint Color;

    /** \~russian    . */
    /** \~english Allows to check whether underlying object is valid. */
    const bool IsNotValid;

    /** \~russian  X   . */
    /** \~english X coordinate on worldmap. */
    uint16 WorldX;

    /** \~russian  Y   . */
    /** \~english Y coordinate on worldmap. */
    uint16 WorldY;

    /** \~russian       . */
    /** \~english Visible/invisible on worldmap. */
    bool Visible;

    /** \~russian            #ITEM_GECK.
    *
    *   @c true,  ,    
    *  ,   ,  #Visible.
    */
    bool GeckEnabled;

    /** \~russian     #ITEM_GECK  . */
    /** \~english Number of "GECK" items in location. */
    int GeckCount;

    /** \~russian  . */
    /** \~english Radius of the location green circle. */
    uint8 Radius;

    /**   ,        ,  NPC     #ITEM_GECK.
     *
     *   <code>geck_visible == 1</code>.
     */
    bool AutoGarbage;


    /** \~russian     .
     *
     * @return   .
     *
     ** \~english Returns location prototype number.
     */
    uint16 GetProtoId();


    /** \~russian      .
     * @return    .
     *
     ** \~english Returns number of maps in location.
     */
    uint GetMapCount();


    /** \~russian     ,   .
     *
     * @param  mapPid    .
     *
     * @return   .
     *
     ** \~english Returns map given its prototype number.
     *
     * @param  mapPid  Prototype number.
     *
     * @return Pointer to map instance.
     */
    Map@+ GetMap(uint16 mapPid);


    /** \~russian       .
     *
     *     @b CITY.TXT    map_(X).
     *
     * @param  index   .
     *
     * @return   .
     *
     ** \~english Returns map from location that is stored at given index (specified in @b CITY.TXT)
     */
    Map@+ GetMapByIndex(uint index);


    /** \~russian      .
     *
     * @param  maps   ,       .
     *
     * @return    .
     *
     * \~english Gets all maps from location.
     *
     * @return Number of maps.
     */
    uint GetMaps(Map@[]@+ maps);


    /** \~russian     .
     *
     * @return @c true    , @c false    .
     *
     ** \~english Reloads all maps from within a location.
     */
    bool Reload();


    /** \~russian    , ,   .
     *
     * @param  withMaps  ,       (@c true)   (@c false).
     *
     ** \~english Saves location info (and maps info if withMaps == true).
     */
    void Save(bool withMaps);

    /** \~russian       .
     *
     *     ,     
     *         .
     *
     */
    void Update();
}
