diff --git a/README.md b/README.md
index 9faa7229..d150bdb6 100644
--- a/README.md
+++ b/README.md
@@ -37,42 +37,38 @@ Feedback and suggestions: [Github](https://github.com/Exslims/MercuryTrade/issue
Overseer is essentially "a customizable and nicely looking set of overlay timers": you press a button and it tracks the time since - that's it. It's obviously 100% legit as there is no interaction with the game whatsoever. It's basically a clever trick, but gets the job done.
+Recently Overseer has got a new component: **Capture** - allows you to literally duplicate a part of your screen to display it somewhere else. This feature is especially neat for Vaal Skills for more convenient tracking. Also flasks, charge based abilities, UI counters etc.
+
*Major feature:* **Notification**
-
+
-When you receive a trade related message this notification panel pops up. It contains all the information you need to make a decision. It offers a set of fully customizable "quick response buttons" - such as "Sold" / "No" / "Wait 3m" / etc - as well as buttons to invite, kick and trade with the person who made the offer.
+When you receive a trade related message or scanner message this notification panel pops up. It contains all the information you need to make a decision. It offers a set of fully customizable "quick response buttons" - such as "Sold" / "No" / "Wait 3m" / etc - as well as buttons to invite, kick and trade with the person who made the offer. There are also "?" - "Still Interested?" and a chat-history button.
-
-
-
+**All the buttons are hotkeyable!**
- Multiple notifications
+You can ignore an item: sold an item 5 hours ago yet people are still spamming you with trade offers? We can't filter out this from chat, but we can make MercuryTrade ignore it! Notifications for ignored items won't appear.
-If you've received multiple notifications before dismissing your current one, they will stack up like a deck of cards underneath (or on top) of each other and won't clutter the screen. Notification panels can be set up to fade out after X seconds - a customizable option.
+
+Outgoing trade offers and messages from chat scanner to be diplayed as notifications as well. It has a different panel layout for the essentials such as "Visit Hideout" and "Leave" buttons.
-
+
- "Group" showcase: you received 5 notifications
+ Multiple notifications
+If you've received multiple notifications before dismissing your current one, they will stack up like a deck of cards underneath (or on top) of each other and won't clutter the screen.
The box on the left - "Group" - will appear if "Pre-group limit" is exceeded (this limit is also customizable). All consecutive notifications will be grouped together to save screen space. Toggling this button will expand the whole group.
-
-
-
-
- Notification Panel settings (unlocked mode)
-
-
+
- Response buttons are fully customizable
+ Not only Response buttons are fully customizable, look how many things you can actually tweak to your taste!
@@ -82,21 +78,23 @@ If you've received multiple notifications before dismissing your current one, th
*Minor feature:* **History**
-
+
History
Each notification you receive is stored in a separate file by **MercuryTrade**. History allows you to access that file in a useful way to interact with customers. Comes in handy if you want to reach a person you traded with some time ago or in case your client has crashed - your in-game chat will be lost, but History will not.
+Use "Restore" button to bring back related notification.
+
#
*Major feature:* **Chat scanner**
-
+
-Set up words to look for (or not!) in chat. Extremely useful for when buying something specific from chat.
+Set up words to look for (or not!) in chat. Extremely useful for when buying something specific from chat, looking for Trials, specific challenged and other things you might be interested in. Works in conjunction with the notification panel.
#
@@ -118,22 +116,6 @@ Mercury can highlight the stash location of the item somebody's buying. You will
Item Grid set up.
-
-#
-
- *Minor feature:* **Accessibility status**
-
-
-
-
- Name will change its color accordingly
-
-
-**MercuryTrade** notifications have an **indication for when a person comes in or leaves your hideout** - that way you can offer a trade as soon as possible and keep track of all the people without even closing your stash. Especially useful for SuperTrade mode.
-
-
-Important to mention: in Path of Exile when you use your stash you can't click on party frames, because they're hidden behind the stash window. **MercuryTrade** solves this inconvenience as you can interact with the person through a related notification panel.
-
#
*Minor feature:* **Do not Disturb**
@@ -153,48 +135,3 @@ Activate this mode if you don't want to see (and hear!) anything from the applic
Download and install Java on your computer, then open MercuryTrade.jar. Because the program operates on top of a Path of Exile window as an overlay, **make sure your client is not in fullscreen mode**.
Upon launch you'll be greeted with a short overview of the application (identical to this ReadMe) and patch notes. Afterwards you should see **Task Panel** and **Notification Panel**.
-
-
-
-
-**Task panel**:
-
-
-
-
-
-
-* (1) **Travel to Hideout**.
-
-* (2) **Do Not Disturb** mode button switch.
-
-* (3) **Chat scanner**.
-
-* (4) **History**.
-
-* (5) **Item Grid** set up.
-
-* (6) **Panel unlock**.
-
-* (7) **Scale setting**.
-
-* (8) **Settings**.
-
-* (9) **Exit**.
-
-
-
-**Notification panel** *(unlocked mode)*
-
-
-
-
-
-
-
-After you go through the overview, panels will be in "Unlocked" mode. This will allow you to reposition them to your taste.
-
-
-
-
-
diff --git a/app-core/pom.xml b/app-core/pom.xml
index 93bd7f86..5dc20f6f 100644
--- a/app-core/pom.xml
+++ b/app-core/pom.xml
@@ -19,6 +19,10 @@
app-shared
1.0.0.5
+
+ net.jodah
+ expiringmap
+
com.1stleg
jnativehook
diff --git a/app-core/src/main/java/com/mercury/platform/core/ChatHelper.java b/app-core/src/main/java/com/mercury/platform/core/ChatHelper.java
index 536d627b..c48d80ae 100644
--- a/app-core/src/main/java/com/mercury/platform/core/ChatHelper.java
+++ b/app-core/src/main/java/com/mercury/platform/core/ChatHelper.java
@@ -30,6 +30,8 @@ private void executeMessage(String message) {
StringSelection selection = new StringSelection(message);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, null);
+ MercuryStoreCore.blockHotkeySubject.onNext(true);
+ robot.keyRelease(KeyEvent.VK_ALT);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
@@ -48,13 +50,15 @@ private void executeMessage(String message) {
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
+ MercuryStoreCore.blockHotkeySubject.onNext(false);
}
private void openChat(String whisper) {
this.gameToFront();
StringSelection selection = new StringSelection("@" + whisper);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, selection);
-
+ MercuryStoreCore.blockHotkeySubject.onNext(true);
+ robot.keyRelease(KeyEvent.VK_ALT);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
@@ -72,6 +76,7 @@ private void openChat(String whisper) {
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_SPACE);
robot.keyRelease(KeyEvent.VK_SPACE);
+ MercuryStoreCore.blockHotkeySubject.onNext(false);
}
private void gameToFront(){
User32.INSTANCE.EnumWindows((hWnd, arg1) -> {
diff --git a/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java b/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java
index 5d560e0f..ae012210 100644
--- a/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java
+++ b/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java
@@ -1,7 +1,7 @@
package com.mercury.platform.core;
public class MercuryConstants {
- public static final String APP_VERSION = "1.0.1.7.0";
+ public static final String APP_VERSION = "1.0.1.8.0";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5555;
}
diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/MessageFileHandler.java b/app-core/src/main/java/com/mercury/platform/core/utils/MessageFileHandler.java
index 13e59383..c2d511c2 100644
--- a/app-core/src/main/java/com/mercury/platform/core/utils/MessageFileHandler.java
+++ b/app-core/src/main/java/com/mercury/platform/core/utils/MessageFileHandler.java
@@ -10,7 +10,6 @@
import java.io.File;
import java.io.RandomAccessFile;
import java.util.*;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -27,7 +26,9 @@ public MessageFileHandler(String logFilePath) {
this.logFilePath = logFilePath;
this.datePattern = Pattern.compile(dateRGPattern);
- this.interceptors.add(new TradeMessagesInterceptor());
+ this.interceptors.add(new TradeIncMessagesInterceptor());
+ this.interceptors.add(new TradeOutMessagesInterceptor());
+ this.interceptors.add(new PlainMessageInterceptor());
this.interceptors.add(new PlayerJoinInterceptor());
this.interceptors.add(new PlayerLeftInterceptor());
diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/PlainMessageInterceptor.java b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/PlainMessageInterceptor.java
new file mode 100644
index 00000000..9d0d51af
--- /dev/null
+++ b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/PlainMessageInterceptor.java
@@ -0,0 +1,190 @@
+package com.mercury.platform.core.utils.interceptor;
+
+
+import com.mercury.platform.core.utils.interceptor.filter.MessageFilter;
+import com.mercury.platform.shared.entity.message.PlainMessageDescriptor;
+import com.mercury.platform.shared.store.MercuryStoreCore;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class PlainMessageInterceptor extends MessageInterceptor{
+ private List clients = new ArrayList<>();
+
+ public PlainMessageInterceptor() {
+ this.clients.add(new EngIncLocalizationMatcher());
+ this.clients.add(new EngOutLocalizationMatcher());
+ this.clients.add(new RuIncLocalizationMatcher());
+ this.clients.add(new RuOutLocalizationMatcher());
+ this.clients.add(new ArabicInLocalizationMatcher());
+ this.clients.add(new ArabicOutLocalizationMatcher());
+ this.clients.add(new BZIncLocalizationMatcher());
+ this.clients.add(new BZOutLocalizationMatcher());
+ }
+
+ @Override
+ protected void process(String message) {
+ LocalizationMatcher localizationMatcher = this.clients.stream()
+ .filter(matcher -> matcher.isSuitableFor(message))
+ .findAny().orElse(null);
+ if(localizationMatcher != null){
+ localizationMatcher.processMessage(message);
+ }
+ }
+
+ @Override
+ protected MessageFilter getFilter() {
+ return message ->
+ this.clients.stream()
+ .filter(matcher -> matcher.isSuitableFor(message))
+ .findAny().orElse(null) != null;
+ }
+ private abstract class LocalizationMatcher {
+ public abstract boolean isSuitableFor(String message);
+ public abstract boolean isIncoming();
+ public abstract String trimString(String message);
+ public void processMessage(String message){
+ Pattern pattern = Pattern.compile("^(\\<.+?\\>)?\\s?(.+?):(.+)$");
+ Matcher matcher = pattern.matcher(this.trimString(message));
+ if(matcher.find()){
+ PlainMessageDescriptor descriptor = new PlainMessageDescriptor();
+ descriptor.setNickName(matcher.group(2));
+ descriptor.setMessage(matcher.group(3));
+ descriptor.setIncoming(this.isIncoming());
+ MercuryStoreCore.plainMessageSubject.onNext(descriptor);
+ }
+ }
+ }
+ private class EngIncLocalizationMatcher extends LocalizationMatcher {
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@From");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return true;
+ }
+
+ @Override
+ public String trimString(String message) {
+ return StringUtils.substringAfter(message,"@From ");
+ }
+ }
+ private class EngOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@To");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return false;
+ }
+
+ @Override
+ public String trimString(String message) {
+ return StringUtils.substringAfter(message,"@To ");
+ }
+ }
+ private class RuIncLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@От кого");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return true;
+ }
+
+ @Override
+ public String trimString(String message) {
+ return StringUtils.substringAfter(message,"@От кого ");
+ }
+ }
+ private class RuOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@Кому");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return false;
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@Кому ");
+ }
+
+ }
+ private class ArabicInLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@จาก");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return true;
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@จาก");
+ }
+ }
+ private class ArabicOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@ถึง");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return false;
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@ถึง");
+ }
+ }
+ private class BZIncLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@De");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return true;
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@De");
+ }
+ }
+ private class BZOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@Para");
+ }
+
+ @Override
+ public boolean isIncoming() {
+ return false;
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@Para");
+ }
+ }
+}
diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeMessagesInterceptor.java b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeIncMessagesInterceptor.java
similarity index 55%
rename from app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeMessagesInterceptor.java
rename to app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeIncMessagesInterceptor.java
index 1cf4cb2d..d3126b63 100644
--- a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeMessagesInterceptor.java
+++ b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeIncMessagesInterceptor.java
@@ -5,37 +5,48 @@
import com.mercury.platform.shared.MessageParser;
import com.mercury.platform.shared.config.Configuration;
import com.mercury.platform.shared.config.configration.PlainConfigurationService;
-import com.mercury.platform.shared.config.descriptor.NotificationDescriptor;
-import com.mercury.platform.shared.entity.message.Message;
+import com.mercury.platform.shared.config.descriptor.NotificationSettingsDescriptor;
+import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationType;
import com.mercury.platform.shared.store.MercuryStoreCore;
+import net.jodah.expiringmap.ExpiringMap;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
-public class TradeMessagesInterceptor extends MessageInterceptor {
+public class TradeIncMessagesInterceptor extends MessageInterceptor {
private MessageParser messageParser = new MessageParser();
- private PlainConfigurationService config;
+ private PlainConfigurationService config;
private List clients = new ArrayList<>();
+ private Map expiresMessages;
- public TradeMessagesInterceptor() {
+ public TradeIncMessagesInterceptor() {
this.config = Configuration.get().notificationConfiguration();
- this.clients.add(new EngLocalizationMatcher());
- this.clients.add(new RuLocalizationMatcher());
- this.clients.add(new ArabicLocalizationMatcher());
- this.clients.add(new BZLocalizationMatcher());
+ this.clients.add(new EngIncLocalizationMatcher());
+ this.clients.add(new RuIncLocalizationMatcher());
+ this.clients.add(new ArabicInLocalizationMatcher());
+ this.clients.add(new BZIncLocalizationMatcher());
+ this.expiresMessages = ExpiringMap.builder()
+ .expiration(1, TimeUnit.HOURS)
+ .build();
+ MercuryStoreCore.expiredNotificationSubject.subscribe(notificationDescriptor -> {
+ this.expiresMessages.put(UUID.randomUUID().toString(),StringUtils.substringAfter(notificationDescriptor.getSourceString(),":"));
+ });
}
@Override
protected void process(String message) {
- if(this.config.get().isNotificationEnable()) {
+ if(this.config.get().isIncNotificationEnable()) {
LocalizationMatcher localizationMatcher = this.clients.stream()
.filter(matcher -> matcher.isSuitableFor(message))
.findAny().orElse(null);
- Message parsedMessage = messageParser.parse(localizationMatcher.trimString(message));
- if (parsedMessage != null) {
- MercuryStoreCore.soundSubject.onNext(SoundType.MESSAGE);
- MercuryStoreCore.messageSubject.onNext(parsedMessage);
+ if(localizationMatcher != null){
+ localizationMatcher.processMessage(message);
}
}
}
@@ -54,8 +65,20 @@ public boolean isSuitableFor(String message){
(message.contains("wtb") && message.contains("(stash"));
}
public abstract String trimString(String src);
+ public NotificationDescriptor getDescriptor(String message){
+ return messageParser.parse(this.trimString(message));
+ }
+ public void processMessage(String message){
+ NotificationDescriptor notificationDescriptor = this.getDescriptor(message);
+ if (notificationDescriptor != null) {
+ if(!expiresMessages.containsValue(StringUtils.substringAfter(notificationDescriptor.getSourceString(),":"))) {
+ MercuryStoreCore.soundSubject.onNext(SoundType.MESSAGE);
+ MercuryStoreCore.newNotificationSubject.onNext(notificationDescriptor);
+ }
+ }
+ }
}
- private class EngLocalizationMatcher extends LocalizationMatcher{
+ private class EngIncLocalizationMatcher extends LocalizationMatcher {
@Override
public boolean isSuitableFor(String message) {
return message.contains("@From") && super.isSuitableFor(message);
@@ -66,7 +89,7 @@ public String trimString(String src) {
return StringUtils.substringAfter(src, "@From");
}
}
- private class RuLocalizationMatcher extends LocalizationMatcher{
+ private class RuIncLocalizationMatcher extends LocalizationMatcher{
@Override
public boolean isSuitableFor(String message) {
return message.contains("@От кого") && super.isSuitableFor(message);
@@ -77,7 +100,7 @@ public String trimString(String src) {
return StringUtils.substringAfter(src, "@От кого");
}
}
- private class ArabicLocalizationMatcher extends LocalizationMatcher{
+ private class ArabicInLocalizationMatcher extends LocalizationMatcher{
@Override
public boolean isSuitableFor(String message) {
return message.contains("@จาก") && super.isSuitableFor(message);
@@ -88,7 +111,7 @@ public String trimString(String src) {
return StringUtils.substringAfter(src, "@จาก");
}
}
- private class BZLocalizationMatcher extends LocalizationMatcher{
+ private class BZIncLocalizationMatcher extends LocalizationMatcher{
@Override
public boolean isSuitableFor(String message) {
return message.contains("@De") && super.isSuitableFor(message);
diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeOutMessagesInterceptor.java b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeOutMessagesInterceptor.java
new file mode 100644
index 00000000..447d94c7
--- /dev/null
+++ b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/TradeOutMessagesInterceptor.java
@@ -0,0 +1,156 @@
+package com.mercury.platform.core.utils.interceptor;
+
+import com.mercury.platform.core.misc.SoundType;
+import com.mercury.platform.core.utils.interceptor.filter.MessageFilter;
+import com.mercury.platform.shared.MessageParser;
+import com.mercury.platform.shared.config.Configuration;
+import com.mercury.platform.shared.config.configration.PlainConfigurationService;
+import com.mercury.platform.shared.config.descriptor.NotificationSettingsDescriptor;
+import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationType;
+import com.mercury.platform.shared.store.MercuryStoreCore;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TradeOutMessagesInterceptor extends MessageInterceptor {
+ private MessageParser messageParser = new MessageParser();
+ private PlainConfigurationService config;
+ private List clients = new ArrayList<>();
+
+ public TradeOutMessagesInterceptor() {
+ this.config = Configuration.get().notificationConfiguration();
+ this.clients.add(new EngOutLocalizationMatcher());
+ this.clients.add(new RuOutLocalizationMatcher());
+ this.clients.add(new ArabicOutLocalizationMatcher());
+ this.clients.add(new BZOutLocalizationMatcher());
+ }
+
+ @Override
+ protected void process(String message) {
+ if(this.config.get().isOutNotificationEnable()) {
+ LocalizationMatcher localizationMatcher = this.clients.stream()
+ .filter(matcher -> matcher.isSuitableFor(message))
+ .findAny().orElse(null);
+ if(localizationMatcher != null){
+ localizationMatcher.processMessage(message);
+ }
+ }
+ }
+
+ @Override
+ protected MessageFilter getFilter() {
+ return message ->
+ this.clients.stream()
+ .filter(matcher -> matcher.isSuitableFor(message))
+ .findAny().orElse(null) != null;
+ }
+ private abstract class LocalizationMatcher {
+ public boolean isSuitableFor(String message){
+ return message.contains("Hi, I would like") ||
+ message.contains("Hi, I'd like") ||
+ (message.contains("wtb") && message.contains("(stash"));
+ }
+ public abstract String trimString(String src);
+ public NotificationDescriptor getDescriptor(String message){
+ return messageParser.parse(this.trimString(message));
+ }
+ public void processMessage(String message){
+ NotificationDescriptor notificationDescriptor = this.getDescriptor(message);
+ if (notificationDescriptor != null) {
+ MercuryStoreCore.newNotificationSubject.onNext(notificationDescriptor);
+ }
+ }
+ }
+
+ private class EngOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@To") && super.isSuitableFor(message);
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@To");
+ }
+
+ @Override
+ public NotificationDescriptor getDescriptor(String message) {
+ NotificationDescriptor descriptor = messageParser.parse(this.trimString(message));
+ if(descriptor instanceof ItemTradeNotificationDescriptor){
+ descriptor.setType(NotificationType.OUT_ITEM_MESSAGE);
+ }else {
+ descriptor.setType(NotificationType.OUT_CURRENCY_MESSAGE);
+ }
+ return descriptor;
+ }
+ }
+ private class RuOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@Кому") && super.isSuitableFor(message);
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@Кому");
+ }
+
+ @Override
+ public NotificationDescriptor getDescriptor(String message) {
+ NotificationDescriptor descriptor = messageParser.parse(this.trimString(message));
+ if(descriptor instanceof ItemTradeNotificationDescriptor){
+ descriptor.setType(NotificationType.OUT_ITEM_MESSAGE);
+ }else {
+ descriptor.setType(NotificationType.OUT_CURRENCY_MESSAGE);
+ }
+ return descriptor;
+ }
+ }
+ private class ArabicOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@ถึง") && super.isSuitableFor(message);
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@ถึง");
+ }
+
+ @Override
+ public NotificationDescriptor getDescriptor(String message) {
+ NotificationDescriptor descriptor = messageParser.parse(this.trimString(message));
+ if(descriptor instanceof ItemTradeNotificationDescriptor){
+ descriptor.setType(NotificationType.OUT_ITEM_MESSAGE);
+ }else {
+ descriptor.setType(NotificationType.OUT_CURRENCY_MESSAGE);
+ }
+ return descriptor;
+ }
+ }
+ private class BZOutLocalizationMatcher extends LocalizationMatcher{
+ @Override
+ public boolean isSuitableFor(String message) {
+ return message.contains("@Para") && super.isSuitableFor(message);
+ }
+
+ @Override
+ public String trimString(String src) {
+ return StringUtils.substringAfter(src, "@Para");
+ }
+
+ @Override
+ public NotificationDescriptor getDescriptor(String message) {
+ NotificationDescriptor descriptor = messageParser.parse(this.trimString(message));
+ if(descriptor instanceof ItemTradeNotificationDescriptor){
+ descriptor.setType(NotificationType.OUT_ITEM_MESSAGE);
+ }else {
+ descriptor.setType(NotificationType.OUT_CURRENCY_MESSAGE);
+ }
+ return descriptor;
+ }
+ }
+}
diff --git a/app-core/src/main/java/com/mercury/platform/shared/HistoryManager.java b/app-core/src/main/java/com/mercury/platform/shared/HistoryManager.java
index 08c0a117..75cbcea8 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/HistoryManager.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/HistoryManager.java
@@ -1,6 +1,6 @@
package com.mercury.platform.shared;
-import com.mercury.platform.shared.entity.message.Message;
+import com.mercury.platform.shared.entity.message.NotificationDescriptor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.simple.JSONArray;
@@ -60,12 +60,12 @@ private void createEmptyFile(){
logger.error("Error during creating history file: ", e);
}
}
- public void add(Message message){
+ public void add(NotificationDescriptor notificationDescriptor){
JSONParser parser = new JSONParser();
try {
JSONObject root = (JSONObject)parser.parse(new FileReader(HISTORY_FILE));
JSONArray msgsArray = (JSONArray) root.get("messages");
- msgsArray.add(0,message.getSourceString());
+ msgsArray.add(0, notificationDescriptor.getSourceString());
root.replace("messages",msgsArray);
FileWriter fileWriter = new FileWriter(HISTORY_FILE);
fileWriter.write(root.toJSONString());
diff --git a/app-core/src/main/java/com/mercury/platform/shared/MessageParser.java b/app-core/src/main/java/com/mercury/platform/shared/MessageParser.java
index 13949b14..039954a0 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/MessageParser.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/MessageParser.java
@@ -1,9 +1,9 @@
package com.mercury.platform.shared;
-import com.mercury.platform.shared.entity.message.CurrencyMessage;
-import com.mercury.platform.shared.entity.message.ItemMessage;
-import com.mercury.platform.shared.entity.message.Message;
-import org.apache.commons.lang3.StringUtils;
+import com.mercury.platform.shared.entity.message.CurrencyTradeNotificationDescriptor;
+import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationDescriptor;
+import com.mercury.platform.shared.entity.message.NotificationType;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -24,77 +24,81 @@ public MessageParser() {
this.poeTradeCurrencyPattern = Pattern.compile(poeCurrencyPattern);
}
- public Message parse(String fullMessage){
+ public NotificationDescriptor parse(String fullMessage){
Matcher poeAppItemMatcher = poeAppItemPattern.matcher(fullMessage);
if(poeAppItemMatcher.find()){
- ItemMessage message = new ItemMessage();
- message.setSourceString(fullMessage);
- message.setWhisperNickname(poeAppItemMatcher.group(2));
- message.setItemName(poeAppItemMatcher.group(3));
+ ItemTradeNotificationDescriptor tradeNotification = new ItemTradeNotificationDescriptor();
+ tradeNotification.setSourceString(fullMessage);
+ tradeNotification.setWhisperNickname(poeAppItemMatcher.group(2));
+ tradeNotification.setItemName(poeAppItemMatcher.group(3));
if(poeAppItemMatcher.group(5) != null) {
- message.setCurCount(Double.parseDouble(poeAppItemMatcher.group(5)));
- message.setCurrency(poeAppItemMatcher.group(6));
+ tradeNotification.setCurCount(Double.parseDouble(poeAppItemMatcher.group(5)));
+ tradeNotification.setCurrency(poeAppItemMatcher.group(6));
}else {
- message.setCurCount(0d);
- message.setCurrency("???");
+ tradeNotification.setCurCount(0d);
+ tradeNotification.setCurrency("???");
}
- message.setLeague(poeAppItemMatcher.group(7));
+ tradeNotification.setLeague(poeAppItemMatcher.group(7));
if(poeAppItemMatcher.group(8) != null) {
- message.setTabName(poeAppItemMatcher.group(8));
- message.setLeft(Integer.parseInt(poeAppItemMatcher.group(9)));
- message.setTop(Integer.parseInt(poeAppItemMatcher.group(10)));
+ tradeNotification.setTabName(poeAppItemMatcher.group(8));
+ tradeNotification.setLeft(Integer.parseInt(poeAppItemMatcher.group(9)));
+ tradeNotification.setTop(Integer.parseInt(poeAppItemMatcher.group(10)));
}
- message.setOffer(poeAppItemMatcher.group(11));
- return message;
+ tradeNotification.setOffer(poeAppItemMatcher.group(11));
+ tradeNotification.setType(NotificationType.INC_ITEM_MESSAGE);
+ return tradeNotification;
}
Matcher poeTradeStashItemMatcher = poeTradeStashItemPattern.matcher(fullMessage);
if(poeTradeStashItemMatcher.find()){
- ItemMessage message = new ItemMessage();
- message.setSourceString(fullMessage);
- message.setWhisperNickname(poeTradeStashItemMatcher.group(2));
- message.setItemName(poeTradeStashItemMatcher.group(3));
+ ItemTradeNotificationDescriptor tradeNotification = new ItemTradeNotificationDescriptor();
+ tradeNotification.setSourceString(fullMessage);
+ tradeNotification.setWhisperNickname(poeTradeStashItemMatcher.group(2));
+ tradeNotification.setItemName(poeTradeStashItemMatcher.group(3));
if(poeTradeStashItemMatcher.group(4) != null){
- message.setCurCount(Double.parseDouble(poeTradeStashItemMatcher.group(5)));
- message.setCurrency(poeTradeStashItemMatcher.group(6));
+ tradeNotification.setCurCount(Double.parseDouble(poeTradeStashItemMatcher.group(5)));
+ tradeNotification.setCurrency(poeTradeStashItemMatcher.group(6));
}else {
- message.setCurCount(0d);
- message.setCurrency("???");
+ tradeNotification.setCurCount(0d);
+ tradeNotification.setCurrency("???");
}
- message.setLeague(poeTradeStashItemMatcher.group(7));
- message.setTabName(poeTradeStashItemMatcher.group(8));
- message.setLeft(Integer.parseInt(poeTradeStashItemMatcher.group(9)));
- message.setTop(Integer.parseInt(poeTradeStashItemMatcher.group(10)));
- message.setOffer(poeTradeStashItemMatcher.group(11));
- return message;
+ tradeNotification.setLeague(poeTradeStashItemMatcher.group(7));
+ tradeNotification.setTabName(poeTradeStashItemMatcher.group(8));
+ tradeNotification.setLeft(Integer.parseInt(poeTradeStashItemMatcher.group(9)));
+ tradeNotification.setTop(Integer.parseInt(poeTradeStashItemMatcher.group(10)));
+ tradeNotification.setOffer(poeTradeStashItemMatcher.group(11));
+ tradeNotification.setType(NotificationType.INC_ITEM_MESSAGE);
+ return tradeNotification;
}
Matcher poeTradeCurrencyMatcher = poeTradeCurrencyPattern.matcher(fullMessage);
if(poeTradeCurrencyMatcher.find()){
- CurrencyMessage message = new CurrencyMessage();
- message.setSourceString(fullMessage);
- message.setWhisperNickname(poeTradeCurrencyMatcher.group(2));
- message.setCurrForSaleCount(Double.parseDouble(poeTradeCurrencyMatcher.group(3)));
- message.setCurrForSaleTitle(poeTradeCurrencyMatcher.group(5));
- message.setCurCount(Double.parseDouble(poeTradeCurrencyMatcher.group(6)));
- message.setCurrency(poeTradeCurrencyMatcher.group(8));
- message.setLeague(poeTradeCurrencyMatcher.group(9));
- message.setOffer(poeTradeCurrencyMatcher.group(10));
- return message;
+ CurrencyTradeNotificationDescriptor tradeNotification = new CurrencyTradeNotificationDescriptor();
+ tradeNotification.setSourceString(fullMessage);
+ tradeNotification.setWhisperNickname(poeTradeCurrencyMatcher.group(2));
+ tradeNotification.setCurrForSaleCount(Double.parseDouble(poeTradeCurrencyMatcher.group(3)));
+ tradeNotification.setCurrForSaleTitle(poeTradeCurrencyMatcher.group(5));
+ tradeNotification.setCurCount(Double.parseDouble(poeTradeCurrencyMatcher.group(6)));
+ tradeNotification.setCurrency(poeTradeCurrencyMatcher.group(8));
+ tradeNotification.setLeague(poeTradeCurrencyMatcher.group(9));
+ tradeNotification.setOffer(poeTradeCurrencyMatcher.group(10));
+ tradeNotification.setType(NotificationType.INC_CURRENCY_MESSAGE);
+ return tradeNotification;
}
Matcher poeTradeItemMatcher = poeTradeItemPattern.matcher(fullMessage);
if(poeTradeItemMatcher.find()){
- ItemMessage message = new ItemMessage();
- message.setSourceString(fullMessage);
- message.setWhisperNickname(poeTradeItemMatcher.group(2));
- message.setItemName(poeTradeItemMatcher.group(3));
+ ItemTradeNotificationDescriptor tradeNotification = new ItemTradeNotificationDescriptor();
+ tradeNotification.setSourceString(fullMessage);
+ tradeNotification.setWhisperNickname(poeTradeItemMatcher.group(2));
+ tradeNotification.setItemName(poeTradeItemMatcher.group(3));
if(poeTradeItemMatcher.group(4) != null){
- message.setCurCount(Double.parseDouble(poeTradeItemMatcher.group(5)));
- message.setCurrency(poeTradeItemMatcher.group(6));
+ tradeNotification.setCurCount(Double.parseDouble(poeTradeItemMatcher.group(5)));
+ tradeNotification.setCurrency(poeTradeItemMatcher.group(6));
}else {
- message.setCurCount(0d);
- message.setCurrency("???");
+ tradeNotification.setCurCount(0d);
+ tradeNotification.setCurrency("???");
}
- message.setLeague(poeTradeItemMatcher.group(7));
- return message;
+ tradeNotification.setLeague(poeTradeItemMatcher.group(7));
+ tradeNotification.setType(NotificationType.INC_ITEM_MESSAGE);
+ return tradeNotification;
}
return null;
}
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/ConfigManager.java b/app-core/src/main/java/com/mercury/platform/shared/config/ConfigManager.java
index 1448fde5..a11a556c 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/config/ConfigManager.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/config/ConfigManager.java
@@ -11,11 +11,11 @@
public interface ConfigManager {
FramesConfigurationService framesConfiguration();
PlainConfigurationService applicationConfiguration();
- PlainConfigurationService notificationConfiguration();
+ PlainConfigurationService notificationConfiguration();
PlainConfigurationService scannerConfiguration();
KeyValueConfigurationService soundConfiguration();
KeyValueConfigurationService scaleConfiguration();
- KeyValueConfigurationService hotKeysConfiguration();
+ PlainConfigurationService hotKeysConfiguration();
AdrConfigurationService adrConfiguration();
ListConfigurationService stashTabConfiguration();
IconBundleConfigurationService iconBundleConfiguration();
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/MercuryConfigManager.java b/app-core/src/main/java/com/mercury/platform/shared/config/MercuryConfigManager.java
index e4f0c33e..89acc361 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/config/MercuryConfigManager.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/config/MercuryConfigManager.java
@@ -7,7 +7,6 @@
import com.mercury.platform.shared.config.configration.impl.adr.AdrConfigurationServiceMock;
import com.mercury.platform.shared.config.descriptor.*;
import com.mercury.platform.shared.config.descriptor.StashTabDescriptor;
-import com.mercury.platform.shared.config.descriptor.adr.AdrProfileDescriptor;
import com.mercury.platform.shared.config.json.JSONHelper;
import com.mercury.platform.shared.store.MercuryStoreCore;
import org.apache.commons.io.FileUtils;
@@ -30,11 +29,11 @@ public class MercuryConfigManager implements ConfigManager, AsSubscriber {
private ProfileDescriptor selectedProfile;
private FramesConfigurationService framesConfigurationService;
private PlainConfigurationService applicationConfigurationService;
- private PlainConfigurationService notificationConfigurationService;
+ private PlainConfigurationService notificationConfigurationService;
private PlainConfigurationService scannerConfigurationService;
private KeyValueConfigurationService soundConfigurationService;
private KeyValueConfigurationService scaleConfigurationService;
- private KeyValueConfigurationService hotKeyConfigurationService;
+ private PlainConfigurationService hotKeyConfigurationService;
private ListConfigurationService stashTabConfigurationService;
private IconBundleConfigurationService iconBundleConfigurationService;
private AdrConfigurationService adrConfigurationService;
@@ -57,7 +56,7 @@ public PlainConfigurationService applicationConfiguration
}
@Override
- public PlainConfigurationService notificationConfiguration() {
+ public PlainConfigurationService notificationConfiguration() {
return this.notificationConfigurationService;
}
@@ -92,7 +91,7 @@ public IconBundleConfigurationService iconBundleConfiguration() {
}
@Override
- public KeyValueConfigurationService hotKeysConfiguration() {
+ public PlainConfigurationService hotKeysConfiguration() {
return this.hotKeyConfigurationService;
}
@@ -143,7 +142,7 @@ public void load(){
this.notificationConfigurationService = new NotificationConfigurationService(selectedProfile);
this.scaleConfigurationService = new ScaleConfigurationService(selectedProfile);
this.stashTabConfigurationService = new StashTabConfigurationService(selectedProfile);
- this.hotKeyConfigurationService = new HotKeysConfigurationService(selectedProfile);
+ this.hotKeyConfigurationService = new HotKeyConfigurationService(selectedProfile);
this.adrConfigurationService = new AdrConfigurationServiceMock(selectedProfile);
this.iconBundleConfigurationService = new IconBundleConfigurationServiceImpl(selectedProfile);
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/ApplicationConfigurationService.java b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/ApplicationConfigurationService.java
index 9814e580..f69449b2 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/ApplicationConfigurationService.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/ApplicationConfigurationService.java
@@ -44,6 +44,7 @@ public ApplicationDescriptor getDefault() {
descriptor.setCheckOutUpdate(true);
descriptor.setInGameDnd(false);
descriptor.setDndResponseText("Response text");
+ System.out.println("qwe");
return descriptor;
}
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/FramesConfigurationServiceImpl.java b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/FramesConfigurationServiceImpl.java
index 2264a062..9cd009df 100644
--- a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/FramesConfigurationServiceImpl.java
+++ b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/FramesConfigurationServiceImpl.java
@@ -62,13 +62,13 @@ public Dimension getMinimumSize(String frameClass) {
private void initMinimumMap() {
minimumFrameSize.put("TaskBarFrame",new Dimension(109,20));
- minimumFrameSize.put("MessageFrame",new Dimension(360,10));
+ minimumFrameSize.put("NotificationFrame",new Dimension(320,10));
minimumFrameSize.put("OutMessageFrame",new Dimension(280,115));
minimumFrameSize.put("TestCasesFrame",new Dimension(400,100));
minimumFrameSize.put("SettingsFrame",new Dimension(600,400));
minimumFrameSize.put("HistoryFrame",new Dimension(280,400));
minimumFrameSize.put("TimerFrame",new Dimension(240,102));
- minimumFrameSize.put("ChatFilterFrame",new Dimension(400,100));
+ minimumFrameSize.put("ChatScannerFrame",new Dimension(450,100));
minimumFrameSize.put("ItemsGridFrame",new Dimension(150,150));
minimumFrameSize.put("NotesFrame",new Dimension(540,100));
minimumFrameSize.put("ChatFilterSettingsFrame",new Dimension(300,200));
@@ -79,13 +79,13 @@ private void initMinimumMap() {
}
private void initDefaultMap() {
defaultFramesSettings.put("TaskBarFrame", new FrameDescriptor(new Point(400, 500), new Dimension(109, 20)));
- defaultFramesSettings.put("MessageFrame", new FrameDescriptor(new Point(700, 600), new Dimension(315, 0)));
+ defaultFramesSettings.put("NotificationFrame", new FrameDescriptor(new Point(700, 600), new Dimension(350, 0)));
defaultFramesSettings.put("OutMessageFrame", new FrameDescriptor(new Point(200, 500), new Dimension(280, 115)));
defaultFramesSettings.put("TestCasesFrame", new FrameDescriptor(new Point(1400, 500), new Dimension(400, 100)));
defaultFramesSettings.put("SettingsFrame", new FrameDescriptor(new Point(600, 600), new Dimension(800,600)));
defaultFramesSettings.put("HistoryFrame", new FrameDescriptor(new Point(600, 500), new Dimension(280, 400)));
defaultFramesSettings.put("TimerFrame", new FrameDescriptor(new Point(400, 600), new Dimension(240, 102)));
- defaultFramesSettings.put("ChatFilterFrame", new FrameDescriptor(new Point(400, 600), new Dimension(500, 300)));
+ defaultFramesSettings.put("ChatScannerFrame", new FrameDescriptor(new Point(400, 600), new Dimension(550, 220)));
defaultFramesSettings.put("ItemsGridFrame", new FrameDescriptor(new Point(12, 79), new Dimension(641, 718)));
defaultFramesSettings.put("NotesFrame", new FrameDescriptor(new Point(400, 600), new Dimension(540, 100)));
defaultFramesSettings.put("ChatFilterSettingsFrame", new FrameDescriptor(new Point(400, 600), new Dimension(320, 200)));
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java
new file mode 100644
index 00000000..3b8ce102
--- /dev/null
+++ b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java
@@ -0,0 +1,77 @@
+package com.mercury.platform.shared.config.configration.impl;
+
+
+import com.mercury.platform.shared.config.configration.BaseConfigurationService;
+import com.mercury.platform.shared.config.configration.KeyValueConfigurationService;
+import com.mercury.platform.shared.config.configration.PlainConfigurationService;
+import com.mercury.platform.shared.config.descriptor.*;
+import com.mercury.platform.shared.store.MercuryStoreCore;
+import org.jnativehook.keyboard.NativeKeyEvent;
+
+import java.util.*;
+
+public class HotKeyConfigurationService extends BaseConfigurationService implements PlainConfigurationService {
+ public HotKeyConfigurationService(ProfileDescriptor selectedProfile) {
+ super(selectedProfile);
+ }
+
+ @Override
+ public HotKeysSettingsDescriptor getDefault() {
+ HotKeysSettingsDescriptor hotKeysSettingsDescriptor = new HotKeysSettingsDescriptor();
+ List incNDataList = new ArrayList<>();
+ incNDataList.add(new HotKeyPair(HotKeyType.N_INVITE_PLAYER,new HotKeyDescriptor("F1", NativeKeyEvent.VC_F1,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_TRADE_PLAYER,new HotKeyDescriptor("F2",NativeKeyEvent.VC_F2,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_KICK_PLAYER,new HotKeyDescriptor("F3",NativeKeyEvent.VC_F3,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_STILL_INTERESTING,new HotKeyDescriptor("F4",NativeKeyEvent.VC_F4,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_OPEN_CHAT,new HotKeyDescriptor("F5",NativeKeyEvent.VC_F5,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_SWITCH_CHAT,new HotKeyDescriptor("F6",NativeKeyEvent.VC_F6,false,false,false)));
+ incNDataList.add(new HotKeyPair(HotKeyType.N_CLOSE_NOTIFICATION,new HotKeyDescriptor("F7",NativeKeyEvent.VC_F7,false,false,false)));
+
+ List outNDataList = new ArrayList<>();
+ outNDataList.add(new HotKeyPair(HotKeyType.N_VISITE_HIDEOUT,new HotKeyDescriptor("F1", NativeKeyEvent.VC_F1,false,false,false)));
+ outNDataList.add(new HotKeyPair(HotKeyType.N_TRADE_PLAYER,new HotKeyDescriptor("F2",NativeKeyEvent.VC_F2,false,false,false)));
+ outNDataList.add(new HotKeyPair(HotKeyType.N_LEAVE,new HotKeyDescriptor("F3",NativeKeyEvent.VC_F3,false,false,false)));
+ outNDataList.add(new HotKeyPair(HotKeyType.N_OPEN_CHAT,new HotKeyDescriptor("F4",NativeKeyEvent.VC_F4,false,false,false)));
+ outNDataList.add(new HotKeyPair(HotKeyType.N_CLOSE_NOTIFICATION,new HotKeyDescriptor("F5",NativeKeyEvent.VC_F5,false,false,false)));
+
+ List scannerNDataList = new ArrayList<>();
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_QUICK_RESPONSE,new HotKeyDescriptor("F1", NativeKeyEvent.VC_F1,false,false,false)));
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_VISITE_HIDEOUT,new HotKeyDescriptor("F2", NativeKeyEvent.VC_F2,false,false,false)));
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_TRADE_PLAYER,new HotKeyDescriptor("F3",NativeKeyEvent.VC_F3,false,false,false)));
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_LEAVE,new HotKeyDescriptor("F4",NativeKeyEvent.VC_F4,false,false,false)));
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_OPEN_CHAT,new HotKeyDescriptor("F5",NativeKeyEvent.VC_F5,false,false,false)));
+ scannerNDataList.add(new HotKeyPair(HotKeyType.N_CLOSE_NOTIFICATION,new HotKeyDescriptor("F6",NativeKeyEvent.VC_F6,false,false,false)));
+
+ List taskBarNDataList = new ArrayList<>();
+ taskBarNDataList.add(new HotKeyPair(HotKeyType.T_TO_HIDEOUT,new HotKeyDescriptor("F1",NativeKeyEvent.VC_F1,false,false,false)));
+// taskBarNDataList.add(new HotKeyPair(HotKeyType.T_DND,new HotKeyDescriptor("F2",NativeKeyEvent.VC_F2,false,false,false)));
+
+ hotKeysSettingsDescriptor.setIncNHotKeysList(incNDataList);
+ hotKeysSettingsDescriptor.setOutNHotKeysList(outNDataList);
+ hotKeysSettingsDescriptor.setScannerNHotKeysList(scannerNDataList);
+ hotKeysSettingsDescriptor.setTaskBarNHotKeysList(taskBarNDataList);
+ return hotKeysSettingsDescriptor;
+ }
+
+ @Override
+ public void toDefault() {
+ this.selectedProfile.setHotKeysSettingsDescriptor(this.getDefault());
+ }
+
+ @Override
+ public void validate() {
+ if (this.selectedProfile.getHotKeysSettingsDescriptor() == null){
+ this.selectedProfile.setHotKeysSettingsDescriptor(this.getDefault());
+ }
+ }
+
+ @Override
+ public HotKeysSettingsDescriptor get() {
+ return this.selectedProfile.getHotKeysSettingsDescriptor();
+ }
+
+ @Override
+ public void set(HotKeysSettingsDescriptor descriptor) {
+ this.selectedProfile.setHotKeysSettingsDescriptor(descriptor);
+ }
+}
diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeysConfigurationService.java b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeysConfigurationService.java
deleted file mode 100644
index 6971f1b8..00000000
--- a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeysConfigurationService.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.mercury.platform.shared.config.configration.impl;
-
-
-import com.mercury.platform.shared.config.configration.BaseConfigurationService;
-import com.mercury.platform.shared.config.configration.KeyValueConfigurationService;
-import com.mercury.platform.shared.config.descriptor.HotKeyDescriptor;
-import com.mercury.platform.shared.config.descriptor.HotKeyType;
-import com.mercury.platform.shared.config.descriptor.ProfileDescriptor;
-import com.mercury.platform.shared.store.MercuryStoreCore;
-import org.jnativehook.keyboard.NativeKeyEvent;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class HotKeysConfigurationService extends BaseConfigurationService