[SOLVED]How do you increase pet buff slots?

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Rexxar
Posts: 12
Joined: Wed Mar 02, 2011 2:38 pm

[SOLVED]How do you increase pet buff slots?

Post by Rexxar »

L2J Revision Number: 4777
L2JDP Revision Number: 8231


Quick question; Which file/class/method is it that defines/maintains the number of servitor/pet buff slots?

I can't seem to be able to find a clearly defined method anywhere that specifically handles this.
Last edited by Rexxar on Sat Aug 20, 2011 7:21 am, edited 2 times in total.
Rexxar
Posts: 12
Joined: Wed Mar 02, 2011 2:38 pm

Re: Pet buff slots

Post by Rexxar »

No one have any clue? I'm not looking for specific instructions, just a pointer to what file and perhaps method it's located in, the rest I should be able to find on my own. :)
vampir
Posts: 113
Joined: Sun Mar 28, 2010 6:17 pm

Re: How do you increase pet buff slots?

Post by vampir »

ok answer is in CharEffectList
its for L2PcInstance but also for summon
i am not rly sure where exacly it is but i am pretty sure it will be there :)
Rexxar
Posts: 12
Joined: Wed Mar 02, 2011 2:38 pm

Re: How do you increase pet buff slots?

Post by Rexxar »

Thanks a lot vampir! :)

I'll put up my findings so that others can benefit from it;



Buffs:

Open L2Character.java and go to line 6895, find:

Code: Select all

 public int getMaxBuffCount(){    return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION));} 
Replace with:

Code: Select all

 public int getMaxBuffCount(){    if (this instanceof L2Summon) {        return 20;    } else {        return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION));    }} 
In this case 20 is the number of buff slots pets/summons can have, you can replace it with whatever you feel like. I realize magic numbers are bad, but I'm a lazy bastard. :P


Dance/Songs:

Open CharEffectList.java and go to line 841, find:

Code: Select all

effectsToRemove = getDanceCount() - Config.DANCES_MAX_AMOUNT;
Replace with:

Code: Select all

 if (_owner instanceof L2Summon) {    effectsToRemove = getDanceCount() - 12;} else {    effectsToRemove = getDanceCount() - Config.DANCES_MAX_AMOUNT;} 
Again, magic numbers, but whatever. Just replace the 12 with however many dance and song slots you want pets/summons to have.
Post Reply