Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,7 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/
.DS_Store
.DS_Store

# Rider files
.idea/
Binary file modified NormalDropsBags/Build/NormalDropsBags.dll
Binary file not shown.
62 changes: 54 additions & 8 deletions NormalDropsBags/NormalBossBags.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Terraria;
using TerrariaApi.Server;
using Terraria.DataStructures;

namespace NormalBossBags
{
Expand All @@ -15,7 +16,7 @@ public class NormalBossBags : TerrariaPlugin

public override string Name => "NormalBossBags";

public override Version Version => new Version(1, 0, 0, 0);
public override Version Version => new Version(1, 1, 3, 0);

public NormalBossBags(Main game) : base(game)
{
Expand Down Expand Up @@ -47,19 +48,64 @@ private void OnNpcKill(NpcKilledEventArgs eventArgs)
{
switch (eventArgs.npc.netID) //Check for the npc type. Eol & queen slime have weird drop mechanics so I'm replacing it
{
case Terraria.ID.NPCID.KingSlime:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.KingSlimeBossBag);
return;
case Terraria.ID.NPCID.EyeofCthulhu:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.EyeOfCthulhuBossBag);
return;
case Terraria.ID.NPCID.EaterofWorldsHead:
case Terraria.ID.NPCID.EaterofWorldsBody:
case Terraria.ID.NPCID.EaterofWorldsTail:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.EaterOfWorldsBossBag);
return;
case Terraria.ID.NPCID.BrainofCthulhu:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.BrainOfCthulhuBossBag);
return;
case Terraria.ID.NPCID.QueenBee:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.QueenBeeBossBag);
return;
case Terraria.ID.NPCID.SkeletronHead:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.SkeletronBossBag);
return;
case Terraria.ID.NPCID.Deerclops:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.DeerclopsBossBag);
return;
case Terraria.ID.NPCID.WallofFlesh:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.WallOfFleshBossBag);
return;
case Terraria.ID.NPCID.DukeFishron:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.FishronBossBag);
return;
case Terraria.ID.NPCID.QueenSlimeBoss:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.QueenSlimeBossBag);
return;
case Terraria.ID.NPCID.Retinazer:
case Terraria.ID.NPCID.Spazmatism:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.TwinsBossBag);
return;
case Terraria.ID.NPCID.TheDestroyer:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.DestroyerBossBag);
return;
case Terraria.ID.NPCID.SkeletronPrime:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.SkeletronPrimeBossBag);
return;
case Terraria.ID.NPCID.Plantera:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.PlanteraBossBag);
return;
case Terraria.ID.NPCID.Golem:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.GolemBossBag);
return;
case Terraria.ID.NPCID.MoonLordCore:
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.MoonLordBossBag);
return;
case Terraria.ID.NPCID.HallowBoss: //eol 636
if (eventArgs.npc.AI_120_HallowBoss_IsGenuinelyEnraged()) // Checks if it's the daytime eol and drop terraprisma if so
{
Terraria.Item.NewItem((int)eventArgs.npc.position.X, (int)eventArgs.npc.position.Y, (int)eventArgs.npc.Size.X, (int)eventArgs.npc.Size.Y, Terraria.ID.ItemID.EmpressBlade, 1);//5005 TerraPrisma
Terraria.Item.NewItem(new EntitySource_DebugCommand(), (int)eventArgs.npc.position.X, (int)eventArgs.npc.position.Y, (int)eventArgs.npc.Size.X, (int)eventArgs.npc.Size.Y, Terraria.ID.ItemID.EmpressBlade, 1);//5005 TerraPrisma
} //DropItemInstanced() will tell each client there's an item but will not be an active item slot on the server so it will not be overwritten thus each client can collect the item
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.FairyQueenBossBag); //4782 eol boss bag
return;
case Terraria.ID.NPCID.QueenSlimeBoss: //queen slime 657
eventArgs.npc.DropItemInstanced(eventArgs.npc.position, eventArgs.npc.Size, Terraria.ID.ItemID.QueenSlimeBossBag); //4957 queen slime boss bag
return;
default:
eventArgs.npc.DropBossBags(); // Drops a treasure bag depending on npc type (most bosses)
return;
}

}
Expand Down
Binary file modified NormalDropsBags/References/OTAPI.dll
Binary file not shown.
Binary file modified NormalDropsBags/References/TShockAPI.dll
Binary file not shown.
Binary file modified NormalDropsBags/References/TerrariaServer.exe
Binary file not shown.