use of server.movement.LifeMovementFragment in project HeavenMS by ronancpl.
the class MoveSummonHandler method handlePacket.
@Override
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
int oid = slea.readInt();
Point startPos = new Point(slea.readShort(), slea.readShort());
List<LifeMovementFragment> res = parseMovement(slea);
MapleCharacter player = c.getPlayer();
Collection<MapleSummon> summons = player.getSummonsValues();
MapleSummon summon = null;
for (MapleSummon sum : summons) {
if (sum.getObjectId() == oid) {
summon = sum;
break;
}
}
if (summon != null) {
updatePosition(res, summon, 0);
player.getMap().broadcastMessage(player, MaplePacketCreator.moveSummon(player.getId(), oid, startPos, res), summon.getPosition());
}
}
Aggregations