public void miniPowerInfo(int pIDX) { if (!this.Locked) { IPower power = new Power(this.myPowers[pIDX]); power.AbsorbPetEffects(-1); power.ApplyGrantPowerEffects(); PopUp.PopupData iPopup = default(PopUp.PopupData); if (pIDX < 0) { this.PopInfo.SetPopup(iPopup); this.ChangedScrollFrameContents(); } else { int index4 = iPopup.Add(null); string str = ""; switch (power.PowerType) { case Enums.ePowerType.Click: if (power.ClickBuff) { str = "(Click)"; } break; case Enums.ePowerType.Auto_: str = "(Auto)"; break; case Enums.ePowerType.Toggle: str = "(Toggle)"; break; } iPopup.Sections[index4].Add(power.DisplayName, PopUp.Colors.Title, 1f, FontStyle.Bold, 0); iPopup.Sections[index4].Add(str + " " + power.DescShort, PopUp.Colors.Text, 0.9f, FontStyle.Bold, 0); string str2 = power.DescLong.Replace("<br>", "\r\n"); iPopup.Sections[index4].Add(str + " " + str2, PopUp.Colors.Common, 1f, FontStyle.Regular, 0); index4 = iPopup.Add(null); if (power.EndCost > 0f) { if (power.ActivatePeriod > 0f) { iPopup.Sections[index4].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power.EndCost / power.ActivatePeriod) + "/s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index4].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power.EndCost), PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } } if (power.EntitiesAutoHit == Enums.eEntity.None | (power.Range > 20f & power.I9FXPresentP(Enums.eEffectType.Mez, Enums.eMez.Taunt))) { iPopup.Sections[index4].Add("Accuracy:", PopUp.Colors.Title, Utilities.FixDP(MidsContext.Config.BaseAcc * power.Accuracy * 100f) + "%", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power.RechargeTime > 0f) { iPopup.Sections[index4].Add("Recharge:", PopUp.Colors.Title, Utilities.FixDP(power.RechargeTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } int durationEffectId = power.GetDurationEffectID(); float iNum = 0f; if (durationEffectId > -1) { iNum = power.Effects[durationEffectId].Duration; } if ((power.PowerType != Enums.ePowerType.Toggle & power.PowerType != Enums.ePowerType.Auto_) && iNum > 0f) { iPopup.Sections[index4].Add("Duration:", PopUp.Colors.Title, Utilities.FixDP(iNum) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power.Range > 0f) { iPopup.Sections[index4].Add("Range:", PopUp.Colors.Title, Utilities.FixDP(power.Range) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power.Arc > 0) { iPopup.Sections[index4].Add("Arc:", PopUp.Colors.Title, Conversions.ToString(power.Arc) + "°", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else if (power.Radius > 0f) { iPopup.Sections[index4].Add("Radius:", PopUp.Colors.Title, Conversions.ToString(power.Radius) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power.CastTime > 0f) { iPopup.Sections[index4].Add("Cast Time:", PopUp.Colors.Title, Utilities.FixDP(power.CastTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } IPower power2 = power; if (power2.Effects.Length > 0) { iPopup.Sections[index4].Add("Effects:", PopUp.Colors.Title, 1f, FontStyle.Bold, 0); char[] chArray = new char[] { '^' }; int num = power2.Effects.Length - 1; for (int index5 = 0; index5 <= num; index5++) { if ((power2.Effects[index5].EffectType != Enums.eEffectType.GrantPower | power2.Effects[index5].Absorbed_Effect) & power2.Effects[index5].EffectType != Enums.eEffectType.RevokePower & power2.Effects[index5].EffectType != Enums.eEffectType.SetMode) { index4 = iPopup.Add(null); power.Effects[index5].Power = power; string[] strArray = power.Effects[index5].BuildEffectString(false, "", false, false, false).Replace("[", "\r\n").Replace("\r\n", "^").Replace(" ", "").Replace("]", "").Split(chArray); int num2 = strArray.Length - 1; for (int index6 = 0; index6 <= num2; index6++) { if (index6 == 0) { iPopup.Sections[index4].Add(strArray[index6], PopUp.Colors.Effect, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index4].Add(strArray[index6], PopUp.Colors.Disabled, 0.9f, FontStyle.Italic, 2); } } } } } this.PopInfo.SetPopup(iPopup); this.ChangedScrollFrameContents(); } } }
public void miniPowerInfo(int pIDX) { if (Locked) { return; } IPower power1 = new Power(myPowers[pIDX]); power1.AbsorbPetEffects(); power1.ApplyGrantPowerEffects(); PopUp.PopupData iPopup = new PopUp.PopupData(); if (pIDX < 0) { PopInfo.SetPopup(iPopup); ChangedScrollFrameContents(); } else { int index1 = iPopup.Add(); string str1 = ""; switch (power1.PowerType) { case Enums.ePowerType.Click: if (power1.ClickBuff) { str1 = "(Click)"; } break; case Enums.ePowerType.Auto_: str1 = "(Auto)"; break; case Enums.ePowerType.Toggle: str1 = "(Toggle)"; break; } iPopup.Sections[index1].Add(power1.DisplayName, PopUp.Colors.Title, 1f, FontStyle.Bold, 0); iPopup.Sections[index1].Add(str1 + " " + power1.DescShort, PopUp.Colors.Text, 0.9f, FontStyle.Bold, 0); string str2 = power1.DescLong.Replace("<br>", "\r\n"); iPopup.Sections[index1].Add(str1 + " " + str2, PopUp.Colors.Common, 1f, FontStyle.Regular); int index2 = iPopup.Add(); if (power1.EndCost > 0.0) { if (power1.ActivatePeriod > 0.0) { iPopup.Sections[index2].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power1.EndCost / power1.ActivatePeriod) + "/s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index2].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power1.EndCost), PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } } if (power1.EntitiesAutoHit == Enums.eEntity.None | power1.Range > 20.0 & power1.I9FXPresentP(Enums.eEffectType.Mez, Enums.eMez.Taunt)) { iPopup.Sections[index2].Add("Accuracy:", PopUp.Colors.Title, Utilities.FixDP((float)(MidsContext.Config.BaseAcc * (double)power1.Accuracy * 100.0)) + "%", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.RechargeTime > 0.0) { iPopup.Sections[index2].Add("Recharge:", PopUp.Colors.Title, Utilities.FixDP(power1.RechargeTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } int durationEffectId = power1.GetDurationEffectID(); float iNum = 0.0f; if (durationEffectId > -1) { iNum = power1.Effects[durationEffectId].Duration; } if (power1.PowerType != Enums.ePowerType.Toggle & power1.PowerType != Enums.ePowerType.Auto_ && iNum > 0.0) { iPopup.Sections[index2].Add("Duration:", PopUp.Colors.Title, Utilities.FixDP(iNum) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.Range > 0.0) { iPopup.Sections[index2].Add("Range:", PopUp.Colors.Title, Utilities.FixDP(power1.Range) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.Arc > 0) { iPopup.Sections[index2].Add("Arc:", PopUp.Colors.Title, Convert.ToString(power1.Arc) + "°", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else if (power1.Radius > 0.0) { iPopup.Sections[index2].Add("Radius:", PopUp.Colors.Title, Convert.ToString(power1.Radius) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.CastTime > 0.0) { iPopup.Sections[index2].Add("Cast Time:", PopUp.Colors.Title, Utilities.FixDP(power1.CastTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } IPower power2 = power1; if (power2.Effects.Length > 0) { iPopup.Sections[index2].Add("Effects:", PopUp.Colors.Title, 1f, FontStyle.Bold, 0); char[] chArray = { '^' }; int num1 = power2.Effects.Length - 1; for (int index3 = 0; index3 <= num1; ++index3) { if (!((power2.Effects[index3].EffectType != Enums.eEffectType.GrantPower | power2.Effects[index3].Absorbed_Effect) & power2.Effects[index3].EffectType != Enums.eEffectType.RevokePower & power2.Effects[index3].EffectType != Enums.eEffectType.SetMode)) { continue; } int index4 = iPopup.Add(); power1.Effects[index3].SetPower(power1); string[] strArray = power1.Effects[index3].BuildEffectString().Replace("[", "\r\n").Replace("\r\n", "^").Replace(" ", "").Replace("]", "").Split(chArray); int num2 = strArray.Length - 1; for (int index5 = 0; index5 <= num2; ++index5) { if (index5 == 0) { iPopup.Sections[index4].Add(strArray[index5], PopUp.Colors.Effect, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index4].Add(strArray[index5], PopUp.Colors.Disabled, 0.9f, FontStyle.Italic, 2); } } } } PopInfo.SetPopup(iPopup); ChangedScrollFrameContents(); } }