Event Shrines.
Contributed by hlwrave.
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.instancemanager;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public final class EventShrineManager
|
||||
{
|
||||
private static boolean ENABLE_SHRINES = false;
|
||||
|
||||
public static boolean areShrinesEnabled()
|
||||
{
|
||||
return ENABLE_SHRINES;
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean enabled)
|
||||
{
|
||||
ENABLE_SHRINES = enabled;
|
||||
}
|
||||
}
|
@ -36,6 +36,7 @@ import com.l2jmobius.gameserver.data.sql.impl.AnnouncementsTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.datatables.EventDroplist;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.EventShrineManager;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.announce.EventAnnouncement;
|
||||
import com.l2jmobius.gameserver.model.drops.DropListScope;
|
||||
@ -123,6 +124,15 @@ public class LongTimeEvent extends Quest
|
||||
final String period = doc.getDocumentElement().getAttributes().getNamedItem("active").getNodeValue();
|
||||
_eventPeriod = DateRange.parse(period, new SimpleDateFormat("dd MM yyyy", Locale.US));
|
||||
|
||||
if (doc.getDocumentElement().getAttributes().getNamedItem("enableShrines") != null)
|
||||
{
|
||||
final String enableShrines = doc.getDocumentElement().getAttributes().getNamedItem("enableShrines").getNodeValue();
|
||||
if (enableShrines.equalsIgnoreCase("true"))
|
||||
{
|
||||
EventShrineManager.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (doc.getDocumentElement().getAttributes().getNamedItem("dropPeriod") != null)
|
||||
{
|
||||
final String dropPeriod = doc.getDocumentElement().getAttributes().getNamedItem("dropPeriod").getNodeValue();
|
||||
|
Reference in New Issue
Block a user