RuneHive-Game
Loading...
Searching...
No Matches
CollectionLogItem.java
Go to the documentation of this file.
1package com.runehive.content.collectionlog;
2
3import java.util.ArrayList;
4
5public class CollectionLogItem {
6
8 private int counter;
9 private boolean claimed;
10 private ArrayList<CollectionItem> items;
11
13 this.data = data;
14 this.counter = 0;
15 this.claimed = false;
16 this.items = new ArrayList<>();
17 }
18
19 public void addItem(int item, int amount) {
20 for (int i = 0; i < items.size(); ++i) {
21 if (items.get(i).getId() == item) {
22 items.get(i).setAmount(items.get(i).getAmount() + amount);
23 return;
24 }
25 }
26 items.add(new CollectionItem(item, amount));
27 }
28
30 return this.data;
31 }
32
33 public ArrayList<CollectionItem> getItems() {
34 return this.items;
35 }
36
37 public int getCounter() {
38 return this.counter;
39 }
40
41 public boolean hasClaimed() {
42 return this.claimed;
43 }
44
45 public void setClaimed(boolean claim) {
46 this.claimed = claim;
47 }
48
49 public void setCounter(int count) {
50 this.counter = count;
51 }
52
53}