1package com.runehive.game.world.entity.combat.effect.impl;
3import com.runehive.net.packet.out.SendMessage;
4import com.runehive.game.world.entity.combat.effect.AntifireDetails;
5import com.runehive.game.world.entity.combat.effect.CombatEffect;
6import com.runehive.game.world.entity.mob.Mob;
7import com.runehive.game.world.entity.mob.player.Player;
59 if(
mob.isPlayer() &&
mob.getPlayer().getAntifireDetails().isPresent()) {
64 player.
send(
new SendMessage(
"@red@Your resistance to dragon fire is about to wear off!"));
68 player.
send(
new SendMessage(
"Your resistance to dragon fire has worn off!"));
75 return mob.isPlayer() &&
mob.getPlayer().getAntifireDetails().isPresent();
MutableNumber getAntifireDelay()
CombatEffect(int delay)
Creates a new CombatEffect.
boolean removeOn(Mob mob)
Removes this effect from mob if needed.
void process(Mob mob)
Provides processing for this effect on mob.
boolean apply(Mob mob)
Applies this effect to mob.
final AntifireDetails.AntifireType type
The type of antifire this player has drunk.
CombatAntifireEffect(AntifireDetails.AntifireType type)
Constructs a new CombatAntifireEffect.
boolean onLogin(Mob mob)
Executed on login, primarily used to re-apply the effect to mob.
This class represents a character controlled by a player.
void setAntifireDetail(AntifireDetails antifireDetails)
Optional< AntifireDetails > getAntifireDetails()
void send(OutgoingPacket encoder)
The OutgoingPacket that sends a message to a Players chatbox in the client.
int decrementAndGet(int amount, int minimum)
Decrements the value within this counter by amount to a minimum of minimum and then returns it.