From 9291f1efd0ea19402b14096815d803f6b0d6e157 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 24 Jan 2020 19:00:15 -0500 Subject: [PATCH] fixed errors --- NPCs/CalamityGlobalNPC.cs | 20 ++++++++++---------- Tiles/CalamityGlobalTile.cs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a555a47fb7..cab8843dd9 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -16,6 +16,7 @@ using CalamityMod.Items.SummonItems; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.AstrumDeus; @@ -1578,14 +1579,6 @@ namespace CalamityMod.NPCs case NPCID.SlimeRibbonRed: case NPCID.SlimeSpiked: case NPCID.SandSlime: - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): - case ModContent.NPCType(): return CalamityGlobalAI.BuffedSlimeAI(npc, mod); } case 3: @@ -1771,8 +1764,6 @@ namespace CalamityMod.NPCs case NPCID.MartianWalker: case NPCID.DemonTaxCollector: case NPCID.TheBride: - case ModContent.NPCType(): - case ModContent.NPCType(): return CalamityGlobalAI.BuffedFighterAI(npc, mod); } break; @@ -1780,6 +1771,15 @@ namespace CalamityMod.NPCs default: break; } + //modded NPCs can't be in switch cases + if (npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType()) + { + return CalamityGlobalAI.BuffedSlimeAI(npc, mod); + } + if (npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType()) + { + return CalamityGlobalAI.BuffedFighterAI(npc, mod); + } } return true; diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index bf8c3d07c4..58cff3c9b0 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -1,6 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Potions; -using CalamityMod.Projectile.Boss; +using CalamityMod.Projectiles.Boss; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Astral; using CalamityMod.Tiles.AstralDesert;