Adventure-Terraria-Server-Project / Protector-Plugin

Protector plugin for Terraria Server API and TShock.
GNU General Public License v3.0
10 stars 19 forks source link

Add chest location when throw an exception. #59

Open tanpro260196 opened 7 years ago

tanpro260196 commented 7 years ago

I don't know why but when I use the mass-refill command, this exception always show up after a while: [Protector] A timer's callback has thrown an exception. Excpetion details: Terraria.Plugins.Common.InvalidChestStyleException: Chest has to be a lockable chest. at Terraria.Plugins.Common.TerrariaTiles.LockChest(Point anyChestTileLocation) at Terraria.Plugins.CoderCow.Protector.ChestManager.TryRefillChest(IChest chest, RefillChestMetadata refillChestData) at Terraria.Plugins.CoderCow.Protector.ChestManager.TryRefillChest(Point chestLocation, RefillChestMetadata refillChestData) at Terraria.Plugins.CoderCow.Protector.ChestManager.RefillChestTimer_Callback(TimerBase timer) at Terraria.Plugins.Common.TimerManager.InvokeTimerCallback(TimerBase timer)

All I do is set refill and auto-lock on Dungeon and Hell chest, so it's not suppose to thrown this exception. More importantly, can you add the location of the error chest in the exception message? Really help a lot in tracking down the broken chest.

CoderCow commented 7 years ago

Looks like a bug preventing chests from being locked again when someone took items out and their refill timer expired.