import { AnyEvent } from 'parser/core/Events';
import metric from 'parser/core/metric';
import castCount from 'parser/shared/metrics/castCount';

import lowRankSpellsPet from '../lowRankSpellsPet';
import * as SPELLS from '../SPELLS_PET';

/**
 * Returns the max amount of Kill Command casts considering the buff uptime.
 * Does not account for fluctuating cooldowns.
 */
const growlCasts = (events: AnyEvent[], pets: Array<{ id: number }>) =>
  pets.reduce((sum, pet) => {
    const casts = castCount(events, pet.id);

    return (
      sum +
      (casts[SPELLS.GROWL] || 0) +
      lowRankSpellsPet[SPELLS.GROWL].reduce((sum, spellId) => sum + (casts[spellId] || 0), 0)
    );
  }, 0);

export default metric(growlCasts);

import { AnyEvent } from 'parser/core/Events';
import metric from 'parser/core/metric';
import castCount from 'parser/shared/metrics/castCount';

import * as SPELLS from '../SPELLS_PET';

/**
 * Returns the max amount of Kill Command casts considering the buff uptime.
 * Does not account for fluctuating cooldowns.
 */
const growlCasts = (events: AnyEvent[], pets: Array<{ id: number }>) =>
  pets.reduce((sum, pet) => {
    const casts = castCount(events, pet.id);

    return sum + casts[SPELLS.GROWL];
  }, 0);

export default metric(growlCasts);

--- 
+++ 
@@ -2,6 +2,7 @@
 import metric from 'parser/core/metric';
 import castCount from 'parser/shared/metrics/castCount';
 
+import lowRankSpellsPet from '../lowRankSpellsPet';
 import * as SPELLS from '../SPELLS_PET';
 
 /**
@@ -12,7 +13,11 @@
   pets.reduce((sum, pet) => {
     const casts = castCount(events, pet.id);
 
-    return sum + casts[SPELLS.GROWL];
+    return (
+      sum +
+      (casts[SPELLS.GROWL] || 0) +
+      lowRankSpellsPet[SPELLS.GROWL].reduce((sum, spellId) => sum + (casts[spellId] || 0), 0)
+    );
   }, 0);
 
 export default metric(growlCasts);
tbchunter: Fix Growl suggestion did not consider lower rank Growls
