Moved Arcan Ritual to datapack.

This commit is contained in:
MobiusDev
2015-04-19 09:32:15 +00:00
parent 7a372c3bfa
commit e27aaffbc9
5 changed files with 15 additions and 37 deletions

View File

@ -877,18 +877,6 @@ HBCEFairPlay = True
# Default: 99 # Default: 99
HellboundLevelLimit = 99 HellboundLevelLimit = 99
# ---------------------------------------------------------------------------
# Arcan Ritual setings
# ---------------------------------------------------------------------------
# If true, Arcan Ritual npcs spawn
# Default: True
ArcanRitual = True
# Arcan Ritual change interval (in minutes)
# Default: 30
ArcanRitualInterval = 30
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Bot Report Button settings # Bot Report Button settings
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------

View File

@ -102,6 +102,7 @@ ai/fantasy_isle/Parade.java
# Group Template # Group Template
ai/group_template/AdenReconstructorManager.java ai/group_template/AdenReconstructorManager.java
ai/group_template/ArcanRitual.java
ai/group_template/BeastFarm.java ai/group_template/BeastFarm.java
ai/group_template/DenOfEvil.java ai/group_template/DenOfEvil.java
ai/group_template/DragonValley.java ai/group_template/DragonValley.java

View File

@ -1,14 +1,14 @@
/* /*
* Copyright (C) 2004-2015 L2J Server * Copyright (C) 2004-2015 L2J DataPack
* *
* This file is part of L2J Server. * This file is part of L2J DataPack.
* *
* L2J Server is free software: you can redistribute it and/or modify * L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* L2J Server is distributed in the hope that it will be useful, * L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. * General Public License for more details.
@ -16,11 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.l2jserver.gameserver.instancemanager; package ai.group_template;
import java.util.ArrayList; import java.util.ArrayList;
import com.l2jserver.Config;
import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.Location; import com.l2jserver.gameserver.model.Location;
@ -38,10 +37,12 @@ import com.l2jserver.gameserver.network.serverpackets.OnEventTrigger;
/** /**
* @author Mobius * @author Mobius
*/ */
public class ArcanRitualManager extends Quest public class ArcanRitual extends Quest
{ {
private static final int BLUE_TRIGGER = 262001; private static final int BLUE_TRIGGER = 262001;
private static final int RED_TRIGGER = 262003; private static final int RED_TRIGGER = 262003;
private static final int ARCAN_RITUAL_INTERVAL = 30 * 60000; // 30 minutes
private static final boolean ENABLED = true; // In case we want to disable spawning NPCs
private static final Location ARCAN_TOWN_LOC = new Location(207096, 88696, -1129); private static final Location ARCAN_TOWN_LOC = new Location(207096, 88696, -1129);
// @formatter:off // @formatter:off
static final int[][] RITUAL_NPCS = static final int[][] RITUAL_NPCS =
@ -143,9 +144,9 @@ public class ArcanRitualManager extends Quest
static int ritualStage; static int ritualStage;
static ArrayList<L2Npc> ritualSpawns = new ArrayList<>(); static ArrayList<L2Npc> ritualSpawns = new ArrayList<>();
public ArcanRitualManager() public ArcanRitual()
{ {
super(-1, "Arcan Manager", "Arcan Manager"); super(-1, "Arcan Ritual", "Arcan Ritual");
for (L2ZoneType zone : L2World.getInstance().getRegion(ARCAN_TOWN_LOC).getZones()) for (L2ZoneType zone : L2World.getInstance().getRegion(ARCAN_TOWN_LOC).getZones())
{ {
if (zone instanceof L2PeaceZone) if (zone instanceof L2PeaceZone)
@ -156,9 +157,9 @@ public class ArcanRitualManager extends Quest
} }
addEnterZoneId(arcanZone.getId()); addEnterZoneId(arcanZone.getId());
ritualStage = BLUE_TRIGGER; ritualStage = BLUE_TRIGGER;
if (Config.ARCAN_RITUAL) if (ENABLED)
{ {
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ChangeStage(), Config.ARCAN_RITUAL_INTERVAL, Config.ARCAN_RITUAL_INTERVAL); ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ChangeStage(), ARCAN_RITUAL_INTERVAL, ARCAN_RITUAL_INTERVAL);
} }
} }
@ -231,13 +232,8 @@ public class ArcanRitualManager extends Quest
} }
} }
public static final ArcanRitualManager getInstance() public static void main(String[] args)
{ {
return SingletonHolder._instance; new ArcanRitual();
}
private static class SingletonHolder
{
protected static final ArcanRitualManager _instance = new ArcanRitualManager();
} }
} }

View File

@ -660,8 +660,6 @@ public final class Config
public static int MIN_BLOCK_CHECKER_TEAM_MEMBERS; public static int MIN_BLOCK_CHECKER_TEAM_MEMBERS;
public static boolean HBCE_FAIR_PLAY; public static boolean HBCE_FAIR_PLAY;
public static int HELLBOUND_LEVEL_LIMIT; public static int HELLBOUND_LEVEL_LIMIT;
public static boolean ARCAN_RITUAL;
public static int ARCAN_RITUAL_INTERVAL;
public static int PLAYER_MOVEMENT_BLOCK_TIME; public static int PLAYER_MOVEMENT_BLOCK_TIME;
public static int ABILITY_MAX_POINTS; public static int ABILITY_MAX_POINTS;
public static long ABILITY_POINTS_RESET_ADENA; public static long ABILITY_POINTS_RESET_ADENA;
@ -2026,9 +2024,6 @@ public final class Config
HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false); HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false);
HELLBOUND_LEVEL_LIMIT = General.getInt("HellboundLevelLimit", 99); HELLBOUND_LEVEL_LIMIT = General.getInt("HellboundLevelLimit", 99);
ARCAN_RITUAL = General.getBoolean("ArcanRitual", true);
ARCAN_RITUAL_INTERVAL = General.getInt("ArcanRitualInterval", 30) * 60000;
NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1); NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1);
SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5); SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5);

View File

@ -98,7 +98,6 @@ import com.l2jserver.gameserver.handler.EffectHandler;
import com.l2jserver.gameserver.idfactory.IdFactory; import com.l2jserver.gameserver.idfactory.IdFactory;
import com.l2jserver.gameserver.instancemanager.AirShipManager; import com.l2jserver.gameserver.instancemanager.AirShipManager;
import com.l2jserver.gameserver.instancemanager.AntiFeedManager; import com.l2jserver.gameserver.instancemanager.AntiFeedManager;
import com.l2jserver.gameserver.instancemanager.ArcanRitualManager;
import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; import com.l2jserver.gameserver.instancemanager.AuctionHouseManager;
import com.l2jserver.gameserver.instancemanager.BoatManager; import com.l2jserver.gameserver.instancemanager.BoatManager;
import com.l2jserver.gameserver.instancemanager.CHSiegeManager; import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
@ -329,7 +328,6 @@ public final class GameServer
BoatManager.getInstance(); BoatManager.getInstance();
AirShipManager.getInstance(); AirShipManager.getInstance();
ShuttleData.getInstance(); ShuttleData.getInstance();
ArcanRitualManager.getInstance();
JumpManager.getInstance(); JumpManager.getInstance();
GraciaSeedsManager.getInstance(); GraciaSeedsManager.getInstance();