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

@@ -23,8 +23,8 @@ import client.MapleCharacter;
import client.MapleClient;
import config.YamlConfig;
import net.AbstractMaplePacketHandler;
import net.packet.InPacket;
import tools.PacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
/**
*
@@ -32,9 +32,9 @@ import tools.data.input.SeekableLittleEndianAccessor;
*/
public final class OpenFamilyPedigreeHandler extends AbstractMaplePacketHandler {
@Override
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
public final void handlePacket(InPacket p, MapleClient c) {
if(!YamlConfig.config.server.USE_FAMILY_SYSTEM) return;
MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(slea.readMapleAsciiString());
MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(p.readString());
if(target != null && target.getFamily() != null) {
c.sendPacket(PacketCreator.showPedigree(target.getFamilyEntry()));
}