• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java MapleMapObjectType类的典型用法和代码示例

java 6次浏览

本文整理汇总了Java中server.maps.MapleMapObjectType的典型用法代码示例。如果您正苦于以下问题:Java MapleMapObjectType类的具体用法?Java MapleMapObjectType怎么用?Java MapleMapObjectType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

MapleMapObjectType类属于server.maps包,在下文中一共展示了MapleMapObjectType类的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: applyPassive

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
/**
 * @param applyto
 * @param obj
 * @param attack damage done by the skill
 */
public void applyPassive(MapleCharacter applyto, MapleMapObject obj, int attack) {
    if (makeChanceResult()) {
        switch (sourceid) { // MP eater
            case FPWizard.MP_EATER:
            case ILWizard.MP_EATER:
            case Cleric.MP_EATER:
                if (obj == null || obj.getType() != MapleMapObjectType.MONSTER) {
                    return;
                }
                MapleMonster mob = (MapleMonster) obj; // x is absorb percentage
                if (!mob.isBoss()) {
                    int absorbMp = Math.min((int) (mob.getMaxMp() * (getX() / 100.0)), mob.getMp());
                    if (absorbMp > 0) {
                        mob.setMp(mob.getMp() - absorbMp);
                        applyto.addMP(absorbMp);
                        applyto.getClient().announce(MaplePacketCreator.showOwnBuffEffect(sourceid, 1));
                        applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.showBuffeffect(applyto.getId(), sourceid, 1), false);
                    }
                }
                break;
        }
    }
}
 

开发者ID:NovaStory,
项目名称:AeroStory,
代码行数:29,
代码来源:MapleStatEffect.java

示例2: applyMonsterBuff

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
private void applyMonsterBuff(MapleCharacter applyfrom) {
    Rectangle bounds = calculateBoundingBox(applyfrom.getPosition(), applyfrom.isFacingLeft());
    List<MapleMapObject> affected = applyfrom.getMap().getMapObjectsInRect(bounds, Arrays.asList(MapleMapObjectType.MONSTER));
    Skill skill_ = SkillFactory.getSkill(sourceid);
    int i = 0;
    for (MapleMapObject mo : affected) {
        MapleMonster monster = (MapleMonster) mo;
        if (makeChanceResult()) {
            monster.applyStatus(applyfrom, new MonsterStatusEffect(getMonsterStati(), skill_, null, false), isPoison(), getDuration());
        }
        i++;
        if (i >= mobCount) {
            break;
        }
    }
}
 

开发者ID:NovaStory,
项目名称:AeroStory,
代码行数:17,
代码来源:MapleStatEffect.java

示例3: handlePacket

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
    MapleCharacter chr = c.getPlayer();
    if (chr.getMap().getMapObjectsInRange(chr.getPosition(), 23000, Arrays.asList(MapleMapObjectType.HIRED_MERCHANT)).isEmpty() && chr.getMapId() > 910000000 && chr.getMapId() < 910000023) {
        if (!chr.hasMerchant()) {
            try {
                if (ItemFactory.MERCHANT.loadItems(chr.getId(), false).isEmpty() && chr.getMerchantMeso() == 0) {
                    c.announce(MaplePacketCreator.hiredMerchantBox());
                } else {
                    chr.announce(MaplePacketCreator.retrieveFirstMessage());
                }
            } catch (SQLException ex) {
            }
        } else {
            chr.dropMessage(1, "You already have a store open.");
        }
    } else {
        chr.dropMessage(1, "You cannot open your hired merchant here.");
    }
}
 

开发者ID:NovaStory,
项目名称:AeroStory,
代码行数:20,
代码来源:HiredMerchantRequest.java

