Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -1,64 +1,65 @@
/*
* 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.model.events;
/**
* @author UnAfraid
*/
public class Containers
{
private static final ListenersContainer _globalContainer = new ListenersContainer();
private static final ListenersContainer _globalNpcsContainer = new ListenersContainer();
private static final ListenersContainer _globalMonstersContainer = new ListenersContainer();
private static final ListenersContainer _globalPlayersContainer = new ListenersContainer();
protected Containers()
{
}
/**
* @return global listeners container
*/
public static ListenersContainer Global()
{
return _globalContainer;
}
/**
* @return global npc listeners container
*/
public static ListenersContainer Npcs()
{
return _globalNpcsContainer;
}
/**
* @return global monster listeners container
*/
public static ListenersContainer Monsters()
{
return _globalMonstersContainer;
}
/**
* @return global player listeners container
*/
public static ListenersContainer Players()
{
return _globalPlayersContainer;
}
}
/*
* 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.model.events;
/**
* @author UnAfraid
*/
public class Containers
{
private static final ListenersContainer _globalContainer = new ListenersContainer();
private static final ListenersContainer _globalNpcsContainer = new ListenersContainer();
private static final ListenersContainer _globalMonstersContainer = new ListenersContainer();
private static final ListenersContainer _globalPlayersContainer = new ListenersContainer();
protected Containers()
{
}
/**
* @return global listeners container
*/
public static ListenersContainer Global()
{
return _globalContainer;
}
/**
* @return global npc listeners container
*/
public static ListenersContainer Npcs()
{
return _globalNpcsContainer;
}
/**
* @return global monster listeners container
*/
public static ListenersContainer Monsters()
{
return _globalMonstersContainer;
}
/**
* @return global player listeners container
*/
public static ListenersContainer Players()
{
return _globalPlayersContainer;
}
}

View File

@@ -1,272 +1,272 @@
/*
* 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.model.events;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
import com.l2jmobius.gameserver.model.events.returns.AbstractEventReturn;
/**
* @author UnAfraid
*/
public final class EventDispatcher
{
private static final Logger _log = Logger.getLogger(EventDispatcher.class.getName());
protected EventDispatcher()
{
}
/**
* @param <T>
* @param event
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event)
{
return notifyEvent(event, null, null);
}
/**
* @param <T>
* @param event
* @param callbackClass
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, Class<T> callbackClass)
{
return notifyEvent(event, null, callbackClass);
}
/**
* @param <T>
* @param event
* @param container
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, ListenersContainer container)
{
return notifyEvent(event, container, null);
}
/**
* @param <T>
* @param event
* @param container
* @param callbackClass
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, ListenersContainer container, Class<T> callbackClass)
{
try
{
return Containers.Global().hasListener(event.getType()) || ((container != null) && container.hasListener(event.getType())) ? notifyEventImpl(event, container, callbackClass) : null;
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't notify event " + event.getClass().getSimpleName(), e);
}
return null;
}
/**
* Executing current listener notification asynchronously
* @param event
* @param containers
*/
public void notifyEventAsync(IBaseEvent event, ListenersContainer... containers)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
boolean hasListeners = Containers.Global().hasListener(event.getType());
if (!hasListeners)
{
for (ListenersContainer container : containers)
{
if (container.hasListener(event.getType()))
{
hasListeners = true;
break;
}
}
}
if (hasListeners)
{
ThreadPoolManager.getInstance().executeEvent(() -> notifyEventToMultipleContainers(event, containers, null));
}
}
/**
* Scheduling current listener notification asynchronously after specified delay.
* @param event
* @param container
* @param delay
*/
public void notifyEventAsyncDelayed(IBaseEvent event, ListenersContainer container, long delay)
{
if (Containers.Global().hasListener(event.getType()) || container.hasListener(event.getType()))
{
ThreadPoolManager.getInstance().scheduleEvent(() -> notifyEvent(event, container, null), delay);
}
}
/**
* Scheduling current listener notification asynchronously after specified delay.
* @param event
* @param container
* @param delay
* @param unit
*/
public void notifyEventAsyncDelayed(IBaseEvent event, ListenersContainer container, long delay, TimeUnit unit)
{
if (Containers.Global().hasListener(event.getType()) || container.hasListener(event.getType()))
{
ThreadPoolManager.getInstance().scheduleEvent(() -> notifyEvent(event, container, null), delay, unit);
}
}
/**
* @param <T>
* @param event
* @param containers
* @param callbackClass
* @return
*/
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
try
{
T callback = null;
if (containers != null)
{
// Local listeners container first.
for (ListenersContainer container : containers)
{
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(container.getListeners(event.getType()), event, callbackClass, callback);
}
}
}
// Global listener container.
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(Containers.Global().getListeners(event.getType()), event, callbackClass, callback);
}
return callback;
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't notify event " + event.getClass().getSimpleName(), e);
}
return null;
}
/**
* @param <T>
* @param event
* @param container
* @param callbackClass
* @return {@link AbstractEventReturn} object that may keep data from the first listener, or last that breaks notification.
*/
private <T extends AbstractEventReturn> T notifyEventImpl(IBaseEvent event, ListenersContainer container, Class<T> callbackClass)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
T callback = null;
// Local listener container first.
if (container != null)
{
callback = notifyToListeners(container.getListeners(event.getType()), event, callbackClass, callback);
}
// Global listener container.
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(Containers.Global().getListeners(event.getType()), event, callbackClass, callback);
}
return callback;
}
/**
* @param <T>
* @param listeners
* @param event
* @param returnBackClass
* @param callback
* @return
*/
private <T extends AbstractEventReturn> T notifyToListeners(Queue<AbstractEventListener> listeners, IBaseEvent event, Class<T> returnBackClass, T callback)
{
for (AbstractEventListener listener : listeners)
{
try
{
final T rb = listener.executeEvent(event, returnBackClass);
if (rb == null)
{
continue;
}
else if ((callback == null) || rb.override()) // Let's check if this listener wants to override previous return object or we simply don't have one
{
callback = rb;
}
else if (rb.abort()) // This listener wants to abort the notification to others.
{
break;
}
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Exception during notification of event: " + event.getClass().getSimpleName() + " listener: " + listener.getClass().getSimpleName(), e);
}
}
return callback;
}
public static EventDispatcher getInstance()
{
return SingletonHolder._instance;
}
private static class SingletonHolder
{
protected static final EventDispatcher _instance = new EventDispatcher();
}
}
/*
* 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.model.events;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
import com.l2jmobius.gameserver.model.events.returns.AbstractEventReturn;
/**
* @author UnAfraid
*/
public final class EventDispatcher
{
private static final Logger _log = Logger.getLogger(EventDispatcher.class.getName());
protected EventDispatcher()
{
}
/**
* @param <T>
* @param event
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event)
{
return notifyEvent(event, null, null);
}
/**
* @param <T>
* @param event
* @param callbackClass
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, Class<T> callbackClass)
{
return notifyEvent(event, null, callbackClass);
}
/**
* @param <T>
* @param event
* @param container
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, ListenersContainer container)
{
return notifyEvent(event, container, null);
}
/**
* @param <T>
* @param event
* @param container
* @param callbackClass
* @return
*/
public <T extends AbstractEventReturn> T notifyEvent(IBaseEvent event, ListenersContainer container, Class<T> callbackClass)
{
try
{
return Containers.Global().hasListener(event.getType()) || ((container != null) && container.hasListener(event.getType())) ? notifyEventImpl(event, container, callbackClass) : null;
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't notify event " + event.getClass().getSimpleName(), e);
}
return null;
}
/**
* Executing current listener notification asynchronously
* @param event
* @param containers
*/
public void notifyEventAsync(IBaseEvent event, ListenersContainer... containers)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
boolean hasListeners = Containers.Global().hasListener(event.getType());
if (!hasListeners)
{
for (ListenersContainer container : containers)
{
if (container.hasListener(event.getType()))
{
hasListeners = true;
break;
}
}
}
if (hasListeners)
{
ThreadPoolManager.getInstance().executeEvent(() -> notifyEventToMultipleContainers(event, containers, null));
}
}
/**
* Scheduling current listener notification asynchronously after specified delay.
* @param event
* @param container
* @param delay
*/
public void notifyEventAsyncDelayed(IBaseEvent event, ListenersContainer container, long delay)
{
if (Containers.Global().hasListener(event.getType()) || container.hasListener(event.getType()))
{
ThreadPoolManager.getInstance().scheduleEvent(() -> notifyEvent(event, container, null), delay);
}
}
/**
* Scheduling current listener notification asynchronously after specified delay.
* @param event
* @param container
* @param delay
* @param unit
*/
public void notifyEventAsyncDelayed(IBaseEvent event, ListenersContainer container, long delay, TimeUnit unit)
{
if (Containers.Global().hasListener(event.getType()) || container.hasListener(event.getType()))
{
ThreadPoolManager.getInstance().scheduleEvent(() -> notifyEvent(event, container, null), delay, unit);
}
}
/**
* @param <T>
* @param event
* @param containers
* @param callbackClass
* @return
*/
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
{
try
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
T callback = null;
if (containers != null)
{
// Local listeners container first.
for (ListenersContainer container : containers)
{
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(container.getListeners(event.getType()), event, callbackClass, callback);
}
}
}
// Global listener container.
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(Containers.Global().getListeners(event.getType()), event, callbackClass, callback);
}
return callback;
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't notify event " + event.getClass().getSimpleName(), e);
}
return null;
}
/**
* @param <T>
* @param event
* @param container
* @param callbackClass
* @return {@link AbstractEventReturn} object that may keep data from the first listener, or last that breaks notification.
*/
private <T extends AbstractEventReturn> T notifyEventImpl(IBaseEvent event, ListenersContainer container, Class<T> callbackClass)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
T callback = null;
// Local listener container first.
if (container != null)
{
callback = notifyToListeners(container.getListeners(event.getType()), event, callbackClass, callback);
}
// Global listener container.
if ((callback == null) || !callback.abort())
{
callback = notifyToListeners(Containers.Global().getListeners(event.getType()), event, callbackClass, callback);
}
return callback;
}
/**
* @param <T>
* @param listeners
* @param event
* @param returnBackClass
* @param callback
* @return
*/
private <T extends AbstractEventReturn> T notifyToListeners(Queue<AbstractEventListener> listeners, IBaseEvent event, Class<T> returnBackClass, T callback)
{
for (AbstractEventListener listener : listeners)
{
try
{
final T rb = listener.executeEvent(event, returnBackClass);
if (rb == null)
{
continue;
}
else if ((callback == null) || rb.override()) // Let's check if this listener wants to override previous return object or we simply don't have one
{
callback = rb;
}
else if (rb.abort()) // This listener wants to abort the notification to others.
{
break;
}
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Exception during notification of event: " + event.getClass().getSimpleName() + " listener: " + listener.getClass().getSimpleName(), e);
}
}
return callback;
}
public static EventDispatcher getInstance()
{
return SingletonHolder._instance;
}
private static class SingletonHolder
{
protected static final EventDispatcher _instance = new EventDispatcher();
}
}

View File

