From 7514826803f1bea712e0d67f1c3ea93563a40ba7 Mon Sep 17 00:00:00 2001 From: Olivier <75835176+JohnsonMichaels123@users.noreply.github.com> Date: Mon, 18 Apr 2022 19:40:19 -0700 Subject: [PATCH] Merge pull request #527 * Various Fixes * Sea Turtle can be cooked, fixed xp received when cooking Manta Ray * Al kharid warrior has correct emote when fighting * Drop tables only roll once for items that do not have 100% drop rate (Prevents multiple items from rolling and dropping on same npc) * Nerfed Tree Spirit (Lost City) max hit (From 20 to 10) * Nerfed Abyssal Demon max hit (From 16 to 8) --- 2006Scape Server/data/cfg/spawns.json | 18 +++++++++--------- .../game/content/combat/npcs/NpcEmotes.java | 1 + .../game/content/skills/cooking/Cooking.java | 5 +++-- .../java/com/rs2/game/npcs/NpcHandler.java | 6 +++++- .../com/rs2/net/packets/impl/ClickObject.java | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/2006Scape Server/data/cfg/spawns.json b/2006Scape Server/data/cfg/spawns.json index 1194b20a..445eba71 100644 --- a/2006Scape Server/data/cfg/spawns.json +++ b/2006Scape Server/data/cfg/spawns.json @@ -10970,7 +10970,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3425, @@ -10980,7 +10980,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3428, @@ -10990,7 +10990,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3425, @@ -11000,7 +11000,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3423, @@ -11010,7 +11010,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3427, @@ -11020,7 +11020,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3416, @@ -11030,7 +11030,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3413, @@ -11040,7 +11040,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3410, @@ -11050,7 +11050,7 @@ "height": 2 }, { - "maxHit": 16, + "maxHit": 8, "strength": 150, "attack": 250, "x": 3413, diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/combat/npcs/NpcEmotes.java b/2006Scape Server/src/main/java/com/rs2/game/content/combat/npcs/NpcEmotes.java index ce16ad46..baf346c4 100644 --- a/2006Scape Server/src/main/java/com/rs2/game/content/combat/npcs/NpcEmotes.java +++ b/2006Scape Server/src/main/java/com/rs2/game/content/combat/npcs/NpcEmotes.java @@ -11,6 +11,7 @@ import com.rs2.game.players.Player; public enum NpcEmotes { MAN(new int[] {1, 2, 3, 4, 5, 6}, 422, 1834, 836), + AL_KHARID_WARRIOR(new int[] {18}, 451, 404, 836), GUARD(new int[] {9, 10}, 412, 404, 836), GARGOYLE(new int[] {1610, 1611}, 1517, 1519, 1518), SKELETAL_WYVERN(new int[] {3068}, 2989, 2988, 2987), diff --git a/2006Scape Server/src/main/java/com/rs2/game/content/skills/cooking/Cooking.java b/2006Scape Server/src/main/java/com/rs2/game/content/skills/cooking/Cooking.java index 3d80a5c5..2fbb0572 100644 --- a/2006Scape Server/src/main/java/com/rs2/game/content/skills/cooking/Cooking.java +++ b/2006Scape Server/src/main/java/com/rs2/game/content/skills/cooking/Cooking.java @@ -38,8 +38,9 @@ public class Cooking extends SkillHandler { LOBSTER(377, 379, 381, 40, 120, 74, 68, "lobster"), SWORDFISH(371, 373, 375, 50, 140, 86, 81, "swordfish"), MONKFISH(7944, 7946, 7948, 62, 150, 92, 90, "monkfish"), - SHARK(383, 385, 387, 76, 210, 100, 94, "shark"), - MANTA_RAY(389, 391, 393, 91, 169, 100, 100, "manta ray"), + SHARK(383, 385, 387, 76, 210, 100, 94, "shark"), + SEA_TURTLE(395, 397, 399, 82, 211, 100, 100, "sea turtle"), + MANTA_RAY(389, 391, 393, 91, 216, 100, 100, "manta ray"), SEAWEED(401, 1781, 1781, 1, 1, 1, 1, "sea weed"), CURRY(2009, 2011, 2013, 60, 280, 74, 74, "curry"); diff --git a/2006Scape Server/src/main/java/com/rs2/game/npcs/NpcHandler.java b/2006Scape Server/src/main/java/com/rs2/game/npcs/NpcHandler.java index 1291a4e6..a790347f 100644 --- a/2006Scape Server/src/main/java/com/rs2/game/npcs/NpcHandler.java +++ b/2006Scape Server/src/main/java/com/rs2/game/npcs/NpcHandler.java @@ -1049,10 +1049,14 @@ public class NpcHandler { // These npcs shouldn't have drops return; } + boolean isDropped = false; for (ItemDrop possible_drop : NPCDropsHandler.getNpcDrops(getNpcListName(npcs[i].npcType).toLowerCase().replace(" ", "_"), npcs[i].npcType)) { - if (Misc.random(possible_drop.getChance()) == 0) { + if (Misc.random(possible_drop.getChance()) == 0 && !isDropped) { int amt = possible_drop.getAmount(); GameEngine.itemHandler.createGroundItem(c, possible_drop.getItemID(), npcs[i].absX, npcs[i].absY, amt, c.playerId); + //Making sure items that always drop don't cost us our drop table roll + if (possible_drop.getChance() > 1) + isDropped = true; } } switch (npcs[i].npcType) { diff --git a/2006Scape Server/src/main/java/com/rs2/net/packets/impl/ClickObject.java b/2006Scape Server/src/main/java/com/rs2/net/packets/impl/ClickObject.java index a633f0c5..4217c1fa 100644 --- a/2006Scape Server/src/main/java/com/rs2/net/packets/impl/ClickObject.java +++ b/2006Scape Server/src/main/java/com/rs2/net/packets/impl/ClickObject.java @@ -154,7 +154,7 @@ public class ClickObject implements PacketType { if (player.spiritTree == false && player.clickedTree == false) { player.getPacketSender().sendMessage("You attempt to chop the tree, and a tree spirit appears !"); player.getPacketSender().sendSound(300, 100, 1); - NpcHandler.spawnNpc(player, 655, player.getX(), player.getY(), 0, 0, 225, 20, 80, 80, true, true); + NpcHandler.spawnNpc(player, 655, player.getX(), player.getY(), 0, 0, 85, 10, 80, 80, true, true); player.clickedTree = true; } else if (player.spiritTree && player.lostCity >= 2) { Woodcutting.startWoodcutting(player, player.objectId, player.objectX, player.objectY, player.clickObjectType);