예제 #1
0
        /// <summary>
        /// Remove any positive Bonus Type from object
        /// </summary>
        public void RemoveAnyPositiveBuff()
        {
            bool      buffFounded     = false;
            BonusType foundedBuffType = BonusType.block_heal;

            foreach (var pBonus in bonuses)
            {
                if (BuffUtils.IsBuff(pBonus.Key))
                {
                    foundedBuffType = pBonus.Key;
                    buffFounded     = true;
                    break;
                }
            }

            if (buffFounded)
            {
                PlayerBonus removedBonus = null;
                bonuses.TryRemove(foundedBuffType, out removedBonus);
            }
        }