本文整理汇总了Java中tools.packet.JobPacket.LuminousPacket类的典型用法代码示例。如果您正苦于以下问题:Java LuminousPacket类的具体用法?Java LuminousPacket怎么用?Java LuminousPacket使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LuminousPacket类属于tools.packet.JobPacket包,在下文中一共展示了LuminousPacket类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleLuminous
import tools.packet.JobPacket.LuminousPacket; //导入依赖的package包/类
public void handleLuminous(int skillid) {
int[] lightSkills = new int[]{27001100, 27101100, 27101101, 27111100, 27111101, 27121100};
int[] darkSkills = new int[]{27001201, 27101202, 27111202, 27121201, 27121202, 27120211};
boolean found = false;
for (int light : lightSkills) {
if (skillid == light) {
runningLightSlot += Randomizer.nextInt(200) + 100;
if (runningLightSlot > 10000) {
runningLightSlot = 0;
runningLight += 1;
if (runningLight > 5) {
runningLight = 5;
}
}
found = true;
}
}
for (int dark : darkSkills) {
if (skillid == dark) {
runningDarkSlot += Randomizer.nextInt(200) + 100;
if (runningDarkSlot > 10000) {
runningDarkSlot = 0;
runningDark += 1;
if (runningDark > 5) {
runningDark = 5;
}
}
found = true;
}
}
if (!found) {
return;
}
client.getSession().write(LuminousPacket.updateLuminousGauge(runningDarkSlot, runningLightSlot, runningDark, runningLight));
}
示例2: changeLuminousMode
import tools.packet.JobPacket.LuminousPacket; //导入依赖的package包/类
public void changeLuminousMode(final int skillid) {
final boolean equilibrium = skillid == 20040220;
final boolean eclipse = skillid == 20040217;
final boolean sunfire = skillid == 20040216;
final MapleCharacter chr = this;
if (equilibrium || (!eclipse && !sunfire)) {
return; //impossible
}
dispelBuff(skillid);
luminousState = skillid;
if (sunfire) {
runningLight--;
} else if (eclipse) {
runningDark--;
}
client.getSession().write(LuminousPacket.updateLuminousGauge(runningDarkSlot, runningLightSlot, runningDark, runningLight));
luminousState = 20040200;
client.getSession().write(LuminousPacket.giveLuminousState(20040220, chr.getLightGauge(), chr.getDarkGauge(), 0));
SkillFactory.getSkill(20040220).getEffect(1).applyTo(this);
equipChanged();
WorldTimer.getInstance().schedule(new Runnable() {
@Override
public void run() {
dispelBuff(20040220);
client.getSession().write(LuminousPacket.giveLuminousState(skillid, chr.getLightGauge(), chr.getDarkGauge(), 0));
SkillFactory.getSkill(skillid).getEffect(1).applyTo(chr);
}
}, 10000);
}
示例3: run
import tools.packet.JobPacket.LuminousPacket; //导入依赖的package包/类
@Override
public void run() {
dispelBuff(20040220);
//World.Broadcast.broadcastMessage(CField.getGameMessage("Dinosur2.", (short) 8));
chr.getClient().getSession().write(LuminousPacket.giveLuminousState(20040216, chr.getLightGauge(), chr.getDarkGauge(), 2000000000));
}