示例4: MoveSummon

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public static final void MoveSummon(final LittleEndianAccessor slea, final MapleCharacter chr) {
    if (chr == null || chr.getMap() == null) {
        return;
    }
    final MapleMapObject obj = chr.getMap().getMapObject(slea.readInt(), MapleMapObjectType.SUMMON);
    if (obj == null) {
        return;
    }
    if (obj instanceof MapleDragon) {
        MoveDragon(slea, chr);
        return;
    }
    final MapleSummon sum = (MapleSummon) obj;
    if (sum.getOwnerId() != chr.getId() || sum.getSkillLevel() <= 0 || sum.getMovementType() == SummonMovementType.STATIONARY) {
        return;
    }
    slea.skip(12); //startPOS
    final List<LifeMovementFragment> res = MovementParse.parseMovement(slea, 4);

    final Point pos = sum.getPosition();
    MovementParse.updatePosition(res, sum, 0);
    if (res.size() > 0) {
        chr.getMap().broadcastMessage(chr, SummonPacket.moveSummon(chr.getId(), sum.getObjectId(), pos, res), sum.getTruePosition());
    }
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:26,
代码来源:SummonHandler.java

示例5: RemoveSummon

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public static final void RemoveSummon(final LittleEndianAccessor slea, final MapleClient c) {
    final MapleMapObject obj = c.getPlayer().getMap().getMapObject(slea.readInt(), MapleMapObjectType.SUMMON);
    if (obj == null || !(obj instanceof MapleSummon)) {
        return;
    }
    final MapleSummon summon = (MapleSummon) obj;
    if (summon.getOwnerId() != c.getPlayer().getId() || summon.getSkillLevel() <= 0) {
        c.getPlayer().dropMessage(5, "Error.");
        return;
    }
    if (summon.getSkill() == 35111002 || summon.getSkill() == 35121010) { //rock n shock, amp
        return;
    }
    c.getPlayer().getMap().broadcastMessage(SummonPacket.removeSummon(summon, true));
    c.getPlayer().getMap().removeMapObject(summon);
    c.getPlayer().removeVisibleMapObject(summon);
    c.getPlayer().removeSummon(summon);
    if (summon.getSkill() != 35121011) {
        c.getPlayer().cancelEffectFromBuffStat(CharacterTemporaryStat.SUMMON);
        //TODO: Multi Summoning, must do something about hack buffstat
    }
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:23,
代码来源:SummonHandler.java

示例6: applyPassive

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
/**
 * @param applyto
 * @param obj
 */
public final void applyPassive(final MapleCharacter applyto, final MapleMapObject obj) {
    if (makeChanceResult() && !GameConstants.isDemonSlayer(applyto.getJob())) { // demon can't heal mp
        switch (sourceid) { // MP eater
            case 2100000:
            case 2200000:
            case 2300000:
                if (obj == null || obj.getType() != MapleMapObjectType.MONSTER) {
                    return;
                }
                final MapleMonster mob = (MapleMonster) obj; // x is absorb percentage
                if (!mob.getStats().isBoss()) {
                    final int absorbMp = Math.min((int) (mob.getMobMaxMp() * (getX() / 100.0)), mob.getMp());
                    if (absorbMp > 0) {
                        mob.setMp(mob.getMp() - absorbMp);
                        applyto.getStat().setMp(applyto.getStat().getMp() + absorbMp, applyto);
                        applyto.getClient().getSession().write(EffectPacket.showOwnBuffEffect(sourceid, 1, applyto.getLevel(), level));
                        applyto.getMap().broadcastMessage(applyto, EffectPacket.showBuffeffect(applyto.getId(), sourceid, 1, applyto.getLevel(), level), false);
                    }
                }
                break;
        }
    }
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:28,
代码来源:MapleStatEffect.java

示例7: RemoveSummon

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public static final void RemoveSummon(final LittleEndianAccessor slea, final MapleClient c) {
    final MapleMapObject obj = c.getPlayer().getMap().getMapObject(slea.readInt(), MapleMapObjectType.SUMMON);
    if (obj == null || !(obj instanceof MapleSummon)) {
        return;
    }
    final MapleSummon summon = (MapleSummon) obj;
    if (summon.getOwnerId() != c.getPlayer().getId() || summon.getSkillLevel() <= 0) {
        c.getPlayer().dropMessage(5, "Error.");
        return;
    }
    if (summon.getSkill() == 35111002 || summon.getSkill() == 35121010) { //rock n shock, amp
        return;
    }
    c.getPlayer().getMap().broadcastMessage(SummonPacket.removeSummon(summon, true));
    c.getPlayer().getMap().removeMapObject(summon);
    c.getPlayer().removeVisibleMapObject(summon);
    c.getPlayer().removeSummon(summon);
    if (summon.getSkill() != 35121011) {
        c.getPlayer().cancelEffectFromBuffStat(MapleBuffStat.SUMMON);
        //TODO: Multi Summoning, must do something about hack buffstat
    }
}
 

开发者ID:Maxcloud,
项目名称:Mushy,
代码行数:23,
代码来源:SummonHandler.java

示例8: execute

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMap map = c.getPlayer().getMap();
    double range = Double.POSITIVE_INFINITY;

    if (splitted.length > 1) {
        int irange = Integer.parseInt(splitted[1]);
        if (splitted.length <= 2) {
            range = irange * irange;
        } else {
            map = c.getChannelServer().getMapFactory().getMap(Integer.parseInt(splitted[2]));
        }
    }
    if (map == null) {
        c.getPlayer().dropMessage(6, "Map does not exist");
        return 0;
    }
    MapleMonster mob;
    for (MapleMapObject monstermo : map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays.asList(MapleMapObjectType.MONSTER))) {
        mob = (MapleMonster) monstermo;
        if (!mob.getStats().isBoss() || mob.getStats().isPartyBonus() || c.getPlayer().isGM()) {
            map.killMonster(mob, c.getPlayer(), false, false, (byte) 1);
        }
    }
    return 1;
}
 

开发者ID:Maxcloud,
项目名称:Mushy,
代码行数:27,
代码来源:GMCommand.java

示例9: execute

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMap map = c.getPlayer().getMap();
    double range = Double.POSITIVE_INFINITY;
    if (splitted.length > 1) {
        int irange = Integer.parseInt(splitted[1]);
        if (splitted.length <= 2) {
            range = irange * irange;
        } else {
            map = c.getChannelServer().getMapFactory().getMap(Integer.parseInt(splitted[2]));
        }
    }
    if (map == null) {
        c.getPlayer().dropMessage(6, "Map does not exist");
        return 0;
    }
    int damage = Integer.parseInt(splitted[1]);
    MapleMonster mob;
    for (MapleMapObject monstermo : map.getMapObjectsInRange(c.getPlayer().getPosition(), range, Arrays.asList(MapleMapObjectType.MONSTER))) {
        mob = (MapleMonster) monstermo;
        map.broadcastMessage(MobPacket.damageMonster(mob.getObjectId(), damage));
        mob.damage(c.getPlayer(), damage, false);
    }
    return 1;
}
 

