Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-21-2018, 06:41 PM
Pyrate
Fire Beetle
 
Join Date: Mar 2004
Posts: 9
Default Levelling beyond 89 (and a half)

Let me start off by saying I'm not overly familiar with the deepest inner workings of the source code, but I do have enough programming knowledge that I felt comfortable enough to download the source and dig through it to try and find my problem and fix it before bringing it here.


I've recently raised my level cap on my small server from 85 to 100, mostly for my own fun, but I discovered a seeming inability to maintain a level beyond 89. I've done some digging on the forums and found a few fairly old threads (one in partcular, http://www.eqemulator.org/forums/showthread.php?t=28822) that mention this issue.

In my testing and efforts to determine what causes this I found a trail of things that I *think* led me to the answer.

1) I discovered that it IS possible to level beyond 89, and through merciless GM-style pummeling of numerous enemies even to level 100. However, ...
2) Whenever that character zones (regardless of whether the new zone had to be booted or was already up), the NEXT exp-generating kill (even if AA is set to 100%) results in the immediate de-levelling to approximately level 89.5.
3) Examination of the "character_data.exp" field in the database before zoning, after zoning, and after the new kill shows that the database value is appropriately large both before and after zoning, but after the kill it resets to ~MAX-SINT32 (approx 2,147,483,647).
4) However, AFTER this kill, I can once again mass-murder NPCs and level up to 100 again. (As long I don't zone)
5) The problem presents every time the character zones (or logs in), which lead me to determine that the problem lies in the packet(s) sent back and forth when loading a character into a zone (regardless of whether or not the zone has already booted or not)

When I downloaded the recent source and began to dig, I found this line, which, I believe *may* be the culprit. The exp data-type in the structure is large enough, but I believe the use of atoi() truncates the experience value to MAX-SINT32 when reading character data from the database is the problem.

Code:
zone/zonedb.cpp:1119 
 pp->exp = atoi(row[r]); r++;
I believe should be

Code:
zone/zonedb.cpp:1119 
 pp->exp = atol(row[r]); r++;
I have tested that this compiles, but I haven't been able to verify the change fixes the problem yet, as there seems to be another issue in my compile that doesn't allow me to zone at all (I saw that issue even before I made this change, and there seems to be a much more recent forum post about a similar issue: http://www.eqemulator.org/forums/showthread.php?t=42079)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:19 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3