use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method updateQuest.
public static byte[] updateQuest(MapleQuestStatus q, boolean infoUpdate) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SHOW_STATUS_INFO.getValue());
mplew.write(1);
mplew.writeShort(infoUpdate ? q.getQuest().getInfoNumber() : q.getQuest().getId());
if (infoUpdate) {
mplew.write(1);
} else {
mplew.write(q.getStatus().getId());
}
mplew.writeMapleAsciiString(q.getQuestData());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method aranGodlyStats.
public static byte[] aranGodlyStats() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.FORCED_STAT_SET.getValue());
mplew.write(new byte[] { (byte) 0x1F, (byte) 0x0F, 0, 0, (byte) 0xE7, 3, (byte) 0xE7, 3, (byte) 0xE7, 3, (byte) 0xE7, 3, (byte) 0xFF, 0, (byte) 0xE7, 3, (byte) 0xE7, 3, (byte) 0x78, (byte) 0x8C });
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method updateAllianceJobLevel.
public static byte[] updateAllianceJobLevel(MapleCharacter mc) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.ALLIANCE_OPERATION.getValue());
mplew.write(0x18);
mplew.writeInt(mc.getGuild().getAllianceId());
mplew.writeInt(mc.getGuildId());
mplew.writeInt(mc.getId());
mplew.writeInt(mc.getLevel());
mplew.writeInt(mc.getJob().getId());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMiniGameRemoveVisitor.
public static byte[] getMiniGameRemoveVisitor() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.EXIT.getCode());
mplew.write(1);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getClockTime.
public static byte[] getClockTime(int hour, int min, int sec) {
// Current Time
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CLOCK.getValue());
// Clock-Type
mplew.write(1);
mplew.write(hour);
mplew.write(min);
mplew.write(sec);
return mplew.getPacket();
}
Aggregations