use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method levelUpMessage.
/**
* Sends a "levelup" packet to the guild or family.
*
* Possible values for <code>type</code>:<br> 0: <Family> ? has reached Lv.
* ?.<br> - The Reps you have received from ? will be reduced in half. 1:
* <Family> ? has reached Lv. ?.<br> 2: <Guild> ? has reached Lv. ?.<br>
*
* @param type The type
* @return The "levelup" packet.
*/
public static byte[] levelUpMessage(int type, int level, String charname) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.NOTIFY_LEVELUP.getValue());
mplew.write(type);
mplew.writeInt(level);
mplew.writeMapleAsciiString(charname);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method pinRegistered.
public static byte[] pinRegistered() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.UPDATE_PINCODE.getValue());
mplew.write(0);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method addQuestTimeLimit.
public static byte[] addQuestTimeLimit(final short quest, final int time) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.UPDATE_QUEST_INFO.getValue());
mplew.write(6);
// Size but meh, when will there be 2 at the same time? And it won't even replace the old one :)
mplew.writeShort(1);
mplew.writeShort(quest);
mplew.writeInt(time);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method cancelForeignBuff.
public static byte[] cancelForeignBuff(int cid, List<MapleBuffStat> statups) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CANCEL_FOREIGN_BUFF.getValue());
mplew.writeInt(cid);
writeLongMaskFromList(mplew, statups);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getTempBan.
public static byte[] getTempBan(long timestampTill, byte reason) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(17);
mplew.writeShort(SendOpcode.LOGIN_STATUS.getValue());
mplew.write(2);
mplew.write(0);
mplew.writeInt(0);
mplew.write(reason);
// Tempban date is handled as a 64-bit long, number of 100NS intervals since 1/1/1601. Lulz.
mplew.writeLong(getTime(timestampTill));
return mplew.getPacket();
}
Aggregations