WalkSpeed is set where?

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
Kenster
Posts: 7
Joined: Fri Sep 09, 2005 5:25 am
Location: USA, PA
Contact:

WalkSpeed is set where?

Post 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
Kenster
Posts: 7
Joined: Fri Sep 09, 2005 5:25 am
Location: USA, PA
Contact:

Re: WalkSpeed is set where?

Post by Kenster »

Anyone? :(

Thanks,
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: WalkSpeed is set where?

Post by JIV »

com.l2jserver.gameserver.skills.Formulas.FuncMoveSpeed
Kenster
Posts: 7
Joined: Fri Sep 09, 2005 5:25 am
Location: USA, PA
Contact:

Re: WalkSpeed is set where?

Post 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?
Kenster
Posts: 7
Joined: Fri Sep 09, 2005 5:25 am
Location: USA, PA
Contact:

Re: WalkSpeed is set where?

Post 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.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: WalkSpeed is set where?

Post 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()
Post Reply