开发者ID:Maxcloud,
项目名称:Mushy,
代码行数:26,
代码来源:SuperGMCommand.java

示例10: execute

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMap map = c.getPlayer().getMap();
    List<MapleMapObject> players = map.getMapObjectsInRange(c.getPlayer().getPosition(), 25000, Arrays.asList(MapleMapObjectType.PLAYER));
    for (MapleMapObject closeplayers : players) {
        MapleCharacter playernear = (MapleCharacter) closeplayers;
        if (playernear.isAlive() && playernear != c.getPlayer() && playernear.getGMLevel() < c.getPlayer().getGMLevel()) {
            playernear.getStat().setHp((short) 0);
            playernear.getStat().setMp((short) 0);
            playernear.updateSingleStat(MapleStat.HP, playernear.getStat().getHp());
            playernear.updateSingleStat(MapleStat.MP, playernear.getStat().getMp());
            playernear.dropMessage(5, "你太靠近管理员了");
        }
    }
    return 1;
}
 

开发者ID:icelemon1314,
项目名称:mapleLemon,
代码行数:17,
代码来源:InternCommand.java

示例11: applyPassive

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public void applyPassive(MapleCharacter applyto, MapleMapObject obj) {
    if (makeChanceResult()) {
        switch (this.sourceid) {
            case 2100000:
            case 2200000:
            case 2300000:
                if ((obj == null) || (obj.getType() != MapleMapObjectType.MONSTER)) {
                    return;
                }
                MapleMonster mob = (MapleMonster) obj;
                if (mob.getStats().isBoss()) {
                    break;
                }
                int absorbMp = Math.min((int) (mob.getMobMaxMp() * (getX() / 100.0D)), mob.getMp());
                if (absorbMp <= 0) {
                    break;
                }
                mob.setMp(mob.getMp() - absorbMp);
                applyto.getStat().setMp(applyto.getStat().getMp() + absorbMp);
                applyto.getClient().getSession().write(MaplePacketCreator.showOwnBuffEffect(this.sourceid, 1, applyto.getLevel(), this.level));
                applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.showBuffeffect(applyto, this.sourceid, 1, applyto.getLevel(), this.level), false);
        }
    }
}
 

