Event Shrines.

Contributed by hlwrave.
This commit is contained in:
MobiusDev
2016-02-18 21:00:01 +00:00
parent a2263e7014
commit af3f5ce7b7
6 changed files with 142 additions and 43 deletions

View File

@ -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;
}
}

View File

@ -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();