EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   FIX: some xp bugs (https://www.eqemulator.org/forums/showthread.php?t=3802)

neotokyo 11-09-2002 03:05 AM

FIX: some xp bugs
 
as you may well know, the xp bar didnt really update well. and when you put 100% into AAXP the game actually said that you lose xp. well those issues are kinda fixed.

sorry i dont have a diff output :-((

in client.cpp


void Client::SetEXP(int32 set_exp, int32 set_aaxp, bool isrezzexp) {

> // neotokyo 09-Nov-02
> // each AA-Level is supposed to be like levelling from 51 to 52
> // -- this is probably not the best place to calculate the xp needed, but at
> // least the neccessary variables are valid (race,class,...)
> max_AAXP = GetEXPForLevel(52) - GetEXPForLevel(51);
> // neotokyo 09-Nov-02
> // need to calc the sum of both xp's otherwise the prg thinks its negative xp
> if ((set_exp + set_aaxp) > pp.exp)


in client.cpp in the same function SetEXP i changed the formula for eu->exp to correctly update the xp bar in the client:


ExpUpdate_Struct* eu = (ExpUpdate_Struct*)app.pBuffer;
> double tmpxp = (double) ( (double) set_exp-GetEXPForLevel( GetLevel() )) /
> ( (double) GetEXPForLevel(GetLevel()+1)-GetEXPForLevel(GetLevel()));
> eu->exp = (int32)(330.0f * tmpxp);
QueuePacket(&app);


the "wrong" formula is applied throughout the zone-server in a few other places. you need to replace those at well.
hope this isnt too confused ...


All times are GMT -4. The time now is 04:53 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.