@@ -1,273 +1,313 @@
/*
* 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.model.events;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttack;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttacked;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageDealt;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKill;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureTeleported;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcCanBeSeen;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcEventReceived;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcFirstTalk;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcManorBypass;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveRouteFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSocialActionSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSpawn;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcTeleport;
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableAggroRangeEnter;
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableAttack;
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableHate;
import com.l2jmobius.gameserver.model.events.impl.character.npc.attackable.OnAttackableKill;
import com.l2jmobius.gameserver.model.events.impl.character.playable.OnPlayableExpChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerAugment;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerBypass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerChangeToAwakenedClass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerChat;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerCreate;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerDelete;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerDlgAnswer;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerEquipItem;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerFameChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerHennaAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerHennaRemove;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerKarmaChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogout;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPKChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerProfessionChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPvPChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPvPKill;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerRaidPointsChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerRestore;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSelect;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSkillLearn;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSubChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSummonSpawn;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSummonTalk;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerTransform;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanCreate;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanJoin;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanLeaderChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanLeft;
import com.l2jmobius.gameserver.model.events.impl.character.player.clan.OnPlayerClanLvlUp;
import com.l2jmobius.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemTransfer;
import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnPlayerItemAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnPlayerItemDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnPlayerItemDrop;
import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnPlayerItemPickup;
import com.l2jmobius.gameserver.model.events.impl.character.player.inventory.OnPlayerItemTransfer;
import com.l2jmobius.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeLeft;
import com.l2jmobius.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeRemove;
import com.l2jmobius.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeStatus;
import com.l2jmobius.gameserver.model.events.impl.character.player.mentoring.OnPlayerMentorStatus;
import com.l2jmobius.gameserver.model.events.impl.character.trap.OnTrapAction;
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarFinish;
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarStart;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventFinish;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventKill;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventRegistrationStart;
import com.l2jmobius.gameserver.model.events.impl.events.OnTvTEventStart;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemCreate;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import com.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
import com.l2jmobius.gameserver.model.events.impl.sieges.castle.OnCastleSiegeFinish;
import com.l2jmobius.gameserver.model.events.impl.sieges.castle.OnCastleSiegeOwnerChange;
import com.l2jmobius.gameserver.model.events.impl.sieges.castle.OnCastleSiegeStart;
import com.l2jmobius.gameserver.model.events.impl.sieges.fort.OnFortSiegeFinish;
import com.l2jmobius.gameserver.model.events.impl.sieges.fort.OnFortSiegeStart;
import com.l2jmobius.gameserver.model.events.returns.ChatFilterReturn;
import com.l2jmobius.gameserver.model.events.returns.TerminateReturn;
import com.l2jmobius.gameserver.util.Util;
/**
* @author UnAfraid
*/
public enum EventType
{
// Attackable events
ON_ATTACKABLE_AGGRO_RANGE_ENTER(OnAttackableAggroRangeEnter.class, void.class),
ON_ATTACKABLE_ATTACK(OnAttackableAttack.class, void.class),
ON_ATTACKABLE_FACTION_CALL(OnAttackableFactionCall.class, void.class),
ON_ATTACKABLE_KILL(OnAttackableKill.class, void.class),
// Castle events
ON_CASTLE_SIEGE_FINISH(OnCastleSiegeFinish.class, void.class),
ON_CASTLE_SIEGE_OWNER_CHANGE(OnCastleSiegeOwnerChange.class, void.class),
ON_CASTLE_SIEGE_START(OnCastleSiegeStart.class, void.class),
// Clan events
ON_CLAN_WAR_FINISH(OnClanWarFinish.class, void.class),
ON_CLAN_WAR_START(OnClanWarStart.class, void.class),
// Creature events
ON_CREATURE_ATTACK(OnCreatureAttack.class, void.class, TerminateReturn.class),
ON_CREATURE_ATTACK_AVOID(OnCreatureAttackAvoid.class, void.class, void.class),
ON_CREATURE_ATTACKED(OnCreatureAttacked.class, void.class, TerminateReturn.class),
ON_CREATURE_DAMAGE_RECEIVED(OnCreatureDamageReceived.class, void.class),
ON_CREATURE_DAMAGE_DEALT(OnCreatureDamageDealt.class, void.class),
ON_CREATURE_KILL(OnCreatureKill.class, void.class, TerminateReturn.class),
ON_CREATURE_SKILL_USE(OnCreatureSkillUse.class, void.class, TerminateReturn.class),
ON_CREATURE_TELEPORTED(OnCreatureTeleported.class, void.class),
ON_CREATURE_ZONE_ENTER(OnCreatureZoneEnter.class, void.class),
ON_CREATURE_ZONE_EXIT(OnCreatureZoneExit.class, void.class),
// Fortress events
ON_FORT_SIEGE_FINISH(OnFortSiegeFinish.class, void.class),
ON_FORT_SIEGE_START(OnFortSiegeStart.class, void.class),
// Item events
ON_ITEM_BYPASS_EVENT(OnItemBypassEvent.class, void.class),
ON_ITEM_CREATE(OnItemCreate.class, void.class),
ON_ITEM_TALK(OnItemTalk.class, void.class),
// Npcs events
ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class),
ON_NPC_CREATURE_SEE(OnNpcCreatureSee.class, void.class),
ON_NPC_EVENT_RECEIVED(OnNpcEventReceived.class, void.class),
ON_NPC_FIRST_TALK(OnNpcFirstTalk.class, void.class),
ON_NPC_HATE(OnAttackableHate.class, void.class, TerminateReturn.class),
ON_NPC_MOVE_FINISHED(OnNpcMoveFinished.class, void.class),
ON_NPC_MOVE_NODE_ARRIVED(OnNpcMoveNodeArrived.class, void.class),
ON_NPC_MOVE_ROUTE_FINISHED(OnNpcMoveRouteFinished.class, void.class),
ON_NPC_QUEST_START(null, void.class),
ON_NPC_SKILL_FINISHED(OnNpcSkillFinished.class, void.class),
ON_NPC_SKILL_SEE(OnNpcSkillSee.class, void.class),
ON_NPC_SOCIAL_ACTION_SEE(OnNpcSocialActionSee.class, void.class),
ON_NPC_SPAWN(OnNpcSpawn.class, void.class),
ON_NPC_TALK(null, void.class),
ON_NPC_TELEPORT(OnNpcTeleport.class, void.class),
ON_NPC_MANOR_BYPASS(OnNpcManorBypass.class, void.class),
ON_NPC_MENU_SELECT(OnNpcMenuSelect.class, void.class),
// Olympiad events
ON_OLYMPIAD_MATCH_RESULT(OnOlympiadMatchResult.class, void.class),
// Playable events
ON_PLAYABLE_EXP_CHANGED(OnPlayableExpChanged.class, void.class, TerminateReturn.class),
// Player events
ON_PLAYER_AUGMENT(OnPlayerAugment.class, void.class),
ON_PLAYER_BYPASS(OnPlayerBypass.class, void.class),
ON_PLAYER_CHAT(OnPlayerChat.class, void.class, ChatFilterReturn.class),
// Clan events
ON_PLAYER_CLAN_CREATE(OnPlayerClanCreate.class, void.class),
ON_PLAYER_CLAN_DESTROY(OnPlayerClanDestroy.class, void.class),
ON_PLAYER_CLAN_JOIN(OnPlayerClanJoin.class, void.class),
ON_PLAYER_CLAN_LEADER_CHANGE(OnPlayerClanLeaderChange.class, void.class),
ON_PLAYER_CLAN_LEFT(OnPlayerClanLeft.class, void.class),
ON_PLAYER_CLAN_LVLUP(OnPlayerClanLvlUp.class, void.class),
// Clan warehouse events
ON_PLAYER_CLAN_WH_ITEM_ADD(OnPlayerClanWHItemAdd.class, void.class),
ON_PLAYER_CLAN_WH_ITEM_DESTROY(OnPlayerClanWHItemDestroy.class, void.class),
ON_PLAYER_CLAN_WH_ITEM_TRANSFER(OnPlayerClanWHItemTransfer.class, void.class),
ON_PLAYER_CREATE(OnPlayerCreate.class, void.class),
ON_PLAYER_DELETE(OnPlayerDelete.class, void.class),
ON_PLAYER_DLG_ANSWER(OnPlayerDlgAnswer.class, void.class, TerminateReturn.class),
ON_PLAYER_EQUIP_ITEM(OnPlayerEquipItem.class, void.class),
ON_PLAYER_FAME_CHANGED(OnPlayerFameChanged.class, void.class),
ON_PLAYER_RAID_POINTS_CHANGED(OnPlayerRaidPointsChanged.class, void.class),
// Henna events
ON_PLAYER_HENNA_ADD(OnPlayerHennaAdd.class, void.class),
ON_PLAYER_HENNA_REMOVE(OnPlayerHennaRemove.class, void.class),
// Inventory events
ON_PLAYER_ITEM_ADD(OnPlayerItemAdd.class, void.class),
ON_PLAYER_ITEM_DESTROY(OnPlayerItemDestroy.class, void.class),
ON_PLAYER_ITEM_DROP(OnPlayerItemDrop.class, void.class),
ON_PLAYER_ITEM_PICKUP(OnPlayerItemPickup.class, void.class),
ON_PLAYER_ITEM_TRANSFER(OnPlayerItemTransfer.class, void.class),
// Mentoring events
ON_PLAYER_MENTEE_ADD(OnPlayerMenteeAdd.class, void.class),
ON_PLAYER_MENTEE_LEFT(OnPlayerMenteeLeft.class, void.class),
ON_PLAYER_MENTEE_REMOVE(OnPlayerMenteeRemove.class, void.class),
ON_PLAYER_MENTEE_STATUS(OnPlayerMenteeStatus.class, void.class),
ON_PLAYER_MENTOR_STATUS(OnPlayerMentorStatus.class, void.class),
// Other player events
ON_PLAYER_KARMA_CHANGED(OnPlayerKarmaChanged.class, void.class),
ON_PLAYER_LEVEL_CHANGED(OnPlayerLevelChanged.class, void.class),
ON_PLAYER_LOGIN(OnPlayerLogin.class, void.class),
ON_PLAYER_LOGOUT(OnPlayerLogout.class, void.class),
ON_PLAYER_PK_CHANGED(OnPlayerPKChanged.class, void.class),
ON_PLAYER_PROFESSION_CHANGE(OnPlayerProfessionChange.class, void.class),
ON_PLAYER_CHANGE_TO_AWAKENED_CLASS(OnPlayerChangeToAwakenedClass.class, void.class),
ON_PLAYER_PVP_CHANGED(OnPlayerPvPChanged.class, void.class),
ON_PLAYER_PVP_KILL(OnPlayerPvPKill.class, void.class),
ON_PLAYER_RESTORE(OnPlayerRestore.class, void.class),
ON_PLAYER_SELECT(OnPlayerSelect.class, void.class, TerminateReturn.class),
ON_PLAYER_SKILL_LEARN(OnPlayerSkillLearn.class, void.class),
ON_PLAYER_SUMMON_SPAWN(OnPlayerSummonSpawn.class, void.class),
ON_PLAYER_SUMMON_TALK(OnPlayerSummonTalk.class, void.class),
ON_PLAYER_TRANSFORM(OnPlayerTransform.class, void.class),
ON_PLAYER_SUB_CHANGE(OnPlayerSubChange.class, void.class),
// Trap events
ON_TRAP_ACTION(OnTrapAction.class, void.class),
// TvT events.
ON_TVT_EVENT_FINISH(OnTvTEventFinish.class, void.class),
ON_TVT_EVENT_KILL(OnTvTEventKill.class, void.class),
ON_TVT_EVENT_REGISTRATION_START(OnTvTEventRegistrationStart.class, void.class),
ON_TVT_EVENT_START(OnTvTEventStart.class, void.class);
private final Class<? extends IBaseEvent> _eventClass;
private final Class<?>[] _returnClass;
private EventType(Class<? extends IBaseEvent> eventClass, Class<?>... returnClasss)
{
_eventClass = eventClass;
_returnClass = returnClasss;
}
public Class<? extends IBaseEvent> getEventClass()
{
return _eventClass;
}
public Class<?>[] getReturnClasses()
{
return _returnClass;
}
public boolean isEventClass(Class<?> clazz)
{
return _eventClass == clazz;
}
public boolean isReturnClass(Class<?> clazz)
{
return Util.contains(_returnClass, clazz);
}
}
/*
* 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.model.events;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.events.impl.OnDayNightChange;
import com.l2jmobius.gameserver.model.events.impl.ceremonyofchaos.OnCeremonyOfChaosMatchResult;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttack;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttackAvoid;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttacked;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageDealt;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDeath;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureHpChange;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureKilled;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillFinishCast;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureSkillUse;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureTeleport;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureTeleported;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAggroRangeEnter;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAttack;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableFactionCall;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableHate;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcCanBeSeen;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcCreatureSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcDespawn;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcEventReceived;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcFirstTalk;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcManorBypass;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveRouteFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillFinished;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillSee;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSpawn;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcTeleport;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayableExpChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerAbilityPointsChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerAugment;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerBypass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerCallToChangeClass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerChangeToAwakenedClass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerChat;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanCreate;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanJoin;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanLeaderChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanLeft;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanLvlUp;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanWHItemAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanWHItemDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerClanWHItemTransfer;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerCreate;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerDelete;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerDlgAnswer;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerEquipItem;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerFameChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerFishing;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerHennaAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerHennaRemove;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemDestroy;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemDrop;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemPickup;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerItemTransfer;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogout;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeAdd;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeLeft;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeRemove;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMenteeStatus;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMentorStatus;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerMoveRequest;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPKChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPressTutorialMark;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerProfessionChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPvPChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPvPKill;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerQuestAbort;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerQuestComplete;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerReputationChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerRestore;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSelect;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSkillLearn;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSocialAction;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSubChange;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSummonSpawn;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerSummonTalk;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerTransform;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnTrapAction;
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarFinish;
import com.l2jmobius.gameserver.model.events.impl.clan.OnClanWarStart;
import com.l2jmobius.gameserver.model.events.impl.instance.OnInstanceCreated;
import com.l2jmobius.gameserver.model.events.impl.instance.OnInstanceDestroy;
import com.l2jmobius.gameserver.model.events.impl.instance.OnInstanceEnter;
import com.l2jmobius.gameserver.model.events.impl.instance.OnInstanceLeave;
import com.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemBypassEvent;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemCreate;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemTalk;
import com.l2jmobius.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
import com.l2jmobius.gameserver.model.events.impl.server.OnPacketReceived;
import com.l2jmobius.gameserver.model.events.impl.server.OnPacketSent;
import com.l2jmobius.gameserver.model.events.impl.sieges.OnCastleSiegeFinish;
import com.l2jmobius.gameserver.model.events.impl.sieges.OnCastleSiegeOwnerChange;
import com.l2jmobius.gameserver.model.events.impl.sieges.OnCastleSiegeStart;
import com.l2jmobius.gameserver.model.events.impl.sieges.OnFortSiegeFinish;
import com.l2jmobius.gameserver.model.events.impl.sieges.OnFortSiegeStart;
import com.l2jmobius.gameserver.model.events.returns.ChatFilterReturn;
import com.l2jmobius.gameserver.model.events.returns.DamageReturn;
import com.l2jmobius.gameserver.model.events.returns.LocationReturn;
import com.l2jmobius.gameserver.model.events.returns.TerminateReturn;
/**
* @author UnAfraid
*/
public enum EventType
{
// Attackable events
ON_ATTACKABLE_AGGRO_RANGE_ENTER(OnAttackableAggroRangeEnter.class, void.class),
ON_ATTACKABLE_ATTACK(OnAttackableAttack.class, void.class),
ON_ATTACKABLE_FACTION_CALL(OnAttackableFactionCall.class, void.class),
ON_ATTACKABLE_KILL(OnAttackableKill.class, void.class),
// Castle events
ON_CASTLE_SIEGE_FINISH(OnCastleSiegeFinish.class, void.class),
ON_CASTLE_SIEGE_OWNER_CHANGE(OnCastleSiegeOwnerChange.class, void.class),
ON_CASTLE_SIEGE_START(OnCastleSiegeStart.class, void.class),
// Clan events
ON_CLAN_WAR_FINISH(OnClanWarFinish.class, void.class),
ON_CLAN_WAR_START(OnClanWarStart.class, void.class),
// Creature events
ON_CREATURE_ATTACK(OnCreatureAttack.class, void.class, TerminateReturn.class),
ON_CREATURE_ATTACK_AVOID(OnCreatureAttackAvoid.class, void.class, void.class),
ON_CREATURE_ATTACKED(OnCreatureAttacked.class, void.class, TerminateReturn.class),
ON_CREATURE_DAMAGE_RECEIVED(OnCreatureDamageReceived.class, void.class, DamageReturn.class),
ON_CREATURE_DAMAGE_DEALT(OnCreatureDamageDealt.class, void.class),
ON_CREATURE_HP_CHANGE(OnCreatureHpChange.class, void.class),
ON_CREATURE_DEATH(OnCreatureDeath.class, void.class, TerminateReturn.class),
ON_CREATURE_KILLED(OnCreatureKilled.class, void.class, TerminateReturn.class),
ON_CREATURE_SEE(OnCreatureSee.class, void.class),
ON_CREATURE_SKILL_USE(OnCreatureSkillUse.class, void.class, TerminateReturn.class),
ON_CREATURE_SKILL_FINISH_CAST(OnCreatureSkillFinishCast.class, void.class),
ON_CREATURE_TELEPORT(OnCreatureTeleport.class, void.class, LocationReturn.class),
ON_CREATURE_TELEPORTED(OnCreatureTeleported.class, void.class),
ON_CREATURE_ZONE_ENTER(OnCreatureZoneEnter.class, void.class),
ON_CREATURE_ZONE_EXIT(OnCreatureZoneExit.class, void.class),
// Fortress events
ON_FORT_SIEGE_FINISH(OnFortSiegeFinish.class, void.class),
ON_FORT_SIEGE_START(OnFortSiegeStart.class, void.class),
// Item events
ON_ITEM_BYPASS_EVENT(OnItemBypassEvent.class, void.class),
ON_ITEM_CREATE(OnItemCreate.class, void.class),
ON_ITEM_TALK(OnItemTalk.class, void.class),
// Npcs events
ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class),
ON_NPC_CREATURE_SEE(OnNpcCreatureSee.class, void.class),
ON_NPC_EVENT_RECEIVED(OnNpcEventReceived.class, void.class),
ON_NPC_FIRST_TALK(OnNpcFirstTalk.class, void.class),
ON_NPC_HATE(OnAttackableHate.class, void.class, TerminateReturn.class),
ON_NPC_MOVE_FINISHED(OnNpcMoveFinished.class, void.class),
ON_NPC_MOVE_NODE_ARRIVED(OnNpcMoveNodeArrived.class, void.class),
ON_NPC_MOVE_ROUTE_FINISHED(OnNpcMoveRouteFinished.class, void.class),
ON_NPC_QUEST_START(null, void.class),
ON_NPC_SKILL_FINISHED(OnNpcSkillFinished.class, void.class),
ON_NPC_SKILL_SEE(OnNpcSkillSee.class, void.class),
ON_NPC_SPAWN(OnNpcSpawn.class, void.class),
ON_NPC_TALK(null, void.class),
ON_NPC_TELEPORT(OnNpcTeleport.class, void.class),
ON_NPC_MANOR_BYPASS(OnNpcManorBypass.class, void.class),
ON_NPC_MENU_SELECT(OnNpcMenuSelect.class, void.class),
ON_NPC_DESPAWN(OnNpcDespawn.class, void.class),
// Olympiad events
ON_OLYMPIAD_MATCH_RESULT(OnOlympiadMatchResult.class, void.class),
// Ceremony of Chaos events
ON_CEREMONY_OF_CHAOS_MATCH_RESULT(OnCeremonyOfChaosMatchResult.class, void.class),
// Playable events
ON_PLAYABLE_EXP_CHANGED(OnPlayableExpChanged.class, void.class, TerminateReturn.class),
// Player events
ON_PLAYER_AUGMENT(OnPlayerAugment.class, void.class),
ON_PLAYER_BYPASS(OnPlayerBypass.class, void.class, TerminateReturn.class),
ON_PLAYER_CALL_TO_CHANGE_CLASS(OnPlayerCallToChangeClass.class, void.class),
ON_PLAYER_CHAT(OnPlayerChat.class, void.class, ChatFilterReturn.class),
ON_PLAYER_ABILITY_POINTS_CHANGED(OnPlayerAbilityPointsChanged.class, void.class),
// Clan events
ON_PLAYER_CLAN_CREATE(OnPlayerClanCreate.class, void.class),
ON_PLAYER_CLAN_DESTROY(OnPlayerClanDestroy.class, void.class),
ON_PLAYER_CLAN_JOIN(OnPlayerClanJoin.class, void.class),
ON_PLAYER_CLAN_LEADER_CHANGE(OnPlayerClanLeaderChange.class, void.class),
ON_PLAYER_CLAN_LEFT(OnPlayerClanLeft.class, void.class),
ON_PLAYER_CLAN_LVLUP(OnPlayerClanLvlUp.class, void.class),
// Clan warehouse events
ON_PLAYER_CLAN_WH_ITEM_ADD(OnPlayerClanWHItemAdd.class, void.class),
ON_PLAYER_CLAN_WH_ITEM_DESTROY(OnPlayerClanWHItemDestroy.class, void.class),
ON_PLAYER_CLAN_WH_ITEM_TRANSFER(OnPlayerClanWHItemTransfer.class, void.class),
ON_PLAYER_CREATE(OnPlayerCreate.class, void.class),
ON_PLAYER_DELETE(OnPlayerDelete.class, void.class),
ON_PLAYER_DLG_ANSWER(OnPlayerDlgAnswer.class, void.class, TerminateReturn.class),
ON_PLAYER_EQUIP_ITEM(OnPlayerEquipItem.class, void.class),
ON_PLAYER_FAME_CHANGED(OnPlayerFameChanged.class, void.class),
ON_PLAYER_FISHING(OnPlayerFishing.class, void.class),
// Henna events
ON_PLAYER_HENNA_ADD(OnPlayerHennaAdd.class, void.class),
ON_PLAYER_HENNA_REMOVE(OnPlayerHennaRemove.class, void.class),
// Inventory events
ON_PLAYER_ITEM_ADD(OnPlayerItemAdd.class, void.class),
ON_PLAYER_ITEM_DESTROY(OnPlayerItemDestroy.class, void.class),
ON_PLAYER_ITEM_DROP(OnPlayerItemDrop.class, void.class),
ON_PLAYER_ITEM_PICKUP(OnPlayerItemPickup.class, void.class),
ON_PLAYER_ITEM_TRANSFER(OnPlayerItemTransfer.class, void.class),
// Mentoring events
ON_PLAYER_MENTEE_ADD(OnPlayerMenteeAdd.class, void.class),
ON_PLAYER_MENTEE_LEFT(OnPlayerMenteeLeft.class, void.class),
ON_PLAYER_MENTEE_REMOVE(OnPlayerMenteeRemove.class, void.class),
ON_PLAYER_MENTEE_STATUS(OnPlayerMenteeStatus.class, void.class),
ON_PLAYER_MENTOR_STATUS(OnPlayerMentorStatus.class, void.class),
// Other player events
ON_PLAYER_REPUTATION_CHANGED(OnPlayerReputationChanged.class, void.class),
ON_PLAYER_LEVEL_CHANGED(OnPlayerLevelChanged.class, void.class),
ON_PLAYER_LOGIN(OnPlayerLogin.class, void.class),
ON_PLAYER_LOGOUT(OnPlayerLogout.class, void.class),
ON_PLAYER_PK_CHANGED(OnPlayerPKChanged.class, void.class),
ON_PLAYER_PRESS_TUTORIAL_MARK(OnPlayerPressTutorialMark.class, void.class),
ON_PLAYER_MOVE_REQUEST(OnPlayerMoveRequest.class, void.class, TerminateReturn.class),
ON_PLAYER_PROFESSION_CHANGE(OnPlayerProfessionChange.class, void.class),
ON_PLAYER_CHANGE_TO_AWAKENED_CLASS(OnPlayerChangeToAwakenedClass.class, void.class),
ON_PLAYER_PVP_CHANGED(OnPlayerPvPChanged.class, void.class),
ON_PLAYER_PVP_KILL(OnPlayerPvPKill.class, void.class),
ON_PLAYER_RESTORE(OnPlayerRestore.class, void.class),
ON_PLAYER_SELECT(OnPlayerSelect.class, void.class, TerminateReturn.class),
ON_PLAYER_SOCIAL_ACTION(OnPlayerSocialAction.class, void.class),
ON_PLAYER_SKILL_LEARN(OnPlayerSkillLearn.class, void.class),
ON_PLAYER_SUMMON_SPAWN(OnPlayerSummonSpawn.class, void.class),
ON_PLAYER_SUMMON_TALK(OnPlayerSummonTalk.class, void.class),
ON_PLAYER_TRANSFORM(OnPlayerTransform.class, void.class),
ON_PLAYER_SUB_CHANGE(OnPlayerSubChange.class, void.class),
ON_PLAYER_QUEST_ABORT(OnPlayerQuestAbort.class, void.class),
ON_PLAYER_QUEST_COMPLETE(OnPlayerQuestComplete.class, void.class),
// Trap events
ON_TRAP_ACTION(OnTrapAction.class, void.class),
ON_DAY_NIGHT_CHANGE(OnDayNightChange.class, void.class),
ON_PACKET_RECEIVED(OnPacketReceived.class, void.class),
ON_PACKET_SENT(OnPacketSent.class, void.class),
// Instance events
ON_INSTANCE_CREATED(OnInstanceCreated.class, void.class),
ON_INSTANCE_DESTROY(OnInstanceDestroy.class, void.class),
ON_INSTANCE_ENTER(OnInstanceEnter.class, void.class),
ON_INSTANCE_LEAVE(OnInstanceLeave.class, void.class),
ON_INSTANCE_STATUS_CHANGE(OnInstanceStatusChange.class, void.class);
private final Class<? extends IBaseEvent> _eventClass;
private final Class<?>[] _returnClass;
EventType(Class<? extends IBaseEvent> eventClass, Class<?>... returnClasss)
{
_eventClass = eventClass;
_returnClass = returnClasss;
}
public Class<? extends IBaseEvent> getEventClass()
{
return _eventClass;
}
public Class<?>[] getReturnClasses()
{
return _returnClass;
}
public boolean isEventClass(Class<?> clazz)
{
return _eventClass == clazz;
}
public boolean isReturnClass(Class<?> clazz)
{
return CommonUtil.contains(_returnClass, clazz);
}
}

