Addition of useWorldPrefix TimedHuntingZoneData parameter.

Contributed by nasseka.
This commit is contained in:
MobiusDevelopment 2022-01-14 06:55:28 +00:00
parent e6a34fe537
commit b77aed5b99
27 changed files with 105 additions and 18 deletions

View File

@ -55,6 +55,7 @@
<minLevel>110</minLevel> <minLevel>110</minLevel>
<maxLevel>130</maxLevel> <maxLevel>130</maxLevel>
<weekly>true</weekly> <weekly>true</weekly>
<useWorldPrefix>true</useWorldPrefix>
</zone> </zone>
<zone id="12" name="Imperial Tomb"> <zone id="12" name="Imperial Tomb">
<enterLocation>181409,-78389,-2728</enterLocation> <enterLocation>181409,-78389,-2728</enterLocation>

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }

View File

@ -57,6 +57,7 @@
<minLevel>110</minLevel> <minLevel>110</minLevel>
<maxLevel>130</maxLevel> <maxLevel>130</maxLevel>
<weekly>true</weekly> <weekly>true</weekly>
<useWorldPrefix>true</useWorldPrefix>
</zone> </zone>
<zone id="12" name="Imperial Tomb"> <zone id="12" name="Imperial Tomb">
<enterLocation>181409,-78389,-2728</enterLocation> <enterLocation>181409,-78389,-2728</enterLocation>

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }

View File

@ -69,6 +69,7 @@
<minLevel>110</minLevel> <minLevel>110</minLevel>
<maxLevel>130</maxLevel> <maxLevel>130</maxLevel>
<weekly>true</weekly> <weekly>true</weekly>
<useWorldPrefix>true</useWorldPrefix>
</zone> </zone>
<zone id="12" name="Imperial Tomb"> <zone id="12" name="Imperial Tomb">
<enterLocation>181409,-78389,-2728</enterLocation> <enterLocation>181409,-78389,-2728</enterLocation>

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }

View File

@ -19,6 +19,7 @@
<xs:element type="xs:int" name="instanceId" minOccurs="0" /> <xs:element type="xs:int" name="instanceId" minOccurs="0" />
<xs:element type="xs:boolean" name="soloInstance" minOccurs="0" /> <xs:element type="xs:boolean" name="soloInstance" 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: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" />

View File

@ -90,6 +90,7 @@ public class TimedHuntingZoneData implements IXmlReader
int instanceId = 0; int instanceId = 0;
boolean soloInstance = true; boolean soloInstance = true;
boolean weekly = false; boolean weekly = false;
boolean useWorldPrefix = 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())
@ -168,9 +169,14 @@ public class TimedHuntingZoneData implements IXmlReader
weekly = Boolean.parseBoolean(zoneNode.getTextContent()); weekly = Boolean.parseBoolean(zoneNode.getTextContent());
break; break;
} }
case "useWorldPrefix":
{
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
break;
} }
} }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, enterLocation, exitLocation)); }
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
} }
} }
} }

View File

@ -38,12 +38,13 @@ public class TimedHuntingZoneHolder
private final int _instanceId; private final int _instanceId;
private final boolean _soloInstance; private final boolean _soloInstance;
private final boolean _weekly; private final boolean _weekly;
private final boolean _useWorldPrefix;
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, int instanceId, boolean soloInstance, boolean weekly, 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, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation)
{ {
_id = id; _id = id;
_name = name; _name = name;
@ -59,6 +60,7 @@ public class TimedHuntingZoneHolder
_instanceId = instanceId; _instanceId = instanceId;
_soloInstance = soloInstance; _soloInstance = soloInstance;
_weekly = weekly; _weekly = weekly;
_useWorldPrefix = useWorldPrefix;
_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;
@ -135,6 +137,11 @@ public class TimedHuntingZoneHolder
return _weekly; return _weekly;
} }
public boolean useWorldPrefix()
{
return _useWorldPrefix;
}
public Location getEnterLocation() public Location getEnterLocation()
{ {
return _enterLocation; return _enterLocation;

View File

@ -70,7 +70,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
packet.writeC(0); // bCanReEnter packet.writeC(0); // bCanReEnter
packet.writeC(0); // bIsInZonePCCafeUserOnly packet.writeC(0); // bIsInZonePCCafeUserOnly
packet.writeC(0); // bIsPCCafeUser packet.writeC(0); // bIsPCCafeUser
packet.writeC(0); // bWorldInZone packet.writeC(holder.useWorldPrefix() ? 1 : 0); // bWorldInZone
} }
return true; return true;
} }