invertika_game.Game.Character.recalculateBaseAttribute C# (CSharp) Method

recalculateBaseAttribute() private method

private recalculateBaseAttribute ( uint attr ) : bool
attr uint
return bool
        bool recalculateBaseAttribute(uint attr)
        {
            ///*
            // * `attr' may or may not have changed. Recalculate the base value.
            // */
            //LOG_DEBUG("Received update attribute recalculation request at Character"
            //          "for " << attr << ".");
            //if (!mAttributes.count(attr))
            //    return false;
            //double newBase = getAttribute(attr);

            ///*
            // * Calculate new base.
            // */
            //switch (attr)
            //{
            //case ATTR_ACCURACY:
            //    newBase = getModifiedAttribute(ATTR_DEX); // Provisional
            //    break;
            //case ATTR_DEFENSE:
            //    newBase = 0.3 * getModifiedAttribute(ATTR_VIT);
            //    break;
            //case ATTR_DODGE:
            //    newBase = getModifiedAttribute(ATTR_AGI); // Provisional
            //    break;
            //case ATTR_MAGIC_DODGE:
            //    newBase = 1.0;
            //    // TODO
            //    break;
            //case ATTR_MAGIC_DEFENSE:
            //    newBase = 0.0;
            //    // TODO
            //    break;
            //case ATTR_BONUS_ASPD:
            //    newBase = 0.0;
            //    // TODO
            //    break;
            //default:
            //    return Being::recalculateBaseAttribute(attr);
            //}

            //if (newBase != getAttribute(attr))
            //{
            //    setAttribute(attr, newBase);
            //    updateDerivedAttributes(attr);
            //    return true;
            //}
            //LOG_DEBUG("No changes to sync for attribute '" << attr << "'.");
            return false;
        }