|
RuneHive-Game
|
Handles managing the preset system. More...
Public Member Functions | |
| void | activate () |
| Activates the preset. | |
| void | delete () |
| Handles deleting the preset. | |
| void | name (String name) |
| Handles naming the preset. | |
| void | open () |
| Opens the preset to the last viewed slot. | |
| void | open (int slot) |
| Opens the preset to a specific slot. | |
| void | openSettings () |
| Handles opening the settings menu for the preset. | |
| PresetManager (Player player) | |
Constructs a new PresetManager | |
| void | refresh () |
| Refreshes all the components on the interface. | |
| void | upload () |
| Handles uploading the preset content. | |
Public Attributes | |
| boolean | autoDeposit |
| The automatically deposit items on activate flag. | |
| boolean | deathOpen |
| The preset opening on death flag. | |
| Preset[] | preset = new Preset[SIZE] |
| The presets. | |
Static Public Attributes | |
| static final int | SIZE = 10 |
| The total preset size. | |
Private Member Functions | |
| void | equipment (Preset preset) |
| int | getSlot () |
| Gets the current slot of the preset. | |
| int | getTaken () |
| Gets the taken preset amount. | |
| boolean | hasItemRequirements (Player player, int[] requirements) |
| void | inventory (Preset preset) |
| boolean | valid (boolean open) |
| Checks if the preset is valid. | |
Private Attributes | |
| boolean | permitted |
| If the player is allowed all presets. | |
| final Player | player |
| The player instance. | |
Handles managing the preset system.
Definition at line 27 of file PresetManager.java.
| com.runehive.content.preset.PresetManager.PresetManager | ( | Player | player | ) |
Constructs a new PresetManager.
Definition at line 48 of file PresetManager.java.
References player.
| void com.runehive.content.preset.PresetManager.activate | ( | ) |
Activates the preset.
Definition at line 158 of file PresetManager.java.
References com.runehive.game.world.entity.mob.UpdateFlag.APPEARANCE, autoDeposit, equipment(), getSlot(), inventory(), com.runehive.Config.MAGIC_TAB, player, preset, com.runehive.game.world.entity.combat.magic.Autocast.reset(), and valid().
| void com.runehive.content.preset.PresetManager.delete | ( | ) |
Handles deleting the preset.
Definition at line 278 of file PresetManager.java.
References getSlot(), player, preset, refresh(), and valid().
|
private |
Definition at line 198 of file PresetManager.java.
References hasItemRequirements(), player, and preset.
Referenced by activate().
|
private |
Gets the current slot of the preset.
Definition at line 334 of file PresetManager.java.
References player.
Referenced by activate(), delete(), name(), open(), refresh(), and upload().
|
private |
Gets the taken preset amount.
Definition at line 323 of file PresetManager.java.
References com.runehive.game.world.entity.mob.player.PlayerRight.getPresetAmount(), player, preset, and SIZE.
Referenced by refresh().
|
private |
Definition at line 338 of file PresetManager.java.
References player.
Referenced by equipment().
|
private |
Definition at line 241 of file PresetManager.java.
References com.runehive.game.world.items.Item.copy(), com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getId(), inventory(), player, preset, com.runehive.game.world.items.Item.setAmount(), and com.runehive.game.world.items.Item.unnoted().
Referenced by activate(), and inventory().
| void com.runehive.content.preset.PresetManager.name | ( | String | name | ) |
Handles naming the preset.
Definition at line 110 of file PresetManager.java.
References getSlot(), name(), permitted, player, preset, and refresh().
Referenced by name(), and refresh().
| void com.runehive.content.preset.PresetManager.open | ( | ) |
| void com.runehive.content.preset.PresetManager.open | ( | int | slot | ) |
Opens the preset to a specific slot.
Definition at line 58 of file PresetManager.java.
References com.runehive.game.world.entity.mob.player.PlayerRight.getPresetAmount(), permitted, player, refresh(), and valid().
| void com.runehive.content.preset.PresetManager.openSettings | ( | ) |
Handles opening the settings menu for the preset.
Definition at line 293 of file PresetManager.java.
References autoDeposit, deathOpen, com.runehive.content.dialogue.DialogueFactory.execute(), com.runehive.content.dialogue.DialogueFactory.onAction(), player, com.runehive.content.dialogue.DialogueFactory.sendInformationBox(), com.runehive.content.dialogue.DialogueFactory.sendOption(), and com.runehive.content.dialogue.DialogueFactory.sendStatement().
| void com.runehive.content.preset.PresetManager.refresh | ( | ) |
Refreshes all the components on the interface.
Definition at line 74 of file PresetManager.java.
References com.runehive.game.world.entity.skill.Skill.ATTACK, com.runehive.game.world.entity.skill.Skill.DEFENCE, com.runehive.game.world.entity.mob.player.PlayerRight.getPresetAmount(), getSlot(), getTaken(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.MAGIC, name(), player, com.runehive.game.world.entity.skill.Skill.PRAYER, preset, com.runehive.game.world.entity.skill.Skill.RANGED, SIZE, and com.runehive.game.world.entity.skill.Skill.STRENGTH.
Referenced by delete(), name(), open(), and upload().
| void com.runehive.content.preset.PresetManager.upload | ( | ) |
Handles uploading the preset content.
Definition at line 128 of file PresetManager.java.
References com.runehive.content.achievement.AchievementHandler.activate(), getSlot(), com.runehive.game.world.entity.mob.prayer.PrayerBook.only(), permitted, player, com.runehive.content.achievement.AchievementKey.PRELOAD_SETUP, preset, refresh(), and valid().
|
private |
Checks if the preset is valid.
Definition at line 311 of file PresetManager.java.
References open(), and player.
Referenced by activate(), delete(), open(), and upload().
| boolean com.runehive.content.preset.PresetManager.autoDeposit |
The automatically deposit items on activate flag.
Definition at line 42 of file PresetManager.java.
Referenced by activate(), and openSettings().
| boolean com.runehive.content.preset.PresetManager.deathOpen |
The preset opening on death flag.
Definition at line 39 of file PresetManager.java.
Referenced by openSettings().
|
private |
If the player is allowed all presets.
Definition at line 45 of file PresetManager.java.
|
private |
The player instance.
Definition at line 33 of file PresetManager.java.
Referenced by activate(), delete(), equipment(), getSlot(), getTaken(), hasItemRequirements(), inventory(), name(), open(), openSettings(), PresetManager(), refresh(), upload(), and valid().
The presets.
Definition at line 36 of file PresetManager.java.
Referenced by activate(), delete(), equipment(), getTaken(), inventory(), name(), refresh(), and upload().
|
static |
The total preset size.
Definition at line 30 of file PresetManager.java.
Referenced by getTaken(), and refresh().