Handlers read from InPacket instead of SeekableLittleEndianAccessor

This commit is contained in:
P0nk
2021-08-22 22:10:19 +02:00
parent 2232022cf1
commit da2d8abc56
182 changed files with 1223 additions and 1230 deletions

View File

@@ -3,17 +3,17 @@ package net.server.channel.handlers;
import client.MapleClient;
import client.MapleFamily;
import net.AbstractMaplePacketHandler;
import net.packet.InPacket;
import tools.PacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
public class FamilyPreceptsHandler extends AbstractMaplePacketHandler {
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
public void handlePacket(InPacket p, MapleClient c) {
MapleFamily family = c.getPlayer().getFamily();
if(family == null) return;
if(family.getLeader().getChr() != c.getPlayer()) return; //only the leader can set the precepts
String newPrecepts = slea.readMapleAsciiString();
String newPrecepts = p.readString();
if(newPrecepts.length() > 200) return;
family.setMessage(newPrecepts, true);
//family.broadcastFamilyInfoUpdate(); //probably don't need to broadcast for this?