Merged with released L2J-Unity files.
This commit is contained in:
83
trunk/dist/game/data/scripts/ai/areas/SeedOfHellfire/Zofan.java
vendored
Normal file
83
trunk/dist/game/data/scripts/ai/areas/SeedOfHellfire/Zofan.java
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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 ai.areas.SeedOfHellfire;
|
||||
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
|
||||
import ai.AbstractNpcAI;
|
||||
|
||||
/**
|
||||
* Zofan AI.
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Zofan extends AbstractNpcAI
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] ZOFAN =
|
||||
{
|
||||
23215, // Zofan
|
||||
23216, // Zofan
|
||||
23227, // Beggar Zofan
|
||||
23229, // Zofan
|
||||
23237, // Engineer Zofan
|
||||
};
|
||||
// Misc
|
||||
private static final String[] MINION_PARAMS =
|
||||
{
|
||||
"i_adult1_sil",
|
||||
"i_adult2_sil",
|
||||
"i_adult3_sil",
|
||||
"i_child1_sil",
|
||||
"i_child2_sil",
|
||||
"i_child3_sil",
|
||||
"i_child4_sil",
|
||||
"i_child5_sil",
|
||||
"i_child6_sil",
|
||||
};
|
||||
|
||||
private Zofan()
|
||||
{
|
||||
addSpawnId(ZOFAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onSpawn(L2Npc npc)
|
||||
{
|
||||
if ((npc.getInstanceWorld() == null) && (npc.getSpawn() != null))
|
||||
{
|
||||
final StatsSet params = npc.getParameters();
|
||||
if (params.getInt("i_childrengarden_guard", 0) == 0)
|
||||
{
|
||||
for (String param : MINION_PARAMS)
|
||||
{
|
||||
if (params.getInt(param, -1) != -1)
|
||||
{
|
||||
addMinion((L2MonsterInstance) npc, params.getInt(param));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new Zofan();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user