From c7576e4f99d12b2c33bb80770b7b91f0cf5de17d Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 4 Apr 2019 19:14:31 -0700 Subject: [PATCH] Added error detection for multiple cursor items --- core/src/com/riiablo/CharData.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/riiablo/CharData.java b/core/src/com/riiablo/CharData.java index 54158c1c..6fcc0370 100644 --- a/core/src/com/riiablo/CharData.java +++ b/core/src/com/riiablo/CharData.java @@ -158,6 +158,7 @@ public class CharData { for (Array array : store.values()) array.clear(); equipped.clear(); belt.clear(); + cursor = null; for (Item item : d2s.items.items) { addItem(item); //item.load(); @@ -172,6 +173,7 @@ public class CharData { belt.add(item); break; case CURSOR: + assert cursor == null : "Only one item should be marked as cursor"; cursor = item; break; case EQUIPPED: