If you are level 95ish to 100 and die you come back as a level 1. This is because int32 doesnt go high enough.
Code:
index bc1ecec..c67a5b7 100644
--- "a/C:\\TortoiseGit\\attAA2C.tmp\\attack-9fdb686-left.cpp"
+++ "b/C:\\EQEMU\\EQEmuServer\\zone\\attack.cpp"
@@ -1534,7 +1534,9 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
if(!GetGM())
{
if(exploss > 0) {
- int32 newexp = GetEXP();
+ uint32 newexp = GetEXP();
if(exploss > newexp) {
//lost more than we have... wtf..
newexp = 1;
If you are say level 99 and try to get a 96% rez you get deleveled to 89. Again this is due (i think) to the INT preceeding GetExp() in below..
Code:
index cb6456f..3fc5c8f 100644
--- "a/C:\\TortoiseGit\\cli6EA.tmp\\client_process-9fdb686-left.cpp"
+++ "b/C:\\EQEMU\\EQEmuServer\\zone\\client_process.cpp"
@@ -1170,7 +1170,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
}
if(spells[SpellID].base[0] < 100 && spells[SpellID].base[0] > 0 && PendingRezzXP > 0)
{
- SetEXP(((int)(GetEXP()+((float)((PendingRezzXP / 100) * spells[SpellID].base[0])))),
+ SetEXP(((uint32)(GetEXP()+((float)((PendingRezzXP / 100) * spells[SpellID].base[0])))),
GetAAXP(),true);
}
else if (spells[SpellID].base[0] == 100 && PendingRezzXP > 0) {
I am pretty new at coding, but i have tested both quite a bit and they seem ok. Let me know if i made any obvious mistakes please. I would love to learn.