Search in sources :

Example 36 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method sendFamilyJoinResponse.

public static byte[] sendFamilyJoinResponse(boolean accepted, String added) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.FAMILY_JOIN_REQUEST_RESULT.getValue());
    mplew.write(accepted ? 1 : 0);
    mplew.writeMapleAsciiString(added);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 37 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method getMiniGameNewVisitor.

public static byte[] getMiniGameNewVisitor(MapleCharacter c, int slot) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
    mplew.write(PlayerInteractionHandler.Action.VISIT.getCode());
    mplew.write(slot);
    addCharLook(mplew, c, false);
    mplew.writeMapleAsciiString(c.getName());
    mplew.writeInt(1);
    mplew.writeInt(c.getMiniGamePoints("wins", true));
    mplew.writeInt(c.getMiniGamePoints("ties", true));
    mplew.writeInt(c.getMiniGamePoints("losses", true));
    mplew.writeInt(2000);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 38 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method showOXQuiz.

public static byte[] showOXQuiz(int questionSet, int questionId, boolean askQuestion) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(6);
    mplew.writeShort(SendOpcode.OX_QUIZ.getValue());
    mplew.write(askQuestion ? 1 : 0);
    mplew.write(questionSet);
    mplew.writeShort(questionId);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 39 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method guildNotice.

public static byte[] guildNotice(int gid, String notice) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
    mplew.write(0x44);
    mplew.writeInt(gid);
    mplew.writeMapleAsciiString(notice);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 40 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method getOwlMessage.

// 0: Success
// 1: The room is already closed.
// 2: You can't enter the room due to full capacity.
// 3: Other requests are being fulfilled this minute.
// 4: You can't do it while you're dead.
// 7: You are not allowed to trade other items at this point.
// 17: You may not enter this store.
// 18: The owner of the store is currently undergoing store maintenance. Please try again in a bit.
// 23: This can only be used inside the Free Market.
// default: This character is unable to do it.
public static byte[] getOwlMessage(int msg) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
    mplew.writeShort(SendOpcode.SHOP_LINK_RESULT.getValue());
    // depending on the byte sent, a different message is sent.
    mplew.write(msg);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Aggregations

MaplePacketLittleEndianWriter (tools.data.output.MaplePacketLittleEndianWriter)431 Point (java.awt.Point)44 MaplePlayerShopItem (server.maps.MaplePlayerShopItem)15 Item (client.inventory.Item)11 SpecialCashItem (server.CashShop.SpecialCashItem)11 MapleShopItem (server.MapleShopItem)11 MapleMapItem (server.maps.MapleMapItem)11 CashItem (server.CashShop.CashItem)10 MapleCharacter (client.MapleCharacter)8 MapleBuffStat (client.MapleBuffStat)4 MaplePet (client.inventory.MaplePet)3 MTSItemInfo (server.MTSItemInfo)3 MapleDisease (client.MapleDisease)2 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 LinkedHashMap (java.util.LinkedHashMap)2 Channel (net.server.channel.Channel)2 MapleGuild (net.server.guild.MapleGuild)2 MapleMonster (server.life.MapleMonster)2 BuddylistEntry (client.BuddylistEntry)1