Пример #1
0
        /// <summary>
        ///     Adds a new village to player's villages.
        ///     Fires a new village added event.
        /// </summary>
        /// <param name="id">Village id.</param>
        public void AddVillage(Village v)
        {
            if (Villages.ContainsKey(v.Id))
            {
                return;
            }

            Villages.Add(v.Id, v);
            Logger.Trace("{0}, new village added to me.", this);

            if (VillageAdded != null)
            {
                VillageAdded.Invoke(v);
            }
        }
Пример #2
0
 /// <summary>
 /// Adds a village to the player
 /// </summary>
 public void AddVillage(Village village)
 {
     Villages.Add(village);
 }