Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d916502f58 | ||
|
|
1791365e0f | ||
|
|
de2a86c859 | ||
|
|
5aeed01e38 | ||
|
|
6ab1af99da | ||
|
|
c7b2d218ef | ||
|
|
01ae462b72 | ||
|
|
eb603e7ee9 | ||
|
|
b67b29def5 | ||
|
|
d22d9b603b | ||
|
|
16b0a36c86 | ||
|
|
313f48d4ce | ||
|
|
db82cbcfae | ||
|
|
eed47a9064 | ||
|
|
9945d37df8 | ||
|
|
4e743128e9 | ||
|
|
2ed35db216 | ||
|
|
0d684c1400 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/logs/**
|
||||
.idea/
|
||||
.idea/*
|
||||
!.idea/codeStyles/
|
||||
*.iml
|
||||
/target
|
||||
|
||||
@@ -16,3 +17,7 @@
|
||||
.project
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# Database
|
||||
database/docker-db-data
|
||||
database/docker-pg-db-data
|
||||
|
||||
8
.idea/codeStyles/Project.xml
generated
Normal file
8
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
|
||||
</JavaCodeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
12
pom.xml
12
pom.xml
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>cosmic-maplestory</groupId>
|
||||
@@ -52,7 +53,8 @@
|
||||
<!-- Maven plugins -->
|
||||
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version> <!-- For running unit tests -->
|
||||
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version> <!-- Disabled. (for building thin jar) -->
|
||||
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
|
||||
<maven-assembly-plugin.version>3.7.1
|
||||
</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
|
||||
|
||||
<!-- Dependencies -->
|
||||
<slf4j-api.version>2.0.13</slf4j-api.version> <!-- Logging facade -->
|
||||
@@ -180,6 +182,12 @@
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<version>${mockito.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
|
||||
public class BuddyList {
|
||||
public enum BuddyOperation {
|
||||
|
||||
@@ -2068,7 +2068,7 @@ public class Character extends AbstractCharacterObject {
|
||||
this.getCashShop().gainCash(1, nxGain);
|
||||
|
||||
if (YamlConfig.config.server.USE_ANNOUNCE_NX_COUPON_LOOT) {
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(CashShop.NX_CREDIT) + " NX)", 300);
|
||||
}
|
||||
|
||||
this.getMap().pickItemDrop(pickupPacket, mapitem);
|
||||
@@ -2120,7 +2120,7 @@ public class Character extends AbstractCharacterObject {
|
||||
this.getCashShop().gainCash(1, nxGain);
|
||||
|
||||
if (YamlConfig.config.server.USE_ANNOUNCE_NX_COUPON_LOOT) {
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
|
||||
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(CashShop.NX_CREDIT) + " NX)", 300);
|
||||
}
|
||||
} else if (applyConsumeOnPickup(mItem.getItemId())) {
|
||||
} else if (InventoryManipulator.addFromDrop(client, mItem, true)) {
|
||||
|
||||
@@ -44,7 +44,11 @@ import net.server.coordinator.session.SessionCoordinator.AntiMulticlientResult;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.guild.GuildCharacter;
|
||||
import net.server.guild.GuildPackets;
|
||||
import net.server.world.*;
|
||||
import net.server.world.MessengerCharacter;
|
||||
import net.server.world.Party;
|
||||
import net.server.world.PartyCharacter;
|
||||
import net.server.world.PartyOperation;
|
||||
import net.server.world.World;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
@@ -73,9 +77,23 @@ import java.net.InetSocketAddress;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
@@ -1581,4 +1599,4 @@ public class Client extends ChannelInboundHandlerAdapter {
|
||||
public void setLanguage(int lingua) {
|
||||
this.lang = lingua;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,12 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
|
||||
@@ -24,7 +24,11 @@ package client;
|
||||
import server.quest.Quest;
|
||||
import tools.StringUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Matze
|
||||
|
||||
@@ -21,8 +21,63 @@
|
||||
*/
|
||||
package client;
|
||||
|
||||
import constants.skills.*;
|
||||
import provider.*;
|
||||
import constants.skills.Aran;
|
||||
import constants.skills.Archer;
|
||||
import constants.skills.Assassin;
|
||||
import constants.skills.Bandit;
|
||||
import constants.skills.Beginner;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.BlazeWizard;
|
||||
import constants.skills.Bowmaster;
|
||||
import constants.skills.Buccaneer;
|
||||
import constants.skills.ChiefBandit;
|
||||
import constants.skills.Cleric;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.Crossbowman;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.DarkKnight;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.DragonKnight;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.FPWizard;
|
||||
import constants.skills.Fighter;
|
||||
import constants.skills.GM;
|
||||
import constants.skills.Gunslinger;
|
||||
import constants.skills.Hermit;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.Hunter;
|
||||
import constants.skills.ILArchMage;
|
||||
import constants.skills.ILMage;
|
||||
import constants.skills.ILWizard;
|
||||
import constants.skills.Legend;
|
||||
import constants.skills.Magician;
|
||||
import constants.skills.Marauder;
|
||||
import constants.skills.Marksman;
|
||||
import constants.skills.NightLord;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Noblesse;
|
||||
import constants.skills.Page;
|
||||
import constants.skills.Paladin;
|
||||
import constants.skills.Pirate;
|
||||
import constants.skills.Priest;
|
||||
import constants.skills.Ranger;
|
||||
import constants.skills.Rogue;
|
||||
import constants.skills.Shadower;
|
||||
import constants.skills.Sniper;
|
||||
import constants.skills.Spearman;
|
||||
import constants.skills.SuperGM;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.Warrior;
|
||||
import constants.skills.WhiteKnight;
|
||||
import constants.skills.WindArcher;
|
||||
import provider.Data;
|
||||
import provider.DataDirectoryEntry;
|
||||
import provider.DataFileEntry;
|
||||
import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
import provider.DataTool;
|
||||
import provider.wz.WZFiles;
|
||||
import server.StatEffect;
|
||||
import server.life.Element;
|
||||
|
||||
@@ -27,7 +27,10 @@ import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public class UptimeCommand extends Command {
|
||||
{
|
||||
|
||||
@@ -28,7 +28,11 @@ import client.Client;
|
||||
import client.command.Command;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.NpcId;
|
||||
import server.maps.*;
|
||||
import server.maps.FieldLimit;
|
||||
import server.maps.MapFactory;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MiniDungeonInfo;
|
||||
import server.maps.Portal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -11,7 +11,11 @@ import tools.exceptions.IdTypeNotSupportedException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
package client.command.commands.gm2;
|
||||
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.command.Command;
|
||||
import provider.Data;
|
||||
import provider.DataProviderFactory;
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
package client.command.commands.gm2;
|
||||
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.command.Command;
|
||||
import provider.Data;
|
||||
import provider.DataProviderFactory;
|
||||
|
||||
@@ -30,7 +30,10 @@ import net.server.Server;
|
||||
import net.server.world.World;
|
||||
import server.TimerManager;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public class ShutdownCommand extends Command {
|
||||
{
|
||||
|
||||
@@ -31,7 +31,14 @@ import server.ItemInformationProvider;
|
||||
import server.ThreadManager;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
@@ -652,4 +659,4 @@ public class Inventory implements Iterable<Item> {
|
||||
public void dispose() {
|
||||
owner = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,11 @@ package client.inventory;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.Pair;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
@@ -418,4 +422,4 @@ public enum ItemFactory {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,12 @@ package client.inventory.manipulator;
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.inventory.*;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ModifyInventory;
|
||||
import client.inventory.Pet;
|
||||
import client.newyear.NewYearCardRecord;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
|
||||
@@ -45,7 +45,12 @@ import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@@ -41,7 +41,11 @@ import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -24,13 +24,22 @@
|
||||
package client.processor.stat;
|
||||
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.Stat;
|
||||
import client.autoban.AutobanFactory;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import config.YamlConfig;
|
||||
import constants.skills.*;
|
||||
import constants.skills.BlazeWizard;
|
||||
import constants.skills.Brawler;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.Magician;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.Warrior;
|
||||
import net.packet.InPacket;
|
||||
import tools.PacketCreator;
|
||||
import tools.Randomizer;
|
||||
|
||||
@@ -312,6 +312,10 @@ public class ItemId {
|
||||
return itemId == NX_CARD_100 || itemId == NX_CARD_250;
|
||||
}
|
||||
|
||||
public static boolean isCashPackage(int itemId) {
|
||||
return itemId / 10000 == 910;
|
||||
}
|
||||
|
||||
// Face expression
|
||||
private static final int FACE_EXPRESSION_MIN = 5160000;
|
||||
private static final int FACE_EXPRESSION_MAX = 5160014;
|
||||
|
||||
@@ -23,11 +23,174 @@ package net;
|
||||
|
||||
import net.netty.LoginServer;
|
||||
import net.opcodes.RecvOpcode;
|
||||
import net.server.channel.handlers.*;
|
||||
import net.server.channel.handlers.AcceptFamilyHandler;
|
||||
import net.server.channel.handlers.AdminChatHandler;
|
||||
import net.server.channel.handlers.AdminCommandHandler;
|
||||
import net.server.channel.handlers.AdminLogHandler;
|
||||
import net.server.channel.handlers.AllianceOperationHandler;
|
||||
import net.server.channel.handlers.AranComboHandler;
|
||||
import net.server.channel.handlers.AutoAggroHandler;
|
||||
import net.server.channel.handlers.AutoAssignHandler;
|
||||
import net.server.channel.handlers.BBSOperationHandler;
|
||||
import net.server.channel.handlers.BeholderHandler;
|
||||
import net.server.channel.handlers.BuddylistModifyHandler;
|
||||
import net.server.channel.handlers.CancelBuffHandler;
|
||||
import net.server.channel.handlers.CancelChairHandler;
|
||||
import net.server.channel.handlers.CancelDebuffHandler;
|
||||
import net.server.channel.handlers.CancelItemEffectHandler;
|
||||
import net.server.channel.handlers.CashOperationHandler;
|
||||
import net.server.channel.handlers.CashShopSurpriseHandler;
|
||||
import net.server.channel.handlers.ChangeChannelHandler;
|
||||
import net.server.channel.handlers.ChangeMapHandler;
|
||||
import net.server.channel.handlers.ChangeMapSpecialHandler;
|
||||
import net.server.channel.handlers.CharInfoRequestHandler;
|
||||
import net.server.channel.handlers.ClickGuideHandler;
|
||||
import net.server.channel.handlers.CloseChalkboardHandler;
|
||||
import net.server.channel.handlers.CloseRangeDamageHandler;
|
||||
import net.server.channel.handlers.CoconutHandler;
|
||||
import net.server.channel.handlers.CouponCodeHandler;
|
||||
import net.server.channel.handlers.DamageSummonHandler;
|
||||
import net.server.channel.handlers.DenyAllianceRequestHandler;
|
||||
import net.server.channel.handlers.DenyGuildRequestHandler;
|
||||
import net.server.channel.handlers.DenyPartyRequestHandler;
|
||||
import net.server.channel.handlers.DistributeAPHandler;
|
||||
import net.server.channel.handlers.DistributeSPHandler;
|
||||
import net.server.channel.handlers.DoorHandler;
|
||||
import net.server.channel.handlers.DueyHandler;
|
||||
import net.server.channel.handlers.EnterCashShopHandler;
|
||||
import net.server.channel.handlers.EnterMTSHandler;
|
||||
import net.server.channel.handlers.FaceExpressionHandler;
|
||||
import net.server.channel.handlers.FamilyAddHandler;
|
||||
import net.server.channel.handlers.FamilyPreceptsHandler;
|
||||
import net.server.channel.handlers.FamilySeparateHandler;
|
||||
import net.server.channel.handlers.FamilySummonResponseHandler;
|
||||
import net.server.channel.handlers.FamilyUseHandler;
|
||||
import net.server.channel.handlers.FieldDamageMobHandler;
|
||||
import net.server.channel.handlers.FredrickHandler;
|
||||
import net.server.channel.handlers.GeneralChatHandler;
|
||||
import net.server.channel.handlers.GiveFameHandler;
|
||||
import net.server.channel.handlers.GrenadeEffectHandler;
|
||||
import net.server.channel.handlers.GuildOperationHandler;
|
||||
import net.server.channel.handlers.HealOvertimeHandler;
|
||||
import net.server.channel.handlers.HiredMerchantRequest;
|
||||
import net.server.channel.handlers.InnerPortalHandler;
|
||||
import net.server.channel.handlers.InventoryMergeHandler;
|
||||
import net.server.channel.handlers.InventorySortHandler;
|
||||
import net.server.channel.handlers.ItemMoveHandler;
|
||||
import net.server.channel.handlers.ItemPickupHandler;
|
||||
import net.server.channel.handlers.ItemRewardHandler;
|
||||
import net.server.channel.handlers.KeymapChangeHandler;
|
||||
import net.server.channel.handlers.LeftKnockbackHandler;
|
||||
import net.server.channel.handlers.MTSHandler;
|
||||
import net.server.channel.handlers.MagicDamageHandler;
|
||||
import net.server.channel.handlers.MakerSkillHandler;
|
||||
import net.server.channel.handlers.MesoDropHandler;
|
||||
import net.server.channel.handlers.MessengerHandler;
|
||||
import net.server.channel.handlers.MobBanishPlayerHandler;
|
||||
import net.server.channel.handlers.MobDamageMobFriendlyHandler;
|
||||
import net.server.channel.handlers.MobDamageMobHandler;
|
||||
import net.server.channel.handlers.MonsterBombHandler;
|
||||
import net.server.channel.handlers.MonsterBookCoverHandler;
|
||||
import net.server.channel.handlers.MonsterCarnivalHandler;
|
||||
import net.server.channel.handlers.MoveDragonHandler;
|
||||
import net.server.channel.handlers.MoveLifeHandler;
|
||||
import net.server.channel.handlers.MovePetHandler;
|
||||
import net.server.channel.handlers.MovePlayerHandler;
|
||||
import net.server.channel.handlers.MoveSummonHandler;
|
||||
import net.server.channel.handlers.MultiChatHandler;
|
||||
import net.server.channel.handlers.NPCAnimationHandler;
|
||||
import net.server.channel.handlers.NPCMoreTalkHandler;
|
||||
import net.server.channel.handlers.NPCShopHandler;
|
||||
import net.server.channel.handlers.NPCTalkHandler;
|
||||
import net.server.channel.handlers.NewYearCardHandler;
|
||||
import net.server.channel.handlers.NoteActionHandler;
|
||||
import net.server.channel.handlers.OpenFamilyHandler;
|
||||
import net.server.channel.handlers.OpenFamilyPedigreeHandler;
|
||||
import net.server.channel.handlers.OwlWarpHandler;
|
||||
import net.server.channel.handlers.PartyOperationHandler;
|
||||
import net.server.channel.handlers.PartySearchRegisterHandler;
|
||||
import net.server.channel.handlers.PartySearchStartHandler;
|
||||
import net.server.channel.handlers.PartySearchUpdateHandler;
|
||||
import net.server.channel.handlers.PetAutoPotHandler;
|
||||
import net.server.channel.handlers.PetChatHandler;
|
||||
import net.server.channel.handlers.PetCommandHandler;
|
||||
import net.server.channel.handlers.PetExcludeItemsHandler;
|
||||
import net.server.channel.handlers.PetFoodHandler;
|
||||
import net.server.channel.handlers.PetLootHandler;
|
||||
import net.server.channel.handlers.PlayerInteractionHandler;
|
||||
import net.server.channel.handlers.PlayerLoggedinHandler;
|
||||
import net.server.channel.handlers.PlayerMapTransitionHandler;
|
||||
import net.server.channel.handlers.QuestActionHandler;
|
||||
import net.server.channel.handlers.QuickslotKeyMappedModifiedHandler;
|
||||
import net.server.channel.handlers.RPSActionHandler;
|
||||
import net.server.channel.handlers.RaiseIncExpHandler;
|
||||
import net.server.channel.handlers.RaiseUIStateHandler;
|
||||
import net.server.channel.handlers.RangedAttackHandler;
|
||||
import net.server.channel.handlers.ReactorHitHandler;
|
||||
import net.server.channel.handlers.RemoteGachaponHandler;
|
||||
import net.server.channel.handlers.RemoteStoreHandler;
|
||||
import net.server.channel.handlers.ReportHandler;
|
||||
import net.server.channel.handlers.RingActionHandler;
|
||||
import net.server.channel.handlers.ScriptedItemHandler;
|
||||
import net.server.channel.handlers.ScrollHandler;
|
||||
import net.server.channel.handlers.SkillBookHandler;
|
||||
import net.server.channel.handlers.SkillEffectHandler;
|
||||
import net.server.channel.handlers.SkillMacroHandler;
|
||||
import net.server.channel.handlers.SnowballHandler;
|
||||
import net.server.channel.handlers.SpawnPetHandler;
|
||||
import net.server.channel.handlers.SpecialMoveHandler;
|
||||
import net.server.channel.handlers.SpouseChatHandler;
|
||||
import net.server.channel.handlers.StorageHandler;
|
||||
import net.server.channel.handlers.SummonDamageHandler;
|
||||
import net.server.channel.handlers.TakeDamageHandler;
|
||||
import net.server.channel.handlers.TouchMonsterDamageHandler;
|
||||
import net.server.channel.handlers.TouchReactorHandler;
|
||||
import net.server.channel.handlers.TouchingCashShopHandler;
|
||||
import net.server.channel.handlers.TransferNameHandler;
|
||||
import net.server.channel.handlers.TransferNameResultHandler;
|
||||
import net.server.channel.handlers.TransferWorldHandler;
|
||||
import net.server.channel.handlers.TrockAddMapHandler;
|
||||
import net.server.channel.handlers.UseCashItemHandler;
|
||||
import net.server.channel.handlers.UseCatchItemHandler;
|
||||
import net.server.channel.handlers.UseChairHandler;
|
||||
import net.server.channel.handlers.UseDeathItemHandler;
|
||||
import net.server.channel.handlers.UseGachaExpHandler;
|
||||
import net.server.channel.handlers.UseHammerHandler;
|
||||
import net.server.channel.handlers.UseItemEffectHandler;
|
||||
import net.server.channel.handlers.UseItemHandler;
|
||||
import net.server.channel.handlers.UseMapleLifeHandler;
|
||||
import net.server.channel.handlers.UseMountFoodHandler;
|
||||
import net.server.channel.handlers.UseOwlOfMinervaHandler;
|
||||
import net.server.channel.handlers.UseSolomonHandler;
|
||||
import net.server.channel.handlers.UseSummonBagHandler;
|
||||
import net.server.channel.handlers.UseWaterOfLifeHandler;
|
||||
import net.server.channel.handlers.WeddingHandler;
|
||||
import net.server.channel.handlers.WeddingTalkHandler;
|
||||
import net.server.channel.handlers.WeddingTalkMoreHandler;
|
||||
import net.server.channel.handlers.WhisperHandler;
|
||||
import net.server.handlers.CustomPacketHandler;
|
||||
import net.server.handlers.KeepAliveHandler;
|
||||
import net.server.handlers.LoginRequiringNoOpHandler;
|
||||
import net.server.handlers.login.*;
|
||||
import net.server.handlers.login.AcceptToSHandler;
|
||||
import net.server.handlers.login.AfterLoginHandler;
|
||||
import net.server.handlers.login.CharSelectedHandler;
|
||||
import net.server.handlers.login.CharSelectedWithPicHandler;
|
||||
import net.server.handlers.login.CharlistRequestHandler;
|
||||
import net.server.handlers.login.CheckCharNameHandler;
|
||||
import net.server.handlers.login.CreateCharHandler;
|
||||
import net.server.handlers.login.DeleteCharHandler;
|
||||
import net.server.handlers.login.GuestLoginHandler;
|
||||
import net.server.handlers.login.LoginPasswordHandler;
|
||||
import net.server.handlers.login.RegisterPicHandler;
|
||||
import net.server.handlers.login.RegisterPinHandler;
|
||||
import net.server.handlers.login.RelogRequestHandler;
|
||||
import net.server.handlers.login.ServerStatusRequestHandler;
|
||||
import net.server.handlers.login.ServerlistRequestHandler;
|
||||
import net.server.handlers.login.SetGenderHandler;
|
||||
import net.server.handlers.login.ViewAllCharHandler;
|
||||
import net.server.handlers.login.ViewAllCharRegisterPicHandler;
|
||||
import net.server.handlers.login.ViewAllCharSelectedHandler;
|
||||
import net.server.handlers.login.ViewAllCharSelectedWithPicHandler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -286,4 +449,4 @@ public final class PacketProcessor {
|
||||
registerHandler(RecvOpcode.USE_ITEMUI, new RaiseIncExpHandler());
|
||||
registerHandler(RecvOpcode.CHANGE_QUICKSLOT, new QuickslotKeyMappedModifiedHandler());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,11 @@ public class ByteBufInPacket implements InPacket {
|
||||
return byteBuf.readerIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ByteBufInPacket other && byteBuf.equals(other.byteBuf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final int readerIndex = byteBuf.readerIndex();
|
||||
|
||||
@@ -91,4 +91,9 @@ public class ByteBufOutPacket implements OutPacket {
|
||||
public void skip(int numberOfBytes) {
|
||||
writeBytes(new byte[numberOfBytes]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ByteBufOutPacket other && byteBuf.equals(other.byteBuf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,11 @@ package net.server;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
@@ -124,4 +128,4 @@ public class PlayerStorage {
|
||||
rlock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,17 @@ import net.server.coordinator.session.SessionCoordinator;
|
||||
import net.server.guild.Alliance;
|
||||
import net.server.guild.Guild;
|
||||
import net.server.guild.GuildCharacter;
|
||||
import net.server.task.*;
|
||||
import net.server.task.BossLogTask;
|
||||
import net.server.task.CharacterDiseaseTask;
|
||||
import net.server.task.CouponTask;
|
||||
import net.server.task.DueyFredrickTask;
|
||||
import net.server.task.EventRecallCoordinatorTask;
|
||||
import net.server.task.InvitationTask;
|
||||
import net.server.task.LoginCoordinatorTask;
|
||||
import net.server.task.LoginStorageTask;
|
||||
import net.server.task.RankingCommandTask;
|
||||
import net.server.task.RankingLoginTask;
|
||||
import net.server.task.RespawnTask;
|
||||
import net.server.world.World;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.slf4j.Logger;
|
||||
@@ -69,8 +79,20 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
@@ -80,7 +102,10 @@ import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public class Server {
|
||||
private static final Logger log = LoggerFactory.getLogger(Server.class);
|
||||
|
||||
@@ -41,7 +41,11 @@ import server.TimerManager;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.Expedition;
|
||||
import server.expeditions.ExpeditionType;
|
||||
import server.maps.*;
|
||||
import server.maps.HiredMerchant;
|
||||
import server.maps.MapManager;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MiniDungeon;
|
||||
import server.maps.MiniDungeonInfo;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -49,14 +53,25 @@ import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public final class Channel {
|
||||
private static final Logger log = LoggerFactory.getLogger(Channel.class);
|
||||
@@ -1035,4 +1050,4 @@ public final class Channel {
|
||||
log.debug("Guest list: {}", ongoingChapelGuests);
|
||||
log.debug("Starttime: {}", ongoingStartTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,11 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.autoban.AutobanFactory;
|
||||
import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
@@ -31,14 +34,66 @@ import constants.game.GameConstants;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.id.MobId;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Aran;
|
||||
import constants.skills.Assassin;
|
||||
import constants.skills.Bandit;
|
||||
import constants.skills.Beginner;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.BlazeWizard;
|
||||
import constants.skills.Bowmaster;
|
||||
import constants.skills.Brawler;
|
||||
import constants.skills.Buccaneer;
|
||||
import constants.skills.ChiefBandit;
|
||||
import constants.skills.Cleric;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.Crossbowman;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.DragonKnight;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.FPWizard;
|
||||
import constants.skills.Fighter;
|
||||
import constants.skills.Gunslinger;
|
||||
import constants.skills.Hermit;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.Hunter;
|
||||
import constants.skills.ILArchMage;
|
||||
import constants.skills.ILMage;
|
||||
import constants.skills.Legend;
|
||||
import constants.skills.Marauder;
|
||||
import constants.skills.Marksman;
|
||||
import constants.skills.NightLord;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Noblesse;
|
||||
import constants.skills.Outlaw;
|
||||
import constants.skills.Page;
|
||||
import constants.skills.Paladin;
|
||||
import constants.skills.Ranger;
|
||||
import constants.skills.Rogue;
|
||||
import constants.skills.Shadower;
|
||||
import constants.skills.Sniper;
|
||||
import constants.skills.Spearman;
|
||||
import constants.skills.SuperGM;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.WhiteKnight;
|
||||
import constants.skills.WindArcher;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.PlayerBuffValueHolder;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
import server.StatEffect;
|
||||
import server.TimerManager;
|
||||
import server.life.*;
|
||||
import server.life.Element;
|
||||
import server.life.ElementalEffectiveness;
|
||||
import server.life.MobSkill;
|
||||
import server.life.MobSkillFactory;
|
||||
import server.life.MobSkillId;
|
||||
import server.life.MobSkillType;
|
||||
import server.life.Monster;
|
||||
import server.life.MonsterDropEntry;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import server.maps.MapItem;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
@@ -47,8 +102,12 @@ import tools.PacketCreator;
|
||||
import tools.Randomizer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
@@ -630,9 +689,10 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
||||
calcDmgMax = chr.calculateMaxBaseDamage(chr.getTotalWatk());
|
||||
}
|
||||
|
||||
StatEffect effect = null;
|
||||
if (ret.skill != 0) {
|
||||
Skill skill = SkillFactory.getSkill(ret.skill);
|
||||
StatEffect effect = skill.getEffect(ret.skilllevel);
|
||||
effect = skill.getEffect(ret.skilllevel);
|
||||
|
||||
if (magic) {
|
||||
// Since the skill is magic based, use the magic formula
|
||||
@@ -871,6 +931,16 @@ public abstract class AbstractDealDamageHandler extends AbstractPacketHandler {
|
||||
damage = -Integer.MAX_VALUE + damage - 1;
|
||||
}
|
||||
|
||||
if(effect != null) {
|
||||
int maxattack = Math.max(effect.getBulletCount(), effect.getAttackCount());
|
||||
if (shadowPartner) {
|
||||
maxattack = maxattack * 2;
|
||||
}
|
||||
if (ret.numDamage > maxattack) {
|
||||
AutobanFactory.DAMAGE_HACK.addPoint(chr.getAutobanManager(), "Too many lines: " + ret.numDamage + " Max lines: " + maxattack + " SID: " + ret.skill + " MobID: " + (monster != null ? monster.getId() : "null") + " Map: " + chr.getMap().getMapName() + " (" + chr.getMapId() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
allDamageNumbers.add(damage);
|
||||
}
|
||||
if (ret.skill != Corsair.RAPID_FIRE || ret.skill != Aran.HIDDEN_FULL_DOUBLE || ret.skill != Aran.HIDDEN_FULL_TRIPLE || ret.skill != Aran.HIDDEN_OVER_DOUBLE || ret.skill != Aran.HIDDEN_OVER_TRIPLE) {
|
||||
|
||||
@@ -26,7 +26,12 @@ import net.packet.InPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.maps.AnimatedMapObject;
|
||||
import server.movement.*;
|
||||
import server.movement.AbsoluteLifeMovement;
|
||||
import server.movement.ChangeEquip;
|
||||
import server.movement.JumpDownMovement;
|
||||
import server.movement.LifeMovementFragment;
|
||||
import server.movement.RelativeLifeMovement;
|
||||
import server.movement.TeleportMovement;
|
||||
import tools.exceptions.EmptyMovementException;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -21,10 +21,13 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.*;
|
||||
import client.BuddyList;
|
||||
import client.BuddyList.BuddyAddResult;
|
||||
import client.Character;
|
||||
import client.BuddyList.BuddyOperation;
|
||||
import client.BuddylistEntry;
|
||||
import client.Character;
|
||||
import client.CharacterNameAndId;
|
||||
import client.Client;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.world.World;
|
||||
|
||||
@@ -23,7 +23,14 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import client.SkillFactory;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.Bowmaster;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
import constants.skills.ILArchMage;
|
||||
import constants.skills.Marksman;
|
||||
import constants.skills.WindArcher;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.PacketHandler;
|
||||
import net.packet.InPacket;
|
||||
@@ -53,4 +60,4 @@ public final class CancelBuffHandler extends AbstractPacketHandler implements Pa
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public final class CashOperationHandler extends AbstractPacketHandler {
|
||||
CashItem cItem = CashItemFactory.getItem(p.readInt());
|
||||
Map<String, String> recipient = Character.getCharacterFromDatabase(p.readString());
|
||||
String message = p.readString();
|
||||
if (!canBuy(chr, cItem, cs.getCash(4)) || message.length() < 1 || message.length() > 73) {
|
||||
if (!canBuy(chr, cItem, cs.getCash(CashShop.NX_PREPAID)) || message.isEmpty() || message.length() > 73) {
|
||||
c.enableCSActions();
|
||||
return;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ public final class CashOperationHandler extends AbstractPacketHandler {
|
||||
c.sendPacket(PacketCreator.showCash(c.getPlayer()));
|
||||
} else if (action == 0x2E) { //name change
|
||||
CashItem cItem = CashItemFactory.getItem(p.readInt());
|
||||
if (cItem == null || !canBuy(chr, cItem, cs.getCash(4))) {
|
||||
if (cItem == null || !canBuy(chr, cItem, cs.getCash(CashShop.NX_PREPAID))) {
|
||||
c.sendPacket(PacketCreator.showCashShopMessage((byte) 0));
|
||||
c.enableCSActions();
|
||||
return;
|
||||
@@ -434,7 +434,7 @@ public final class CashOperationHandler extends AbstractPacketHandler {
|
||||
c.enableCSActions();
|
||||
} else if (action == 0x31) { //world transfer
|
||||
CashItem cItem = CashItemFactory.getItem(p.readInt());
|
||||
if (cItem == null || !canBuy(chr, cItem, cs.getCash(4))) {
|
||||
if (cItem == null || !canBuy(chr, cItem, cs.getCash(CashShop.NX_PREPAID))) {
|
||||
c.sendPacket(PacketCreator.showCashShopMessage((byte) 0));
|
||||
c.enableCSActions();
|
||||
return;
|
||||
|
||||
@@ -24,26 +24,34 @@ import client.inventory.Item;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import server.CashShop;
|
||||
import server.CashShop.CashShopSurpriseResult;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
* @author Ponk
|
||||
*/
|
||||
public class CashShopSurpriseHandler extends AbstractPacketHandler {
|
||||
|
||||
@Override
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
CashShop cs = c.getPlayer().getCashShop();
|
||||
|
||||
if (cs.isOpened()) {
|
||||
Pair<Item, Item> cssResult = cs.openCashShopSurprise();
|
||||
|
||||
if (cssResult != null) {
|
||||
Item cssItem = cssResult.getLeft(), cssBox = cssResult.getRight();
|
||||
c.sendPacket(PacketCreator.onCashGachaponOpenSuccess(c.getAccID(), cssBox.getSN(), cssBox.getQuantity(), cssItem, cssItem.getItemId(), cssItem.getQuantity(), true));
|
||||
} else {
|
||||
c.sendPacket(PacketCreator.onCashItemGachaponOpenFailed());
|
||||
}
|
||||
if (!cs.isOpened()) {
|
||||
return;
|
||||
}
|
||||
|
||||
long cashId = p.readLong();
|
||||
Optional<CashShopSurpriseResult> result = cs.openCashShopSurprise(cashId);
|
||||
if (result.isEmpty()) {
|
||||
c.sendPacket(PacketCreator.onCashItemGachaponOpenFailed());
|
||||
return;
|
||||
}
|
||||
|
||||
Item usedCashShopSurprise = result.get().usedCashShopSurprise();
|
||||
Item reward = result.get().reward();
|
||||
c.sendPacket(PacketCreator.onCashGachaponOpenSuccess(c.getAccID(), usedCashShopSurprise.getCashId(),
|
||||
usedCashShopSurprise.getQuantity(), reward, reward.getItemId(), reward.getQuantity(), true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,22 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.DragonKnight;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Rogue;
|
||||
import constants.skills.WindArcher;
|
||||
import net.packet.InPacket;
|
||||
import server.StatEffect;
|
||||
import tools.PacketCreator;
|
||||
@@ -183,4 +193,4 @@ public final class CloseRangeDamageHandler extends AbstractDealDamageHandler {
|
||||
|
||||
applyAttack(attack, chr, attackCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,11 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,11 @@ package net.server.channel.handlers;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.inventory.*;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ModifyInventory;
|
||||
import config.YamlConfig;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
|
||||
@@ -35,6 +35,7 @@ import net.server.Server;
|
||||
import net.server.channel.Channel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.CashShop;
|
||||
import server.ItemInformationProvider;
|
||||
import server.MTSItemInfo;
|
||||
import tools.DatabaseConnection;
|
||||
@@ -48,7 +49,6 @@ import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
public final class MTSHandler extends AbstractPacketHandler {
|
||||
@@ -403,7 +403,7 @@ public final class MTSHandler extends AbstractPacketHandler {
|
||||
ResultSet rs = ps.executeQuery();
|
||||
if (rs.next()) {
|
||||
int price = rs.getInt("price") + 100 + (int) (rs.getInt("price") * 0.1); // taxes
|
||||
if (c.getPlayer().getCashShop().getCash(4) >= price) { // FIX
|
||||
if (c.getPlayer().getCashShop().getCash(CashShop.NX_PREPAID) >= price) { // FIX
|
||||
boolean alwaysnull = true;
|
||||
for (Channel cserv : Server.getInstance().getAllChannels()) {
|
||||
Character victim = cserv.getPlayerStorage().getCharacterById(rs.getInt("seller"));
|
||||
@@ -460,11 +460,11 @@ public final class MTSHandler extends AbstractPacketHandler {
|
||||
ResultSet rs = ps.executeQuery();
|
||||
if (rs.next()) {
|
||||
int price = rs.getInt("price") + 100 + (int) (rs.getInt("price") * 0.1);
|
||||
if (c.getPlayer().getCashShop().getCash(4) >= price) {
|
||||
if (c.getPlayer().getCashShop().getCash(CashShop.NX_PREPAID) >= price) {
|
||||
for (Channel cserv : Server.getInstance().getAllChannels()) {
|
||||
Character victim = cserv.getPlayerStorage().getCharacterById(rs.getInt("seller"));
|
||||
if (victim != null) {
|
||||
victim.getCashShop().gainCash(4, rs.getInt("price"));
|
||||
victim.getCashShop().gainCash(CashShop.NX_PREPAID, rs.getInt("price"));
|
||||
} else {
|
||||
try (PreparedStatement pse = con.prepareStatement("SELECT accountid FROM characters WHERE id = ?")) {
|
||||
pse.setInt(1, rs.getInt("seller"));
|
||||
|
||||
@@ -21,8 +21,11 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MapId;
|
||||
import constants.skills.Bishop;
|
||||
|
||||
@@ -27,7 +27,12 @@ import config.YamlConfig;
|
||||
import net.packet.InPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.life.*;
|
||||
import server.life.MobSkill;
|
||||
import server.life.MobSkillFactory;
|
||||
import server.life.MobSkillId;
|
||||
import server.life.MobSkillType;
|
||||
import server.life.Monster;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
import server.maps.MapleMap;
|
||||
@@ -176,4 +181,4 @@ public final class MoveLifeHandler extends AbstractMovementPacketHandler {
|
||||
private static boolean inRangeInclusive(Byte pVal, Integer pMin, Integer pMax) {
|
||||
return !(pVal < pMin) || (pVal > pMax);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,15 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.ItemInformationProvider;
|
||||
import server.Trade;
|
||||
import server.maps.*;
|
||||
import server.maps.FieldLimit;
|
||||
import server.maps.HiredMerchant;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
import server.maps.MiniGame;
|
||||
import server.maps.MiniGame.MiniGameType;
|
||||
import server.maps.PlayerShop;
|
||||
import server.maps.PlayerShopItem;
|
||||
import server.maps.Portal;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -21,9 +21,21 @@
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuddyList;
|
||||
import client.BuddylistEntry;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.inventory.*;
|
||||
import client.CharacterNameAndId;
|
||||
import client.Client;
|
||||
import client.Disease;
|
||||
import client.Family;
|
||||
import client.FamilyEntry;
|
||||
import client.Mount;
|
||||
import client.SkillFactory;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.Pet;
|
||||
import client.keybind.KeyBinding;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
@@ -56,8 +68,13 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class PlayerLoggedinHandler extends AbstractPacketHandler {
|
||||
|
||||
@@ -21,8 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
@@ -32,7 +35,13 @@ import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Aran;
|
||||
import constants.skills.Buccaneer;
|
||||
import constants.skills.NightLord;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Shadower;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.WindArcher;
|
||||
import net.packet.InPacket;
|
||||
import net.packet.Packet;
|
||||
import org.slf4j.Logger;
|
||||
@@ -237,4 +246,4 @@ public final class RangedAttackHandler extends AbstractDealDamageHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,23 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Client;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.Bowmaster;
|
||||
import constants.skills.Brawler;
|
||||
import constants.skills.ChiefBandit;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.DarkKnight;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.Gunslinger;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.ILArchMage;
|
||||
import constants.skills.Marksman;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Paladin;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.WindArcher;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import org.slf4j.Logger;
|
||||
@@ -65,4 +81,4 @@ public final class SkillEffectHandler extends AbstractPacketHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,13 @@ import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import config.YamlConfig;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Brawler;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.DarkKnight;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.Paladin;
|
||||
import constants.skills.Priest;
|
||||
import constants.skills.SuperGM;
|
||||
import net.AbstractPacketHandler;
|
||||
import net.packet.InPacket;
|
||||
import net.server.Server;
|
||||
@@ -153,4 +159,4 @@ public final class SpecialMoveHandler extends AbstractPacketHandler {
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
@@ -39,7 +42,12 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.StatEffect;
|
||||
import server.life.LifeFactory.loseItem;
|
||||
import server.life.*;
|
||||
import server.life.MobAttackInfo;
|
||||
import server.life.MobAttackInfoFactory;
|
||||
import server.life.MobSkill;
|
||||
import server.life.MobSkillFactory;
|
||||
import server.life.MobSkillType;
|
||||
import server.life.Monster;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapleMap;
|
||||
import tools.PacketCreator;
|
||||
|
||||
@@ -28,7 +28,11 @@ import net.packet.InPacket;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
@@ -81,4 +85,4 @@ public final class TransferNameHandler extends AbstractPacketHandler {
|
||||
}
|
||||
c.sendPacket(PacketCreator.sendNameTransferRules(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,11 @@ import net.server.Server;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* @author Ronan
|
||||
@@ -76,4 +80,4 @@ public final class TransferWorldHandler extends AbstractPacketHandler {
|
||||
}
|
||||
c.sendPacket(PacketCreator.sendWorldTransferRules(0, c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,22 @@
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.creator.veteran.*;
|
||||
import client.inventory.*;
|
||||
import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.SkillMacro;
|
||||
import client.creator.veteran.BowmanCreator;
|
||||
import client.creator.veteran.MagicianCreator;
|
||||
import client.creator.veteran.PirateCreator;
|
||||
import client.creator.veteran.ThiefCreator;
|
||||
import client.creator.veteran.WarriorCreator;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.Equip.ScrollResult;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ModifyInventory;
|
||||
import client.inventory.Pet;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import client.inventory.manipulator.KarmaManipulator;
|
||||
import client.processor.npc.DueyProcessor;
|
||||
@@ -46,7 +58,12 @@ import server.ItemInformationProvider;
|
||||
import server.Shop;
|
||||
import server.ShopFactory;
|
||||
import server.TimerManager;
|
||||
import server.maps.*;
|
||||
import server.maps.AbstractMapObject;
|
||||
import server.maps.FieldLimit;
|
||||
import server.maps.Kite;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MapleTVEffect;
|
||||
import server.maps.PlayerShopItem;
|
||||
import service.NoteService;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
@@ -25,8 +25,12 @@ import net.server.Server;
|
||||
import net.server.coordinator.matchchecker.MatchCheckerListenerFactory.MatchCheckerType;
|
||||
import net.server.world.World;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,8 +33,14 @@ import provider.wz.WZFiles;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
@@ -22,7 +22,11 @@ package net.server.coordinator.partysearch;
|
||||
import client.Character;
|
||||
import tools.IntervalBuilder;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
@@ -32,8 +32,14 @@ import tools.DatabaseConnection;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -4,7 +4,11 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import tools.DatabaseConnection;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,8 +27,14 @@ import server.life.Monster;
|
||||
import server.maps.MapleMap;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -42,7 +42,13 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
|
||||
@@ -37,7 +37,13 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Date;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
|
||||
public final class LoginPasswordHandler implements PacketHandler {
|
||||
|
||||
@@ -29,7 +29,11 @@ import net.packet.InPacket;
|
||||
import net.server.Server;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public final class ViewAllCharHandler extends AbstractPacketHandler {
|
||||
private static final int CHARACTER_LIMIT = 60; // Client will crash if sending 61 or more characters
|
||||
|
||||
@@ -24,7 +24,11 @@ import net.server.Server;
|
||||
import server.TimerManager;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
@@ -22,7 +22,12 @@ package net.server.services.type;
|
||||
import net.server.services.BaseService;
|
||||
import net.server.services.Service;
|
||||
import net.server.services.ServiceType;
|
||||
import net.server.services.task.channel.*;
|
||||
import net.server.services.task.channel.EventService;
|
||||
import net.server.services.task.channel.MobAnimationService;
|
||||
import net.server.services.task.channel.MobClearSkillService;
|
||||
import net.server.services.task.channel.MobMistService;
|
||||
import net.server.services.task.channel.MobStatusService;
|
||||
import net.server.services.task.channel.OverallService;
|
||||
|
||||
/**
|
||||
* @author Ronan
|
||||
|
||||
@@ -32,7 +32,12 @@ import server.maps.MapleMap;
|
||||
import server.partyquest.MonsterCarnival;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -46,21 +46,57 @@ import net.server.guild.GuildSummary;
|
||||
import net.server.services.BaseService;
|
||||
import net.server.services.ServicesManager;
|
||||
import net.server.services.type.WorldServices;
|
||||
import net.server.task.*;
|
||||
import net.server.task.CharacterAutosaverTask;
|
||||
import net.server.task.CharacterHpDecreaseTask;
|
||||
import net.server.task.FamilyDailyResetTask;
|
||||
import net.server.task.FishingTask;
|
||||
import net.server.task.HiredMerchantTask;
|
||||
import net.server.task.MapOwnershipTask;
|
||||
import net.server.task.MountTirednessTask;
|
||||
import net.server.task.PartySearchTask;
|
||||
import net.server.task.PetFullnessTask;
|
||||
import net.server.task.ServerMessageTask;
|
||||
import net.server.task.TimedMapObjectTask;
|
||||
import net.server.task.TimeoutTask;
|
||||
import net.server.task.WeddingReservationTask;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.event.EventInstanceManager;
|
||||
import server.Storage;
|
||||
import server.TimerManager;
|
||||
import server.maps.*;
|
||||
import server.maps.AbstractMapObject;
|
||||
import server.maps.HiredMerchant;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MiniDungeon;
|
||||
import server.maps.MiniDungeonInfo;
|
||||
import server.maps.PlayerShop;
|
||||
import server.maps.PlayerShopItem;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
import tools.packets.Fishing;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.PriorityQueue;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@@ -69,7 +105,10 @@ import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
import static java.util.concurrent.TimeUnit.DAYS;
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
/**
|
||||
* @author kevintjuh93
|
||||
|
||||
@@ -278,6 +278,10 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
getPlayer().gainMeso(gain);
|
||||
}
|
||||
|
||||
public void gainMeso(Double gain) {
|
||||
getPlayer().gainMeso(gain.intValue());
|
||||
}
|
||||
|
||||
public void gainExp(int gain) {
|
||||
getPlayer().gainExp(gain, true, true);
|
||||
}
|
||||
|
||||
@@ -21,10 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package server;
|
||||
|
||||
import client.inventory.*;
|
||||
import client.inventory.Equip;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ItemFactory;
|
||||
import client.inventory.Pet;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.jcip.annotations.GuardedBy;
|
||||
import net.server.Server;
|
||||
import provider.Data;
|
||||
import provider.DataProvider;
|
||||
@@ -38,7 +43,13 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -47,8 +58,74 @@ import static java.util.concurrent.TimeUnit.HOURS;
|
||||
|
||||
/*
|
||||
* @author Flav
|
||||
* @author Ponk
|
||||
*/
|
||||
public class CashShop {
|
||||
public static final int NX_CREDIT = 1;
|
||||
public static final int MAPLE_POINT = 2;
|
||||
public static final int NX_PREPAID = 4;
|
||||
|
||||
private final int accountId;
|
||||
private final int characterId;
|
||||
private int nxCredit;
|
||||
private int maplePoint;
|
||||
private int nxPrepaid;
|
||||
private boolean opened;
|
||||
private ItemFactory factory;
|
||||
private final List<Item> inventory = new ArrayList<>();
|
||||
private final List<Integer> wishList = new ArrayList<>();
|
||||
private int notes = 0;
|
||||
private final Lock lock = new ReentrantLock();
|
||||
|
||||
public CashShop(int accountId, int characterId, int jobType) throws SQLException {
|
||||
this.accountId = accountId;
|
||||
this.characterId = characterId;
|
||||
|
||||
if (!YamlConfig.config.server.USE_JOINT_CASHSHOP_INVENTORY) {
|
||||
switch (jobType) {
|
||||
case 0:
|
||||
factory = ItemFactory.CASH_EXPLORER;
|
||||
break;
|
||||
case 1:
|
||||
factory = ItemFactory.CASH_CYGNUS;
|
||||
break;
|
||||
case 2:
|
||||
factory = ItemFactory.CASH_ARAN;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
factory = ItemFactory.CASH_OVERALL;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
try (PreparedStatement ps = con.prepareStatement("SELECT `nxCredit`, `maplePoint`, `nxPrepaid` FROM `accounts` WHERE `id` = ?")) {
|
||||
ps.setInt(1, accountId);
|
||||
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
if (rs.next()) {
|
||||
this.nxCredit = rs.getInt("nxCredit");
|
||||
this.maplePoint = rs.getInt("maplePoint");
|
||||
this.nxPrepaid = rs.getInt("nxPrepaid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Pair<Item, InventoryType> item : factory.loadItems(accountId, false)) {
|
||||
inventory.add(item.getLeft());
|
||||
}
|
||||
|
||||
try (PreparedStatement ps = con.prepareStatement("SELECT `sn` FROM `wishlists` WHERE `charid` = ?")) {
|
||||
ps.setInt(1, characterId);
|
||||
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
while (rs.next()) {
|
||||
wishList.add(rs.getInt("sn"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class CashItem {
|
||||
|
||||
private final int sn;
|
||||
@@ -104,19 +181,20 @@ public class CashShop {
|
||||
if (ItemConstants.EXPIRING_ITEMS) {
|
||||
if (period == 1) {
|
||||
switch (itemId) {
|
||||
case ItemId.DROP_COUPON_2X_4H, ItemId.EXP_COUPON_2X_4H: // 4 Hour 2X coupons, the period is 1, but we don't want them to last a day.
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(4));
|
||||
case ItemId.DROP_COUPON_2X_4H,
|
||||
ItemId.EXP_COUPON_2X_4H: // 4 Hour 2X coupons, the period is 1, but we don't want them to last a day.
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(4));
|
||||
/*
|
||||
} else if(itemId == 5211047 || itemId == 5360014) { // 3 Hour 2X coupons, unused as of now
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(3));
|
||||
*/
|
||||
break;
|
||||
case ItemId.EXP_COUPON_3X_2H:
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(2));
|
||||
break;
|
||||
default:
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + DAYS.toMillis(1));
|
||||
break;
|
||||
break;
|
||||
case ItemId.EXP_COUPON_3X_2H:
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + HOURS.toMillis(2));
|
||||
break;
|
||||
default:
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + DAYS.toMillis(1));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
item.setExpiration(Server.getInstance().getCurrentTime() + DAYS.toMillis(period));
|
||||
@@ -154,7 +232,6 @@ public class CashShop {
|
||||
|
||||
public static class CashItemFactory {
|
||||
private static volatile Map<Integer, CashItem> items = new HashMap<>();
|
||||
private static volatile List<Integer> randomitemsns = new ArrayList<>();
|
||||
private static volatile Map<Integer, List<Integer>> packages = new HashMap<>();
|
||||
private static volatile List<SpecialCashItem> specialcashitems = new ArrayList<>();
|
||||
|
||||
@@ -162,7 +239,6 @@ public class CashShop {
|
||||
DataProvider etc = DataProviderFactory.getDataProvider(WZFiles.ETC);
|
||||
|
||||
Map<Integer, CashItem> loadedItems = new HashMap<>();
|
||||
List<Integer> onSaleItems = new ArrayList<>();
|
||||
for (Data item : etc.getData("Commodity.img").getChildren()) {
|
||||
int sn = DataTool.getIntConvert("SN", item);
|
||||
int itemId = DataTool.getIntConvert("ItemId", item);
|
||||
@@ -171,13 +247,8 @@ public class CashShop {
|
||||
short count = (short) DataTool.getIntConvert("Count", item, 1);
|
||||
boolean onSale = DataTool.getIntConvert("OnSale", item, 0) == 1;
|
||||
loadedItems.put(sn, new CashItem(sn, itemId, price, period, count, onSale));
|
||||
|
||||
if (onSale) {
|
||||
onSaleItems.add(sn);
|
||||
}
|
||||
}
|
||||
CashItemFactory.items = loadedItems;
|
||||
CashItemFactory.randomitemsns = onSaleItems;
|
||||
|
||||
Map<Integer, List<Integer>> loadedPackages = new HashMap<>();
|
||||
for (Data cashPackage : etc.getData("CashPackage.img").getChildren()) {
|
||||
@@ -204,13 +275,20 @@ public class CashShop {
|
||||
CashItemFactory.specialcashitems = loadedSpecialItems;
|
||||
}
|
||||
|
||||
public static CashItem getRandomCashItem() {
|
||||
if (randomitemsns.isEmpty()) {
|
||||
return null;
|
||||
public static Optional<CashItem> getRandomCashItem() {
|
||||
if (items.isEmpty()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
int rnd = (int) (Math.random() * randomitemsns.size());
|
||||
return items.get(randomitemsns.get(rnd));
|
||||
List<CashItem> itemPool = items.values().stream()
|
||||
.filter(CashItem::isOnSale)
|
||||
.filter(cashItem -> !ItemId.isCashPackage(cashItem.itemId))
|
||||
.toList();
|
||||
return Optional.of(getRandomItem(itemPool));
|
||||
}
|
||||
|
||||
private static CashItem getRandomItem(List<CashItem> items) {
|
||||
return items.get(new Random().nextInt(items.size()));
|
||||
}
|
||||
|
||||
public static CashItem getItem(int sn) {
|
||||
@@ -234,107 +312,26 @@ public class CashShop {
|
||||
public static List<SpecialCashItem> getSpecialCashItems() {
|
||||
return specialcashitems;
|
||||
}
|
||||
|
||||
public static void reloadSpecialCashItems() {//Yay?
|
||||
List<SpecialCashItem> loadedSpecialItems = new ArrayList<>();
|
||||
try (Connection con = DatabaseConnection.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("SELECT * FROM specialcashitems");
|
||||
ResultSet rs = ps.executeQuery()) {
|
||||
while (rs.next()) {
|
||||
loadedSpecialItems.add(new SpecialCashItem(rs.getInt("sn"), rs.getInt("modifier"), rs.getByte("info")));
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
CashItemFactory.specialcashitems = loadedSpecialItems;
|
||||
}
|
||||
}
|
||||
|
||||
private final int accountId;
|
||||
private final int characterId;
|
||||
private int nxCredit;
|
||||
private int maplePoint;
|
||||
private int nxPrepaid;
|
||||
private boolean opened;
|
||||
private ItemFactory factory;
|
||||
private final List<Item> inventory = new ArrayList<>();
|
||||
private final List<Integer> wishList = new ArrayList<>();
|
||||
private int notes = 0;
|
||||
private final Lock lock = new ReentrantLock();
|
||||
|
||||
public CashShop(int accountId, int characterId, int jobType) throws SQLException {
|
||||
this.accountId = accountId;
|
||||
this.characterId = characterId;
|
||||
|
||||
if (!YamlConfig.config.server.USE_JOINT_CASHSHOP_INVENTORY) {
|
||||
switch (jobType) {
|
||||
case 0:
|
||||
factory = ItemFactory.CASH_EXPLORER;
|
||||
break;
|
||||
case 1:
|
||||
factory = ItemFactory.CASH_CYGNUS;
|
||||
break;
|
||||
case 2:
|
||||
factory = ItemFactory.CASH_ARAN;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
factory = ItemFactory.CASH_OVERALL;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
try (PreparedStatement ps = con.prepareStatement("SELECT `nxCredit`, `maplePoint`, `nxPrepaid` FROM `accounts` WHERE `id` = ?")) {
|
||||
ps.setInt(1, accountId);
|
||||
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
if (rs.next()) {
|
||||
this.nxCredit = rs.getInt("nxCredit");
|
||||
this.maplePoint = rs.getInt("maplePoint");
|
||||
this.nxPrepaid = rs.getInt("nxPrepaid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Pair<Item, InventoryType> item : factory.loadItems(accountId, false)) {
|
||||
inventory.add(item.getLeft());
|
||||
}
|
||||
|
||||
try (PreparedStatement ps = con.prepareStatement("SELECT `sn` FROM `wishlists` WHERE `charid` = ?")) {
|
||||
ps.setInt(1, characterId);
|
||||
|
||||
try (ResultSet rs = ps.executeQuery()) {
|
||||
while (rs.next()) {
|
||||
wishList.add(rs.getInt("sn"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public record CashShopSurpriseResult(Item usedCashShopSurprise, Item reward) {
|
||||
}
|
||||
|
||||
public int getCash(int type) {
|
||||
switch (type) {
|
||||
case 1:
|
||||
return nxCredit;
|
||||
case 2:
|
||||
return maplePoint;
|
||||
case 4:
|
||||
return nxPrepaid;
|
||||
}
|
||||
return switch (type) {
|
||||
case NX_CREDIT -> nxCredit;
|
||||
case MAPLE_POINT -> maplePoint;
|
||||
case NX_PREPAID -> nxPrepaid;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void gainCash(int type, int cash) {
|
||||
switch (type) {
|
||||
case 1:
|
||||
nxCredit += cash;
|
||||
break;
|
||||
case 2:
|
||||
maplePoint += cash;
|
||||
break;
|
||||
case 4:
|
||||
nxPrepaid += cash;
|
||||
break;
|
||||
case NX_CREDIT -> nxCredit += cash;
|
||||
case MAPLE_POINT -> maplePoint += cash;
|
||||
case NX_PREPAID -> nxPrepaid += cash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,47 +514,57 @@ public class CashShop {
|
||||
}
|
||||
}
|
||||
|
||||
private Item getCashShopItemByItemid(int itemid) {
|
||||
public Optional<CashShopSurpriseResult> openCashShopSurprise(long cashId) {
|
||||
lock.lock();
|
||||
try {
|
||||
for (Item it : inventory) {
|
||||
if (it.getItemId() == itemid) {
|
||||
return it;
|
||||
}
|
||||
Optional<Item> maybeCashShopSurprise = getItemByCashId(cashId);
|
||||
if (maybeCashShopSurprise.isEmpty() ||
|
||||
maybeCashShopSurprise.get().getItemId() != ItemId.CASH_SHOP_SURPRISE) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
Item cashShopSurprise = maybeCashShopSurprise.get();
|
||||
if (cashShopSurprise.getQuantity() <= 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (getItemsSize() >= 100) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
Optional<CashItem> cashItemReward = CashItemFactory.getRandomCashItem();
|
||||
if (cashItemReward.isEmpty()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
short newQuantity = (short) (cashShopSurprise.getQuantity() - 1);
|
||||
cashShopSurprise.setQuantity(newQuantity);
|
||||
if (newQuantity <= 0) {
|
||||
removeFromInventory(cashShopSurprise);
|
||||
}
|
||||
|
||||
Item itemReward = cashItemReward.get().toItem();
|
||||
addToInventory(itemReward);
|
||||
|
||||
return Optional.of(new CashShopSurpriseResult(cashShopSurprise, itemReward));
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public synchronized Pair<Item, Item> openCashShopSurprise() {
|
||||
Item css = getCashShopItemByItemid(ItemId.CASH_SHOP_SURPRISE);
|
||||
@GuardedBy("lock")
|
||||
private Optional<Item> getItemByCashId(long cashId) {
|
||||
return inventory.stream()
|
||||
.filter(item -> item.getCashId() == cashId)
|
||||
.findAny();
|
||||
}
|
||||
|
||||
if (css != null) {
|
||||
CashItem cItem = CashItemFactory.getRandomCashItem();
|
||||
|
||||
if (cItem != null) {
|
||||
if (css.getQuantity() > 1) {
|
||||
/* if(NOT ENOUGH SPACE) { looks like we're not dealing with cash inventory limit whatsoever, k then
|
||||
return null;
|
||||
} */
|
||||
|
||||
css.setQuantity((short) (css.getQuantity() - 1));
|
||||
} else {
|
||||
removeFromInventory(css);
|
||||
}
|
||||
|
||||
Item item = cItem.toItem();
|
||||
addToInventory(item);
|
||||
|
||||
return new Pair<>(item, css);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
public int getItemsSize() {
|
||||
lock.lock();
|
||||
try {
|
||||
return inventory.size();
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
package server;
|
||||
|
||||
import config.YamlConfig;
|
||||
import tools.DatabaseConnection;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.sql.Timestamp;
|
||||
import static java.util.concurrent.TimeUnit.*;
|
||||
|
||||
import config.YamlConfig;
|
||||
import tools.DatabaseConnection;
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
public class ExpLogger {
|
||||
private static final LinkedBlockingQueue<ExpLogRecord> expLoggerQueue = new LinkedBlockingQueue<>();
|
||||
|
||||
@@ -21,8 +21,13 @@
|
||||
*/
|
||||
package server;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Disease;
|
||||
import client.Job;
|
||||
import client.Mount;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
@@ -33,7 +38,57 @@ import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.id.MapId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Aran;
|
||||
import constants.skills.Assassin;
|
||||
import constants.skills.Bandit;
|
||||
import constants.skills.Beginner;
|
||||
import constants.skills.Bishop;
|
||||
import constants.skills.BlazeWizard;
|
||||
import constants.skills.Bowmaster;
|
||||
import constants.skills.Brawler;
|
||||
import constants.skills.Buccaneer;
|
||||
import constants.skills.ChiefBandit;
|
||||
import constants.skills.Cleric;
|
||||
import constants.skills.Corsair;
|
||||
import constants.skills.Crossbowman;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.DarkKnight;
|
||||
import constants.skills.DawnWarrior;
|
||||
import constants.skills.DragonKnight;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPArchMage;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.FPWizard;
|
||||
import constants.skills.Fighter;
|
||||
import constants.skills.GM;
|
||||
import constants.skills.Gunslinger;
|
||||
import constants.skills.Hermit;
|
||||
import constants.skills.Hero;
|
||||
import constants.skills.Hunter;
|
||||
import constants.skills.ILArchMage;
|
||||
import constants.skills.ILMage;
|
||||
import constants.skills.ILWizard;
|
||||
import constants.skills.Legend;
|
||||
import constants.skills.Magician;
|
||||
import constants.skills.Marauder;
|
||||
import constants.skills.Marksman;
|
||||
import constants.skills.NightLord;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Noblesse;
|
||||
import constants.skills.Outlaw;
|
||||
import constants.skills.Page;
|
||||
import constants.skills.Paladin;
|
||||
import constants.skills.Pirate;
|
||||
import constants.skills.Priest;
|
||||
import constants.skills.Ranger;
|
||||
import constants.skills.Rogue;
|
||||
import constants.skills.Shadower;
|
||||
import constants.skills.Sniper;
|
||||
import constants.skills.Spearman;
|
||||
import constants.skills.SuperGM;
|
||||
import constants.skills.ThunderBreaker;
|
||||
import constants.skills.WhiteKnight;
|
||||
import constants.skills.WindArcher;
|
||||
import net.packet.Packet;
|
||||
import net.server.Server;
|
||||
import net.server.world.Party;
|
||||
@@ -44,15 +99,27 @@ import server.life.MobSkill;
|
||||
import server.life.MobSkillFactory;
|
||||
import server.life.MobSkillType;
|
||||
import server.life.Monster;
|
||||
import server.maps.*;
|
||||
import server.maps.Door;
|
||||
import server.maps.FieldLimit;
|
||||
import server.maps.MapObject;
|
||||
import server.maps.MapObjectType;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.Mist;
|
||||
import server.maps.Portal;
|
||||
import server.maps.Summon;
|
||||
import server.maps.SummonMovementType;
|
||||
import server.partyquest.CarnivalFactory;
|
||||
import server.partyquest.CarnivalFactory.MCSkill;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Matze
|
||||
|
||||
@@ -38,7 +38,12 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -358,4 +363,4 @@ public class Storage {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
*/
|
||||
package server;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.RejectedExecutionHandler;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
@@ -37,8 +37,14 @@ import server.maps.MapleMap;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
@@ -23,7 +23,11 @@ import config.YamlConfig;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.Pair;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Calendar;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,8 +33,12 @@ import tools.Pair;
|
||||
import tools.StringUtil;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class LifeFactory {
|
||||
private static final Logger log = LoggerFactory.getLogger(LifeFactory.class);
|
||||
|
||||
@@ -38,8 +38,11 @@ import server.maps.Mist;
|
||||
import tools.Randomizer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Danny (Leifde)
|
||||
|
||||
@@ -28,8 +28,11 @@ import provider.DataTool;
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
@@ -21,13 +21,26 @@
|
||||
*/
|
||||
package server.life;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.Character;
|
||||
import client.*;
|
||||
import client.Client;
|
||||
import client.FamilyEntry;
|
||||
import client.Job;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.status.MonsterStatus;
|
||||
import client.status.MonsterStatusEffect;
|
||||
import config.YamlConfig;
|
||||
import constants.id.MobId;
|
||||
import constants.skills.*;
|
||||
import constants.skills.Crusader;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.Hermit;
|
||||
import constants.skills.ILMage;
|
||||
import constants.skills.NightLord;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Priest;
|
||||
import constants.skills.Shadower;
|
||||
import constants.skills.WhiteKnight;
|
||||
import net.packet.Packet;
|
||||
import net.server.channel.Channel;
|
||||
import net.server.coordinator.world.MonsterAggroCoordinator;
|
||||
@@ -56,9 +69,17 @@ import tools.Randomizer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -2177,4 +2198,4 @@ public class Monster extends AbstractLoadedLife {
|
||||
|
||||
this.getMap().dismissRemoveAfter(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,13 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class MonsterInformationProvider {
|
||||
private static final Logger log = LoggerFactory.getLogger(MonsterInformationProvider.class);
|
||||
|
||||
@@ -27,7 +27,13 @@ import server.life.LifeFactory.selfDestruction;
|
||||
import tools.Pair;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Frz
|
||||
|
||||
@@ -44,9 +44,19 @@ import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.awt.*;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,11 @@
|
||||
package server.maps;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.packet.*;
|
||||
import net.packet.ByteBufInPacket;
|
||||
import net.packet.ByteBufOutPacket;
|
||||
import net.packet.InPacket;
|
||||
import net.packet.OutPacket;
|
||||
import net.packet.Packet;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
@@ -45,7 +45,12 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -52,9 +52,21 @@ import scripting.map.MapScriptManager;
|
||||
import server.ItemInformationProvider;
|
||||
import server.StatEffect;
|
||||
import server.TimerManager;
|
||||
import server.events.gm.*;
|
||||
import server.life.*;
|
||||
import server.events.gm.Coconut;
|
||||
import server.events.gm.Fitness;
|
||||
import server.events.gm.Ola;
|
||||
import server.events.gm.OxQuiz;
|
||||
import server.events.gm.Snowball;
|
||||
import server.life.LifeFactory;
|
||||
import server.life.LifeFactory.selfDestruction;
|
||||
import server.life.Monster;
|
||||
import server.life.MonsterDropEntry;
|
||||
import server.life.MonsterGlobalDropEntry;
|
||||
import server.life.MonsterInformationProvider;
|
||||
import server.life.MonsterListener;
|
||||
import server.life.NPC;
|
||||
import server.life.PlayerNPC;
|
||||
import server.life.SpawnPoint;
|
||||
import server.partyquest.CarnivalFactory;
|
||||
import server.partyquest.CarnivalFactory.MCSkill;
|
||||
import server.partyquest.GuardianSpawnPoint;
|
||||
@@ -64,9 +76,22 @@ import tools.Randomizer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
@@ -25,7 +25,11 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import constants.skills.*;
|
||||
import constants.skills.BlazeWizard;
|
||||
import constants.skills.Evan;
|
||||
import constants.skills.FPMage;
|
||||
import constants.skills.NightWalker;
|
||||
import constants.skills.Shadower;
|
||||
import net.packet.Packet;
|
||||
import server.StatEffect;
|
||||
import server.life.MobSkill;
|
||||
|
||||
@@ -33,7 +33,12 @@ import server.Trade;
|
||||
import tools.PacketCreator;
|
||||
import tools.Pair;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
@@ -617,4 +622,4 @@ public class PlayerShop extends AbstractMapObject {
|
||||
return mesos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,52 @@ import provider.DataProvider;
|
||||
import provider.DataProviderFactory;
|
||||
import provider.DataTool;
|
||||
import provider.wz.WZFiles;
|
||||
import server.quest.actions.*;
|
||||
import server.quest.requirements.*;
|
||||
import server.quest.actions.AbstractQuestAction;
|
||||
import server.quest.actions.BuffAction;
|
||||
import server.quest.actions.ExpAction;
|
||||
import server.quest.actions.FameAction;
|
||||
import server.quest.actions.InfoAction;
|
||||
import server.quest.actions.ItemAction;
|
||||
import server.quest.actions.MesoAction;
|
||||
import server.quest.actions.NextQuestAction;
|
||||
import server.quest.actions.PetSkillAction;
|
||||
import server.quest.actions.PetSpeedAction;
|
||||
import server.quest.actions.PetTamenessAction;
|
||||
import server.quest.actions.QuestAction;
|
||||
import server.quest.actions.SkillAction;
|
||||
import server.quest.requirements.AbstractQuestRequirement;
|
||||
import server.quest.requirements.BuffExceptRequirement;
|
||||
import server.quest.requirements.BuffRequirement;
|
||||
import server.quest.requirements.CompletedQuestRequirement;
|
||||
import server.quest.requirements.EndDateRequirement;
|
||||
import server.quest.requirements.FieldEnterRequirement;
|
||||
import server.quest.requirements.InfoExRequirement;
|
||||
import server.quest.requirements.InfoNumberRequirement;
|
||||
import server.quest.requirements.IntervalRequirement;
|
||||
import server.quest.requirements.ItemRequirement;
|
||||
import server.quest.requirements.JobRequirement;
|
||||
import server.quest.requirements.MaxLevelRequirement;
|
||||
import server.quest.requirements.MesoRequirement;
|
||||
import server.quest.requirements.MinLevelRequirement;
|
||||
import server.quest.requirements.MinTamenessRequirement;
|
||||
import server.quest.requirements.MobRequirement;
|
||||
import server.quest.requirements.MonsterBookCountRequirement;
|
||||
import server.quest.requirements.NpcRequirement;
|
||||
import server.quest.requirements.PetRequirement;
|
||||
import server.quest.requirements.QuestRequirement;
|
||||
import server.quest.requirements.ScriptRequirement;
|
||||
import tools.PacketCreator;
|
||||
import tools.StringUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.HOURS;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
@@ -77,6 +77,7 @@ import net.server.world.Party;
|
||||
import net.server.world.PartyCharacter;
|
||||
import net.server.world.PartyOperation;
|
||||
import net.server.world.World;
|
||||
import server.CashShop;
|
||||
import server.CashShop.CashItem;
|
||||
import server.CashShop.CashItemFactory;
|
||||
import server.CashShop.SpecialCashItem;
|
||||
@@ -5580,8 +5581,8 @@ public class PacketCreator {
|
||||
|
||||
public static Packet showMTSCash(Character chr) {
|
||||
final OutPacket p = OutPacket.create(SendOpcode.MTS_OPERATION2);
|
||||
p.writeInt(chr.getCashShop().getCash(4));
|
||||
p.writeInt(chr.getCashShop().getCash(2));
|
||||
p.writeInt(chr.getCashShop().getCash(CashShop.NX_PREPAID));
|
||||
p.writeInt(chr.getCashShop().getCash(CashShop.MAPLE_POINT));
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -5689,9 +5690,9 @@ public class PacketCreator {
|
||||
|
||||
public static Packet showCash(Character mc) {
|
||||
final OutPacket p = OutPacket.create(SendOpcode.QUERY_CASH_RESULT);
|
||||
p.writeInt(mc.getCashShop().getCash(1));
|
||||
p.writeInt(mc.getCashShop().getCash(2));
|
||||
p.writeInt(mc.getCashShop().getCash(4));
|
||||
p.writeInt(mc.getCashShop().getCash(CashShop.NX_CREDIT));
|
||||
p.writeInt(mc.getCashShop().getCash(CashShop.MAPLE_POINT));
|
||||
p.writeInt(mc.getCashShop().getCash(CashShop.NX_PREPAID));
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -6479,14 +6480,15 @@ public class PacketCreator {
|
||||
return p;
|
||||
}
|
||||
|
||||
public static Packet onCashGachaponOpenSuccess(int accountid, long sn, int remainingBoxes, Item item, int itemid, int nSelectedItemCount, boolean bJackpot) {
|
||||
public static Packet onCashGachaponOpenSuccess(int accountid, long boxCashId, int remainingBoxes, Item reward,
|
||||
int rewardItemId, int rewardQuantity, boolean bJackpot) {
|
||||
OutPacket p = OutPacket.create(SendOpcode.CASHSHOP_CASH_ITEM_GACHAPON_RESULT);
|
||||
p.writeByte(0xE5); // subopcode thanks to Ubaware
|
||||
p.writeLong(sn);// sn of the box used
|
||||
p.writeLong(boxCashId);
|
||||
p.writeInt(remainingBoxes);
|
||||
addCashItemInformation(p, item, accountid);
|
||||
p.writeInt(itemid);// the itemid of the liSN?
|
||||
p.writeByte(nSelectedItemCount);// the total count now? o.O
|
||||
addCashItemInformation(p, reward, accountid);
|
||||
p.writeInt(rewardItemId);
|
||||
p.writeByte(rewardQuantity); // nSelectedItemCount
|
||||
p.writeBool(bJackpot);// "CashGachaponJackpot"
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,10 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -3,11 +3,23 @@ package tools.mapletools;
|
||||
import provider.wz.WZFiles;
|
||||
import tools.Pair;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
|
||||
@@ -8,7 +8,11 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
|
||||
@@ -3,7 +3,9 @@ package tools.mapletools;
|
||||
import provider.wz.WZFiles;
|
||||
import tools.Pair;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -11,7 +13,11 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
|
||||
@@ -2,7 +2,12 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -2,10 +2,15 @@ package tools.mapletools;
|
||||
|
||||
import tools.Pair;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
@@ -2,7 +2,9 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
|
||||
@@ -2,11 +2,23 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
* @author RonanLana
|
||||
|
||||
@@ -2,7 +2,10 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -5,7 +5,12 @@ import java.io.PrintWriter;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
package tools.mapletools;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package tools.mapletools;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -2,7 +2,8 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -2,7 +2,9 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
|
||||
@@ -2,7 +2,10 @@ package tools.mapletools;
|
||||
|
||||
import provider.wz.WZFiles;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Connection;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user