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


Java PartyPacket类代码示例

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


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

示例1: sendSpawnData

import tools.packet.CWvsContext.PartyPacket; //导入依赖的package包/类
@Override
public final void sendSpawnData(final MapleClient client) {
    if (getOwner() == null || target == null || client.getPlayer() == null) {
        return;
    }
    if (target.getId() == client.getPlayer().getMapId() || getOwnerId() == client.getPlayer().getId() || (getOwner() != null && getOwner().getParty() != null && client.getPlayer().getParty() != null && getOwner().getParty().getId() == client.getPlayer().getParty().getId())) {
        client.getSession().write(CField.spawnDoor(getOwnerId(), target.getId() == client.getPlayer().getMapId() ? targetPosition : townPortal.getPosition(), true)); //spawnDoor always has same position.
        if (getOwner() != null && getOwner().getParty() != null && client.getPlayer().getParty() != null && (getOwnerId() == client.getPlayer().getId() || getOwner().getParty().getId() == client.getPlayer().getParty().getId())) {
            client.getSession().write(PartyPacket.partyPortal(town.getId(), target.getId(), skillId, target.getId() == client.getPlayer().getMapId() ? targetPosition : townPortal.getPosition(), true));
        }
        client.getSession().write(CWvsContext.spawnPortal(town.getId(), target.getId(), skillId, target.getId() == client.getPlayer().getMapId() ? targetPosition : townPortal.getPosition()));
    }
}
 
开发者ID:ergothvs,项目名称:Lucid2.0,代码行数:14,代码来源:MapleDoor.java

示例2: sendDestroyData

import tools.packet.CWvsContext.PartyPacket; //导入依赖的package包/类
@Override
public final void sendDestroyData(final MapleClient client) {
    if (client.getPlayer() == null || getOwner() == null || target == null) {
        return;
    }
    if (target.getId() == client.getPlayer().getMapId() || getOwnerId() == client.getPlayer().getId() || (getOwner() != null && getOwner().getParty() != null && client.getPlayer().getParty() != null && getOwner().getParty().getId() == client.getPlayer().getParty().getId())) {
        client.getSession().write(CField.removeDoor(getOwnerId(), false));
        if (getOwner() != null && getOwner().getParty() != null && client.getPlayer().getParty() != null && (getOwnerId() == client.getPlayer().getId() || getOwner().getParty().getId() == client.getPlayer().getParty().getId())) {
            client.getSession().write(PartyPacket.partyPortal(999999999, 999999999, 0, new Point(-1, -1), false));
        }
        client.getSession().write(CWvsContext.spawnPortal(999999999, 999999999, 0, null));
    }
}
 
开发者ID:ergothvs,项目名称:Lucid2.0,代码行数:14,代码来源:MapleDoor.java


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