mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Merge branch 'master' into 'master'
Merge this you poor soul See merge request skelsoft/2009scape!1
This commit is contained in:
commit
fa0d8e1b11
343 changed files with 2042 additions and 2597 deletions
|
|
@ -5,7 +5,7 @@ import core.cache.def.Definition;
|
|||
import core.cache.misc.buffer.ByteBufferUtils;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import rs09.game.world.GameWorld;
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ import java.util.Map;
|
|||
* Represents an object's definition.
|
||||
* @author Emperor
|
||||
*/
|
||||
public class ObjectDefinition extends Definition<GameObject> {
|
||||
public class ObjectDefinition extends Definition<Scenery> {
|
||||
|
||||
/**
|
||||
* The item definitions mapping.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import core.game.node.entity.npc.agg.AggressiveHandler;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.ActivityData;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -228,8 +228,8 @@ public final class BarrowsActivityPlugin extends ActivityPlugin {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject object = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery object = (Scenery) target;
|
||||
Player player = (Player) e;
|
||||
if (object.getId() >= 6702 && object.getId() <= 6707) {
|
||||
ClimbActionHandler.climb((Player) e, ClimbActionHandler.CLIMB_UP, BarrowsCrypt.getCrypt(object.getId() - 6702).getExitLocation());
|
||||
|
|
@ -264,7 +264,7 @@ public final class BarrowsActivityPlugin extends ActivityPlugin {
|
|||
if (index > -1) {
|
||||
BarrowsCrypt.getCrypt(index).spawnBrother(player, RegionManager.getTeleportLocation(target.getLocation(), 1));
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(e, (GameObject) target);
|
||||
DoorActionHandler.handleAutowalkDoor(e, (Scenery) target);
|
||||
return true;
|
||||
case 6821:
|
||||
BarrowsCrypt.getCrypt(BarrowsCrypt.AHRIM).openSarcophagus((Player) e, object);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.content.global.action.DigAction;
|
|||
import core.game.content.global.action.DigSpadeHandler;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Direction;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -106,7 +106,7 @@ public final class BarrowsCrypt {
|
|||
* Opens the sarcophagus.
|
||||
* @param player The player.
|
||||
*/
|
||||
public void openSarcophagus(Player player, GameObject object) {
|
||||
public void openSarcophagus(Player player, Scenery object) {
|
||||
if (index == player.getSavedData().getActivityData().getBarrowTunnelIndex()) {
|
||||
player.getDialogueInterpreter().open("barrow_tunnel", index);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.content.activity.ActivityManager;
|
|||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
|
|
@ -31,7 +31,7 @@ public final class BHOptionHandler extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(final Player player, Node node, String option) {
|
||||
GameObject object = (GameObject) node;
|
||||
Scenery object = (Scenery) node;
|
||||
final BountyHunterActivity activity = player.getExtension(BountyHunterActivity.class);
|
||||
switch (object.getId()) {
|
||||
case 28119:
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ import core.game.node.entity.combat.CombatStyle;
|
|||
import core.game.node.entity.impl.PulseManager;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.ConfigurationManager.Configuration;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.communication.ClanEntry;
|
||||
import core.game.system.communication.ClanRepository;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -134,14 +134,14 @@ public final class ClanWarsActivityPlugin extends ActivityPlugin {
|
|||
int offset = 0;
|
||||
for (int x = 5; x < 54; x++) {
|
||||
offset = (offset + 1) % 3;
|
||||
ObjectBuilder.add(new GameObject(28174 + offset, base.transform(x, 64, 0)));
|
||||
SceneryBuilder.add(new Scenery(28174 + offset, base.transform(x, 64, 0)));
|
||||
}
|
||||
GameWorld.getPulser().submit(pulse = new Pulse(200) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
for (int x = 5; x < 54; x++) {
|
||||
Location l = base.transform(x, 64, 0);
|
||||
GameObject object = RegionManager.getObject(l);
|
||||
Scenery object = RegionManager.getObject(l);
|
||||
if (object != null) {
|
||||
Animation anim = Animation.create(7386 + ((object.getId() - 28174) % 3));
|
||||
anim.setObject(object);
|
||||
|
|
@ -153,9 +153,9 @@ public final class ClanWarsActivityPlugin extends ActivityPlugin {
|
|||
public boolean pulse() {
|
||||
for (int x = 5; x < 54; x++) {
|
||||
Location l = base.transform(x, 64, 0);
|
||||
GameObject object = RegionManager.getObject(l);
|
||||
Scenery object = RegionManager.getObject(l);
|
||||
if (object != null) {
|
||||
ObjectBuilder.remove(object);
|
||||
SceneryBuilder.remove(object);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -346,8 +346,8 @@ public final class ClanWarsActivityPlugin extends ActivityPlugin {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject object = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery object = (Scenery) target;
|
||||
if (object.getId() == 28214 || object.getId() == 28140) {
|
||||
e.getProperties().setTeleportLocation(getLeaveLocation());
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.interaction.Option;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.zone.MapZone;
|
||||
import core.game.world.map.zone.ZoneBorders;
|
||||
import core.game.world.map.zone.ZoneBuilder;
|
||||
|
|
@ -63,8 +63,8 @@ public final class ClanWarsChallengeRoom extends MapZone implements Plugin<Objec
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject object = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery object = (Scenery) target;
|
||||
Player player = (Player) e;
|
||||
if (object.getId() == 28213) {
|
||||
if (player.getCommunication().getClan() == null) {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.impl.ForceMovement;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -51,8 +51,8 @@ public final class GnomeCopterActivity extends ActivityPlugin {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject object = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery object = (Scenery) target;
|
||||
if (object.getId() == 30032) {
|
||||
flyGnomeCopter((Player) e, object);
|
||||
return true;
|
||||
|
|
@ -82,7 +82,7 @@ public final class GnomeCopterActivity extends ActivityPlugin {
|
|||
* @param player The player.
|
||||
* @param object The object.
|
||||
*/
|
||||
private void flyGnomeCopter(final Player player, final GameObject object) {
|
||||
private void flyGnomeCopter(final Player player, final Scenery object) {
|
||||
if (!player.getLocation().equals(object.getLocation().transform(0, 1, 0))) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -127,14 +127,14 @@ public final class GnomeCopterActivity extends ActivityPlugin {
|
|||
player.getAppearance().setStandTurnAnimation(8963);
|
||||
} else if (stage == 4) {
|
||||
object.setCharge(88);
|
||||
player.getPacketDispatch().sendObjectAnimation(object, new Animation(5));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, new Animation(5));
|
||||
} else if (stage == 16) {
|
||||
player.getWalkingQueue().reset();
|
||||
player.getWalkingQueue().addPath(object.getLocation().getX(), object.getLocation().getY() + 16, true);
|
||||
Graphics.send(Graphics.create(1579), object.getLocation());
|
||||
} else if (stage == 20) {
|
||||
object.setCharge(1000);
|
||||
player.getPacketDispatch().sendObjectAnimation(object, new Animation(8941));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, new Animation(8941));
|
||||
} else if (stage == 33) {
|
||||
player.unlock();
|
||||
landGnomeCopter(player);
|
||||
|
|
@ -175,7 +175,7 @@ public final class GnomeCopterActivity extends ActivityPlugin {
|
|||
} else if (stage == tick) {
|
||||
player.animate(Animation.create(8957));
|
||||
} else if (stage == tick + 14) {
|
||||
ObjectBuilder.add(new GameObject(30034, player.getLocation()), 6);
|
||||
SceneryBuilder.add(new Scenery(30034, player.getLocation()), 6);
|
||||
player.getEquipment().replace(null, 3);
|
||||
ForceMovement.run(player, player.getLocation(), player.getLocation().transform(0, -1, 0), new Animation(8959), 8);
|
||||
player.lock(2);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -41,7 +41,7 @@ public final class CraftingGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : ((NPC) node).getId();
|
||||
switch (option) {
|
||||
case "open":
|
||||
switch (id) {
|
||||
|
|
@ -56,9 +56,9 @@ public final class CraftingGuildPlugin extends OptionHandler {
|
|||
return true;
|
||||
}
|
||||
player.getDialogueInterpreter().sendDialogues(805, null, "Welcome to the Guild of Master Craftsmen.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -77,8 +77,8 @@ public final class CraftingGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node node, Node n) {
|
||||
if (n instanceof GameObject) {
|
||||
return DoorActionHandler.getDestination((Player) node, (GameObject) n);
|
||||
if (n instanceof Scenery) {
|
||||
return DoorActionHandler.getDestination((Player) node, (Scenery) n);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import core.game.node.entity.skill.Skills;
|
|||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public final class FishingGuild extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final int id = ((GameObject) node).getId();
|
||||
final int id = ((Scenery) node).getId();
|
||||
switch (option) {
|
||||
case "open":
|
||||
switch (id) {
|
||||
|
|
@ -39,7 +39,7 @@ public final class FishingGuild extends OptionHandler {
|
|||
player.getDialogueInterpreter().sendDialogues(308, null, "Hello, I'm afraid only the top fishers are allowed to use", "our premier fishing facilities.");
|
||||
return true;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -34,14 +34,14 @@ public final class HeroGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final int id = ((GameObject) node).getId();
|
||||
final int id = ((Scenery) node).getId();
|
||||
switch (option) {
|
||||
case "open":
|
||||
switch (id) {
|
||||
case 2624:
|
||||
case 2625:
|
||||
// player.getPacketDispatch().sendMessage("You need to complete the Heroes' Quest.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -41,7 +41,7 @@ public final class MiningGuildPlugin extends OptionHandler {
|
|||
ClimbActionHandler.climb(player, new Animation(828), Location.create(3021, 9739, 0));
|
||||
return true;
|
||||
}
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
}
|
||||
if (option.equals("open")) {
|
||||
|
|
@ -49,13 +49,13 @@ public final class MiningGuildPlugin extends OptionHandler {
|
|||
player.getDialogueInterpreter().open(382, NPC.create(382, Location.create(0, 0, 0)), 1);
|
||||
return true;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
}
|
||||
if (option.equals("climb-up")) {
|
||||
if (player.getLocation().withinDistance(new Location(3019, 9739, 0))) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), new Location(3017, 3339, 0));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, "climb-up");
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, "climb-up");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import core.game.node.entity.impl.Projectile;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -64,7 +64,7 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : 0;
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : 0;
|
||||
switch (option) {
|
||||
case "fire-at":
|
||||
if (player.getArcheryTargets() <= 0) {
|
||||
|
|
@ -78,7 +78,7 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
player.sendMessage("You must have bronze arrows and a bow equipped.");
|
||||
return true;
|
||||
}
|
||||
player.getPulseManager().run(new ArcheryCompetitionPulse(player, (GameObject) node));
|
||||
player.getPulseManager().run(new ArcheryCompetitionPulse(player, (Scenery) node));
|
||||
break;
|
||||
case "open":
|
||||
switch (id) {
|
||||
|
|
@ -89,7 +89,7 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node, player.getLocation().getY() >= 3438 ? Location.create(2659, 3437, 0) : Location.create(2657, 3439, 0));
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node, player.getLocation().getY() >= 3438 ? Location.create(2659, 3437, 0) : Location.create(2657, 3439, 0));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -114,18 +114,18 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node node, Node n) {
|
||||
if (n instanceof GameObject) {
|
||||
if (((GameObject) n).getDefinition().hasAction("open")) {
|
||||
if (((GameObject) n).getId() == 2514) {
|
||||
if (n instanceof Scenery) {
|
||||
if (((Scenery) n).getDefinition().hasAction("open")) {
|
||||
if (((Scenery) n).getId() == 2514) {
|
||||
if (node.getLocation().getY() >= 3438) {
|
||||
return Location.create(2657, 3439, 0);
|
||||
} else {
|
||||
return Location.create(2659, 3437, 0);
|
||||
}
|
||||
}
|
||||
return DoorActionHandler.getDestination((Player) node, (GameObject) n);
|
||||
return DoorActionHandler.getDestination((Player) node, (Scenery) n);
|
||||
}
|
||||
if (((GameObject) n).getId() == 2513)
|
||||
if (((Scenery) n).getId() == 2513)
|
||||
return Location.create(2673, 3420, 0);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -1113,9 +1113,9 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
private final Player player;
|
||||
|
||||
/**
|
||||
* Represents the game object.
|
||||
* Represents the scenery.
|
||||
*/
|
||||
private final GameObject object;
|
||||
private final Scenery object;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code ArcheryCompetitionPulse} {@code Object}.
|
||||
|
|
@ -1123,7 +1123,7 @@ public final class RangingGuildPlugin extends OptionHandler {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public ArcheryCompetitionPulse(final Player player, final GameObject object) {
|
||||
public ArcheryCompetitionPulse(final Player player, final Scenery object) {
|
||||
super(1, player, object);
|
||||
this.player = player;
|
||||
this.object = object;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -43,7 +43,7 @@ public final class WizardGuildPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : ((NPC) node).getId();
|
||||
switch (option) {
|
||||
case "climb-up":
|
||||
switch (id) {
|
||||
|
|
@ -51,7 +51,7 @@ public final class WizardGuildPlugin extends OptionHandler {
|
|||
if (node.getLocation().equals(new Location(2590, 3089, 0))) {
|
||||
ClimbActionHandler.climb(player, null, Location.create(2591, 3092, 1));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public final class WizardGuildPlugin extends OptionHandler {
|
|||
player.getDialogueInterpreter().sendDialogue("You need a Magic level of at least 66 to enter.");
|
||||
return true;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
case 2155:
|
||||
case 2154:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.impl.ForceMovement;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -35,7 +35,7 @@ public final class GodwarsEntranceHandler extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(final Player player, Node node, String option) {
|
||||
GameObject object = (GameObject) node;
|
||||
Scenery object = (Scenery) node;
|
||||
switch (object.getId()) {
|
||||
case 26340:
|
||||
if (!player.getInventory().remove(new Item(954))) {
|
||||
|
|
@ -70,7 +70,7 @@ public final class GodwarsEntranceHandler extends OptionHandler {
|
|||
player.getPacketDispatch().sendMessage("You need a Strength level of 60 to move this boulder.");
|
||||
return true;
|
||||
}
|
||||
player.getPacketDispatch().sendObjectAnimation(object, Animation.create(6980));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(6980));
|
||||
if (player.getLocation().getY() < 3716) {
|
||||
ForceMovement.run(player, Location.create(2898, 3715, 0), Location.create(2898, 3719, 0), new Animation(6978), 3);
|
||||
} else {
|
||||
|
|
@ -79,7 +79,7 @@ public final class GodwarsEntranceHandler extends OptionHandler {
|
|||
GameWorld.getPulser().submit(new Pulse(12, player) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
player.getPacketDispatch().sendObjectAnimation(RegionManager.getObject(0, 2898, 3716), Animation.create(6981));
|
||||
player.getPacketDispatch().sendSceneryAnimation(RegionManager.getObject(0, 2898, 3716), Animation.create(6981));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.info.Rights;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -143,8 +143,8 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject object = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery object = (Scenery) target;
|
||||
if (object.getId() == 26439) {
|
||||
handleIceBridge((Player) e, object);
|
||||
return true;
|
||||
|
|
@ -277,7 +277,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
|
|||
* @param player The player.
|
||||
* @param object The pillar object.
|
||||
*/
|
||||
private void handlePillarGrapple(final Player player, final GameObject object) {
|
||||
private void handlePillarGrapple(final Player player, final Scenery object) {
|
||||
if (player.getSkills().getStaticLevel(Skills.RANGE) < 70) {
|
||||
player.getPacketDispatch().sendMessage("You need a Range level of 70 to enter here.");
|
||||
return;
|
||||
|
|
@ -305,7 +305,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
|
|||
* @param player The player.
|
||||
* @param object The door object.
|
||||
*/
|
||||
private void handleBigDoor(final Player player, final GameObject object, boolean checkLocation) {
|
||||
private void handleBigDoor(final Player player, final Scenery object, boolean checkLocation) {
|
||||
player.lock(4);
|
||||
if (checkLocation && player.getLocation().getX() > object.getLocation().getX()) {
|
||||
GameWorld.getPulser().submit(new MovementPulse(player, object.getLocation()) {
|
||||
|
|
@ -343,7 +343,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
|
|||
* @param object The object.
|
||||
* @return {@code True} if the player can't pass.
|
||||
*/
|
||||
private boolean handleChamberEntrance(Player player, GameObject object) {
|
||||
private boolean handleChamberEntrance(Player player, Scenery object) {
|
||||
Direction dir = Direction.get((object.getRotation() + 3) % 4);
|
||||
if (dir.getStepX() != 0) {
|
||||
if (player.getLocation().getX() == object.getLocation().transform(dir.getStepX(), 0, 0).getX()) {
|
||||
|
|
@ -375,7 +375,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
|
|||
* @param player The player.
|
||||
* @param object The object.
|
||||
*/
|
||||
private void handleIceBridge(final Player player, final GameObject object) {
|
||||
private void handleIceBridge(final Player player, final Scenery object) {
|
||||
if (player.getSkills().getStaticLevel(Skills.HITPOINTS) < 70) {
|
||||
player.getPacketDispatch().sendMessage("You need 70 Hitpoints to cross this bridge.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import core.game.node.entity.skill.agility.AgilityHandler;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Direction;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -72,7 +72,7 @@ public final class MageArenaPlugin extends OptionHandler {
|
|||
player.getDialogueInterpreter().addAction(new DialogueAction() {
|
||||
@Override
|
||||
public void handle(Player player, int buttonId) {
|
||||
handlePool(player, true, destination, (GameObject) node);
|
||||
handlePool(player, true, destination, (Scenery) node);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
|
@ -81,7 +81,7 @@ public final class MageArenaPlugin extends OptionHandler {
|
|||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
handlePool(player, false, destination, (GameObject) node);
|
||||
handlePool(player, false, destination, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -89,7 +89,7 @@ public final class MageArenaPlugin extends OptionHandler {
|
|||
case 2873:
|
||||
case 2874:
|
||||
case 2875:
|
||||
GodType.forObject(node.getId()).pray(player, (GameObject) node);
|
||||
GodType.forObject(node.getId()).pray(player, (Scenery) node);
|
||||
break;
|
||||
case 2412:
|
||||
case 2413:
|
||||
|
|
@ -163,7 +163,7 @@ public final class MageArenaPlugin extends OptionHandler {
|
|||
* @param enter if entered.
|
||||
* @param dest the destination.
|
||||
*/
|
||||
public void handlePool(final Player player, boolean enter, final Location dest, final GameObject object) {
|
||||
public void handlePool(final Player player, boolean enter, final Location dest, final Scenery object) {
|
||||
final Location start = player.getAttribute("mb-loc", player.getLocation());
|
||||
final Location end = player.getLocation().transform(player.getAttribute("mb-dir", Direction.NORTH), 1);
|
||||
player.removeAttribute("mc-loc");
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -155,12 +155,12 @@ public class AlchemistZone extends MTAZone {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void search(Player player, GameObject object) {
|
||||
private void search(Player player, Scenery object) {
|
||||
AlchemistSession session = getSession(player);
|
||||
AlchemistItem item = session.getItem(object.getId());
|
||||
if (object.getId() % 2 != 0) {
|
||||
player.animate(Animation.create(3032));
|
||||
ObjectBuilder.replace(object, object.transform(object.getId() + 1), 35);
|
||||
SceneryBuilder.replace(object, object.transform(object.getId() + 1), 35);
|
||||
}
|
||||
if (item == null) {
|
||||
player.sendMessage("The cupboard is empty.");
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -288,7 +288,7 @@ public class EnchantingZone extends MTAZone {
|
|||
* Takes from the shape object.
|
||||
* @param player the player.
|
||||
*/
|
||||
public void take(Player player, GameObject object) {
|
||||
public void take(Player player, Scenery object) {
|
||||
if (!player.getInventory().hasSpaceFor(item)) {
|
||||
player.sendMessage("You have no space left in your inventory.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -229,7 +229,7 @@ public class GraveyardZone extends MTAZone {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void grab(Player player, GameObject object) {
|
||||
public void grab(Player player, Scenery object) {
|
||||
if (player.getInventory().freeSlots() < 1) {
|
||||
player.sendMessage("You have no free space!");
|
||||
return;
|
||||
|
|
@ -242,7 +242,7 @@ public class GraveyardZone extends MTAZone {
|
|||
if (life < 1) {
|
||||
life = 4;
|
||||
BoneType type = ordinal() + 1 > BoneType.values().length - 1 ? BoneType.FIRST : BoneType.values()[ordinal() + 1];
|
||||
ObjectBuilder.replace(object, object.transform(type.getObjectId()));
|
||||
SceneryBuilder.replace(object, object.transform(type.getObjectId()));
|
||||
}
|
||||
object.getAttributes().setAttribute("life", life);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import core.game.node.entity.player.link.diary.DiaryType;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -31,7 +31,7 @@ public final class BalloonManager extends OptionHandler {
|
|||
/**
|
||||
* The list of dropped balloons.
|
||||
*/
|
||||
private static final List<GameObject> balloons = new ArrayList<>(20);
|
||||
private static final List<Scenery> balloons = new ArrayList<>(20);
|
||||
|
||||
/**
|
||||
* The count down time until droping.
|
||||
|
|
@ -112,10 +112,10 @@ public final class BalloonManager extends OptionHandler {
|
|||
public boolean pulse() {
|
||||
if (waves == 0 || waves == 3 || waves == 5 || waves == 8 || waves == 10 || waves == 12 || waves == 15 || waves == 18 || waves == 20) {
|
||||
for (int i = 0; i < 30; i++) {
|
||||
GameObject balloon = getBalloon();
|
||||
Scenery balloon = getBalloon();
|
||||
if (balloon != null) {
|
||||
balloons.add(balloon);
|
||||
ObjectBuilder.add(balloon, RandomFunction.random(200, 300));
|
||||
SceneryBuilder.add(balloon, RandomFunction.random(200, 300));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -129,12 +129,12 @@ public final class BalloonManager extends OptionHandler {
|
|||
* Gets the balloon drop.
|
||||
* @return the balloon.
|
||||
*/
|
||||
private GameObject getBalloon() {
|
||||
private Scenery getBalloon() {
|
||||
final Location location = new Location(3045 + RandomFunction.randomSign(RandomFunction.getRandom(8)), 3378 + RandomFunction.randomSign(RandomFunction.getRandom(6)), 0);
|
||||
if (!RegionManager.isTeleportPermitted(location) || RegionManager.getObject(location) != null) {
|
||||
return null;
|
||||
}
|
||||
return new GameObject(PartyBalloon.values()[RandomFunction.random(PartyBalloon.values().length)].getBalloonId(), location);
|
||||
return new Scenery(PartyBalloon.values()[RandomFunction.random(PartyBalloon.values().length)].getBalloonId(), location);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -142,7 +142,7 @@ public final class BalloonManager extends OptionHandler {
|
|||
* @return {@code True} if so.
|
||||
*/
|
||||
public boolean isCluttered() {
|
||||
for (GameObject object : balloons) {
|
||||
for (Scenery object : balloons) {
|
||||
if (RegionManager.getObject(object.getLocation()) != null) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ public final class BalloonManager extends OptionHandler {
|
|||
* Gets the balloons.
|
||||
* @return the balloons
|
||||
*/
|
||||
public static List<GameObject> getBalloons() {
|
||||
public static List<Scenery> getBalloons() {
|
||||
return balloons;
|
||||
}
|
||||
|
||||
|
|
@ -232,15 +232,15 @@ public final class BalloonManager extends OptionHandler {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void burst(final Player player, final GameObject object) {
|
||||
final GameObject popped = object.transform(popId);
|
||||
public void burst(final Player player, final Scenery object) {
|
||||
final Scenery popped = object.transform(popId);
|
||||
if (!getBalloons().contains(object)) {
|
||||
player.sendMessage("Error! Balloon not registered.");
|
||||
return;
|
||||
}
|
||||
player.lock(2);
|
||||
ObjectBuilder.remove(object);
|
||||
ObjectBuilder.add(popped);
|
||||
SceneryBuilder.remove(object);
|
||||
SceneryBuilder.add(popped);
|
||||
getBalloons().remove(object);
|
||||
player.animate(Animation.create(10017));
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ public final class BalloonManager extends OptionHandler {
|
|||
public boolean pulse() {
|
||||
switch (++counter) {
|
||||
case 1:
|
||||
ObjectBuilder.remove(popped);
|
||||
SceneryBuilder.remove(popped);
|
||||
if (!player.getIronmanManager().isIronman() && RandomFunction.random(3) == 1) {
|
||||
GroundItem ground = getGround(object.getLocation(), player);
|
||||
if (ground != null) {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.RunScript;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -81,7 +81,7 @@ public final class PartyRoomPlugin extends OptionHandler {
|
|||
switch (node.getId()) {
|
||||
case CLOSED_CHEST:
|
||||
player.animate(Animation.create(536));
|
||||
ObjectBuilder.replace(node.asObject(), node.asObject().transform(OPEN_CHEST));
|
||||
SceneryBuilder.replace(node.asObject(), node.asObject().transform(OPEN_CHEST));
|
||||
break;
|
||||
case OPEN_CHEST:
|
||||
switch (option) {
|
||||
|
|
@ -90,7 +90,7 @@ public final class PartyRoomPlugin extends OptionHandler {
|
|||
break;
|
||||
case "shut":
|
||||
player.animate(Animation.create(535));
|
||||
ObjectBuilder.replace(node.asObject(), node.asObject().transform(CLOSED_CHEST));
|
||||
SceneryBuilder.replace(node.asObject(), node.asObject().transform(CLOSED_CHEST));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -193,7 +193,7 @@ public final class PartyRoomPlugin extends OptionHandler {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void handleLever(Player player, GameObject object) {
|
||||
private void handleLever(Player player, Scenery object) {
|
||||
player.lock(3);
|
||||
player.faceLocation(object.getLocation());
|
||||
player.animate(Animation.create(6933), 1);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.interaction.Option;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.zone.MapZone;
|
||||
import core.game.world.map.zone.ZoneBorders;
|
||||
import core.game.world.map.zone.ZoneRestriction;
|
||||
|
|
@ -31,8 +31,8 @@ public final class PCLanderZone extends MapZone {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject o = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery o = (Scenery) target;
|
||||
switch (o.getId()) {
|
||||
case 14314: // Novice exit ladder
|
||||
if (activities[0].getWaitingPlayers().contains(e)) {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import core.game.node.entity.player.Player;
|
|||
import rs09.game.ai.pvmbots.PvMBotsBuilder;
|
||||
import core.game.node.entity.player.info.Rights;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Direction;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -94,7 +94,7 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
public boolean handle(Player player, Node node, String option) {
|
||||
int pestBotsAmount = 0;
|
||||
int pestBots2Amount = 0;
|
||||
GameObject object = (GameObject) node;
|
||||
Scenery object = (Scenery) node;
|
||||
if (option.equals("cross")) {
|
||||
if (player.getFamiliarManager().hasFamiliar() && player.getRights() != Rights.ADMINISTRATOR) {
|
||||
player.getPacketDispatch().sendMessage("You can't take a follower on the lander.");
|
||||
|
|
@ -160,7 +160,7 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
* @param session The session.
|
||||
* @param object The object.
|
||||
*/
|
||||
private void handleTurretTower(Player player, PestControlSession session, GameObject object) {
|
||||
private void handleTurretTower(Player player, PestControlSession session, Scenery object) {
|
||||
int x = object.getLocation().getLocalX();
|
||||
int y = object.getLocation().getLocalY();
|
||||
if (x == 45 && y == 41) {
|
||||
|
|
@ -188,10 +188,10 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
* Repairs an object.
|
||||
* @param player The player.
|
||||
* @param session The pest control session.
|
||||
* @param object The game object to repair.
|
||||
* @param object The scenery to repair.
|
||||
* @param newId The repaired object id.
|
||||
*/
|
||||
private void repair(Player player, PestControlSession session, GameObject object, int newId) {
|
||||
private void repair(Player player, PestControlSession session, Scenery object, int newId) {
|
||||
if (!player.getInventory().contains(2347, 1)) {
|
||||
player.getPacketDispatch().sendMessage("You'll need a hammer to make any repairs!");
|
||||
return;
|
||||
|
|
@ -203,9 +203,9 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
session.addZealGained(player, 5);
|
||||
player.animate(Animation.create(898));
|
||||
if (session.getBarricades().remove(object)) {
|
||||
GameObject replacement = object.transform(newId, object.getRotation(), getObjectType(newId));
|
||||
Scenery replacement = object.transform(newId, object.getRotation(), getObjectType(newId));
|
||||
session.getBarricades().add(replacement);
|
||||
ObjectBuilder.replace(object, replacement);
|
||||
SceneryBuilder.replace(object, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -213,11 +213,11 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
* Opens the gates.
|
||||
* @param player The player.
|
||||
* @param session The pest control session.
|
||||
* @param object The game object.
|
||||
* @param object The scenery.
|
||||
*/
|
||||
private static void handleGates(Player player, PestControlSession session, GameObject object) {
|
||||
private static void handleGates(Player player, PestControlSession session, Scenery object) {
|
||||
boolean open = (object.getId() % 2) != 0;
|
||||
GameObject second = getSecondDoor(object);
|
||||
Scenery second = getSecondDoor(object);
|
||||
if (second == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -233,13 +233,13 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
session.getBarricades().remove(second);
|
||||
|
||||
Location l = object.getLocation().transform(direction.getStepX(), direction.getStepY(), 0);
|
||||
GameObject replacement = new GameObject(object.getId() + (open ? 1 : -1), l, 0, open ? rotation : ((direction.toInteger() + 3) % 4));
|
||||
ObjectBuilder.replace(object, replacement);
|
||||
Scenery replacement = new Scenery(object.getId() + (open ? 1 : -1), l, 0, open ? rotation : ((direction.toInteger() + 3) % 4));
|
||||
SceneryBuilder.replace(object, replacement);
|
||||
session.getBarricades().add(replacement);
|
||||
|
||||
l = second.getLocation().transform(direction.getStepX(), direction.getStepY(), 0);
|
||||
replacement = new GameObject(second.getId() + (open ? 1 : -1), l, 0, open ? getRotation(second) : ((direction.toInteger() + 3) % 4));
|
||||
ObjectBuilder.replace(second, replacement);
|
||||
replacement = new Scenery(second.getId() + (open ? 1 : -1), l, 0, open ? getRotation(second) : ((direction.toInteger() + 3) % 4));
|
||||
SceneryBuilder.replace(second, replacement);
|
||||
session.getBarricades().add(replacement);
|
||||
}
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
* @param object The object.
|
||||
* @return The rotation.
|
||||
*/
|
||||
private static final int getRotation(GameObject object) {
|
||||
private static final int getRotation(Scenery object) {
|
||||
int id = object.getId();
|
||||
if (id > 14236) {
|
||||
id -= 4;
|
||||
|
|
@ -272,9 +272,9 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
* @param object The first door object.
|
||||
* @return The second door object.
|
||||
*/
|
||||
public static GameObject getSecondDoor(GameObject object) {
|
||||
public static Scenery getSecondDoor(Scenery object) {
|
||||
Location l = object.getLocation();
|
||||
GameObject o = null;
|
||||
Scenery o = null;
|
||||
if ((o = RegionManager.getObject(l.transform(-1, 0, 0))) != null && o.getName().equals(object.getName())) {
|
||||
return o;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import core.game.content.dialogue.FacialExpression;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.ConfigurationManager.Configuration;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.Point;
|
||||
import core.game.world.map.RegionPlane;
|
||||
|
|
@ -51,7 +51,7 @@ public final class PestControlSession {
|
|||
/**
|
||||
* The barricade & gate objects.
|
||||
*/
|
||||
private final List<GameObject> barricades = new ArrayList<>(20);
|
||||
private final List<Scenery> barricades = new ArrayList<>(20);
|
||||
|
||||
/**
|
||||
* The amount of ticks.
|
||||
|
|
@ -377,7 +377,7 @@ public final class PestControlSession {
|
|||
* Gets the barricades.
|
||||
* @return The barricades.
|
||||
*/
|
||||
public List<GameObject> getBarricades() {
|
||||
public List<Scenery> getBarricades() {
|
||||
return barricades;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.combat.BattleState;
|
||||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -31,7 +31,7 @@ public class PCRavagerNPC extends AbstractNPC {
|
|||
/**
|
||||
* Current object target to destroy.
|
||||
*/
|
||||
private GameObject target;
|
||||
private Scenery target;
|
||||
|
||||
/**
|
||||
* The portal index.
|
||||
|
|
@ -107,14 +107,14 @@ public class PCRavagerNPC extends AbstractNPC {
|
|||
int newId = target.getId() + (target.getId() < 14233 ? 3 : 4);
|
||||
boolean destroyed = !isTarget(newId);
|
||||
int type = destroyed ? 22 : target.getType();
|
||||
final GameObject o = target;
|
||||
final GameObject newTarget = o.transform(newId, o.getRotation(), type);
|
||||
final Scenery o = target;
|
||||
final Scenery newTarget = o.transform(newId, o.getRotation(), type);
|
||||
GameWorld.getPulser().submit(new Pulse(1, this, o) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
if (getViewport().getRegion().isActive() && session.getBarricades().remove(o)) {
|
||||
session.getBarricades().add(newTarget);
|
||||
ObjectBuilder.replace(o, newTarget);
|
||||
SceneryBuilder.replace(o, newTarget);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -133,10 +133,10 @@ public class PCRavagerNPC extends AbstractNPC {
|
|||
}
|
||||
|
||||
/**
|
||||
* Starts attacking a game object.
|
||||
* Starts attacking a scenery.
|
||||
* @param o The object.
|
||||
*/
|
||||
private void attack(GameObject o) {
|
||||
private void attack(Scenery o) {
|
||||
target = o;
|
||||
if (o == null) {
|
||||
setWalks(true);
|
||||
|
|
@ -191,7 +191,7 @@ public class PCRavagerNPC extends AbstractNPC {
|
|||
* @return {@code True} if a target was found.
|
||||
*/
|
||||
private boolean findTarget() {
|
||||
for (GameObject o : session.getBarricades()) {
|
||||
for (Scenery o : session.getBarricades()) {
|
||||
if (o.getLocation().withinDistance(getLocation(), MapDistance.RENDERING.getDistance() / 3) && isTarget(o.getId())) {
|
||||
attack(o);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import core.game.node.entity.impl.Animator.Priority;
|
|||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -67,7 +67,7 @@ public final class PCSplatterNPC extends AbstractNPC {
|
|||
if (getProperties().getCombatPulse().isAttacking()) {
|
||||
return;
|
||||
}
|
||||
for (GameObject o : session.getBarricades()) {
|
||||
for (Scenery o : session.getBarricades()) {
|
||||
if (o.getLocation().isNextTo(this)) {
|
||||
commenceDeath(this);
|
||||
break;
|
||||
|
|
@ -115,14 +115,14 @@ public final class PCSplatterNPC extends AbstractNPC {
|
|||
int maximum = getProperties().getCurrentCombatLevel() / 3;
|
||||
int minimum = maximum / 2;
|
||||
if (session != null) {
|
||||
for (GameObject o : new ArrayList<>(session.getBarricades())) {
|
||||
for (Scenery o : new ArrayList<>(session.getBarricades())) {
|
||||
if (o.getLocation().isNextTo(this)) {
|
||||
int newId = o.getId() + (o.getId() < 14233 ? 3 : 4);
|
||||
boolean destroyed = !isTarget(newId);
|
||||
final GameObject newTarget = o.transform(newId, o.getRotation(), destroyed ? 22 : o.getType());
|
||||
final Scenery newTarget = o.transform(newId, o.getRotation(), destroyed ? 22 : o.getType());
|
||||
if (session.getBarricades().remove(o)) {
|
||||
session.getBarricades().add(newTarget);
|
||||
ObjectBuilder.replace(o, newTarget);
|
||||
SceneryBuilder.replace(o, newTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import core.game.node.entity.impl.ForceMovement;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.TeleportManager.TeleportType;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -126,7 +126,7 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
|
|||
case 25018:
|
||||
case 25020:
|
||||
case 25021:
|
||||
pushThrough(p, (GameObject) target);
|
||||
pushThrough(p, (Scenery) target);
|
||||
return true;
|
||||
case 25014:
|
||||
p.getTeleporter().send(Location.create(2427, 4446, 0), TeleportType.PURO_PURO);
|
||||
|
|
@ -141,7 +141,7 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void pushThrough(final Player player, final GameObject object) {
|
||||
private void pushThrough(final Player player, final Scenery object) {
|
||||
if (player.getSkills().getStaticLevel(Skills.HUNTER) < 17) {
|
||||
player.sendMessage("You need a Hunting level of at least 17 to enter the maze.");
|
||||
return;
|
||||
|
|
@ -376,9 +376,9 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
|
|||
private final Location[] locations;
|
||||
|
||||
/**
|
||||
* The game objects.
|
||||
* The scenerys.
|
||||
*/
|
||||
private GameObject[] objects = new GameObject[2];
|
||||
private Scenery[] objects = new Scenery[2];
|
||||
|
||||
/**
|
||||
* The rotation.
|
||||
|
|
@ -415,8 +415,8 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
|
|||
public void init() {
|
||||
int index = 0;
|
||||
for (Location location : locations) {
|
||||
GameObject object = new GameObject(25021, location, 22, rot);
|
||||
ObjectBuilder.add(object);
|
||||
Scenery object = new Scenery(25021, location, 22, rot);
|
||||
SceneryBuilder.add(object);
|
||||
objects[index] = object;
|
||||
index++;
|
||||
}
|
||||
|
|
@ -428,15 +428,15 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
|
|||
*/
|
||||
public void whilt() {
|
||||
busyTicks = GameWorld.getTicks() + 5;
|
||||
for (GameObject object : objects) {
|
||||
for (Scenery object : objects) {
|
||||
if (object == null) {
|
||||
continue;
|
||||
}
|
||||
if (removed) {
|
||||
ObjectBuilder.add(object);
|
||||
SceneryBuilder.add(object);
|
||||
continue;
|
||||
}
|
||||
ObjectBuilder.remove(object);
|
||||
SceneryBuilder.remove(object);
|
||||
}
|
||||
removed = !removed;
|
||||
setNextWhilt();
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
package core.game.content.activity.pyramidplunder;
|
||||
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
|
||||
/**
|
||||
* Object wrapper for pyramid plunder nodes
|
||||
* @author ceik
|
||||
*/
|
||||
|
||||
public class PlunderObject extends GameObject {
|
||||
public class PlunderObject extends Scenery {
|
||||
private transient Player player;
|
||||
private static int thisId;
|
||||
public static int snakeId, openId;
|
||||
|
||||
|
||||
public PlunderObject(GameObject obj){
|
||||
public PlunderObject(Scenery obj){
|
||||
super(obj.getId(),obj.getLocation(),obj.getRotation(),obj.getDirection());
|
||||
this.thisId = obj.getId();
|
||||
switch(thisId){
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -243,7 +243,7 @@ public class PlunderZones implements Plugin<Object> {
|
|||
|
||||
if (!alreadyOpened && (success || charmed)) {
|
||||
player.getPacketDispatch().sendMessage("You successfully search the urn...");
|
||||
ObjectBuilder.replace(target.asObject(), target.asObject().transform(object.openId), 5);
|
||||
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.openId), 5);
|
||||
manager.registerOpened(object);
|
||||
reward(player,object.getId());
|
||||
} else {
|
||||
|
|
@ -255,7 +255,7 @@ public class PlunderZones implements Plugin<Object> {
|
|||
player.getPacketDispatch().sendMessage("You already checked for snakes.");
|
||||
} else {
|
||||
player.getPacketDispatch().sendMessage("You check the urn for snakes...");
|
||||
ObjectBuilder.replace(target.asObject(), target.asObject().transform(object.snakeId), 5);
|
||||
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.snakeId), 5);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -60,9 +60,9 @@ public final class PyramidOptionHandler extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
if (node instanceof GameObject) {
|
||||
if (node instanceof Scenery) {
|
||||
Location destination = EMPTY_ROOM;
|
||||
GameObject object = (GameObject) node;
|
||||
Scenery object = (Scenery) node;
|
||||
boolean willBePushed = (RandomFunction.random(10) > 3);
|
||||
if (object.getId() == 16458 || object.getId() == 16459) {
|
||||
ClimbActionHandler.climb(player, ClimbActionHandler.CLIMB_UP, Location.create(3288, 2801, 0));
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -149,7 +149,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
case 16082:
|
||||
case 16116:
|
||||
case 16050:
|
||||
handlePortal(player, (GameObject) target);
|
||||
handlePortal(player, (Scenery) target);
|
||||
return true;
|
||||
case 16123:
|
||||
case 16124:
|
||||
|
|
@ -166,7 +166,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
case 16044:
|
||||
case 16045:
|
||||
case 16046:
|
||||
handleDoor(player, (GameObject) target);
|
||||
handleDoor(player, (Scenery) target);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -186,7 +186,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
* Handles a portal.
|
||||
* @param player the player.
|
||||
*/
|
||||
private void handlePortal(final Player player, final GameObject object) {
|
||||
private void handlePortal(final Player player, final Scenery object) {
|
||||
final int index = getPortalIndex(object.getId());
|
||||
if (!player.getSavedData().getGlobalData().hasStrongholdReward(index + 1)) {
|
||||
player.getPacketDispatch().sendMessage("You are not of sufficient experience to take the shortcut through this level.");
|
||||
|
|
@ -201,7 +201,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private static void handleDoor(final Player player, final GameObject object) {
|
||||
private static void handleDoor(final Player player, final Scenery object) {
|
||||
final boolean force = isForced(player, object);
|
||||
if (force || RandomFunction.random(40) < 2) {
|
||||
openDoor(player, object);
|
||||
|
|
@ -215,7 +215,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private static void openDoor(final Player player, final GameObject object) {
|
||||
private static void openDoor(final Player player, final Scenery object) {
|
||||
player.lock(3);
|
||||
player.animate(Animation.create(4282));
|
||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
|
|
@ -274,7 +274,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
* @param object the object.
|
||||
* @return {@code True} if its forced.
|
||||
*/
|
||||
private static boolean isForced(final Player player, final GameObject object) {
|
||||
private static boolean isForced(final Player player, final Scenery object) {
|
||||
if (player.inCombat() || player.getProperties().getCombatPulse().isAttacking()) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
/**
|
||||
* The door being interacted with.
|
||||
*/
|
||||
private GameObject door;
|
||||
private Scenery door;
|
||||
|
||||
/**
|
||||
* The npc id.
|
||||
|
|
@ -343,7 +343,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
|
|||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
door = (GameObject) args[0];
|
||||
door = (Scenery) args[0];
|
||||
npcId = getNpcId(door.getName());
|
||||
if (player.getLocation().getX() == 1859 && player.getLocation().getY() == 5239 || player.getLocation().getX() == 1858 && player.getLocation().getY() == 5239) {
|
||||
interpreter.sendDialogues(npcId, FacialExpression.OLD_NORMAL, "Greetings Adventurer. This place is kept safe by the", "spirits within the doors. As you pass through you will be", "asked questions about security. Hopefully you will learn", "much from us.");
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.emote.Emotes;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public class PSOptionHandler extends OptionHandler {
|
|||
boolean locked = config == (1 << 29) || config == (0 << 26);
|
||||
switch (node.getId()) {
|
||||
case 29577:// chest
|
||||
ObjectBuilder.replace(node.asObject(), node.asObject().transform(29578), 60);
|
||||
SceneryBuilder.replace(node.asObject(), node.asObject().transform(29578), 60);
|
||||
return true;
|
||||
case 29578:
|
||||
switch (option) {
|
||||
|
|
@ -138,8 +138,8 @@ public class PSOptionHandler extends OptionHandler {
|
|||
player.teleport(new Location(3158, 4280, 3));
|
||||
return true;
|
||||
}
|
||||
if (node instanceof GameObject) {
|
||||
GameObject object = (GameObject) node;
|
||||
if (node instanceof Scenery) {
|
||||
Scenery object = (Scenery) node;
|
||||
JailPlaques plaque = forId(object.getId());
|
||||
if (plaque != null) {
|
||||
plaque.read(player, object);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.component.CloseEvent;
|
|||
import core.game.component.Component;
|
||||
import core.game.component.ComponentPlugin;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.net.packet.PacketRepository;
|
||||
import core.net.packet.context.CameraContext;
|
||||
|
|
@ -152,7 +152,7 @@ public class StrongHoldOfPlayerSafetyPlugin implements Plugin<Object> {
|
|||
* Sends the jail-plague interface.
|
||||
* @param player The {@code Player} instance.
|
||||
*/
|
||||
public void read(Player player, GameObject object) {
|
||||
public void read(Player player, Scenery object) {
|
||||
int x = object.getLocation().getX();
|
||||
int y = object.getLocation().getY();
|
||||
int rotationX = x;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import core.game.node.entity.skill.Skills;
|
|||
import core.game.node.entity.skill.slayer.Tasks;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.build.DynamicRegion;
|
||||
|
|
@ -268,7 +268,7 @@ public final class TzhaarFightCavesPlugin extends ActivityPlugin {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject && ((GameObject) target).getId() == 9357) {
|
||||
if (target instanceof Scenery && ((Scenery) target).getId() == 9357) {
|
||||
leave((Player) e, e.getAttribute("fc_wave", 0));
|
||||
player.removeAttribute("fc_wave");
|
||||
player.removeAttribute("fc_offset");
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -245,8 +245,8 @@ public final class TzhaarFightPitsPlugin extends ActivityPlugin {
|
|||
|
||||
@Override
|
||||
public boolean interact(Entity e, Node target, Option option) {
|
||||
if (target instanceof GameObject) {
|
||||
GameObject o = (GameObject) target;
|
||||
if (target instanceof Scenery) {
|
||||
Scenery o = (Scenery) target;
|
||||
if (o.getId() == 9369) {
|
||||
ForceMovement.run(e, Location.create(2399, 5175, 0), Location.create(2399, 5177, 0));
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -45,12 +45,12 @@ public final class WarriorsGuild extends OptionHandler {
|
|||
case 15653:
|
||||
case 1530:
|
||||
if (node.getId() == 1530 && !node.getLocation().equals(new Location(2837, 3549, 0))) {
|
||||
DoorActionHandler.handleDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (canEnter(player)) {
|
||||
player.getMusicPlayer().unlock(634);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
player.getDialogueInterpreter().sendDialogues(4285, null, "You not pass. You too weedy.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import core.game.node.entity.impl.ForceMovement;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.ItemLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -110,7 +110,7 @@ public final class AnimationRoom extends MapZone implements Plugin<Object> {
|
|||
* @param object The animator.
|
||||
* @param set The set to animate.
|
||||
*/
|
||||
private void animateArmour(final Player player, final GameObject object, final ArmourSet set) {
|
||||
private void animateArmour(final Player player, final Scenery object, final ArmourSet set) {
|
||||
if (!player.getInventory().containItems(set.getPieces())) {
|
||||
player.getDialogueInterpreter().sendDialogue("You need a plate body, playe legs and full helm of the same type to", "activate the armour animator.");
|
||||
return;
|
||||
|
|
@ -181,7 +181,7 @@ public final class AnimationRoom extends MapZone implements Plugin<Object> {
|
|||
}
|
||||
}
|
||||
}
|
||||
animateArmour(event.getPlayer(), (GameObject) event.getUsedWith(), set);
|
||||
animateArmour(event.getPlayer(), (Scenery) event.getUsedWith(), set);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
|||
import core.game.node.entity.lock.Lock;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.zone.MapZone;
|
||||
|
|
@ -126,7 +126,7 @@ public final class BarrelRoom extends MapZone implements Plugin<Object> {
|
|||
player.getAppearance().setStandAnimation(4179);
|
||||
player.getAppearance().sync();
|
||||
player.setAttribute("barrel_count", barrelId);
|
||||
((GameObject) node).setChildIndex(player, 1);
|
||||
((Scenery) node).setChildIndex(player, 1);
|
||||
if (!players.contains(player)) {
|
||||
player.getWalkingQueue().setRunDisabled(true);
|
||||
players.add(player);
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import core.game.node.entity.impl.Projectile;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.audio.Audio;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -143,8 +143,8 @@ public final class CatapultRoom extends MapZone implements Plugin<Object> {
|
|||
}
|
||||
});
|
||||
Projectile.create(Location.create(2842, 3554, 1), Location.create(2842, 3545, 1), attack.graphicId, 70, 32, 80, 220, 20, 11).send();
|
||||
GameObject object = RegionManager.getObject(Location.create(2840, 3552, 1));
|
||||
ObjectBuilder.replace(object, object.transform(attack.objectId), 4);
|
||||
Scenery object = RegionManager.getObject(Location.create(2840, 3552, 1));
|
||||
SceneryBuilder.replace(object, object.transform(attack.objectId), 4);
|
||||
Audio sound = new Audio(1911);
|
||||
for (Player p : players) {
|
||||
p.getAudioManager().send(sound);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -68,7 +68,7 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
|
|||
Pathfinder.find(p.getLocation(), Location.create(2847, 3541, 2)).walk(p);
|
||||
p.lock(50);
|
||||
} else {
|
||||
GameObject object = RegionManager.getObject(2, 2847, 3541);
|
||||
Scenery object = RegionManager.getObject(2, 2847, 3541);
|
||||
if (object != null && p.getLocation().getX() == 2847 && p.getLocation().getY() == 3541) {
|
||||
DoorActionHandler.handleAutowalkDoor(p, object);
|
||||
leave(p);
|
||||
|
|
@ -161,7 +161,7 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
|
|||
leave(player);
|
||||
PLAYERS.remove(player);
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -32,12 +32,12 @@ public final class DummyRoom extends OptionHandler {
|
|||
* @author Emperor
|
||||
*/
|
||||
private static enum Dummy {
|
||||
STAB(new GameObject(15629, 2857, 3549, 0, 10, 2), -1, WeaponInterface.BONUS_STAB), SLASH(new GameObject(15625, 2858, 3554, 0), -1, WeaponInterface.BONUS_SLASH), CRUSH(new GameObject(15628, 2859, 3549, 0, 10, 2), -1, WeaponInterface.BONUS_CRUSH), CONTROLLED(new GameObject(15627, 2855, 3552, 0, 10, 3), WeaponInterface.STYLE_CONTROLLED, -1), DEFENCE(new GameObject(15630, 2855, 3550, 0, 10, 3), WeaponInterface.STYLE_DEFENSIVE, -1), AGGRESSIVE(new GameObject(15626, 2860, 3553, 0, 10, 1), WeaponInterface.STYLE_AGGRESSIVE, -1), ACCURATE(new GameObject(15624, 2856, 3554, 0), WeaponInterface.STYLE_ACCURATE, -1), ;
|
||||
STAB(new Scenery(15629, 2857, 3549, 0, 10, 2), -1, WeaponInterface.BONUS_STAB), SLASH(new Scenery(15625, 2858, 3554, 0), -1, WeaponInterface.BONUS_SLASH), CRUSH(new Scenery(15628, 2859, 3549, 0, 10, 2), -1, WeaponInterface.BONUS_CRUSH), CONTROLLED(new Scenery(15627, 2855, 3552, 0, 10, 3), WeaponInterface.STYLE_CONTROLLED, -1), DEFENCE(new Scenery(15630, 2855, 3550, 0, 10, 3), WeaponInterface.STYLE_DEFENSIVE, -1), AGGRESSIVE(new Scenery(15626, 2860, 3553, 0, 10, 1), WeaponInterface.STYLE_AGGRESSIVE, -1), ACCURATE(new Scenery(15624, 2856, 3554, 0), WeaponInterface.STYLE_ACCURATE, -1), ;
|
||||
|
||||
/**
|
||||
* The object.
|
||||
*/
|
||||
private final GameObject object;
|
||||
private final Scenery object;
|
||||
|
||||
/**
|
||||
* The attack style to be used on this dummy.
|
||||
|
|
@ -54,7 +54,7 @@ public final class DummyRoom extends OptionHandler {
|
|||
* @param object The object.
|
||||
* @param attackStyle The attack style.
|
||||
*/
|
||||
private Dummy(GameObject object, int attackStyle, int bonusType) {
|
||||
private Dummy(Scenery object, int attackStyle, int bonusType) {
|
||||
this.object = object;
|
||||
this.attackStyle = attackStyle;
|
||||
this.bonusType = bonusType;
|
||||
|
|
@ -64,7 +64,7 @@ public final class DummyRoom extends OptionHandler {
|
|||
* Gets the object.
|
||||
* @return The object.
|
||||
*/
|
||||
public GameObject getObject() {
|
||||
public Scenery getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ public final class DummyRoom extends OptionHandler {
|
|||
}
|
||||
GameWorld.getPulser().submit(new Pulse(10) {
|
||||
boolean activeDummy;
|
||||
GameObject controlled;
|
||||
Scenery controlled;
|
||||
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
|
@ -111,12 +111,12 @@ public final class DummyRoom extends OptionHandler {
|
|||
setDelay(10);
|
||||
timeStamp = GameWorld.getTicks();
|
||||
dummy = RandomFunction.getRandomElement(Dummy.values());
|
||||
ObjectBuilder.replace(RegionManager.getObject(dummy.getObject().getLocation()), dummy.getObject(), 11);
|
||||
SceneryBuilder.replace(RegionManager.getObject(dummy.getObject().getLocation()), dummy.getObject(), 11);
|
||||
activeDummy = true;
|
||||
if (dummy == Dummy.CONTROLLED && controlled == null) {
|
||||
Location l = Location.create(2860, 3551, 0);
|
||||
controlled = new GameObject(dummy.getObject().getId(), l, 10, 1);
|
||||
ObjectBuilder.replace(RegionManager.getObject(l), controlled, 11);
|
||||
controlled = new Scenery(dummy.getObject().getId(), l, 10, 1);
|
||||
SceneryBuilder.replace(RegionManager.getObject(l), controlled, 11);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ public final class DummyRoom extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
GameObject object = (GameObject) node;
|
||||
Scenery object = (Scenery) node;
|
||||
if (object.getId() == 15656) {
|
||||
player.getInterfaceManager().open(new Component(412));
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -65,7 +65,7 @@ public final class ShotPutRoom extends DialoguePlugin {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node n, Node node) {
|
||||
if (node instanceof GameObject) {
|
||||
if (node instanceof Scenery) {
|
||||
return node.getLocation().transform(0, -1, 0);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import core.game.node.item.GroundItem;
|
|||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.item.ItemPlugin;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -602,8 +602,8 @@ public final class DBRCutscenePlugin extends CutscenePlugin {
|
|||
castShock(base.transform(16, 46, 0));
|
||||
break;
|
||||
case 55:
|
||||
GameObject wall = RegionManager.getObject(base.transform(16, 46, 0));
|
||||
ObjectBuilder.replace(wall, wall.transform(9151, 0, 10));
|
||||
Scenery wall = RegionManager.getObject(base.transform(16, 46, 0));
|
||||
SceneryBuilder.replace(wall, wall.transform(9151, 0, 10));
|
||||
getWiseOldMan().getWalkingQueue().reset();
|
||||
getWiseOldMan().getWalkingQueue().addPath(base.getX() + 16, base.getY() + 46);
|
||||
getWiseOldMan().getWalkingQueue().addPath(base.getX() + 17, base.getY() + 46);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import core.game.content.activity.ActivityPlugin;
|
|||
import core.game.content.activity.CutscenePlugin;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.world.map.build.DynamicRegion;
|
||||
|
|
@ -53,8 +53,8 @@ public final class JulietCutscenePlugin extends CutscenePlugin {
|
|||
npcs.add(juliet);
|
||||
npcs.add(NPC.create(3325, base.transform(29, 38, 1)));
|
||||
npcs.add(NPC.create(3324, base.transform(26, 41, 1)));
|
||||
final GameObject door = RegionManager.getObject(getBase().transform(29, 41, 1));
|
||||
ObjectBuilder.remove(door);
|
||||
final Scenery door = RegionManager.getObject(getBase().transform(29, 41, 1));
|
||||
SceneryBuilder.remove(door);
|
||||
for (NPC npc : npcs) {
|
||||
npc.init();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import core.game.node.entity.player.link.diary.DiaryType;
|
|||
import core.game.content.activity.ActivityPlugin;
|
||||
import core.game.content.activity.CutscenePlugin;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -43,17 +43,17 @@ public final class OrganCutScene extends CutscenePlugin {
|
|||
|
||||
@Override
|
||||
public void open() {
|
||||
final GameObject orgin = RegionManager.getObject(base.transform(43, 14, 0));
|
||||
final GameObject newOrgin = new GameObject(36979, base.transform(42, 14, 0));
|
||||
ObjectBuilder.remove(orgin);
|
||||
ObjectBuilder.add(newOrgin);
|
||||
final Scenery orgin = RegionManager.getObject(base.transform(43, 14, 0));
|
||||
final Scenery newOrgin = new Scenery(36979, base.transform(42, 14, 0));
|
||||
SceneryBuilder.remove(orgin);
|
||||
SceneryBuilder.add(newOrgin);
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.POSITION, player.getLocation().getX() + 2, player.getLocation().getY() - 7, 405, 1, 100));
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.ROTATION, player.getLocation().getX() + 1, player.getLocation().getY(), 405, 1, 100));
|
||||
player.lock();
|
||||
GameWorld.getPulser().submit(new Pulse(3) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
player.getPacketDispatch().sendObjectAnimation(RegionManager.getObject(base.transform(42, 14, 0)), new Animation(9841));
|
||||
player.getPacketDispatch().sendSceneryAnimation(RegionManager.getObject(base.transform(42, 14, 0)), new Animation(9841));
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.POSITION, player.getLocation().getX() + 2, player.getLocation().getY() - 3, 400, 1, 1));
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.ROTATION, player.getLocation().getX() + 1, player.getLocation().getY(), 400, 1, 1));
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.content.global.action.DoorActionHandler;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -28,9 +28,9 @@ public final class BorderGuardDialogue extends DialoguePlugin {
|
|||
private static final Item COINS = new Item(995, 10);
|
||||
|
||||
/**
|
||||
* Represents the door game object.
|
||||
* Represents the door scenery.
|
||||
*/
|
||||
private GameObject door;
|
||||
private Scenery door;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code BorderGuardDialogue} {@code Object}.
|
||||
|
|
@ -58,7 +58,7 @@ public final class BorderGuardDialogue extends DialoguePlugin {
|
|||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
if (args.length == 2) {
|
||||
door = ((GameObject) args[1]);
|
||||
door = ((Scenery) args[1]);
|
||||
}
|
||||
if (player.getLocation().equals(LOCATIONS[0]) || player.getLocation().equals(LOCATIONS[1]) || player.getLocation().equals(LOCATIONS[2])) {
|
||||
door = RegionManager.getObject(LOCATIONS[3]);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.content.global.action.DoorActionHandler;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
|
||||
/**
|
||||
* Represents the door peril dialogue.
|
||||
|
|
@ -15,9 +15,9 @@ import core.game.node.object.GameObject;
|
|||
public final class DoorPerilDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Represents the game object door.
|
||||
* Represents the scenery door.
|
||||
*/
|
||||
private GameObject door;
|
||||
private Scenery door;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code DoorPerilDialogue} {@code Object}.
|
||||
|
|
@ -43,7 +43,7 @@ public final class DoorPerilDialogue extends DialoguePlugin {
|
|||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
door = (GameObject) args[0];
|
||||
door = (Scenery) args[0];
|
||||
Quest quest = player.getQuestRepository().getQuest("Priest in Peril");
|
||||
if (quest.getStage(player) == 10) {
|
||||
interpreter.sendDialogue("You knock at the door...You hear a voice from inside.", "Who are you, and what do you want?");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import core.game.node.entity.skill.runecrafting.Talisman;
|
|||
import core.game.interaction.NodeUsageEvent;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.RunScript;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
|
||||
/**
|
||||
* Represents the enchant tiara dialogue.
|
||||
|
|
@ -52,7 +52,7 @@ public final class EnchantTiaraDialogue extends DialoguePlugin {
|
|||
@Override
|
||||
public boolean open(Object... args) {
|
||||
event = ((NodeUsageEvent) args[0]);
|
||||
altar = Altar.forObject(((GameObject) event.getUsedWith()));
|
||||
altar = Altar.forObject(((Scenery) event.getUsedWith()));
|
||||
if (!player.getInventory().containsItem(altar.getTalisman().getTalisman())) {
|
||||
player.getPacketDispatch().sendMessage("You don't have the required talisman.");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import core.game.node.entity.impl.Animator.Priority;
|
|||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -187,8 +187,8 @@ public final class IgnatiusVulcanDialogue extends DialoguePlugin {
|
|||
npc.getWalkingQueue().reset();
|
||||
npc.getAnimator().forceAnimation(ANIMATION);
|
||||
if (RegionManager.getObject(location) == null) {
|
||||
final GameObject fire = new GameObject(2732, location);
|
||||
ObjectBuilder.add(fire, RandomFunction.random(100, 130));
|
||||
final Scenery fire = new Scenery(2732, location);
|
||||
SceneryBuilder.add(fire, RandomFunction.random(100, 130));
|
||||
npc.faceLocation(fire.getLocation());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package core.game.content.dialogue;
|
|||
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
|
|
@ -26,7 +26,7 @@ public final class MithrilSeedsDialogue extends DialoguePlugin {
|
|||
/**
|
||||
* Represents the flower object.
|
||||
*/
|
||||
private GameObject flower;
|
||||
private Scenery flower;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MithrilSeedPluginDialogue}.
|
||||
|
|
@ -51,7 +51,7 @@ public final class MithrilSeedsDialogue extends DialoguePlugin {
|
|||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
flower = (GameObject) args[0];
|
||||
flower = (Scenery) args[0];
|
||||
player.getDialogueInterpreter().sendOptions("Select an Option", "Pick the flowers.", "Leave the flowers.");
|
||||
return true;
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ public final class MithrilSeedsDialogue extends DialoguePlugin {
|
|||
player.getPacketDispatch().sendMessage("Not enough space in your inventory!");
|
||||
return true;
|
||||
}
|
||||
if (ObjectBuilder.remove(flower)) {
|
||||
if (SceneryBuilder.remove(flower)) {
|
||||
player.getInventory().add(reward);
|
||||
player.getPacketDispatch().sendMessage("You pick the flowers.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -61,7 +61,7 @@ public final class MithrilSeedsPlugin extends OptionHandler {
|
|||
}
|
||||
player.animate(ANIMATION);
|
||||
player.getInventory().remove(ITEM);
|
||||
final GameObject object = ObjectBuilder.add(new GameObject(getFlower(RandomFunction.random(100) == 1 ? RARE : FLOWERS), player.getLocation()), 100);
|
||||
final Scenery object = SceneryBuilder.add(new Scenery(getFlower(RandomFunction.random(100) == 1 ? RARE : FLOWERS), player.getLocation()), 100);
|
||||
player.moveStep();
|
||||
player.lock(3);
|
||||
player.getPulseManager().run(new Pulse(1, player) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -201,8 +201,8 @@ public class TraibornDialogue extends DialoguePlugin {
|
|||
stage = 386;
|
||||
break;
|
||||
case 386:
|
||||
final GameObject object = new GameObject(17434, Location.create(3113, 3161, 1), 11, 1);
|
||||
ObjectBuilder.add(object);
|
||||
final Scenery object = new Scenery(17434, Location.create(3113, 3161, 1), 11, 1);
|
||||
SceneryBuilder.add(object);
|
||||
npc.faceLocation(object.getLocation());
|
||||
npc.animate(ANIMATION);
|
||||
if (!player.getInventory().containsItem(BONES)) {
|
||||
|
|
@ -225,7 +225,7 @@ public class TraibornDialogue extends DialoguePlugin {
|
|||
npc.face(player);
|
||||
break;
|
||||
case 7:
|
||||
ObjectBuilder.remove(object);
|
||||
SceneryBuilder.remove(object);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -63,7 +63,7 @@ public enum GodType {
|
|||
* @param player the player.
|
||||
* @param statue the statue.
|
||||
*/
|
||||
public void pray(final Player player, final GameObject statue) {
|
||||
public void pray(final Player player, final Scenery statue) {
|
||||
if (hasAny(player)) {
|
||||
player.lock(3);
|
||||
player.animate(Animation.create(645));
|
||||
|
|
|
|||
|
|
@ -3,10 +3,9 @@ package core.game.content.global.action;
|
|||
import core.game.container.impl.EquipmentContainer;
|
||||
import org.rs09.consts.Items;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import core.game.content.dialogue.DialoguePlugin;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -42,7 +41,7 @@ public final class ClimbActionHandler {
|
|||
* @param object The rope object.
|
||||
* @param option The option.
|
||||
*/
|
||||
public static void climbRope(Player player, GameObject object, String option) {
|
||||
public static void climbRope(Player player, Scenery object, String option) {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +52,7 @@ public final class ClimbActionHandler {
|
|||
* @param object The trap door object.
|
||||
* @param option The option.
|
||||
*/
|
||||
public static void climbTrapdoor(Player player, GameObject object, String option) {
|
||||
public static void climbTrapdoor(Player player, Scenery object, String option) {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -61,12 +60,12 @@ public final class ClimbActionHandler {
|
|||
* Handles the climbing of a ladder.
|
||||
*
|
||||
* @param player The player.
|
||||
* @param startLadder The game object.
|
||||
* @param startLadder The scenery.
|
||||
* @param option The option.
|
||||
* @return True if successfully climbed
|
||||
*/
|
||||
public static boolean climbLadder(Player player, GameObject startLadder, String option) {
|
||||
GameObject endLadder = null;
|
||||
public static boolean climbLadder(Player player, Scenery startLadder, String option) {
|
||||
Scenery endLadder = null;
|
||||
Animation animation = CLIMB_UP;
|
||||
if (startLadder.getName().startsWith("Stair")) {
|
||||
animation = null;
|
||||
|
|
@ -88,8 +87,8 @@ public final class ClimbActionHandler {
|
|||
endLadder = getLadder(startLadder, true);
|
||||
break;
|
||||
case "climb":
|
||||
GameObject upperLadder = getLadder(startLadder, false);
|
||||
GameObject downLadder = getLadder(startLadder, true);
|
||||
Scenery upperLadder = getLadder(startLadder, false);
|
||||
Scenery downLadder = getLadder(startLadder, true);
|
||||
if (upperLadder == null && downLadder != null) {
|
||||
return climbLadder(player, startLadder, "climb-down");
|
||||
}
|
||||
|
|
@ -117,7 +116,7 @@ public final class ClimbActionHandler {
|
|||
* @param object The object to teleport to.
|
||||
* @return The teleport destination.
|
||||
*/
|
||||
public static Location getDestination(GameObject object) {
|
||||
public static Location getDestination(Scenery object) {
|
||||
int sizeX = object.getDefinition().sizeX;
|
||||
int sizeY = object.getDefinition().sizeY;
|
||||
if (object.getRotation() % 2 != 0) {
|
||||
|
|
@ -149,7 +148,7 @@ public final class ClimbActionHandler {
|
|||
* @param dir The preferred direction from the object.
|
||||
* @return The teleporting destination.
|
||||
*/
|
||||
private static Location getDestination(GameObject object, int sizeX, int sizeY, Direction dir, int count) {
|
||||
private static Location getDestination(Scenery object, int sizeX, int sizeY, Direction dir, int count) {
|
||||
Location loc = object.getLocation();
|
||||
if (dir.toInteger() % 2 != 0) {
|
||||
int x = dir.getStepX();
|
||||
|
|
@ -248,9 +247,9 @@ public final class ClimbActionHandler {
|
|||
* @param down If the player is going down a floor.
|
||||
* @return The ladder the current ladder object leads to.
|
||||
*/
|
||||
private static GameObject getLadder(GameObject object, boolean down) {
|
||||
private static Scenery getLadder(Scenery object, boolean down) {
|
||||
int mod = down ? -1 : 1;
|
||||
GameObject ladder = RegionManager.getObject(object.getLocation().transform(0, 0, mod));
|
||||
Scenery ladder = RegionManager.getObject(object.getLocation().transform(0, 0, mod));
|
||||
if (ladder == null || !isLadder(ladder)) {
|
||||
if (ladder != null && ladder.getName().equals(object.getName())) {
|
||||
ladder = RegionManager.getObject(ladder.getLocation().transform(0, 0, mod));
|
||||
|
|
@ -275,10 +274,10 @@ public final class ClimbActionHandler {
|
|||
* @param l The location.
|
||||
* @return The ladder.
|
||||
*/
|
||||
private static GameObject findLadder(Location l) {
|
||||
private static Scenery findLadder(Location l) {
|
||||
for (int x = -5; x < 6; x++) {
|
||||
for (int y = -5; y < 6; y++) {
|
||||
GameObject object = RegionManager.getObject(l.transform(x, y, 0));
|
||||
Scenery object = RegionManager.getObject(l.transform(x, y, 0));
|
||||
if (object != null && isLadder(object)) {
|
||||
return object;
|
||||
}
|
||||
|
|
@ -293,7 +292,7 @@ public final class ClimbActionHandler {
|
|||
* @param object The object.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
private static boolean isLadder(GameObject object) {
|
||||
private static boolean isLadder(Scenery object) {
|
||||
for (String option : object.getDefinition().getOptions()) {
|
||||
if (option != null && (option.contains("Climb"))) {
|
||||
return true;
|
||||
|
|
@ -341,11 +340,11 @@ public final class ClimbActionHandler {
|
|||
/**
|
||||
* Represents the object to use.
|
||||
*/
|
||||
private GameObject object;
|
||||
private Scenery object;
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
object = (GameObject) args[0];
|
||||
object = (Scenery) args[0];
|
||||
interpreter.sendOptions("What would you like to do?", "Climb Up.", "Climb Down.");
|
||||
stage = 0;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.entity.player.link.audio.Audio;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.game.node.object.Constructed;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -38,14 +38,14 @@ public final class DoorActionHandler {
|
|||
* @param player The player.
|
||||
* @param object The object.
|
||||
*/
|
||||
public static void handleDoor(final Player player, final GameObject object) {
|
||||
final GameObject second = (object.getId() == 1530 || object.getId() == 1531) ? null : getSecondDoor(object, player);
|
||||
GameObject o = null;
|
||||
public static void handleDoor(final Player player, final Scenery object) {
|
||||
final Scenery second = (object.getId() == 1530 || object.getId() == 1531) ? null : getSecondDoor(object, player);
|
||||
Scenery o = null;
|
||||
if (object instanceof Constructed && (o = ((Constructed) object).getReplaced()) != null) {
|
||||
player.getAudioManager().send(new Audio(43));
|
||||
ObjectBuilder.replace(object, o);
|
||||
SceneryBuilder.replace(object, o);
|
||||
if (second instanceof Constructed && (o = ((Constructed) second).getReplaced()) != null) {
|
||||
ObjectBuilder.replace(second, o);
|
||||
SceneryBuilder.replace(second, o);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
|
@ -63,7 +63,7 @@ public final class DoorActionHandler {
|
|||
int firstDir = (object.getRotation() + 3) % 4;
|
||||
Point p = getCloseRotation(object);
|
||||
Location firstLoc = object.getLocation().transform((int) p.getX(), (int) p.getY(), 0);
|
||||
ObjectBuilder.replace(object, object.transform(d.getReplaceId(), firstDir, firstLoc));
|
||||
SceneryBuilder.replace(object, object.transform(d.getReplaceId(), firstDir, firstLoc));
|
||||
return;
|
||||
}
|
||||
DoorConfigLoader.Door d = DoorConfigLoader.Companion.forId(object.getId());
|
||||
|
|
@ -91,11 +91,11 @@ public final class DoorActionHandler {
|
|||
* @param object The door object.
|
||||
* @return
|
||||
*/
|
||||
public static boolean handleAutowalkDoor(final Entity entity, final GameObject object, final Location endLocation) {
|
||||
public static boolean handleAutowalkDoor(final Entity entity, final Scenery object, final Location endLocation) {
|
||||
if (object.getCharge() == IN_USE_CHARGE) {
|
||||
return false;
|
||||
}
|
||||
final GameObject second = (object.getId() == 3) ? null : getSecondDoor(object, entity);
|
||||
final Scenery second = (object.getId() == 3) ? null : getSecondDoor(object, entity);
|
||||
entity.lock(4);
|
||||
final Location loc = entity.getLocation();
|
||||
entity.addExtension(LogoutTask.class, new LocationLogoutTask(4, loc));
|
||||
|
|
@ -150,7 +150,7 @@ public final class DoorActionHandler {
|
|||
* @param entity the entity.
|
||||
* @param object the object.
|
||||
*/
|
||||
public static boolean handleAutowalkDoor(final Entity entity, final GameObject object) {
|
||||
public static boolean handleAutowalkDoor(final Entity entity, final Scenery object) {
|
||||
return handleAutowalkDoor(entity, object, getEndLocation(entity, object));
|
||||
}
|
||||
|
||||
|
|
@ -161,10 +161,10 @@ public final class DoorActionHandler {
|
|||
* @param object the object.
|
||||
* @return the end location.
|
||||
*/
|
||||
public static Location getEndLocation(Entity entity, GameObject object){
|
||||
public static Location getEndLocation(Entity entity, Scenery object){
|
||||
return getEndLocation(entity,object,false);
|
||||
}
|
||||
public static Location getEndLocation(Entity entity, GameObject object, Boolean isAutoWalk) {
|
||||
public static Location getEndLocation(Entity entity, Scenery object, Boolean isAutoWalk) {
|
||||
Location l = object.getLocation();
|
||||
Location end = DestinationFlag.OBJECT.getDestination(entity,object);
|
||||
switch (object.getRotation()) {
|
||||
|
|
@ -198,11 +198,11 @@ public final class DoorActionHandler {
|
|||
* @param door The door.
|
||||
* @return The destination location.
|
||||
*/
|
||||
public static Location getDestination(Entity entity, GameObject door) {
|
||||
public static Location getDestination(Entity entity, Scenery door) {
|
||||
Location l = door.getLocation();
|
||||
int rotation = door.getRotation();
|
||||
if (door instanceof Constructed && door.getDefinition().hasAction("close")) {
|
||||
GameObject o = ((Constructed) door).getReplaced();
|
||||
Scenery o = ((Constructed) door).getReplaced();
|
||||
if (o != null) {
|
||||
l = o.getLocation();
|
||||
rotation = o.getRotation();
|
||||
|
|
@ -272,7 +272,7 @@ public final class DoorActionHandler {
|
|||
* @param restoreTicks The amount of ticks before the door(s) should be
|
||||
* closed again.
|
||||
*/
|
||||
public static void open(GameObject object, GameObject second, int replaceId, int secondReplaceId, boolean clip, int restoreTicks, boolean fence) {
|
||||
public static void open(Scenery object, Scenery second, int replaceId, int secondReplaceId, boolean clip, int restoreTicks, boolean fence) {
|
||||
if(GameWorld.getSettings().getIncreased_door_time()){
|
||||
restoreTicks *= 5;
|
||||
}
|
||||
|
|
@ -287,7 +287,7 @@ public final class DoorActionHandler {
|
|||
firstDir = 3;
|
||||
firstLoc = firstLoc.transform(0, 1, 0);
|
||||
}
|
||||
ObjectBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
SceneryBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
return;
|
||||
}
|
||||
second = second.getWrapper();
|
||||
|
|
@ -310,8 +310,8 @@ public final class DoorActionHandler {
|
|||
secondDir = (secondDir + 2) % 4;
|
||||
}
|
||||
Location secondLoc = second.getLocation().transform((int) p.getX(), (int) p.getY(), 0);
|
||||
ObjectBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
ObjectBuilder.replace(second, second.transform(secondReplaceId, secondDir, secondLoc), restoreTicks, clip);
|
||||
SceneryBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
SceneryBuilder.replace(second, second.transform(secondReplaceId, secondDir, secondLoc), restoreTicks, clip);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -325,7 +325,7 @@ public final class DoorActionHandler {
|
|||
* @param restoreTicks The amount of ticks before the door(s) should be
|
||||
* closed again.
|
||||
*/
|
||||
private static void openFence(GameObject object, GameObject second, int replaceId, int secondReplaceId, boolean clip, int restoreTicks) {
|
||||
private static void openFence(Scenery object, Scenery second, int replaceId, int secondReplaceId, boolean clip, int restoreTicks) {
|
||||
Direction offset = Direction.getDirection(second.getLocation().getX() - object.getLocation().getX(), second.getLocation().getY() - object.getLocation().getY());
|
||||
int firstDir = (object.getRotation() + 3) % 4;
|
||||
Point p = getRotationPoint(object.getRotation());
|
||||
|
|
@ -347,21 +347,21 @@ public final class DoorActionHandler {
|
|||
if ((object.getId() == 36917 || object.getId() == 36919)) {
|
||||
switch (object.getDirection()) {
|
||||
case SOUTH:
|
||||
ObjectBuilder.replace(object, object.transform(36919, firstDir, firstLoc), restoreTicks, true);
|
||||
ObjectBuilder.replace(second, second.transform(36917, secondDir, secondLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(object, object.transform(36919, firstDir, firstLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(second, second.transform(36917, secondDir, secondLoc), restoreTicks, true);
|
||||
break;
|
||||
case EAST:
|
||||
ObjectBuilder.replace(object, object.transform(36917, firstDir, firstLoc), restoreTicks, true);
|
||||
ObjectBuilder.replace(second, second.transform(36919, secondDir, secondLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(object, object.transform(36917, firstDir, firstLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(second, second.transform(36919, secondDir, secondLoc), restoreTicks, true);
|
||||
break;
|
||||
default:
|
||||
ObjectBuilder.replace(object, object.transform(36919, firstDir, firstLoc), restoreTicks, true);
|
||||
ObjectBuilder.replace(second, second.transform(36917, secondDir, secondLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(object, object.transform(36919, firstDir, firstLoc), restoreTicks, true);
|
||||
SceneryBuilder.replace(second, second.transform(36917, secondDir, secondLoc), restoreTicks, true);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ObjectBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
ObjectBuilder.replace(second, second.transform(secondReplaceId, secondDir, secondLoc), restoreTicks, clip);
|
||||
SceneryBuilder.replace(object, object.transform(replaceId, firstDir, firstLoc), restoreTicks, clip);
|
||||
SceneryBuilder.replace(second, second.transform(secondReplaceId, secondDir, secondLoc), restoreTicks, clip);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -373,8 +373,8 @@ public final class DoorActionHandler {
|
|||
* @param secondReplaceId The second replace id.
|
||||
* closed again.
|
||||
*/
|
||||
public static boolean autowalkFence(final Entity entity, final GameObject object, final int replaceId, final int secondReplaceId) {
|
||||
final GameObject second = getSecondDoor(object, entity);
|
||||
public static boolean autowalkFence(final Entity entity, final Scenery object, final int replaceId, final int secondReplaceId) {
|
||||
final Scenery second = getSecondDoor(object, entity);
|
||||
if (object.getCharge() == IN_USE_CHARGE || second == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -412,7 +412,7 @@ public final class DoorActionHandler {
|
|||
* @param object The object.
|
||||
* @return The point.
|
||||
*/
|
||||
private static Point getCloseRotation(GameObject object) {
|
||||
private static Point getCloseRotation(Scenery object) {
|
||||
switch (object.getRotation()) {
|
||||
case 0:
|
||||
return new Point(0, 1);
|
||||
|
|
@ -451,10 +451,10 @@ public final class DoorActionHandler {
|
|||
* @param object The door.
|
||||
* @return The second door, if any, {@code null} if no second door existed.
|
||||
*/
|
||||
public static GameObject getSecondDoor(GameObject object, Entity entity) {
|
||||
public static Scenery getSecondDoor(Scenery object, Entity entity) {
|
||||
Location l = object.getLocation();
|
||||
Player player = entity instanceof Player ? (Player) entity : null;
|
||||
GameObject o = null;
|
||||
Scenery o = null;
|
||||
if ((o = RegionManager.getObject(l.transform(-1, 0, 0))) != null && o.getName().equals(object.getName())) {
|
||||
return o;
|
||||
}
|
||||
|
|
@ -479,7 +479,7 @@ public final class DoorActionHandler {
|
|||
* @return An int-array, with index 0 being first door rotation and index 1
|
||||
* being second door rotation.
|
||||
*/
|
||||
public static int[] getRotation(GameObject object, GameObject second, Point rp) {
|
||||
public static int[] getRotation(Scenery object, Scenery second, Point rp) {
|
||||
if (second == null) {
|
||||
return new int[]{(object.getRotation() + 1) % 4};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import core.game.node.entity.player.link.TeleportManager.TeleportType;
|
|||
import core.game.node.entity.player.link.emote.Emotes;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -179,32 +179,32 @@ public class ChristmasEvent extends HolidayEvent {
|
|||
*/
|
||||
private void snow() {
|
||||
Location loc = null;
|
||||
GameObject obj = null;
|
||||
Scenery obj = null;
|
||||
for (Location location : HUBS) {
|
||||
for (int x = 2; x < 10; x++) {
|
||||
for (int y = 2; y < 10; y++) {
|
||||
loc = location.transform(x, y, 0);
|
||||
if (RegionManager.getObject(loc) == null && RegionManager.isTeleportPermitted(loc) && RandomFunction.random(3) == 1) {
|
||||
obj = new GameObject(28296, loc);
|
||||
ObjectBuilder.add(obj);
|
||||
obj = new Scenery(28296, loc);
|
||||
SceneryBuilder.add(obj);
|
||||
RegionManager.removeClippingFlag(0, loc.getX(), loc.getY(), false, 0x100);
|
||||
}
|
||||
loc = location.transform(-x, y, 0);
|
||||
if (RegionManager.getObject(loc) == null && RegionManager.isTeleportPermitted(loc) && RandomFunction.random(3) == 1) {
|
||||
obj = new GameObject(28296, loc);
|
||||
ObjectBuilder.add(obj);
|
||||
obj = new Scenery(28296, loc);
|
||||
SceneryBuilder.add(obj);
|
||||
RegionManager.removeClippingFlag(0, loc.getX(), loc.getY(), false, 0x100);
|
||||
}
|
||||
loc = location.transform(x, -y, 0);
|
||||
if (RegionManager.getObject(loc) == null && RegionManager.isTeleportPermitted(loc) && RandomFunction.random(3) == 1) {
|
||||
obj = new GameObject(28296, loc);
|
||||
ObjectBuilder.add(obj);
|
||||
obj = new Scenery(28296, loc);
|
||||
SceneryBuilder.add(obj);
|
||||
RegionManager.removeClippingFlag(0, loc.getX(), loc.getY(), false, 0x100);
|
||||
}
|
||||
loc = location.transform(-x, -y, 0);
|
||||
if (RegionManager.getObject(loc) == null && RegionManager.isTeleportPermitted(loc) && RandomFunction.random(3) == 1) {
|
||||
obj = new GameObject(28296, loc);
|
||||
ObjectBuilder.add(obj);
|
||||
obj = new Scenery(28296, loc);
|
||||
SceneryBuilder.add(obj);
|
||||
RegionManager.removeClippingFlag(0, loc.getX(), loc.getY(), false, 0x100);
|
||||
}
|
||||
}
|
||||
|
|
@ -272,7 +272,7 @@ public class ChristmasEvent extends HolidayEvent {
|
|||
if (player.getInventory().remove(node.asItem())) {
|
||||
player.sendMessage("You start to build a snowman.");
|
||||
player.animate(Animation.create(7532));
|
||||
ObjectBuilder.add(new GameObject(28266, loc));
|
||||
SceneryBuilder.add(new Scenery(28266, loc));
|
||||
}
|
||||
break;
|
||||
case "add-to":
|
||||
|
|
@ -292,7 +292,7 @@ public class ChristmasEvent extends HolidayEvent {
|
|||
player.sendMessage("You add some snow to the snowman.");
|
||||
player.lock(1);
|
||||
player.animate(Animation.create(node.asObject().getId() <= 28278 ? 7532 : 7533));
|
||||
ObjectBuilder.replace(node.asObject(), node.asObject().transform(node.asObject().getId() + 1));
|
||||
SceneryBuilder.replace(node.asObject(), node.asObject().transform(node.asObject().getId() + 1));
|
||||
if (node.asObject().getId() + 1 >= 28295) {
|
||||
if (player.getZoneMonitor().isInZone(getName())) {
|
||||
player.sendMessages("The snowman is almsot complete! Talk to a snow imp to get a hat or weapon to", "complete it.");
|
||||
|
|
@ -433,7 +433,7 @@ public class ChristmasEvent extends HolidayEvent {
|
|||
id = 6748;
|
||||
}
|
||||
final int npcId = id;
|
||||
ObjectBuilder.remove(event.getUsedWith().asObject());
|
||||
SceneryBuilder.remove(event.getUsedWith().asObject());
|
||||
final NPC snowman = NPC.create(npcId, event.getUsedWith().getLocation());
|
||||
snowman.init();
|
||||
snowman.faceTemporary(player, 2);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import core.game.node.entity.player.link.emote.Emotes;
|
|||
import core.game.node.entity.player.link.request.RequestType;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -180,16 +180,16 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
cleanItems(player, GrimItem.getItems());
|
||||
cleanItems(player, new Item[] { DIARY, SERVANT_SKULL });
|
||||
} else {
|
||||
List<GameObject> objs = player.getAttribute("objs", null);
|
||||
List<Scenery> objs = player.getAttribute("objs", null);
|
||||
if (objs == null) {
|
||||
objs = new ArrayList<GameObject>();
|
||||
objs = new ArrayList<Scenery>();
|
||||
}
|
||||
for (GameObject o : objs) {
|
||||
for (Scenery o : objs) {
|
||||
if (RegionManager.getLocalEntitys(o.getLocation(), 1).size() != 0) {
|
||||
continue;
|
||||
}
|
||||
if (!o.getLocation().withinDistance(player.getLocation(), 1)) {
|
||||
player.getPacketDispatch().sendObjectAnimation(o, Animation.create(7286));
|
||||
player.getPacketDispatch().sendSceneryAnimation(o, Animation.create(7286));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -320,7 +320,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
if (buttonId == 1) {
|
||||
item.search(player, target.asObject());
|
||||
} else {
|
||||
player.getPacketDispatch().sendObjectAnimation(target.asObject(), Animation.create(7278));
|
||||
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7278));
|
||||
player.animate(Animation.create(7272));
|
||||
player.getDialogueInterpreter().sendDialogues(player, FacialExpression.DISGUSTED, "That wasn't such a good idea.");
|
||||
}
|
||||
|
|
@ -359,7 +359,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
|
||||
});
|
||||
}
|
||||
player.getPacketDispatch().sendObjectAnimation(target.asObject(), Animation.create(7296));
|
||||
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7296));
|
||||
AgilityHandler.walk(player, -1, player.getLocation(), target.getLocation(), null, 0.0, null);
|
||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
|
||||
|
|
@ -427,30 +427,30 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
if (entity instanceof Player) {
|
||||
final Player p = entity.asPlayer();
|
||||
Location loc = p.getLocation();
|
||||
List<GameObject> objs = p.getAttribute("objs", null);
|
||||
List<Scenery> objs = p.getAttribute("objs", null);
|
||||
if (objs == null) {
|
||||
objs = new ArrayList<GameObject>();
|
||||
objs = new ArrayList<Scenery>();
|
||||
}
|
||||
for (int i = 0; i < 1; i++) {
|
||||
for (Direction direction : Direction.values()) {
|
||||
GameObject o = RegionManager.getObject(loc.transform(direction, 1));
|
||||
Scenery o = RegionManager.getObject(loc.transform(direction, 1));
|
||||
if (o != null && o.getId() == 27241) {
|
||||
objs.add(o);
|
||||
p.setAttribute("objs", objs);
|
||||
p.getPacketDispatch().sendObjectAnimation(o, Animation.create(7289));
|
||||
p.getPacketDispatch().sendSceneryAnimation(o, Animation.create(7289));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (GameObject o : objs) {
|
||||
for (Scenery o : objs) {
|
||||
if (RegionManager.getLocalEntitys(o.getLocation(), 1).size() != 0) {
|
||||
continue;
|
||||
}
|
||||
if (!o.getLocation().withinDistance(p.getLocation(), 1)) {
|
||||
p.getPacketDispatch().sendObjectAnimation(o, Animation.create(7286));
|
||||
p.getPacketDispatch().sendSceneryAnimation(o, Animation.create(7286));
|
||||
}
|
||||
}
|
||||
if (loc.getX() >= 1630 && loc.getX() <= 1646 && loc.getY() >= 4844 && loc.getY() <= 4852) {
|
||||
final GameObject object = RegionManager.getObject(entity.getLocation());
|
||||
final Scenery object = RegionManager.getObject(entity.getLocation());
|
||||
if (object != null && object.getId() == 27240) {
|
||||
p.getWalkingQueue().reset();
|
||||
p.getLocks().lock();
|
||||
|
|
@ -466,7 +466,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
p.teleport(object.getLocation());
|
||||
}
|
||||
p.lock();
|
||||
p.getPacketDispatch().sendObjectAnimation(object, Animation.create(1939));
|
||||
p.getPacketDispatch().sendSceneryAnimation(object, Animation.create(1939));
|
||||
break;
|
||||
case 2:
|
||||
p.animate(Animation.create(4366));
|
||||
|
|
@ -503,7 +503,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
* @param player the player.
|
||||
* @param target the target.
|
||||
*/
|
||||
private void handlePassageWay(final Player player, final GameObject target) {
|
||||
private void handlePassageWay(final Player player, final Scenery target) {
|
||||
int stage = getStage(player);
|
||||
if (stage < 1 || stage < 4 && target.getLocation().getX() == 1694) {
|
||||
electrocute(player, target);
|
||||
|
|
@ -554,7 +554,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void passSpiderWeb(Player player, GameObject object) {
|
||||
private void passSpiderWeb(Player player, Scenery object) {
|
||||
int webIndex = player.getAttribute("webIndex", -1);
|
||||
if (webIndex == -1) {
|
||||
player.setAttribute("/save:webIndex", (webIndex = RandomFunction.random(WEB_PATHS.length)));
|
||||
|
|
@ -570,7 +570,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
player.sendMessage("You cannot pass through this particular web - try another.");
|
||||
return;
|
||||
}
|
||||
player.getPacketDispatch().sendObjectAnimation(object, Animation.create(7280));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(7280));
|
||||
player.lock(3);
|
||||
AgilityHandler.forceWalk(player, -1, player.getLocation(), player.getLocation().transform(Direction.getDirection(player.getLocation(), object.getLocation()), 2), Animation.create(2240), 8, 0.0, null);
|
||||
}
|
||||
|
|
@ -593,7 +593,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void electrocute(final Player player, GameObject object) {
|
||||
private void electrocute(final Player player, Scenery object) {
|
||||
player.lock(4);
|
||||
player.animate(Animation.create(7299));
|
||||
player.graphics(Graphics.create(281));
|
||||
|
|
@ -610,11 +610,11 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
y = -1;
|
||||
y2 = 1;
|
||||
}
|
||||
GameObject first = RegionManager.getObject(object.getLocation().transform(x, y, 0));
|
||||
GameObject second = RegionManager.getObject(object.getLocation().transform(x2, y2, 0));
|
||||
Scenery first = RegionManager.getObject(object.getLocation().transform(x, y, 0));
|
||||
Scenery second = RegionManager.getObject(object.getLocation().transform(x2, y2, 0));
|
||||
if (first != null && second != null) {
|
||||
player.getPacketDispatch().sendObjectAnimation(first, Animation.create(7285));
|
||||
player.getPacketDispatch().sendObjectAnimation(second, Animation.create(7285));
|
||||
player.getPacketDispatch().sendSceneryAnimation(first, Animation.create(7285));
|
||||
player.getPacketDispatch().sendSceneryAnimation(second, Animation.create(7285));
|
||||
}
|
||||
player.sendMessage("You fail to pass through the gargoyles' judgement");
|
||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
|
|
@ -807,7 +807,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void search(Player player, GameObject object) {
|
||||
public void search(Player player, Scenery object) {
|
||||
if (!player.getInventory().hasSpaceFor(item)) {
|
||||
player.sendMessage("You don't have enough inventory space.");
|
||||
return;
|
||||
|
|
@ -827,7 +827,7 @@ public class DeathMansionEvent extends HolidayEvent {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void useWithEvent(Player player, GameObject object) {
|
||||
public void useWithEvent(Player player, Scenery object) {
|
||||
if (hasGrimItem(player, this)) {
|
||||
player.getDialogueInterpreter().sendDialogue("You have already returned this item to it's proper", "spot in the mansion.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.interaction.Option;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ public class PluginInteractionManager {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean handle(Player player, GameObject object){
|
||||
public static boolean handle(Player player, Scenery object){
|
||||
PluginInteraction i = objectInteractions.get(object.getId());
|
||||
if(i == null) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -112,9 +112,9 @@ public class ImpCatcher extends Quest {
|
|||
player.getPacketDispatch().sendItemZoomOnInterface(AMULET.getId(), 230, 277, 3 + 2);
|
||||
player.getSkills().addExperience(Skills.MAGIC, 875);
|
||||
// 16170
|
||||
GameObject table = RegionManager.getObject(Location.create(3102, 3163, 2));
|
||||
Scenery table = RegionManager.getObject(Location.create(3102, 3163, 2));
|
||||
if (table.getId() != 16170) {
|
||||
ObjectBuilder.replace(table, table.transform(16170), 80);
|
||||
SceneryBuilder.replace(table, table.transform(16170), 80);
|
||||
}
|
||||
if (!player.getInventory().add(AMULET)) {
|
||||
GroundItemManager.create(AMULET, player.getLocation(), player);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -66,8 +66,8 @@ public final class BKFortressPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(final Player player, Node node, String option) {
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : ((GameObject) node).getId();
|
||||
GameObject object = node instanceof GameObject ? ((GameObject) node) : null;
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : ((Scenery) node).getId();
|
||||
Scenery object = node instanceof Scenery ? ((Scenery) node) : null;
|
||||
Location dest = null;
|
||||
switch (id) {
|
||||
case 2342:// listen at grill.
|
||||
|
|
@ -88,7 +88,7 @@ public final class BKFortressPlugin extends OptionHandler {
|
|||
if (dest != null) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), dest);
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
case 17149:
|
||||
|
|
@ -106,7 +106,7 @@ public final class BKFortressPlugin extends OptionHandler {
|
|||
if (dest != null) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), dest);
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
case 17148:
|
||||
|
|
@ -120,16 +120,16 @@ public final class BKFortressPlugin extends OptionHandler {
|
|||
if (dest != null) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), dest);
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
case 2341:
|
||||
player.getPacketDispatch().sendMessage("You push against the wall. You find a secret passage.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
case 2338:
|
||||
if (player.getLocation().getX() > 3019) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
player.getDialogueInterpreter().open(4605, Repository.findNPC(4605), true, true);
|
||||
|
|
@ -138,7 +138,7 @@ public final class BKFortressPlugin extends OptionHandler {
|
|||
if (!player.getEquipment().containsAtLeastOneItem(1139) || !player.getEquipment().containsAtLeastOneItem(1101)) {
|
||||
player.getDialogueInterpreter().open(4605, Repository.findNPC(4604), true);
|
||||
} else {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
}
|
||||
break;
|
||||
case 74:
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -55,7 +55,7 @@ public final class DemonSlayerCutscene extends CutscenePlugin {
|
|||
/**
|
||||
* Represents the stone table.
|
||||
*/
|
||||
public GameObject stoneTable;
|
||||
public Scenery stoneTable;
|
||||
|
||||
/**
|
||||
* Represents the delrith npc.
|
||||
|
|
@ -498,8 +498,8 @@ public final class DemonSlayerCutscene extends CutscenePlugin {
|
|||
break;
|
||||
case 1:
|
||||
player.getProperties().setTeleportLocation(cutscene.getBase().transform(28, 35, 0));
|
||||
cutscene.stoneTable = new GameObject(17437, cutscene.getBase().transform(27, 41, 0));
|
||||
ObjectBuilder.add(cutscene.stoneTable);
|
||||
cutscene.stoneTable = new Scenery(17437, cutscene.getBase().transform(27, 41, 0));
|
||||
SceneryBuilder.add(cutscene.stoneTable);
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.POSITION, player.getLocation().getX() - 1, player.getLocation().getY() + 2, 380, 1, 98));
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.ROTATION, player.getLocation().getX() + 19, player.getLocation().getY() - 55, 380, 1, 98));
|
||||
interpreter.sendPlainMessage(true, "The wizards cast an evil spell...");
|
||||
|
|
@ -519,7 +519,7 @@ public final class DemonSlayerCutscene extends CutscenePlugin {
|
|||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.POSITION, player.getLocation().getX() - 1, player.getLocation().getY() - 3, 390, 1, 100));
|
||||
PacketRepository.send(CameraViewPacket.class, new CameraContext(player, CameraType.ROTATION, player.getLocation().getX() + 30, player.getLocation().getY() - 55, 390, 1, 100));
|
||||
player.getConfigManager().set(222, 14194946, true);
|
||||
ObjectBuilder.replace(cutscene.stoneTable, cutscene.stoneTable.transform(17438));
|
||||
SceneryBuilder.replace(cutscene.stoneTable, cutscene.stoneTable.transform(17438));
|
||||
npc("Ha ha ha! At last you are free, my demonic brother!", "Rest now, and then have your revenge on this pitiful", "city!");
|
||||
stage = 2;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -47,7 +47,7 @@ public final class DemonSlayerPlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Demon Slayer");
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : node instanceof Item ? ((Item) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : node instanceof Item ? ((Item) node).getId() : ((NPC) node).getId();
|
||||
switch (id) {
|
||||
case 880:
|
||||
player.getDialogueInterpreter().open(8427322);
|
||||
|
|
@ -70,7 +70,7 @@ public final class DemonSlayerPlugin extends OptionHandler {
|
|||
}
|
||||
return true;
|
||||
case 881:
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(882));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(882));
|
||||
break;
|
||||
case 882:
|
||||
switch (option) {
|
||||
|
|
@ -78,11 +78,11 @@ public final class DemonSlayerPlugin extends OptionHandler {
|
|||
if (node.getLocation().equals(new Location(3237, 3458, 0))) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), SEWER_LOCATION);
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
case "close":
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(881));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(881));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -195,8 +195,8 @@ public class TraibornDialogue extends DialoguePlugin {
|
|||
stage = 386;
|
||||
break;
|
||||
case 386:
|
||||
final GameObject object = new GameObject(17434, Location.create(3113, 3161, 1), 11, 1);
|
||||
ObjectBuilder.add(object);
|
||||
final Scenery object = new Scenery(17434, Location.create(3113, 3161, 1), 11, 1);
|
||||
SceneryBuilder.add(object);
|
||||
npc.faceLocation(object.getLocation());
|
||||
npc.animate(ANIMATION);
|
||||
if (!player.getInventory().containsItem(BONES[0]) && !player.getInventory().containsItem(BONES[1])) {
|
||||
|
|
@ -219,7 +219,7 @@ public class TraibornDialogue extends DialoguePlugin {
|
|||
npc.face(player);
|
||||
break;
|
||||
case 7:
|
||||
ObjectBuilder.remove(object);
|
||||
SceneryBuilder.remove(object);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import core.game.node.entity.player.link.quest.Quest;
|
|||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.agility.AgilityHandler;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -324,9 +324,9 @@ public final class DragonSlayer extends Quest {
|
|||
return true;
|
||||
}
|
||||
player.getPacketDispatch().sendMessage("The door opens...");
|
||||
final GameObject object = RegionManager.getObject(new Location(3050, 9839, 0));
|
||||
final Scenery object = RegionManager.getObject(new Location(3050, 9839, 0));
|
||||
player.faceLocation(object.getLocation());
|
||||
player.getPacketDispatch().sendObjectAnimation(object, new Animation(6636));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, new Animation(6636));
|
||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
int counter = 0;
|
||||
|
||||
|
|
@ -337,10 +337,10 @@ public final class DragonSlayer extends Quest {
|
|||
AgilityHandler.walk(player, 0, player.getLocation(), player.getLocation().getX() == 3051 ? Location.create(3049, 9840, 0) : Location.create(3051, 9840, 0), null, 0, null);
|
||||
break;
|
||||
case 5:
|
||||
player.getPacketDispatch().sendObjectAnimation(object, new Animation(6637));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, new Animation(6637));
|
||||
break;
|
||||
case 6:
|
||||
player.getPacketDispatch().sendObjectAnimation(object, new Animation(6635));
|
||||
player.getPacketDispatch().sendSceneryAnimation(object, new Animation(6635));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import core.game.node.entity.player.link.diary.DiaryType;
|
|||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
|
|
@ -115,7 +115,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(final Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Dragon Slayer");
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof GameObject ? ((GameObject) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof Scenery ? ((Scenery) node).getId() : ((NPC) node).getId();
|
||||
switch (id) {
|
||||
case 10560:
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(3191, 3355, 0));
|
||||
|
|
@ -127,7 +127,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
if (player.getLocation().withinDistance(Location.create(2939, 9656, 0))) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(2939, 3256, 0));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -135,7 +135,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
if (player.getLocation().getDistance(Location.create(3188, 3358, 0)) < 3) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(3188, 3354, 1));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, "climb-up");
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, "climb-up");
|
||||
}
|
||||
break;
|
||||
case 1127:
|
||||
|
|
@ -206,7 +206,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
}
|
||||
player.getAchievementDiaryManager().finishTask(player, DiaryType.KARAMJA, 1, 1);
|
||||
player.getSavedData().getQuestData().setDragonSlayerAttribute("memorized", true);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
}
|
||||
break;
|
||||
case 25154:
|
||||
|
|
@ -310,7 +310,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
switch (id) {
|
||||
case 2603:
|
||||
player.getPacketDispatch().sendMessage("You open the chest.");
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2604));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2604));
|
||||
break;
|
||||
case 2605:
|
||||
ClimbActionHandler.climb(player, new Animation(827), Location.create(2933, 9640, 0));
|
||||
|
|
@ -329,7 +329,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
break;
|
||||
case "close":
|
||||
player.getPacketDispatch().sendMessage("You shut the chest.");
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2603));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2603));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -339,7 +339,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.GREEN_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -349,7 +349,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.PURPLE_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -359,7 +359,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.BLUE_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -369,7 +369,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.YELLOW_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -378,20 +378,20 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
ClimbActionHandler.climb(player, new Animation(828), Location.create(2924, 3258, 0));
|
||||
return true;
|
||||
}
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
case 1747:// ladder with wrong spawn.
|
||||
if (player.getLocation().getDistance(new Location(2940, 3256, 1)) < 3) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(2940, 3256, 2));
|
||||
return true;
|
||||
}
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
case 25214:// trapdoor.
|
||||
player.getPacketDispatch().sendMessage("The trapdoor can only be opened from below.");
|
||||
break;
|
||||
case 25038:// melzar's maze trapdoor ladder
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
case 1752:
|
||||
player.getPacketDispatch().sendMessage("The ladder is broken, I can't climb it.");
|
||||
|
|
@ -405,7 +405,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
ClimbActionHandler.climb(player, new Animation(828), Location.create(2932, 3245, 1));
|
||||
return true;
|
||||
}
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
case 2596:// red door.
|
||||
if (!player.getInventory().containsItem(DragonSlayer.RED_KEY)) {
|
||||
|
|
@ -413,7 +413,7 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.RED_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -423,33 +423,33 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
} else {
|
||||
player.getInventory().remove(DragonSlayer.ORANGE_KEY);
|
||||
player.getPacketDispatch().sendMessage("The key disintegrates as it unlocks the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
case 32968:
|
||||
case 2602:
|
||||
if (player.getLocation().equals(new Location(2931, 9640, 0))) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (player.getLocation().equals(new Location(2927, 9649, 0))) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (player.getLocation().equals(Location.create(2924, 9654, 0)) || player.getLocation().equals(Location.create(2938, 3252, 0))) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
player.getPacketDispatch().sendMessage("The door is locked.");
|
||||
break;
|
||||
case 2595:
|
||||
if (player.getLocation().equals(Location.create(2940, 3248, 0))) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (player.getInventory().containsItem(DragonSlayer.MAZE_KEY)) {
|
||||
player.getPacketDispatch().sendMessage("You use the key and the door opens.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
} else {
|
||||
player.getPacketDispatch().sendMessage("This door is securely locked.");
|
||||
|
|
@ -461,8 +461,8 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node node, Node n) {
|
||||
if (n instanceof GameObject) {
|
||||
GameObject obj = (GameObject) n;
|
||||
if (n instanceof Scenery) {
|
||||
Scenery obj = (Scenery) n;
|
||||
if (obj.getId() == 25115) {
|
||||
if (node.getLocation().getX() <= 3049) {
|
||||
return Location.create(3049, 9840, 0);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import core.game.node.entity.impl.Animator.Priority;
|
|||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -82,8 +82,8 @@ public final class ElvargNPC extends AbstractNPC {
|
|||
@Override
|
||||
public void finalizeDeath(final Entity killer) {
|
||||
super.finalizeDeath(killer);
|
||||
final GameObject object = new GameObject(25202, getLocation(), getRotation());
|
||||
ObjectBuilder.add(object);
|
||||
final Scenery object = new Scenery(25202, getLocation(), getRotation());
|
||||
SceneryBuilder.add(object);
|
||||
killer.faceLocation(object.getCenterLocation());
|
||||
killer.lock();
|
||||
GameWorld.getPulser().submit(new Pulse(1) {
|
||||
|
|
@ -96,14 +96,14 @@ public final class ElvargNPC extends AbstractNPC {
|
|||
killer.animate(ANIMATIONS[0]);
|
||||
} else if (counter == 4) {
|
||||
final Player player = ((Player) killer);
|
||||
ObjectBuilder.replace(object, object.transform(25203));
|
||||
SceneryBuilder.replace(object, object.transform(25203));
|
||||
if (!player.getInventory().add(DragonSlayer.ELVARG_HEAD)) {
|
||||
GroundItemManager.create(DragonSlayer.ELVARG_HEAD, player);
|
||||
}
|
||||
killer.animate(ANIMATIONS[1]);
|
||||
killer.unlock();
|
||||
} else if (counter == 12) {
|
||||
ObjectBuilder.remove(RegionManager.getObject(object.getLocation()));
|
||||
SceneryBuilder.remove(RegionManager.getObject(object.getLocation()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -658,11 +658,11 @@ public final class GDiplomacyCutscene extends CutscenePlugin {
|
|||
case 7:
|
||||
grubfoot.transform(grubFoot.getId());
|
||||
grubfoot.getProperties().setTeleportLocation(grubfoot.getLocation().transform(-1, 0, 0));
|
||||
player.getPacketDispatch().sendObjectAnimation(RegionManager.getObject(cutscene.getBase().transform(9, 55, 0)), new Animation(24));
|
||||
player.getPacketDispatch().sendSceneryAnimation(RegionManager.getObject(cutscene.getBase().transform(9, 55, 0)), new Animation(24));
|
||||
break;
|
||||
case 11:
|
||||
grubfoot.getProperties().setTeleportLocation(grubfoot.getLocation().transform(1, 0, 0));
|
||||
player.getPacketDispatch().sendObjectAnimation(RegionManager.getObject(cutscene.getBase().transform(9, 55, 0)), new Animation(24));
|
||||
player.getPacketDispatch().sendSceneryAnimation(RegionManager.getObject(cutscene.getBase().transform(9, 55, 0)), new Animation(24));
|
||||
break;
|
||||
case 12:
|
||||
player.getDialogueInterpreter().sendPlainMessage(true, "...And emerges wearing " + type.name().toLowerCase() + " armour.");
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.plugin.Plugin;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
|
@ -48,7 +48,7 @@ public final class GoblinDiplomacyPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
int id = node instanceof Item ? ((Item) node).getId() : ((GameObject) node).getId();
|
||||
int id = node instanceof Item ? ((Item) node).getId() : ((Scenery) node).getId();
|
||||
switch (option) {
|
||||
case "wear":
|
||||
player.getPacketDispatch().sendMessage("That armour is to small for a human.");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import core.game.node.entity.player.link.HintIconManager;
|
|||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ public final class PiratesTreasurePlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
int id = node instanceof GameObject ? ((GameObject) node).getId() : ((Item) node).getId();
|
||||
int id = node instanceof Scenery ? ((Scenery) node).getId() : ((Item) node).getId();
|
||||
switch (id) {
|
||||
case 2079:
|
||||
switch (option) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -36,7 +36,7 @@ public class PrinceAliRescuePlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Prince Ali Rescue");
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : node instanceof NPC ? ((NPC) node).getId() : 0;
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : node instanceof NPC ? ((NPC) node).getId() : 0;
|
||||
switch (id) {
|
||||
case 925:
|
||||
player.getDialogueInterpreter().open(925, node);
|
||||
|
|
@ -44,13 +44,13 @@ public class PrinceAliRescuePlugin extends OptionHandler {
|
|||
case 2881:
|
||||
switch (quest.getStage(player)) {
|
||||
case 60:
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
case 50:
|
||||
if (player.getAttribute("keli-gone", 0) > GameWorld.getTicks()) {
|
||||
if (player.getInventory().contains(2418, 1)) {
|
||||
player.getPacketDispatch().sendMessage("You unlock the door.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
player.getPacketDispatch().sendMessage("The door is locked.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import core.game.node.entity.player.link.quest.Quest;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
|
|
@ -60,7 +60,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Shield of Arrav");
|
||||
final int id = node instanceof GameObject ? ((GameObject) node).getId() : node instanceof Item ? ((Item) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Scenery ? ((Scenery) node).getId() : node instanceof Item ? ((Item) node).getId() : ((NPC) node).getId();
|
||||
switch (id) {
|
||||
case 769:
|
||||
player.getInterfaceManager().open(new Component(526));
|
||||
|
|
@ -75,7 +75,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
player.getPacketDispatch().sendString("Attach this certificate to another.", 529, 2);
|
||||
break;
|
||||
case 2400:
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2401));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2401));
|
||||
break;
|
||||
case 2401:
|
||||
switch (option) {
|
||||
|
|
@ -92,7 +92,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
}
|
||||
break;
|
||||
case "shut":
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2400));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2400));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -100,7 +100,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
if (node.getLocation().getX() == 3188) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(3188, 3392, 1));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -123,12 +123,12 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
}
|
||||
break;
|
||||
case 2403:
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2404));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2404));
|
||||
break;
|
||||
case 2404:
|
||||
switch (option) {
|
||||
case "close":
|
||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(2403));
|
||||
SceneryBuilder.replace(((Scenery) node), ((Scenery) node).transform(2403));
|
||||
break;
|
||||
case "search":
|
||||
if (quest.getStage(player) == 70 && ShieldofArrav.isPhoenix(player)) {
|
||||
|
|
@ -161,7 +161,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
player.getDialogueInterpreter().sendDialogue("This is the door to the weapon stash you were looking for. Maybe if", "you can find another adventurer who happens to be a member of the", "Phoenix Gang, they could help you.");
|
||||
return true;
|
||||
} else if (quest.getStage(player) == 60 && player.getInventory().containsItem(ShieldofArrav.KEY)) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (quest.getStage(player) == 70 && player.getInventory().containsItem(ShieldofArrav.KEY)) {
|
||||
|
|
@ -169,7 +169,7 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
player.getPacketDispatch().sendMessage("You should get a replacement key from Straven to enter here.");
|
||||
return true;
|
||||
} else {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -179,13 +179,13 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
if (!ShieldofArrav.isBlackArm(player)) {
|
||||
player.getPacketDispatch().sendMessage("This door seems to be locked from the inside.");
|
||||
} else {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
}
|
||||
break;
|
||||
case 2397:
|
||||
if (ShieldofArrav.isPhoenix(player)) {
|
||||
player.getPacketDispatch().sendMessage("The door automatically opens for you.");
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
player.getPacketDispatch().sendMessage("The door is securely locked.");
|
||||
|
|
@ -220,9 +220,9 @@ public final class ShieldArravPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node n, Node node) {
|
||||
if (node instanceof GameObject) {
|
||||
if (node instanceof Scenery) {
|
||||
if (node.getName().toLowerCase().contains("door")) {
|
||||
return DoorActionHandler.getDestination((Player) n, (GameObject) node);
|
||||
return DoorActionHandler.getDestination((Player) n, (Scenery) node);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -75,8 +75,8 @@ public final class RestlessGhostPlugin extends OptionHandler {
|
|||
GHOST.init();
|
||||
GHOST.setInvisible(true);
|
||||
}
|
||||
final int id = ((GameObject) node).getId();
|
||||
final GameObject object = (GameObject) node;
|
||||
final int id = ((Scenery) node).getId();
|
||||
final Scenery object = (Scenery) node;
|
||||
switch (option) {
|
||||
case "open":
|
||||
switch (id) {
|
||||
|
|
@ -123,11 +123,11 @@ public final class RestlessGhostPlugin extends OptionHandler {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void toggleCoffin(final Player player, final GameObject object) {
|
||||
private void toggleCoffin(final Player player, final Scenery object) {
|
||||
final boolean open = object.getId() == 2145;
|
||||
player.lock(2);
|
||||
player.animate(open ? OPEN_ANIM : CLOSE_ANIM);
|
||||
ObjectBuilder.replace(object, object.transform(open ? 15061 : 2145));
|
||||
SceneryBuilder.replace(object, object.transform(open ? 15061 : 2145));
|
||||
player.getPacketDispatch().sendMessage("You " + (open ? "open" : "close") + " the coffin.");
|
||||
if (open && !player.getQuestRepository().isComplete(RestlessGhost.NAME)) {
|
||||
sendGhost();
|
||||
|
|
@ -156,7 +156,7 @@ public final class RestlessGhostPlugin extends OptionHandler {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void searchAltar(final Player player, final GameObject object) {
|
||||
private void searchAltar(final Player player, final Scenery object) {
|
||||
final boolean hasSkull = object.getId() == 15051;
|
||||
if (player.getQuestRepository().getQuest(RestlessGhost.NAME).getStage(player) != 30) {
|
||||
player.getPacketDispatch().sendMessage("You search the altar and find nothing.");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package core.game.content.quest.free.therestlessghost;
|
|||
import core.game.interaction.NodeUsageEvent;
|
||||
import core.game.interaction.UseWithHandler;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ public final class RestlessGhostSkull extends UseWithHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(NodeUsageEvent event) {
|
||||
final GameObject object = (GameObject) event.getUsedWith();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
if (object.getId() == 2145) {
|
||||
event.getPlayer().getDialogueInterpreter().sendDialogue("Maybe I should open it first.");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.interaction.NodeUsageEvent;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -26,8 +26,8 @@ public class GarlicPipeInteraction extends PluginInteraction {
|
|||
@Override
|
||||
public boolean handle(Player player, NodeUsageEvent event) {
|
||||
System.out.println("Trying to handle it");
|
||||
if(event.getUsed() instanceof Item && event.getUsedWith() instanceof GameObject){
|
||||
GameObject usedWith = event.getUsedWith().asObject();
|
||||
if(event.getUsed() instanceof Item && event.getUsedWith() instanceof Scenery){
|
||||
Scenery usedWith = event.getUsedWith().asObject();
|
||||
Item used = event.getUsedItem();
|
||||
|
||||
if(used.getId() == Items.GARLIC_1550 && usedWith.getId() == 41 && usedWith.getLocation().equals(Location.create(2638, 3446, 0)) && player.getQuestRepository().getStage("Fishing Contest") > 0){
|
||||
|
|
@ -48,8 +48,8 @@ public class GarlicPipeInteraction extends PluginInteraction {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node) {
|
||||
if(node instanceof GameObject){
|
||||
GameObject object = node.asObject();
|
||||
if(node instanceof Scenery){
|
||||
Scenery object = node.asObject();
|
||||
if(object.getId() == 41 && object.getLocation().equals(Location.create(2638, 3446, 0)) && player.getAttribute("fishing_contest:garlic",false)){
|
||||
player.getPulseManager().run(new MovementPulse(player, object.getLocation().transform(0, -1, 0)) {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.interaction.MovementPulse;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import core.game.content.quest.PluginInteraction;
|
||||
|
|
@ -15,7 +15,7 @@ public class StairInteraction extends PluginInteraction {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node) {
|
||||
if(!player.getQuestRepository().isComplete("Fishing Contest")) {
|
||||
GameObject object = node.asObject();
|
||||
Scenery object = node.asObject();
|
||||
switch (object.getId()) {
|
||||
case 57:
|
||||
handleStairs(player,232,object);
|
||||
|
|
@ -28,7 +28,7 @@ public class StairInteraction extends PluginInteraction {
|
|||
return false;
|
||||
}
|
||||
|
||||
private void handleStairs(Player player,int npc_id,GameObject object){
|
||||
private void handleStairs(Player player, int npc_id, Scenery object){
|
||||
player.getPulseManager().run(new MovementPulse(player,object.getLocation().transform(0,2,0)) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package core.game.content.quest.members.fishingcontest;
|
|||
import core.game.interaction.MovementPulse;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -22,8 +22,8 @@ public class VineInteraction extends PluginInteraction {
|
|||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node) {
|
||||
if(node instanceof GameObject){
|
||||
GameObject obj = node.asObject();
|
||||
if(node instanceof Scenery){
|
||||
Scenery obj = node.asObject();
|
||||
if(player.getQuestRepository().getStage("Fishing Contest") > 0 && player.getQuestRepository().getStage("Fishing Contest") < 100){
|
||||
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(0, 0, 0)) {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import core.game.node.entity.skill.Skills;
|
|||
import core.game.node.entity.skill.herblore.Herbs;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
|
@ -98,7 +98,7 @@ public final class JunglePotion extends Quest {
|
|||
public static enum JungleObjective {
|
||||
JUNGLE_VINE(2575, Herbs.SNAKE_WEED, 10, "It grows near vines in an area to the south west where", "the ground turns soft and the water kisses your feet.") {
|
||||
@Override
|
||||
public void search(final Player player, final GameObject object) {
|
||||
public void search(final Player player, final Scenery object) {
|
||||
final Animation animation = Animation.create(2094);
|
||||
player.animate(animation);
|
||||
player.getPulseManager().run(new Pulse(animation.getDefinition().getDurationTicks(), player, object) {
|
||||
|
|
@ -118,7 +118,7 @@ public final class JunglePotion extends Quest {
|
|||
},
|
||||
PALM_TREE(2577, Herbs.ARDRIGAL, 20, "You are looking for Ardrigal. It is related to the palm", "and grows in its brothers shady profusion."), SITO_FOIL(2579, Herbs.SITO_FOIL, 30, "You are looking for Sito Foil, and it grows best where", "the ground has been blackened by the living flame."), VOLENCIA_MOSS(2581, Herbs.VOLENCIA_MOSS, 40, "You are looking for Volencia Moss. It clings to rocks", "for its existence. It is difficult to see, so you must", "search for it well."), ROGUES_PURSE(32106, Herbs.ROGUES_PUSE, 50, "It inhabits the darkness of the underground, and grows", "in the caverns to the north. A secret entrance to the", "caverns is set into the northern cliffs, be careful Bwana.") {
|
||||
@Override
|
||||
public void search(final Player player, final GameObject object) {
|
||||
public void search(final Player player, final Scenery object) {
|
||||
final Animation animation = Animation.create(2097);
|
||||
player.animate(animation);
|
||||
player.getPulseManager().run(new Pulse(animation.getDefinition().getDurationTicks(), player, object) {
|
||||
|
|
@ -175,7 +175,7 @@ public final class JunglePotion extends Quest {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void search(final Player player, final GameObject object) {
|
||||
public void search(final Player player, final Scenery object) {
|
||||
findHerb(player);
|
||||
switchObject(object);
|
||||
}
|
||||
|
|
@ -184,9 +184,9 @@ public final class JunglePotion extends Quest {
|
|||
* Switches the object's id.
|
||||
* @param object the object.
|
||||
*/
|
||||
public void switchObject(GameObject object) {
|
||||
public void switchObject(Scenery object) {
|
||||
if (object.isActive()) {
|
||||
ObjectBuilder.replace(object, object.transform(object.getId() + 1), 80);
|
||||
SceneryBuilder.replace(object, object.transform(object.getId() + 1), 80);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ public final class JunglePotionPlugin extends OptionHandler {
|
|||
for (JungleObjective s : JungleObjective.values()) {
|
||||
ObjectDefinition.forId(s.getObjectId()).getHandlers().put("option:search", this);
|
||||
}
|
||||
ObjectBuilder.add(new GameObject(2585, Location.create(2828, 9522, 0), 8, 0));
|
||||
SceneryBuilder.add(new Scenery(2585, Location.create(2828, 9522, 0), 8, 0));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ public final class JunglePotionPlugin extends OptionHandler {
|
|||
}
|
||||
switch (option) {
|
||||
case "search":
|
||||
search(player, quest, (GameObject) node, JungleObjective.forId(node.getId()));
|
||||
search(player, quest, (Scenery) node, JungleObjective.forId(node.getId()));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -57,7 +57,7 @@ public final class JunglePotionPlugin extends OptionHandler {
|
|||
* @param object the object.
|
||||
* @param objective the searchable.
|
||||
*/
|
||||
private void search(final Player player, Quest quest, final GameObject object, final JungleObjective objective) {
|
||||
private void search(final Player player, Quest quest, final Scenery object, final JungleObjective objective) {
|
||||
if (quest.getStage(player) < objective.getStage()) {
|
||||
player.sendMessage("Unfortunately, you find nothing of interest.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import core.game.node.entity.player.link.quest.Quest;
|
|||
import core.game.node.entity.skill.gather.GatheringSkillPulse;
|
||||
import core.game.node.entity.skill.gather.SkillingTool;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -76,11 +76,11 @@ public final class LostCityPlugin extends OptionHandler {
|
|||
spirit.sendChat("You must defeat me before touching the tree!");
|
||||
return true;
|
||||
}
|
||||
player.getPulseManager().run(new GatheringSkillPulse(player, (GameObject) node));
|
||||
player.getPulseManager().run(new GatheringSkillPulse(player, (Scenery) node));
|
||||
break;
|
||||
case 2406:
|
||||
final boolean dramenTeleport = player.getEquipment().containsItem(DRAMEN_STAFF) && quest.getStage(player) > 20 && player.getLocation().getX() <= 3201;
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
if (dramenTeleport) {
|
||||
player.getPacketDispatch().sendMessage("The world starts to shimmer...");
|
||||
player.getTeleporter().send(Location.create(2452, 4473, 0), TeleportType.FAIRY_RING);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import core.game.content.activity.CutscenePlugin;
|
|||
import core.game.content.dialogue.DialoguePlugin;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.build.DynamicRegion;
|
||||
|
||||
|
|
@ -83,10 +83,10 @@ public class CrateCutscenePlugin extends CutscenePlugin {
|
|||
region = DynamicRegion.create(12609);
|
||||
setRegionBase();
|
||||
registerRegion(region.getId());
|
||||
ObjectBuilder.add(new GameObject(65, base.transform(18, 25, 0), 0, 0));
|
||||
ObjectBuilder.add(new GameObject(65, base.transform(19, 25, 0), 0, 4));
|
||||
ObjectBuilder.add(new GameObject(65, base.transform(18, 24, 0), 0, 1));
|
||||
ObjectBuilder.add(new GameObject(65, base.transform(18, 26, 0), 0, 3));
|
||||
SceneryBuilder.add(new Scenery(65, base.transform(18, 25, 0), 0, 0));
|
||||
SceneryBuilder.add(new Scenery(65, base.transform(19, 25, 0), 0, 4));
|
||||
SceneryBuilder.add(new Scenery(65, base.transform(18, 24, 0), 0, 1));
|
||||
SceneryBuilder.add(new Scenery(65, base.transform(18, 26, 0), 0, 3));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
/**
|
||||
|
|
@ -24,7 +24,7 @@ public class MerlinCrystalOptionPlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Merlin's Crystal");
|
||||
int id = node instanceof GameObject ? ((GameObject) node).getId() : ((NPC) node).getId();
|
||||
int id = node instanceof Scenery ? ((Scenery) node).getId() : ((NPC) node).getId();
|
||||
switch (id) {
|
||||
case 247:
|
||||
if (quest.getStage(player) < 40) {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -75,14 +75,14 @@ public final class MerlinCrystalPlugin extends OptionHandler {
|
|||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Merlin's Crystal");
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof GameObject ? ((GameObject) node).getId() : ((NPC) node).getId();
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof Scenery ? ((Scenery) node).getId() : ((NPC) node).getId();
|
||||
switch (id) {
|
||||
case 62:
|
||||
if (quest.getStage(player) == 90 && player.getEquipment().contains(35, 1)) {
|
||||
player.sendMessages("You attempt to smash the crystal...", "... and it shatters under the force of Excalibur!");
|
||||
player.animate(Animation.create(390));
|
||||
player.lock();
|
||||
ObjectBuilder.remove(node.asObject(), 60);
|
||||
SceneryBuilder.remove(node.asObject(), 60);
|
||||
quest.setStage(player, 99);
|
||||
final NPC merlin = NPC.create(249, Location.create(2767, 3493, 2));
|
||||
merlin.init();
|
||||
|
|
@ -154,7 +154,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
|
|||
npc.setAttribute("beggar_owner", player.getUsername());
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(3013, 3245, 1));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -589,7 +589,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
|
|||
public boolean handle(NodeUsageEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
Item useditem = event.getUsedItem();
|
||||
final GameObject object = (GameObject) event.getUsedWith();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
|
||||
if (player.getAttribute("cleared-beehives", false) && useditem.getId() == REPELLENT.getId() && object.getId() == 68) {
|
||||
player.getDialogueInterpreter().sendDialogue("You have already cleared the hive of its bees.", "You can now safely collect wax from the hive.");
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ import core.game.interaction.MovementPulse;
|
|||
import core.game.interaction.NodeUsageEvent;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -27,8 +26,8 @@ public class IncineratorHandler extends PluginInteraction {
|
|||
@Override
|
||||
public boolean handle(Player player, NodeUsageEvent event) {
|
||||
Node n = event.getUsedWith();
|
||||
if(n instanceof GameObject){
|
||||
GameObject obj = (GameObject) n;
|
||||
if(n instanceof Scenery){
|
||||
Scenery obj = (Scenery) n;
|
||||
if (n.getId() == 165) {
|
||||
player.getPulseManager().run(new MovementPulse(player, DestinationFlag.OBJECT.getDestination(player,obj)) {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import core.game.content.dialogue.DialoguePlugin;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
||||
|
|
@ -93,8 +93,8 @@ public final class BedabinNomadDialogue extends DialoguePlugin {
|
|||
break;
|
||||
case 2:
|
||||
end();
|
||||
final GameObject door = RegionManager.getObject(new Location(3169, 3046, 0));
|
||||
ObjectBuilder.replace(door, door.transform(2701), 2);
|
||||
final Scenery door = RegionManager.getObject(new Location(3169, 3046, 0));
|
||||
SceneryBuilder.replace(door, door.transform(2701), 2);
|
||||
player.getWalkingQueue().reset();
|
||||
player.getWalkingQueue().addPath(3169, 3046);
|
||||
player.getPacketDispatch().sendMessage("You walk into the tent.");
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -180,7 +180,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
player.getPacketDispatch().sendMessage("This gate looks like it needs a key to open it.");
|
||||
break;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
case 2686:
|
||||
case 2685:
|
||||
|
|
@ -262,27 +262,27 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
player.getPacketDispatch().sendMessage("The gate needs a key in order to be opened.");
|
||||
return true;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
player.getPacketDispatch().sendMessage("The guards search you thoroughly as you go through the gates.");
|
||||
return true;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
case 2689:
|
||||
if (!player.getInventory().containsItem(TouristTrap.CELL_DOOR_KEY)) {
|
||||
player.getPacketDispatch().sendMessage("The door seems to be pretty locked.");
|
||||
break;
|
||||
}
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
break;
|
||||
case 1528:
|
||||
ObjectBuilder.replace((GameObject) node, ((GameObject) node).transform(1529));
|
||||
SceneryBuilder.replace((Scenery) node, ((Scenery) node).transform(1529));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "close":
|
||||
if (id == 1529) {
|
||||
ObjectBuilder.replace((GameObject) node, ((GameObject) node).transform(1528));
|
||||
SceneryBuilder.replace((Scenery) node, ((Scenery) node).transform(1528));
|
||||
}
|
||||
break;
|
||||
case "look-in":
|
||||
|
|
@ -768,7 +768,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
player.animate(Animation.create(5052));
|
||||
break;
|
||||
case 3:
|
||||
ObjectBuilder.remove(RegionManager.getObject(base.transform(54, 22, 0)));
|
||||
SceneryBuilder.remove(RegionManager.getObject(base.transform(54, 22, 0)));
|
||||
cart = NPC.create(4980, base.transform(54, 22, 0));
|
||||
cart.init();
|
||||
break;
|
||||
|
|
@ -940,7 +940,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
/**
|
||||
* The cart.
|
||||
*/
|
||||
private GameObject cart;
|
||||
private Scenery cart;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MineCartDialogue} {@code Object}.
|
||||
|
|
@ -973,7 +973,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
cart = (GameObject) args[0];
|
||||
cart = (Scenery) args[0];
|
||||
if (player.getInventory().containsItem(TouristTrap.ANNA_BARREL)) {
|
||||
player("There's not enough room for both of us.");
|
||||
stage = -1;
|
||||
|
|
@ -1078,8 +1078,8 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public void open() {
|
||||
ObjectBuilder.remove(RegionManager.getObject(base.getLocation().transform(getPath()[0].getLocalX(), getPath()[0].getLocalY(), 0)));
|
||||
ObjectBuilder.remove(RegionManager.getObject(base.getLocation().transform(getPath()[getPath().length - 1].getLocalX(), getPath()[getPath().length - 1].getLocalY(), 0)));
|
||||
SceneryBuilder.remove(RegionManager.getObject(base.getLocation().transform(getPath()[0].getLocalX(), getPath()[0].getLocalY(), 0)));
|
||||
SceneryBuilder.remove(RegionManager.getObject(base.getLocation().transform(getPath()[getPath().length - 1].getLocalX(), getPath()[getPath().length - 1].getLocalY(), 0)));
|
||||
player.getAppearance().setAnimations(Animation.create(211));
|
||||
player.getAppearance().setRidingMinecart(true);
|
||||
player.getAppearance().sync();
|
||||
|
|
@ -1260,9 +1260,9 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
public static final class BarrelDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* The game object barrel.
|
||||
* The scenery barrel.
|
||||
*/
|
||||
private GameObject barrel;
|
||||
private Scenery barrel;
|
||||
|
||||
/**
|
||||
* The quest.
|
||||
|
|
@ -1294,7 +1294,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
barrel = (GameObject) args[0];
|
||||
barrel = (Scenery) args[0];
|
||||
quest = player.getQuestRepository().getQuest(TouristTrap.NAME);
|
||||
if ((quest.getStage(player) == 70 || quest.getStage(player) == 72) && !player.hasItem(TouristTrap.ANNA_BARREL)) {
|
||||
interpreter.sendDialogue("You search the barrels and find Ana.");
|
||||
|
|
@ -1347,11 +1347,11 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
case 3:
|
||||
end();
|
||||
player.getInventory().add(TouristTrap.BARREL, player);
|
||||
ObjectBuilder.remove(barrel);
|
||||
SceneryBuilder.remove(barrel);
|
||||
GameWorld.getPulser().submit(new Pulse(40) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
ObjectBuilder.add(barrel);
|
||||
SceneryBuilder.add(barrel);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -1618,7 +1618,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
public static final class ProtoTypePulse extends SkillPulse<GameObject> {
|
||||
public static final class ProtoTypePulse extends SkillPulse<Scenery> {
|
||||
|
||||
/**
|
||||
* The hammer item.
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import core.game.node.entity.npc.NPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -97,7 +97,7 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
/**
|
||||
* The ropes.
|
||||
*/
|
||||
private static final List<GameObject> ROPES = new ArrayList<>(20);
|
||||
private static final List<Scenery> ROPES = new ArrayList<>(20);
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
|
|
@ -192,7 +192,7 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
if (quest.getStage(player) >= 100 && node.getLocation().equals(new Location(2566, 9901)) && player.getLocation().equals(new Location(2566, 9901))) {
|
||||
player.teleport(new Location(2604, 9901));
|
||||
} else {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
}
|
||||
}
|
||||
if (node.getLocation().equals(new Location(2604, 9900))) {
|
||||
|
|
@ -201,13 +201,13 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
}
|
||||
break;
|
||||
case 33046:
|
||||
ObjectBuilder.add(new GameObject(33047, Location.create(2530, 9844, 0), 10, 1));
|
||||
SceneryBuilder.add(new Scenery(33047, Location.create(2530, 9844, 0), 10, 1));
|
||||
break;
|
||||
case 42319:
|
||||
if (node.getLocation().equals(new Location(2556, 9844))) {
|
||||
ClimbActionHandler.climb(player, new Animation(828), Location.create(2557, 3444, 0));
|
||||
} else {
|
||||
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, option);
|
||||
}
|
||||
break;
|
||||
case 33047:
|
||||
|
|
@ -224,7 +224,7 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
}
|
||||
break;
|
||||
case "close":
|
||||
ObjectBuilder.add(new GameObject(33046, Location.create(2530, 9844, 0), 10, 1));
|
||||
SceneryBuilder.add(new Scenery(33046, Location.create(2530, 9844, 0), 10, 1));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -257,7 +257,7 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
break;
|
||||
case 1991:
|
||||
if (player.getLocation().getY() >= 9576) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
player.getPacketDispatch().sendMessage("You open the gate and walk through.");
|
||||
} else if (player.getInventory().contains(293, 1) && player.getLocation().getY() < 9576) {
|
||||
player.getPacketDispatch().sendMessage("The gate is locked. You need to use the key on the door to enter.");
|
||||
|
|
@ -326,8 +326,8 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
return Location.create(2512, 3481, 0);
|
||||
}
|
||||
}
|
||||
if (n instanceof GameObject) {
|
||||
GameObject obj = ((GameObject) n);
|
||||
if (n instanceof Scenery) {
|
||||
Scenery obj = ((Scenery) n);
|
||||
if (obj.getId() == 1996 || obj.getId() == 1997) {
|
||||
return Location.create(2512, 3476, 0);
|
||||
}
|
||||
|
|
@ -348,23 +348,23 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
public void handleObjects(boolean add, final Player player) {// very ugly
|
||||
// code
|
||||
if (add) {
|
||||
ROPES.add(new GameObject(1997, Location.create(2512, 3468, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3469, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3470, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3471, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3472, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3473, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3474, 0), 10, 0));
|
||||
ROPES.add(new GameObject(1998, Location.create(2512, 3475, 0), 10, 0));
|
||||
for (GameObject rope : ROPES) {
|
||||
ObjectBuilder.add(rope);
|
||||
ROPES.add(new Scenery(1997, Location.create(2512, 3468, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3469, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3470, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3471, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3472, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3473, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3474, 0), 10, 0));
|
||||
ROPES.add(new Scenery(1998, Location.create(2512, 3475, 0), 10, 0));
|
||||
for (Scenery rope : ROPES) {
|
||||
SceneryBuilder.add(rope);
|
||||
}
|
||||
} else {
|
||||
for (GameObject rope : ROPES) {
|
||||
ObjectBuilder.remove(rope);
|
||||
for (Scenery rope : ROPES) {
|
||||
SceneryBuilder.remove(rope);
|
||||
}
|
||||
ROPES.clear();
|
||||
ObjectBuilder.add(new GameObject(1996, Location.create(2512, 3468, 0), 10, 0));
|
||||
SceneryBuilder.add(new Scenery(1996, Location.create(2512, 3468, 0), 10, 0));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -408,8 +408,8 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Player playa, Node n) {
|
||||
if (n instanceof GameObject) {
|
||||
GameObject obj = (GameObject) n;
|
||||
if (n instanceof Scenery) {
|
||||
Scenery obj = (Scenery) n;
|
||||
if (obj.getId() == 1996 || obj.getId() == 1997) {
|
||||
return Location.create(2512, 3476, 0);
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ public final class WaterfallPlugin extends OptionHandler {
|
|||
final Player player = event.getPlayer();
|
||||
Item useditem = event.getUsedItem();
|
||||
final Quest quest = player.getQuestRepository().getQuest(WaterFall.NAME);
|
||||
final GameObject object = (GameObject) event.getUsedWith();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
|
||||
if (useditem.getId() == ROPE.getId() && object.getId() == 1996 || object.getId() == 1997) {
|
||||
player.lock(8);
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -65,9 +65,9 @@ public class WLBelowCutscene extends CutscenePlugin {
|
|||
public boolean start(final Player player, boolean login, Object... args) {
|
||||
player.lock();
|
||||
player.setAttribute("cutscene", this);
|
||||
GameObject table = RegionManager.getObject(base.transform(9, 37, 0));
|
||||
Scenery table = RegionManager.getObject(base.transform(9, 37, 0));
|
||||
if (table != null) {
|
||||
ObjectBuilder.remove(table);
|
||||
SceneryBuilder.remove(table);
|
||||
}
|
||||
surok = NPC.create(5835, base.transform(8, 39, 0));
|
||||
surok.init();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import core.game.node.entity.player.link.quest.Quest;
|
|||
import core.game.node.item.GroundItem;
|
||||
import core.game.node.item.GroundItemManager;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -43,7 +43,7 @@ public class WitchsHousePlugin extends OptionHandler {
|
|||
public boolean handle(Player player, Node node, String option) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Witch's House");
|
||||
final GroundItem ball = GroundItemManager.get(2407, new Location(2935, 3460, 0), null);
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof GameObject ? ((GameObject) node).getId() : node instanceof NPC ? ((NPC) node).getId() : node.getId();
|
||||
final int id = node instanceof Item ? ((Item) node).getId() : node instanceof Scenery ? ((Scenery) node).getId() : node instanceof NPC ? ((NPC) node).getId() : node.getId();
|
||||
// boolean killedExperiment = player.getAttribute("witchs_house:experiment_killed",false);
|
||||
// boolean experimentAlive = !player.getAttribute("witchs_house:experiment_killed", false);
|
||||
boolean readBook = player.getAttribute("readWitchsBook", false);
|
||||
|
|
@ -109,14 +109,14 @@ public class WitchsHousePlugin extends OptionHandler {
|
|||
break;
|
||||
}
|
||||
if (player.getInventory().containsItem(DOOR_KEY) || player.getLocation().getX() >= 2901) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
player.sendMessage("The door is locked.");
|
||||
}
|
||||
break;
|
||||
case 2862:
|
||||
if (magnetAttached || player.getLocation().getY() < 3466) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
player.removeAttribute("attached_magnet");
|
||||
} else {
|
||||
player.getDialogueInterpreter().sendDialogue("Strange... I can't see any kind of lock or handle to open this door.");
|
||||
|
|
@ -125,7 +125,7 @@ public class WitchsHousePlugin extends OptionHandler {
|
|||
case 2865:
|
||||
case 2866:
|
||||
if (player.getEquipment().containsItem(LEATHER_GLOVES)) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
player.getImpactHandler().manualHit(player, RandomFunction.random(2, 3), ImpactHandler.HitsplatType.NORMAL);
|
||||
player.getDialogueInterpreter().sendDialogue("As your bare hands touch the gate you feel a shock.");
|
||||
|
|
@ -136,11 +136,11 @@ public class WitchsHousePlugin extends OptionHandler {
|
|||
break;
|
||||
case 2863:
|
||||
if (player.getLocation().getX() >= 2934) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
return true;
|
||||
}
|
||||
if (player.getInventory().containsItem(KEY)) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, (GameObject) node);
|
||||
DoorActionHandler.handleAutowalkDoor(player, (Scenery) node);
|
||||
} else {
|
||||
player.sendMessage("The door is locked.");
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ public class WitchsHousePlugin extends OptionHandler {
|
|||
public boolean handle(NodeUsageEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
Item useditem = event.getUsedItem();
|
||||
final GameObject object = (GameObject) event.getUsedWith();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
assert useditem != null;
|
||||
assert object != null;
|
||||
if (player.getAttribute("mouse_out") != null && useditem.getId() == CHEESE.getId() && object.getId() == 15518) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -54,17 +54,17 @@ public class TutorialIslandPlugin extends OptionHandler {
|
|||
player.getDialogueInterpreter().open(((NPC) node).getId(), ((NPC) node));
|
||||
return true;
|
||||
}
|
||||
} else if (node instanceof GameObject) {
|
||||
} else if (node instanceof Scenery) {
|
||||
if (TutorialSession.getExtension(player).getStage() == 16) {
|
||||
int first = node.getId();
|
||||
int second = first == 3015 ? 3016 : 3015;
|
||||
if (DoorActionHandler.autowalkFence(player, (GameObject) node, first, second)) {
|
||||
if (DoorActionHandler.autowalkFence(player, (Scenery) node, first, second)) {
|
||||
TutorialStage.load(player, 17, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
final int tut_stage = TutorialSession.getExtension(player).getStage();
|
||||
final GameObject object = (GameObject) node;
|
||||
final Scenery object = (Scenery) node;
|
||||
if (object.getId() == 3028) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -163,8 +163,8 @@ public class TutorialIslandPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Node node, Node n) {
|
||||
if (n instanceof GameObject) {
|
||||
GameObject object = (GameObject) n;
|
||||
if (n instanceof Scenery) {
|
||||
Scenery object = (Scenery) n;
|
||||
if (object.getDefinition().hasAction("open")) {
|
||||
return DoorActionHandler.getDestination((Entity) node, object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import core.game.component.Component;
|
|||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.HintIconManager;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
|
|
@ -568,7 +568,7 @@ public enum TutorialStage {
|
|||
} else {
|
||||
removeHintIcon(player);
|
||||
}
|
||||
GameObject object = RegionManager.getObject(Location.create(3094, 9502, 0));
|
||||
Scenery object = RegionManager.getObject(Location.create(3094, 9502, 0));
|
||||
if (object != null) {
|
||||
player.setAttribute("tut-island:hi_slot", HintIconManager.registerHintIcon(player, object));
|
||||
} else {
|
||||
|
|
@ -777,7 +777,7 @@ public enum TutorialStage {
|
|||
} else {
|
||||
removeHintIcon(player);
|
||||
}
|
||||
GameObject object = RegionManager.getObject(Location.create(3130, 3124, 0));
|
||||
Scenery object = RegionManager.getObject(Location.create(3130, 3124, 0));
|
||||
if (object != null) {
|
||||
player.setAttribute("tut-island:hi_slot", HintIconManager.registerHintIcon(player, object));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.zone.MapZone;
|
||||
|
|
@ -227,7 +227,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
|
|||
* @param object the object.
|
||||
* @param player the player.
|
||||
*/
|
||||
private void teleport(Player player, GameObject object) {
|
||||
private void teleport(Player player, Scenery object) {
|
||||
if (object.getLocation().getX() == 3142 || object.getLocation().getY() == 5545) {
|
||||
commenceBorkBattle(player);
|
||||
return;
|
||||
|
|
@ -284,7 +284,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
|
|||
* @param object the object.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
private boolean isStained(GameObject object) {
|
||||
private boolean isStained(Scenery object) {
|
||||
return getStainedTime(object) > GameWorld.getTicks();
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
|
|||
* Sets stained time.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void setStainedTime(GameObject object) {
|
||||
private void setStainedTime(Scenery object) {
|
||||
object.getAttributes().setAttribute("stained", (int) GameWorld.getTicks() + RandomFunction.random(50, 150));
|
||||
}
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
|
|||
* @param object the object.
|
||||
* @return the time.
|
||||
*/
|
||||
private int getStainedTime(GameObject object) {
|
||||
private int getStainedTime(Scenery object) {
|
||||
return object.getAttributes().getAttribute("stained", 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import core.game.node.entity.npc.AbstractNPC;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.state.EntityState;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Direction;
|
||||
|
|
@ -99,7 +99,7 @@ public class YanilleAgilityDungeon extends MapZone implements Plugin<Object> {
|
|||
for (Item item : HERBS) {
|
||||
player.getInventory().add(item, player);
|
||||
}
|
||||
ObjectBuilder.replace(target.asObject(), target.asObject().transform(target.getId() + 1), 5);
|
||||
SceneryBuilder.replace(target.asObject(), target.asObject().transform(target.getId() + 1), 5);
|
||||
}
|
||||
return true;
|
||||
case 378:
|
||||
|
|
@ -121,7 +121,7 @@ public class YanilleAgilityDungeon extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void handleBalancingLedge(final Player player, GameObject object) {
|
||||
private void handleBalancingLedge(final Player player, Scenery object) {
|
||||
if (player.getSkills().getLevel(Skills.AGILITY) < 40) {
|
||||
player.getDialogueInterpreter().sendDialogue("You need an Agility level of at least 40 in order to do this.");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.agility.AgilityHandler;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Direction;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -71,18 +71,18 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
}
|
||||
switch (target.getId()) {
|
||||
case 5259:
|
||||
handleEnergyBarrier(player, (GameObject) target);
|
||||
handleEnergyBarrier(player, (Scenery) target);
|
||||
return true;
|
||||
case 5267:
|
||||
player.animate(Animation.create(536));
|
||||
player.getPacketDispatch().sendMessage("The trapdoor opens...");
|
||||
ObjectBuilder.replace((GameObject) target, ((GameObject) target).transform(5268));
|
||||
SceneryBuilder.replace((Scenery) target, ((Scenery) target).transform(5268));
|
||||
return true;
|
||||
case 5268:
|
||||
if (option.getName().equals("Close")) {
|
||||
player.animate(Animation.create(535));
|
||||
player.getPacketDispatch().sendMessage("You close the trapdoor.");
|
||||
ObjectBuilder.replace((GameObject) target, ((GameObject) target).transform(5267));
|
||||
SceneryBuilder.replace((Scenery) target, ((Scenery) target).transform(5267));
|
||||
} else {
|
||||
player.getPacketDispatch().sendMessage("You climb down through the trapdoor...");
|
||||
player.getProperties().setTeleportLocation(Location.create(3669, 9888, 3));
|
||||
|
|
@ -90,12 +90,12 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
return true;
|
||||
case 7434: // Trapdoors in bar
|
||||
if (option.getName().equalsIgnoreCase("open")) {
|
||||
ObjectBuilder.replace(target.asObject(), target.asObject().transform(7435));
|
||||
SceneryBuilder.replace(target.asObject(), target.asObject().transform(7435));
|
||||
}
|
||||
break;
|
||||
case 7435: // open trapdoor in bar
|
||||
if (option.getName().equalsIgnoreCase("close")) {
|
||||
ObjectBuilder.replace(target.asObject(), target.asObject().transform(7434));
|
||||
SceneryBuilder.replace(target.asObject(), target.asObject().transform(7434));
|
||||
}
|
||||
break;
|
||||
case 9308:
|
||||
|
|
@ -121,7 +121,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
case 11162:
|
||||
case 11163:
|
||||
case 11164:
|
||||
GameObject obj = (GameObject) target;
|
||||
Scenery obj = (Scenery) target;
|
||||
switch (option.getName().toLowerCase()) {
|
||||
case "fill":
|
||||
player.getPulseManager().run(fillPulse);
|
||||
|
|
@ -146,7 +146,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
|
||||
public Pulse emptyPulse = new Pulse(5) {
|
||||
//the bin
|
||||
GameObject emptyobj = new GameObject(11164, 3658, 3525, 1);
|
||||
Scenery emptyobj = new Scenery(11164, 3658, 3525, 1);
|
||||
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
|
@ -162,7 +162,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
};
|
||||
public Pulse windPulse = new Pulse(5) {
|
||||
//the crank
|
||||
GameObject windobj = new GameObject(11163, 3659, 3525, 1);
|
||||
Scenery windobj = new Scenery(11163, 3659, 3525, 1);
|
||||
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
|
@ -218,7 +218,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void checkStatus(Player player, GameObject object) {
|
||||
private void checkStatus(Player player, Scenery object) {
|
||||
String status = "The grinder is empty.";
|
||||
if (hasBones(player, object, true)) {
|
||||
status = "There are some bones in the hopper.";
|
||||
|
|
@ -234,7 +234,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void empty(Player player, GameObject object) {
|
||||
private void empty(Player player, Scenery object) {
|
||||
if (hasBones(player, object, true)) {
|
||||
player.sendMessage("You need to wind the handle to grind the bones.");
|
||||
return;
|
||||
|
|
@ -261,7 +261,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void wind(Player player, GameObject object) {
|
||||
private void wind(Player player, Scenery object) {
|
||||
final Bones bone = Bones.forConfigValue(player.getConfigManager().get(408), true);
|
||||
player.getLocks().lockInteractions(3);
|
||||
player.animate(Animation.create(1648));
|
||||
|
|
@ -280,7 +280,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
* @param object the object.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
public static boolean hasBones(Player player, GameObject object, boolean inHopper) {
|
||||
public static boolean hasBones(Player player, Scenery object, boolean inHopper) {
|
||||
int value = player.getConfigManager().get(408);
|
||||
for (Bones bone : Bones.values()) {
|
||||
if (bone.getConfigValue(inHopper) == value) {
|
||||
|
|
@ -359,7 +359,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param object the object.
|
||||
*/
|
||||
private void handleEnergyBarrier(Player player, GameObject object) {
|
||||
private void handleEnergyBarrier(Player player, Scenery object) {
|
||||
boolean force = object.getLocation().equals(3659, 3508, 0) && player.getLocation().getY() < 3508 || object.getLocation().equals(3652, 3485, 0) && player.getLocation().getX() > 3652;
|
||||
if (!force && !player.getInventory().contains(4278, 2)) {
|
||||
player.getDialogueInterpreter().open(1706);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import core.game.node.entity.Entity;
|
|||
import core.game.node.entity.impl.ForceMovement;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
|
|
@ -178,7 +178,7 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
|||
switch (node.getId()) {
|
||||
case 4616:
|
||||
case 4615:
|
||||
crossRellekaBridge(player, (GameObject) node);
|
||||
crossRellekaBridge(player, (Scenery) node);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -205,7 +205,7 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
|||
* @param player the player.
|
||||
* @param node the node.
|
||||
*/
|
||||
private void crossRellekaBridge(Player player, GameObject node) {
|
||||
private void crossRellekaBridge(Player player, Scenery node) {
|
||||
boolean east = node.getId() == 4616;
|
||||
player.lock(2);
|
||||
if (player.getLocation().equals(node.getLocation())) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import core.game.node.entity.combat.CombatStyle;
|
|||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -228,7 +228,7 @@ public final class WaterBirthDungeonZone extends MapZone implements Plugin<Objec
|
|||
NPCDefinition.forId(2443).getHandlers().put("option:destroy", this);
|
||||
NPCDefinition.forId(2446).getHandlers().put("option:destroy", this);
|
||||
for (Location l : DOOR_SUPPORTS) {
|
||||
ObjectBuilder.remove(RegionManager.getObject(l));
|
||||
SceneryBuilder.remove(RegionManager.getObject(l));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ public final class WaterBirthDungeonZone extends MapZone implements Plugin<Objec
|
|||
if (!node.isActive()) {
|
||||
return true;
|
||||
}
|
||||
ObjectBuilder.replace(node.asObject(), node.asObject().transform(8962), 30);
|
||||
SceneryBuilder.replace(node.asObject(), node.asObject().transform(8962), 30);
|
||||
break;
|
||||
case 2440:
|
||||
case 2443:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package core.game.interaction;
|
|||
import core.game.content.global.action.DoorActionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.world.map.Direction;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
|
|
@ -96,7 +96,7 @@ public class DestinationFlag {
|
|||
|
||||
@Override
|
||||
public Location getDestination(Entity mover, Node n) {
|
||||
GameObject object = (GameObject) n;
|
||||
Scenery object = (Scenery) n;
|
||||
if (object.getType() < 4 || object.getType() == 9) {
|
||||
return DoorActionHandler.getDestination(mover, object);
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ public class DestinationFlag {
|
|||
* @param dir The preferred direction from the object.
|
||||
* @return The teleporting destination.
|
||||
*/
|
||||
private Location getDestination(Entity mover, GameObject object, int sizeX, int sizeY, Direction dir, int count) {
|
||||
private Location getDestination(Entity mover, Scenery object, int sizeX, int sizeY, Direction dir, int count) {
|
||||
Location closest = null;
|
||||
double distance = 9999.9;
|
||||
Location loc = object.getLocation();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.update.flag.player.FaceLocationFlag;
|
||||
import core.net.packet.PacketRepository;
|
||||
|
|
@ -257,8 +257,8 @@ public class Interaction {
|
|||
} else if (node instanceof NPC) {
|
||||
NPC npc = (NPC) node;
|
||||
init(npc.getId(), npc.getDefinition().getOptions());
|
||||
} else if (node instanceof GameObject) {
|
||||
GameObject object = (GameObject) node;
|
||||
} else if (node instanceof Scenery) {
|
||||
Scenery object = (Scenery) node;
|
||||
init(object.getId(), object.getDefinition().getOptions());
|
||||
} else if (node instanceof Item) {
|
||||
Item item = (Item) node;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import core.cache.def.impl.ObjectDefinition;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
|
||||
/**
|
||||
* Represents an Interaction option.
|
||||
|
|
@ -79,7 +79,7 @@ public final class Option {
|
|||
if (node instanceof NPC) {
|
||||
return NPCDefinition.getOptionHandler(nodeId, name);
|
||||
}
|
||||
if (node instanceof GameObject) {
|
||||
if (node instanceof Scenery) {
|
||||
return ObjectDefinition.getOptionHandler(nodeId, name);
|
||||
}
|
||||
if (node instanceof Item) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import core.game.node.Node;
|
|||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.Scenery;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
|
|
@ -116,8 +116,8 @@ public abstract class UseWithHandler implements Plugin<Object> {
|
|||
}
|
||||
} else if (n instanceof NPC) {
|
||||
handler = HANDLERS.get(((NPC) n).getId() | NPC_TYPE << 16);
|
||||
} else if (n instanceof GameObject) {
|
||||
handler = HANDLERS.get(((GameObject) n).getId() | OBJECT_TYPE << 16);
|
||||
} else if (n instanceof Scenery) {
|
||||
handler = HANDLERS.get(((Scenery) n).getId() | OBJECT_TYPE << 16);
|
||||
} else if (n instanceof Player) {
|
||||
handler = HANDLERS.get(((Item) event.getUsed()).getId() | PLAYER_TYPE << 16);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import core.game.interaction.OptionHandler;
|
|||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.object.GameObject;
|
||||
import core.game.node.object.ObjectBuilder;
|
||||
import core.game.node.object.Scenery;
|
||||
import core.game.node.object.SceneryBuilder;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.plugin.Initializable;
|
||||
|
|
@ -40,8 +40,8 @@ public final class BedabinPlugin extends OptionHandler {
|
|||
switch (id) {
|
||||
case 2700:
|
||||
if (player.getLocation().getY() >= 3046) {
|
||||
final GameObject door = RegionManager.getObject(new Location(3169, 3046, 0));
|
||||
ObjectBuilder.replace(door, door.transform(2701), 2);
|
||||
final Scenery door = RegionManager.getObject(new Location(3169, 3046, 0));
|
||||
SceneryBuilder.replace(door, door.transform(2701), 2);
|
||||
player.getWalkingQueue().reset();
|
||||
player.getWalkingQueue().addPath(3169, 3045);
|
||||
player.getPacketDispatch().sendMessage("You walk back out the tent.");
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue