Fixed a bug with random events where untradeables in inventory would be deleted
This commit is contained in:
@@ -87,7 +87,7 @@ abstract class RandomEventNPC(id: Int) : NPC(id) {
|
||||
fun noteAndTeleport() {
|
||||
for (item in player.inventory.toArray()) {
|
||||
if (item == null) continue
|
||||
if (item.noteChange != item.id) {
|
||||
if (item.noteChange != item.id && item.noteChange != -1) {
|
||||
player.inventory.remove(item)
|
||||
player.inventory.add(Item(item.noteChange, item.amount))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user