private static string GetSpell(BlizzardPet blizzPet) { // spell ID is the spell which has ON_LEARN var spellId = -1; if (blizzPet.itemSpells != null) { foreach (var spell in blizzPet.itemSpells) { if (spell.trigger == "ON_LEARN") { spellId = spell.spellId; } } } if (spellId <= 0) { return(null); } return(spellId.ToString()); }
public WowHeadPet(BlizzardPet pet) { this.pet = pet; }