Jump to content
  • 0

To transform oneself when one is transformed


Question

3 answers to this question

Recommended Posts

  • 0
Posted

in fact I just need that if we launch a skill of transfo he untransform then he transfom

 

 

in EffectTransformation.java I think it s possible to untransform and after transform but this code dont work

    protected boolean onStart()
    {
        if (!(getEffected() instanceof L2Player))
            return false;
        
        L2Player trg = (L2Player)getEffected();
        
        // No transformation if dead or cursed by cursed weapon
        if (trg.isAlikeDead() || trg.isCursedWeaponEquipped())
            return false;
        
        if (trg.getTransformation() != null)
        {
            // trg.sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
            // return false;
            trg.stopTransformation(true);
                try
                {
                    Thread.sleep(4000);
                }
                catch(InterruptedException ie)
                {
                }
            TransformationManager.getInstance().transformPlayer(getSkill().getTransformId(), trg);
        }
        
        TransformationManager.getInstance().transformPlayer(getSkill().getTransformId(), trg);
        return true;
    }

 

  • 0
Posted

and in L2Player there is:

 

	public void transform(L2Transformation transformation)
	{
		if (_transformation != null)
		{
			// You already polymorphed and cannot polymorph again.
			// sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
			// return;
			
			TransformationManager.getInstance().transformPlayer(44630004, this);
		}
		if (isMounted())
		{
			// Get off the strider or something else if character is mounted
			dismount();
		}
		if (getPet() != null)
		{
			// Unsummon pets
			getPet().unSummon(this);
		}
		_transformation = transformation;
		for (L2Effect e : getAllEffects())
		{
			if (e != null && e.getSkill().isToggle())
				e.exit();
		}
		transformation.onTransform(this);
		sendSkillList();
		sendSkillCoolTime();
		ExBasicActionList.sendTo(this);
		broadcastUserInfo();
	}

 

  • 0
Posted (edited)

I find, just need to change this code in l2player.java

 

	public void transform(L2Transformation transformation)
	{
		if (_transformation != null)
		{
			
			// You already polymorphed and cannot polymorph again.
			// sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
			// return;
		_transformAllowedSkills.clear();
		transformation.onTransform(this);
		sendSkillList();
		sendSkillCoolTime();
		ExBasicActionList.sendTo(this);
		broadcastUserInfo();
			
		}
		if (isMounted())

 

Edited by sacrifice

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...