FIX: Skills not capping properly.
For me the skills were not capping properly and I found out that the DB query was off at least for PEQ? Maybe I just jumped blindly, if so let me know....
Replace GetSkillCap in database.cpp with this Code:
int8 Database::GetSkillCap(int8 skillid, int8 in_race, int8 in_class, int16 in_level) |
I don't think this code is actually still being used in the server, at least I looked at the unmodified code and it seems old.. is uses skillcaps table for instance and we use skill_caps now...
Can you explain what exactly is wrong with skill caps, what were you trying to fix? |
When I was level one, as long as I used offeense it kept going up, it never stopped at 10, like the skillcaps table said it should. I was trying to make it so it would. On a side note where is this skills_caps table? I didn't see any tables...
|
Quote:
|
I have that table, but it still wasn't working... SELECT * FROM peq.skill_caps s;
The old DB query in the code was Code:
//if (RunQuery(query, MakeAnyLenString(&query, "SELECT level, formula, pre50cap, post50cap, post60cap from skillcaps where skill = %i && class = %i", skillid, in_class), errbuf, &result, &affected_rows)) Code:
if (RunQuery(query, MakeAnyLenString(&query, "SELECT cap from skill_caps where skillID = %i && class = %i && level = %i", skillid, in_class, in_level), errbuf, &result, &affected_rows)) |
I think that what KLS is saying is that the code you pasted above isn't the code that loads skill caps any more. Pretty sure the current code for skill caps is in shareddb.cpp in the DBLoadSkillCaps function, which does have the correct query:
Code:
"SELECT skillID,class,level,cap FROM skill_caps ORDER BY skillID,class,level" |
I didn't mean to say he was incorrect and if thats how it came out I sincerely apologize.
I cannot give more information that that... I was at level 1 using a 1hslash weapon, i got 11 offense at level 1 which according to my database said was incorrect.. When I modified the code to what I put in the posts above I was capped at 10 offense at elvel 1. |
That's very bizarre, I wasn't able to reproduce this, either on my test server or TGC. Both are running the same code more or less and are the newest.
|
Hmm, Ok maybe I'm just retarded somehow -shrugs- sorry for all the trobule, feel free to delete this topic.
|
All times are GMT -4. The time now is 12:54 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.