|
RuneHive-Game
|
Handles the slayer skill. More...
Public Member Functions | |
| void | activate (Npc npc, int killAmount) |
| Activates killing a slayer npc. | |
| void | assign (TaskDifficulty difficulty) |
| Assigns a slayer task to the player. | |
| void | block () |
| Blocks the current assigned slayer task. | |
| boolean | cancel (boolean requiresCost) |
| Cancel's the current assigned slayer task. | |
| void | confirm (int button) |
| Opens the confirm itemcontainer for purchasing a perk. | |
| int | getAmount () |
| int | getAssigned () |
| List< SlayerTask > | getBlocked () |
| int | getPoints () |
| SlayerTask | getTask () |
| int | getTotalAssigned () |
| int | getTotalCancelled () |
| int | getTotalCompleted () |
| int | getTotalPoints () |
| Set< SlayerUnlockable > | getUnlocked () |
| void | open (SlayerTab tab) |
| Opens the slayer itemcontainer. | |
| void | purchase () |
| Handles purchasing a slayer perk. | |
| void | setAmount (int amount) |
| void | setAssigned (int assigned) |
| void | setBlocked (List< SlayerTask > blocked) |
| void | setPoints (int points) |
| void | setTask (SlayerTask task) |
| void | setTotalAssigned (int totalAssigned) |
| void | setTotalCancelled (int totalCancelled) |
| void | setTotalCompleted (int totalCompleted) |
| void | setTotalPoints (int totalPoints) |
| void | setUnlocked (Set< SlayerUnlockable > unlocked) |
| Slayer (Player player) | |
Constructs a new Slayer | |
| void | store (int slot, int amount, boolean value) |
| Handles purchasing items from the slayer shop. | |
| void | unblock (int index) |
| Unblocks the slayer task. | |
Static Package Functions | |
| [static initializer] | |
Static Package Attributes | |
| static Item[] | ITEMS = new Item[STORE_ITEMS.length] |
Private Attributes | |
| int | amount |
| The current slayer task amount. | |
| int | assigned |
| The slayer task assigned amount. | |
| List< SlayerTask > | blocked = new LinkedList<>() |
| The list of all blocked slayer tasks. | |
| Player | player |
| The player instance. | |
| int | points |
| The slayer points. | |
| SlayerTask | task |
| The slayer task. | |
| int | totalAssigned |
| The total tasks assigned. | |
| int | totalCancelled |
| The total tasks cancelled. | |
| int | totalCompleted |
| The total tasks completed. | |
| int | totalPoints |
| The total points accumulated. | |
| Set< SlayerUnlockable > | unlocked = new HashSet<>(SlayerUnlockable.values().length) |
| The Set of all unlockable slayer perks. | |
Static Private Attributes | |
| static final StoreItem[] | STORE_ITEMS |
Handles the slayer skill.
Definition at line 26 of file Slayer.java.
| com.runehive.content.skill.impl.slayer.Slayer.Slayer | ( | Player | player | ) |
Constructs a new Slayer.
Definition at line 61 of file Slayer.java.
References player.
|
staticpackage |
References ITEMS, and STORE_ITEMS.
| void com.runehive.content.skill.impl.slayer.Slayer.activate | ( | Npc | npc, |
| int | killAmount ) |
Activates killing a slayer npc.
Definition at line 171 of file Slayer.java.
References com.runehive.content.achievement.AchievementHandler.activate(), amount, com.runehive.content.skill.impl.slayer.SlayerTask.getCompletionExperience(), com.runehive.game.world.entity.mob.Mob.getMaximumHealth(), com.runehive.game.world.entity.mob.npc.Npc.getName(), com.runehive.content.skill.impl.slayer.SlayerTask.getPoints(), player, points, com.runehive.game.world.entity.skill.Skill.SLAYER, com.runehive.Config.SLAYER_MODIFICATION, com.runehive.content.achievement.AchievementKey.SLAYER_TASKS, task, and totalCompleted.
Referenced by com.runehive.game.world.entity.mob.npc.NpcDeath.postDeath().
| void com.runehive.content.skill.impl.slayer.Slayer.assign | ( | TaskDifficulty | difficulty | ) |
Assigns a slayer task to the player.
Definition at line 73 of file Slayer.java.
References amount, com.runehive.content.skill.impl.slayer.SlayerTask.assign(), com.runehive.content.skill.impl.slayer.TaskDifficulty.BOSS, com.runehive.content.skill.impl.slayer.TaskDifficulty.EASY, com.runehive.content.skill.impl.slayer.SlayerTask.getDifficulty(), com.runehive.content.skill.impl.slayer.TaskDifficulty.HARD, com.runehive.content.skill.impl.slayer.TaskDifficulty.MEDIUM, player, com.runehive.util.Utility.random(), com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), task, and totalAssigned.
| void com.runehive.content.skill.impl.slayer.Slayer.block | ( | ) |
Blocks the current assigned slayer task.
Definition at line 128 of file Slayer.java.
References amount, blocked, player, points, com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), task, and totalCancelled.
| boolean com.runehive.content.skill.impl.slayer.Slayer.cancel | ( | boolean | requiresCost | ) |
Cancel's the current assigned slayer task.
Definition at line 105 of file Slayer.java.
References amount, com.runehive.game.world.entity.mob.player.PlayerRight.isDonator(), player, points, com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), task, and totalCancelled.
| void com.runehive.content.skill.impl.slayer.Slayer.confirm | ( | int | button | ) |
Opens the confirm itemcontainer for purchasing a perk.
Definition at line 190 of file Slayer.java.
References com.runehive.content.skill.impl.slayer.SlayerTab.CONFIRM, com.runehive.content.skill.impl.slayer.SlayerUnlockable.get(), open(), and player.
| int com.runehive.content.skill.impl.slayer.Slayer.getAmount | ( | ) |
Definition at line 303 of file Slayer.java.
References amount.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getAssigned | ( | ) |
Definition at line 311 of file Slayer.java.
References assigned.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| List< SlayerTask > com.runehive.content.skill.impl.slayer.Slayer.getBlocked | ( | ) |
Definition at line 351 of file Slayer.java.
References blocked.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTask.asList(), and com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getPoints | ( | ) |
Definition at line 287 of file Slayer.java.
References points.
Referenced by com.runehive.content.skill.impl.slayer.SlayerOfferings.confirm(), com.runehive.content.store.currency.impl.SlayerPointCurrency.currencyAmount(), com.runehive.content.store.currency.CurrencyType.getValue(), com.runehive.content.store.currency.impl.SlayerPointCurrency.recieveCurrency(), com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), store(), and com.runehive.content.store.currency.impl.SlayerPointCurrency.takeCurrency().
| SlayerTask com.runehive.content.skill.impl.slayer.Slayer.getTask | ( | ) |
Definition at line 295 of file Slayer.java.
References task.
Referenced by com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyAttackLevel(), com.runehive.game.world.entity.combat.attack.listener.item.SlayerHelmListener.modifyAttackLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyMagicLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyRangedLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyStrengthLevel(), com.runehive.game.world.entity.combat.attack.listener.item.SlayerHelmListener.modifyStrengthLevel(), and com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getTotalAssigned | ( | ) |
Definition at line 319 of file Slayer.java.
References totalAssigned.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getTotalCancelled | ( | ) |
Definition at line 335 of file Slayer.java.
References totalCancelled.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getTotalCompleted | ( | ) |
Definition at line 327 of file Slayer.java.
References totalCompleted.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| int com.runehive.content.skill.impl.slayer.Slayer.getTotalPoints | ( | ) |
Definition at line 343 of file Slayer.java.
References totalPoints.
Referenced by com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| Set< SlayerUnlockable > com.runehive.content.skill.impl.slayer.Slayer.getUnlocked | ( | ) |
Definition at line 359 of file Slayer.java.
References unlocked.
Referenced by com.runehive.content.skill.impl.smithing.SmithingArmour.forge(), and com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
| void com.runehive.content.skill.impl.slayer.Slayer.open | ( | SlayerTab | tab | ) |
Opens the slayer itemcontainer.
Definition at line 66 of file Slayer.java.
References com.runehive.content.skill.impl.slayer.SlayerTab.getIdentification(), player, and com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
Referenced by confirm(), com.runehive.game.plugin.PluginContext.onClick(), purchase(), and com.runehive.content.dialogue.impl.NieveDialogue.sendDialogues().
| void com.runehive.content.skill.impl.slayer.Slayer.purchase | ( | ) |
Handles purchasing a slayer perk.
Definition at line 200 of file Slayer.java.
References com.runehive.content.skill.impl.slayer.SlayerUnlockable.getCost(), com.runehive.content.skill.impl.slayer.SlayerUnlockable.getName(), open(), player, points, com.runehive.content.skill.impl.slayer.SlayerTab.UNLOCK, and unlocked.
| void com.runehive.content.skill.impl.slayer.Slayer.setAmount | ( | int | amount | ) |
Definition at line 307 of file Slayer.java.
References amount.
| void com.runehive.content.skill.impl.slayer.Slayer.setAssigned | ( | int | assigned | ) |
Definition at line 315 of file Slayer.java.
References assigned.
| void com.runehive.content.skill.impl.slayer.Slayer.setBlocked | ( | List< SlayerTask > | blocked | ) |
Definition at line 355 of file Slayer.java.
References blocked.
| void com.runehive.content.skill.impl.slayer.Slayer.setPoints | ( | int | points | ) |
Definition at line 291 of file Slayer.java.
References points.
Referenced by com.runehive.content.skill.impl.slayer.SlayerOfferings.confirm(), com.runehive.content.store.currency.impl.SlayerPointCurrency.recieveCurrency(), and com.runehive.content.store.currency.impl.SlayerPointCurrency.takeCurrency().
| void com.runehive.content.skill.impl.slayer.Slayer.setTask | ( | SlayerTask | task | ) |
| void com.runehive.content.skill.impl.slayer.Slayer.setTotalAssigned | ( | int | totalAssigned | ) |
Definition at line 323 of file Slayer.java.
References totalAssigned.
| void com.runehive.content.skill.impl.slayer.Slayer.setTotalCancelled | ( | int | totalCancelled | ) |
Definition at line 339 of file Slayer.java.
References totalCancelled.
| void com.runehive.content.skill.impl.slayer.Slayer.setTotalCompleted | ( | int | totalCompleted | ) |
Definition at line 331 of file Slayer.java.
References totalCompleted.
| void com.runehive.content.skill.impl.slayer.Slayer.setTotalPoints | ( | int | totalPoints | ) |
Definition at line 347 of file Slayer.java.
References totalPoints.
| void com.runehive.content.skill.impl.slayer.Slayer.setUnlocked | ( | Set< SlayerUnlockable > | unlocked | ) |
Definition at line 363 of file Slayer.java.
References unlocked.
| void com.runehive.content.skill.impl.slayer.Slayer.store | ( | int | slot, |
| int | amount, | ||
| boolean | value ) |
Handles purchasing items from the slayer shop.
Definition at line 247 of file Slayer.java.
References amount, com.runehive.util.Utility.formatDigits(), com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getName(), getPoints(), com.runehive.content.store.StoreItem.getShopValue(), com.runehive.game.world.items.Item.isStackable(), player, points, com.runehive.game.world.items.Item.setAmount(), and STORE_ITEMS.
| void com.runehive.content.skill.impl.slayer.Slayer.unblock | ( | int | index | ) |
Unblocks the slayer task.
Definition at line 159 of file Slayer.java.
References blocked, player, com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), and task.
|
private |
The current slayer task amount.
Definition at line 40 of file Slayer.java.
Referenced by activate(), assign(), block(), cancel(), getAmount(), setAmount(), and store().
|
private |
The slayer task assigned amount.
Definition at line 37 of file Slayer.java.
Referenced by getAssigned(), and setAssigned().
|
private |
The list of all blocked slayer tasks.
Definition at line 55 of file Slayer.java.
Referenced by block(), getBlocked(), setBlocked(), and unblock().
|
staticpackage |
Definition at line 236 of file Slayer.java.
Referenced by [static initializer](), and com.runehive.content.skill.impl.slayer.SlayerTab.refresh().
|
private |
The player instance.
Definition at line 28 of file Slayer.java.
Referenced by activate(), assign(), block(), cancel(), confirm(), open(), purchase(), Slayer(), store(), and unblock().
|
private |
The slayer points.
Definition at line 31 of file Slayer.java.
Referenced by activate(), block(), cancel(), getPoints(), purchase(), setPoints(), and store().
|
staticprivate |
Definition at line 221 of file Slayer.java.
Referenced by [static initializer](), and store().
|
private |
The slayer task.
Definition at line 34 of file Slayer.java.
Referenced by activate(), assign(), block(), cancel(), getTask(), setTask(), and unblock().
|
private |
The total tasks assigned.
Definition at line 43 of file Slayer.java.
Referenced by assign(), getTotalAssigned(), and setTotalAssigned().
|
private |
The total tasks cancelled.
Definition at line 49 of file Slayer.java.
Referenced by block(), cancel(), getTotalCancelled(), and setTotalCancelled().
|
private |
The total tasks completed.
Definition at line 46 of file Slayer.java.
Referenced by activate(), getTotalCompleted(), and setTotalCompleted().
|
private |
The total points accumulated.
Definition at line 52 of file Slayer.java.
Referenced by getTotalPoints(), and setTotalPoints().
|
private |
The Set of all unlockable slayer perks.
Definition at line 58 of file Slayer.java.
Referenced by getUnlocked(), purchase(), and setUnlocked().