View File

@@ -1,34 +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.model.events;
/**
* @author UnAfraid
*/
public enum ListenerRegisterType
{
NPC,
ZONE,
ITEM,
CASTLE,
FORTRESS,
OLYMPIAD,
GLOBAL,
GLOBAL_NPCS,
GLOBAL_MONSTERS,
GLOBAL_PLAYERS;
}
/*
* 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.model.events;
/**
* @author UnAfraid
*/
public enum ListenerRegisterType
{
NPC,
ZONE,
ITEM,
CASTLE,
FORTRESS,
OLYMPIAD,
INSTANCE,
GLOBAL,
GLOBAL_NPCS,
GLOBAL_MONSTERS,
GLOBAL_PLAYERS
}

View File

@@ -1,102 +1,119 @@
/*
* 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.model.events;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.function.Predicate;
import com.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
import com.l2jmobius.util.EmptyQueue;
/**
* @author UnAfraid
*/
public class ListenersContainer
{
private volatile Map<EventType, Queue<AbstractEventListener>> _listeners = new ConcurrentHashMap<>();
/**
* Registers listener for a callback when specified event is executed.
* @param listener
* @return
*/
public AbstractEventListener addListener(AbstractEventListener listener)
{
if (listener == null)
{
throw new NullPointerException("Listener cannot be null!");
}
getListeners().computeIfAbsent(listener.getType(), k -> new PriorityBlockingQueue<>()).add(listener);
return listener;
}
/**
* Unregisters listener for a callback when specified event is executed.
* @param listener
* @return
*/
public AbstractEventListener removeListener(AbstractEventListener listener)
{
if (listener == null)
{
throw new NullPointerException("Listener cannot be null!");
}
else if (!_listeners.containsKey(listener.getType()))
{
throw new IllegalAccessError("Listeners container doesn't had " + listener.getType() + " event type added!");
}
_listeners.get(listener.getType()).remove(listener);
return listener;
}
/**
* @param type
* @return {@code List} of {@link AbstractEventListener} by the specified type
*/
public Queue<AbstractEventListener> getListeners(EventType type)
{
return _listeners.containsKey(type) ? _listeners.get(type) : EmptyQueue.emptyQueue();
}
public void removeListenerIf(EventType type, Predicate<? super AbstractEventListener> filter)
{
getListeners(type).stream().filter(filter).forEach(AbstractEventListener::unregisterMe);
}
public void removeListenerIf(Predicate<? super AbstractEventListener> filter)
{
getListeners().values().forEach(queue -> queue.stream().filter(filter).forEach(AbstractEventListener::unregisterMe));
}
public boolean hasListener(EventType type)
{
return !getListeners(type).isEmpty();
}
/**
* Creates the listeners container map if doesn't exists.
* @return the listeners container map.
*/
private Map<EventType, Queue<AbstractEventListener>> getListeners()
{
return _listeners;
}
}
/*
* 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.model.events;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.function.Predicate;
import com.l2jmobius.commons.util.EmptyQueue;
import com.l2jmobius.gameserver.model.events.listeners.AbstractEventListener;
/**
* @author UnAfraid
*/
public class ListenersContainer
{
private volatile Map<EventType, Queue<AbstractEventListener>> _listeners = null;
/**
* Registers listener for a callback when specified event is executed.
* @param listener
* @return
*/
public AbstractEventListener addListener(AbstractEventListener listener)
{
if ((listener == null))
{
throw new NullPointerException("Listener cannot be null!");
}
getListeners().computeIfAbsent(listener.getType(), k -> new PriorityBlockingQueue<>()).add(listener);
return listener;
}
/**
* Unregisters listener for a callback when specified event is executed.
* @param listener
* @return
*/
public AbstractEventListener removeListener(AbstractEventListener listener)
{
if ((listener == null))
{
throw new NullPointerException("Listener cannot be null!");
}
else if (_listeners == null)
{
throw new NullPointerException("Listeners container is not initialized!");
}
else if (!_listeners.containsKey(listener.getType()))
{
throw new IllegalAccessError("Listeners container doesn't had " + listener.getType() + " event type added!");
}
_listeners.get(listener.getType()).remove(listener);
return listener;
}
/**
* @param type
* @return {@code List} of {@link AbstractEventListener} by the specified type
*/
public Queue<AbstractEventListener> getListeners(EventType type)
{
return (_listeners != null) && _listeners.containsKey(type) ? _listeners.get(type) : EmptyQueue.emptyQueue();
}
public void removeListenerIf(EventType type, Predicate<? super AbstractEventListener> filter)
{
getListeners(type).stream().filter(filter).forEach(AbstractEventListener::unregisterMe);
}
public void removeListenerIf(Predicate<? super AbstractEventListener> filter)
{
if (_listeners != null)
{
getListeners().values().forEach(queue -> queue.stream().filter(filter).forEach(AbstractEventListener::unregisterMe));
}
}
public boolean hasListener(EventType type)
{
return !getListeners(type).isEmpty();
}
/**
* Creates the listeners container map if doesn't exists.
* @return the listeners container map.
*/
private Map<EventType, Queue<AbstractEventListener>> getListeners()
{
if (_listeners == null)
{
synchronized (this)
{
if (_listeners == null)
{
_listeners = new ConcurrentHashMap<>();
}
}
}
return _listeners;
}
}

