-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0b5fc1
commit 0d3ceb2
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/com/github/manolo8/darkbot/core/objects/facades/BonusCalendarProxy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.github.manolo8.darkbot.core.objects.facades; | ||
|
||
import com.github.manolo8.darkbot.core.itf.Updatable; | ||
import com.github.manolo8.darkbot.core.objects.swf.FlashList; | ||
import eu.darkbot.api.managers.BonusCalendarAPI; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
public class BonusCalendarProxy extends Updatable implements BonusCalendarAPI { | ||
private int daysClaimed; | ||
private boolean claimable; | ||
private final FlashList<RewardLoot> rewardList = FlashList.ofVector(RewardLoot::new); | ||
|
||
@Override | ||
public void update() { | ||
daysClaimed = readInt(0x30, 0x40); | ||
rewardList.update(readAtom(0x30, 0x58)); | ||
claimable = readBoolean(0x30, 0x50, 0x20); | ||
} | ||
|
||
@Getter | ||
@ToString | ||
private static class RewardLoot extends Auto implements BonusCalendarAPI.RewardList { | ||
private String lootId; | ||
private int amount; | ||
|
||
@Override | ||
public void update() { | ||
this.amount = readInt(0x20); | ||
this.lootId = readString(0x30); | ||
} | ||
} | ||
} |