Page 1 of 1

WalkSpeed is set where?

Posted: Tue Jan 19, 2010 5:43 pm
by Kenster
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number:
L2JDP Revision Number:

I just have a basic question. How is PCInstance Walk speed created? From looking at CharTemplates.sql you can see there is no WalkSpd Column. And in CharTemplateTable, there is set.set("baseWalkSpd", 0); So its default is 0. When looking at the CharStat you get :

public int getWalkSpeed()
{
if (_activeChar == null)
return 1;

double baseWalkSpd = _activeChar.getTemplate().baseWalkSpd;

if (baseWalkSpd == 0)
return 0;

return (int) calcStat(Stats.WALK_SPEED, baseWalkSpd, null, null);
}

I am a bit confused.. I am just a programmer trying to understand a bit more.

Thanks,

Ken

Re: WalkSpeed is set where?

Posted: Wed Jan 20, 2010 2:48 pm
by Kenster
Anyone? :(

Thanks,

Re: WalkSpeed is set where?

Posted: Wed Jan 20, 2010 3:18 pm
by JIV
com.l2jserver.gameserver.skills.Formulas.FuncMoveSpeed

Re: WalkSpeed is set where?

Posted: Wed Jan 20, 2010 4:18 pm
by Kenster
JIV,

I see that, but that doesnt show much. Because, if the Env.Value is 0 when set previously, anything * 0 would be 0. So walkspeed would remain null. Unless that Stats.RunSpeed grabs the run speed, but that wouldn't modifify the walkspeed, which is 0.

Sorry, Can you elaborate a bit more?

Re: WalkSpeed is set where?

Posted: Wed Jan 20, 2010 9:40 pm
by Kenster
And under that if statement CalcStat would never run because WalkSpeed is 0. Which would avoid from Fomulas.Func being called at all.

Re: WalkSpeed is set where?

Posted: Wed Jan 20, 2010 10:26 pm
by JIV
http://jiv.l2jofficial.com/debug.png

//edit : ah you asking for walk speed thats here: com.l2jserver.gameserver.model.actor.stat.PcStat.getWalkSpeed()