Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CoulombInfo"/> class.
 /// </summary>
 /// <param name="coulomb">The coulomb.</param>
 /// <param name="levelPrice">The level price.</param>
 /// <param name="levels">The levels.</param>
 /// <param name="lastLevelPrice">The last level price.</param>
 public CoulombInfo(Coulomb coulomb, int levelPrice, byte levels, int lastLevelPrice)
 {
     Coulomb        = coulomb;
     LevelPrice     = levelPrice;
     Levels         = levels;
     LastLevelPrice = lastLevelPrice;
 }
Exemple #2
0
        /// <summary>
        /// Upgrades the coulomb.
        /// </summary>
        /// <param name="couloub">The couloub.</param>
        private void UpgradeCoulomb(Coulomb couloub)
        {
            if (!_player.Wardrobe.HasItem(couloub))
            {
                var message = string.Format("Кулон для прокачки '{0}' должен быть в одевалке.", couloub.GetDescription());
                Log.Suggestion(message, "Положите данный кулон в одевалку и бот его будет автоматически качать.");
                return;
            }

            if (!Coulombs.ContainsKey(couloub))
            {
                AppCore.LogSystem.WarnFormat("Нету информации про кулон '{0}'", couloub.GetDescription());
                return;
            }
            var info = Coulombs[couloub];

            if (_player.Cristals < info.LevelPrice)
            {
                return;
            }
            if (_controller.UpgradeCoulomb(couloub))
            {
                RegisterPurchase(BalanceCategory.CoulombUpgrade, couloub.GetDescription(), new Price(Resource.Crystals, info.LevelPrice));
            }
        }
Exemple #3
0
        protected PhysicalObject(NumericValue <Mass> mass)
        {
            Mass        = mass;
            Coordinates = PhysicalCoordinate <Meter> .Create(0, 0, 0);

            Charge = new Coulomb();
        }
Exemple #4
0
        /// <summary>
        /// Upgrades the coulomb.
        /// </summary>
        /// <param name="couloub">The couloub.</param>
        /// <returns></returns>
        public bool UpgradeCoulomb(Coulomb couloub)
        {
            OpenUrl(UrlSmithMaster);
            var imgUrl = ItemBuilder.GetItemImageUrl(couloub, false);
            var img    = browser.Image(Find.BySrc(imgUrl));
            var table  = (Table)img.Parent.Parent.Parent.Parent;
            var cell   = table.TableRows[table.TableRows.Count - 1].TableCells[0];

            if (cell.Links.Count == 0)
            {
                return(false);
            }
            cell.Links[0].Click();

            var imgCristal = browser.Image(Find.BySrc(UrlImageCristal));

            table = (Table)imgCristal.Parent.Parent.Parent.Parent;
            cell  = table.TableRows[table.TableRows.Count - 1].TableCells[0];
            if (cell.Links.Count == 0)
            {
                return(false);
            }
            cell.Links[0].Click();
            var message = GetMessage();

            AppCore.LogSystem.Info("Результат апгрейда кулона " + couloub.GetDescription(), message);
            return(true);
        }
Exemple #5
0
        /// <summary>
        /// Determines whether [is put on] [the specified type].
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns>
        ///     <c>true</c> if [is put on] [the specified type]; otherwise, <c>false</c>.
        /// </returns>
        public bool IsPutOn(Coulomb type)
        {
            var link = GetItemLink(type);

            if (link == null || !link.Exists)
            {
                return(false);
            }
            return(!IsPutOnLink(link));
        }
Exemple #6
0
        /// <summary>
        /// Puts the on.
        /// </summary>
        /// <param name="item">The item.</param>
        public void PutOn(Coulomb item)
        {
            if (item == Coulomb.Undefined || Coulomb == item)
            {
                return;
            }

            if (Wardrobe.PutOn(item))
            {
                Coulomb = item;
            }
        }
Exemple #7
0
        /// <summary>
        /// Puts the on.
        /// </summary>
        /// <param name="type">The type.</param>
        public bool PutOn(Coulomb type)
        {
            Image image = GetItemImage(type);

            if (image == null || !image.Exists)
            {
                return(false);
            }

            var link = (Link)image.NextSibling.NextSibling;

            if (!link.Exists)
            {
                return(false);
            }
            if (IsPutOnLink(link))
            {
                link.Click();
            }
            return(true);
        }
Exemple #8
0
 /// <summary>
 /// Determines whether [is put on] [the specified item].
 /// </summary>
 /// <param name="item">The item.</param>
 public bool IsPutOn(Coulomb item)
 {
     return(Coulomb == item);
 }
Exemple #9
0
 public IPhysicalObject SetCharge(Coulomb c)
 {
     Charge = c;
     return(this);
 }
Exemple #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataRow"/> class.
 /// </summary>
 public DataRow()
 {
     Coulomb = Coulomb.Undefined;
 }
Exemple #11
0
 public DataRow()
 {
     Action  = PlayerAction.Fight;
     Coulomb = Coulomb.Undefined;
 }