View File

@@ -0,0 +1,317 @@
/*
* 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.model.events;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.timers.IEventTimerCancel;
import com.l2jmobius.gameserver.model.events.timers.IEventTimerEvent;
import com.l2jmobius.gameserver.model.events.timers.TimerHolder;
/**
* @author UnAfraid
* @param <T>
*/
public final class TimerExecutor<T>
{
private final Map<T, Set<TimerHolder<T>>> _timers = new ConcurrentHashMap<>();
private final IEventTimerEvent<T> _eventListener;
private final IEventTimerCancel<T> _cancelListener;
public TimerExecutor(IEventTimerEvent<T> eventListener, IEventTimerCancel<T> cancelListener)
{
_eventListener = eventListener;
_cancelListener = cancelListener;
}
/**
* Adds timer
* @param holder
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addTimer(TimerHolder<T> holder)
{
final Set<TimerHolder<T>> timers = _timers.computeIfAbsent(holder.getEvent(), key -> ConcurrentHashMap.newKeySet());
for (TimerHolder<T> timer : timers)
{
if (timer.equals(holder))
{
timer.cancelTimer();
}
}
return timers.add(holder);
}
/**
* Adds non-repeating timer (Lambda is supported on the last parameter)
* @param event
* @param params
* @param time
* @param npc
* @param player
* @param eventTimer
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent<T> eventTimer)
{
return addTimer(new TimerHolder<>(event, params, time, npc, player, false, eventTimer, _cancelListener, this));
}
/**
* Adds non-repeating timer (Lambda is supported on the last parameter)
* @param event
* @param time
* @param eventTimer
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addTimer(T event, long time, IEventTimerEvent<T> eventTimer)
{
return addTimer(new TimerHolder<>(event, null, time, null, null, false, eventTimer, _cancelListener, this));
}
/**
* Adds non-repeating timer
* @param event
* @param params
* @param time
* @param npc
* @param player
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player)
{
return addTimer(event, params, time, npc, player, _eventListener);
}
/**
* Adds non-repeating timer
* @param event
* @param time
* @param npc
* @param player
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addTimer(T event, long time, L2Npc npc, L2PcInstance player)
{
return addTimer(event, null, time, npc, player, _eventListener);
}
/**
* Adds repeating timer (Lambda is supported on the last parameter)
* @param event
* @param params
* @param time
* @param npc
* @param player
* @param eventTimer
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player, IEventTimerEvent<T> eventTimer)
{
return addTimer(new TimerHolder<>(event, params, time, npc, player, true, eventTimer, _cancelListener, this));
}
/**
* Adds repeating timer
* @param event
* @param params
* @param time
* @param npc
* @param player
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addRepeatingTimer(T event, StatsSet params, long time, L2Npc npc, L2PcInstance player)
{
return addRepeatingTimer(event, params, time, npc, player, _eventListener);
}
/**
* Adds repeating timer
* @param event
* @param time
* @param npc
* @param player
* @return {@code true} if timer were successfully added, {@code false} in case it exists already
*/
public boolean addRepeatingTimer(T event, long time, L2Npc npc, L2PcInstance player)
{
return addRepeatingTimer(event, null, time, npc, player, _eventListener);
}
/**
* That method is executed right after notification to {@link IEventTimerEvent#onTimerEvent(TimerHolder)} in order to remove the holder from the _timers map
* @param holder
*/
public void onTimerPostExecute(TimerHolder<T> holder)
{
// Remove non repeating timer upon execute
if (!holder.isRepeating())
{
final Set<TimerHolder<T>> timers = _timers.get(holder.getEvent());
if ((timers == null) || timers.isEmpty())
{
return;
}
// Remove the timer
timers.removeIf(holder::equals);
// If there's no events inside that set remove it
if (timers.isEmpty())
{
_timers.remove(holder.getEvent());
}
}
}
/**
* @param timer
*/
public void onTimerCancel(TimerHolder<T> timer)
{
final Set<TimerHolder<T>> timers = _timers.get(timer.getEvent());
if ((timers != null) && timers.remove(timer))
{
_eventListener.onTimerEvent(timer);
if (timers.isEmpty())
{
_timers.remove(timer.getEvent());
}
}
}
/**
* Cancels and removes all timers from the _timers map
*/
public void cancelAllTimers()
{
_timers.values().stream().flatMap(Set::stream).forEach(TimerHolder::cancelTimer);
_timers.clear();
}
/**
* @param event
* @param npc
* @param player
* @return {@code true} if there is a timer with the given event npc and player parameters, {@code false} otherwise
*/
public boolean hasTimer(T event, L2Npc npc, L2PcInstance player)
{
final Set<TimerHolder<T>> timers = _timers.get(event);
if ((timers == null) || timers.isEmpty())
{
return false;
}
return timers.stream().anyMatch(holder -> holder.isEqual(event, npc, player));
}
/**
* @param event
* @return {@code true} if there is at least one timer with the given event, {@code false} otherwise
*/
public boolean hasTimers(T event)
{
return _timers.containsKey(event);
}
/**
* @param event
* @return {@code true} if at least one timer for the given event were stopped, {@code false} otherwise
*/
public boolean cancelTimers(T event)
{
final Set<TimerHolder<T>> timers = _timers.remove(event);
if ((timers == null) || timers.isEmpty())
{
return false;
}
timers.forEach(TimerHolder::cancelTimer);
return true;
}
/**
* @param event
* @param npc
* @param player
* @return {@code true} if timer for the given event, npc, player were stopped, {@code false} otheriwse
*/
public boolean cancelTimer(T event, L2Npc npc, L2PcInstance player)
{
final Set<TimerHolder<T>> timers = _timers.get(event);
if ((timers == null) || timers.isEmpty())
{
return false;
}
final Iterator<TimerHolder<T>> holders = timers.iterator();
while (holders.hasNext())
{
final TimerHolder<T> holder = holders.next();
if (holder.isEqual(event, npc, player))
{
holders.remove();
return holder.cancelTimer();
}
}
return false;
}
/**
* Cancel all timers of specified npc
* @param npc
*/
public void cancelTimersOf(L2Npc npc)
{
_timers.values().forEach(timers -> timers.stream().filter(holder -> holder.getNpc() == npc).forEach(TimerHolder::cancelTimer));
}
/**
* @param event
* @param npc
* @param player
* @return the remaining time of the timer, or -1 in case it doesn't exists
*/
public long getRemainingTime(T event, L2Npc npc, L2PcInstance player)
{
final Set<TimerHolder<T>> timers = _timers.get(event);
if ((timers == null) || timers.isEmpty())
{
return -1;
}
final Iterator<TimerHolder<T>> holders = timers.iterator();
while (holders.hasNext())
{
final TimerHolder<T> holder = holders.next();
if (holder.isEqual(event, npc, player))
{
holders.remove();
return holder.getRemainingTime();
}
}
return -1;
}
}

View File

