use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method setExtraPendantSlot.
public static byte[] setExtraPendantSlot(boolean toggleExtraSlot) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SET_EXTRA_PENDANT_SLOT.getValue());
mplew.writeBool(toggleExtraSlot);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method guildInvite.
public static byte[] guildInvite(int gid, String charName) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(0x05);
mplew.writeInt(gid);
mplew.writeMapleAsciiString(charName);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getChannelChange.
/**
* Gets a packet telling the client the IP of the new channel.
*
* @param inetAddr The InetAddress of the requested channel server.
* @param port The port the channel is on.
* @return The server IP packet.
*/
public static byte[] getChannelChange(InetAddress inetAddr, int port) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CHANGE_CHANNEL.getValue());
mplew.write(1);
byte[] addr = inetAddr.getAddress();
mplew.write(addr);
mplew.writeShort(port);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method triggerReactor.
// is there a way to trigger reactors without performing the hit animation?
public static byte[] triggerReactor(MapleReactor reactor, int stance) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
Point pos = reactor.getPosition();
mplew.writeShort(SendOpcode.REACTOR_HIT.getValue());
mplew.writeInt(reactor.getObjectId());
mplew.write(reactor.getState());
mplew.writePos(pos);
mplew.writeShort(stance);
mplew.write(0);
// frame delay, set to 5 since there doesn't appear to be a fixed formula for it
mplew.write(5);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method incubatorResult.
public static byte[] incubatorResult() {
// lol
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(8);
mplew.writeShort(SendOpcode.INCUBATOR_RESULT.getValue());
mplew.skip(6);
return mplew.getPacket();
}
Aggregations