Custom event schedule managers.

This commit is contained in:
MobiusDev
2018-02-14 11:19:09 +00:00
parent 34d78c5f3c
commit 61441706e6
40 changed files with 1480 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
/*
* 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.events;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.eventengine.AbstractEvent;
import com.l2jmobius.gameserver.model.eventengine.AbstractEventManager;
import com.l2jmobius.gameserver.model.eventengine.ScheduleTarget;
import com.l2jmobius.gameserver.model.quest.Event;
/**
* @author Mobius
*/
public class ElpiesManager extends AbstractEventManager<AbstractEvent<?>>
{
protected ElpiesManager()
{
}
@Override
public void onInitialized()
{
}
@ScheduleTarget
protected void startEvent()
{
final Event event = (Event) QuestManager.getInstance().getQuest("Elpies");
if (event != null)
{
event.eventStart(null);
}
}
public static ElpiesManager getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final ElpiesManager INSTANCE = new ElpiesManager();
}
}

View File

@@ -0,0 +1,58 @@
/*
* 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.events;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.eventengine.AbstractEvent;
import com.l2jmobius.gameserver.model.eventengine.AbstractEventManager;
import com.l2jmobius.gameserver.model.eventengine.ScheduleTarget;
import com.l2jmobius.gameserver.model.quest.Event;
/**
* @author Mobius
*/
public class RabbitsManager extends AbstractEventManager<AbstractEvent<?>>
{
protected RabbitsManager()
{
}
@Override
public void onInitialized()
{
}
@ScheduleTarget
protected void startEvent()
{
final Event event = (Event) QuestManager.getInstance().getQuest("Rabbits");
if (event != null)
{
event.eventStart(null);
}
}
public static RabbitsManager getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final RabbitsManager INSTANCE = new RabbitsManager();
}
}

View File

@@ -0,0 +1,58 @@
/*
* 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.events;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.eventengine.AbstractEvent;
import com.l2jmobius.gameserver.model.eventengine.AbstractEventManager;
import com.l2jmobius.gameserver.model.eventengine.ScheduleTarget;
import com.l2jmobius.gameserver.model.quest.Event;
/**
* @author Mobius
*/
public class RaceManager extends AbstractEventManager<AbstractEvent<?>>
{
protected RaceManager()
{
}
@Override
public void onInitialized()
{
}
@ScheduleTarget
protected void startEvent()
{
final Event event = (Event) QuestManager.getInstance().getQuest("Race");
if (event != null)
{
event.eventStart(null);
}
}
public static RaceManager getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final RaceManager INSTANCE = new RaceManager();
}
}

View File

@@ -0,0 +1,58 @@
/*
* 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.events;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.eventengine.AbstractEvent;
import com.l2jmobius.gameserver.model.eventengine.AbstractEventManager;
import com.l2jmobius.gameserver.model.eventengine.ScheduleTarget;
import com.l2jmobius.gameserver.model.quest.Event;
/**
* @author Mobius
*/
public class TeamVsTeamManager extends AbstractEventManager<AbstractEvent<?>>
{
protected TeamVsTeamManager()
{
}
@Override
public void onInitialized()
{
}
@ScheduleTarget
protected void startEvent()
{
final Event event = (Event) QuestManager.getInstance().getQuest("TvT");
if (event != null)
{
event.eventStart(null);
}
}
public static TeamVsTeamManager getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final TeamVsTeamManager INSTANCE = new TeamVsTeamManager();
}
}