Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.39k stars 374 forks source link

ServerApi.Hooks.DropBossBag is no longer valid #2998

Open xuyuwtu opened 7 months ago

xuyuwtu commented 7 months ago

TerrariaApi.Server.ServerApi.Hooks.DropBossBag on OTAPI(v1449) is no longer valid. On OTAPI(v1353) Terraria.NPC.DropBossBag() will call Terraria.NPC.DropItemInstanced(). Finally, call to TerrariaApi.Server.ServerApi.Hooks.DropBossBag. On OTAPI(v1449) NPC.DropBossBag() is removed. Only Terraria.GameContent.Events.DD2Event.DropMedals() method is still being called. NPC.DropBossBag() has been replaced with a rule. RuleType is Terraria.GameContent.ItemDropRules.DropLocalPerClientAndResetsNPCMoneyTo0.This class will call Terraria.GameContent.ItemDropRules.CommonCode.DropItemLocalPerClientAndSetNPCMoneyTo0() to drop boss bag. Now,ServerApi.Hooks.DropBossBag can only capture dropped ItemID.DefenderMedical.