當前位置: 首頁>>代碼示例>>Java>>正文


Java MapleMiniGame類代碼示例

本文整理匯總了Java中server.stores.MapleMiniGame的典型用法代碼示例。如果您正苦於以下問題:Java MapleMiniGame類的具體用法?Java MapleMiniGame怎麽用?Java MapleMiniGame使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MapleMiniGame類屬於server.stores包,在下文中一共展示了MapleMiniGame類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMiniGameResult

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMiniGameResult(MapleMiniGame game, int type, int x) {
    PacketWriter pw = new PacketWriter();
    pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    pw.write(63);
    pw.write(type);
    game.setPoints(x, type);
    if (type != 0) {
        game.setPoints(x == 1 ? 0 : 1, type == 2 ? 0 : 1);
    }
    if (type != 1) {
        if (type == 0) {
            pw.write(x == 1 ? 0 : 1);
        } else {
            pw.write(x);
        }
    }
    addGameInfo(pw, game.getMCOwner(), game);
    for (Pair visitorz : game.getVisitors()) {
        addGameInfo(pw, (MapleCharacter) visitorz.right, game);
    }

    return pw.getPacket();

}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:25,代碼來源:PlayerShopPacket.java

示例2: getMiniGameResult

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMiniGameResult(MapleMiniGame game, int type, int x) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    mplew.write(GameConstants.GMS ? 63 : 60);
    mplew.write(type);
    game.setPoints(x, type);
    if (type != 0) {
        game.setPoints(x == 1 ? 0 : 1, type == 2 ? 0 : 1);
    }
    if (type != 1) {
        if (type == 0) {
            mplew.write(x == 1 ? 0 : 1);
        } else {
            mplew.write(x);
        }
    }
    addGameInfo(mplew, game.getMCOwner(), game);
    for (Pair visitorz : game.getVisitors()) {
        addGameInfo(mplew, (MapleCharacter) visitorz.right, game);
    }

    return mplew.getPacket();

}
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:25,代碼來源:PlayerShopPacket.java

示例3: getMiniGameNewVisitor

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMiniGameNewVisitor(MapleCharacter c, int slot, MapleMiniGame game) {
    PacketWriter pw = new PacketWriter();
    pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    pw.write(9);
    pw.write(slot);
    PacketHelper.addCharLook(pw, c, false, false);
    pw.writeMapleAsciiString(c.getName());
    pw.writeShort(c.getJob());
    addGameInfo(pw, c, game);
    return pw.getPacket();
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:12,代碼來源:PlayerShopPacket.java

示例4: addGameInfo

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static void addGameInfo(PacketWriter pw, MapleCharacter chr, MapleMiniGame game) {
    pw.writeInt(game.getGameType());
    pw.writeInt(game.getWins(chr));
    pw.writeInt(game.getTies(chr));
    pw.writeInt(game.getLosses(chr));
    pw.writeInt(game.getScore(chr));
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:8,代碼來源:PlayerShopPacket.java

示例5: getMatchCardStart

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMatchCardStart(MapleMiniGame game, int loser) {
    PacketWriter pw = new PacketWriter();
    pw.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    pw.write(62);
    pw.write(loser == 1 ? 0 : 1);
    int times = game.getPieceType() == 2 ? 30 : game.getPieceType() == 1 ? 20 : 12;
    pw.write(times);
    for (int i = 1; i <= times; i++) {
        pw.writeInt(game.getCardId(i));
    }
    return pw.getPacket();
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:13,代碼來源:PlayerShopPacket.java

示例6: getMiniGameNewVisitor

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMiniGameNewVisitor(MapleCharacter c, int slot, MapleMiniGame game) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    mplew.write(GameConstants.GMS ? 9 : 4);
    mplew.write(slot);
    PacketHelper.addCharLook(mplew, c, false, false);
    mplew.writeMapleAsciiString(c.getName());
    mplew.writeShort(c.getJob());
    addGameInfo(mplew, c, game);
    return mplew.getPacket();
}
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:12,代碼來源:PlayerShopPacket.java

示例7: addGameInfo

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static void addGameInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, MapleMiniGame game) {
    mplew.writeInt(game.getGameType());
    mplew.writeInt(game.getWins(chr));
    mplew.writeInt(game.getTies(chr));
    mplew.writeInt(game.getLosses(chr));
    mplew.writeInt(game.getScore(chr));
}
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:8,代碼來源:PlayerShopPacket.java

示例8: getMatchCardStart

import server.stores.MapleMiniGame; //導入依賴的package包/類
public static byte[] getMatchCardStart(MapleMiniGame game, int loser) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue());
    mplew.write(GameConstants.GMS ? 62 : 59);
    mplew.write(loser == 1 ? 0 : 1);
    int times = game.getPieceType() == 2 ? 30 : game.getPieceType() == 1 ? 20 : 12;
    mplew.write(times);
    for (int i = 1; i <= times; i++) {
        mplew.writeInt(game.getCardId(i));
    }
    return mplew.getPacket();
}
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:13,代碼來源:PlayerShopPacket.java


注:本文中的server.stores.MapleMiniGame類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。