Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2013, 01:42 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default Fix for death and rezz bug from level 89-100

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.
Reply With Quote
Reply


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 04:13 PM.


 

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