Page 1 of 1

[Where?]CharStat and buff effects.

Posted: Sat Sep 03, 2011 10:51 am
by Sylar88
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number:
L2JDP Revision Number:

My brain is going to explode from reading all that lines of code. Or maybe im plain stupid and cant read :)

Im trying to find where in the code a skill, passes its effect options into a character. For example, i wanna find out how the patk multiplier from Might gets applied on a character.

I got up to here:

L2Skill skill;
skill = SkillTable.getInstance().getInfo(skillId, skillLevel);

if (skill != null)
skill.getEffects(player, target);

Then it goes to :

public final L2Effect[] getEffects(L2Character effector, L2Character effected, Env env) of L2Skill

Then

if (success)
{
L2Effect e = et.getEffect(env);
if (e != null)
{
e.scheduleEffect();
effects.add(e);
}
}

Then in scheduleEffect we go in started case


And then i get lost ...

Re: [Where?]CharStat and buff effects.

Posted: Sat Sep 03, 2011 11:32 am
by Sylar88
Found it. For those interested the loading happens like this :

xml->documentBase->create EffectTempaltes based on xml --> create FuncTemplates based on xml.

FuncTemplate holds the type of attribute, and the type of operation( 'mul','add' ) etc.

At first sight, such un-hardcoded code looks totally random in meaning and essense. But if you look closely and for long, patterns emerge ... :P

PS: The guy that created Func/Env/Lambda system in l2j is a genious :)