diff --git a/pkg/data/npc.go b/pkg/data/npc.go index 0cdd5bf..192a649 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -50,7 +50,7 @@ func (m Monsters) FindOne(id npc.ID, t MonsterType) (Monster, bool) { func (m Monsters) Enemies(filters ...MonsterFilter) []Monster { monsters := make([]Monster, 0) for _, mo := range m { - if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && mo.Stats[stat.Life] > 0 { + if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 { monsters = append(monsters, mo) } } @@ -126,6 +126,19 @@ func (m Monster) IsMerc() bool { return false } +func (m Monster) IsPet() bool { + switch m.Name { + case npc.DruHawk, npc.DruSpiritWolf, npc.DruFenris, npc.HeartOfWolverine, + npc.OakSage, npc.DruBear, npc.DruPlaguePoppy, npc.VineCreature, + npc.DruCycleOfLife, npc.ClayGolem, npc.BloodGolem, npc.IronGolem, + npc.FireGolem, npc.NecroSkeleton, npc.NecroMage, npc.Valkyrie, + npc.ShadowWarrior, npc.ShadowMaster: + return true + default: + return false + } +} + func (m Monster) IsGoodNPC() bool { switch m.Name { case 146, 154, 147, 150, 155, 148, 244, 210, 175, 199, 198, 177, 178, 201, 202, 200, 331, 245, 264, 255, 176, diff --git a/pkg/memory/monsters.go b/pkg/memory/monsters.go index ae7b3eb..a5d038e 100644 --- a/pkg/memory/monsters.go +++ b/pkg/memory/monsters.go @@ -138,10 +138,6 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool { npc.Larva, npc.Familiar, npc.Act3Male, - npc.ClayGolem, - npc.BloodGolem, - npc.IronGolem, - npc.FireGolem, npc.Act3Female, npc.Snake, npc.Parrot, @@ -164,10 +160,7 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool { npc.Hydra2, npc.Hydra3, npc.SevenTombs, - npc.Valkyrie, npc.IronWolf, - npc.NecroSkeleton, - npc.NecroMage, npc.CompellingOrbNpc, npc.SpiritMummy, npc.Act2Guard4, @@ -181,14 +174,6 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool { npc.InvisiblePet, npc.InfernoSentry, npc.DeathSentry, - npc.ShadowWarrior, - npc.ShadowMaster, - npc.DruHawk, - npc.DruSpiritWolf, - npc.DruFenris, - npc.HeartOfWolverine, - npc.OakSage, - npc.DruBear, npc.BaalThrone, npc.InjuredBarbarian, npc.InjuredBarbarian2,