|
@@ -9,18 +9,8 @@ public class Inventory {
|
9
|
9
|
|
10
|
10
|
public void updateQuality() {
|
11
|
11
|
for (int i = 0; i < items.length; i++) {
|
12
|
|
- //level 1 - item type
|
13
|
|
- if (!items[i].getName().equals("Aged Brie")
|
14
|
|
- && !items[i].getName().equals("Backstage passes to a TAFKAL80ETC concert")) {
|
15
|
|
- //level 2 - quality
|
16
|
|
- if (items[i].getQuality() > 0) {
|
17
|
|
- //level 3 - item type
|
18
|
|
- if (!items[i].getName().equals("Sulfuras, Hand of Ragnaros")) {
|
19
|
|
- updateQuality(items[i], -1);
|
20
|
|
- }
|
21
|
|
- }
|
22
|
|
- //level 1 - item type
|
23
|
|
- } else {
|
|
12
|
+ if (items[i].getName().equals("Aged Brie")
|
|
13
|
+ || items[i].getName().equals("Backstage passes to a TAFKAL80ETC concert")) {
|
24
|
14
|
//level 2 - quality
|
25
|
15
|
if (items[i].getQuality() < 50) {
|
26
|
16
|
updateQuality(items[i], 1);
|
|
@@ -42,6 +32,15 @@ public class Inventory {
|
42
|
32
|
}
|
43
|
33
|
}
|
44
|
34
|
}
|
|
35
|
+ //level 1 - item type
|
|
36
|
+ } else {
|
|
37
|
+ //level 2 - quality
|
|
38
|
+ if (items[i].getQuality() > 0) {
|
|
39
|
+ //level 3 - item type
|
|
40
|
+ if (!items[i].getName().equals("Sulfuras, Hand of Ragnaros")) {
|
|
41
|
+ updateQuality(items[i], -1);
|
|
42
|
+ }
|
|
43
|
+ }
|
45
|
44
|
}
|
46
|
45
|
|
47
|
46
|
|