开发者ID:icelemon1314,
项目名称:mapleLemon,
代码行数:25,
代码来源:MapleStatEffect.java

示例12: applyMonsterBuff

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
/**
 * 给怪物加BUFF
 * @param applyfrom
 */
public void applyMonsterBuff(MapleCharacter applyfrom) {
    Rectangle bounds = calculateBoundingBox(applyfrom.getTruePosition(), applyfrom.isFacingLeft());
    MapleMapObjectType types = MapleMapObjectType.MONSTER;
    List<MapleMapObject> affected = applyfrom.getMap().getMapObjectsInRect(bounds, Arrays.asList(new MapleMapObjectType[]{types}));
    int i = 0;
    for (MapleMapObject mo : affected) {
        if (makeChanceResult()) {
            for (Map.Entry stat : getMonsterStati().entrySet()) {
                MapleMonster mons = (MapleMonster) mo;
                mons.applyStatus(applyfrom, new MonsterStatusEffect((MonsterStatus) stat.getKey(), (Integer) stat.getValue(), this.sourceid, null, false), isPoison(), getDuration(), true, this);
            }
        }
        i++;
        if ((i >= (this.info.get(MapleStatInfo.mobCount))) && (this.sourceid != 35111005)) {
            break;
        }
    }
}
 

开发者ID:icelemon1314,
项目名称:mapleLemon,
代码行数:23,
代码来源:MapleStatEffect.java

示例13: MoveSummon

点赞 3

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public static final void MoveSummon(final LittleEndianAccessor slea, final MapleCharacter chr) {
    if (chr == null || chr.getMap() == null) {
        return;
    }
    final MapleMapObject obj = chr.getMap().getMapObject(slea.readInt(), MapleMapObjectType.SUMMON);
    if (obj == null) {
        return;
    }
    if (obj instanceof MapleDragon) {
        MoveDragon(slea, chr);
        return;
    }
    final MapleSummon sum = (MapleSummon) obj;
    if (sum.getOwnerId() != chr.getId() || sum.getSkillLevel() <= 0 || sum.getMovementType() == SummonMovementType.STATIONARY) {
        return;
    }
    slea.skip(16); //startPOS
    final List<LifeMovementFragment> res = MovementParse.parseMovement(slea, 4);

    final Point pos = sum.getPosition();
    MovementParse.updatePosition(res, sum, 0);
    if (res.size() > 0) {
        chr.getMap().broadcastMessage(chr, SummonPacket.moveSummon(chr.getId(), sum.getObjectId(), pos, res), sum.getTruePosition());
    }
}
 

开发者ID:skorch37,
项目名称:Asteria,
代码行数:26,
代码来源:SummonHandler.java

示例14: resetMap

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public void resetMap(int mapid) {
    getMap(mapid).resetReactors();
    getMap(mapid).killAllMonsters();
    for (MapleMapObject i : getMap(mapid).getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM))) {
        getMap(mapid).removeMapObject(i);
        getMap(mapid).broadcastMessage(MaplePacketCreator.removeItemFromMap(i.getObjectId(), 0, c.getPlayer().getId()));
    }
}
 

开发者ID:NovaStory,
项目名称:AeroStory,
代码行数:9,
代码来源:AbstractPlayerInteraction.java

