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


Java JobPacket類代碼示例

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


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

示例1: setHp

import tools.packet.JobPacket; //導入依賴的package包/類
public final boolean setHp(int newhp, boolean silent, MapleCharacter chra) {
    final int oldHp = hp;
    int thp = newhp;
    if (thp < 0) {
        thp = 0;
    }
    if (thp > localmaxhp) {
        thp = localmaxhp;
    }
    this.hp = thp;

    if (chra != null) {
        if (!silent) {
            chra.checkBerserk();
            chra.updatePartyMemberHP();
        }
        if (oldHp > hp && !chra.isAlive()) {
            chra.playerDead();
        }
    }
    if (GameConstants.isDemonAvenger(chra.getJob())) {
        chra.getClient().getSession().write(JobPacket.AvengerPacket.giveAvengerHpBuff(hp));
    }
    return hp != oldHp;
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:26,代碼來源:PlayerStats.java

示例2: DressUpTime

import tools.packet.JobPacket; //導入依賴的package包/類
public static void DressUpTime(LittleEndianAccessor slea, final MapleClient c) {
	byte type = slea.readByte();
	// System.out.println("abtype " + type);
	if (type == 1) {
		// PlayerHandler.AngelicChange(slea, c, chr);
		if (GameConstants.isAngelicBuster(c.getPlayer().getJob())) {
			c.getSession().write(JobPacket.AngelicPacket.DressUpTime(type));
			c.getSession().write(JobPacket.AngelicPacket.updateDress(5010094, c.getPlayer()));
			// }
		} else {
			c.getSession().write(CWvsContext.enableActions());
			// return;
		}
	}
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:16,代碼來源:PlayerHandler.java

示例3: absorbingDF

import tools.packet.JobPacket; //導入依賴的package包/類
public static void absorbingDF(LittleEndianAccessor slea, final MapleClient c) {
	int size = slea.readInt();
	int room = 0;
	byte unk = 0;
	int sn;
	for (int i = 0; i < size; i++) {
		room = GameConstants.isDemonAvenger(c.getPlayer().getJob()) || c.getPlayer().getJob() == 212 ? 0
				: slea.readInt();
		unk = slea.readByte();
		sn = slea.readInt();
		if (GameConstants.isDemonSlayer(c.getPlayer().getJob())) {
			// c.getPlayer().addMP(c.getPlayer().getStat().getForce(room));
		}
		if (GameConstants.isAngelicBuster(c.getPlayer().getJob())) {
			boolean rand = Randomizer.isSuccess(80);
			if (sn > 0) {
				if (rand) {
					c.getSession().write(JobPacket.AngelicPacket.SoulSeekerRegen(c.getPlayer(), sn));
				}
			}
		}
		if ((GameConstants.isDemonAvenger(c.getPlayer().getJob())) && slea.available() >= 8) {
			// c.getPlayer().getMap().broadcastMessage(MainPacketCreator.ShieldChacingRe(c.getPlayer().getId(),
			// slea.readInt(), slea.readInt(), unk,
			// c.getPlayer().getKeyValue2("schacing")));
		}
		if (c.getPlayer().getJob() == 212) {
			// c.getPlayer().getMap().broadcastMessage(MainPacketCreator.MegidoFlameRe(c.getPlayer().getId(),
			// unk, slea.readInt()));
		}
	}
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:33,代碼來源:PlayerHandler.java

示例4: DressUpRequest

import tools.packet.JobPacket; //導入依賴的package包/類
public static void DressUpRequest(final MapleCharacter chr, LittleEndianAccessor slea) {
    int code = slea.readInt();
    switch (code) {
        case 5010093:
            chr.getClient().getSession().write(JobPacket.AngelicPacket.updateDress(code, chr));
            chr.getClient().getSession().write(CField.updateCharLook(chr, true));
            break;
        case 5010094:
            chr.getClient().getSession().write(JobPacket.AngelicPacket.updateDress(code, chr));
            chr.getClient().getSession().write(CField.updateCharLook(chr, true));
            break;
    }
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:14,代碼來源:PlayersHandler.java

示例5: DressUpTime

import tools.packet.JobPacket; //導入依賴的package包/類
public static void DressUpTime(LittleEndianAccessor slea, final MapleClient c) {
        byte type = slea.readByte();
//        System.out.println("abtype " + type);
        if (type == 1) {
//            PlayerHandler.AngelicChange(slea, c, chr);
            if (GameConstants.isAngelicBuster(c.getPlayer().getJob())) {
                c.getSession().write(JobPacket.AngelicPacket.DressUpTime(type));
                c.getSession().write(JobPacket.AngelicPacket.updateDress(5010094, c.getPlayer()));
//        }
            } else {
                c.getSession().write(CWvsContext.enableActions());
//            return;
            }
        }
    }
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:16,代碼來源:PlayerHandler.java

示例6: absorbingDF

import tools.packet.JobPacket; //導入依賴的package包/類
public static void absorbingDF(LittleEndianAccessor slea, final MapleClient c) {
        int size = slea.readInt();
        int room = 0;
        byte unk = 0;
        int sn;
        for (int i = 0; i < size; i++) {
            room = GameConstants.isDemonAvenger(c.getPlayer().getJob()) || c.getPlayer().getJob() == 212 ? 0 : slea.readInt();
            unk = slea.readByte();
            sn = slea.readInt();
            if (GameConstants.isDemonSlayer(c.getPlayer().getJob())) {
//                c.getPlayer().addMP(c.getPlayer().getStat().getForce(room));
            }
            if (GameConstants.isAngelicBuster(c.getPlayer().getJob())) {
                boolean rand = Randomizer.isSuccess(80);
                if (sn > 0) {
                    if (rand) {
                        c.getSession().write(JobPacket.AngelicPacket.SoulSeekerRegen(c.getPlayer(), sn));
                    }
                }
            }
            if ((GameConstants.isDemonAvenger(c.getPlayer().getJob())) && slea.available() >= 8) {
//                c.getPlayer().getMap().broadcastMessage(MainPacketCreator.ShieldChacingRe(c.getPlayer().getId(), slea.readInt(), slea.readInt(), unk, c.getPlayer().getKeyValue2("schacing")));
            }
            if (c.getPlayer().getJob() == 212) {
//                c.getPlayer().getMap().broadcastMessage(MainPacketCreator.MegidoFlameRe(c.getPlayer().getId(), unk, slea.readInt()));
            }
        }
    }
 
開發者ID:skorch37,項目名稱:Asteria,代碼行數:29,代碼來源:PlayerHandler.java


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