Skip to content

Commit

Permalink
Update #91 #92
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksgata committed May 18, 2022
1 parent 3ba5737 commit d78398c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion rulateday-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
<dependency>
<groupId>com.github.Eiriksgata</groupId>
<artifactId>trpg-java-dice</artifactId>
<version>1.3.2</version>
<version>1.3.4</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public static void save(String name, String key, String value) {


public static List<QueryDataBase> find(String key) {
if (GlobalData.documentContext == null) {
return null;
}
AtomicInteger index = new AtomicInteger();
List<QueryDataBase> result = new ArrayList<>();
GlobalData.documentContext.forEach((docName, dataMap) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,18 @@ public void groupTemp(GroupTempMessageEvent event) {
return null;
}

@InstructReflex(value = {".rmi", "。rmi"})
public String rollMagicItem() {
@InstructReflex(value = {".rmi", "。rmi"}, priority = 3)
public String rollMagicItem(MessageData<?> data) {
return "null";
}

@InstructReflex(value = {".rt", "。rt"})
public String rollTool() {
@InstructReflex(value = {".rt", "。rt"}, priority = 3)
public String rollTool(MessageData<?> data) {
return "null";
}

@InstructReflex(value = {".drw", "。drw"})
public String rollWeapon() {
@InstructReflex(value = {".drw", "。drw"}, priority = 4)
public String rollWeapon(MessageData<?> data) {
return "null";
}

Expand All @@ -202,8 +202,8 @@ public String modClose(MessageData<?> data) {
return "null";
}

@InstructReflex(value = {".reload"})
public String fileReload() {
@InstructReflex(value = {".reload"}, priority = 3)
public String fileReload(MessageData<?> data) {
try {
LoadDatabaseFile.loadCustomDocument();
} catch (IOException e) {
Expand All @@ -216,6 +216,9 @@ public String fileReload() {
@InstructReflex(value = {".q", "。q", ".Q", "。Q"}, priority = 3)
public String queryModelCustom(MessageData<?> data) {
List<QueryDataBase> result = CustomDocumentHandler.find(data.getMessage());
if (result == null) {
return CustomText.getText("query.doc.lib.result.list.not.found");
}
List<QueryDataBase> saveData = new ArrayList<>();
if (result.size() > 1) {
StringBuilder text = new StringBuilder(CustomText.getText("query.doc.lib.result.list.title"));
Expand Down

0 comments on commit d78398c

Please sign in to comment.