示例15: canUseSkill

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public boolean canUseSkill(MobSkill toUse) {
    if (toUse == null) {
        return false;
    }
    for (Pair<Integer, Integer> skill : usedSkills) {
        if (skill.getLeft() == toUse.getSkillId() && skill.getRight() == toUse.getSkillLevel()) {
            return false;
        }
    }
    if (toUse.getLimit() > 0) {
        if (this.skillsUsed.containsKey(new Pair<>(toUse.getSkillId(), toUse.getSkillLevel()))) {
            int times = this.skillsUsed.get(new Pair<>(toUse.getSkillId(), toUse.getSkillLevel()));
            if (times >= toUse.getLimit()) {
                return false;
            }
        }
    }
    if (toUse.getSkillId() == 200) {
        Collection<MapleMapObject> mmo = getMap().getMapObjects();
        int i = 0;
        for (MapleMapObject mo : mmo) {
            if (mo.getType() == MapleMapObjectType.MONSTER) {
                i++;
            }
        }
        if (i > 100) {
            return false;
        }
    }
    return true;
}
 

开发者ID:NovaStory,
项目名称:AeroStory,
代码行数:32,
代码来源:MapleMonster.java

示例16: execute

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMap map = c.getPlayer().getMap();
    List<MapleMapObject> players = map.getMapObjectsInRange(c.getPlayer().getPosition(), (double) 25000, Arrays.asList(MapleMapObjectType.PLAYER));
    for (MapleMapObject closeplayers : players) {
        MapleCharacter playernear = (MapleCharacter) closeplayers;
        if (playernear.isAlive() && playernear != c.getPlayer() && playernear.getJob() != 910) {
            playernear.setHp(0);
            playernear.updateSingleStat(MapleStat.HP, 0);
            playernear.dropMessage(5, "You were too close to the MapleGM.");
        }
    }
    return 1;
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:15,
代码来源:GMCommand.java

示例17: execute

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMap map = c.getPlayer().getMap();
    List<MapleMapObject> reactors = map.getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.REACTOR));
    if (splitted[1].equals("all")) {
        for (MapleMapObject reactorL : reactors) {
            MapleReactor reactor2l = (MapleReactor) reactorL;
            c.getPlayer().getMap().destroyReactor(reactor2l.getObjectId());
        }
    } else {
        c.getPlayer().getMap().destroyReactor(Integer.parseInt(splitted[1]));
    }
    return 1;
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:15,
代码来源:SuperGMCommand.java

示例18: removeMonsterBuff

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
private void removeMonsterBuff(final MapleCharacter applyfrom) {
    List<MonsterStatus> cancel = new ArrayList<>();
    switch (sourceid) {
        case 1111007:
        case 51111005: //Mihile's magic crash
        case 1211009:
        case 1311007:
            cancel.add(MonsterStatus.WEAPON_DEFENSE_UP);
            cancel.add(MonsterStatus.MAGIC_DEFENSE_UP);
            cancel.add(MonsterStatus.WEAPON_ATTACK_UP);
            cancel.add(MonsterStatus.MAGIC_ATTACK_UP);
            break;
        default:
            return;
    }
    final Rectangle bounds = calculateBoundingBox(applyfrom.getTruePosition(), applyfrom.isFacingLeft());
    final List<MapleMapObject> affected = applyfrom.getMap().getMapObjectsInRect(bounds, Arrays.asList(MapleMapObjectType.MONSTER));
    int i = 0;

    for (final MapleMapObject mo : affected) {
        if (makeChanceResult()) {
            for (MonsterStatus stat : cancel) {
                ((MapleMonster) mo).cancelStatus(stat);
            }
        }
        i++;
        if (i >= info.get(MapleStatInfo.mobCount)) {
            break;
        }
    }
}
 

开发者ID:ergothvs,
项目名称:Lucid2.0,
代码行数:32,
代码来源:MapleStatEffect.java

示例19: execute

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
	MapleMonster mob = null;
	for (final MapleMapObject monstermo : c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), 100000, Arrays.asList(MapleMapObjectType.MONSTER))) {
		mob = (MapleMonster) monstermo;
		if (mob.isAlive()) {
			c.getPlayer().dropMessage(6, "Monster " + mob.toString());
			break; //only one
		}
	}
	if (mob == null) {
		c.getPlayer().dropMessage(6, "No monster was found.");
	}
	return 1;
}
 

