Addition of Time Hunting zonePremiumUserOnly parameter.
Contributed by Fakee.
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
packet.writeC(0); // bCanUseEntranceTicket
|
packet.writeC(0); // bCanUseEntranceTicket
|
||||||
packet.writeD(0); // nEntranceCount
|
packet.writeD(0); // nEntranceCount
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
<xs:element type="xs:boolean" name="noPvpZone" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
<xs:element type="xs:boolean" name="weekly" minOccurs="0" />
|
||||||
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
<xs:element type="xs:boolean" name="useWorldPrefix" minOccurs="0" />
|
||||||
|
<xs:element type="xs:boolean" name="zonePremiumUserOnly" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute type="xs:byte" name="id" use="optional" />
|
<xs:attribute type="xs:byte" name="id" use="optional" />
|
||||||
<xs:attribute type="xs:string" name="name" use="optional" />
|
<xs:attribute type="xs:string" name="name" use="optional" />
|
||||||
|
@@ -93,6 +93,7 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
boolean soloInstance = true;
|
boolean soloInstance = true;
|
||||||
boolean weekly = false;
|
boolean weekly = false;
|
||||||
boolean useWorldPrefix = false;
|
boolean useWorldPrefix = false;
|
||||||
|
boolean zonePremiumUserOnly = false;
|
||||||
Location enterLocation = null;
|
Location enterLocation = null;
|
||||||
Location exitLocation = null;
|
Location exitLocation = null;
|
||||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||||
@@ -186,9 +187,14 @@ public class TimedHuntingZoneData implements IXmlReader
|
|||||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "zonePremiumUserOnly":
|
||||||
|
{
|
||||||
|
zonePremiumUserOnly = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, pvpZone, noPvpZone, instanceId, soloInstance, weekly, useWorldPrefix, zonePremiumUserOnly, enterLocation, exitLocation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,13 @@ public class TimedHuntingZoneHolder
|
|||||||
private final boolean _soloInstance;
|
private final boolean _soloInstance;
|
||||||
private final boolean _weekly;
|
private final boolean _weekly;
|
||||||
private final boolean _useWorldPrefix;
|
private final boolean _useWorldPrefix;
|
||||||
|
private final boolean _zonePremiumUserOnly;
|
||||||
private final Location _enterLocation;
|
private final Location _enterLocation;
|
||||||
private final Location _exitLocation;
|
private final Location _exitLocation;
|
||||||
private final int _mapX;
|
private final int _mapX;
|
||||||
private final int _mapY;
|
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, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
|
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int remainRefillTime, int refillTimeMax, boolean pvpZone, boolean noPvpZone, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, boolean zonePremiumUserOnly, Location enterLocation, Location exitLocation)
|
||||||
{
|
{
|
||||||
_id = id;
|
_id = id;
|
||||||
_name = name;
|
_name = name;
|
||||||
@@ -65,6 +66,7 @@ public class TimedHuntingZoneHolder
|
|||||||
_soloInstance = soloInstance;
|
_soloInstance = soloInstance;
|
||||||
_weekly = weekly;
|
_weekly = weekly;
|
||||||
_useWorldPrefix = useWorldPrefix;
|
_useWorldPrefix = useWorldPrefix;
|
||||||
|
_zonePremiumUserOnly = zonePremiumUserOnly;
|
||||||
_enterLocation = enterLocation;
|
_enterLocation = enterLocation;
|
||||||
_exitLocation = exitLocation;
|
_exitLocation = exitLocation;
|
||||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||||
@@ -156,6 +158,11 @@ public class TimedHuntingZoneHolder
|
|||||||
return _useWorldPrefix;
|
return _useWorldPrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean zonePremiumUserOnly()
|
||||||
|
{
|
||||||
|
return _zonePremiumUserOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public Location getEnterLocation()
|
public Location getEnterLocation()
|
||||||
{
|
{
|
||||||
return _enterLocation;
|
return _enterLocation;
|
||||||
|
@@ -67,8 +67,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
|||||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||||
packet.writeC(0); // bUserBound
|
packet.writeC(0); // bUserBound
|
||||||
packet.writeC(0); // bCanReEnter
|
packet.writeC(0); // bCanReEnter
|
||||||
packet.writeC(0); // bIsInZonePCCafeUserOnly
|
packet.writeC(holder.zonePremiumUserOnly() ? 1 : 0); // bIsInZonePCCafeUserOnly
|
||||||
packet.writeC(0); // bIsPCCafeUser
|
packet.writeC(_player.hasPremiumStatus() ? 1 : 0); // bIsPCCafeUser
|
||||||
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
|
||||||
packet.writeC(0); // bCanUseEntranceTicket
|
packet.writeC(0); // bCanUseEntranceTicket
|
||||||
packet.writeD(0); // nEntranceCount
|
packet.writeD(0); // nEntranceCount
|
||||||
|
Reference in New Issue
Block a user