Fix errors caused by merge + Refactor chests into GadgetChest

This commit is contained in:
Melledy
2022-05-18 02:36:50 -07:00
parent 94997276db
commit b375881a3e
5 changed files with 64 additions and 41 deletions

View File

@@ -928,13 +928,6 @@ public class Player {
if (shouldDelete) {
entity.getScene().removeEntity(entity);
}
else if (gadget.getGadgetData().getType() == EntityType.Chest) {
getScene().updateGadgetState(gadget, ScriptGadgetState.ChestOpened);
gadget.openChest(this);
this.sendPacket(new PacketGadgetInteractRsp(gadget, InteractType.INTERACT_OPEN_CHEST));
getScene().killEntity(gadget, 0);
}
} else {
// Delete directly
entity.getScene().removeEntity(entity);