Код:
private void teleportToCharacter(L2Player activeChar, L2Object target)
{
if(target == null)
{
return;
}
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
activeChar.teleToLocation(target.getLoc().changeZ(25), target.getReflection().getId());
activeChar.sendMessage("You have teleported to " + target);
}
Он наверно за это
Весь трейс идёт до:
Код:
public void teleToLocation(int x, int y, int z, long ref)
{
if(isFakeDeath())
{
breakFakeDeath();
}
if(isTeleporting() || inObserverMode())
{
return;
}
abortCast(true);
if(isPlayable())
{
clearHateList(true);
}
if(!isVehicle() && !isFlying() && !L2World.isWater(new Location(x, y, z)))
{
z = GeoEngine.getHeight(x, y, z, getReflection().getGeoIndex());
}
if(isPlayer() && DimensionalRiftManager.getInstance().checkIfInRiftZone(getLoc(), true))
{
L2Player player = (L2Player) this;
if(player.isInParty() && player.getParty().isInDimensionalRift())
{
Location newCoords = DimensionalRiftManager.getInstance().getRoom(0, 0).getTeleportCoords();
x = newCoords.x;
y = newCoords.y;
z = newCoords.z;
player.getParty().getDimensionalRift().usedTeleport(player);
}
}
setTarget(null);
if(isPlayer())
{
L2Player player = (L2Player) this;
if(player.isLogoutStarted())
{
return;
}
setIsTeleporting(true);
decayMe();
setXYZInvisible(x, y, z);
if(ref != getReflection().getId())
{
setReflection(ref);
}
// Нужно при телепорте с более высокой точки на более низкую, иначе наносится вред от "падения"
setLastClientPosition(null);
setLastServerPosition(null);
player.sendPacket(new TeleportToLocation(player, x, y, z));
}
else
{
setXYZ(x, y, z);
broadcastPacket(new TeleportToLocation(this, x, y, z));
}
}