当前位置: 首页>>代码示例>>Java>>正文


Java AttackInfo类代码示例

本文整理汇总了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();
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:18,代码来源:MaplePacketCreator.java

示例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();
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:24,代码来源:SkillPacket.java

示例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);
        }   
    }
}
 
开发者ID:ergothvs,项目名称:Lucid2.0,代码行数:15,代码来源:MapleCharacter.java

示例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);
        }   
    }
}
 
开发者ID:Maxcloud,项目名称:Mushy,代码行数:15,代码来源:MapleCharacter.java

示例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();
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:9,代码来源:MaplePacketCreator.java

示例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();
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:9,代码来源:MaplePacketCreator.java

示例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();
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:12,代码来源:MaplePacketCreator.java

示例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);
}
 
开发者ID:icelemon1314,项目名称:mapleLemon,代码行数:31,代码来源:MaplePacketCreator.java


注:本文中的handling.channel.handler.AttackInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。