Timed hunting zone rework.
Contributed by dontknowdontcare.
This commit is contained in:
@ -85,7 +85,6 @@ public class TimedHuntingZoneData implements IXmlReader
|
||||
int entryFee = 150000;
|
||||
int minLevel = 1;
|
||||
int maxLevel = 999;
|
||||
int remainRefillTime = 3600;
|
||||
int refillTimeMax = 3600;
|
||||
int instanceId = 0;
|
||||
boolean soloInstance = true;
|
||||
@ -93,6 +92,8 @@ public class TimedHuntingZoneData implements IXmlReader
|
||||
boolean useWorldPrefix = false;
|
||||
Location enterLocation = null;
|
||||
Location exitLocation = null;
|
||||
boolean pvpZone = false;
|
||||
boolean noPvpZone = false;
|
||||
for (Node zoneNode = listNode.getFirstChild(); zoneNode != null; zoneNode = zoneNode.getNextSibling())
|
||||
{
|
||||
switch (zoneNode.getNodeName())
|
||||
@ -144,11 +145,6 @@ public class TimedHuntingZoneData implements IXmlReader
|
||||
maxLevel = Integer.parseInt(zoneNode.getTextContent());
|
||||
break;
|
||||
}
|
||||
case "remainRefillTime":
|
||||
{
|
||||
remainRefillTime = Integer.parseInt(zoneNode.getTextContent());
|
||||
break;
|
||||
}
|
||||
case "refillTimeMax":
|
||||
{
|
||||
refillTimeMax = Integer.parseInt(zoneNode.getTextContent());
|
||||
@ -174,9 +170,19 @@ public class TimedHuntingZoneData implements IXmlReader
|
||||
useWorldPrefix = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||
break;
|
||||
}
|
||||
case "pvpZone":
|
||||
{
|
||||
pvpZone = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||
break;
|
||||
}
|
||||
case "noPvpZone":
|
||||
{
|
||||
noPvpZone = Boolean.parseBoolean(zoneNode.getTextContent());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, remainRefillTime, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation));
|
||||
_timedHuntingZoneData.put(id, new TimedHuntingZoneHolder(id, name, initialTime, maxAddedTime, resetDelay, entryItemId, entryFee, minLevel, maxLevel, refillTimeMax, instanceId, soloInstance, weekly, useWorldPrefix, enterLocation, exitLocation, pvpZone, noPvpZone));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,11 @@
|
||||
package org.l2jmobius.gameserver.model.actor;
|
||||
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.enums.ClanWarState;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.PlayableStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.PlayableStatus;
|
||||
@ -31,6 +33,7 @@ import org.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath;
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -230,6 +233,28 @@ public abstract class Playable extends Creature
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInTimedHuntingZone(int zoneId)
|
||||
{
|
||||
return isInTimedHuntingZone(zoneId, getX(), getY());
|
||||
}
|
||||
|
||||
public boolean isInTimedHuntingZone(int zoneId, int locX, int locY)
|
||||
{
|
||||
final TimedHuntingZoneHolder holder = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
if (holder == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final int instanceId = holder.getInstanceId();
|
||||
if (instanceId > 0)
|
||||
{
|
||||
return isInInstance() && (instanceId == getInstanceWorld().getTemplateId());
|
||||
}
|
||||
|
||||
return (holder.getMapX() == (((locX - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN)) && (holder.getMapY() == (((locY - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True.
|
||||
*/
|
||||
|
@ -914,6 +914,7 @@ public class Player extends Playable
|
||||
private final AutoUseSettingsHolder _autoUseSettings = new AutoUseSettingsHolder();
|
||||
private boolean _resumedAutoPlay = false;
|
||||
|
||||
private TimedHuntingZoneHolder _lastTimeZone = null;
|
||||
private ScheduledFuture<?> _timedHuntingZoneTask = null;
|
||||
|
||||
private final HomunculusList _homunculusList = new HomunculusList(this);
|
||||
@ -4251,6 +4252,52 @@ public class Player extends Playable
|
||||
});
|
||||
}
|
||||
|
||||
public void updateRelationsToVisiblePlayers(boolean bothWays)
|
||||
{
|
||||
World.getInstance().forEachVisibleObject(this, Player.class, nearby ->
|
||||
{
|
||||
if (!isVisibleFor(nearby))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
updateRelation(this, nearby);
|
||||
if (bothWays)
|
||||
{
|
||||
nearby.updateRelation(nearby, this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateRelation(Player player, Player target)
|
||||
{
|
||||
final long relation = player.getRelation(target);
|
||||
final boolean isAutoAttackable = player.isAutoAttackable(target);
|
||||
final RelationCache oldrelation = player.getKnownRelations().get(target.getObjectId());
|
||||
if ((oldrelation == null) || (oldrelation.getRelation() != relation) || (oldrelation.isAutoAttackable() != isAutoAttackable))
|
||||
{
|
||||
final RelationChanged rc = new RelationChanged();
|
||||
rc.addRelation(player, relation, isAutoAttackable);
|
||||
if (player.hasSummon())
|
||||
{
|
||||
final Summon pet = player.getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
rc.addRelation(pet, relation, isAutoAttackable);
|
||||
}
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(s -> rc.addRelation(s, relation, isAutoAttackable));
|
||||
}
|
||||
}
|
||||
|
||||
// Delay by 125ms so the CharInfo packet of characters moving into field of view will arrive first,
|
||||
// otherwise this relation packet will be ignored by the client.
|
||||
ThreadPool.schedule(() -> target.sendPacket(rc), 125);
|
||||
player.getKnownRelations().put(target.getObjectId(), new RelationCache(relation, isAutoAttackable));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastTitleInfo()
|
||||
{
|
||||
// Send a Server->Client packet UserInfo to this Player
|
||||
@ -14808,11 +14855,23 @@ public class Player extends Playable
|
||||
getVariables().setIntegerList(PlayerVariables.AUTO_USE_SHORTCUTS, positions);
|
||||
}
|
||||
|
||||
public TimedHuntingZoneHolder getLastTimeZone()
|
||||
{
|
||||
return _lastTimeZone;
|
||||
}
|
||||
|
||||
public void setLastTimeZone(TimedHuntingZoneHolder lastTimeZone)
|
||||
{
|
||||
_lastTimeZone = lastTimeZone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInTimedHuntingZone(int zoneId)
|
||||
{
|
||||
return isInTimedHuntingZone(zoneId, getX(), getY());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInTimedHuntingZone(int zoneId, int locX, int locY)
|
||||
{
|
||||
final TimedHuntingZoneHolder holder = TimedHuntingZoneData.getInstance().getHuntingZone(zoneId);
|
||||
|
@ -33,7 +33,6 @@ public class TimedHuntingZoneHolder
|
||||
private final int _entryFee;
|
||||
private final int _minLevel;
|
||||
private final int _maxLevel;
|
||||
private final int _remainRefillTime;
|
||||
private final int _refillTimeMax;
|
||||
private final int _instanceId;
|
||||
private final boolean _soloInstance;
|
||||
@ -43,8 +42,10 @@ public class TimedHuntingZoneHolder
|
||||
private final Location _exitLocation;
|
||||
private final int _mapX;
|
||||
private final int _mapY;
|
||||
private final boolean _pvpZone;
|
||||
private final boolean _noPvpZone;
|
||||
|
||||
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)
|
||||
public TimedHuntingZoneHolder(int id, String name, int initialTime, int maximumAddedTime, int resetDelay, int entryItemId, int entryFee, int minLevel, int maxLevel, int refillTimeMax, int instanceId, boolean soloInstance, boolean weekly, boolean useWorldPrefix, Location enterLocation, Location exitLocation, boolean pvpZone, boolean noPvpZone)
|
||||
{
|
||||
_id = id;
|
||||
_name = name;
|
||||
@ -55,7 +56,6 @@ public class TimedHuntingZoneHolder
|
||||
_entryFee = entryFee;
|
||||
_minLevel = minLevel;
|
||||
_maxLevel = maxLevel;
|
||||
_remainRefillTime = remainRefillTime;
|
||||
_refillTimeMax = refillTimeMax;
|
||||
_instanceId = instanceId;
|
||||
_soloInstance = soloInstance;
|
||||
@ -63,6 +63,8 @@ public class TimedHuntingZoneHolder
|
||||
_useWorldPrefix = useWorldPrefix;
|
||||
_enterLocation = enterLocation;
|
||||
_exitLocation = exitLocation;
|
||||
_pvpZone = pvpZone;
|
||||
_noPvpZone = noPvpZone;
|
||||
_mapX = ((_enterLocation.getX() - World.WORLD_X_MIN) >> 15) + World.TILE_X_MIN;
|
||||
_mapY = ((_enterLocation.getY() - World.WORLD_Y_MIN) >> 15) + World.TILE_Y_MIN;
|
||||
}
|
||||
@ -112,11 +114,6 @@ public class TimedHuntingZoneHolder
|
||||
return _maxLevel;
|
||||
}
|
||||
|
||||
public int getRemainRefillTime()
|
||||
{
|
||||
return _remainRefillTime;
|
||||
}
|
||||
|
||||
public int getRefillTimeMax()
|
||||
{
|
||||
return _refillTimeMax;
|
||||
@ -152,6 +149,16 @@ public class TimedHuntingZoneHolder
|
||||
return _exitLocation;
|
||||
}
|
||||
|
||||
public boolean isPvpZone()
|
||||
{
|
||||
return _pvpZone;
|
||||
}
|
||||
|
||||
public boolean isNoPvpZone()
|
||||
{
|
||||
return _noPvpZone;
|
||||
}
|
||||
|
||||
public int getMapX()
|
||||
{
|
||||
return _mapX;
|
||||
|
@ -16,20 +16,21 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.zone.type;
|
||||
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.gameserver.data.xml.TimedHuntingZoneData;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.instancemanager.MapRegionManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.TimedHuntingZoneHolder;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZoneClose;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZoneExit;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
* @author dontknowdontcare
|
||||
*/
|
||||
public class TimedHuntingZone extends ZoneType
|
||||
{
|
||||
@ -43,9 +44,29 @@ public class TimedHuntingZone extends ZoneType
|
||||
{
|
||||
if (!creature.isPlayer())
|
||||
{
|
||||
if (creature.isPlayable())
|
||||
{
|
||||
Playable summon = (Playable) creature;
|
||||
for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones())
|
||||
{
|
||||
if (!summon.isInTimedHuntingZone(holder.getZoneId()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (holder.isPvpZone())
|
||||
{
|
||||
summon.setInsideZone(ZoneId.PVP, true);
|
||||
}
|
||||
else if (holder.isNoPvpZone())
|
||||
{
|
||||
summon.setInsideZone(ZoneId.NO_PVP, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Check summons spawning or porting inside.
|
||||
final Player player = creature.getActingPlayer();
|
||||
if (player != null)
|
||||
{
|
||||
@ -57,16 +78,25 @@ public class TimedHuntingZone extends ZoneType
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final int remainingTime = player.getTimedHuntingZoneRemainingTime(holder.getZoneId());
|
||||
if (remainingTime > 0)
|
||||
{
|
||||
player.setLastTimeZone(holder);
|
||||
player.startTimedHuntingZone(holder.getZoneId(), remainingTime);
|
||||
if (holder.isPvpZone())
|
||||
{
|
||||
player.setInsideZone(ZoneId.PVP, true);
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_ENTERED_A_COMBAT_ZONE);
|
||||
player.updateRelationsToVisiblePlayers(true);
|
||||
}
|
||||
else if (holder.isNoPvpZone())
|
||||
{
|
||||
player.setInsideZone(ZoneId.NO_PVP, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!player.isGM())
|
||||
{
|
||||
player.teleToLocation(MapRegionManager.getInstance().getTeleToLocation(player, TeleportWhereType.TOWN));
|
||||
@ -79,22 +109,56 @@ public class TimedHuntingZone extends ZoneType
|
||||
{
|
||||
if (!creature.isPlayer())
|
||||
{
|
||||
if (creature.isPlayable())
|
||||
{
|
||||
final Playable summon = (Playable) creature;
|
||||
for (final TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones())
|
||||
{
|
||||
if (!summon.isInTimedHuntingZone(holder.getZoneId()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (holder.isPvpZone())
|
||||
{
|
||||
summon.setInsideZone(ZoneId.PVP, false);
|
||||
}
|
||||
else if (holder.isNoPvpZone())
|
||||
{
|
||||
summon.setInsideZone(ZoneId.NO_PVP, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
final Player player = creature.getActingPlayer();
|
||||
if (player != null)
|
||||
if (player == null)
|
||||
{
|
||||
player.setInsideZone(ZoneId.TIMED_HUNTING, false);
|
||||
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
if (!player.isInTimedHuntingZone(player.getX(), player.getY()))
|
||||
{
|
||||
player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET);
|
||||
player.sendPacket(TimedHuntingZoneClose.STATIC_PACKET);
|
||||
}
|
||||
}, 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
// We default to zone 6 aka Primeval Isle so we spawn in rune town by default.
|
||||
int nZoneId = 6;
|
||||
|
||||
final TimedHuntingZoneHolder lastTimeZone = player.getLastTimeZone();
|
||||
if (lastTimeZone != null)
|
||||
{
|
||||
nZoneId = lastTimeZone.getZoneId();
|
||||
if (lastTimeZone.isPvpZone())
|
||||
{
|
||||
player.setInsideZone(ZoneId.PVP, false);
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_LEFT_A_COMBAT_ZONE);
|
||||
player.updateRelationsToVisiblePlayers(true);
|
||||
}
|
||||
else if (lastTimeZone.isNoPvpZone())
|
||||
{
|
||||
player.setInsideZone(ZoneId.NO_PVP, false);
|
||||
}
|
||||
player.setLastTimeZone(null);
|
||||
}
|
||||
|
||||
player.setInsideZone(ZoneId.TIMED_HUNTING, false);
|
||||
player.sendPacket(new TimedHuntingZoneExit(nZoneId));
|
||||
}
|
||||
}
|
||||
|
@ -840,7 +840,7 @@ public enum OutgoingPackets
|
||||
EX_TIME_RESTRICT_FIELD_USER_ENTER(0xFE, 0x22A),
|
||||
EX_TIME_RESTRICT_FIELD_USER_CHARGE_RESULT(0xFE, 0x22B),
|
||||
EX_TIME_RESTRICT_FIELD_USER_ALARM(0xFE, 0x22C),
|
||||
EX_TIME_RESTRICT_FIELD_USER_CLOSE(0xFE, 0x22D),
|
||||
EX_TIME_RESTRICT_FIELD_USER_EXIT(0xFE, 0x22D),
|
||||
EX_RANKING_CHAR_INFO(0xFE, 0x22E),
|
||||
EX_RANKING_CHAR_HISTORY(0xFE, 0x22F),
|
||||
EX_RANKING_CHAR_RANKERS(0xFE, 0x230),
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZoneClose;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.huntingzones.TimedHuntingZoneEnter;
|
||||
|
||||
/**
|
||||
@ -158,9 +157,6 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
QuestManager.getInstance().getQuest("TimedHunting").notifyEvent("ENTER " + _zoneId, null, player);
|
||||
}
|
||||
|
||||
// Close window.
|
||||
player.sendPacket(TimedHuntingZoneClose.STATIC_PACKET);
|
||||
|
||||
// Send time icon.
|
||||
player.sendPacket(new TimedHuntingZoneEnter(player, _zoneId));
|
||||
}
|
||||
|
@ -21,20 +21,28 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
* @author dontknowdontcare
|
||||
*/
|
||||
public class TimedHuntingZoneClose implements IClientOutgoingPacket
|
||||
public class TimedHuntingZoneChargeResult implements IClientOutgoingPacket
|
||||
{
|
||||
public static final TimedHuntingZoneClose STATIC_PACKET = new TimedHuntingZoneClose();
|
||||
private final int _zoneId;
|
||||
private final int _secondsLeft;
|
||||
private final int _newExtensionValue;
|
||||
|
||||
public TimedHuntingZoneClose()
|
||||
public TimedHuntingZoneChargeResult(int zoneId, int secondsLeft, int newExtensionValue)
|
||||
{
|
||||
_zoneId = zoneId;
|
||||
_secondsLeft = secondsLeft;
|
||||
_newExtensionValue = newExtensionValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_TIME_RESTRICT_FIELD_USER_CLOSE.writeId(packet);
|
||||
OutgoingPackets.EX_TIME_RESTRICT_FIELD_USER_CHARGE_RESULT.writeId(packet);
|
||||
packet.writeD(_zoneId);
|
||||
packet.writeD(_secondsLeft); // Remaining Time in zone.
|
||||
packet.writeD(_newExtensionValue); // New Extension value.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -21,21 +21,22 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius, Index
|
||||
* @author dontknowdontcare
|
||||
*/
|
||||
public class TimedHuntingZoneExit implements IClientOutgoingPacket
|
||||
{
|
||||
public static final TimedHuntingZoneExit STATIC_PACKET = new TimedHuntingZoneExit();
|
||||
private final int _zoneId;
|
||||
|
||||
public TimedHuntingZoneExit()
|
||||
public TimedHuntingZoneExit(final int zoneId)
|
||||
{
|
||||
_zoneId = zoneId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
public boolean write(final PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_TIME_RESTRICT_FIELD_USER_ENTER.writeId(packet);
|
||||
packet.writeC(0); // bEnterSuccess
|
||||
OutgoingPackets.EX_TIME_RESTRICT_FIELD_USER_EXIT.writeId(packet);
|
||||
packet.writeD(_zoneId);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -62,7 +62,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
||||
}
|
||||
packet.writeD(remainingTime / 1000); // remain time
|
||||
packet.writeD(holder.getMaximumAddedTime() / 1000);
|
||||
packet.writeD(_player.getVariables().getInt(PlayerVariables.HUNTING_ZONE_REMAIN_REFILL + holder.getZoneId(), holder.getRemainRefillTime()));
|
||||
long remainRefillTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_REMAIN_REFILL + holder.getZoneId(), holder.getRefillTimeMax());
|
||||
packet.writeD((int) remainRefillTime);
|
||||
packet.writeD(holder.getRefillTimeMax());
|
||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeC(0); // bUserBound
|
||||
|
Reference in New Issue
Block a user