Jump to content
  • 0

Chain Strike - Classic Skill / Code


Question

Posted (edited)

Καλησπερα παιδια , βλεπετε καποιο λαθος στον κωδικα ? 

Γιατι καποιες στιγμες δουλευει κομπλε καποιες αλλες οχι !!

 

Quote

 

/**
 * An effect that pulls effected target back to the effector.
 * @author Nik
 */
public final class PullBack extends AbstractEffect
{
    private final int _speed;
    private final int _delay;
    private final int _animationSpeed;
    private final FlyType _type;
    
    public PullBack(StatsSet params)
    {
        _speed = params.getInt("speed", 0);
        _delay = params.getInt("delay", _speed);
        _animationSpeed = params.getInt("animationSpeed", 0);
        _type = params.getEnum("type", FlyType.class, FlyType.WARP_FORWARD); // type 9
    }
    
    @Override
    public boolean calcSuccess(L2Character effector, L2Character effected, Skill skill)
    {
        return Formulas.calcProbability(100, effector, effected, skill);
    }
    
    @Override
    public boolean isInstant()
    {
        return true;
    }
    
    @Override
    public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
    {
        // In retail, you get debuff, but you are not even moved if there is obstacle. You are still disabled from using skills and moving though.
        if (GeoEngine.getInstance().canMoveToTarget(effected.getX(), effected.getY(), effected.getZ(), effector.getX(), effector.getY(), effector.getZ(), effector.getInstanceWorld()))
        {
            
            effected.broadcastPacket(new FlyToLocation(effected, effector, _type, _speed, _delay, _animationSpeed));
            effected.setXYZ(effector);
            effected.broadcastPacket(new ValidateLocation(effected));
            effected.revalidateZone(true);
        }
    }
}
 

 

ειναι το 2ο ποστ που κανω σε 2 μερες και δεν θελω να κανω συνεχεια .. αλλα δεν το αντεχω αλλοοο!!

Edited by Pamela32

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...