开发者ID:Maxcloud,
项目名称:Mushy,
代码行数:16,
代码来源:PlayerCommand.java

示例20: handleAssassinStack

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
public void handleAssassinStack(MapleMonster mob, int visProjectile) {
    Skill skill_2 = SkillFactory.getSkill(4100011);
    Skill skill_4 = SkillFactory.getSkill(4120018);
    MapleStatEffect effect;
    boolean isAssassin;
    if (getSkillLevel(skill_4) > 0) {
        isAssassin = false;
        effect = skill_4.getEffect(getTotalSkillLevel(skill_4));
    } else {
        if (getSkillLevel(skill_2) > 0) {
            isAssassin = true;
            effect = skill_2.getEffect(getTotalSkillLevel(skill_2));
        } else {
            return;
        }
    }
    if ((effect != null) && (effect.makeChanceResult()) && (mob != null)) {
        int mobCount = effect.getMobCount();
        Rectangle bounds = effect.calculateBoundingBox(mob.getTruePosition(), mob.isFacingLeft());
        List<MapleMapObject> affected = this.map.getMapObjectsInRect(bounds, Arrays.asList(new MapleMapObjectType[]{MapleMapObjectType.MONSTER}));
        List moboids = new ArrayList();
        for (MapleMapObject mo : affected) {
            if ((moboids.size() < mobCount) && (mo.getObjectId() != mob.getObjectId())) {
                moboids.add(mo.getObjectId());
            }
        }
        mob.setmark(false);
        this.forceCounter += 1;
        send_other(SkillPacket.gainAssassinStack(getId(), mob.getObjectId(), this.forceCounter, isAssassin, moboids, visProjectile, mob.getTruePosition()), true);
        this.forceCounter += moboids.size();
    }
}
 

开发者ID:icelemon1314,
项目名称:mapleLemon,
代码行数:33,
代码来源:MapleCharacter.java

示例21: removeMonsterBuff

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
private void removeMonsterBuff(MapleCharacter applyfrom) {
        List<MonsterStatus> cancel = new ArrayList();
        switch (this.sourceid) {
            case 1121016://魔击无效
            case 1221014:
            case 1321014:
            case 1211009:
            case 1111007:
            case 1311007:
//                cancel.add(MonsterStatus.物防提升);
//                cancel.add(MonsterStatus.魔防提升);
//                cancel.add(MonsterStatus.物攻提升);
//                cancel.add(MonsterStatus.魔攻提升);
                break;
            default:
                return;
        }
        Rectangle bounds = calculateBoundingBox(applyfrom.getTruePosition(), applyfrom.isFacingLeft());
        List<MapleMapObject> affected = applyfrom.getMap().getMapObjectsInRect(bounds, Arrays.asList(new MapleMapObjectType[]{MapleMapObjectType.MONSTER}));
        int i = 0;
        for (MapleMapObject mo : affected) {
            if (makeChanceResult()) {
                for (MonsterStatus stat : cancel) {
                    ((MapleMonster) mo).cancelStatus(stat);
                }
            }
            i++;
            if (i >= (this.info.get(MapleStatInfo.mobCount))) {
                break;
            }
        }
    }
 

开发者ID:icelemon1314,
项目名称:mapleLemon,
代码行数:33,
代码来源:MapleStatEffect.java

示例22: execute

点赞 2

import server.maps.MapleMapObjectType; //导入依赖的package包/类
@Override
public int execute(MapleClient c, String[] splitted) {
    MapleMonster mob = null;
    for (final MapleMapObject monstermo : c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), 100000, Arrays.asList(MapleMapObjectType.MONSTER))) {
        mob = (MapleMonster) monstermo;
        if (mob.isAlive()) {
            c.getPlayer().dropMessage(6, "Monster " + mob.toString());
            break; //only one
        }
    }
    if (mob == null) {
        c.getPlayer().dropMessage(6, "No monster was found.");
    }
    return 1;
}
 

开发者ID:skorch37,
项目名称:Asteria,
代码行数:16,
代码来源:PlayerCommand.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)