Preemptive bugfixing part 3
This commit is contained in:
@@ -599,8 +599,8 @@ public final class MSPacketRepository {
|
||||
Player player = Repository.getPlayerByName(key);
|
||||
if (player != null && player.isActive()) {
|
||||
player.getPacketDispatch().sendMessages((duration > 0L ? new String[]{"You have been muted.", "To prevent further mutes please read the rules."} : new String[]{"You have been unmuted."}));
|
||||
player.getDetails().setMuteTime(duration);
|
||||
}
|
||||
player.getDetails().setMuteTime(duration);
|
||||
break;
|
||||
case 1:
|
||||
player = Repository.getPlayerByName(key);
|
||||
|
||||
@@ -529,7 +529,7 @@ public class IoBuffer {
|
||||
*/
|
||||
public int getSmart() {
|
||||
int peek = buf.get(buf.position());
|
||||
if (peek <= Byte.MAX_VALUE) {
|
||||
if (peek <= (0xFF & peek)) {
|
||||
return buf.get() & 0xFF;
|
||||
}
|
||||
return (buf.getShort() & 0xFFFF) - 32768;
|
||||
|
||||
@@ -298,9 +298,6 @@ public final class InteractionPacket implements IncomingPacket {
|
||||
}
|
||||
final Option option = player.getInteraction().get(optionIndex);
|
||||
//Handling for "Pelt" option
|
||||
if(option.getName().toLowerCase().equals("pelt")){
|
||||
|
||||
}
|
||||
if (option == null) {
|
||||
PacketRepository.send(ClearMinimapFlag.class, new PlayerContext(player));
|
||||
return;
|
||||
|
||||
@@ -85,7 +85,8 @@ public class InterfaceUseOnPacket implements IncomingPacket {
|
||||
}
|
||||
break;
|
||||
case 195: // Interface On Player
|
||||
payload = buffer.getShortA();
|
||||
//payload = buffer.getShortA();
|
||||
buffer.getShortA();
|
||||
componentId = buffer.getLEShort();
|
||||
interfaceId = buffer.getLEShort();
|
||||
int targetIndex = buffer.getLEShortA();
|
||||
@@ -175,7 +176,7 @@ public class InterfaceUseOnPacket implements IncomingPacket {
|
||||
case 239: // Interface On NPC
|
||||
componentId = buffer.getLEShort();
|
||||
interfaceId = buffer.getLEShort();
|
||||
int unknown = buffer.getShortA();
|
||||
buffer.getShortA();
|
||||
int index = buffer.getLEShortA();
|
||||
if (index < 1 || index > ServerConstants.MAX_NPCS) {
|
||||
PacketRepository.send(ClearMinimapFlag.class, new PlayerContext(player));
|
||||
|
||||
Reference in New Issue
Block a user