Ejemplo n.º 1
0
        public virtual string GenTooltip(float acts, float ttldpsperc)
        {
            float misses = GetXActs(AttackTableSelector.Missed, acts), missesPerc = (acts == 0f ? 0f : misses / acts);
            float dodges = GetXActs(AttackTableSelector.Dodged, acts), dodgesPerc = (acts == 0f ? 0f : dodges / acts);
            float parrys = GetXActs(AttackTableSelector.Parried, acts), parrysPerc = (acts == 0f ? 0f : parrys / acts);
            float blocks = GetXActs(AttackTableSelector.Blocked, acts), blocksPerc = (acts == 0f ? 0f : blocks / acts);
            float crits = GetXActs(AttackTableSelector.Crit, acts), critsPerc = (acts == 0f ? 0f : crits / acts);
            float hits = GetXActs(AttackTableSelector.Hit, acts), hitsPerc = (acts == 0f ? 0f : hits / acts);

            bool showmisss = misses > 0f;
            bool showdodge = CanBeDodged && dodges > 0f;
            bool showparry = CanBeParried && parrys > 0f;
            bool showblock = CanBeBlocked && blocks > 0f;
            bool showcrits = CanCrit && crits > 0f;

            string tooltip = "*" + Name +
                             Environment.NewLine + "Cast Time: " + (CastTime != -1 ? CastTime.ToString() : "Instant")
                             + ", CD: " + (Cd != -1 ? Cd.ToString() : "None")
                             + ", RageCost: " + (RageCost != -1 ? RageCost.ToString() : "None") +
                             Environment.NewLine + Environment.NewLine + acts.ToString("000.00") + " Activates over Attack Table:" +
                             (showmisss ? Environment.NewLine + "- " + misses.ToString("000.00") + " : " + missesPerc.ToString("00.00%") + " : Missed " : "") +
                             (showdodge ? Environment.NewLine + "- " + dodges.ToString("000.00") + " : " + dodgesPerc.ToString("00.00%") + " : Dodged " : "") +
                             (showparry ? Environment.NewLine + "- " + parrys.ToString("000.00") + " : " + parrysPerc.ToString("00.00%") + " : Parried " : "") +
                             (showblock ? Environment.NewLine + "- " + blocks.ToString("000.00") + " : " + blocksPerc.ToString("00.00%") + " : Blocked " : "") +
                             (showcrits ? Environment.NewLine + "- " + crits.ToString("000.00") + " : " + critsPerc.ToString("00.00%") + " : Crit " : "") +
                             Environment.NewLine + "- " + hits.ToString("000.00") + " : " + hitsPerc.ToString("00.00%") + " : Hit " +
                             Environment.NewLine +
                             //Environment.NewLine + "Damage per Blocked|Hit|Crit: x|x|x" +
                             Environment.NewLine + "Targets Hit: " + (Targets != -1 ? AvgTargets.ToString("0.00") : "None") +
                             Environment.NewLine + "DPS: " + (GetDPS(acts) > 0 ? GetDPS(acts).ToString("0.00") : "None") +
                             Environment.NewLine + "Percentage of Total DPS: " + (ttldpsperc > 0 ? ttldpsperc.ToString("00.00%") : "None");

            return(tooltip);
        }
    /*
     * Function: OnGemChanged
     * Parameters: newItem, oldItem
     * Description: when a new gem is equiped, the stats for the given skill are updated
     * and the stats for the old gem are removed if one was equiped.
     */
    public void OnGemChanged(Equipment newItem, Equipment oldItem)
    {
        if (newItem != null)
        {
            Damage.AddModifier(newItem.damageModifier);
            //armor.AddModifier(newItem.armorModifier);
            RageCost.AddModifier(newItem.rageModifier);
            //AttackSpeed.AddModifier(newItem.attackspeedModifier);
            Cooldown.AddModifier(newItem.cooldownModifier);
            Lifesteal.AddModifier(newItem.lifestealModifier);
            Radius.AddModifier(newItem.radiusModifier);
            LastTime.AddModifier(newItem.lastTimeModifier);
        }

        if (oldItem != null)
        {
            //armor.RemoveModifier(oldItem.armorModifier);
            Damage.RemoveModifier(oldItem.damageModifier);
            RageCost.RemoveModifier(oldItem.rageModifier);
            //AttackSpeed.RemoveModifier(oldItem.attackspeedModifier);
            Cooldown.RemoveModifier(oldItem.cooldownModifier);
            Lifesteal.RemoveModifier(oldItem.lifestealModifier);
            Radius.RemoveModifier(oldItem.radiusModifier);
            LastTime.RemoveModifier(oldItem.lastTimeModifier);
        }
    }
Ejemplo n.º 3
0
    /*
     * Function: OnGemChanged
     * Parameters: newItem, oldItem
     * Description: when a new gem is equiped, the stats for the given skill are updated
     * and the stats for the old gem are removed if one was equiped.
     */
    public void OnGemChanged(Equipment newItem, Equipment oldItem)
    {
        if (newItem != null)
        {
            Damage.AddModifier(newItem.damageModifier);
            //armor.AddModifier(newItem.armorModifier);
            RageCost.AddModifier(newItem.rageModifier);
            //AttackSpeed.AddModifier(newItem.attackspeedModifier);
            Cooldown.AddModifier(newItem.cooldownModifier);
            Lifesteal.AddModifier(newItem.lifestealModifier);
            //MagicResist.AddModifier(newItem.magicResistModifer);
            // Health.AddModifier(newItem.healthModifier);
        }

        if (oldItem != null)
        {
            //armor.RemoveModifier(oldItem.armorModifier);
            Damage.RemoveModifier(oldItem.damageModifier);
            RageCost.RemoveModifier(oldItem.rageModifier);
            //AttackSpeed.RemoveModifier(oldItem.attackspeedModifier);
            Cooldown.RemoveModifier(oldItem.cooldownModifier);
            Lifesteal.RemoveModifier(oldItem.lifestealModifier);
            //MagicResist.RemoveModifier(oldItem.magicResistModifer);
            //Health.RemoveModifier(oldItem.healthModifier);
        }
    }