本文整理汇总了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()));
}
}
示例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));
}
}