Updated instancezone command.
This commit is contained in:
@@ -30,6 +30,6 @@ public final class InstanceZoneInfo implements IPlayerActionHandler
|
||||
@Override
|
||||
public void useAction(L2PcInstance activeChar, ActionDataHolder data, boolean ctrlPressed, boolean shiftPressed)
|
||||
{
|
||||
activeChar.sendPacket(new ExInzoneWaiting(activeChar));
|
||||
activeChar.sendPacket(new ExInzoneWaiting(activeChar, false));
|
||||
}
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public class InstanceZone implements IUserCommandHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
activeChar.sendPacket(new ExInzoneWaiting(activeChar));
|
||||
activeChar.sendPacket(new ExInzoneWaiting(activeChar, false));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -40,6 +40,6 @@ public class RequestInzoneWaitingTime implements IClientIncomingPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
client.sendPacket(new ExInzoneWaiting(activeChar));
|
||||
client.sendPacket(new ExInzoneWaiting(activeChar, true));
|
||||
}
|
||||
}
|
||||
|
@@ -33,12 +33,14 @@ public class ExInzoneWaiting implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _currentTemplateId;
|
||||
private final Map<Integer, Long> _instanceTimes;
|
||||
private final boolean _sendByClient;
|
||||
|
||||
public ExInzoneWaiting(L2PcInstance activeChar)
|
||||
public ExInzoneWaiting(L2PcInstance activeChar, boolean sendByClient)
|
||||
{
|
||||
final Instance instance = InstanceManager.getInstance().getPlayerInstance(activeChar, false);
|
||||
_currentTemplateId = ((instance != null) && (instance.getTemplateId() >= 0)) ? instance.getTemplateId() : -1;
|
||||
_instanceTimes = InstanceManager.getInstance().getAllInstanceTimes(activeChar);
|
||||
_sendByClient = sendByClient;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +48,7 @@ public class ExInzoneWaiting implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_INZONE_WAITING_INFO.writeId(packet);
|
||||
|
||||
packet.writeC(0x00); // identify if this is a response to a passive request
|
||||
packet.writeC(_sendByClient ? 0x00 : 0x01); // Grand Crusade
|
||||
packet.writeD(_currentTemplateId);
|
||||
packet.writeD(_instanceTimes.size());
|
||||
for (Entry<Integer, Long> entry : _instanceTimes.entrySet())
|
||||
|
Reference in New Issue
Block a user