protected override JProperty GetAbilityTalentChargesObject(TooltipCharges tooltipCharges) { JObject charges = new JObject { { "countMax", tooltipCharges.CountMax }, }; if (tooltipCharges.CountUse.HasValue) { charges.Add("countUse", tooltipCharges.CountUse.Value); } if (tooltipCharges.CountStart.HasValue) { charges.Add("countStart", tooltipCharges.CountStart.Value); } if (tooltipCharges.IsHideCount.HasValue) { charges.Add("hideCount", tooltipCharges.IsHideCount.Value); } if (tooltipCharges.RecastCooldown.HasValue) { charges.Add("recastCooldown", tooltipCharges.RecastCooldown.Value); } return(new JProperty("charges", charges)); }
protected virtual T UnitAbilityTalentCharges(TooltipCharges tooltipCharges) { if (tooltipCharges.HasCharges) { return(GetAbilityTalentChargesObject(tooltipCharges)); } return(null); }
protected override XElement GetAbilityTalentChargesObject(TooltipCharges tooltipCharges) { return(new XElement( "Charges", tooltipCharges.CountMax, tooltipCharges.CountUse.HasValue == true ? new XAttribute("consume", tooltipCharges.CountUse.Value) : null, tooltipCharges.CountStart.HasValue == true ? new XAttribute("initial", tooltipCharges.CountStart.Value) : null, tooltipCharges.IsHideCount.HasValue == true ? new XAttribute("isHidden", tooltipCharges.IsHideCount.Value) : null, tooltipCharges.RecastCooldown.HasValue == true ? new XAttribute("recastCooldown", tooltipCharges.RecastCooldown.Value) : null)); }
protected abstract T GetAbilityTalentChargesObject(TooltipCharges tooltipCharges);