forked from 2009Scape/Server
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2760e5c8fb
3 changed files with 12 additions and 10 deletions
|
|
@ -15,9 +15,10 @@ object Discord {
|
||||||
var initialized = false
|
var initialized = false
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
//Removed support for Linux due to the outlined issue on line 37. TODO: Revisit this when the RPC library updates. There's a PR there that *should* fix it.
|
||||||
fun checkInitializable() : Boolean{
|
fun checkInitializable() : Boolean{
|
||||||
val OS = System.getProperty("os.name")
|
val OS = System.getProperty("os.name")
|
||||||
if(OS.toLowerCase().startsWith("windows") || OS.toLowerCase().contains("nux")){
|
if(OS.toLowerCase().startsWith("windows")){
|
||||||
val arch = System.getProperty("os.arch")
|
val arch = System.getProperty("os.arch")
|
||||||
return arch != "aarch64" && !initialized
|
return arch != "aarch64" && !initialized
|
||||||
}
|
}
|
||||||
|
|
@ -33,6 +34,8 @@ object Discord {
|
||||||
DiscordRPC.discordShutdown()
|
DiscordRPC.discordShutdown()
|
||||||
}.build()
|
}.build()
|
||||||
|
|
||||||
|
//On Linux, when the discord library initializes, it can crash any other client loading the same library.
|
||||||
|
//Not sure what causes this, likely a JVM bug to be honest.
|
||||||
DiscordRPC.discordInitialize(APP_ID, handlers, true)
|
DiscordRPC.discordInitialize(APP_ID, handlers, true)
|
||||||
initialized = true
|
initialized = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import core.game.node.entity.npc.NPC;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
||||||
|
import static core.tools.DialogueConstKt.END_DIALOGUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the SigmundDialogue dialogue.
|
* Handles the SigmundDialogue dialogue.
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
|
|
@ -101,16 +103,13 @@ public class SigmundDialogue extends DialoguePlugin {
|
||||||
break;
|
break;
|
||||||
case 31:
|
case 31:
|
||||||
npc("You should ask other people around the town if they","saw anything.");
|
npc("You should ask other people around the town if they","saw anything.");
|
||||||
stage++;
|
stage = END_DIALOGUE;
|
||||||
player.getQuestRepository().getQuest("Lost Tribe").start(player);
|
player.getQuestRepository().getQuest("Lost Tribe").start(player);
|
||||||
player.setAttribute("/save:tlt-witness", TLTNPCS[0]);
|
player.setAttribute("/save:tlt-witness", TLTNPCS[0]);
|
||||||
break;
|
break;
|
||||||
case 32:
|
|
||||||
end();
|
|
||||||
break;
|
|
||||||
case 34:
|
case 34:
|
||||||
player("No...");
|
player("No...");
|
||||||
stage = 32;
|
stage = END_DIALOGUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@ class KingRoaldArravDialogue() : DialogueFile() {
|
||||||
2 -> npc("My goodness! This claim is for the reward offered by", "my father many years ago!").also { stage++ }
|
2 -> npc("My goodness! This claim is for the reward offered by", "my father many years ago!").also { stage++ }
|
||||||
3 -> npc("I never thought I would live to see the day when", "someone came forward to claim this reward!").also { stage++ }
|
3 -> npc("I never thought I would live to see the day when", "someone came forward to claim this reward!").also { stage++ }
|
||||||
4 -> npc("I heard that you found half the shield, so I will give", "you half of the bounty. That comes to exactly 600 gp!").also { stage++ }
|
4 -> npc("I heard that you found half the shield, so I will give", "you half of the bounty. That comes to exactly 600 gp!").also { stage++ }
|
||||||
5 -> interpreter!!.sendItemMessage(CERTIFICATE.id, "You hand over a certificate. The king gives you 600 gp.").also { stage = END_DIALOGUE }
|
5 -> {
|
||||||
END_DIALOGUE -> {
|
interpreter!!.sendItemMessage(CERTIFICATE.id, "You hand over a certificate. The king gives you 600 gp.")
|
||||||
if (player!!.inventory.remove(CERTIFICATE)) {
|
if (player!!.inventory.remove(CERTIFICATE)) {
|
||||||
if (!player!!.inventory.add(Item(995, 600))) {
|
if (!player!!.inventory.add(Item(995, 600))) {
|
||||||
GroundItemManager.create(Item(995, 600), player)
|
GroundItemManager.create(Item(995, 600), player)
|
||||||
}
|
}
|
||||||
player!!.questRepository.getQuest("Shield of Arrav").finish(player)
|
player!!.questRepository.getQuest("Shield of Arrav").finish(player)
|
||||||
end()
|
stage = END_DIALOGUE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue