Several PQ platform patches + Quest complete count + Fast meso drop
Implemented CPQ challenges using the matching system. Fixed LanguageConstants statically acting for all players. Fixed OPQ's <On the Way Up> stage sometimes leading players to unexpected platforms. Fixed EllinPQ fountain not giving Altaire Fragment to players. Fixed "Lab - Unit" stage on RnJPQ, now using correlated sequences between the units. Fixed Fredrick handing out negative values of mesos to players. Improved "goto" command info. Implemented quest complete count. Fixed mobs still being "controlled" by players even though it's already dead. Concurrently protected adding items into inventory. Concurrently protected EXP gain through Writs of Solomon. Adjusted smoothly respawn rate of mobs in map (solo players in a map now experiences 75% of mobs spawned). Fixed mesos not being able to drop so frequently (prior 200ms threshold between drops). Tweaked matchchecking so that match checking doesn't outright dispose matching members on dismissal (match still sticks to the player until they answer or timeout). Fixed a dupe case within storage's item store. Added any-NPC scriptable to the source.
This commit is contained in:
@@ -34,6 +34,7 @@ import com.mysql.jdbc.Statement;
|
||||
import constants.ServerConstants;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -297,8 +298,20 @@ public class MapleHiredMerchant extends AbstractMapleMapObject {
|
||||
try {
|
||||
Connection con = DatabaseConnection.getConnection();
|
||||
|
||||
try (PreparedStatement ps = con.prepareStatement("UPDATE characters SET MerchantMesos = MerchantMesos + " + price + " WHERE id = ?", Statement.RETURN_GENERATED_KEYS)) {
|
||||
long merchantMesos = 0;
|
||||
try (PreparedStatement ps = con.prepareStatement("SELECT MerchantMesos FROM characters WHERE id = ?")) {
|
||||
ps.setInt(1, ownerId);
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
if (rs.next()) {
|
||||
merchantMesos = rs.getInt(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
merchantMesos += price;
|
||||
|
||||
try (PreparedStatement ps = con.prepareStatement("UPDATE characters SET MerchantMesos = ? WHERE id = ?", Statement.RETURN_GENERATED_KEYS)) {
|
||||
ps.setInt(1, (int) Math.min(merchantMesos, Integer.MAX_VALUE));
|
||||
ps.setInt(2, ownerId);
|
||||
ps.executeUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -1380,12 +1380,13 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
if (chr == null) {
|
||||
if(removeKilledMonsterObject(monster)) {
|
||||
if (removeKilledMonsterObject(monster)) {
|
||||
monster.dispatchMonsterKilled(false);
|
||||
broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), animation), monster.getPosition());
|
||||
monster.aggroSwitchController(null, false);
|
||||
}
|
||||
} else {
|
||||
if(removeKilledMonsterObject(monster)) {
|
||||
if (removeKilledMonsterObject(monster)) {
|
||||
if (monster.getStats().getLevel() >= chr.getLevel() + 30 && !chr.isGM()) {
|
||||
AutobanFactory.GENERAL.alert(chr, " for killing a " + monster.getName() + " which is over 30 levels higher.");
|
||||
}
|
||||
@@ -3676,7 +3677,7 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
private static double getCurrentSpawnRate(int numPlayers) {
|
||||
return 0.550 + (0.075 * Math.min(6, numPlayers));
|
||||
return 0.70 + (0.05 * Math.min(6, numPlayers));
|
||||
}
|
||||
|
||||
private int getNumShouldSpawn(int numPlayers) {
|
||||
|
||||
@@ -110,7 +110,7 @@ public class MapleMapFactory {
|
||||
int y = MapleDataTool.getInt(life.getChildByPath("y"));
|
||||
int hide = MapleDataTool.getInt("hide", life, 0);
|
||||
int mobTime = MapleDataTool.getInt("mobTime", life, 0);
|
||||
|
||||
|
||||
loadLifeRaw(map, Integer.parseInt(id), type, cy, f, fh, rx0, rx1, x, y, hide, mobTime, team);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user