From 31e901ab6d3f961139bb1c5cb78a5fd186105479 Mon Sep 17 00:00:00 2001 From: HarkuLi Date: Fri, 1 Mar 2024 22:56:28 +0800 Subject: [PATCH 1/2] Ariant Coliseum: Fix score counting and trade conversation --- scripts/npc/2101015.js | 10 +++++----- .../server/channel/handlers/UseCatchItemHandler.java | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/npc/2101015.js b/scripts/npc/2101015.js index 70730a82f52..405db97083b 100644 --- a/scripts/npc/2101015.js +++ b/scripts/npc/2101015.js @@ -32,14 +32,14 @@ function action(mode, type, selection) { } else if (status == 1) { if (selection == 0) { apqpoints = cm.getPlayer().getAriantPoints(); - if (apqpoints < 100) { - cm.sendOk("Your Battle Arena score: #b" + apqpoints + "#k points. You need to surpass #b100 points#k so that I can give you the #bPalm Tree Beach Chair#k. Talk to me again when you have enough points."); - cm.dispose(); + if (apqpoints >= 100) { + cm.sendNext("Wow, it looks like you got the #b100#k points ready to trade, let's trade?!"); } else if (apqpoints + arena.getAriantRewardTier(cm.getPlayer()) >= 100) { - cm.sendOk("Your Battle Arena score: #b" + apqpoints + "#k points and you pratically already have that score! Talk to my wife, #p2101016#to get them and then re-chat with me!"); + cm.sendOk("Your Battle Arena score: #b" + apqpoints + "#k points and you pratically already have that score! Talk to my wife, #p2101016# to get them and then re-chat with me!"); cm.dispose(); } else { - cm.sendNext("Wow, it looks like you got the #b100#k points ready to trade, let's trade?!"); + cm.sendOk("Your Battle Arena score: #b" + apqpoints + "#k points. You need to surpass #b100 points#k so that I can give you the #bPalm Tree Beach Chair#k. Talk to me again when you have enough points."); + cm.dispose(); } } else if (selection == 1) { cm.sendOk("The main objective of the Battle Arena is to allow the player to accumulate points so that they can be traded honorably for the highest prize: the #bPalm Tree Beach Chair#k. Collect points during the battles and talk to me when it's time to get the prize. In each battle, the player is given the opportunity to score points based on the amount of jewelry that the player has at the end. But be careful! If your points distance from other players #ris too high#k, this will have been all for nothing and you will earn mere #r1 point#k only."); diff --git a/src/main/java/net/server/channel/handlers/UseCatchItemHandler.java b/src/main/java/net/server/channel/handlers/UseCatchItemHandler.java index 85b724a8263..ead6813e663 100644 --- a/src/main/java/net/server/channel/handlers/UseCatchItemHandler.java +++ b/src/main/java/net/server/channel/handlers/UseCatchItemHandler.java @@ -93,6 +93,7 @@ public final void handlePacket(InPacket p, Client c) { mob.getMap().killMonster(mob, null, false); InventoryManipulator.removeById(c, InventoryType.USE, itemId, 1, true, true); InventoryManipulator.addById(c, ItemId.ARPQ_SPIRIT_JEWEL, (short) 1, "", -1); + chr.updateAriantScore(); } else { chr.getMap().broadcastMessage(PacketCreator.catchMonster(monsterid, itemId, (byte) 0)); } From 3f800c4a68f382e43b1f0329087769c806f6da44 Mon Sep 17 00:00:00 2001 From: HarkuLi Date: Sat, 2 Mar 2024 14:41:23 +0800 Subject: [PATCH 2/2] Ignore .DS_Store files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8543b81417e..27980c65f98 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ # Database database/docker-db-data database/docker-pg-db-data + +# macOS files +.DS_Store