Support for timed hunting zone exit (SoE) location.

Contributed by Index.
This commit is contained in:
MobiusDevelopment 2021-11-11 11:21:27 +00:00
parent c29621c886
commit 59367c14db
32 changed files with 232 additions and 16 deletions

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;

View File

@ -6,6 +6,7 @@
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="enterLocation" />
<xs:element type="xs:string" name="exitLocation" minOccurs="0"/>
<xs:element type="xs:int" name="initialTime" />
<xs:element type="xs:int" name="resetDelay" minOccurs="0" />
<xs:element type="xs:int" name="maxAddedTime" />

View File

@ -91,6 +91,7 @@ public class TimedHuntingZoneData implements IXmlReader
boolean soloInstance = true;
boolean weekly = false;
Location enterLocation = null;
Location exitLocation = null;
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
{
switch (zoneNode.getNodeName())
@ -101,6 +102,12 @@ public class TimedHuntingZoneData implements IXmlReader
enterLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "exitLocation":
{
final String[] coordinates = zoneNode.getTextContent().split(",");
exitLocation = new Location(Integer.parseInt(coordinates[0]), Integer.parseInt(coordinates[1]), Integer.parseInt(coordinates[2]));
break;
}
case "initialTime":
{
initialTime = Integer.parseInt(zoneNode.getTextContent()) * 1000;
@ -163,7 +170,7 @@ public class TimedHuntingZoneData implements IXmlReader
}
}
}
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation));
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation));
}
}
}

View File

@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.model.interfaces.ILocational;
import org.l2jmobius.gameserver.model.residences.ClanHall;
@ -322,6 +323,17 @@ public class MapRegionManager implements IXmlReader
}
}
// Timed Hunting zones.
final TimedHuntingZoneHolder timedHuntingZone = player.getTimedHuntingZone();
if (timedHuntingZone != null)
{
final Location exitLocation = timedHuntingZone.getExitLocation();
if (exitLocation != null)
{
return exitLocation;
}
}
// Karma player land out of city
if (player.getReputation() < 0)
{

View File

@ -39,10 +39,11 @@ public class TimedHuntingZoneHolder
private final boolean _soloInstance;
private final boolean _weekly;
private final Location _enterLocation;
private final Location _exitLocation;
private final int _mapX;
private final int _mapY;
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation)
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, Location enterLocation, Location exitLocation)
{
_id = id;
_name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_soloInstance = soloInstance;
_weekly = weekly;
_enterLocation = enterLocation;
_exitLocation = exitLocation;
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
}
@ -138,6 +140,11 @@ public class TimedHuntingZoneHolder
return _enterLocation;
}
public Location getExitLocation()
{
return _exitLocation;
}
public int getMapX()
{
return _mapX;