This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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

@ -0,0 +1,274 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.events.listeners.AbstractEventListener;
import com.l2jserver.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

@ -0,0 +1,265 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureAttack;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureAttackAvoid;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureAttacked;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureDamageDealt;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureDamageReceived;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureKill;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureSkillUse;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureTeleported;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureZoneEnter;
import com.l2jserver.gameserver.model.events.impl.character.OnCreatureZoneExit;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcCanBeSeen;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcCreatureSee;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcEventReceived;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcFirstTalk;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcManorBypass;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcMoveRouteFinished;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcSkillFinished;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcSkillSee;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcSpawn;
import com.l2jserver.gameserver.model.events.impl.character.npc.OnNpcTeleport;
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableAggroRangeEnter;
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableAttack;
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableFactionCall;
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableHate;
import com.l2jserver.gameserver.model.events.impl.character.npc.attackable.OnAttackableKill;
import com.l2jserver.gameserver.model.events.impl.character.playable.OnPlayableExpChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerAugment;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerBypass;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerChat;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerCreate;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerDelete;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerDlgAnswer;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerEquipItem;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerFameChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerHennaAdd;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerHennaRemove;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerKarmaChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerLogin;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerLogout;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerPKChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerProfessionChange;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerPvPChanged;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerPvPKill;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerRestore;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerSelect;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerSkillLearn;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerSummonSpawn;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerSummonTalk;
import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerTransform;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanCreate;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanDestroy;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanJoin;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanLeaderChange;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanLeft;
import com.l2jserver.gameserver.model.events.impl.character.player.clan.OnPlayerClanLvlUp;
import com.l2jserver.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemAdd;
import com.l2jserver.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemDestroy;
import com.l2jserver.gameserver.model.events.impl.character.player.clanwh.OnPlayerClanWHItemTransfer;
import com.l2jserver.gameserver.model.events.impl.character.player.inventory.OnPlayerItemAdd;
import com.l2jserver.gameserver.model.events.impl.character.player.inventory.OnPlayerItemDestroy;
import com.l2jserver.gameserver.model.events.impl.character.player.inventory.OnPlayerItemDrop;
import com.l2jserver.gameserver.model.events.impl.character.player.inventory.OnPlayerItemPickup;
import com.l2jserver.gameserver.model.events.impl.character.player.inventory.OnPlayerItemTransfer;
import com.l2jserver.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeAdd;
import com.l2jserver.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeLeft;
import com.l2jserver.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeRemove;
import com.l2jserver.gameserver.model.events.impl.character.player.mentoring.OnPlayerMenteeStatus;
import com.l2jserver.gameserver.model.events.impl.character.player.mentoring.OnPlayerMentorStatus;
import com.l2jserver.gameserver.model.events.impl.character.trap.OnTrapAction;
import com.l2jserver.gameserver.model.events.impl.clan.OnClanWarFinish;
import com.l2jserver.gameserver.model.events.impl.clan.OnClanWarStart;
import com.l2jserver.gameserver.model.events.impl.events.OnTvTEventFinish;
import com.l2jserver.gameserver.model.events.impl.events.OnTvTEventKill;
import com.l2jserver.gameserver.model.events.impl.events.OnTvTEventRegistrationStart;
import com.l2jserver.gameserver.model.events.impl.events.OnTvTEventStart;
import com.l2jserver.gameserver.model.events.impl.item.OnItemBypassEvent;
import com.l2jserver.gameserver.model.events.impl.item.OnItemCreate;
import com.l2jserver.gameserver.model.events.impl.item.OnItemTalk;
import com.l2jserver.gameserver.model.events.impl.olympiad.OnOlympiadMatchResult;
import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeFinish;
import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeOwnerChange;
import com.l2jserver.gameserver.model.events.impl.sieges.castle.OnCastleSiegeStart;
import com.l2jserver.gameserver.model.events.impl.sieges.fort.OnFortSiegeFinish;
import com.l2jserver.gameserver.model.events.impl.sieges.fort.OnFortSiegeStart;
import com.l2jserver.gameserver.model.events.returns.ChatFilterReturn;
import com.l2jserver.gameserver.model.events.returns.TerminateReturn;
import com.l2jserver.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_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),
// 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),
// 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_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),
// 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);
}
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events;
/**
* @author UnAfraid
*/
public enum ListenerRegisterType
{
NPC,
ZONE,
ITEM,
CASTLE,
FORTRESS,
OLYMPIAD,
GLOBAL,
GLOBAL_NPCS,
GLOBAL_MONSTERS,
GLOBAL_PLAYERS;
}

View File

