Skip to content
Snippets Groups Projects
Commit db3b2301 authored by Rumen Nikiforov's avatar Rumen Nikiforov
Browse files

BETA: DP-Part for [L5641]

parent 5588f881
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ ai/group_template/FairyTrees.java
ai/group_template/FeedableBeasts.java
ai/group_template/GiantScouts.java
ai/group_template/Monastery.java
ai/group_template/NonLethalableNpcs.java
ai/group_template/PavelArchaic.java
ai/group_template/PlainsOfLizardman.java
ai/group_template/PolymorphingAngel.java
......
/*
* 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 ai.group_template;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.datatables.SpawnTable;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.util.Util;
/**
* @author UnAfraid
*/
public class NonLethalableNpcs extends AbstractNpcAI
{
private static final int[] NPCS = new int[]
{
35062, // Headquarters
};
/**
* @param name
* @param descr
*/
public NonLethalableNpcs(String name, String descr)
{
super(name, descr);
addSpawnId(NPCS);
for (L2Spawn spawn : SpawnTable.getInstance().getSpawnTable())
{
if (Util.contains(NPCS, spawn.getNpcid()))
{
onSpawn(spawn.getLastSpawn());
}
}
}
@Override
public String onSpawn(L2Npc npc)
{
npc.setLethalable(false);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new NonLethalableNpcs(NonLethalableNpcs.class.getSimpleName(), "ai/group_template");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment