本文整理汇总了Java中handling.channel.handler.AttackInfo类的典型用法代码示例。如果您正苦于以下问题:Java AttackInfo类的具体用法?Java AttackInfo怎么用?Java AttackInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AttackInfo类属于handling.channel.handler包,在下文中一共展示了AttackInfo类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rangedAttack
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static byte[] rangedAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo) {
if (ServerProperties.ShowPacket()) {
FileoutputUtil.log(new StringBuilder().append("调用: ").append(new java.lang.Throwable().getStackTrace()[0]).toString());
}
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(SendPacketOpcode.RANGED_ATTACK.getValue());
addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, false, true);
if ((attackInfo.skillId >= 100000000) || attackInfo.skillId == 13121052) {
mplew.writeInt(attackInfo.position.x);
mplew.writeInt(attackInfo.position.y);
} else if (attackInfo.skillposition != null) {
mplew.writePos(attackInfo.skillposition);
}
return mplew.getPacket();
}
示例2: MesosBomb
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static byte[] MesosBomb(MapleCharacter chr,AttackInfo attack) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(SendPacketOpcode.CLOSE_RANGE_ATTACK.getValue());
mplew.writeInt(chr.getId());
mplew.write(attack.numAttackedAndDamage);
mplew.write(0x1E);//mode
mplew.writeInt(attack.skillId);
mplew.write(attack.stance);
mplew.write(attack.direction);
mplew.write(0);
mplew.writeInt(0);
for (AttackPair p : attack.allDamage) {
if (p.attack != null) {
mplew.writeInt(p.objectid);
mplew.write(0xFF);
mplew.write(p.attack.size());
for (Pair eachd : p.attack) {
mplew.writeInt((int)eachd.left);
}
}
}
return mplew.getPacket();
}
示例3: HandleOtherluminous
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public void HandleOtherluminous() {
for (MapleCharacter chr : map.getCharacters()) {
MapleStatEffect Sunfire = SkillFactory.getSkill(20040216).getEffect(getSkillLevel(20040216));
MapleStatEffect Eclipse = SkillFactory.getSkill(20040217).getEffect(getSkillLevel(20040217));
AttackInfo attack = null;
// Integer Gauge = getBuffedValue(CharacterTemporaryStat.LUMINOUS_GAUGE);
if (GameConstants.isLightSkills(attack.skillid)) {
Sunfire.applyTo(chr);
}
if (GameConstants.isDarkSkills(attack.skillid)) {
Eclipse.applyTo(chr);
}
}
}
示例4: HandleOtherluminous
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public void HandleOtherluminous() {
for (MapleCharacter chr : map.getCharacters()) {
MapleStatEffect Sunfire = SkillFactory.getSkill(20040216).getEffect(getSkillLevel(20040216));
MapleStatEffect Eclipse = SkillFactory.getSkill(20040217).getEffect(getSkillLevel(20040217));
AttackInfo attack = null;
// Integer Gauge = getBuffedValue(MapleBuffStat.LUMINOUS_GAUGE);
if (GameConstants.isLightSkills(attack.skillid)) {
Sunfire.applyTo(chr);
}
if (GameConstants.isDarkSkills(attack.skillid)) {
Eclipse.applyTo(chr);
}
}
}
示例5: closeRangeAttack
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static byte[] closeRangeAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo, boolean hasMoonBuff) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(SendPacketOpcode.CLOSE_RANGE_ATTACK.getValue());
addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, hasMoonBuff, false);
return mplew.getPacket();
}
示例6: passiveAttack
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static byte[] passiveAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo, boolean hasMoonBuff) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(SendPacketOpcode.PASSIVE_ATTACK.getValue());
addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, hasMoonBuff, false);
return mplew.getPacket();
}
示例7: magicAttack
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static byte[] magicAttack(MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(SendPacketOpcode.MAGIC_ATTACK.getValue());
addAttackBody(mplew, chr, skilllevel, itemId, attackInfo, false, false);
if (attackInfo.charge > 0) {
mplew.writeInt(attackInfo.charge);
}
return mplew.getPacket();
}
示例8: addAttackBody
import handling.channel.handler.AttackInfo; //导入依赖的package包/类
public static void addAttackBody(MaplePacketLittleEndianWriter mplew, MapleCharacter chr, int skilllevel, int itemId, AttackInfo attackInfo, boolean hasMoonBuff, boolean RangedAttack) {
int skillId = attackInfo.skillId;
mplew.writeInt(chr.getId());
mplew.write(attackInfo.numAttackedAndDamage);
if (skillId > 0) {
mplew.write(skilllevel);
mplew.writeInt(skillId);
} else {
mplew.write(0);
}
mplew.write(attackInfo.stance);
mplew.write(attackInfo.direction);
mplew.write(attackInfo.speed);
mplew.writeInt(itemId);
for (AttackPair oned : attackInfo.allDamage) {
if (oned.attack != null) {
mplew.writeInt(oned.objectid);
mplew.write(6);
for (Pair eachd : oned.attack) {
if (((Boolean) eachd.right)) {
mplew.writeInt(((Integer) eachd.left) + -2147483648);
} else {
mplew.writeInt(((Integer) eachd.left));
}
}
}
}
mplew.writeInt(chr.getOldPosition().x);
mplew.writeInt(chr.getOldPosition().y);
}