當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。