当前位置: 首页>>代码示例>>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;未经允许,请勿转载。