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

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

java 2次浏览

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

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

示例1: MaplePartyCharacter

点赞 3

import server.maps.MapleDoor; //导入依赖的package包/类
public MaplePartyCharacter(MapleCharacter maplechar) {
    this.name = maplechar.getName();
    this.level = maplechar.getLevel();
    this.channel = maplechar.getClient().getChannel();
    this.id = maplechar.getId();
    this.jobid = maplechar.getJob();
    this.mapid = maplechar.getMapId();
    this.online = true;

    final List<MapleDoor> doors = maplechar.getDoors();
    if (doors.size() > 0) {
        final MapleDoor door = doors.get(0);

        this.doorTown = door.getTown().getId();
        this.doorTarget = door.getTarget().getId();
        this.doorSkill = door.getSkill();
        this.doorPosition = door.getTargetPosition();
    } else {
        this.doorPosition = maplechar.getPosition();
    }
}
 

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

示例2: MaplePartyCharacter

点赞 3

import server.maps.MapleDoor; //导入依赖的package包/类
public MaplePartyCharacter(MapleCharacter maplechar) {
    name = maplechar.getName();
    level = maplechar.getLevel();
    channel = maplechar.getClient().getChannel();
    id = maplechar.getId();
    jobid = maplechar.getJob();
    mapid = maplechar.getMapId();
    online = true;
    chr = maplechar;

    List doors = maplechar.getDoors();
    if (doors.size() > 0) {
        MapleDoor door = (MapleDoor) doors.get(0);
        doorTown = door.getTown().getId();
        doorTarget = door.getTarget().getId();
        doorSkill = door.getSkill();
        doorPosition = door.getTargetPosition();
    } else {
        doorPosition = maplechar.getPosition();
    }
}
 

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

示例3: handlePacket

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
    int oid = slea.readInt();
    boolean mode = (slea.readByte() == 0); // specifies if backwarp or not, 1 town to target, 0 target to town
    for (MapleMapObject obj : c.getPlayer().getMap().getMapObjects()) {
        if (obj instanceof MapleDoor) {
            MapleDoor door = (MapleDoor) obj;
            if (door.getOwner().getId() == oid) {
                door.warp(c.getPlayer(), mode);
                return;
            }
        }
    }
}
 

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

示例4: UseDoor

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public static void UseDoor(final LittleEndianAccessor slea, final MapleCharacter chr) {
    final int oid = slea.readInt();
    final boolean mode = slea.readByte() == 0; // specifies if backwarp or not, 1 town to target, 0 target to town

    for (MapleMapObject obj : chr.getMap().getAllDoor()) {
        final MapleDoor door = (MapleDoor) obj;
        if (door.getOwnerId() == oid) {
            door.warp(chr, mode);
            break;
        }
    }
}
 

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

示例5: UseDoor

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
/**
 * 通过传送门
 * @param slea
 * @param chr
 */
public static void UseDoor(SeekableLittleEndianAccessor slea, MapleCharacter chr) {
    // 49 08 00 00 00 00
    int oid = slea.readInt();
    boolean mode = slea.readByte() == 0;
    for (MapleMapObject obj : chr.getMap().getAllDoorsThreadsafe()) {
        MapleDoor door = (MapleDoor) obj;
        if (door.getOwnerId() == oid) {
            door.warp(chr, mode);
            break;
        }
    }
    chr.getClient().getSession().write(MaplePacketCreator.enableActions());
}
 

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

示例6: UseDoor

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public static void UseDoor(final LittleEndianAccessor slea, final MapleCharacter chr) {
    final int oid = slea.readInt();
    final boolean mode = slea.readByte() == 0; // specifies if backwarp or not, 1 town to target, 0 target to town

    for (MapleMapObject obj : chr.getMap().getAllDoorsThreadsafe()) {
        final MapleDoor door = (MapleDoor) obj;
        if (door.getOwnerId() == oid) {
            door.warp(chr, mode);
            break;
        }
    }
}
 

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

示例7: addDoor

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public void addDoor(MapleDoor door) {
    doors.add(door);
}
 

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

示例8: getDoors

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public List<MapleDoor> getDoors() {
    return new ArrayList<>(doors);
}
 

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

示例9: addDoor

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public void addDoor(MapleDoor door) {
    this.doors.add(door);
}
 

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

示例10: getDoors

点赞 2

import server.maps.MapleDoor; //导入依赖的package包/类
public List<MapleDoor> getDoors() {
    return new ArrayList(this.doors);
}
 

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


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