From 3ea65eb13ef72225b828aa2d4e95bc37fe937d36 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 25 Oct 2021 06:59:00 -0500 Subject: [PATCH] 1 - New shop inventory alert edits. --- NPCs/CalamityGlobalNPCLoot.cs | 6 +++--- NPCs/CalamityGlobalTownNPC.cs | 1 - NPCs/Crabulon/CrabulonIdle.cs | 2 -- NPCs/DesertScourge/DesertScourgeHead.cs | 2 -- NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 2 -- NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs | 2 -- NPCs/Ravager/RavagerBody.cs | 2 -- NPCs/SlimeGod/SlimeGodCore.cs | 2 +- 8 files changed, 4 insertions(+), 15 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index cbbab94ad9..59db4f5dba 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, CalamityWorld.malice); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedBoss1); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss1); + CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad, NPCID.Demolitionist }, NPC.downedBoss1); CalamityGlobalNPC.SetNewBossJustDowned(npc); } else if ((npc.boss && (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail)) || npc.type == NPCID.BrainofCthulhu) @@ -114,7 +114,7 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !WorldGen.crimson && !NPC.downedBoss2); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, WorldGen.crimson && !NPC.downedBoss2); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, WorldGen.crimson && !NPC.downedBoss2); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedBoss2); + CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad, NPCID.Demolitionist }, NPC.downedBoss2); CalamityGlobalNPC.SetNewBossJustDowned(npc); } else if (npc.type == NPCID.QueenBee) @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, CalamityWorld.malice); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedBoss3); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss3); + CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad, NPCID.Demolitionist }, NPC.downedBoss3); CalamityGlobalNPC.SetNewBossJustDowned(npc); } else if (npc.type == NPCID.WallofFlesh) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 4e53ff41b0..eeaa3f3edf 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -7,7 +7,6 @@ using CalamityMod.Items.Pets; using CalamityMod.Items.Placeables.Furniture.Fountains; using CalamityMod.Items.Placeables.Walls; using CalamityMod.Items.Potions; -using CalamityMod.Items.SummonItems; using CalamityMod.Items.SummonItems.Invasion; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 265f5e1a32..991ec6027b 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -675,8 +675,6 @@ namespace CalamityMod.NPCs.Crabulon DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedCrabulon); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Dryad }, CalamityWorld.downedCrabulon); - // All other drops are contained in the bag, so they only drop directly on Normal if (!Main.expertMode) { diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index d0ffa72f1a..f2b979ec74 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -566,8 +566,6 @@ namespace CalamityMod.NPCs.DesertScourge DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedDesertScourge); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType() }, CalamityWorld.downedDesertScourge); - // All other drops are contained in the bag, so they only drop directly on Normal if (!Main.expertMode) { diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 9298a1f711..2b0d3441bf 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1225,8 +1225,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedPlaguebringer); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.WitchDoctor }, CalamityWorld.downedPlaguebringer); - // All other drops are contained in the bag, so they only drop directly on Normal if (!Main.expertMode) { diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index b889b20b94..8fb195a90f 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -444,8 +444,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians DropHelper.DropItem(npc, ModContent.ItemType()); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedGuardians); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Wizard }, CalamityWorld.downedGuardians); - // Mark the Profaned Guardians as dead CalamityWorld.downedGuardians = true; CalamityNetcode.SyncWorld(); diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 7e7830a60e..46e1084675 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -711,8 +711,6 @@ namespace CalamityMod.NPCs.Ravager DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedScavenger); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.WitchDoctor }, CalamityWorld.downedScavenger); - // All other drops are contained in the bag, so they only drop directly on Normal if (!Main.expertMode) { diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 22518eed29..a3acedf869 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -664,7 +664,7 @@ namespace CalamityMod.NPCs.SlimeGod DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedSlimeGod); - CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Dryad, ModContent.NPCType() }, CalamityWorld.downedSlimeGod); + CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType() }, CalamityWorld.downedSlimeGod); // Purified Jam is once per player, but drops for all players. CalamityPlayer mp = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].Calamity();