mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-18 12:30:18 -07:00
Bugfixes + client logo
This commit is contained in:
parent
f6a19d00f4
commit
ed7691a3f0
5 changed files with 24 additions and 42 deletions
|
|
@ -1,8 +1,8 @@
|
|||
package org.runite.client;
|
||||
import javax.swing.*;
|
||||
|
||||
import org.rs09.client.config.GameConfig;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
import java.net.MalformedURLException;
|
||||
|
|
@ -77,6 +77,7 @@ public class ClientLoader extends Applet {
|
|||
ClientLoader.world = "" + GameConfig.SERVER_NAME;
|
||||
//System.out.println(GameLaunch.SETTINGS.getWorld());
|
||||
this.frame = new JFrame(GameConfig.SERVER_NAME);
|
||||
this.frame.setIconImage(ImageIO.read(getClass().getClassLoader().getResource("09logo.png")));
|
||||
this.frame.setLayout(new BorderLayout());
|
||||
this.frame.setSize(300,500);
|
||||
this.frame.setBackground(Color.BLACK);
|
||||
|
|
|
|||
BIN
Client/src/main/resources/09logo.png
Normal file
BIN
Client/src/main/resources/09logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -1,39 +0,0 @@
|
|||
package core.game.interaction.item;
|
||||
|
||||
import core.cache.def.impl.ItemDefinition;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import rs09.game.interaction.Listeners;
|
||||
|
||||
/**
|
||||
* Represents the plugin used for the quest cape and hood item.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
@Initializable
|
||||
public final class QuestCapePlugin extends OptionHandler {
|
||||
final int MAX_QP = 72;
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ItemDefinition.forId(9813).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(9814).getHandlers().put("option:wear", this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
if (!(player.getQuestRepository().getPoints() >= MAX_QP)) {
|
||||
player.getPacketDispatch().sendMessage("You cannot wear this " + node.getName().toLowerCase() + " yet.");
|
||||
return true;
|
||||
}
|
||||
return Listeners.run(node.getId(),0,"equip",player,node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWalk() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -330,7 +330,6 @@ public final class SummoningTrainingRoom extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
player.sendMessage("ButtonId=" + buttonId + ", stage=" + stage);
|
||||
switch (quest.getStage(player)) {
|
||||
case 10:
|
||||
switch (stage) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package rs09.game.interaction.item
|
||||
|
||||
import core.game.node.entity.player.link.quest.QuestRepository
|
||||
import rs09.game.interaction.InteractionListener
|
||||
import rs09.game.interaction.Listeners.run
|
||||
|
||||
class QuestCapeListener : InteractionListener() {
|
||||
|
||||
val IDs = intArrayOf(9813,9814)
|
||||
|
||||
override fun defineListeners() {
|
||||
on(IDs,ITEM,"wear"){ player, item ->
|
||||
val MAX_QP = QuestRepository.getQuests().values.sumBy { it.questPoints }
|
||||
if (player.questRepository.points < MAX_QP) {
|
||||
player.packetDispatch.sendMessage("You cannot wear this " + item.name.toLowerCase() + " yet.")
|
||||
return@on true
|
||||
}
|
||||
return@on run(item.id, 0, "equip", player, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue