1package com.runehive.content.activity.impl.kraken;
4import com.runehive.Config;
5import com.runehive.content.achievement.AchievementHandler;
6import com.runehive.content.achievement.AchievementKey;
7import com.runehive.content.activity.Activity;
8import com.runehive.content.activity.ActivityType;
9import com.runehive.content.event.impl.ObjectInteractionEvent;
10import com.runehive.content.skill.impl.magic.teleport.Teleportation;
11import com.runehive.content.skill.impl.magic.teleport.TeleportationData;
12import com.runehive.game.Animation;
13import com.runehive.game.UpdatePriority;
14import com.runehive.game.world.World;
15import com.runehive.game.world.entity.mob.Mob;
16import com.runehive.game.world.entity.mob.npc.Npc;
17import com.runehive.game.world.entity.mob.npc.NpcDeath;
18import com.runehive.game.world.entity.mob.player.Player;
19import com.runehive.game.world.position.Area;
20import com.runehive.game.world.position.Position;
21import com.runehive.net.packet.out.SendMessage;
22import com.runehive.util.Utility;
24import java.util.HashSet;
25import java.util.Iterator;
26import java.util.Optional;
55 private static final int[][]
SPAWN = {
121 public void remove(
Mob mob) {
126 int id = mob.getNpc().id;
137 for (
int[] aSPAWN :
SPAWN) {
191 while (it.hasNext()) {
201 if (
event.getObject().getId() != 538)
203 player.dialogueFactory.sendOption(
"Restart Kraken instance", () -> {
206 },
"Leave Kraken Instance", () -> {
The class that contains setting-related constants for the server.
static final Position DEFAULT_POSITION
The default, i.e.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
Activity(int cooldown, int instance)
Constructs a new SequencedMinigame object.
int instance
The activity instance level.
final void pause()
Sets the cooldown flag to PAUSE.
void onLogout(Player player)
Called when the player logs out.
KrakenActivity(Player player, int instance)
Constructs a new KrakenActivity.
Npc kraken
The Kraken npc.
Set< Npc > tentacles
Set of npc tentacles.
void onRegionChange(Player player)
Called when the player changes region.
static final int[][] SPAWN
Holds all the monster spawn information.
void start()
Starts the next activity stage.
void cleanup()
Cleans up the activity when finished.
final KrakenActivityListener listener
The Kraken activity listener.
void onDeath(Mob mob)
Called when the player die.
void transform(Npc npc, int transform)
Handles transforming a Npc.
boolean completed
Flag if kraken has been defeated.
static KrakenActivity create(Player player)
Creates a new Kraken activity.
final Player player
The player fighting the Kraken.
Optional< KrakenActivityListener > getListener()
Gets an Optional of the ActivityListener for this activity.
void finish()
Finishes the activity.
boolean clickObject(Player player, ObjectInteractionEvent event)
int count
The whirlpool activated count.
boolean canTeleport(Player player)
Called when the player attempts to teleport.
void add(Mob mob)
Adds a mob to the activity.
Created by Daniel on 2017-09-17.
Handles a player teleporting.
static boolean teleport(Player player, Position position)
static void activateOverride(Mob mob, Position position, TeleportationData teleport)
Class that models a single animation used by an entity.
Represents the game world.
static void schedule(Task task)
Submits a new event.
abstract boolean equals(Object obj)
void transform(int transformId)
void animate(int animation)
final boolean isNpc()
Check if an entity is an npc.
final boolean isPlayer()
Check if an entity is a player.
void login()
Handles initializing all the npc assistant methods on login.
Represents a non-player character in the in-game world.
final NpcAssistant npcAssistant
Combat< Npc > getCombat()
The combat of the mob.
This class represents a character controlled by a player.
Handles checking if mobs are in a certain area.
static boolean inKraken(Interactable entity)
Represents a single tile on the game world.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static String getTime()
Gets the current server time and formats it.
Holds all activity types that are timed.
Created by Daniel on 2018-02-07.
Represents different priorities for updating.