Jumping raises a random miscellaneous skill.
Running still does not go up.
Current code dosnt fix jumping, and running. [resolved]
- Midknightprince
- Posts: 1324
- Joined: Fri Aug 11, 2017 6:51 am
- Location: San Antonio TX
- Contact:
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Current code dosnt fix jumping, and running.
Allofich, more information on this for you.
It seems there's a namespace issue in PlayerEntity on line 162.
We want to be sending the value of the DFCareer.Skills enum, but instead the above TallySkill() is sending the current skill value from DaggerfallSkills class (DaggerfallEntity also has a property called Skills containing the same member names). This is why jumping raises a random value and throws an exception once array overflows.
This ties into my exception with a skillId of 50 in the other bug thread. My current jumping skill is 50.
My recommendation is to change TallySkill() to accept DFCareer.Skills in first param rather than an int. This ensures the param passed remains typesafe. You can then just cast it back to an int inside TallySkills() for purposes of accessing array.
I've sent a commit with this change now. I tried to touch as little as possible just to overcome this issue. This seems to have fixed issue with skill increments and my index out of range exception.
Please let me know if I've done anything wrong here.
It seems there's a namespace issue in PlayerEntity on line 162.
Code: Select all
TallySkill((short)Skills.Jumping, 1);
This ties into my exception with a skillId of 50 in the other bug thread. My current jumping skill is 50.
My recommendation is to change TallySkill() to accept DFCareer.Skills in first param rather than an int. This ensures the param passed remains typesafe. You can then just cast it back to an int inside TallySkills() for purposes of accessing array.
I've sent a commit with this change now. I tried to touch as little as possible just to overcome this issue. This seems to have fixed issue with skill increments and my index out of range exception.
Please let me know if I've done anything wrong here.
- Midknightprince
- Posts: 1324
- Joined: Fri Aug 11, 2017 6:51 am
- Location: San Antonio TX
- Contact:
Re: Current code dosnt fix jumping, and running.
Yep, fixed on my end.
Thanks
Thanks
Check out my YouTube Channel!
-
- Posts: 379
- Joined: Fri Oct 07, 2016 10:41 am
Re: Current code dosnt fix jumping, and running.
Thanks for checking that Interkarma. Coincidentally, the character I tested jumping with had a jumping skill of 3%, which matches the skillID of 3, so I mistakenly thought it was working.
Also, Midknightprince, sorry, I didn't notice you also mentioned running wasn't being tallied. That actually isn't implemented yet, because I'm not 100% sure how classic tallies it. I have a general idea, though, and I think I can probably approximate it, which I'll try to do before too long.
Also, Midknightprince, sorry, I didn't notice you also mentioned running wasn't being tallied. That actually isn't implemented yet, because I'm not 100% sure how classic tallies it. I have a general idea, though, and I think I can probably approximate it, which I'll try to do before too long.
- Midknightprince
- Posts: 1324
- Joined: Fri Aug 11, 2017 6:51 am
- Location: San Antonio TX
- Contact:
Re: Current code dosnt fix jumping, and running.
@R.D.
Np, glad I could help, and thank's for elaborating on that.
Keep up the great work
Np, glad I could help, and thank's for elaborating on that.
Keep up the great work
Check out my YouTube Channel!