瀏覽代碼

Allow minions to be spawned without leader, if admin want it :)

_DS_ 15 年之前
父節點
當前提交
3d43549a04
共有 1 個文件被更改,包括 9 次插入6 次删除
  1. 9 6
      L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2MinionInstance.java

+ 9 - 6
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2MinionInstance.java

@@ -60,14 +60,17 @@ public class L2MinionInstance extends L2MonsterInstance
 	@Override
 	public void onSpawn()
 	{
-		if (getLeader().isRaid())
-		{
-			setIsRaidMinion(true);
-		}
 		setIsNoRndWalk(true);
 		super.onSpawn();
-		// Notify Leader that Minion has Spawned
-		getLeader().notifyMinionSpawned(this);
+		if (getLeader() != null)
+		{
+			if (getLeader().isRaid())
+			{
+				setIsRaidMinion(true);
+			}
+			// Notify Leader that Minion has Spawned
+			getLeader().notifyMinionSpawned(this);
+		}
 		// check the region where this mob is, do not activate the AI if region is inactive.
 		L2WorldRegion region = L2World.getInstance().getRegion(getX(),getY());
 		if ((region !=null) && (!region.isActive()))