use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showGuildRanks.
public static byte[] showGuildRanks(int npcid, ResultSet rs) throws SQLException {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(0x49);
mplew.writeInt(npcid);
if (!rs.last()) {
// no guilds o.o
mplew.writeInt(0);
return mplew.getPacket();
}
// number of entries
mplew.writeInt(rs.getRow());
rs.beforeFirst();
while (rs.next()) {
mplew.writeMapleAsciiString(rs.getString("name"));
mplew.writeInt(rs.getInt("GP"));
mplew.writeInt(rs.getInt("logo"));
mplew.writeInt(rs.getInt("logoColor"));
mplew.writeInt(rs.getInt("logoBG"));
mplew.writeInt(rs.getInt("logoBGColor"));
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMiniGameReady.
public static byte[] getMiniGameReady(MapleMiniGame game) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.READY.getCode());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method guildQuestWaitingNotice.
public static byte[] guildQuestWaitingNotice(byte channel, int waitingPos) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(0x4C);
mplew.write(channel - 1);
mplew.write(waitingPos);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method updateAreaInfo.
public static byte[] updateAreaInfo(int area, String info) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SHOW_STATUS_INFO.getValue());
// 0x0B in v95
mplew.write(0x0A);
// infoNumber
mplew.writeShort(area);
mplew.writeMapleAsciiString(info);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method startCPQ.
public static byte[] startCPQ(MapleCharacter chr, MonsterCarnivalParty enemy) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(25);
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_START.getValue());
// team
mplew.write(chr.getTeam());
// Obtained CP - Used CP
mplew.writeShort(chr.getCP());
// Total Obtained CP
mplew.writeShort(chr.getObtainedCP());
// Obtained CP - Used CP of the team
mplew.writeShort(chr.getCarnivalParty().getAvailableCP());
// Total Obtained CP of the team
mplew.writeShort(chr.getCarnivalParty().getTotalCP());
// Obtained CP - Used CP of the team
mplew.writeShort(enemy.getAvailableCP());
// Total Obtained CP of the team
mplew.writeShort(enemy.getTotalCP());
// Probably useless nexon shit
mplew.writeShort(0);
// Probably useless nexon shit
mplew.writeLong(0);
return mplew.getPacket();
}
Aggregations