public class WauzPlayerDataSectionSkills
extends java.lang.Object
WauzPlayerData
Modifier and Type | Field and Description |
---|---|
private int |
actionBar
The number of the currently shown action bar.
|
private java.util.Map<java.lang.String,java.lang.Long> |
actionCooldownMap
The action cooldown times by id.
|
private java.util.Map<java.lang.String,Castable> |
castableMap
A map of the unlocked castables, indexed by castable key.
|
private java.util.Map<java.lang.String,java.lang.Long> |
foodCooldownMap
The food cooldown times by id.
|
private java.util.Map<java.lang.String,AbstractPassiveSkill> |
passiveSkillMap
The cached passive skills of the player.
|
private WauzPlayerData |
playerData
The player data the section belongs to.
|
private java.util.List<Castable> |
selectedCastables
The list of selected castables.
|
private java.util.Map<java.lang.String,java.lang.Long> |
skillCooldownMap
The skill cooldown times by id.
|
private java.util.List<Castable> |
unlockedCastables
The list of unlocked castables.
|
Constructor and Description |
---|
WauzPlayerDataSectionSkills(WauzPlayerData playerData)
Constructs a new instance of the section.
|
Modifier and Type | Method and Description |
---|---|
void |
cachePassive(AbstractPassiveSkill passiveSkill)
Caches the given passive skill instance.
|
int |
getActionBar() |
java.util.List<AbstractPassiveSkill> |
getAllCachedPassives()
Gets all of the cached passive skills.
|
AbstractPassiveSkill |
getCachedPassive(java.lang.String skillName)
Gets the cached passive skill with the given name.
|
Castable |
getCastable(java.lang.String castableKey)
Gets an unlocked castable of the player.
|
WauzPlayerData |
getPlayerData() |
long |
getRemainingSkillCooldown(java.lang.String skillId)
Gets the remaining cooldown milliseconds for the given skill.
|
java.util.List<Castable> |
getSelectedCastables() |
java.util.List<Castable> |
getUnlockedCastables() |
boolean |
isActionReady(java.lang.String actionId)
Checks if the cooldown timestamp for the given id is smaller than the current time.
|
boolean |
isFoodReady(java.lang.String foodId)
Checks if the cooldown timestamp for the given food is smaller than the current time.
|
boolean |
isSkillReady(java.lang.String skillId)
Checks if the cooldown timestamp for the given skill is smaller than the current time.
|
void |
refreshSelectedCastables()
Refreshes the list of selected castables.
|
void |
refreshUnlockedCastables()
Refreshes the list of unlocked castables.
|
void |
setActionBar(int actionBar) |
void |
updateActionCooldown(java.lang.String actionId,
java.lang.Long cooldown)
Sets a cooldown in milliseconds from now, for the given id.
|
void |
updateFoodCooldown(java.lang.String foodId,
int cooldown)
Resets the cooldown for the given food.
|
void |
updateSkillCooldown(java.lang.String skillId)
Resets the cooldown for the given skill.
|
private final WauzPlayerData playerData
private int actionBar
private java.util.List<Castable> selectedCastables
private java.util.List<Castable> unlockedCastables
private java.util.Map<java.lang.String,Castable> castableMap
private java.util.Map<java.lang.String,java.lang.Long> skillCooldownMap
private java.util.Map<java.lang.String,java.lang.Long> foodCooldownMap
private java.util.Map<java.lang.String,java.lang.Long> actionCooldownMap
private java.util.Map<java.lang.String,AbstractPassiveSkill> passiveSkillMap
public WauzPlayerDataSectionSkills(WauzPlayerData playerData)
playerData
- The player data the section belongs to.public WauzPlayerData getPlayerData()
public int getActionBar()
public void setActionBar(int actionBar)
actionBar
- The new number of the currently shown action bar.public java.util.List<Castable> getSelectedCastables()
public java.util.List<Castable> getUnlockedCastables()
public Castable getCastable(java.lang.String castableKey)
castableKey
- The key of the castable.public void refreshUnlockedCastables()
public void refreshSelectedCastables()
public long getRemainingSkillCooldown(java.lang.String skillId)
skillId
- The id of the skill.public boolean isSkillReady(java.lang.String skillId)
skillId
- The id of the skill.public void updateSkillCooldown(java.lang.String skillId)
skillId
- The id of the skill.WauzDebugger.toggleMagicDebugMode(Player)
public boolean isFoodReady(java.lang.String foodId)
foodId
- The id of the food.public void updateFoodCooldown(java.lang.String foodId, int cooldown)
foodId
- The id of the food.cooldown
- The food cooldown in seconds.public boolean isActionReady(java.lang.String actionId)
actionId
- The id of the action.public void updateActionCooldown(java.lang.String actionId, java.lang.Long cooldown)
actionId
- The id of the action.cooldown
- The milliseconds of the cooldown.public java.util.List<AbstractPassiveSkill> getAllCachedPassives()
public AbstractPassiveSkill getCachedPassive(java.lang.String skillName)
skillName
- The name of the passive.public void cachePassive(AbstractPassiveSkill passiveSkill)
passiveSkill
- The passive to cache.