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

@@ -25,8 +25,8 @@ import client.MapleClient;
import constants.skills.DarkKnight;
import java.util.Collection;
import net.AbstractMaplePacketHandler;
import net.packet.InPacket;
import server.maps.MapleSummon;
import tools.data.input.SeekableLittleEndianAccessor;
/**
*
@@ -35,10 +35,10 @@ import tools.data.input.SeekableLittleEndianAccessor;
public final class BeholderHandler extends AbstractMaplePacketHandler {//Summon Skills noobs
@Override
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
public final void handlePacket(InPacket p, MapleClient c) {
//System.out.println(slea.toString());
Collection<MapleSummon> summons = c.getPlayer().getSummonsValues();
int oid = slea.readInt();
int oid = p.readInt();
MapleSummon summon = null;
for (MapleSummon sum : summons) {
if (sum.getObjectId() == oid) {
@@ -46,11 +46,11 @@ public final class BeholderHandler extends AbstractMaplePacketHandler {//Summon
}
}
if (summon != null) {
int skillId = slea.readInt();
int skillId = p.readInt();
if (skillId == DarkKnight.AURA_OF_BEHOLDER) {
slea.readShort(); //Not sure.
p.readShort(); //Not sure.
} else if (skillId == DarkKnight.HEX_OF_BEHOLDER) {
slea.readByte(); //Not sure.
p.readByte(); //Not sure.
} //show to others here
} else {
c.getPlayer().clearSummons();