Jump to content

Recommended Posts

Posted

Hello guys this is my fire share and this is pretty basic for all you experts of Java. But I'm learning myself and couldn't find any shares for highfive beta that worked, so I found my own way to do it and this is how to do it.

 

First we locate our file L2Summon.java which is at com.l2jserver.gameserver.model.actor

Ctrl+F to search for public boolean doDie(L2Character killer) and you will see this on line 309:

public boolean doDie(L2Character killer)
	{
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			storeEffect(true);
		}
		else
		{
			storeEffect(false);
		}

It's very simple and all we do is replace on line 318 storeEffect(false); to storeEffect(true);

Now it looks like this:

public boolean doDie(L2Character killer)
	{
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			storeEffect(true);
		}
		else
		{
			storeEffect(true);
		}

Now everytime your summon dies you can resummon it on the battlefield with buffs. Now we do the player character, so open up your L2Playable.java from the same location above and search for

boolean deleteBuffs = true; on line 134 and change to boolean deleteBuffs = false;

boolean deleteBuffs = false;
		
		if (isNoblesseBlessedAffected())
		{
			stopEffects(L2EffectType.NOBLESSE_BLESSING);
			deleteBuffs = false;
		}
		if (isResurrectSpecialAffected())
		{
			stopEffects(L2EffectType.RESURRECTION_SPECIAL);
			deleteBuffs = false;
		}
		if (isPlayer())
		{
			L2PcInstance activeChar = getActingPlayer();
			
			if (activeChar.hasCharmOfCourage())
			{
				if (activeChar.isInSiege())
				{
					getActingPlayer().reviveRequest(getActingPlayer(), null, false, 0);
				}
				activeChar.setCharmOfCourage(false);
				activeChar.sendPacket(new EtcStatusUpdate(activeChar));
			}
		}
		
		if (deleteBuffs)
		{
			stopAllEffectsExceptThoseThatLastThroughDeath();
		}

So now you don't lose buffs on death for your characters and summons, great for pvp servers or whatever you are doing. Enjoy!

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock