Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance.calculateAttackDelay()


    int old_posY = posY;
    int old_posZ = posZ;
    int signx = posX < attacker.getX() ? -1 : 1;
    int signy = posY < attacker.getY() ? -1 : 1;
    // int range = (int) ((actor.calculateAttackSpeed()  /1000 * actor.getWalkSpeed() )* 0.71); // was "actor.getPhysicalAttackRange()"    0.71 = sqrt(2) / 2
    int range = (int) (0.71 * actor.calculateAttackDelay() / 1000 * actor.getMoveSpeed());
    posX += signx * range;
    posY += signy * range;
    posZ = GeoEngine.getHeight(posX, posY, posZ, actor.getReflection().getGeoIndex());
    if(GeoEngine.canMoveToCoord(old_posX, old_posY, old_posZ, posX, posY, posZ, actor.getReflection().getGeoIndex()))
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.