Page 1 of 1

[SOLVED]How do you increase pet buff slots?

Posted: Tue Aug 09, 2011 7:21 am
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.

Re: Pet buff slots

Posted: Thu Aug 11, 2011 7:46 am
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. :)

Re: How do you increase pet buff slots?

Posted: Sat Aug 13, 2011 7:03 pm
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 :)

Re: How do you increase pet buff slots?

Posted: Sat Aug 20, 2011 7:21 am
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.