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