浏览代码

Changing latest addSpawn(..) method signature to add one useful
parameter.

Zoey76 10 年之前
父节点
当前提交
0ec1b1ad04
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      L2J_Server/java/com/l2jserver/gameserver/model/events/AbstractScript.java

+ 3 - 2
L2J_Server/java/com/l2jserver/gameserver/model/events/AbstractScript.java

@@ -1561,12 +1561,13 @@ public abstract class AbstractScript extends ManagedScript
 	 * @param summoner the NPC that requires this spawn
 	 * @param npcId the ID of the NPC to spawn
 	 * @param pos the object containing the spawn location coordinates
+	 * @param randomOffset if {@code true}, adds +/- 50~100 to X/Y coordinates of the spawn location
 	 * @param despawnDelay time in milliseconds till the NPC is despawned (0 - only despawned on server shutdown)
 	 * @return the {@link L2Npc} object of the newly spawned NPC, {@code null} if the NPC doesn't exist
 	 */
-	public static L2Npc addSpawn(L2Npc summoner, int npcId, IPositionable pos, long despawnDelay)
+	public static L2Npc addSpawn(L2Npc summoner, int npcId, IPositionable pos, boolean randomOffset, long despawnDelay)
 	{
-		return addSpawn(summoner, npcId, pos.getX(), pos.getY(), pos.getZ(), pos.getHeading(), false, despawnDelay, false, 0);
+		return addSpawn(summoner, npcId, pos.getX(), pos.getY(), pos.getZ(), pos.getHeading(), randomOffset, despawnDelay, false, 0);
 	}
 	
 	/**