|
RuneHive-Game
|
The enumerated type managing consumable potion types. More...
Classes | |
| enum | BoostType |
| The enumerated type whose elements represent the boost types for potions. More... | |
Public Member Functions | |
| boolean | canDrink (Player player) |
The method which determines if the player can drink the potion. | |
| int | getIdForDose (int dose) |
| Gets the item id for the specified dose. | |
| final int[] | getIds () |
| Gets the identifiers which represent this potion type. | |
| abstract void | onEffect (Player player) |
| The method executed when this potion type activated. | |
| PotionData (int... ids) | |
Create a new PotionData. | |
Static Public Member Functions | |
| static Optional< PotionData > | forId (int id) |
Retrieves the potion consumable element for id. | |
| static Item | getReplacementItem (Item item) |
Retrieves the replacement item for item. | |
| static void | onAntiPoisonEffect (Player player, boolean superPotion, int length) |
| The method that executes the anti-poison potion action. | |
Static Private Member Functions | |
| static void | modifySkill (Player player, int skill, double percentage, int base) |
The method that executes the basic effect potion action that will append the level of skill. | |
| static void | onAgilityEffect (Player player) |
| The method that executes the agility potion action. | |
| static void | onAntiFireEffect (Player player, boolean superVariant) |
| The method that executes the anti-fireRunes potion action. | |
| static void | onBasicEffect (Player player, int skill, BoostType type) |
The method that executes the basic effect potion action that will append the level of skill. | |
| static void | onEnergyEffect (Player player, boolean superPotion) |
| The method that executes the energy potion action. | |
| static void | onFishingEffect (Player player) |
| The method that executes the fishing potion action. | |
| static void | onPrayerEffect (Player player, boolean superPrayer) |
| The method that executes the prayer potion action. | |
| static void | onRestoreEffect (Player player, boolean superRestore) |
| The method that executes the restore potion action. | |
| static void | onSaradominEffect (Player player) |
| The method that executes the Saradomin brew action. | |
| static void | onZamorakEffect (Player player) |
| The method that executes the Zamorak brew action. | |
Private Attributes | |
| final int[] | ids |
| The identifiers which represent this potion type. | |
Static Private Attributes | |
| static final ImmutableSet< PotionData > | VALUES = Sets.immutableEnumSet(EnumSet.allOf(PotionData.class)) |
| Caches our enum values. | |
| static final Item | VIAL = new Item(229) |
| The default item representing the final potion dose. | |
The enumerated type managing consumable potion types.
Definition at line 29 of file PotionData.java.
| com.runehive.content.consume.PotionData.PotionData | ( | int... | ids | ) |
Create a new PotionData.
| ids | the identifiers which represent this potion type. |
Definition at line 259 of file PotionData.java.
References ids.
Referenced by forId().
| boolean com.runehive.content.consume.PotionData.canDrink | ( | Player | player | ) |
The method which determines if the player can drink the potion.
| player | the player to determine this for. |
Definition at line 505 of file PotionData.java.
Referenced by com.runehive.content.bot.PlayerBot.pot().
|
static |
Retrieves the potion consumable element for id.
| id | the id that the potion consumable is attached to. |
Definition at line 482 of file PotionData.java.
References PotionData(), and VALUES.
Referenced by getReplacementItem(), and com.runehive.content.bot.objective.impl.RestockObjective.init().
| int com.runehive.content.consume.PotionData.getIdForDose | ( | int | dose | ) |
Gets the item id for the specified dose.
| dose | the dose to get the item id from. |
Definition at line 524 of file PotionData.java.
References ids.
| final int[] com.runehive.content.consume.PotionData.getIds | ( | ) |
Gets the identifiers which represent this potion type.
Definition at line 514 of file PotionData.java.
References ids.
Retrieves the replacement item for item.
| item | the item to retrieve the replacement item for. |
Definition at line 462 of file PotionData.java.
References forId(), com.runehive.game.world.items.Item.getId(), and VIAL.
Referenced by com.runehive.content.bot.PlayerBot.pot().
|
staticprivate |
The method that executes the basic effect potion action that will append the level of skill.
| player | the player to do this action for. |
Definition at line 433 of file PotionData.java.
References com.runehive.game.world.entity.mob.Mob.damage(), com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.skill.Skill.getLevel(), com.runehive.game.world.entity.skill.Skill.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.
Referenced by onBasicEffect(), onSaradominEffect(), and onZamorakEffect().
|
staticprivate |
The method that executes the agility potion action.
| player | the player to do this action for. |
Definition at line 278 of file PotionData.java.
References com.runehive.game.world.entity.skill.Skill.AGILITY, com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.
|
staticprivate |
The method that executes the anti-fireRunes potion action.
| player | the player to do this action for. |
| superVariant | determines if this potion is the super variant. |
Definition at line 409 of file PotionData.java.
References com.runehive.game.world.entity.combat.effect.CombatEffectType.ANTIFIRE_POTION, com.runehive.game.world.entity.combat.CombatUtil.effect(), and com.runehive.game.world.entity.combat.effect.CombatEffectType.SUPER_ANTIFIRE_POTION.
|
static |
The method that executes the anti-poison potion action.
| player | the player to do this action for. |
| superPotion | true if this potion is a super potion, otherwise. |
| length | the length that the effect lingers for. |
Definition at line 331 of file PotionData.java.
References com.runehive.game.world.entity.combat.CombatUtil.cancelEffect(), com.runehive.util.MutableNumber.get(), com.runehive.game.world.entity.mob.Mob.getPoisonDamage(), com.runehive.game.world.entity.mob.player.Player.getPoisonImmunity(), com.runehive.game.world.entity.mob.Mob.getVenomDamage(), com.runehive.util.MutableNumber.incrementAndGet(), com.runehive.game.world.entity.mob.Mob.isPoisoned(), com.runehive.game.world.entity.mob.Mob.isVenomed(), com.runehive.net.packet.out.SendPoison.PoisonType.NO_POISON, com.runehive.game.world.entity.combat.effect.CombatEffectType.POISON, com.runehive.game.world.entity.mob.Mob.poison(), com.runehive.game.world.World.schedule(), com.runehive.game.world.entity.mob.player.Player.send(), com.runehive.util.MutableNumber.set(), com.runehive.game.world.entity.combat.effect.CombatEffectType.VENOM, and com.runehive.game.world.entity.combat.PoisonType.WEAK_NPC.
|
staticprivate |
The method that executes the basic effect potion action that will append the level of skill.
| player | the player to do this action for. |
Definition at line 423 of file PotionData.java.
References com.runehive.content.consume.PotionData.BoostType.amount, com.runehive.content.consume.PotionData.BoostType.base, and modifySkill().
|
abstract |
The method executed when this potion type activated.
| player | the player to execute this effect for. |
Referenced by com.runehive.content.bot.PlayerBot.pot().
|
staticprivate |
The method that executes the energy potion action.
| player | the player to do this action for. |
| superPotion | true if this potion is a super potion, otherwise. |
Definition at line 366 of file PotionData.java.
References com.runehive.game.world.entity.mob.player.Player.runEnergy, and com.runehive.game.world.entity.mob.player.Player.send().
|
staticprivate |
The method that executes the fishing potion action.
| player | the player to do this action for. |
Definition at line 268 of file PotionData.java.
References com.runehive.game.world.entity.skill.Skill.FISHING, com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.
|
staticprivate |
The method that executes the prayer potion action.
| player | the player to do this action for. |
| superPrayer | determines if this potion is a super prayer potion. |
Definition at line 316 of file PotionData.java.
References com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.Skill.PRAYER, com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.
|
staticprivate |
The method that executes the restore potion action.
| player | the player to do this action for. |
Definition at line 384 of file PotionData.java.
References com.runehive.game.world.entity.skill.SkillManager.get(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.modifyLevel(), com.runehive.game.world.entity.skill.Skill.PRAYER, com.runehive.game.world.entity.skill.SkillManager.refresh(), and com.runehive.game.world.entity.mob.Mob.skills.
|
staticprivate |
The method that executes the Saradomin brew action.
| player | the player to do this action for. |
Definition at line 288 of file PotionData.java.
References com.runehive.game.world.entity.skill.Skill.ATTACK, com.runehive.game.world.entity.skill.Skill.DEFENCE, com.runehive.game.world.entity.skill.Skill.HITPOINTS, com.runehive.game.world.entity.skill.Skill.MAGIC, modifySkill(), com.runehive.game.world.entity.skill.Skill.RANGED, and com.runehive.game.world.entity.skill.Skill.STRENGTH.
|
staticprivate |
The method that executes the Zamorak brew action.
| player | the player to do this action for. |
Definition at line 302 of file PotionData.java.
References com.runehive.game.world.entity.skill.Skill.ATTACK, com.runehive.game.world.entity.skill.Skill.DEFENCE, com.runehive.game.world.entity.skill.Skill.HITPOINTS, modifySkill(), com.runehive.game.world.entity.skill.Skill.PRAYER, and com.runehive.game.world.entity.skill.Skill.STRENGTH.
| com.runehive.content.consume.PotionData.AGILITY_POTION |
Definition at line 69 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTI_VENOM |
Definition at line 192 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTI_VENOM_PLUS |
Definition at line 237 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTIDOTE_PLUS |
Definition at line 57 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTIDOTE_PLUS_PLUS |
Definition at line 63 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTIFIRE_POTIONS |
Definition at line 168 of file PotionData.java.
| com.runehive.content.consume.PotionData.ANTIPOISON_POTIONS |
Definition at line 180 of file PotionData.java.
| com.runehive.content.consume.PotionData.ATTACK_POTIONS |
Definition at line 117 of file PotionData.java.
| com.runehive.content.consume.PotionData.DEFENCE_POTIONS |
Definition at line 105 of file PotionData.java.
| com.runehive.content.consume.PotionData.ENERGY_POTIONS |
Definition at line 87 of file PotionData.java.
| com.runehive.content.consume.PotionData.FISHING_POTION |
Definition at line 75 of file PotionData.java.
|
private |
The identifiers which represent this potion type.
Definition at line 252 of file PotionData.java.
Referenced by getIdForDose(), getIds(), and PotionData().
| com.runehive.content.consume.PotionData.MAGIC_POTIONS |
Definition at line 99 of file PotionData.java.
| com.runehive.content.consume.PotionData.PRAYER_POTIONS |
Definition at line 156 of file PotionData.java.
| com.runehive.content.consume.PotionData.RANGE_POTIONS |
Definition at line 81 of file PotionData.java.
Referenced by com.runehive.content.bot.botclass.impl.PureRangeMelee.pot().
| com.runehive.content.consume.PotionData.RESTORE_POTIONS |
Definition at line 141 of file PotionData.java.
| com.runehive.content.consume.PotionData.SARADOMIN_BREW |
Definition at line 51 of file PotionData.java.
Referenced by com.runehive.content.bot.objective.impl.RestockObjective.init().
| com.runehive.content.consume.PotionData.STAMINA__POTION |
Definition at line 30 of file PotionData.java.
| com.runehive.content.consume.PotionData.STRENGTH_POTIONS |
Definition at line 111 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_ANTIFIRE_POTIONS |
Definition at line 174 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_ANTIPOISON_POTIONS |
Definition at line 186 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_ATTACK_POTIONS |
Definition at line 129 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_COMBAT_POTION |
Definition at line 37 of file PotionData.java.
Referenced by com.runehive.content.bot.botclass.impl.AGSRuneMelee.pot(), com.runehive.content.bot.botclass.impl.PureMelee.pot(), com.runehive.content.bot.botclass.impl.PureRangeMelee.pot(), com.runehive.content.bot.botclass.impl.WelfareRuneMelee.pot(), and com.runehive.content.bot.botclass.impl.ZerkerMelee.pot().
| com.runehive.content.consume.PotionData.SUPER_DEFENCE_POTIONS |
Definition at line 123 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_ENERGY_POTIONS |
Definition at line 93 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_PRAYER_POTIONS |
Definition at line 162 of file PotionData.java.
| com.runehive.content.consume.PotionData.SUPER_RESTORE_POTIONS |
Definition at line 147 of file PotionData.java.
Referenced by com.runehive.content.bot.objective.impl.RestockObjective.init(), com.runehive.content.bot.botclass.impl.AGSRuneMelee.pot(), com.runehive.content.bot.botclass.impl.PureMelee.pot(), com.runehive.content.bot.botclass.impl.PureRangeMelee.pot(), com.runehive.content.bot.botclass.impl.WelfareRuneMelee.pot(), and com.runehive.content.bot.botclass.impl.ZerkerMelee.pot().
| com.runehive.content.consume.PotionData.SUPER_STRENGTH_POTIONS |
Definition at line 135 of file PotionData.java.
|
staticprivate |
The default item representing the final potion dose.
Definition at line 247 of file PotionData.java.
Referenced by getReplacementItem().
| com.runehive.content.consume.PotionData.ZAMORAK_BREW |
Definition at line 45 of file PotionData.java.