@@ -1,34 +1,34 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(Ids.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Id
{
int[] value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(Ids.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Id
{
int[] value();
}

View File

@@ -1,32 +1,32 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Ids
{
Id[] value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Ids
{
Id[] value();
}

View File

@@ -1,36 +1,36 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(NpcLevelRanges.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface NpcLevelRange
{
int from();
int to();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(NpcLevelRanges.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface NpcLevelRange
{
int from();
int to();
}

View File

@@ -1,32 +1,32 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface NpcLevelRanges
{
NpcLevelRange[] value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface NpcLevelRanges
{
NpcLevelRange[] value();
}

View File

@@ -1,32 +1,32 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Priority
{
int value() default 0;
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Priority
{
int value() default 0;
}

View File

@@ -1,36 +1,36 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(Ranges.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Range
{
int from();
int to();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Repeatable(Ranges.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Range
{
int from();
int to();
}

View File

@@ -1,32 +1,32 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Ranges
{
Range[] value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Ranges
{
Range[] value();
}

View File

@@ -1,34 +1,34 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.l2jmobius.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterEvent
{
EventType value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.l2jmobius.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterEvent
{
EventType value();
}

View File

@@ -1,34 +1,34 @@
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterType
{
ListenerRegisterType value();
}
/*
* 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.model.events.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterType
{
ListenerRegisterType value();
}

View File

@@ -1,27 +1,27 @@
/*
* 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.model.events.impl;
import com.l2jmobius.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
public interface IBaseEvent
{
EventType getType();
}
/*
* 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.model.events.impl;
import com.l2jmobius.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
public interface IBaseEvent
{
EventType getType();
}

View File

@@ -1,32 +1,43 @@
/*
* 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.model.events.impl.events;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventRegistrationStart implements IBaseEvent
{
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_REGISTRATION_START;
}
}
/*
* 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.model.events.impl;
import com.l2jmobius.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
public class OnDayNightChange implements IBaseEvent
{
private final boolean _isNight;
public OnDayNightChange(boolean isNight)
{
_isNight = isNight;
}
public boolean isNight()
{
return _isNight;
}
@Override
public EventType getType()
{
return EventType.ON_DAY_NIGHT_CHANGE;
}
}

View File

@@ -0,0 +1,54 @@
/*
* 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.model.events.impl.ceremonyofchaos;
import java.util.List;
import com.l2jmobius.gameserver.model.ceremonyofchaos.CeremonyOfChaosMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCeremonyOfChaosMatchResult implements IBaseEvent
{
private final List<CeremonyOfChaosMember> _winners;
private final List<CeremonyOfChaosMember> _members;
public OnCeremonyOfChaosMatchResult(List<CeremonyOfChaosMember> winners, List<CeremonyOfChaosMember> members)
{
_winners = winners;
_members = members;
}
public List<CeremonyOfChaosMember> getWinners()
{
return _winners;
}
public List<CeremonyOfChaosMember> getMembers()
{
return _members;
}
@Override
public EventType getType()
{
return EventType.ON_CEREMONY_OF_CHAOS_MATCH_RESULT;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureAttack implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureAttack(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACK;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureAttack implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureAttack(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACK;
}
}

View File

@@ -1,68 +1,68 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character attack miss L2Character.
* @author Zealar
*/
public class OnCreatureAttackAvoid implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final boolean _damageOverTime;
/**
* @param attacker who attack
* @param target who avoid
* @param isDot is dot damage
*/
public OnCreatureAttackAvoid(L2Character attacker, L2Character target, boolean isDot)
{
_attacker = attacker;
_target = target;
_damageOverTime = isDot;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
/**
* @return
*/
public boolean isDamageOverTime()
{
return _damageOverTime;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACK_AVOID;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character attack miss L2Character.
* @author Zealar
*/
public class OnCreatureAttackAvoid implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final boolean _damageOverTime;
/**
* @param attacker who attack
* @param target who avoid
* @param isDot is dot damage
*/
public OnCreatureAttackAvoid(L2Character attacker, L2Character target, boolean isDot)
{
_attacker = attacker;
_target = target;
_damageOverTime = isDot;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
/**
* @return
*/
public boolean isDamageOverTime()
{
return _damageOverTime;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACK_AVOID;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureAttacked implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureAttacked(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACKED;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureAttacked implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureAttacked(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ATTACKED;
}
}

View File

@@ -1,82 +1,89 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureDamageDealt implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final double _damage;
private final Skill _skill;
private final boolean _crit;
private final boolean _damageOverTime;
public OnCreatureDamageDealt(L2Character attacker, L2Character target, double damage, Skill skill, boolean crit, boolean damageOverTime)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_crit = crit;
_damageOverTime = damageOverTime;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
public double getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isCritical()
{
return _crit;
}
public boolean isDamageOverTime()
{
return _damageOverTime;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_DAMAGE_DEALT;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureDamageDealt implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final double _damage;
private final Skill _skill;
private final boolean _crit;
private final boolean _damageOverTime;
private final boolean _reflect;
public OnCreatureDamageDealt(L2Character attacker, L2Character target, double damage, Skill skill, boolean crit, boolean damageOverTime, boolean reflect)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_crit = crit;
_damageOverTime = damageOverTime;
_reflect = reflect;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
public double getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isCritical()
{
return _crit;
}
public boolean isDamageOverTime()
{
return _damageOverTime;
}
public boolean isReflect()
{
return _reflect;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_DAMAGE_DEALT;
}
}

View File

@@ -1,82 +1,89 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureDamageReceived implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final double _damage;
private final Skill _skill;
private final boolean _crit;
private final boolean _damageOverTime;
public OnCreatureDamageReceived(L2Character attacker, L2Character target, double damage, Skill skill, boolean crit, boolean damageOverTime)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_crit = crit;
_damageOverTime = damageOverTime;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
public double getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isCritical()
{
return _crit;
}
public boolean isDamageOverTime()
{
return _damageOverTime;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_DAMAGE_RECEIVED;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureDamageReceived implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
private final double _damage;
private final Skill _skill;
private final boolean _crit;
private final boolean _damageOverTime;
private final boolean _reflect;
public OnCreatureDamageReceived(L2Character attacker, L2Character target, double damage, Skill skill, boolean crit, boolean damageOverTime, boolean reflect)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_crit = crit;
_damageOverTime = damageOverTime;
_reflect = reflect;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
public double getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isCritical()
{
return _crit;
}
public boolean isDamageOverTime()
{
return _damageOverTime;
}
public boolean isReflect()
{
return _reflect;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_DAMAGE_RECEIVED;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is killed by L2Character.
* @author UnAfraid
*/
public class OnCreatureKill implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureKill(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_KILL;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is killed by L2Character.
* @author UnAfraid
*/
public class OnCreatureDeath implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureDeath(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_DEATH;
}
}

View File

@@ -0,0 +1,59 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCreatureHpChange implements IBaseEvent
{
private final L2Character _creature;
private final double _newHp;
private final double _oldHp;
public OnCreatureHpChange(L2Character creature, double oldHp, double newHp)
{
_creature = creature;
_oldHp = oldHp;
_newHp = newHp;
}
public L2Character getCreature()
{
return _creature;
}
public double getOldHp()
{
return _oldHp;
}
public double getNewHp()
{
return _newHp;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_HP_CHANGE;
}
}

View File

@@ -0,0 +1,53 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character kills L2Character.
* @author UnAfraid
*/
public class OnCreatureKilled implements IBaseEvent
{
private final L2Character _attacker;
private final L2Character _target;
public OnCreatureKilled(L2Character attacker, L2Character target)
{
_attacker = attacker;
_target = target;
}
public final L2Character getAttacker()
{
return _attacker;
}
public final L2Character getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_KILLED;
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCreatureSee implements IBaseEvent
{
private final L2Character _seer;
private final L2Character _seen;
public OnCreatureSee(L2Character seer, L2Character seen)
{
_seer = seer;
_seen = seen;
}
public final L2Character getSeer()
{
return _seer;
}
public final L2Character getSeen()
{
return _seen;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_SEE;
}
}

View File

@@ -0,0 +1,69 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when Caster has finished using a skill.
* @author Nik
*/
public class OnCreatureSkillFinishCast implements IBaseEvent
{
private final L2Character _caster;
private final Skill _skill;
private final boolean _simultaneously;
private final L2Object _target;
public OnCreatureSkillFinishCast(L2Character caster, L2Object target, Skill skill, boolean simultaneously)
{
_caster = caster;
_skill = skill;
_simultaneously = simultaneously;
_target = target;
}
public final L2Character getCaster()
{
return _caster;
}
public final L2Object getTarget()
{
return _target;
}
public Skill getSkill()
{
return _skill;
}
public boolean isSimultaneously()
{
return _simultaneously;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_SKILL_FINISH_CAST;
}
}

View File

@@ -1,76 +1,61 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Character is attacked by L2Character.
* @author UnAfraid
*/
public class OnCreatureSkillUse implements IBaseEvent
{
private final L2Character _caster;
private final Skill _skill;
private final boolean _simultaneously;
private final L2Character _target;
private final L2Object[] _targets;
public OnCreatureSkillUse(L2Character caster, Skill skill, boolean simultaneously, L2Character target, L2Object[] targets)
{
_caster = caster;
_skill = skill;
_simultaneously = simultaneously;
_target = target;
_targets = targets;
}
public final L2Character getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
public boolean isSimultaneously()
{
return _simultaneously;
}
public final L2Character getTarget()
{
return _target;
}
public L2Object[] getTargets()
{
return _targets;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_SKILL_USE;
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* Executed when the caster Creature tries to use a skill.
* @author UnAfraid, Nik
*/
public class OnCreatureSkillUse implements IBaseEvent
{
private final L2Character _caster;
private final Skill _skill;
private final boolean _simultaneously;
public OnCreatureSkillUse(L2Character caster, Skill skill, boolean simultaneously)
{
_caster = caster;
_skill = skill;
_simultaneously = simultaneously;
}
public final L2Character getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
public boolean isSimultaneously()
{
return _simultaneously;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_SKILL_USE;
}
}

View File

@@ -0,0 +1,81 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.instancezone.Instance;
/**
* @author Nik
*/
public class OnCreatureTeleport implements IBaseEvent
{
private final L2Character _creature;
private final int _destX;
private final int _destY;
private final int _destZ;
private final int _destHeading;
private final Instance _destInstance;
public OnCreatureTeleport(L2Character creature, int destX, int destY, int destZ, int destHeading, Instance destInstance)
{
_creature = creature;
_destX = destX;
_destY = destY;
_destZ = destZ;
_destHeading = destHeading;
_destInstance = destInstance;
}
public L2Character getCreature()
{
return _creature;
}
public int getDestX()
{
return _destX;
}
public int getDestY()
{
return _destY;
}
public int getDestZ()
{
return _destZ;
}
public int getDestHeading()
{
return _destHeading;
}
public Instance getDestInstance()
{
return _destInstance;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_TELEPORT;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCreatureTeleported implements IBaseEvent
{
private final L2Character _creature;
public OnCreatureTeleported(L2Character creature)
{
_creature = creature;
}
public L2Character getCreature()
{
return _creature;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_TELEPORTED;
}
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCreatureTeleported implements IBaseEvent
{
private final L2Character _creature;
public OnCreatureTeleported(L2Character creature)
{
_creature = creature;
}
public L2Character getCreature()
{
return _creature;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_TELEPORTED;
}
}

View File

@@ -1,53 +1,54 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author UnAfraid
*/
public class OnCreatureZoneEnter implements IBaseEvent
{
private final L2Character _creature;
private final L2ZoneType _zone;
public OnCreatureZoneEnter(L2Character creature, L2ZoneType zone)
{
_creature = creature;
_zone = zone;
}
public L2Character getCreature()
{
return _creature;
}
public L2ZoneType getZone()
{
return _zone;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ZONE_ENTER;
}
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author UnAfraid
*/
public class OnCreatureZoneEnter implements IBaseEvent
{
private final L2Character _creature;
private final L2ZoneType _zone;
public OnCreatureZoneEnter(L2Character creature, L2ZoneType zone)
{
_creature = creature;
_zone = zone;
}
public L2Character getCreature()
{
return _creature;
}
public L2ZoneType getZone()
{
return _zone;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ZONE_ENTER;
}
}

View File

@@ -1,53 +1,54 @@
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author UnAfraid
*/
public class OnCreatureZoneExit implements IBaseEvent
{
private final L2Character _creature;
private final L2ZoneType _zone;
public OnCreatureZoneExit(L2Character creature, L2ZoneType zone)
{
_creature = creature;
_zone = zone;
}
public L2Character getCreature()
{
return _creature;
}
public L2ZoneType getZone()
{
return _zone;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ZONE_EXIT;
}
}
/*
* 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.model.events.impl.character;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
/**
* @author UnAfraid
*/
public class OnCreatureZoneExit implements IBaseEvent
{
private final L2Character _creature;
private final L2ZoneType _zone;
public OnCreatureZoneExit(L2Character creature, L2ZoneType zone)
{
_creature = creature;
_zone = zone;
}
public L2Character getCreature()
{
return _creature;
}
public L2ZoneType getZone()
{
return _zone;
}
@Override
public EventType getType()
{
return EventType.ON_CREATURE_ZONE_EXIT;
}
}

View File

@@ -1,60 +1,60 @@
/*
* 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.model.events.impl.character.npc.attackable;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableAggroRangeEnter implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
private final boolean _isSummon;
public OnAttackableAggroRangeEnter(L2Npc npc, L2PcInstance attacker, boolean isSummon)
{
_npc = npc;
_activeChar = attacker;
_isSummon = isSummon;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_AGGRO_RANGE_ENTER;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableAggroRangeEnter implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
private final boolean _isSummon;
public OnAttackableAggroRangeEnter(L2Npc npc, L2PcInstance attacker, boolean isSummon)
{
_npc = npc;
_activeChar = attacker;
_isSummon = isSummon;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_AGGRO_RANGE_ENTER;
}
}

View File

@@ -1,76 +1,76 @@
/*
* 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.model.events.impl.character.npc.attackable;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Attackable is attacked by L2PcInstance.
* @author UnAfraid
*/
public class OnAttackableAttack implements IBaseEvent
{
private final L2PcInstance _attacker;
private final L2Attackable _target;
private final int _damage;
private final Skill _skill;
private final boolean _isSummon;
public OnAttackableAttack(L2PcInstance attacker, L2Attackable target, int damage, Skill skill, boolean isSummon)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_isSummon = isSummon;
}
public final L2PcInstance getAttacker()
{
return _attacker;
}
public final L2Attackable getTarget()
{
return _target;
}
public int getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_ATTACK;
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* An instantly executed event when L2Attackable is attacked by L2PcInstance.
* @author UnAfraid
*/
public class OnAttackableAttack implements IBaseEvent
{
private final L2PcInstance _attacker;
private final L2Attackable _target;
private final int _damage;
private final Skill _skill;
private final boolean _isSummon;
public OnAttackableAttack(L2PcInstance attacker, L2Attackable target, int damage, Skill skill, boolean isSummon)
{
_attacker = attacker;
_target = target;
_damage = damage;
_skill = skill;
_isSummon = isSummon;
}
public final L2PcInstance getAttacker()
{
return _attacker;
}
public final L2Attackable getTarget()
{
return _target;
}
public int getDamage()
{
return _damage;
}
public Skill getSkill()
{
return _skill;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_ATTACK;
}
}

View File

@@ -1,67 +1,67 @@
/*
* 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.model.events.impl.character.npc.attackable;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableFactionCall implements IBaseEvent
{
private final L2Npc _npc;
private final L2Npc _caller;
private final L2PcInstance _attacker;
private final boolean _isSummon;
public OnAttackableFactionCall(L2Npc npc, L2Npc caller, L2PcInstance attacker, boolean isSummon)
{
_npc = npc;
_caller = caller;
_attacker = attacker;
_isSummon = isSummon;
}
public L2Npc getNpc()
{
return _npc;
}
public L2Npc getCaller()
{
return _caller;
}
public L2PcInstance getAttacker()
{
return _attacker;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_FACTION_CALL;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableFactionCall implements IBaseEvent
{
private final L2Npc _npc;
private final L2Npc _caller;
private final L2PcInstance _attacker;
private final boolean _isSummon;
public OnAttackableFactionCall(L2Npc npc, L2Npc caller, L2PcInstance attacker, boolean isSummon)
{
_npc = npc;
_caller = caller;
_attacker = attacker;
_isSummon = isSummon;
}
public L2Npc getNpc()
{
return _npc;
}
public L2Npc getCaller()
{
return _caller;
}
public L2PcInstance getAttacker()
{
return _attacker;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_FACTION_CALL;
}
}

View File

@@ -1,60 +1,60 @@
/*
* 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.model.events.impl.character.npc.attackable;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableHate implements IBaseEvent
{
private final L2Attackable _npc;
private final L2PcInstance _activeChar;
private final boolean _isSummon;
public OnAttackableHate(L2Attackable npc, L2PcInstance activeChar, boolean isSummon)
{
_npc = npc;
_activeChar = activeChar;
_isSummon = isSummon;
}
public final L2Attackable getNpc()
{
return _npc;
}
public final L2PcInstance getActiveChar()
{
return _activeChar;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_HATE;
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnAttackableHate implements IBaseEvent
{
private final L2Attackable _npc;
private final L2PcInstance _activeChar;
private final boolean _isSummon;
public OnAttackableHate(L2Attackable npc, L2PcInstance activeChar, boolean isSummon)
{
_npc = npc;
_activeChar = activeChar;
_isSummon = isSummon;
}
public final L2Attackable getNpc()
{
return _npc;
}
public final L2PcInstance getActiveChar()
{
return _activeChar;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_HATE;
}
}

View File

@@ -1,61 +1,61 @@
/*
* 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.model.events.impl.character.npc.attackable;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Attackable is killed by L2PcInstance.
* @author UnAfraid
*/
public class OnAttackableKill implements IBaseEvent
{
private final L2PcInstance _attacker;
private final L2Attackable _target;
private final boolean _isSummon;
public OnAttackableKill(L2PcInstance attacker, L2Attackable target, boolean isSummon)
{
_attacker = attacker;
_target = target;
_isSummon = isSummon;
}
public final L2PcInstance getAttacker()
{
return _attacker;
}
public final L2Attackable getTarget()
{
return _target;
}
public final boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_KILL;
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Attackable is killed by L2PcInstance.
* @author UnAfraid
*/
public class OnAttackableKill implements IBaseEvent
{
private final L2PcInstance _attacker;
private final L2Attackable _target;
private final boolean _isSummon;
public OnAttackableKill(L2PcInstance attacker, L2Attackable target, boolean isSummon)
{
_attacker = attacker;
_target = target;
_isSummon = isSummon;
}
public final L2PcInstance getAttacker()
{
return _attacker;
}
public final L2Attackable getTarget()
{
return _target;
}
public final boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_ATTACKABLE_KILL;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcCanBeSeen implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
public OnNpcCanBeSeen(L2Npc npc, L2PcInstance activeChar)
{
_npc = npc;
_activeChar = activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_CAN_BE_SEEN;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcCanBeSeen implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
public OnNpcCanBeSeen(L2Npc npc, L2PcInstance activeChar)
{
_npc = npc;
_activeChar = activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_CAN_BE_SEEN;
}
}

View File

@@ -1,61 +1,61 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is killed by L2Character.
* @author UnAfraid
*/
public class OnNpcCreatureSee implements IBaseEvent
{
private final L2Npc _npc;
private final L2Character _creature;
private final boolean _isSummon;
public OnNpcCreatureSee(L2Npc npc, L2Character creature, boolean isSummon)
{
_npc = npc;
_creature = creature;
_isSummon = isSummon;
}
public final L2Npc getNpc()
{
return _npc;
}
public final L2Character getCreature()
{
return _creature;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_CREATURE_SEE;
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* An instantly executed event when L2Character is killed by L2Character.
* @author UnAfraid
*/
public class OnNpcCreatureSee implements IBaseEvent
{
private final L2Npc _npc;
private final L2Character _creature;
private final boolean _isSummon;
public OnNpcCreatureSee(L2Npc npc, L2Character creature, boolean isSummon)
{
_npc = npc;
_creature = creature;
_isSummon = isSummon;
}
public final L2Npc getNpc()
{
return _npc;
}
public final L2Character getCreature()
{
return _creature;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_CREATURE_SEE;
}
}

View File

@@ -1,32 +1,45 @@
/*
* 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.model.events.impl.events;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventStart implements IBaseEvent
{
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_START;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author malyelfik
*/
public final class OnNpcDespawn implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcDespawn(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_DESPAWN;
}
}

View File

@@ -1,67 +1,67 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcEventReceived implements IBaseEvent
{
private final String _eventName;
private final L2Npc _sender;
private final L2Npc _receiver;
private final L2Object _reference;
public OnNpcEventReceived(String eventName, L2Npc sender, L2Npc receiver, L2Object reference)
{
_eventName = eventName;
_sender = sender;
_receiver = receiver;
_reference = reference;
}
public String getEventName()
{
return _eventName;
}
public L2Npc getSender()
{
return _sender;
}
public L2Npc getReceiver()
{
return _receiver;
}
public L2Object getReference()
{
return _reference;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_EVENT_RECEIVED;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcEventReceived implements IBaseEvent
{
private final String _eventName;
private final L2Npc _sender;
private final L2Npc _receiver;
private final L2Object _reference;
public OnNpcEventReceived(String eventName, L2Npc sender, L2Npc receiver, L2Object reference)
{
_eventName = eventName;
_sender = sender;
_receiver = receiver;
_reference = reference;
}
public String getEventName()
{
return _eventName;
}
public L2Npc getSender()
{
return _sender;
}
public L2Npc getReceiver()
{
return _receiver;
}
public L2Object getReference()
{
return _reference;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_EVENT_RECEIVED;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcFirstTalk implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
public OnNpcFirstTalk(L2Npc npc, L2PcInstance activeChar)
{
_npc = npc;
_activeChar = activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_FIRST_TALK;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcFirstTalk implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _activeChar;
public OnNpcFirstTalk(L2Npc npc, L2PcInstance activeChar)
{
_npc = npc;
_activeChar = activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_FIRST_TALK;
}
}

View File

@@ -1,74 +1,74 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author malyelfik
*/
public final class OnNpcManorBypass implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Npc _target;
private final int _request;
private final int _manorId;
private final boolean _nextPeriod;
public OnNpcManorBypass(L2PcInstance activeChar, L2Npc target, int request, int manorId, boolean nextPeriod)
{
_activeChar = activeChar;
_target = target;
_request = request;
_manorId = manorId;
_nextPeriod = nextPeriod;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Npc getTarget()
{
return _target;
}
public int getRequest()
{
return _request;
}
public int getManorId()
{
return _manorId;
}
public boolean isNextPeriod()
{
return _nextPeriod;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MANOR_BYPASS;
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author malyelfik
*/
public final class OnNpcManorBypass implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Npc _target;
private final int _request;
private final int _manorId;
private final boolean _nextPeriod;
public OnNpcManorBypass(L2PcInstance activeChar, L2Npc target, int request, int manorId, boolean nextPeriod)
{
_activeChar = activeChar;
_target = target;
_request = request;
_manorId = manorId;
_nextPeriod = nextPeriod;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Npc getTarget()
{
return _target;
}
public int getRequest()
{
return _request;
}
public int getManorId()
{
return _manorId;
}
public boolean isNextPeriod()
{
return _nextPeriod;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MANOR_BYPASS;
}
}

View File

@@ -1,73 +1,73 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author St3eT
*/
public class OnNpcMenuSelect implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Npc _npc;
private final int _ask;
private final int _reply;
/**
* @param activeChar
* @param npc
* @param ask
* @param reply
*/
public OnNpcMenuSelect(L2PcInstance activeChar, L2Npc npc, int ask, int reply)
{
_activeChar = activeChar;
_npc = npc;
_ask = ask;
_reply = reply;
}
public L2PcInstance getTalker()
{
return _activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public int getAsk()
{
return _ask;
}
public int getReply()
{
return _reply;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MENU_SELECT;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author St3eT
*/
public class OnNpcMenuSelect implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Npc _npc;
private final int _ask;
private final int _reply;
/**
* @param activeChar
* @param npc
* @param ask
* @param reply
*/
public OnNpcMenuSelect(L2PcInstance activeChar, L2Npc npc, int ask, int reply)
{
_activeChar = activeChar;
_npc = npc;
_ask = ask;
_reply = reply;
}
public L2PcInstance getTalker()
{
return _activeChar;
}
public L2Npc getNpc()
{
return _npc;
}
public int getAsk()
{
return _ask;
}
public int getReply()
{
return _reply;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MENU_SELECT;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveFinished implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveFinished(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_FINISHED;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveFinished implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveFinished(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_FINISHED;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveNodeArrived implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveNodeArrived(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_NODE_ARRIVED;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveNodeArrived implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveNodeArrived(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_NODE_ARRIVED;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveRouteFinished implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveRouteFinished(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_ROUTE_FINISHED;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcMoveRouteFinished implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcMoveRouteFinished(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_MOVE_ROUTE_FINISHED;
}
}

View File

@@ -1,61 +1,61 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author UnAfraid
*/
public class OnNpcSkillFinished implements IBaseEvent
{
private final L2Npc _caster;
private final L2PcInstance _target;
private final Skill _skill;
public OnNpcSkillFinished(L2Npc caster, L2PcInstance target, Skill skill)
{
_caster = caster;
_target = target;
_skill = skill;
}
public L2PcInstance getTarget()
{
return _target;
}
public L2Npc getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SKILL_FINISHED;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author UnAfraid
*/
public class OnNpcSkillFinished implements IBaseEvent
{
private final L2Npc _caster;
private final L2PcInstance _target;
private final Skill _skill;
public OnNpcSkillFinished(L2Npc caster, L2PcInstance target, Skill skill)
{
_caster = caster;
_target = target;
_skill = skill;
}
public L2PcInstance getTarget()
{
return _target;
}
public L2Npc getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SKILL_FINISHED;
}
}

View File

@@ -1,76 +1,76 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author UnAfraid
*/
public class OnNpcSkillSee implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _caster;
private final Skill _skill;
private final L2Object[] _targets;
private final boolean _isSummon;
public OnNpcSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, L2Object[] targets, boolean isSummon)
{
_npc = npc;
_caster = caster;
_skill = skill;
_targets = targets;
_isSummon = isSummon;
}
public L2Npc getTarget()
{
return _npc;
}
public L2PcInstance getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
public L2Object[] getTargets()
{
return _targets;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SKILL_SEE;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.skills.Skill;
/**
* @author UnAfraid
*/
public class OnNpcSkillSee implements IBaseEvent
{
private final L2Npc _npc;
private final L2PcInstance _caster;
private final Skill _skill;
private final L2Object[] _targets;
private final boolean _isSummon;
public OnNpcSkillSee(L2Npc npc, L2PcInstance caster, Skill skill, boolean isSummon, L2Object... targets)
{
_npc = npc;
_caster = caster;
_skill = skill;
_isSummon = isSummon;
_targets = targets;
}
public L2Npc getTarget()
{
return _npc;
}
public L2PcInstance getCaster()
{
return _caster;
}
public Skill getSkill()
{
return _skill;
}
public L2Object[] getTargets()
{
return _targets;
}
public boolean isSummon()
{
return _isSummon;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SKILL_SEE;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcSpawn implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcSpawn(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SPAWN;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnNpcSpawn implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcSpawn(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_SPAWN;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Zealar
*/
public class OnNpcTeleport implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcTeleport(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_TELEPORT;
}
}
/*
* 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.model.events.impl.character.npc;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Zealar
*/
public class OnNpcTeleport implements IBaseEvent
{
private final L2Npc _npc;
public OnNpcTeleport(L2Npc npc)
{
_npc = npc;
}
public L2Npc getNpc()
{
return _npc;
}
@Override
public EventType getType()
{
return EventType.ON_NPC_TELEPORT;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.playable;
import com.l2jmobius.gameserver.model.actor.L2Playable;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayableExpChanged implements IBaseEvent
{
private final L2Playable _activeChar;
private final long _oldExp;
private final long _newExp;
public OnPlayableExpChanged(L2Playable activeChar, long oldExp, long newExp)
{
_activeChar = activeChar;
_oldExp = oldExp;
_newExp = newExp;
}
public L2Playable getActiveChar()
{
return _activeChar;
}
public long getOldExp()
{
return _oldExp;
}
public long getNewExp()
{
return _newExp;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYABLE_EXP_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.L2Playable;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayableExpChanged implements IBaseEvent
{
private final L2Playable _activeChar;
private final long _oldExp;
private final long _newExp;
public OnPlayableExpChanged(L2Playable activeChar, long oldExp, long newExp)
{
_activeChar = activeChar;
_oldExp = oldExp;
_newExp = newExp;
}
public L2Playable getActiveChar()
{
return _activeChar;
}
public long getOldExp()
{
return _oldExp;
}
public long getNewExp()
{
return _newExp;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYABLE_EXP_CHANGED;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author NviX
*/
public class OnPlayerRaidPointsChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldRaidPoints;
private final int _newRaidPoints;
public OnPlayerRaidPointsChanged(L2PcInstance activeChar, int oldRaidPoints, int newRaidPoints)
{
_activeChar = activeChar;
_oldRaidPoints = oldRaidPoints;
_newRaidPoints = newRaidPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldRaidPoints()
{
return _oldRaidPoints;
}
public int getNewRaidPoints()
{
return _newRaidPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_RAID_POINTS_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author St3eT
*/
public class OnPlayerAbilityPointsChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _newAbilityPoints;
private final int _oldAbilityPoints;
public OnPlayerAbilityPointsChanged(L2PcInstance activeChar, int newAbilityPoints, int oldAbilityPoints)
{
_activeChar = activeChar;
_newAbilityPoints = newAbilityPoints;
_oldAbilityPoints = oldAbilityPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public long getNewAbilityPoints()
{
return _newAbilityPoints;
}
public long getOldAbilityPoints()
{
return _oldAbilityPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ABILITY_POINTS_CHANGED;
}
}

View File

@@ -1,68 +1,68 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Augmentation;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerAugment implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final L2Augmentation _augmentation;
private final boolean _isAugment; // true = is being augmented // false = augment is being removed
public OnPlayerAugment(L2PcInstance activeChar, L2ItemInstance item, L2Augmentation augment, boolean isAugment)
{
_activeChar = activeChar;
_item = item;
_augmentation = augment;
_isAugment = isAugment;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2Augmentation getAugmentation()
{
return _augmentation;
}
public boolean isAugment()
{
return _isAugment;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_AUGMENT;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Augmentation;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerAugment implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final L2Augmentation _augmentation;
private final boolean _isAugment; // true = is being augmented // false = augment is being removed
public OnPlayerAugment(L2PcInstance activeChar, L2ItemInstance item, L2Augmentation augment, boolean isAugment)
{
_activeChar = activeChar;
_item = item;
_augmentation = augment;
_isAugment = isAugment;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2Augmentation getAugmentation()
{
return _augmentation;
}
public boolean isAugment()
{
return _isAugment;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_AUGMENT;
}
}

View File

@@ -1,52 +1,52 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerBypass implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final String _command;
public OnPlayerBypass(L2PcInstance activeChar, String command)
{
_activeChar = activeChar;
_command = command;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public String getCommand()
{
return _command;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_BYPASS;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerBypass implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final String _command;
public OnPlayerBypass(L2PcInstance activeChar, String command)
{
_activeChar = activeChar;
_command = command;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public String getCommand()
{
return _command;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_BYPASS;
}
}

View File

@@ -0,0 +1,45 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Sdw
*/
public class OnPlayerCallToChangeClass implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerCallToChangeClass(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CALL_TO_CHANGE_CLASS;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Sdw
*/
public final class OnPlayerChangeToAwakenedClass implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerChangeToAwakenedClass(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CHANGE_TO_AWAKENED_CLASS;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Sdw
*/
public final class OnPlayerChangeToAwakenedClass implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerChangeToAwakenedClass(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CHANGE_TO_AWAKENED_CLASS;
}
}

View File

@@ -1,67 +1,67 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerChat implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcInstance _target;
private final String _text;
private final ChatType _type;
public OnPlayerChat(L2PcInstance activeChar, L2PcInstance target, String text, ChatType type)
{
_activeChar = activeChar;
_target = target;
_text = text;
_type = type;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcInstance getTarget()
{
return _target;
}
public String getText()
{
return _text;
}
public ChatType getChatType()
{
return _type;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CHAT;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerChat implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcInstance _target;
private final String _text;
private final ChatType _type;
public OnPlayerChat(L2PcInstance activeChar, L2PcInstance target, String text, ChatType type)
{
_activeChar = activeChar;
_target = target;
_text = text;
_type = type;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcInstance getTarget()
{
return _target;
}
public String getText()
{
return _text;
}
public ChatType getChatType()
{
return _type;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CHAT;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanCreate implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Clan _clan;
public OnPlayerClanCreate(L2PcInstance activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_CREATE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanCreate implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Clan _clan;
public OnPlayerClanCreate(L2PcInstance activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_CREATE;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanDestroy implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanDestroy(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_DESTROY;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanDestroy implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanDestroy(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_DESTROY;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanJoin implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanJoin(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_JOIN;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanJoin implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanJoin(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_JOIN;
}
}

View File

@@ -1,60 +1,60 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLeaderChange implements IBaseEvent
{
private final L2ClanMember _oldLeader;
private final L2ClanMember _newLeader;
private final L2Clan _clan;
public OnPlayerClanLeaderChange(L2ClanMember oldLeader, L2ClanMember newLeader, L2Clan clan)
{
_oldLeader = oldLeader;
_newLeader = newLeader;
_clan = clan;
}
public L2ClanMember getOldLeader()
{
return _oldLeader;
}
public L2ClanMember getNewLeader()
{
return _newLeader;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LEADER_CHANGE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLeaderChange implements IBaseEvent
{
private final L2ClanMember _oldLeader;
private final L2ClanMember _newLeader;
private final L2Clan _clan;
public OnPlayerClanLeaderChange(L2ClanMember oldLeader, L2ClanMember newLeader, L2Clan clan)
{
_oldLeader = oldLeader;
_newLeader = newLeader;
_clan = clan;
}
public L2ClanMember getOldLeader()
{
return _oldLeader;
}
public L2ClanMember getNewLeader()
{
return _newLeader;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LEADER_CHANGE;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLeft implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanLeft(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LEFT;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2ClanMember;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLeft implements IBaseEvent
{
private final L2ClanMember _activeChar;
private final L2Clan _clan;
public OnPlayerClanLeft(L2ClanMember activeChar, L2Clan clan)
{
_activeChar = activeChar;
_clan = clan;
}
public L2ClanMember getActiveChar()
{
return _activeChar;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LEFT;
}
}

View File

@@ -1,46 +1,46 @@
/*
* 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.model.events.impl.character.player.clan;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLvlUp implements IBaseEvent
{
private final L2Clan _clan;
public OnPlayerClanLvlUp(L2PcInstance activeChar, L2Clan clan)
{
_clan = clan;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LVLUP;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerClanLvlUp implements IBaseEvent
{
private final L2Clan _clan;
public OnPlayerClanLvlUp(L2PcInstance activeChar, L2Clan clan)
{
_clan = clan;
}
public L2Clan getClan()
{
return _clan;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_LVLUP;
}
}

View File

@@ -1,68 +1,68 @@
/*
* 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.model.events.impl.character.player.clanwh;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemAdd implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final ItemContainer _container;
public OnPlayerClanWHItemAdd(String process, L2PcInstance activeChar, L2ItemInstance item, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_ADD;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemAdd implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final ItemContainer _container;
public OnPlayerClanWHItemAdd(String process, L2PcInstance activeChar, L2ItemInstance item, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_ADD;
}
}

View File

@@ -1,75 +1,75 @@
/*
* 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.model.events.impl.character.player.clanwh;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemDestroy implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final long _count;
private final ItemContainer _container;
public OnPlayerClanWHItemDestroy(String process, L2PcInstance activeChar, L2ItemInstance item, long count, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_count = count;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public long getCount()
{
return _count;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_DESTROY;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemDestroy implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final long _count;
private final ItemContainer _container;
public OnPlayerClanWHItemDestroy(String process, L2PcInstance activeChar, L2ItemInstance item, long count, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_count = count;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public long getCount()
{
return _count;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_DESTROY;
}
}

View File

@@ -1,75 +1,75 @@
/*
* 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.model.events.impl.character.player.clanwh;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemTransfer implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final long _count;
private final ItemContainer _container;
public OnPlayerClanWHItemTransfer(String process, L2PcInstance activeChar, L2ItemInstance item, long count, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_count = count;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public long getCount()
{
return _count;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_TRANSFER;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerClanWHItemTransfer implements IBaseEvent
{
private final String _process;
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final long _count;
private final ItemContainer _container;
public OnPlayerClanWHItemTransfer(String process, L2PcInstance activeChar, L2ItemInstance item, long count, ItemContainer container)
{
_process = process;
_activeChar = activeChar;
_item = item;
_count = count;
_container = container;
}
public String getProcess()
{
return _process;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public long getCount()
{
return _count;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CLAN_WH_ITEM_TRANSFER;
}
}

View File

@@ -1,67 +1,67 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerCreate implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerCreate(L2PcInstance activeChar, int objectId, String name, L2GameClient client)
{
_activeChar = activeChar;
_objectId = objectId;
_name = name;
_client = client;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CREATE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.client.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerCreate implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerCreate(L2PcInstance activeChar, int objectId, String name, L2GameClient client)
{
_activeChar = activeChar;
_objectId = objectId;
_name = name;
_client = client;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CREATE;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerDelete implements IBaseEvent
{
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerDelete(int objectId, String name, L2GameClient client)
{
_objectId = objectId;
_name = name;
_client = client;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_DELETE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.client.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerDelete implements IBaseEvent
{
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerDelete(int objectId, String name, L2GameClient client)
{
_objectId = objectId;
_name = name;
_client = client;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_DELETE;
}
}

View File

@@ -1,66 +1,67 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerDlgAnswer implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _messageId;
private final int _answer;
private final int _requesterId;
public OnPlayerDlgAnswer(L2PcInstance activeChar, int messageId, int answer, int requesterId)
{
_activeChar = activeChar;
_messageId = messageId;
_answer = answer;
_requesterId = requesterId;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getMessageId()
{
return _messageId;
}
public int getAnswer()
{
return _answer;
}
public int getRequesterId()
{
return _requesterId;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_DLG_ANSWER;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerDlgAnswer implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _messageId;
private final int _answer;
private final int _requesterId;
public OnPlayerDlgAnswer(L2PcInstance activeChar, int messageId, int answer, int requesterId)
{
_activeChar = activeChar;
_messageId = messageId;
_answer = answer;
_requesterId = requesterId;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getMessageId()
{
return _messageId;
}
public int getAnswer()
{
return _answer;
}
public int getRequesterId()
{
return _requesterId;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_DLG_ANSWER;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerEquipItem implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerEquipItem(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_EQUIP_ITEM;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerEquipItem implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerEquipItem(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_EQUIP_ITEM;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerFameChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldFame;
private final int _newFame;
public OnPlayerFameChanged(L2PcInstance activeChar, int oldFame, int newFame)
{
_activeChar = activeChar;
_oldFame = oldFame;
_newFame = newFame;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldFame()
{
return _oldFame;
}
public int getNewFame()
{
return _newFame;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_FAME_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerFameChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldFame;
private final int _newFame;
public OnPlayerFameChanged(L2PcInstance activeChar, int oldFame, int newFame)
{
_activeChar = activeChar;
_oldFame = oldFame;
_newFame = newFame;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldFame()
{
return _oldFame;
}
public int getNewFame()
{
return _newFame;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_FAME_CHANGED;
}
}

View File

@@ -0,0 +1,53 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.serverpackets.fishing.ExFishingEnd.FishingEndReason;
/**
* @author UnAfraid
*/
public class OnPlayerFishing implements IBaseEvent
{
private final L2PcInstance _player;
private final FishingEndReason _reason;
public OnPlayerFishing(L2PcInstance player, FishingEndReason reason)
{
_player = player;
_reason = reason;
}
public L2PcInstance getActiveChar()
{
return _player;
}
public FishingEndReason getReason()
{
return _reason;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_FISHING;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.L2Henna;
/**
* @author UnAfraid
*/
public class OnPlayerHennaAdd implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Henna _henna;
public OnPlayerHennaAdd(L2PcInstance activeChar, L2Henna henna)
{
_activeChar = activeChar;
_henna = henna;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Henna getHenna()
{
return _henna;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_HENNA_ADD;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.L2Henna;
/**
* @author UnAfraid
*/
public class OnPlayerHennaAdd implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Henna _henna;
public OnPlayerHennaAdd(L2PcInstance activeChar, L2Henna henna)
{
_activeChar = activeChar;
_henna = henna;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Henna getHenna()
{
return _henna;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_HENNA_ADD;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.L2Henna;
/**
* @author UnAfraid
*/
public class OnPlayerHennaRemove implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Henna _henna;
public OnPlayerHennaRemove(L2PcInstance activeChar, L2Henna henna)
{
_activeChar = activeChar;
_henna = henna;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Henna getHenna()
{
return _henna;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_HENNA_REMOVE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.L2Henna;
/**
* @author UnAfraid
*/
public class OnPlayerHennaRemove implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2Henna _henna;
public OnPlayerHennaRemove(L2PcInstance activeChar, L2Henna henna)
{
_activeChar = activeChar;
_henna = henna;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2Henna getHenna()
{
return _henna;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_HENNA_REMOVE;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.inventory;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemAdd implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemAdd(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_ADD;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemAdd implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemAdd(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_ADD;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.inventory;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemDestroy implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemDestroy(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_DESTROY;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemDestroy implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemDestroy(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_DESTROY;
}
}

View File

@@ -1,61 +1,61 @@
/*
* 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.model.events.impl.character.player.inventory;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemDrop implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final Location _loc;
public OnPlayerItemDrop(L2PcInstance activeChar, L2ItemInstance item, Location loc)
{
_activeChar = activeChar;
_item = item;
_loc = loc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public Location getLocation()
{
return _loc;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_DROP;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemDrop implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final Location _loc;
public OnPlayerItemDrop(L2PcInstance activeChar, L2ItemInstance item, Location loc)
{
_activeChar = activeChar;
_item = item;
_loc = loc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public Location getLocation()
{
return _loc;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_DROP;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.inventory;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemPickup implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemPickup(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_PICKUP;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemPickup implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
public OnPlayerItemPickup(L2PcInstance activeChar, L2ItemInstance item)
{
_activeChar = activeChar;
_item = item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_PICKUP;
}
}

View File

@@ -1,61 +1,61 @@
/*
* 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.model.events.impl.character.player.inventory;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemTransfer implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final ItemContainer _container;
public OnPlayerItemTransfer(L2PcInstance activeChar, L2ItemInstance item, ItemContainer container)
{
_activeChar = activeChar;
_item = item;
_container = container;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_TRANSFER;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.model.itemcontainer.ItemContainer;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnPlayerItemTransfer implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2ItemInstance _item;
private final ItemContainer _container;
public OnPlayerItemTransfer(L2PcInstance activeChar, L2ItemInstance item, ItemContainer container)
{
_activeChar = activeChar;
_item = item;
_container = container;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public ItemContainer getContainer()
{
return _container;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_ITEM_TRANSFER;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLevelChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldLevel;
private final int _newLevel;
public OnPlayerLevelChanged(L2PcInstance activeChar, int oldLevel, int newLevel)
{
_activeChar = activeChar;
_oldLevel = oldLevel;
_newLevel = newLevel;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldLevel()
{
return _oldLevel;
}
public int getNewLevel()
{
return _newLevel;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LEVEL_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLevelChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldLevel;
private final int _newLevel;
public OnPlayerLevelChanged(L2PcInstance activeChar, int oldLevel, int newLevel)
{
_activeChar = activeChar;
_oldLevel = oldLevel;
_newLevel = newLevel;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldLevel()
{
return _oldLevel;
}
public int getNewLevel()
{
return _newLevel;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LEVEL_CHANGED;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLogin implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerLogin(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LOGIN;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLogin implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerLogin(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LOGIN;
}
}

View File

@@ -1,45 +1,45 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLogout implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerLogout(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LOGOUT;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLogout implements IBaseEvent
{
private final L2PcInstance _activeChar;
public OnPlayerLogout(L2PcInstance activeChar)
{
_activeChar = activeChar;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LOGOUT;
}
}

View File

@@ -1,52 +1,52 @@
/*
* 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.model.events.impl.character.player.mentoring;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeAdd implements IBaseEvent
{
private final L2PcInstance _mentor;
private final L2PcInstance _mentee;
public OnPlayerMenteeAdd(L2PcInstance mentor, L2PcInstance mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public L2PcInstance getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_ADD;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeAdd implements IBaseEvent
{
private final L2PcInstance _mentor;
private final L2PcInstance _mentee;
public OnPlayerMenteeAdd(L2PcInstance mentor, L2PcInstance mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public L2PcInstance getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_ADD;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.mentoring;
import com.l2jmobius.gameserver.model.L2Mentee;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeLeft implements IBaseEvent
{
private final L2Mentee _mentor;
private final L2PcInstance _mentee;
public OnPlayerMenteeLeft(L2Mentee mentor, L2PcInstance mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2Mentee getMentor()
{
return _mentor;
}
public L2PcInstance getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_LEFT;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Mentee;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeLeft implements IBaseEvent
{
private final L2Mentee _mentor;
private final L2PcInstance _mentee;
public OnPlayerMenteeLeft(L2Mentee mentor, L2PcInstance mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2Mentee getMentor()
{
return _mentor;
}
public L2PcInstance getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_LEFT;
}
}

View File

@@ -1,53 +1,53 @@
/*
* 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.model.events.impl.character.player.mentoring;
import com.l2jmobius.gameserver.model.L2Mentee;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeRemove implements IBaseEvent
{
private final L2PcInstance _mentor;
private final L2Mentee _mentee;
public OnPlayerMenteeRemove(L2PcInstance mentor, L2Mentee mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public L2Mentee getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_REMOVE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.L2Mentee;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeRemove implements IBaseEvent
{
private final L2PcInstance _mentor;
private final L2Mentee _mentee;
public OnPlayerMenteeRemove(L2PcInstance mentor, L2Mentee mentee)
{
_mentor = mentor;
_mentee = mentee;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public L2Mentee getMentee()
{
return _mentee;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_REMOVE;
}
}

View File

@@ -1,52 +1,52 @@
/*
* 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.model.events.impl.character.player.mentoring;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeStatus implements IBaseEvent
{
private final L2PcInstance _mentee;
private final boolean _isOnline;
public OnPlayerMenteeStatus(L2PcInstance mentee, boolean isOnline)
{
_mentee = mentee;
_isOnline = isOnline;
}
public L2PcInstance getMentee()
{
return _mentee;
}
public boolean isMenteeOnline()
{
return _isOnline;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_STATUS;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMenteeStatus implements IBaseEvent
{
private final L2PcInstance _mentee;
private final boolean _isOnline;
public OnPlayerMenteeStatus(L2PcInstance mentee, boolean isOnline)
{
_mentee = mentee;
_isOnline = isOnline;
}
public L2PcInstance getMentee()
{
return _mentee;
}
public boolean isMenteeOnline()
{
return _isOnline;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTEE_STATUS;
}
}

View File

@@ -1,52 +1,52 @@
/*
* 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.model.events.impl.character.player.mentoring;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMentorStatus implements IBaseEvent
{
private final L2PcInstance _mentor;
private final boolean _isOnline;
public OnPlayerMentorStatus(L2PcInstance mentor, boolean isOnline)
{
_mentor = mentor;
_isOnline = isOnline;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public boolean isMentorOnline()
{
return _isOnline;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTOR_STATUS;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMentorStatus implements IBaseEvent
{
private final L2PcInstance _mentor;
private final boolean _isOnline;
public OnPlayerMentorStatus(L2PcInstance mentor, boolean isOnline)
{
_mentor = mentor;
_isOnline = isOnline;
}
public L2PcInstance getMentor()
{
return _mentor;
}
public boolean isMentorOnline()
{
return _isOnline;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MENTOR_STATUS;
}
}

View File

@@ -1,59 +1,53 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerKarmaChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldKarma;
private final int _newKarma;
public OnPlayerKarmaChanged(L2PcInstance activeChar, int oldKarma, int newKarma)
{
_activeChar = activeChar;
_oldKarma = oldKarma;
_newKarma = newKarma;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldKarma()
{
return _oldKarma;
}
public int getNewKarma()
{
return _newKarma;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_KARMA_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerMoveRequest implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final Location _location;
public OnPlayerMoveRequest(L2PcInstance activeChar, Location loc)
{
_activeChar = activeChar;
_location = loc;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public Location getLocation()
{
return _location;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_MOVE_REQUEST;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPKChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldPoints;
private final int _newPoints;
public OnPlayerPKChanged(L2PcInstance activeChar, int oldPoints, int newPoints)
{
_activeChar = activeChar;
_oldPoints = oldPoints;
_newPoints = newPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldPoints()
{
return _oldPoints;
}
public int getNewPoints()
{
return _newPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PK_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPKChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldPoints;
private final int _newPoints;
public OnPlayerPKChanged(L2PcInstance activeChar, int oldPoints, int newPoints)
{
_activeChar = activeChar;
_oldPoints = oldPoints;
_newPoints = newPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldPoints()
{
return _oldPoints;
}
public int getNewPoints()
{
return _newPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PK_CHANGED;
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author St3eT
*/
public final class OnPlayerPressTutorialMark implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _markId;
public OnPlayerPressTutorialMark(L2PcInstance activeChar, int markId)
{
_activeChar = activeChar;
_markId = markId;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getMarkId()
{
return _markId;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PRESS_TUTORIAL_MARK;
}
}

View File

@@ -1,60 +1,60 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.templates.L2PcTemplate;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerProfessionChange implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcTemplate _template;
private final boolean _isSubClass;
public OnPlayerProfessionChange(L2PcInstance activeChar, L2PcTemplate template, boolean isSubClass)
{
_activeChar = activeChar;
_template = template;
_isSubClass = isSubClass;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcTemplate getTemplate()
{
return _template;
}
public boolean isSubClass()
{
return _isSubClass;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PROFESSION_CHANGE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.templates.L2PcTemplate;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerProfessionChange implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcTemplate _template;
private final boolean _isSubClass;
public OnPlayerProfessionChange(L2PcInstance activeChar, L2PcTemplate template, boolean isSubClass)
{
_activeChar = activeChar;
_template = template;
_isSubClass = isSubClass;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcTemplate getTemplate()
{
return _template;
}
public boolean isSubClass()
{
return _isSubClass;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PROFESSION_CHANGE;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPvPChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldPoints;
private final int _newPoints;
public OnPlayerPvPChanged(L2PcInstance activeChar, int oldPoints, int newPoints)
{
_activeChar = activeChar;
_oldPoints = oldPoints;
_newPoints = newPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldPoints()
{
return _oldPoints;
}
public int getNewPoints()
{
return _newPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PVP_CHANGED;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPvPChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldPoints;
private final int _newPoints;
public OnPlayerPvPChanged(L2PcInstance activeChar, int oldPoints, int newPoints)
{
_activeChar = activeChar;
_oldPoints = oldPoints;
_newPoints = newPoints;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldPoints()
{
return _oldPoints;
}
public int getNewPoints()
{
return _newPoints;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PVP_CHANGED;
}
}

View File

@@ -1,52 +1,52 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPvPKill implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcInstance _target;
public OnPlayerPvPKill(L2PcInstance activeChar, L2PcInstance target)
{
_activeChar = activeChar;
_target = target;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcInstance getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PVP_KILL;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerPvPKill implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final L2PcInstance _target;
public OnPlayerPvPKill(L2PcInstance activeChar, L2PcInstance target)
{
_activeChar = activeChar;
_target = target;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public L2PcInstance getTarget()
{
return _target;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_PVP_KILL;
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author Sdw
*/
public class OnPlayerQuestAbort implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _questId;
public OnPlayerQuestAbort(L2PcInstance activeChar, int questId)
{
_activeChar = activeChar;
_questId = questId;
}
public final L2PcInstance getActiveChar()
{
return _activeChar;
}
public final int getQuestId()
{
return _questId;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_QUEST_ABORT;
}
}

View File

@@ -1,60 +1,60 @@
/*
* 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.model.events.impl.events;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.TvTEventTeam;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventKill implements IBaseEvent
{
private final L2PcInstance _killer;
private final L2PcInstance _victim;
private final TvTEventTeam _killerTeam;
public OnTvTEventKill(L2PcInstance killer, L2PcInstance victim, TvTEventTeam killerTeam)
{
_killer = killer;
_victim = victim;
_killerTeam = killerTeam;
}
public L2PcInstance getKiller()
{
return _killer;
}
public L2PcInstance getVictim()
{
return _victim;
}
public TvTEventTeam getKillerTeam()
{
return _killerTeam;
}
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_KILL;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerQuestComplete implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _questId;
private final QuestType _questType;
public OnPlayerQuestComplete(L2PcInstance activeChar, int questId, QuestType questType)
{
_activeChar = activeChar;
_questId = questId;
_questType = questType;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getQuestId()
{
return _questId;
}
public QuestType getQuestType()
{
return _questType;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_QUEST_COMPLETE;
}
}

View File

@@ -0,0 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerReputationChanged implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _oldReputation;
private final int _newReputation;
public OnPlayerReputationChanged(L2PcInstance activeChar, int oldReputation, int newReputation)
{
_activeChar = activeChar;
_oldReputation = oldReputation;
_newReputation = newReputation;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getOldReputation()
{
return _oldReputation;
}
public int getNewReputation()
{
return _newReputation;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_REPUTATION_CHANGED;
}
}

View File

@@ -1,59 +1,59 @@
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerRestore implements IBaseEvent
{
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerRestore(int objectId, String name, L2GameClient client)
{
_objectId = objectId;
_name = name;
_client = client;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_RESTORE;
}
}
/*
* 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.model.events.impl.character.player;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
import com.l2jmobius.gameserver.network.client.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerRestore implements IBaseEvent
{
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerRestore(int objectId, String name, L2GameClient client)
{
_objectId = objectId;
_name = name;
_client = client;
}
public int getObjectId()
{
return _objectId;
}
public String getName()
{
return _name;
}
public L2GameClient getClient()
{
return _client;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_RESTORE;
}
}

Some files were not shown because too many files have changed in this diff Show More