1package com.osroyale.game.task.impl;
3import com.osroyale.game.task.Task;
4import com.osroyale.game.world.entity.mob.player.Player;
5import com.osroyale.net.packet.out.SendMessage;
29public class SuperAntipoisonTask
extends Task {
30 private final Player player;
32 public SuperAntipoisonTask(
Player player) {
39 if (player.getPoisonImmunity().get() <= 0)
42 if (player.getPoisonImmunity().decrementAndGet(50) <= 50)
43 player.send(
new SendMessage(
"Your resistance to poison is about to wear off!"));
45 if (player.getPoisonImmunity().get() <= 0)
51 player.send(
new SendMessage(
"Your resistance to poison has worn off!"));
52 player.getPoisonImmunity().set(0);
synchronized final void cancel()
Task(boolean instant, int delay)
void onCancel(boolean logout)