RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.collectionlog.CollectionLogItem Class Reference
Collaboration diagram for com.runehive.content.collectionlog.CollectionLogItem:

Public Member Functions

void addItem (int item, int amount)
 CollectionLogItem (CollectionLogData data)
int getCounter ()
CollectionLogData getData ()
ArrayList< CollectionItemgetItems ()
boolean hasClaimed ()
void setClaimed (boolean claim)
void setCounter (int count)

Private Attributes

boolean claimed
int counter
CollectionLogData data
ArrayList< CollectionItemitems

Detailed Description

Definition at line 5 of file CollectionLogItem.java.

Constructor & Destructor Documentation

◆ CollectionLogItem()

com.runehive.content.collectionlog.CollectionLogItem.CollectionLogItem ( CollectionLogData data)

Definition at line 12 of file CollectionLogItem.java.

12 {
13 this.data = data;
14 this.counter = 0;
15 this.claimed = false;
16 this.items = new ArrayList<>();
17 }

References data.

Member Function Documentation

◆ addItem()

void com.runehive.content.collectionlog.CollectionLogItem.addItem ( int item,
int amount )

Definition at line 19 of file CollectionLogItem.java.

19 {
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 }

References items.

Referenced by com.runehive.content.collectionlog.CollectionLog.logItem().

Here is the caller graph for this function:

◆ getCounter()

int com.runehive.content.collectionlog.CollectionLogItem.getCounter ( )

Definition at line 37 of file CollectionLogItem.java.

37 {
38 return this.counter;
39 }

◆ getData()

CollectionLogData com.runehive.content.collectionlog.CollectionLogItem.getData ( )

Definition at line 29 of file CollectionLogItem.java.

29 {
30 return this.data;
31 }

◆ getItems()

ArrayList< CollectionItem > com.runehive.content.collectionlog.CollectionLogItem.getItems ( )

Definition at line 33 of file CollectionLogItem.java.

33 {
34 return this.items;
35 }

◆ hasClaimed()

boolean com.runehive.content.collectionlog.CollectionLogItem.hasClaimed ( )

Definition at line 41 of file CollectionLogItem.java.

41 {
42 return this.claimed;
43 }

◆ setClaimed()

void com.runehive.content.collectionlog.CollectionLogItem.setClaimed ( boolean claim)

Definition at line 45 of file CollectionLogItem.java.

45 {
46 this.claimed = claim;
47 }

◆ setCounter()

void com.runehive.content.collectionlog.CollectionLogItem.setCounter ( int count)

Definition at line 49 of file CollectionLogItem.java.

49 {
50 this.counter = count;
51 }

Referenced by com.runehive.content.collectionlog.CollectionLog.increaseCounter().

Here is the caller graph for this function:

Member Data Documentation

◆ claimed

boolean com.runehive.content.collectionlog.CollectionLogItem.claimed
private

Definition at line 9 of file CollectionLogItem.java.

◆ counter

int com.runehive.content.collectionlog.CollectionLogItem.counter
private

Definition at line 8 of file CollectionLogItem.java.

◆ data

CollectionLogData com.runehive.content.collectionlog.CollectionLogItem.data
private

Definition at line 7 of file CollectionLogItem.java.

Referenced by CollectionLogItem().

◆ items

ArrayList<CollectionItem> com.runehive.content.collectionlog.CollectionLogItem.items
private

Definition at line 10 of file CollectionLogItem.java.

Referenced by addItem().


The documentation for this class was generated from the following file: