Merge branch 'refs/heads/master' into feat/postgresql-database
# Conflicts: # config.yaml # docker-compose.yml # pom.xml # src/main/java/client/Character.java # src/main/java/client/Client.java # src/main/java/client/MonsterBook.java # src/main/java/client/command/commands/gm0/BuyBackCommand.java # src/main/java/client/processor/stat/AssignAPProcessor.java # src/main/java/config/ServerConfig.java # src/main/java/net/server/channel/Channel.java # src/main/java/net/server/channel/handlers/AbstractDealDamageHandler.java # src/main/java/net/server/channel/handlers/BuddylistModifyHandler.java # src/main/java/net/server/channel/handlers/CloseRangeDamageHandler.java # src/main/java/net/server/channel/handlers/EnterMTSHandler.java # src/main/java/net/server/channel/handlers/NPCTalkHandler.java # src/main/java/net/server/channel/handlers/RangedAttackHandler.java # src/main/java/net/server/channel/handlers/SummonDamageHandler.java # src/main/java/net/server/channel/handlers/UseCashItemHandler.java # src/main/java/net/server/handlers/login/CreateCharHandler.java # src/main/java/net/server/world/World.java # src/main/java/scripting/npc/NPCConversationManager.java # src/main/java/server/ItemInformationProvider.java # src/main/java/server/life/Monster.java # src/main/java/server/life/MonsterInformationProvider.java # src/main/java/server/maps/MapleMap.java # src/main/java/tools/PacketCreator.java # src/test/java/service/NoteServiceTest.java # src/test/java/testutil/Any.java
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server, commands OdinMS-based
|
||||
Copyleft (L) 2016 - 2019 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
@Author: Arthur L - Refactored command content into modules
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
import client.processor.action.BuybackProcessor;
|
||||
|
||||
public class BuyBackCommand extends Command {
|
||||
{
|
||||
setDescription("Revive yourself after a death.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Client c, String[] params, CommandContext ctx) {
|
||||
if (params.length < 1) {
|
||||
c.getPlayer().yellowMessage("Syntax: @buyback <info|now>");
|
||||
return;
|
||||
}
|
||||
|
||||
if (params[0].contentEquals("now")) {
|
||||
BuybackProcessor.processBuyback(c);
|
||||
} else {
|
||||
c.getPlayer().showBuybackInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@ import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
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 {
|
||||
{
|
||||
|
||||
@@ -29,7 +29,11 @@ import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
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;
|
||||
|
||||
@@ -12,7 +12,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 client.command.CommandContext;
|
||||
import provider.Data;
|
||||
|
||||
@@ -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 client.command.CommandContext;
|
||||
import provider.Data;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package client.command.commands.gm6;
|
||||
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.AbstractScriptManager;
|
||||
|
||||
import javax.script.Invocable;
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.script.ScriptException;
|
||||
|
||||
public class DevtestCommand extends Command {
|
||||
{
|
||||
setDescription("Runs devtest.js. Developer utility - test stuff without restarting the server.");
|
||||
}
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DevtestCommand.class);
|
||||
|
||||
private static class DevtestScriptManager extends AbstractScriptManager {
|
||||
|
||||
@Override
|
||||
public ScriptEngine getInvocableScriptEngine(String path) {
|
||||
return super.getInvocableScriptEngine(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Client client, String[] params, CommandContext context) {
|
||||
DevtestScriptManager scriptManager = new DevtestScriptManager();
|
||||
ScriptEngine scriptEngine = scriptManager.getInvocableScriptEngine("devtest.js");
|
||||
try {
|
||||
Invocable invocable = (Invocable) scriptEngine;
|
||||
invocable.invokeFunction("run", client.getPlayer());
|
||||
} catch (ScriptException | NoSuchMethodException e) {
|
||||
log.info("devtest.js run() threw an exception", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,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 {
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user