forked from Exslims/MercuryTrade
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
290 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.mercury.platform.core; | ||
|
||
public class MercuryConstants { | ||
public static final String APP_VERSION = "1.3.5"; | ||
public static final String APP_VERSION = "1.3.6"; | ||
public static final String SERVER_HOST = "exslims.ddns.net"; | ||
public static final int PORT = 5555; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...e/src/main/java/com/mercury/platform/shared/messageparser/PoeTradeItemParserJapanese.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.mercury.platform.shared.messageparser; | ||
|
||
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; | ||
|
||
class PoeTradeItemParserJapanese extends BaseRegexParser { | ||
|
||
// Tested for message ナーフ神ジョナサン: こんにちは、Standard リーグで 3 exalted で売っている、あなたの Havoc Band, Emerald Ring を購入したいです (スタッシュタブ "~b/o 3 exalted"; 位置: 左から 6, 上から 7) | ||
// coming from https://www.pathofexile.com/trade2/search/poe2/Standard 12.12.2024 | ||
private static final String poeTradePattern = "^(.+): こんにちは、(.+) リーグで (.+) (.+) で売っている、あなたの (.+) を購入したいです \\(スタッシュタブ \"(.+)\"; 位置: 左から (\\d+), 上から (\\d+)\\)$"; | ||
|
||
public PoeTradeItemParserJapanese() { | ||
super(poeTradePattern); | ||
} | ||
|
||
@Override | ||
protected NotificationDescriptor parse(Matcher matcher, String whisper) { | ||
ItemTradeNotificationDescriptor tradeNotification = new ItemTradeNotificationDescriptor(); | ||
tradeNotification.setWhisperNickname(matcher.group(1)); | ||
tradeNotification.setSourceString(matcher.group(0)); | ||
tradeNotification.setItemName(matcher.group(5)); | ||
tradeNotification.setLeft(Integer.parseInt(matcher.group(7))); | ||
tradeNotification.setTop(Integer.parseInt(matcher.group(8))); | ||
tradeNotification.setTabName(matcher.group(6)); | ||
|
||
if (matcher.group(3) != null) { | ||
tradeNotification.setCurCount(Double.parseDouble(matcher.group(3))); | ||
tradeNotification.setCurrency(matcher.group(4)); | ||
} else { | ||
tradeNotification.setCurCount(0d); | ||
tradeNotification.setCurrency("???"); | ||
} | ||
tradeNotification.setLeague(matcher.group(2)); | ||
tradeNotification.setType(NotificationType.INC_ITEM_MESSAGE); | ||
return tradeNotification; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...re/src/main/java/com/mercury/platform/shared/messageparser/PoeTradeItemParserKorean2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.mercury.platform.shared.messageparser; | ||
|
||
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; | ||
|
||
class PoeTradeItemParserKorean2 extends BaseRegexParser { | ||
|
||
// Tested for message 술쟁이: 안녕하세요, 5 exalted(으)로 올려놓은 Standard 리그의 Morbid Grasp, Emerald Ring(을)를 구매하고 싶습니다 (보관함 탭 "~price 5 exalted", 위치: 왼쪽 11, 상단 3) | ||
// coming from https://www.pathofexile.com/trade2/search/poe2/Standard 12.12.2024 | ||
private static final String poeTradePattern = "^(.+): 안녕하세요, (.+) (.+)\\(으\\)로 올려놓은 (.+) 리그의 (.+)\\(을\\)를 구매하고 싶습니다 \\(보관함 탭 \"(.*)\", 위치: 왼쪽 (\\d+), 상단 (\\d+)\\)$"; | ||
|
||
public PoeTradeItemParserKorean2() { | ||
super(poeTradePattern); | ||
} | ||
|
||
@Override | ||
protected NotificationDescriptor parse(Matcher matcher, String whisper) { | ||
ItemTradeNotificationDescriptor tradeNotification = new ItemTradeNotificationDescriptor(); | ||
tradeNotification.setWhisperNickname(matcher.group(1)); | ||
tradeNotification.setSourceString(matcher.group(0)); | ||
tradeNotification.setItemName(matcher.group(5)); | ||
tradeNotification.setLeft(Integer.parseInt(matcher.group(7))); | ||
tradeNotification.setTop(Integer.parseInt(matcher.group(8))); | ||
tradeNotification.setTabName(matcher.group(2)); | ||
if (matcher.group(5) != null) { | ||
tradeNotification.setCurCount(Double.parseDouble(matcher.group(2))); | ||
tradeNotification.setCurrency(matcher.group(3)); | ||
} else { | ||
tradeNotification.setCurCount(0d); | ||
tradeNotification.setCurrency("???"); | ||
} | ||
tradeNotification.setLeague(matcher.group(4)); | ||
tradeNotification.setType(NotificationType.INC_ITEM_MESSAGE); | ||
return tradeNotification; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 17 additions & 9 deletions
26
app-shared/src/main/java/com/mercury/platform/Languages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
package com.mercury.platform; | ||
|
||
public enum Languages { | ||
en("english"), | ||
pl("polish"), | ||
ru("russian"), | ||
en(TranslationKey.english, "en"), | ||
pl(TranslationKey.polish, "pl"), | ||
ru(TranslationKey.russian, "ru"), | ||
; | ||
|
||
private String name; | ||
private TranslationKey name; | ||
private String shortName; | ||
|
||
Languages(String name) { | ||
Languages(TranslationKey name, String shortName) { | ||
this.name = name; | ||
this.shortName = shortName; | ||
} | ||
|
||
public static boolean isCJK() { | ||
return false; | ||
public TranslationKey getName() { | ||
return name; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
public String shortName() { | ||
return shortName; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
return name.value(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.