Assign proper protocol.

This commit is contained in:
MobiusDevelopment
2019-04-30 18:52:46 +00:00
parent fab63ee789
commit 70acd01537
4 changed files with 20 additions and 53 deletions

View File

@@ -101,8 +101,8 @@ MaximumOnlineUsers = 2000
# Numbers of protocol revisions that server allows to connect. # Numbers of protocol revisions that server allows to connect.
# Delimiter is ; # Delimiter is ;
# WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u> # WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u>
# Seven Signs: 152;166 # Seven Signs: 152
AllowedProtocolRevisions = 152;166 AllowedProtocolRevisions = 152
# Displays server type next to the server name on character selection. # Displays server type next to the server name on character selection.
# Notes: # Notes:

View File

@@ -16,7 +16,6 @@
*/ */
package org.l2jmobius.gameserver.network.serverpackets; package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.Config;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.network.OutgoingPackets; import org.l2jmobius.gameserver.network.OutgoingPackets;
@@ -62,31 +61,11 @@ public class EnchantResult implements IClientOutgoingPacket
packet.writeD(_result); packet.writeD(_result);
packet.writeD(_crystal); packet.writeD(_crystal);
packet.writeQ(_count); packet.writeQ(_count);
if ((Config.PROTOCOL_LIST.size() == 1) && Config.PROTOCOL_LIST.contains(152)) // 152
{
packet.writeD(_enchantLevel); packet.writeD(_enchantLevel);
for (int option : _enchantOptions) for (int option : _enchantOptions)
{ {
packet.writeH(option); packet.writeH(option);
} }
}
else
{
// Guessing.
// With 166 options became 3x write integers instead of shorts and enchant level moved bellow.
// Commenting until actually knowing.
// for (int option : _enchantOptions)
// {
// packet.writeD(option);
// }
packet.writeD(0x00);
packet.writeD(0x00);
packet.writeD(0x00);
packet.writeD(_enchantLevel); // Confirmed.
}
return true; return true;
} }

View File

@@ -101,8 +101,8 @@ MaximumOnlineUsers = 2000
# Numbers of protocol revisions that server allows to connect. # Numbers of protocol revisions that server allows to connect.
# Delimiter is ; # Delimiter is ;
# WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u> # WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u>
# Seven Signs: 152;166 # Secret of Empire: 166
AllowedProtocolRevisions = 152;166 AllowedProtocolRevisions = 166
# Displays server type next to the server name on character selection. # Displays server type next to the server name on character selection.
# Notes: # Notes:

View File

@@ -16,7 +16,6 @@
*/ */
package org.l2jmobius.gameserver.network.serverpackets; package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.Config;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.network.OutgoingPackets; import org.l2jmobius.gameserver.network.OutgoingPackets;
@@ -63,16 +62,6 @@ public class EnchantResult implements IClientOutgoingPacket
packet.writeD(_crystal); packet.writeD(_crystal);
packet.writeQ(_count); packet.writeQ(_count);
if ((Config.PROTOCOL_LIST.size() == 1) && Config.PROTOCOL_LIST.contains(152)) // 152
{
packet.writeD(_enchantLevel);
for (int option : _enchantOptions)
{
packet.writeH(option);
}
}
else
{
// Guessing. // Guessing.
// With 166 options became 3x write integers instead of shorts and enchant level moved bellow. // With 166 options became 3x write integers instead of shorts and enchant level moved bellow.
@@ -86,7 +75,6 @@ public class EnchantResult implements IClientOutgoingPacket
packet.writeD(0x00); packet.writeD(0x00);
packet.writeD(_enchantLevel); // Confirmed. packet.writeD(_enchantLevel); // Confirmed.
}
return true; return true;
} }