From a924a2f332ff61196114f3ef9ad4d069ce1ffb5e Mon Sep 17 00:00:00 2001 From: Moth Date: Wed, 7 Jul 2021 12:52:31 +0000 Subject: [PATCH 1/9] K'ril and Zilyana drop tables adjusted. --- Server/data/configs/drop_tables.json | 578 +++++++++++---------------- 1 file changed, 244 insertions(+), 334 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 0a7beddb4..c89e67418 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -49958,182 +49958,140 @@ "main": [ { "minAmount": "1", - "weight": "500.0", - "id": "1333", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "224", - "maxAmount": "36" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "6050", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6052", - "maxAmount": "16" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "244", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "246", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "3139", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "248", - "maxAmount": "32" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6694", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "125.0", - "id": "6019", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "50.0", + "weight": "1.45", "id": "11716", "maxAmount": "1" }, { "minAmount": "1", - "weight": "49.0", - "id": "11736", - "maxAmount": "1" - }, - { - "minAmount": "120", - "weight": "500.0", - "id": "560", - "maxAmount": "125" - }, - { - "minAmount": "80", - "weight": "250.0", - "id": "565", - "maxAmount": "90" - }, - { - "minAmount": "1", - "weight": "500.0", - "id": "1123", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "500.0", - "id": "1079", - "maxAmount": "1" - }, - { - "minAmount": "3", - "weight": "500.0", - "id": "145", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "500.0", - "id": "3026", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "500.0", - "id": "157", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "500.0", - "id": "189", - "maxAmount": "3" - }, - { - "minAmount": "19362", - "weight": "500.0", - "id": "995", - "maxAmount": "19362" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "5302", - "maxAmount": "3" - }, - { - "minAmount": "10", - "weight": "250.0", - "id": "2486", - "maxAmount": "10" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11710", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11712", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11714", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "13.0", + "weight": "0.85", "id": "11708", "maxAmount": "1" }, { "minAmount": "1", - "weight": "10.0", - "id": "2735", + "weight": "0.7", + "id": "11710", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", + "weight": "0.7", + "id": "11712", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "0.7", + "id": "11714", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.45", + "id": "11736", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "3.3", + "id": "5698", + "maxAmount": "1" + }, + { + "minAmount": "295", + "weight": "25.0", + "id": "5626", + "maxAmount": "300" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1333", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1123", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "15.0", + "id": "1079", + "maxAmount": "1" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "145", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "157", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "3026", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "189", + "maxAmount": "3" + }, + { + "minAmount": "120", + "weight": "25.0", + "id": "560", + "maxAmount": "125" + }, + { + "minAmount": "80", + "weight": "25.0", + "id": "565", + "maxAmount": "90" + }, + { + "minAmount": "10", + "weight": "25.0", + "id": "2486", + "maxAmount": "10" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "5302", + "maxAmount": "3" + }, + { + "minAmount": "19500", + "weight": "37.0", + "id": "995", + "maxAmount": "20000" + }, + { + "minAmount": "1", + "weight": "55.6", + "id": "0", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "20.0", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", - "id": "0", + "weight": "20.0", + "id": "12070", "maxAmount": "1" } ] @@ -51040,7 +50998,7 @@ { "minAmount": "18000", "weight": "50.0", - "id": "617", + "id": "995", "maxAmount": "20000" }, { @@ -51514,189 +51472,141 @@ "main": [ { "minAmount": "1", - "weight": "50.0", - "id": "11730", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "224", - "maxAmount": "36" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "6050", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6052", - "maxAmount": "16" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "244", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "246", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "3139", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "248", - "maxAmount": "32" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6694", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "125.0", - "id": "6019", - "maxAmount": "24" - }, - { - "minAmount": "36", - "weight": "500.0", - "id": "811", - "maxAmount": "40" - }, - { - "minAmount": "96", - "weight": "500.0", - "id": "563", - "maxAmount": "105" - }, - { - "minAmount": "1", - "weight": "500.0", - "id": "1093", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "250.0", - "id": "1123", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "250.0", - "id": "1201", - "maxAmount": "1" - }, - { - "minAmount": "5", - "weight": "500.0", - "id": "207", - "maxAmount": "5" - }, - { - "minAmount": "2", - "weight": "500.0", - "id": "5295", - "maxAmount": "2" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "2434", - "maxAmount": "2" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "6687", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "2442", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "3024", - "maxAmount": "3" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "5316", - "maxAmount": "1" - }, - { - "minAmount": "361", - "weight": "500.0", - "id": "995", - "maxAmount": "10300" - }, - { - "minAmount": "10301", - "weight": "500.0", - "id": "995", - "maxAmount": "20300" - }, - { - "minAmount": "6", - "weight": "250.0", - "id": "1602", - "maxAmount": "6" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11710", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11712", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "9.0", - "id": "11714", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "10.0", - "id": "2733", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "13.0", + "weight": "0.7", "id": "11706", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", + "weight": "0.55", + "id": "11710", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "0.55", + "id": "11712", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "0.55", + "id": "11714", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.21", + "id": "11730", + "maxAmount": "1" + }, + { + "minAmount": "35", + "weight": "20.0", + "id": "811", + "maxAmount": "40" + }, + { + "minAmount": "1", + "weight": "20.0", + "id": "1093", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "20.0", + "id": "1201", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "20.0", + "id": "1123", + "maxAmount": "1" + }, + { + "minAmount": "95", + "weight": "20.0", + "id": "563", + "maxAmount": "100" + }, + { + "minAmount": "3", + "weight": "20.0", + "id": "3026", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "20.0", + "id": "163", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "20.0", + "id": "3042", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "10.0", + "id": "6687", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "10.0", + "id": "3024", + "maxAmount": "3" + }, + { + "minAmount": "5", + "weight": "20.0", + "id": "208", + "maxAmount": "5" + }, + { + "minAmount": "2", + "weight": "20.0", + "id": "5295", + "maxAmount": "2" + }, + { + "minAmount": "1", + "weight": "2.0", + "id": "5316", + "maxAmount": "1" + }, + { + "minAmount": "6", + "weight": "20.0", + "id": "1602", + "maxAmount": "6" + }, + { + "minAmount": "19000", + "weight": "30.0", + "id": "995", + "maxAmount": "20000" + }, + { + "minAmount": "1", + "weight": "20.0", "id": "31", "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "44.0", + "id": "0", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "11.8", + "id": "12070", + "maxAmount": "1" } ] }, From ddff4db4b956f97506206b512bdd08837913e9ae Mon Sep 17 00:00:00 2001 From: skelsoft <9147770-skelsoft@users.noreply.gitlab.com> Date: Wed, 7 Jul 2021 12:52:46 +0000 Subject: [PATCH 2/9] Fix: Port Sarim water source, Ice Warrior stat rebalance --- Server/data/configs/npc_configs.json | 31 ++-- .../item/withobject/WaterSkinHandler.java | 156 +++++++++--------- .../item/withobject/WaterSourcePlugin.java | 2 +- 3 files changed, 98 insertions(+), 91 deletions(-) diff --git a/Server/data/configs/npc_configs.json b/Server/data/configs/npc_configs.json index 7d543b6b3..9675528a2 100644 --- a/Server/data/configs/npc_configs.json +++ b/Server/data/configs/npc_configs.json @@ -2462,22 +2462,23 @@ "slayer_task": "48", "melee_animation": "451", "range_animation": "451", - "attack_speed": "6", + "attack_speed": "4", "defence_animation": "404", "weakness": "9", "slayer_exp": "59", "magic_animation": "451", "death_animation": "843", "name": "Ice warrior", - "defence_level": "39", + "defence_level": "47", "safespot": null, "lifepoints": "59", - "strength_level": "39", + "strength_level": "47", "id": "125", "aggressive": "true", + "bonuses": "0,0,0,0,0,30,40,20,10,30,0,0,0,0,0", "clue_level": "1", "range_level": "1", - "attack_level": "39" + "attack_level": "47" }, { "examine": "Looks pretty otherworldly to me!", @@ -2771,23 +2772,26 @@ }, { "examine": "A cold-hearted elemental warrior.", + "slayer_task": "48", "melee_animation": "451", "range_animation": "451", - "attack_speed": "6", + "attack_speed": "4", "defence_animation": "404", + "weakness": "9", "slayer_exp": "59", "magic_animation": "451", "death_animation": "843", "name": "Ice warrior", - "defence_level": "39", + "defence_level": "47", "safespot": null, "lifepoints": "59", - "strength_level": "1", + "strength_level": "47", "id": "145", "aggressive": "true", + "bonuses": "0,0,0,0,0,30,40,20,10,30,0,0,0,0,0", "clue_level": "1", "range_level": "1", - "attack_level": "39" + "attack_level": "47" }, { "examine": "A sea bird.", @@ -28536,23 +28540,26 @@ }, { "examine": "A cold-hearted elemental warrior.", + "slayer_task": "48", "melee_animation": "451", "range_animation": "451", - "attack_speed": "6", + "attack_speed": "4", "defence_animation": "404", + "weakness": "9", "slayer_exp": "59", "magic_animation": "451", "death_animation": "843", "name": "Ice warrior", - "defence_level": "39", + "defence_level": "47", "safespot": null, "lifepoints": "59", - "strength_level": "1", + "strength_level": "47", "id": "3073", "aggressive": "true", + "bonuses": "0,0,0,0,0,30,40,20,10,30,0,0,0,0,0", "clue_level": "1", "range_level": "1", - "attack_level": "39" + "attack_level": "47" }, { "name": "Monk", diff --git a/Server/src/main/java/core/game/interaction/item/withobject/WaterSkinHandler.java b/Server/src/main/java/core/game/interaction/item/withobject/WaterSkinHandler.java index 89aad7356..ed23cd866 100644 --- a/Server/src/main/java/core/game/interaction/item/withobject/WaterSkinHandler.java +++ b/Server/src/main/java/core/game/interaction/item/withobject/WaterSkinHandler.java @@ -1,79 +1,79 @@ -package core.game.interaction.item.withobject; - -import core.game.interaction.NodeUsageEvent; -import core.game.interaction.UseWithHandler; -import core.game.node.entity.player.Player; -import core.game.node.item.Item; -import core.game.system.task.Pulse; -import core.game.world.update.flag.context.Animation; -import core.plugin.Initializable; -import core.plugin.Plugin; - -@Initializable -public final class WaterSkinHandler extends UseWithHandler { - - /** - * Represents objects with water in them. - */ - private static final int[] OBJECTS = new int[]{16302, 6827, 11661, 24160, 34577, 15936, 15937, 15938, 23920, 35469, 24265, 153, 879, 880, 2864, 6232, 10436, 10437, 10827, 11007, 11759, 21764, 22973, 24161, 24214, 24265, 28662, 30223, 30820, 34579, 36781, 873, 874, 4063, 6151, 8699, 9143, 9684, 10175, 12279, 12974, 13563, 13564, 14868, 14917, 15678, 16704, 16705, 20358, 22715, 24112, 24314, 25729, 25929, 26966, 29105, 33458, 34082, 34411, 34496, 34547, 34566, 35762, 36971, 37154, 37155, 878, 884, 3264, 3305, 3359, 4004, 4005, 6097, 6249, 6549, 8747, 8927, 11793, 12201, 12897, 24166, 26945, 31359, 32023, 32024, 34576, 35671, 13561, 13563, 13559}; - - /** - * Represents the animation to use. - */ - private static final Animation ANIMATION = new Animation(832); - - // Unfilled waterskin objects - private static final int[] WATERSKINS = new int[]{1831, 1829, 1827, 1825}; - - private static final int FILLED_WATERSKIN = 1823; - - // Waterskin fill diag - private static final String WATERSKIN_TEXT = "You fill the waterskin."; - - /** - * Constructs a new {@code FillBucketPlugin} {@code Object}. - */ - public WaterSkinHandler() { - super(WATERSKINS); - } - - @Override - public Plugin newInstance(Object arg) throws Throwable { - for (int i : OBJECTS) { - addHandler(i, OBJECT_TYPE, this); - } - return this; - } - - @Override - public boolean handle(NodeUsageEvent event) { - Player player = event.getPlayer(); - player.getPulseManager().run(new Pulse(2, player) { - @Override - public boolean pulse() { - int curSkin = -1; - for (int i = 0; i < WATERSKINS.length; i++) { - if (player.getInventory().contains(WATERSKINS[i], 1)) { - curSkin = WATERSKINS[i]; - break; - } - } - if (curSkin == -1) { - return true; - } - if (player.getInventory().remove(new Item(curSkin))) { - player.animate(ANIMATION); - player.getPacketDispatch().sendMessage(WATERSKIN_TEXT); - player.getInventory().add(new Item(FILLED_WATERSKIN)); - } - return false; - } - - @Override - public void stop() { - super.stop(); - } - }); - return true; - } +package core.game.interaction.item.withobject; + +import core.game.interaction.NodeUsageEvent; +import core.game.interaction.UseWithHandler; +import core.game.node.entity.player.Player; +import core.game.node.item.Item; +import core.game.system.task.Pulse; +import core.game.world.update.flag.context.Animation; +import core.plugin.Initializable; +import core.plugin.Plugin; + +@Initializable +public final class WaterSkinHandler extends UseWithHandler { + + /** + * Represents objects with water in them. + */ + private static final int[] OBJECTS = new int[]{16302, 6827, 11661, 24160, 34577, 15936, 15937, 15938, 23920, 35469, 24265, 153, 879, 880, 2864, 6232, 10436, 10437, 10827, 11007, 11759, 21764, 22973, 24161, 24214, 24265, 28662, 30223, 30820, 34579, 36781, 873, 874, 4063, 6151, 8699, 9143, 9684, 10175, 12279, 12974, 13563, 13564, 14868, 14917, 15678, 16704, 16705, 20358, 22715, 24112, 24314, 25729, 25929, 26966, 29105, 33458, 34082, 34411, 34496, 34547, 34566, 35762, 36971, 37154, 37155, 878, 884, 3264, 3305, 3359, 4004, 4005, 6097, 6249, 6549, 8747, 8927, 11793, 12201, 12897, 24166, 26945, 31359, 32023, 32024, 34576, 35671, 13561, 13563, 13559, 40063}; + + /** + * Represents the animation to use. + */ + private static final Animation ANIMATION = new Animation(832); + + // Unfilled waterskin objects + private static final int[] WATERSKINS = new int[]{1831, 1829, 1827, 1825}; + + private static final int FILLED_WATERSKIN = 1823; + + // Waterskin fill diag + private static final String WATERSKIN_TEXT = "You fill the waterskin."; + + /** + * Constructs a new {@code FillBucketPlugin} {@code Object}. + */ + public WaterSkinHandler() { + super(WATERSKINS); + } + + @Override + public Plugin newInstance(Object arg) throws Throwable { + for (int i : OBJECTS) { + addHandler(i, OBJECT_TYPE, this); + } + return this; + } + + @Override + public boolean handle(NodeUsageEvent event) { + Player player = event.getPlayer(); + player.getPulseManager().run(new Pulse(2, player) { + @Override + public boolean pulse() { + int curSkin = -1; + for (int i = 0; i < WATERSKINS.length; i++) { + if (player.getInventory().contains(WATERSKINS[i], 1)) { + curSkin = WATERSKINS[i]; + break; + } + } + if (curSkin == -1) { + return true; + } + if (player.getInventory().remove(new Item(curSkin))) { + player.animate(ANIMATION); + player.getPacketDispatch().sendMessage(WATERSKIN_TEXT); + player.getInventory().add(new Item(FILLED_WATERSKIN)); + } + return false; + } + + @Override + public void stop() { + super.stop(); + } + }); + return true; + } } \ No newline at end of file diff --git a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java index 4d1f9377f..d981b72c2 100644 --- a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java +++ b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java @@ -25,7 +25,7 @@ public final class WaterSourcePlugin extends UseWithHandler { /** * Represents the objects to use the buckets on. */ - private static final int[] OBJECTS = new int[] { 16302, 6827, 11661, 24160, 34577, 15936, 15937, 15938, 23920, 35469, 24265, 153, 879, 880, 2864, 6232, 10436, 10437, 10827, 11007, 11759, 21764, 22973, 24161, 24214, 24265, 28662, 30223, 30820, 34579, 36781, 873, 874, 4063, 6151, 8699, 9143, 9684, 10175, 12279, 12974, 13563, 13564, 14868, 14917, 15678, 16704, 16705, 20358, 22715, 24112, 24314, 25729, 25929, 26966, 29105, 33458, 34082, 34411, 34496, 34547, 34566, 35762, 36971, 37154, 37155, 878, 884, 3264, 3305, 3359, 4004, 4005, 6097, 6249, 6549, 8747, 8927, 11793, 12201, 12897, 24166, 26945, 31359, 32023, 32024, 34576, 35671, 13561, 13563, 13559 }; + private static final int[] OBJECTS = new int[] { 16302, 6827, 11661, 24160, 34577, 15936, 15937, 15938, 23920, 35469, 24265, 153, 879, 880, 2864, 6232, 10436, 10437, 10827, 11007, 11759, 21764, 22973, 24161, 24214, 24265, 28662, 30223, 30820, 34579, 36781, 873, 874, 4063, 6151, 8699, 9143, 9684, 10175, 12279, 12974, 13563, 13564, 14868, 14917, 15678, 16704, 16705, 20358, 22715, 24112, 24314, 25729, 25929, 26966, 29105, 33458, 34082, 34411, 34496, 34547, 34566, 35762, 36971, 37154, 37155, 878, 884, 3264, 3305, 3359, 4004, 4005, 6097, 6249, 6549, 8747, 8927, 11793, 12201, 12897, 24166, 26945, 31359, 32023, 32024, 34576, 35671, 40063, 13561, 13563, 13559 }; /** * Represents the animation to use. From 7f0b45241b55f0cab55a31f299d85578735f1fb6 Mon Sep 17 00:00:00 2001 From: ceikry Date: Wed, 7 Jul 2021 17:32:48 -0500 Subject: [PATCH 3/9] Packet writeouts are now queued excluding dynamic packets --- .../java/core/net/packet/OutgoingPacket.java | 4 +- .../core/net/packet/PacketRepository.java | 8 ++-- .../content/global/action/EquipHandler.kt | 7 +-- .../rs09/net/packet/PacketWriteQueue.kt | 46 +++++++++++++++++++ .../kotlin/rs09/worker/MajorUpdateWorker.kt | 2 + 5 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 Server/src/main/kotlin/rs09/net/packet/PacketWriteQueue.kt diff --git a/Server/src/main/java/core/net/packet/OutgoingPacket.java b/Server/src/main/java/core/net/packet/OutgoingPacket.java index 8fee2ba95..0c33f8cd9 100644 --- a/Server/src/main/java/core/net/packet/OutgoingPacket.java +++ b/Server/src/main/java/core/net/packet/OutgoingPacket.java @@ -5,12 +5,12 @@ package core.net.packet; * @author Emperor * @param The context type. */ -public interface OutgoingPacket { +public interface OutgoingPacket { /** * Sends the packet. * @param context The context. */ - public void send(T context); + public void send(Context context); } \ No newline at end of file diff --git a/Server/src/main/java/core/net/packet/PacketRepository.java b/Server/src/main/java/core/net/packet/PacketRepository.java index d3b3e83c1..8d4433642 100644 --- a/Server/src/main/java/core/net/packet/PacketRepository.java +++ b/Server/src/main/java/core/net/packet/PacketRepository.java @@ -4,6 +4,7 @@ import core.net.packet.in.*; import core.net.packet.out.GrandExchangePacket; import core.net.packet.out.*; import rs09.game.system.SystemLogger; +import rs09.net.packet.PacketWriteQueue; import rs09.net.packet.in.ItemOnGroundItemPacket; import rs09.net.packet.in.QuickChatPacketHandler; @@ -19,7 +20,7 @@ public final class PacketRepository { /** * The outgoing packets mapping. */ - private final static Map, OutgoingPacket> OUTGOING_PACKETS = new HashMap<>(); + public final static Map, OutgoingPacket> OUTGOING_PACKETS = new HashMap<>(); /** * The incoming packets mapping. @@ -189,8 +190,9 @@ public final class PacketRepository { SystemLogger.logErr("Invalid outgoing packet [handler=" + clazz + ", context=" + context + "]."); return; } - if(!context.getPlayer().isArtificial()) - p.send(context); + if(!context.getPlayer().isArtificial()) { + PacketWriteQueue.handle(p, context); + } } /** diff --git a/Server/src/main/kotlin/rs09/game/content/global/action/EquipHandler.kt b/Server/src/main/kotlin/rs09/game/content/global/action/EquipHandler.kt index 30f389b6f..99d125d8a 100644 --- a/Server/src/main/kotlin/rs09/game/content/global/action/EquipHandler.kt +++ b/Server/src/main/kotlin/rs09/game/content/global/action/EquipHandler.kt @@ -25,12 +25,7 @@ class EquipHandler : InteractionListener() { override fun defineListeners() { on(ITEM,"equip","wield","wear"){player,node -> - GameWorld.Pulser.submit(object : Pulse(){ - override fun pulse(): Boolean { - handleEquip(player,node) - return true - } - }) + handleEquip(player,node) return@on true } diff --git a/Server/src/main/kotlin/rs09/net/packet/PacketWriteQueue.kt b/Server/src/main/kotlin/rs09/net/packet/PacketWriteQueue.kt new file mode 100644 index 000000000..8e295f332 --- /dev/null +++ b/Server/src/main/kotlin/rs09/net/packet/PacketWriteQueue.kt @@ -0,0 +1,46 @@ +package rs09.net.packet + +import core.net.packet.OutgoingPacket +import core.net.packet.out.* +import rs09.game.system.SystemLogger +import java.util.* + +object PacketWriteQueue { + private val PacketsToWrite: Queue> = LinkedList>() + + @JvmStatic + fun handle(packet: OutgoingPacket, context: T){ + when(packet){ + is UpdateSceneGraph, + is BuildDynamicScene, + is InstancedLocationUpdate -> packet.send(context) + else -> queue(packet,context) + } + } + + @JvmStatic + fun queue(packet: OutgoingPacket, context: T){ + PacketsToWrite.add(QueuedPacket(packet,context)) + } + + @JvmStatic + fun flush(){ + while(!PacketsToWrite.isEmpty()){ + val p = PacketsToWrite.poll() + write(p.out,p.context) + } + } + + @Suppress("UNCHECKED_CAST") + fun write(out: OutgoingPacket<*>, context: T){ + val pack = out as? OutgoingPacket + val ctx = context as? T + if(pack == null || ctx == null){ + SystemLogger.logWarn("Failed packet casting") + return + } + pack.send(ctx) + } +} + +class QueuedPacket(val out: OutgoingPacket, val context: T) \ No newline at end of file diff --git a/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt b/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt index 79cf109fb..56a18ee0d 100644 --- a/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt +++ b/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt @@ -13,6 +13,7 @@ import rs09.ServerConstants import rs09.game.world.GameWorld import rs09.game.world.repository.Repository import rs09.game.world.update.UpdateSequence +import rs09.net.packet.PacketWriteQueue import rs09.tools.stringtools.colorize import java.text.SimpleDateFormat import java.util.* @@ -48,6 +49,7 @@ class MajorUpdateWorker { sequence.start() sequence.run() sequence.end() + PacketWriteQueue.flush() //increment global ticks variable GameWorld.pulse() //disconnect all players waiting to be disconnected From cec3f4938dc649fc422cbc6d7a61aba86fe9cfc6 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Wed, 7 Jul 2021 22:38:15 +0000 Subject: [PATCH 4/9] Another potential fix for construction --- .../skill/construction/HouseManager.java | 6 +++++ .../main/java/core/game/world/map/Region.java | 27 ++++++++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Server/src/main/java/core/game/node/entity/skill/construction/HouseManager.java b/Server/src/main/java/core/game/node/entity/skill/construction/HouseManager.java index ed39f3893..0584a6559 100644 --- a/Server/src/main/java/core/game/node/entity/skill/construction/HouseManager.java +++ b/Server/src/main/java/core/game/node/entity/skill/construction/HouseManager.java @@ -267,10 +267,16 @@ public final class HouseManager { int diffX = player.getLocation().getX() - r.getBaseLocation().getX(); int diffY = player.getLocation().getY() - r.getBaseLocation().getY(); int diffZ = player.getLocation().getZ() - r.getBaseLocation().getZ(); + DynamicRegion dr = region; + DynamicRegion dd = dungeon; + RegionManager.getRegionCache().remove(dr); + RegionManager.getRegionCache().remove(dd); region = null; dungeon = null; enter(player, buildingMode, false); player.getProperties().setTeleportLocation((player.getViewport().getRegion() == dungeon ? dungeon : region).getBaseLocation().transform(diffX, diffY, diffZ)); + dr.flagInactive(); + dd.flagInactive(); } /** diff --git a/Server/src/main/java/core/game/world/map/Region.java b/Server/src/main/java/core/game/world/map/Region.java index 44a244124..12313de4f 100644 --- a/Server/src/main/java/core/game/world/map/Region.java +++ b/Server/src/main/java/core/game/world/map/Region.java @@ -299,22 +299,31 @@ public class Region { } } + /** + * Unloads a region - compatibility method for older uses + */ + private static void unload(Region r){ + unload(r, false); + } + /** * Unloads a region. * @param r The region. */ - private static void unload(Region r) { - if (r.isViewed()) { - SystemLogger.logErr("Players viewing region!"); - r.flagActive(); - return; - } - for (RegionPlane p : r.planes) { - if (!p.getPlayers().isEmpty()) { - SystemLogger.logErr("Players still in region!"); + private static void unload(Region r, boolean force) { + if(!force){ + if (r.isViewed()) { + SystemLogger.logErr("Players viewing region!"); r.flagActive(); return; } + for (RegionPlane p : r.planes) { + if (!p.getPlayers().isEmpty()) { + SystemLogger.logErr("Players still in region!"); + r.flagActive(); + return; + } + } } for (RegionPlane p : r.planes) { p.clear(); From b43c33f9198ec9fa876bfe98ccba11a1e3152ca3 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 8 Jul 2021 08:51:30 -0500 Subject: [PATCH 5/9] Fixed the Sophanem emote clue's text. --- .../src/main/java/core/game/content/ttrail/EmoteCluePlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java b/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java index e5241daaa..b66f6326e 100644 --- a/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java +++ b/Server/src/main/java/core/game/content/ttrail/EmoteCluePlugin.java @@ -92,7 +92,7 @@ public final class EmoteCluePlugin extends EmoteClueScroll { register(new EmoteCluePlugin("lumb-shack-dance", 2698, ClueLevel.EASY, emote, new int[][] { { 1205 }, { 1153 }, { 1635 } }, "Dance in
the shack in Lumbridge Swamp.
Equip a bronze
dagger, iron full helmet
and a gold ring.", new ZoneBorders(3202, 3167, 3205, 3170))); register(new EmoteCluePlugin("lumb-cave-dance", 2699, ClueLevel.MEDIUM, emote, Emotes.BLOW_KISS, new int[][] { { 1381 }, { 1155 }, { 1731 } }, "Dance in the dark
cave beneath
Lumbridge Swamp.
Blow a kiss before
you talk to me.
Equip an air staff,
bronze full helm and
an amulet of power.", new ZoneBorders(3139, 9534, 3260, 9587))); register(new EmoteCluePlugin("shantay-guild-jig", 2700, ClueLevel.MEDIUM, Emotes.JIG, Emotes.BOW, new int[][] { { 3343 }, { 1381 }, { 1173 } }, "Dance a jig under
Shantay's Awning.
Bow before you talk to
me.
Equip a pointed blue
snail helmet, an air
staff and a bronze
square shield.", new ZoneBorders(3302, 3122, 3305, 3125))); - register(new EmoteCluePlugin("cat-entrance-dance", 2701, ClueLevel.HARD, emote, new int[][] { { 2570 }, { 1704 }, { 1317 } }, "Dance at the
cat doored pyramid in
Sophanem. Beware of double agents!
Equip a ring of life,
an uncharged amulet
of glory and an adamant two handed
sword.", new ZoneBorders(3293, 2781, 3296, 2782))); + register(new EmoteCluePlugin("cat-entrance-dance", 2701, ClueLevel.HARD, emote, new int[][] { { 2570 }, { 1704 }, { 1317 } }, "Dance at the
cat doored pyramid in
Sophanem. Beware of double agents!
Equip a ring of life
an uncharged amulet of glory
and an adamant two handed sword.", new ZoneBorders(3293, 2781, 3296, 2782))); emote = Emotes.HEADBANG; register(new EmoteCluePlugin("al-kharid-headbang", 2702, ClueLevel.EASY, emote, new int[][] { { 1833 }, { 1059 }, { 1061 } }, "Headbang in the mine north of Al
Kharid.
Equip a desert shirt, leather gloves and
leather boots.", new ZoneBorders(3297, 3286, 3301, 3316))); //Removed Vexia code that bricked emotes for certain clues. From 0c80ae4c1a6d70070c8d4b6e1e8b96541b99ce2f Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 8 Jul 2021 09:47:53 -0500 Subject: [PATCH 6/9] Made the turn-in for ned's diary (medium lummy) non-cumulative because people are getting confused --- .../rs09/game/content/quest/free/dragonslayer/NedDialogue.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/content/quest/free/dragonslayer/NedDialogue.kt b/Server/src/main/kotlin/rs09/game/content/quest/free/dragonslayer/NedDialogue.kt index 0d621d745..1c4ff72aa 100644 --- a/Server/src/main/kotlin/rs09/game/content/quest/free/dragonslayer/NedDialogue.kt +++ b/Server/src/main/kotlin/rs09/game/content/quest/free/dragonslayer/NedDialogue.kt @@ -222,7 +222,7 @@ class NedDialogue(player: Player? = null) : DialoguePlugin(player) { if (diary == null) { diary = player.achievementDiaryManager.getDiary(DiaryType.LUMBRIDGE) } - if (diary!!.isComplete(level, true) && !diary!!.isLevelRewarded(level)) { + if (diary!!.isComplete(level, false) && !diary!!.isLevelRewarded(level)) { player("I've done all the hard tasks in my Lumbridge", "Achievement Diary.") stage = 950 } From 44df14261674718fa6d629dac93c3ff4ea9ea1e0 Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Thu, 8 Jul 2021 17:53:02 +0000 Subject: [PATCH 7/9] Updated Sea Snake Drop Tables (Authentic) --- Server/data/configs/drop_tables.json | 774 +++++++-------------------- 1 file changed, 192 insertions(+), 582 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index c89e67418..abed621ee 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -40726,19 +40726,19 @@ "main": [ { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5100", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", + "weight": "25.0", "id": "5311", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5323", "maxAmount": "1" }, @@ -40750,19 +40750,19 @@ }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5105", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5104", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5281", "maxAmount": "1" }, @@ -40774,25 +40774,25 @@ }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5291", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", + "weight": "25.0", "id": "5292", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5293", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5294", "maxAmount": "1" }, @@ -40804,19 +40804,19 @@ }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "12176", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5296", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5297", "maxAmount": "1" }, @@ -40828,7 +40828,7 @@ }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5299", "maxAmount": "1" }, @@ -40888,49 +40888,49 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "207", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "209", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "211", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "213", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "215", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "2485", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "217", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", + "weight": "25.0", "id": "4695", "maxAmount": "1" }, @@ -40941,32 +40941,20 @@ "maxAmount": "15" }, { - "minAmount": "1", - "weight": "5.0", - "id": "1452", - "maxAmount": "3" - }, - { - "minAmount": "24", - "weight": "50.0", + "minAmount": "22", + "weight": "100.0", "id": "995", - "maxAmount": "24" - }, - { - "minAmount": "32", - "weight": "50.0", - "id": "995", - "maxAmount": "32" + "maxAmount": "44" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "405", "maxAmount": "1" }, { "minAmount": "50", - "weight": "5.0", + "weight": "50.0", "id": "313", "maxAmount": "50" }, @@ -40977,16 +40965,16 @@ "maxAmount": "1" }, { - "minAmount": "5", + "minAmount": "4", "weight": "25.0", "id": "402", "maxAmount": "5" }, { - "minAmount": "5", + "minAmount": "1", "weight": "25.0", "id": "404", - "maxAmount": "5" + "maxAmount": "1" }, { "minAmount": "1", @@ -41001,23 +40989,17 @@ "maxAmount": "2" }, { - "minAmount": "2", - "weight": "50.0", + "minAmount": "1", + "weight": "8.0", "id": "411", "maxAmount": "2" }, { "minAmount": "2", - "weight": "25.0", + "weight": "50.0", "id": "823", "maxAmount": "2" }, - { - "minAmount": "1", - "weight": "50.0", - "id": "46", - "maxAmount": "1" - }, { "minAmount": "3", "weight": "50.0", @@ -41025,21 +41007,27 @@ "maxAmount": "3" }, { - "minAmount": "14", + "minAmount": "4", "weight": "25.0", "id": "4160", - "maxAmount": "14" + "maxAmount": "5" }, { "minAmount": "1", "weight": "5.0", - "id": "413", + "id": "5733", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "2853", + "weight": "100.0", + "id": "0", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "31", "maxAmount": "1" } ] @@ -41057,186 +41045,24 @@ "ids": "3940", "description": "", "main": [ - { - "minAmount": "1", - "weight": "25.0", - "id": "5301", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5100", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5105", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5104", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5299", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5311", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5294", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5295", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5323", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5300", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5296", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "12176", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5103", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "5304", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "995", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "405", - "maxAmount": "1" - }, - { - "minAmount": "2", - "weight": "50.0", - "id": "363", - "maxAmount": "2" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "377", - "maxAmount": "1" - }, { "minAmount": "4", "weight": "25.0", - "id": "401", - "maxAmount": "4" - }, - { - "minAmount": "5", - "weight": "25.0", - "id": "401", - "maxAmount": "5" - }, - { - "minAmount": "4", - "weight": "25.0", - "id": "4160", - "maxAmount": "4" - }, - { - "minAmount": "5", - "weight": "25.0", - "id": "4160", + "id": "4150", "maxAmount": "5" }, { "minAmount": "2", - "weight": "5.0", + "weight": "50.0", "id": "823", "maxAmount": "2" }, - { - "minAmount": "15", - "weight": "25.0", - "id": "403", - "maxAmount": "15" - }, - { - "minAmount": "50", - "weight": "25.0", - "id": "313", - "maxAmount": "50" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "4695", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "411", - "maxAmount": "1" - }, - { - "minAmount": "2", - "weight": "25.0", - "id": "411", - "maxAmount": "2" - }, { "minAmount": "3", - "weight": "25.0", + "weight": "50.0", "id": "46", "maxAmount": "3" }, - { - "minAmount": "1", - "weight": "25.0", - "id": "571", - "maxAmount": "1" - }, { "minAmount": "15", "weight": "25.0", @@ -41246,392 +41072,164 @@ { "minAmount": "1", "weight": "25.0", - "id": "199", + "id": "4695", + "maxAmount": "1" + }, + { + "minAmount": "2", + "weight": "25.0", + "id": "363", + "maxAmount": "2" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "377", "maxAmount": "1" }, { "minAmount": "1", "weight": "25.0", - "id": "2747", - "maxAmount": "1" - }, - { - "minAmount": "250", - "weight": "50.0", - "id": "995", - "maxAmount": "250" - }, - { - "minAmount": "3000", - "weight": "50.0", - "id": "995", - "maxAmount": "3000" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "1623", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "1621", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "1619", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1617", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "987", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "985", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1631", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1615", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1215", + "id": "403", "maxAmount": "1" }, { "minAmount": "5", - "weight": "5.0", - "id": "830", + "weight": "25.0", + "id": "401", "maxAmount": "5" }, - { - "minAmount": "20", - "weight": "5.0", - "id": "829", - "maxAmount": "20" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1319", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1247", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1249", - "maxAmount": "1" - }, { "minAmount": "50", - "weight": "5.0", - "id": "1216", + "weight": "50.0", + "id": "313", "maxAmount": "50" }, { "minAmount": "1", - "weight": "5.0", - "id": "1185", + "weight": "25.0", + "id": "571", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "1201", + "weight": "8.0", + "id": "411", + "maxAmount": "2" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "405", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "2366", + "weight": "8.0", + "id": "5301", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "1149", - "maxAmount": "1" - }, - { - "minAmount": "200", - "weight": "25.0", - "id": "9143", - "maxAmount": "200" - }, - { - "minAmount": "150", - "weight": "5.0", - "id": "9342", - "maxAmount": "150" - }, - { - "minAmount": "150", - "weight": "5.0", - "id": "892", - "maxAmount": "200" - }, - { - "minAmount": "500", - "weight": "5.0", - "id": "892", - "maxAmount": "500" - }, - { - "minAmount": "200", - "weight": "5.0", - "id": "1392", - "maxAmount": "200" - }, - { - "minAmount": "1000", - "weight": "5.0", - "id": "574", - "maxAmount": "1000" - }, - { - "minAmount": "1000", - "weight": "5.0", - "id": "570", - "maxAmount": "1000" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1444", - "maxAmount": "1" - }, - { - "minAmount": "25", - "weight": "25.0", - "id": "1441", - "maxAmount": "35" - }, - { - "minAmount": "25", - "weight": "25.0", - "id": "1443", - "maxAmount": "35" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1452", + "weight": "8.0", + "id": "5100", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", - "id": "1462", + "weight": "8.0", + "id": "5105", "maxAmount": "1" }, - { - "minAmount": "500", - "weight": "25.0", - "id": "7937", - "maxAmount": "15000" - }, - { - "minAmount": "47", - "weight": "5.0", - "id": "561", - "maxAmount": "77" - }, - { - "minAmount": "20", - "weight": "5.0", - "id": "566", - "maxAmount": "20" - }, - { - "minAmount": "45", - "weight": "5.0", - "id": "563", - "maxAmount": "45" - }, - { - "minAmount": "50", - "weight": "5.0", - "id": "560", - "maxAmount": "50" - }, - { - "minAmount": "121", - "weight": "5.0", - "id": "560", - "maxAmount": "121" - }, - { - "minAmount": "50", - "weight": "5.0", - "id": "565", - "maxAmount": "50" - }, - { - "minAmount": "125", - "weight": "25.0", - "id": "372", - "maxAmount": "250" - }, - { - "minAmount": "1000", - "weight": "25.0", - "id": "372", - "maxAmount": "1000" - }, - { - "minAmount": "250", - "weight": "25.0", - "id": "384", - "maxAmount": "500" - }, - { - "minAmount": "150", - "weight": "25.0", - "id": "533", - "maxAmount": "500" - }, - { - "minAmount": "150", - "weight": "25.0", - "id": "454", - "maxAmount": "7500" - }, - { - "minAmount": "150", - "weight": "25.0", - "id": "450", - "maxAmount": "800" - }, - { - "minAmount": "100", - "weight": "5.0", - "id": "443", - "maxAmount": "100" - }, - { - "minAmount": "100", - "weight": "5.0", - "id": "452", - "maxAmount": "100" - }, - { - "minAmount": "1000", - "weight": "5.0", - "id": "2362", - "maxAmount": "7000" - }, { "minAmount": "1", - "weight": "5.0", - "id": "2364", + "weight": "8.0", + "id": "5104", "maxAmount": "1" }, { - "minAmount": "50", - "weight": "5.0", - "id": "2364", - "maxAmount": "50" - }, - { - "minAmount": "33", - "weight": "25.0", - "id": "258", - "maxAmount": "33" - }, - { - "minAmount": "25", - "weight": "25.0", - "id": "2999", - "maxAmount": "250" - }, - { - "minAmount": "30", - "weight": "25.0", - "id": "3001", - "maxAmount": "120" - }, - { - "minAmount": "10", - "weight": "25.0", - "id": "270", - "maxAmount": "100" - }, - { - "minAmount": "250", - "weight": "5.0", - "id": "6686", - "maxAmount": "250" - }, - { - "minAmount": "3", - "weight": "25.0", - "id": "5321", - "maxAmount": "3" + "minAmount": "1", + "weight": "8.0", + "id": "5299", + "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "5315", - "maxAmount": "50" + "weight": "8.0", + "id": "5311", + "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "5316", - "maxAmount": "6" - }, - { - "minAmount": "10", - "weight": "5.0", - "id": "5289", - "maxAmount": "10" + "weight": "8.0", + "id": "5294", + "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", + "id": "5295", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "5323", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", "id": "5300", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", - "id": "5304", - "maxAmount": "31" + "weight": "8.0", + "id": "5296", + "maxAmount": "1" }, { - "minAmount": "100", - "weight": "5.0", - "id": "1516", - "maxAmount": "20000" + "minAmount": "1", + "weight": "8.0", + "id": "12176", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "5103", + "maxAmount": "1" + }, + { + "minAmount": "21", + "weight": "50.0", + "id": "995", + "maxAmount": "21" + }, + { + "minAmount": "1", + "weight": "4.0", + "id": "5733", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "100.0", + "id": "0", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "4.0", + "id": "31", + "maxAmount": "1" + }, + { + "minAmount": "44", + "weight": "50.0", + "id": "995", + "maxAmount": "44" } ] }, @@ -41656,13 +41254,13 @@ "main": [ { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5321", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5106", "maxAmount": "1" }, @@ -41686,103 +41284,97 @@ }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5294", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5296", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5295", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5297", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5298", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5299", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5300", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5301", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5302", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "5303", "maxAmount": "1" }, { "minAmount": "1", - "weight": "5.0", + "weight": "8.0", "id": "5304", "maxAmount": "1" }, { - "minAmount": "23", - "weight": "25.0", + "minAmount": "22", + "weight": "100.0", "id": "995", - "maxAmount": "23" - }, - { - "minAmount": "32", - "weight": "25.0", - "id": "995", - "maxAmount": "32" + "maxAmount": "44" }, { "minAmount": "1", - "weight": "25.0", - "id": "2809", + "weight": "5.0", + "id": "5733", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "5.0", "id": "10976", "maxAmount": "1" }, { "minAmount": "2", - "weight": "25.0", + "weight": "50.0", "id": "823", "maxAmount": "2" }, { "minAmount": "3", - "weight": "25.0", + "weight": "50.0", "id": "46", "maxAmount": "3" }, @@ -41790,7 +41382,7 @@ "minAmount": "4", "weight": "25.0", "id": "4160", - "maxAmount": "4" + "maxAmount": "5" }, { "minAmount": "1", @@ -41812,7 +41404,7 @@ }, { "minAmount": "50", - "weight": "25.0", + "weight": "50.0", "id": "313", "maxAmount": "50" }, @@ -41824,15 +41416,33 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "25.0", "id": "377", "maxAmount": "1" }, { "minAmount": "1", - "weight": "25.0", + "weight": "8.0", "id": "405", "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "31", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "100.0", + "id": "0", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "411", + "maxAmount": "2" } ] }, From 84574863c14e9e46aba7e69b5d1f2701df4c1820 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 8 Jul 2021 14:51:16 -0500 Subject: [PATCH 8/9] Made mine accessible, populated with the appropriate NPCs. --- Server/data/configs/npc_spawns.json | 19 +++++++++++++++++-- .../content/global/action/SpecialLadders.java | 6 ++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Server/data/configs/npc_spawns.json b/Server/data/configs/npc_spawns.json index 71007e5e0..1263d9e6f 100644 --- a/Server/data/configs/npc_spawns.json +++ b/Server/data/configs/npc_spawns.json @@ -10646,6 +10646,21 @@ { "npc_id": "2352", "loc_data": "{2334,3183,0,1,0}" + }, + { + "npc_id": "5497", + "loc_data": "{2376,10198,0,1,0}-{2384,10202,0,1,0}-{2390,10207,0,1,0}-{2385,10193,0,1,0}-{2419,10192,0,1,0}-{2412,10200,0,1,0}" + }, + { + "npc_id": "5474", + "loc_data": "{2390,10216,0,1,0}-{2417,10228,0,1,0}-{2385,10227,0,1,0}" + }, + { + "npc_id": "5475", + "loc_data": "{2396,10232,0,1,0}-{2402,10225,0,1,0}-{2420,10221,0,1,0}" + }, + { + "npc_id": "5473", + "loc_data": "{2377,10212,0,1,0}-{2392,10226,0,1,0}-{2407,10228,0,1,0}-{2406,10214,0,1,0}-{2420,10214,0,1,0}" } -] - +] \ No newline at end of file diff --git a/Server/src/main/java/core/game/content/global/action/SpecialLadders.java b/Server/src/main/java/core/game/content/global/action/SpecialLadders.java index 9f49974ba..9db629ae8 100644 --- a/Server/src/main/java/core/game/content/global/action/SpecialLadders.java +++ b/Server/src/main/java/core/game/content/global/action/SpecialLadders.java @@ -19,6 +19,8 @@ public enum SpecialLadders implements LadderAchievementCheck { FOG_ENTER(Location.create(3240,3575,0),Location.create(1675,5599,0)), FOG_LEAVE(Location.create(1673,5598,0),Location.create(3242, 3574, 0)), INTRO_LEAVE(Location.create(2522, 4999, 0),Location.create(3230, 3240, 0)), + JATIZSO_MINE_UP(Location.create(2406,10188,0),Location.create(2397, 3811, 0)), + JATIZSO_MINE_DOWN(Location.create(2397, 3812, 0), Location.create(2405, 10188, 0)), DRAYNOR_SEWER_SOUTHEAST_DOWN(new Location(3118, 3244, 0), new Location(3118, 9643, 0)), DRAYNOR_SEWER_SOUTHEAST_UP(new Location(3118, 9643, 0), new Location(3118, 3243, 0)), @@ -62,6 +64,10 @@ public enum SpecialLadders implements LadderAchievementCheck { this.destLoc = destLoc; } + public static void add(Location from, Location to){ + destinationMap.put(from,to); + } + public static Location getDestination(Location loc){ return destinationMap.get(loc); } From 4f2df9c7212f7317535f92fe78ff04ab3010ab36 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 8 Jul 2021 15:01:48 -0500 Subject: [PATCH 9/9] Added music triggers --- Server/data/configs/music_configs.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Server/data/configs/music_configs.json b/Server/data/configs/music_configs.json index 04ca52e75..91060a7b3 100644 --- a/Server/data/configs/music_configs.json +++ b/Server/data/configs/music_configs.json @@ -2254,5 +2254,17 @@ "name": "Too Many Cooks...", "indexId": "398", "borders": "{2944,9856,3007,9919}" + }, + { + "id": "222", + "name": "Major Miner", + "indexId": "437", + "borders": "{2403,10186,2409,10192}" + }, + { + "id": "223", + "name": "Norse Code", + "indexId": "439", + "borders": "{2404,3797,2421,3820}" } ]