Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b742ac0591 | ||
|
|
216fa9341b | ||
|
|
1d6d5dcc94 | ||
|
|
61f451694f | ||
|
|
c681f0bd82 | ||
|
|
cbc0b2707e | ||
|
|
36d0f8a2a0 | ||
|
|
301f65ce16 | ||
|
|
f1b95fe45e | ||
|
|
3091d747e6 | ||
|
|
f4062e5ebb | ||
|
|
a8807f1ef0 | ||
|
|
10945927c1 |
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Cosmic JAR creation stage
|
# 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.
|
# Build in a separated location which won't have permissions issues.
|
||||||
WORKDIR /opt/cosmic
|
WORKDIR /opt/cosmic
|
||||||
@@ -21,7 +21,7 @@ RUN mvn -f ./pom.xml clean package -Dmaven.test.skip -T 1C
|
|||||||
#
|
#
|
||||||
# Server creation stage
|
# 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.
|
# Host the server in a location that won't have permissions issues.
|
||||||
WORKDIR /opt/server
|
WORKDIR /opt/server
|
||||||
|
|||||||
26
pom.xml
26
pom.xml
@@ -19,22 +19,22 @@
|
|||||||
<mainClass>net.server.Server</mainClass>
|
<mainClass>net.server.Server</mainClass>
|
||||||
|
|
||||||
<!-- Maven plugins -->
|
<!-- Maven plugins -->
|
||||||
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version> <!-- For running unit tests -->
|
<maven-surefire-plugin.version>3.0.0-M9</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-jar-plugin.version>3.3.0</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-assembly-plugin.version>3.5.0</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
|
||||||
|
|
||||||
<!-- Dependencies -->
|
<!-- Dependencies -->
|
||||||
<slf4j-api.version>1.7.36</slf4j-api.version> <!-- Logging facade -->
|
<slf4j-api.version>1.7.36</slf4j-api.version> <!-- Logging facade -->
|
||||||
<log4j.version>2.18.0</log4j.version> <!-- Slf4j implementation -->
|
<log4j.version>2.20.0</log4j.version> <!-- Slf4j implementation -->
|
||||||
<graalvm.version>22.2.0</graalvm.version> <!-- ScriptEngine implementation -->
|
<graalvm.version>22.3.1</graalvm.version> <!-- ScriptEngine implementation -->
|
||||||
<netty.version>4.1.79.Final</netty.version> <!-- Networking -->
|
<netty.version>4.1.89.Final</netty.version> <!-- Networking -->
|
||||||
<yamlbeans.version>1.15</yamlbeans.version> <!-- Config file -->
|
<yamlbeans.version>1.15</yamlbeans.version> <!-- Config file -->
|
||||||
<jcip-annotations.version>1.0</jcip-annotations.version> <!-- Annotations for concurrency documentation -->
|
<jcip-annotations.version>1.0</jcip-annotations.version> <!-- Annotations for concurrency documentation -->
|
||||||
<HikariCP.version>5.0.1</HikariCP.version> <!-- Database connection pool -->
|
<HikariCP.version>5.0.1</HikariCP.version> <!-- Database connection pool -->
|
||||||
<mysql-connector-java.version>8.0.30</mysql-connector-java.version> <!-- MySQL JDBC driver -->
|
<mysql-connector-j.version>8.0.32</mysql-connector-j.version> <!-- MySQL JDBC driver -->
|
||||||
<jdbi-version>3.35.0</jdbi-version> <!-- Convenience wrapper around JDBC -->
|
<jdbi-version>3.37.1</jdbi-version> <!-- Convenience wrapper around JDBC -->
|
||||||
<junit.version>5.9.0</junit.version> <!-- Unit test -->
|
<junit.version>5.9.2</junit.version> <!-- Unit test -->
|
||||||
<mockito.version>4.7.0</mockito.version> <!-- Unit test -->
|
<mockito.version>5.1.1</mockito.version> <!-- Unit test -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -56,9 +56,9 @@
|
|||||||
<version>${HikariCP.version}</version>
|
<version>${HikariCP.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
<version>${mysql-connector-java.version}</version>
|
<version>${mysql-connector-j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jdbi</groupId>
|
<groupId>org.jdbi</groupId>
|
||||||
|
|||||||
@@ -6482,7 +6482,6 @@ public class Character extends AbstractCharacterObject {
|
|||||||
ThreadManager.getInstance().newTask(r);
|
ThreadManager.getInstance().newTask(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
levelUpMessages();
|
|
||||||
guildUpdate();
|
guildUpdate();
|
||||||
|
|
||||||
FamilyEntry familyEntry = getFamilyEntry();
|
FamilyEntry familyEntry = getFamilyEntry();
|
||||||
@@ -6521,94 +6520,6 @@ public class Character extends AbstractCharacterObject {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void levelUpMessages() {
|
|
||||||
if (level % 5 != 0) { //Performance FTW?
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (level == 5) {
|
|
||||||
yellowMessage("Aww, you're level 5, how cute!");
|
|
||||||
} else if (level == 10) {
|
|
||||||
yellowMessage("Henesys Party Quest is now open to you! Head over to Henesys, find some friends, and try it out!");
|
|
||||||
} else if (level == 15) {
|
|
||||||
yellowMessage("Half-way to your 2nd job advancement, nice work!");
|
|
||||||
} else if (level == 20) {
|
|
||||||
yellowMessage("You can almost Kerning Party Quest!");
|
|
||||||
} else if (level == 25) {
|
|
||||||
yellowMessage("You seem to be improving, but you are still not ready to move on to the next step.");
|
|
||||||
} else if (level == 30) {
|
|
||||||
yellowMessage("You have finally reached level 30! Try job advancing, after that try the Mushroom Castle!");
|
|
||||||
} else if (level == 35) {
|
|
||||||
yellowMessage("Hey did you hear about this mall that opened in Kerning? Try visiting the Kerning Mall.");
|
|
||||||
} else if (level == 40) {
|
|
||||||
yellowMessage("Do @rates to see what all your rates are!");
|
|
||||||
} else if (level == 45) {
|
|
||||||
yellowMessage("I heard that a rock and roll artist died during the grand opening of the Kerning Mall. People are naming him the Spirit of Rock.");
|
|
||||||
} else if (level == 50) {
|
|
||||||
yellowMessage("You seem to be growing very fast, would you like to test your new found strength with the mighty Zakum?");
|
|
||||||
} else if (level == 55) {
|
|
||||||
yellowMessage("You can now try out the Ludibrium Maze Party Quest!");
|
|
||||||
} else if (level == 60) {
|
|
||||||
yellowMessage("Feels good to be near the end of 2nd job, doesn't it?");
|
|
||||||
} else if (level == 65) {
|
|
||||||
yellowMessage("You're only 5 more levels away from 3rd job, not bad!");
|
|
||||||
} else if (level == 70) {
|
|
||||||
yellowMessage("I see many people wearing a teddy bear helmet. I should ask someone where they got it from.");
|
|
||||||
} else if (level == 75) {
|
|
||||||
yellowMessage("You have reached level 3 quarters!");
|
|
||||||
} else if (level == 80) {
|
|
||||||
yellowMessage("You think you are powerful enough? Try facing horntail!");
|
|
||||||
} else if (level == 85) {
|
|
||||||
yellowMessage("Did you know? The majority of people who hit level 85 in Cosmic don't live to be 85 years old?");
|
|
||||||
} else if (level == 90) {
|
|
||||||
yellowMessage("Hey do you like the amusement park? I heard Spooky World is the best theme park around. I heard they sell cute teddy-bears.");
|
|
||||||
} else if (level == 95) {
|
|
||||||
yellowMessage("100% of people who hit level 95 in Cosmic don't live to be 95 years old.");
|
|
||||||
} else if (level == 100) {
|
|
||||||
yellowMessage("Mid-journey so far... You just reached level 100! Now THAT's such a feat, however to manage the 200 you will need even more passion and determination than ever! Good hunting!");
|
|
||||||
} else if (level == 105) {
|
|
||||||
yellowMessage("Have you ever been to leafre? I heard they have dragons!");
|
|
||||||
} else if (level == 110) {
|
|
||||||
yellowMessage("I see many people wearing a teddy bear helmet. I should ask someone where they got it from.");
|
|
||||||
} else if (level == 115) {
|
|
||||||
yellowMessage("I bet all you can think of is level 120, huh? Level 115 gets no love.");
|
|
||||||
} else if (level == 120) {
|
|
||||||
yellowMessage("Are you ready to learn from the masters? Head over to your job instructor!");
|
|
||||||
} else if (level == 125) {
|
|
||||||
yellowMessage("The struggle for mastery books has begun, huh?");
|
|
||||||
} else if (level == 130) {
|
|
||||||
yellowMessage("You should try Temple of Time. It should be pretty decent EXP.");
|
|
||||||
} else if (level == 135) {
|
|
||||||
yellowMessage("I hope you're still not struggling for mastery books!");
|
|
||||||
} else if (level == 140) {
|
|
||||||
yellowMessage("You're well into 4th job at this point, great work!");
|
|
||||||
} else if (level == 145) {
|
|
||||||
yellowMessage("Level 145 is serious business!");
|
|
||||||
} else if (level == 150) {
|
|
||||||
yellowMessage("You have becomed quite strong, but the journey is not yet over.");
|
|
||||||
} else if (level == 155) {
|
|
||||||
yellowMessage("At level 155, Zakum should be a joke to you. Nice job!");
|
|
||||||
} else if (level == 160) {
|
|
||||||
yellowMessage("Level 160 is pretty impressive. Try taking a picture and putting it on Instagram.");
|
|
||||||
} else if (level == 165) {
|
|
||||||
yellowMessage("At this level, you should start looking into doing some boss runs.");
|
|
||||||
} else if (level == 170) {
|
|
||||||
yellowMessage("Level 170, huh? You have the heart of a champion.");
|
|
||||||
} else if (level == 175) {
|
|
||||||
yellowMessage("You came a long way from level 1. Amazing job so far.");
|
|
||||||
} else if (level == 180) {
|
|
||||||
yellowMessage("Have you ever tried taking a boss on by yourself? It is quite difficult.");
|
|
||||||
} else if (level == 185) {
|
|
||||||
yellowMessage("Legend has it that you're a legend.");
|
|
||||||
} else if (level == 190) {
|
|
||||||
yellowMessage("You only have 10 more levels to go until you hit 200!");
|
|
||||||
} else if (level == 195) {
|
|
||||||
yellowMessage("Nothing is stopping you at this point, level 195!");
|
|
||||||
} else if (level == 200) {
|
|
||||||
yellowMessage("Very nicely done! You have reached the so-long dreamed LEVEL 200!!! You are truly a hero among men, cheers upon you!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPlayerRates() {
|
public void setPlayerRates() {
|
||||||
this.expRate *= GameConstants.getPlayerBonusExpRate(this.level / 20);
|
this.expRate *= GameConstants.getPlayerBonusExpRate(this.level / 20);
|
||||||
this.mesoRate *= GameConstants.getPlayerBonusMesoRate(this.level / 20);
|
this.mesoRate *= GameConstants.getPlayerBonusMesoRate(this.level / 20);
|
||||||
|
|||||||
@@ -285,6 +285,12 @@ public class DueyProcessor {
|
|||||||
if (c.tryacquireClient()) {
|
if (c.tryacquireClient()) {
|
||||||
try {
|
try {
|
||||||
int fee = Trade.getFee(sendMesos);
|
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) {
|
if (!quick) {
|
||||||
fee += 5000;
|
fee += 5000;
|
||||||
} else if (!c.getPlayer().haveItem(ItemId.QUICK_DELIVERY_TICKET)) {
|
} else if (!c.getPlayer().haveItem(ItemId.QUICK_DELIVERY_TICKET)) {
|
||||||
|
|||||||
@@ -71,8 +71,9 @@ public class ByteBufOutPacket implements OutPacket {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeString(String value) {
|
public void writeString(String value) {
|
||||||
writeShort((short) value.length());
|
byte[] bytes = value.getBytes(CharsetConstants.CHARSET);
|
||||||
writeBytes(value.getBytes(CharsetConstants.CHARSET));
|
writeShort(bytes.length);
|
||||||
|
writeBytes(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public final class WeddingHandler extends AbstractPacketHandler {
|
|||||||
if (!item.isUntradeable()) {
|
if (!item.isUntradeable()) {
|
||||||
if (itemid == item.getItemId() && quantity <= item.getQuantity()) {
|
if (itemid == item.getItemId() && quantity <= item.getQuantity()) {
|
||||||
newItem = item.copy();
|
newItem = item.copy();
|
||||||
|
newItem.setQuantity(quantity);
|
||||||
marriage.addGiftItem(groomWishlist, newItem);
|
marriage.addGiftItem(groomWishlist, newItem);
|
||||||
InventoryManipulator.removeFromSlot(c, type, slot, quantity, false, false);
|
InventoryManipulator.removeFromSlot(c, type, slot, quantity, false, false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user