public override int GetHashCode() { int hash = 1; if (TargetType != 0) { hash ^= TargetType.GetHashCode(); } if (Radius != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Radius); } if (CooldownMs != 0) { hash ^= CooldownMs.GetHashCode(); } if (FocusCost != 0) { hash ^= FocusCost.GetHashCode(); } if (BuffGmtId.Length != 0) { hash ^= BuffGmtId.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public virtual string GenTooltip(float acts, float ttldps) { float misses = GetXActs(AttackTableSelector.Missed, acts), missesPerc = (acts == 0f ? 0f : misses / 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 showcrits = CanCrit && crits > 0f; float localDPS = GetDPS(acts); string tooltip = string.Format("{0:0.0}*{1}\n", localDPS, Name) + string.Format("Cast Time: {0}, CD: {1}, FocusCost: {2}\n", (CastTime != -1 ? CastTime.ToString() : "Instant"), (Cd != -1 ? Cd.ToString() : "None"), (FocusCost != -1 ? FocusCost.ToString() : "None")) + Environment.NewLine + acts.ToString("000.00") + " Activates over Attack Table:" + (showmisss ? Environment.NewLine + "- " + misses.ToString("000.00") + " : " + missesPerc.ToString("00.00%") + " : Missed " : "") + (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 + "Targets Hit: " + (Targets != -1 ? AvgTargets.ToString("0.00") : "None") + Environment.NewLine + "DPS: " + (localDPS > 0 ? localDPS.ToString("0.00") : "None") + Environment.NewLine + string.Format("Percentage of Total DPS: {0}", (ttldps > 0 ? (localDPS / ttldps).ToString("00.00%") : "None")); return(tooltip); }