diff --git a/src/main/java/com/projectswg/holocore/intents/gameplay/gcw/faction/CivilWarPointIntent.java b/src/main/java/com/projectswg/holocore/intents/gameplay/gcw/faction/CivilWarPointIntent.java deleted file mode 100644 index 25181e12b..000000000 --- a/src/main/java/com/projectswg/holocore/intents/gameplay/gcw/faction/CivilWarPointIntent.java +++ /dev/null @@ -1,87 +0,0 @@ -/*********************************************************************************** - * Copyright (c) 2018 /// Project SWG /// www.projectswg.com * - * * - * ProjectSWG is the first NGE emulator for Star Wars Galaxies founded on * - * July 7th, 2011 after SOE announced the official shutdown of Star Wars Galaxies. * - * Our goal is to create an emulator which will provide a server for players to * - * continue playing a game similar to the one they used to play. We are basing * - * it on the final publish of the game prior to end-game events. * - * * - * This file is part of Holocore. * - * * - * --------------------------------------------------------------------------------* - * * - * Holocore 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, either version 3 of the * - * License, or (at your option) any later version. * - * * - * Holocore 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 Holocore. If not, see . * - ***********************************************************************************/ -package com.projectswg.holocore.intents.gameplay.gcw.faction; - -import com.projectswg.common.data.encodables.oob.ProsePackage; -import com.projectswg.holocore.resources.support.objects.swg.player.PlayerObject; -import me.joshlarson.jlcommon.control.Intent; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.Optional; - -public class CivilWarPointIntent extends Intent { - - private final PlayerObject receiver; - private final int points; - private final ProsePackage prose; - - private CivilWarPointIntent(@NotNull PlayerObject receiver, int points, @Nullable ProsePackage prose) { - this.receiver = receiver; - this.points = points; - this.prose = prose; - } - - public CivilWarPointIntent(PlayerObject receiver, int points) { - this(receiver, points, null); - } - - @NotNull - public PlayerObject getReceiver() { - return receiver; - } - - public int getPoints() { - return points; - } - - @Nullable - public ProsePackage getProse() { - return prose; - } - - /** - * Displays basic system message to the player with the amount of points gained. - * @param receiver that should receive GCW points - * @param points amount that the {@code receiver} should receive - */ - public static void broadcast(@NotNull PlayerObject receiver, int points) { - new CivilWarPointIntent(receiver, points).broadcast(); - } - - /** - * Displays customized system message to the player. - * @param receiver that should receive GCW points - * @param points amount that the {@code receiver} should receive - * @param prose custom message to display to the player in case the default one doesn't cut it. If {@code null}, we fall back to the default - * basic system message. - */ - public static void broadcast(@NotNull PlayerObject receiver, int points, @Nullable ProsePackage prose) { - new CivilWarPointIntent(receiver, points, prose).broadcast(); - } - -} diff --git a/src/main/java/com/projectswg/holocore/resources/support/global/commands/callbacks/admin/qatool/CmdQaTool.java b/src/main/java/com/projectswg/holocore/resources/support/global/commands/callbacks/admin/qatool/CmdQaTool.java index 2a8daa2b2..890fcb7e6 100644 --- a/src/main/java/com/projectswg/holocore/resources/support/global/commands/callbacks/admin/qatool/CmdQaTool.java +++ b/src/main/java/com/projectswg/holocore/resources/support/global/commands/callbacks/admin/qatool/CmdQaTool.java @@ -31,7 +31,6 @@ import com.projectswg.common.data.encodables.tangible.Posture; import com.projectswg.common.data.location.Location; import com.projectswg.common.data.location.Terrain; import com.projectswg.common.data.sui.SuiEvent; -import com.projectswg.holocore.intents.gameplay.gcw.faction.CivilWarPointIntent; import com.projectswg.holocore.intents.support.global.chat.SystemMessageIntent; import com.projectswg.holocore.intents.support.global.zone.creation.DeleteCharacterIntent; import com.projectswg.holocore.intents.support.objects.awareness.ForceAwarenessUpdateIntent; @@ -44,7 +43,6 @@ import com.projectswg.holocore.resources.support.global.zone.sui.SuiListBox; import com.projectswg.holocore.resources.support.global.zone.sui.SuiMessageBox; import com.projectswg.holocore.resources.support.objects.swg.SWGObject; import com.projectswg.holocore.resources.support.objects.swg.creature.CreatureObject; -import com.projectswg.holocore.resources.support.objects.swg.player.PlayerObject; import com.projectswg.holocore.services.support.global.zone.CharacterLookupService.PlayerLookup; import me.joshlarson.jlcommon.log.Log; import org.jetbrains.annotations.NotNull; @@ -77,9 +75,6 @@ public class CmdQaTool implements ICmdCallback { case "details": QaToolDetails.sendDetails(player, target, args); break; - case "gcw": - grantGcw(player, command[1]); - break; default: createPrimaryWindow(player); break; @@ -176,19 +171,6 @@ public class CmdQaTool implements ICmdCallback { createMessageBox(player, "QA Tool - Help", prompt); } - private void grantGcw(Player player, String pointsArg) { - PlayerObject receiver = player.getCreatureObject().getPlayerObject(); - - try { - int points = Integer.parseInt(pointsArg); - CivilWarPointIntent.broadcast(receiver, points); - Log.i("GCW command: %s gave themselves %d GCW points", player.getUsername(), points); - } catch (NumberFormatException e) { - SystemMessageIntent.broadcastPersonal(player, String.format("GCW command: %s is not a number", pointsArg)); - } - - } - /* Utility Methods */ private static void createMessageBox(Player player, String title, String prompt) {