@ -0,0 +1,121 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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.l2jserver.gameserver.model.events.listeners.AbstractEventListener;
import com.l2jserver.util.EmptyQueue;
/**
* @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,36 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public int[] value();
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public Id[] value();
}

View File

@ -0,0 +1,38 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public int from();
public int to();
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public NpcLevelRange[] value();
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public int value() default 0;
}

View File

@ -0,0 +1,38 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public int from();
public int to();
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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
{
public Range[] value();
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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.l2jserver.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterEvent
{
public EventType value();
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.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.l2jserver.gameserver.model.events.ListenerRegisterType;
/**
* @author UnAfraid
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RegisterType
{
public ListenerRegisterType value();
}

View File

@ -0,0 +1,29 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl;
import com.l2jserver.gameserver.model.events.EventType;
/**
* @author UnAfraid
*/
public interface IBaseEvent
{
public EventType getType();
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,70 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,84 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,84 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,78 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,56 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,56 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,76 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,78 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc.attackable;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,78 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc.attackable;
import com.l2jserver.gameserver.model.actor.L2Attackable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc.attackable;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc.attackable;
import com.l2jserver.gameserver.model.actor.L2Attackable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.npc.attackable;
import com.l2jserver.gameserver.model.actor.L2Attackable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.playable;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,70 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.L2Augmentation;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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,68 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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 int _type;
public OnPlayerChat(L2PcInstance activeChar, L2PcInstance target, String text, int 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 int getChatType()
{
return _type;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_CHAT;
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.templates.L2PcTemplate;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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,61 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.network.L2GameClient;
/**
* @author UnAfraid
*/
public class OnPlayerSelect implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _objectId;
private final String _name;
private final L2GameClient _client;
public OnPlayerSelect(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_SELECT;
}
}

View File

@ -0,0 +1,71 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.AcquireSkillType;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.skills.Skill;
/**
* @author UnAfraid
*/
public class OnPlayerSkillLearn implements IBaseEvent
{
private final L2Npc _trainer;
private final L2PcInstance _activeChar;
private final Skill _skill;
private final AcquireSkillType _type;
public OnPlayerSkillLearn(L2Npc trainer, L2PcInstance activeChar, Skill skill, AcquireSkillType type)
{
_trainer = trainer;
_activeChar = activeChar;
_skill = skill;
_type = type;
}
public L2Npc getTrainer()
{
return _trainer;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public Skill getSkill()
{
return _skill;
}
public AcquireSkillType getAcquireType()
{
return _type;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_SKILL_LEARN;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerSummonSpawn implements IBaseEvent
{
private final L2Summon _summon;
public OnPlayerSummonSpawn(L2Summon summon)
{
_summon = summon;
}
public L2Summon getSummon()
{
return _summon;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_SUMMON_SPAWN;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author St3eT
*/
public class OnPlayerSummonTalk implements IBaseEvent
{
private final L2Summon _summon;
public OnPlayerSummonTalk(L2Summon summon)
{
_summon = summon;
}
public L2Summon getSummon()
{
return _summon;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_SUMMON_TALK;
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerTransform implements IBaseEvent
{
private final L2PcInstance _activeChar;
private final int _transformId;
public OnPlayerTransform(L2PcInstance activeChar, int transformId)
{
_activeChar = activeChar;
_transformId = transformId;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public int getTransformId()
{
return _transformId;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_TRANSFORM;
}
}

View File

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2ClanMember;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2ClanMember;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2ClanMember;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2ClanMember;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,48 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,70 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clanwh;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
import com.l2jserver.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

@ -0,0 +1,77 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clanwh;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
import com.l2jserver.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

@ -0,0 +1,77 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.clanwh;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.inventory;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.inventory;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.inventory;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.inventory;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.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

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.inventory;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
import com.l2jserver.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

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.mentoring;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.mentoring;
import com.l2jserver.gameserver.model.L2Mentee;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,55 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.mentoring;
import com.l2jserver.gameserver.model.L2Mentee;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.mentoring;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.player.mentoring;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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

@ -0,0 +1,64 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.character.trap;
import com.l2jserver.gameserver.enums.TrapAction;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.instance.L2TrapInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTrapAction implements IBaseEvent
{
private final L2TrapInstance _trap;
private final L2Character _trigger;
private final TrapAction _action;
public OnTrapAction(L2TrapInstance trap, L2Character trigger, TrapAction action)
{
_trap = trap;
_trigger = trigger;
_action = action;
}
public L2TrapInstance getTrap()
{
return _trap;
}
public L2Character getTrigger()
{
return _trigger;
}
public TrapAction getAction()
{
return _action;
}
@Override
public EventType getType()
{
return EventType.ON_TRAP_ACTION;
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnClanWarFinish implements IBaseEvent
{
private final L2Clan _clan1;
private final L2Clan _clan2;
public OnClanWarFinish(L2Clan clan1, L2Clan clan2)
{
_clan1 = clan1;
_clan2 = clan2;
}
public L2Clan getClan1()
{
return _clan1;
}
public L2Clan getClan2()
{
return _clan2;
}
@Override
public EventType getType()
{
return EventType.ON_CLAN_WAR_FINISH;
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.clan;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnClanWarStart implements IBaseEvent
{
private final L2Clan _clan1;
private final L2Clan _clan2;
public OnClanWarStart(L2Clan clan1, L2Clan clan2)
{
_clan1 = clan1;
_clan2 = clan2;
}
public L2Clan getClan1()
{
return _clan1;
}
public L2Clan getClan2()
{
return _clan2;
}
@Override
public EventType getType()
{
return EventType.ON_CLAN_WAR_START;
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.events;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventFinish implements IBaseEvent
{
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_FINISH;
}
}

View File

@ -0,0 +1,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.events;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.TvTEventTeam;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.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;
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.events;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventRegistrationStart implements IBaseEvent
{
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_REGISTRATION_START;
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.events;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnTvTEventStart implements IBaseEvent
{
@Override
public EventType getType()
{
return EventType.ON_TVT_EVENT_START;
}
}

View File

@ -0,0 +1,63 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.item;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnItemBypassEvent implements IBaseEvent
{
private final L2ItemInstance _item;
private final L2PcInstance _activeChar;
private final String _event;
public OnItemBypassEvent(L2ItemInstance item, L2PcInstance activeChar, String event)
{
_item = item;
_activeChar = activeChar;
_event = event;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public String getEvent()
{
return _event;
}
@Override
public EventType getType()
{
return EventType.ON_ITEM_BYPASS_EVENT;
}
}

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.item;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnItemCreate implements IBaseEvent
{
private final String _process;
private final L2ItemInstance _item;
private final L2PcInstance _activeChar;
private final Object _reference;
public OnItemCreate(String process, L2ItemInstance item, L2PcInstance actor, Object reference)
{
_process = process;
_item = item;
_activeChar = actor;
_reference = reference;
}
public String getProcess()
{
return _process;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
public Object getReference()
{
return _reference;
}
@Override
public EventType getType()
{
return EventType.ON_ITEM_CREATE;
}
}

View File

@ -0,0 +1,56 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.item;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
/**
* @author UnAfraid
*/
public class OnItemTalk implements IBaseEvent
{
private final L2ItemInstance _item;
private final L2PcInstance _activeChar;
public OnItemTalk(L2ItemInstance item, L2PcInstance activeChar)
{
_item = item;
_activeChar = activeChar;
}
public L2ItemInstance getItem()
{
return _item;
}
public L2PcInstance getActiveChar()
{
return _activeChar;
}
@Override
public EventType getType()
{
return EventType.ON_ITEM_TALK;
}
}

View File

@ -0,0 +1,62 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.olympiad;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
import com.l2jserver.gameserver.model.olympiad.CompetitionType;
import com.l2jserver.gameserver.model.olympiad.Participant;
/**
* @author UnAfraid
*/
public class OnOlympiadMatchResult implements IBaseEvent
{
private final Participant _winner;
private final Participant _loser;
private final CompetitionType _type;
public OnOlympiadMatchResult(Participant winner, Participant looser, CompetitionType type)
{
_winner = winner;
_loser = looser;
_type = type;
}
public Participant getWinner()
{
return _winner;
}
public Participant getLoser()
{
return _loser;
}
public CompetitionType getCompetitionType()
{
return _type;
}
@Override
public EventType getType()
{
return EventType.ON_OLYMPIAD_MATCH_RESULT;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.sieges.castle;
import com.l2jserver.gameserver.model.entity.Siege;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCastleSiegeFinish implements IBaseEvent
{
private final Siege _siege;
public OnCastleSiegeFinish(Siege siege)
{
_siege = siege;
}
public Siege getSiege()
{
return _siege;
}
@Override
public EventType getType()
{
return EventType.ON_CASTLE_SIEGE_FINISH;
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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.l2jserver.gameserver.model.events.impl.sieges.castle;
import com.l2jserver.gameserver.model.entity.Siege;
import com.l2jserver.gameserver.model.events.EventType;
import com.l2jserver.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnCastleSiegeOwnerChange implements IBaseEvent
{
private final Siege _siege;
public OnCastleSiegeOwnerChange(Siege siege)
{
_siege = siege;
}
public Siege getSiege()
{
return _siege;
}
@Override
public EventType getType()
{
return EventType.ON_CASTLE_SIEGE_OWNER_CHANGE;
}
}

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