Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d6d5dcc94 | ||
|
|
61f451694f | ||
|
|
c681f0bd82 | ||
|
|
cbc0b2707e | ||
|
|
36d0f8a2a0 | ||
|
|
301f65ce16 | ||
|
|
f1b95fe45e | ||
|
|
3091d747e6 | ||
|
|
f4062e5ebb | ||
|
|
a8807f1ef0 | ||
|
|
10945927c1 |
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# Cosmic JAR creation stage
|
||||
#
|
||||
FROM maven:3.8.4-openjdk-17 AS jar
|
||||
FROM maven:3.9.1-eclipse-temurin-17 AS jar
|
||||
|
||||
# Build in a separated location which won't have permissions issues.
|
||||
WORKDIR /opt/cosmic
|
||||
@@ -21,7 +21,7 @@ RUN mvn -f ./pom.xml clean package -Dmaven.test.skip -T 1C
|
||||
#
|
||||
# Server creation stage
|
||||
#
|
||||
FROM openjdk:17.0.2
|
||||
FROM eclipse-temurin:17.0.6_10-jre
|
||||
|
||||
# Host the server in a location that won't have permissions issues.
|
||||
WORKDIR /opt/server
|
||||
|
||||
28
pom.xml
28
pom.xml
@@ -19,22 +19,22 @@
|
||||
<mainClass>net.server.Server</mainClass>
|
||||
|
||||
<!-- Maven plugins -->
|
||||
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version> <!-- For running unit tests -->
|
||||
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version> <!-- Disabled. (for building thin jar) -->
|
||||
<maven-assembly-plugin.version>3.4.2</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
|
||||
<maven-surefire-plugin.version>3.0.0-M9</maven-surefire-plugin.version> <!-- For running unit tests -->
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version> <!-- Disabled. (for building thin jar) -->
|
||||
<maven-assembly-plugin.version>3.5.0</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
|
||||
|
||||
<!-- Dependencies -->
|
||||
<slf4j-api.version>1.7.36</slf4j-api.version> <!-- Logging facade -->
|
||||
<log4j.version>2.18.0</log4j.version> <!-- Slf4j implementation -->
|
||||
<graalvm.version>22.2.0</graalvm.version> <!-- ScriptEngine implementation -->
|
||||
<netty.version>4.1.79.Final</netty.version> <!-- Networking -->
|
||||
<log4j.version>2.20.0</log4j.version> <!-- Slf4j implementation -->
|
||||
<graalvm.version>22.3.1</graalvm.version> <!-- ScriptEngine implementation -->
|
||||
<netty.version>4.1.89.Final</netty.version> <!-- Networking -->
|
||||
<yamlbeans.version>1.15</yamlbeans.version> <!-- Config file -->
|
||||
<jcip-annotations.version>1.0</jcip-annotations.version> <!-- Annotations for concurrency documentation -->
|
||||
<HikariCP.version>5.0.1</HikariCP.version> <!-- Database connection pool -->
|
||||
<mysql-connector-java.version>8.0.30</mysql-connector-java.version> <!-- MySQL JDBC driver -->
|
||||
<jdbi-version>3.35.0</jdbi-version> <!-- Convenience wrapper around JDBC -->
|
||||
<junit.version>5.9.0</junit.version> <!-- Unit test -->
|
||||
<mockito.version>4.7.0</mockito.version> <!-- Unit test -->
|
||||
<mysql-connector-j.version>8.0.32</mysql-connector-j.version> <!-- MySQL JDBC driver -->
|
||||
<jdbi-version>3.37.1</jdbi-version> <!-- Convenience wrapper around JDBC -->
|
||||
<junit.version>5.9.2</junit.version> <!-- Unit test -->
|
||||
<mockito.version>5.1.1</mockito.version> <!-- Unit test -->
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -56,9 +56,9 @@
|
||||
<version>${HikariCP.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>${mysql-connector-j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jdbi</groupId>
|
||||
@@ -204,4 +204,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -285,6 +285,12 @@ public class DueyProcessor {
|
||||
if (c.tryacquireClient()) {
|
||||
try {
|
||||
int fee = Trade.getFee(sendMesos);
|
||||
if (sendMessage != null && sendMessage.length() > 100) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit with Quick Delivery on duey.");
|
||||
log.warn("Chr {} tried to use duey with too long of a text", c.getPlayer().getName());
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
if (!quick) {
|
||||
fee += 5000;
|
||||
} else if (!c.getPlayer().haveItem(ItemId.QUICK_DELIVERY_TICKET)) {
|
||||
|
||||
@@ -71,8 +71,9 @@ public class ByteBufOutPacket implements OutPacket {
|
||||
|
||||
@Override
|
||||
public void writeString(String value) {
|
||||
writeShort((short) value.length());
|
||||
writeBytes(value.getBytes(CharsetConstants.CHARSET));
|
||||
byte[] bytes = value.getBytes(CharsetConstants.CHARSET);
|
||||
writeShort(bytes.length);
|
||||
writeBytes(bytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class WeddingHandler extends AbstractPacketHandler {
|
||||
if (!item.isUntradeable()) {
|
||||
if (itemid == item.getItemId() && quantity <= item.getQuantity()) {
|
||||
newItem = item.copy();
|
||||
|
||||
newItem.setQuantity(quantity);
|
||||
marriage.addGiftItem(groomWishlist, newItem);
|
||||
InventoryManipulator.removeFromSlot(c, type, slot, quantity, false, false);
|
||||
|
||||
@@ -161,4 +161,4 @@ public final class WeddingHandler extends AbstractPacketHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user