New approach for spawning minions.

This commit is contained in:
MobiusDev
2018-04-28 14:58:54 +00:00
parent 68ad48105f
commit c4b4ec5751
39 changed files with 534 additions and 3467 deletions

View File

@@ -29,6 +29,7 @@ import com.l2jmobius.commons.util.Rnd;
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
@@ -589,6 +590,13 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
_spawnedNpcs.add(npc);
_currentCount++;
// Minions
if (npc.isMonster() && NpcData.getMasterMonsterIDs().contains(npc.getId()))
{
((L2MonsterInstance) npc).getMinionList().spawnMinions(npc.getParameters().getMinionList("Privates"));
}
return npc;
}