Jump to content

Recommended Posts

Posted
Index: aCis_datapack/data/xml/zones/ArenaZone.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_datapack/data/xml/zones/ArenaZone.xml b/aCis_datapack/data/xml/zones/ArenaZone.xml
--- a/aCis_datapack/data/xml/zones/ArenaZone.xml	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
+++ b/aCis_datapack/data/xml/zones/ArenaZone.xml	(revision c59220ae01b62d03a4f1394ba1ce52853868bbab)
@@ -6,18 +6,21 @@
 		<node x="12937" y="183019"/>
 		<node x="12943" y="184010"/>
 		<node x="11941" y="184010"/>
+		<spawn type="NORMAL" x="12661" y="181687" z="-3560"/>
 	</zone>
 	<zone shape="NPoly" minZ="-3752" maxZ="-3352"><!-- gludin_pvp -->
 		<node x="-88411" y="141732"/>
 		<node x="-87429" y="141733"/>
 		<node x="-87429" y="142708"/>
 		<node x="-88408" y="142708"/>
+		<spawn type="NORMAL" x="-86979" y="142402" z="-3643"/>
 	</zone>
 	<zone shape="NPoly" minZ="-3850" maxZ="-3350"><!-- giran_pvp_battle -->
 		<node x="72493" y="142263"/>
 		<node x="73493" y="142264"/>
 		<node x="73493" y="143261"/>
 		<node x="72495" y="143258"/>
+		<spawn type="NORMAL" x="73890" y="142656" z="-3778"/>
 	</zone>
 	<zone shape="NPoly" minZ="-3498" maxZ="-3298"><!-- colosseum_battle -->
 		<node x="150948" y="46483" />
@@ -36,5 +39,6 @@
 		<node x="151220" y="47493" />
 		<node x="151216" y="47259" />
 		<node x="150947" y="46960" />
+		<spawn type="NORMAL" x="147451" y="46728" z="-3298"/>
 	</zone>
 </list>
\ No newline at end of file
Index: aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MapRegionData.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
@@ -22,6 +22,8 @@
 import net.sf.l2j.gameserver.model.entity.Castle;
 import net.sf.l2j.gameserver.model.entity.Siege;
 import net.sf.l2j.gameserver.model.location.Location;
+import net.sf.l2j.gameserver.model.zone.ZoneForm;
+import net.sf.l2j.gameserver.model.zone.type.ArenaZone;
 import net.sf.l2j.gameserver.model.zone.type.TownZone;
 
 import org.w3c.dom.Document;
@@ -46,7 +48,7 @@
 	private static final int REGIONS_Y = 16;
 	
 	private static final Location MDT_LOCATION = new Location(12661, 181687, -3560);
-	
+
 	private final int[][] _regions = new int[REGIONS_X][REGIONS_Y];
 	
 	protected MapRegionData()
@@ -228,7 +230,15 @@
 		// The player is in MDT, move him out.
 		if (player.isInsideZone(ZoneId.MONSTER_TRACK))
 			return MDT_LOCATION;
-		
+
+		// The player is in Arena zone type, move him out.
+		if (player.isInsideZone(ZoneId.ARENA)) {
+			ArenaZone arenaZone = ZoneManager.getInstance().getZone(player, ArenaZone.class);
+			if(arenaZone != null && !arenaZone.getSpawns(SpawnType.NORMAL).isEmpty()){
+				return arenaZone.getRndSpawn(SpawnType.NORMAL);
+			}
+		}
+
 		if (teleportType != TeleportType.TOWN && player.getClan() != null)
 		{
 			if (teleportType == TeleportType.CLAN_HALL)
Index: aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/enums/ZoneId.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
@@ -21,7 +21,8 @@
 	CAST_ON_ARTIFACT(16),
 	NO_RESTART(17),
 	SCRIPT(18),
-	BOSS(19);
+	BOSS(19),
+	ARENA(20);
 	
 	private final int _id;
 	
Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java	(revision fe710a9694c725982e80c3db5037128ed3f0ca02)
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/zone/type/ArenaZone.java	(revision 1ff70bc80187be81e9301b350b234e26f781a3d9)
@@ -3,13 +3,14 @@
 import net.sf.l2j.gameserver.enums.ZoneId;
 import net.sf.l2j.gameserver.model.actor.Creature;
 import net.sf.l2j.gameserver.model.actor.Player;
+import net.sf.l2j.gameserver.model.zone.type.subtype.SpawnZoneType;
 import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType;
 import net.sf.l2j.gameserver.network.SystemMessageId;
 
 /**
  * A zone extending {@link ZoneType}, where summoning is forbidden. The place is considered a pvp zone (no flag, no karma). It is used for arenas.
  */
-public class ArenaZone extends ZoneType
+public class ArenaZone extends SpawnZoneType
 {
 	public ArenaZone(int id)
 	{
@@ -24,6 +25,7 @@
 		
 		character.setInsideZone(ZoneId.PVP, true);
 		character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
+		character.setInsideZone(ZoneId.ARENA, true);
 	}
 	
 	@Override
@@ -31,7 +33,8 @@
 	{
 		character.setInsideZone(ZoneId.PVP, false);
 		character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
-		
+		character.setInsideZone(ZoneId.ARENA, false);
+
 		if (character instanceof Player)
 			((Player) character).sendPacket(SystemMessageId.LEFT_COMBAT_ZONE);
 	}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...