Sel Mahum NPC clan to XML.
This commit is contained in:
@ -38,8 +38,6 @@ import com.l2jmobius.gameserver.model.WalkInfo;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.tasks.npc.walker.ArrivedTask;
|
||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
|
||||
import com.l2jmobius.gameserver.model.holders.NpcRoutesHolder;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
@ -384,9 +382,6 @@ public final class WalkingManager implements IGameXmlReader
|
||||
return;
|
||||
}
|
||||
|
||||
// Notify quest
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnNpcMoveNodeArrived(npc), npc);
|
||||
|
||||
final WalkInfo walk = _activeRoutes.get(npc.getObjectId());
|
||||
// Opposite should not happen... but happens sometime
|
||||
if ((walk.getCurrentNodeId() < 0) || (walk.getCurrentNodeId() >= walk.getRoute().getNodesCount()))
|
||||
|
@ -65,7 +65,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
/** The identifier of the location area where L2NpcInstance can be spawned */
|
||||
private int _locationId;
|
||||
/** The Location of this NPC spawn. */
|
||||
private static Location _location = new Location(0, 0, 0, 0, 0);
|
||||
private Location _location = new Location(0, 0, 0, 0, 0);
|
||||
/** Link to NPC spawn territory */
|
||||
private NpcSpawnTerritory _spawnTerritory = null;
|
||||
/** Minimum respawn delay */
|
||||
@ -512,7 +512,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
newlocx = loc.getX();
|
||||
newlocy = loc.getY();
|
||||
newlocz = loc.getZ();
|
||||
setLocation(loc);
|
||||
}
|
||||
else if ((getX() == 0) && (getY() == 0))
|
||||
{
|
||||
@ -647,7 +646,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
_respawnMinDelay = Math.max(10, minDelay) * 1000;
|
||||
_respawnMaxDelay = Math.max(10, maxDelay) * 1000;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
_respawnMinDelay = 0;
|
||||
|
@ -72,7 +72,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcCreatureSee
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcEventReceived;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcFirstTalk;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveRouteFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillSee;
|
||||
@ -666,30 +665,6 @@ public abstract class AbstractScript extends ManagedScript
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Provides instant callback operation when {@link L2Npc} arrive to node of its route
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
*/
|
||||
protected final List<AbstractEventListener> setNpcMoveNodeArrivedId(Consumer<OnNpcMoveNodeArrived> callback, int... npcIds)
|
||||
{
|
||||
return registerConsumer(callback, EventType.ON_NPC_MOVE_NODE_ARRIVED, ListenerRegisterType.NPC, npcIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides instant callback operation when {@link L2Npc} arrive to node of its route
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
*/
|
||||
protected final List<AbstractEventListener> setNpcMoveNodeArrivedId(Consumer<OnNpcMoveNodeArrived> callback, Collection<Integer> npcIds)
|
||||
{
|
||||
return registerConsumer(callback, EventType.ON_NPC_MOVE_NODE_ARRIVED, ListenerRegisterType.NPC, npcIds);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Provides instant callback operation when {@link L2Npc} finishes to move on its route.
|
||||
* @param callback
|
||||
|
@ -34,7 +34,6 @@ import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcEventReceiv
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcFirstTalk;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcManorBypass;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveNodeArrived;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMoveRouteFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillFinished;
|
||||
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcSkillSee;
|
||||
@ -146,14 +145,13 @@ public enum EventType
|
||||
ON_ITEM_CREATE(OnItemCreate.class, void.class),
|
||||
ON_ITEM_TALK(OnItemTalk.class, void.class),
|
||||
|
||||
// Npcs events
|
||||
// NPC 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),
|
||||
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.events.impl.character.npc;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.events.EventType;
|
||||
import com.l2jmobius.gameserver.model.events.impl.IBaseEvent;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class OnNpcMoveNodeArrived implements IBaseEvent
|
||||
{
|
||||
private final L2Npc _npc;
|
||||
|
||||
public OnNpcMoveNodeArrived(L2Npc npc)
|
||||
{
|
||||
_npc = npc;
|
||||
}
|
||||
|
||||
public L2Npc getNpc()
|
||||
{
|
||||
return _npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventType getType()
|
||||
{
|
||||
return EventType.ON_NPC_MOVE_NODE_ARRIVED;
|
||||
}
|
||||
}
|
@ -917,21 +917,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
*/
|
||||
public final void notifyNodeArrived(L2Npc npc)
|
||||
{
|
||||
try
|
||||
{
|
||||
onNodeArrived(npc);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Exception on onNodeArrived() in notifyNodeArrived(): " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
*/
|
||||
@ -1340,14 +1325,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called whenever a walker NPC (controlled by WalkingManager) arrive a walking node
|
||||
* @param npc registered NPC
|
||||
*/
|
||||
public void onNodeArrived(L2Npc npc)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called whenever a walker NPC (controlled by WalkingManager) arrive to last node
|
||||
* @param npc registered NPC
|
||||
@ -2046,24 +2023,6 @@ public class Quest extends AbstractScript implements IIdentifiable
|
||||
setNpcMoveFinishedId(event -> notifyMoveFinished(event.getNpc()), npcIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register onNodeArrived trigger for NPC
|
||||
* @param npcIds the IDs of the NPCs to register
|
||||
*/
|
||||
public void addNodeArrivedId(int... npcIds)
|
||||
{
|
||||
setNpcMoveNodeArrivedId(event -> notifyNodeArrived(event.getNpc()), npcIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register onNodeArrived trigger for NPC
|
||||
* @param npcIds the IDs of the NPCs to register
|
||||
*/
|
||||
public void addNodeArrivedId(Collection<Integer> npcIds)
|
||||
{
|
||||
setNpcMoveNodeArrivedId(event -> notifyNodeArrived(event.getNpc()), npcIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register onRouteFinished trigger for NPC
|
||||
* @param npcIds the IDs of the NPCs to register
|
||||
|
Reference in New Issue
Block a user